/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #f9f6f0;
    --color-bg-warm: #f3ede3;
    --color-text: #2c2a26;
    --color-muted: #7a7567;
    --color-accent: #5c7a4a;
    --color-accent-dark: #3d5632;
    --color-accent-light: #e8f0e4;
    --color-gold: #b8860b;
    --color-gold-light: #f5ecd4;
    --color-border: #e0dbd0;
    --color-card-bg: #ffffff;
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 900px;
    --spacing: 2rem;
    --radius: 6px;
}

html {
    font-size: 18px;
    line-height: 1.7;
}

body {
    font-family: var(--font-serif);
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Header & Nav ===== */
.site-header {
    background: var(--color-bg-warm);
    border-bottom: 2px solid var(--color-gold);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.9rem var(--spacing);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-size: 1.2rem;
    font-weight: normal;
    text-decoration: none;
    color: var(--color-text);
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.site-title:hover {
    color: var(--color-gold);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    text-decoration: none;
    color: var(--color-muted);
    transition: color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--color-gold);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text);
}

/* ===== Main Content ===== */
.content {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing);
    width: 100%;
}

/* ===== Homepage Hero ===== */
.hero {
    padding: 3rem 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 3rem;
}

.hero-inner {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.author-photo {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.hero-text h1 {
    font-size: 2.2rem;
    font-weight: normal;
    letter-spacing: 0.02em;
    margin-bottom: 0.1rem;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--color-muted);
    font-style: italic;
    margin-bottom: 1.2rem;
}

.hero-bio {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

.hero-bio-en {
    font-size: 0.85rem;
    color: var(--color-muted);
    line-height: 1.6;
}

/* ===== Books Section ===== */
.books-section {
    padding: 1rem 0 3rem;
}

.section-heading {
    font-size: 1.4rem;
    font-weight: normal;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.heading-en {
    font-size: 0.85rem;
    color: var(--color-muted);
    font-style: italic;
    margin-left: 0.5rem;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.book-card {
    display: flex;
    flex-direction: column;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.2s, box-shadow 0.2s;
}

.book-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.book-cover {
    height: 280px;
    overflow: hidden;
    background: var(--color-bg-warm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.book-card:hover .book-cover img {
    transform: scale(1.03);
}

.book-info {
    padding: 1rem 1.2rem;
}

.book-info h3 {
    font-size: 1rem;
    font-weight: normal;
    margin-bottom: 0.2rem;
}

.book-card-en {
    font-size: 0.8rem;
    color: var(--color-muted);
    font-style: italic;
}

/* ===== Book / Chapters ===== */
.book-header,
.chapter-header,
.videos-header {
    text-align: center;
    padding: 3rem 0 2rem;
}

.book-header h1,
.chapter-header h1,
.videos-header h1 {
    font-size: 2rem;
    font-weight: normal;
}

.book-subtitle,
.videos-subtitle {
    color: var(--color-muted);
    font-style: italic;
    margin-top: 0.3rem;
}

.breadcrumb {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.breadcrumb a {
    color: var(--color-accent);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.book-landing {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.book-landing-cover {
    width: 200px;
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.book-landing-text {
    font-size: 0.95rem;
    line-height: 1.8;
}

.book-landing-text p {
    margin-bottom: 1rem;
}

@media (max-width: 600px) {
    .book-landing {
        flex-direction: column;
        align-items: center;
    }
    .book-landing-cover {
        width: 160px;
    }
}

.chapters-list {
    max-width: 500px;
    margin: 0 auto;
}

.chapter-link {
    display: block;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.15s, padding-left 0.15s;
}

.chapter-link:first-child {
    border-top: 1px solid var(--color-border);
}

.chapter-link:hover {
    background: var(--color-gold-light);
    padding-left: 2rem;
}

.chapter-link h2 {
    font-size: 1.1rem;
    font-weight: normal;
}

.chapter-en {
    font-size: 0.8rem;
    color: var(--color-muted);
    font-style: italic;
}

/* ===== Poems ===== */
.poems {
    padding: 1rem 0;
}

.poem {
    margin-bottom: 4rem;
    padding: 2.5rem 2rem;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.poem-title {
    font-size: 1.15rem;
    font-weight: normal;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2rem;
    color: var(--color-accent-dark);
}

.poem-body {
    display: none;
}

.poem-body.active {
    display: block;
}

.stanza {
    margin-bottom: 1.3rem;
    line-height: 1.9;
}

.stanza:last-child {
    margin-bottom: 0;
}

.poem-date {
    margin-top: 1.5rem;
    text-align: right;
    font-size: 0.8rem;
    color: var(--color-muted);
    font-style: italic;
}

/* Play formatting */
.poem.play .poem-body {
    max-width: 700px;
}

.play-paragraph {
    margin-bottom: 1em;
    line-height: 1.7;
    text-align: justify;
}

.play-paragraph em {
    color: var(--color-muted);
    font-style: italic;
}

.play-paragraph strong {
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Contact page */
.contact-page {
    max-width: 700px;
    margin: 0 auto;
}

.contact-page h1 {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--color-dark);
}

.contact-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.contact-section:last-child {
    border-bottom: none;
}

.contact-section h2 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

.contact-email-main {
    font-size: 1.2rem;
}

.contact-email-main a {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px solid var(--color-accent);
}

.order-details {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--color-cream);
    border-radius: 6px;
    border-left: 3px solid var(--color-accent);
}

.order-details p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.order-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.order-table th,
.order-table td {
    padding: 0.5rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.order-table th {
    background: var(--color-accent);
    color: white;
    font-weight: 600;
}

.lang-buttons {
    display: flex;
    gap: 0.4rem;
    margin-top: 1.5rem;
}

.lang-btn {
    padding: 0.35rem 0.9rem;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 3px;
    cursor: pointer;
    color: var(--color-muted);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.lang-btn:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.lang-btn.active {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: white;
}

/* ===== Videos ===== */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.video-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-title {
    padding: 0.8rem 1rem 0.2rem;
    font-size: 0.9rem;
}

.video-artist {
    padding: 0 1rem 0.8rem;
    font-size: 0.8rem;
    color: var(--color-muted);
    font-style: italic;
}

/* ===== Footer ===== */
.site-footer {
    border-top: 2px solid var(--color-gold);
    background: var(--color-bg-warm);
    padding: 2rem var(--spacing);
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-muted);
    font-family: var(--font-sans);
}

.site-footer p {
    margin-bottom: 0.3rem;
}

.footer-email {
    color: var(--color-gold);
    text-decoration: none;
}

.footer-email:hover {
    text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    html {
        font-size: 16px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-bg-warm);
        border-bottom: 2px solid var(--color-gold);
        padding: 1rem var(--spacing);
        gap: 0.8rem;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .hero-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-photo {
        width: 160px;
        height: 160px;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .book-cover {
        height: 180px;
    }

    .videos-grid {
        grid-template-columns: 1fr;
    }

    .poem {
        padding: 1.5rem 1.2rem;
    }
}
