/*
Theme Name: Jonthavann Journey
Theme URI: https://jonthavann.com
Author: Jonthavann
Description: A warm, editorial storytelling and personal journey WordPress theme crafted for reading stories, essays, and life milestones.
Version: 1.0.0
Text Domain: jonthavann-journey
*/

:root {
    --bg-page: #faf8f5;
    --bg-surface: #ffffff;
    --bg-subtle: #f3efe8;
    --bg-dark: #1c1917;
    --text-primary: #1c1917;
    --text-secondary: #57534e;
    --text-muted: #78716c;
    --accent: #b45309;
    --accent-hover: #92400e;
    --accent-soft: #fef3c7;
    --border: #e7e2da;
    --shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.05);
    --shadow-md: 0 10px 30px -10px rgba(28, 25, 23, 0.08);
    --radius-md: 14px;
    --radius-lg: 22px;
    --font-serif: 'Newsreader', 'Lora', Georgia, 'Times New Roman', serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    width: 100%;
    max-width: 740px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent);
    width: 0%;
    z-index: 1000;
    transition: width 0.1s linear;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 248, 245, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 74px;
    gap: 20px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.site-brand:hover {
    color: var(--accent);
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--bg-dark);
    color: #faf8f5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    padding: 6px 0;
    position: relative;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a {
    color: var(--text-primary);
}

.nav-menu .current-menu-item > a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1.5px solid transparent;
}

.btn-primary {
    background: var(--bg-dark);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--accent);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    padding: 84px 0 64px;
    text-align: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--accent-soft);
    color: var(--accent-hover);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(38px, 6vw, 60px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    max-width: 820px;
    margin: 0 auto 22px;
}

.hero-title em {
    font-style: italic;
    color: var(--accent);
}

.hero-subtitle {
    font-size: 19px;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-visual {
    margin: 48px auto 0;
    max-width: 980px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    aspect-ratio: 16 / 8;
    background: var(--bg-subtle);
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

/* Section Headers */
.section {
    padding: 56px 0;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.section-kicker {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 6px;
    display: block;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.section-link {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
}

/* Category Pills */
.topic-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.topic-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.topic-pill:hover,
.topic-pill.active {
    background: var(--bg-dark);
    border-color: var(--bg-dark);
    color: #ffffff;
}

/* Featured Story Card */
.featured-story {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--shadow-md);
    margin-bottom: 36px;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 0;
    position: relative;
    overflow: hidden;
}

.featured-story.no-thumb {
    grid-template-columns: 1fr;
}

.featured-story-media {
    display: block;
    overflow: hidden;
    background: var(--bg-subtle);
    min-height: 280px;
}

.featured-story-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    transition: transform 0.45s ease;
}

.featured-story:hover .featured-story-media img {
    transform: scale(1.03);
}

.featured-story-body {
    padding: 40px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.featured-story::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #f59e0b);
    z-index: 2;
}

.story-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.story-cat {
    display: inline-block;
    padding: 3px 11px;
    background: var(--accent-soft);
    color: var(--accent-hover);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.featured-story h3 {
    font-family: var(--font-serif);
    font-size: clamp(26px, 3.5vw, 36px);
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.02em;
}

.featured-story h3 a {
    color: var(--text-primary);
}

.featured-story h3 a:hover {
    color: var(--accent);
}

.featured-excerpt {
    font-size: 17px;
    color: var(--text-secondary);
    margin: 0;
    max-width: 760px;
    line-height: 1.7;
}

/* Story Cards Grid */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.story-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.story-card-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-subtle);
}

.story-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    transition: transform 0.4s ease;
}

.story-card:hover .story-card-thumb img {
    transform: scale(1.04);
}

.story-card-body {
    padding: 24px 26px 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    gap: 14px;
}

.article-cover {
    max-width: 880px;
    margin: 0 auto 40px;
    padding: 0 24px;
}

.article-cover img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    display: block;
}

.story-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #d6cfc4;
}

.story-card h3 {
    font-family: var(--font-serif);
    font-size: 22px;
    line-height: 1.3;
    margin: 10px 0 10px;
}

.story-card h3 a {
    color: var(--text-primary);
}

.story-card h3 a:hover {
    color: var(--accent);
}

.story-card p {
    margin: 0;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.read-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

/* Journey Timeline */
.timeline-section {
    background: var(--bg-subtle);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 72px 0;
    margin: 32px 0;
}

.timeline {
    position: relative;
    max-width: 760px;
    margin: 36px auto 0;
    padding-left: 34px;
    border-left: 2px solid #d6cfc4;
}

.timeline-item {
    position: relative;
    margin-bottom: 38px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -42px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-subtle);
    box-shadow: 0 0 0 2px var(--accent);
}

.timeline-year {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 4px;
}

.timeline-item h3 {
    font-family: var(--font-serif);
    font-size: 22px;
    margin: 0 0 6px;
    color: var(--text-primary);
}

.timeline-item p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 15px;
}

/* Projects / Games Callout */
.callout-banner {
    background: var(--bg-dark);
    color: #faf8f5;
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.callout-banner h3 {
    font-family: var(--font-serif);
    font-size: 30px;
    margin: 0 0 10px;
    color: #ffffff;
}

.callout-banner p {
    margin: 0;
    color: #d6d3d1;
    max-width: 560px;
    font-size: 16px;
}

.callout-banner .btn-light {
    background: #faf8f5;
    color: var(--bg-dark);
}

.callout-banner .btn-light:hover {
    background: var(--accent-soft);
    color: var(--bg-dark);
}

/* Single Story & Page Reading View */
.article-header {
    padding: 64px 0 36px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
    text-align: center;
}

.article-header .story-meta {
    justify-content: center;
    margin-bottom: 16px;
}

.article-title {
    font-family: var(--font-serif);
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 auto 16px;
    max-width: 780px;
    color: var(--text-primary);
}

.article-content {
    font-family: var(--font-serif);
    font-size: 20px;
    line-height: 1.85;
    color: #292524;
    padding-bottom: 56px;
}

.article-content p {
    margin: 0 0 24px;
}

.article-content h2,
.article-content h3 {
    font-family: var(--font-serif);
    color: var(--text-primary);
    margin: 40px 0 16px;
    line-height: 1.25;
}

.article-content h2 { font-size: 30px; }
.article-content h3 { font-size: 24px; }

.article-content blockquote {
    margin: 32px 0;
    padding: 16px 24px;
    border-left: 3px solid var(--accent);
    background: var(--bg-subtle);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-content ul,
.article-content ol {
    margin: 0 0 24px;
    padding-left: 26px;
}

.article-content li {
    margin-bottom: 8px;
}

/* Post Navigation */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 48px;
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.post-nav-link:hover {
    border-color: var(--accent);
}

.post-nav-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 600;
}

.post-nav-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Author Box */
.author-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    margin-bottom: 40px;
}

.author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-dark);
    color: #faf8f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
}

.author-box h4 {
    margin: 0 0 4px;
    font-size: 16px;
    color: var(--text-primary);
}

.author-box p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Comments */
.comments-area {
    padding-bottom: 64px;
}

.comments-area h3 {
    font-family: var(--font-serif);
    font-size: 24px;
    margin-bottom: 20px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 36px;
}

.comment-body {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 16px;
}

.comment-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-surface);
    font-family: var(--font-sans);
    font-size: 15px;
    margin-bottom: 16px;
}

.comment-form input[type="submit"] {
    background: var(--bg-dark);
    color: #ffffff;
    border: none;
    padding: 12px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
}

.comment-form input[type="submit"]:hover {
    background: var(--accent);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
    padding: 56px 0 36px;
    margin-top: 40px;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.footer-bio {
    max-width: 380px;
}

.footer-bio p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 12px 0 0;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.pagination .page-numbers.current {
    background: var(--bg-dark);
    border-color: var(--bg-dark);
    color: #ffffff;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: inline-flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 74px;
        left: 0;
        right: 0;
        background: var(--bg-page);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px 24px;
        box-shadow: var(--shadow-md);
    }

    .main-nav.open {
        display: block;
    }

    .nav-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .featured-story {
        grid-template-columns: 1fr;
    }

    .featured-story-body {
        padding: 26px 22px;
    }

    .hero-visual {
        aspect-ratio: 16 / 10;
    }

    .post-nav {
        grid-template-columns: 1fr;
    }

    .callout-banner {
        padding: 32px 24px;
    }

    .article-content {
        font-size: 18px;
    }
}
