/* styles.css */
:root {
    /* =============================================
       TEMPLATE VARIABLES — DO NOT MODIFY
       ============================================= */
    --bg: #f5f3ef;
    --surface: #ffffff;
    --card: #fafaf8;
    --text: #1a1a18;
    --muted: #6b6b67;
    --accent: #1d3a2a;      /* Deep Forest Green */
    --accent2: #c8a96e;     /* Warm Gold */

    --radius: 16px;
    --font-main: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* Spacing variables */
    --space-sm: clamp(8px, 2vw, 12px);
    --space-md: clamp(16px, 3vw, 24px);
    --space-lg: clamp(32px, 5vw, 48px);
    --container: 1200px;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    font-weight: 300;
}

a { text-decoration: none; color: inherit; transition: 0.25s ease; }
ul { list-style: none; }

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 243, 239, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(26, 26, 24, 0.08);
}

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 18px var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

.logo-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.01em;
}

.main-nav {
    display: flex;
    gap: 32px;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.main-nav a {
    color: var(--muted);
    position: relative;
    padding-bottom: 2px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

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

.main-nav a:hover::after {
    width: 100%;
}

.lang-switcher {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.lang-switcher a {
    color: var(--muted);
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: 0.2s;
}

.lang-switcher a.active,
.lang-switcher a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .main-nav { display: none; }
}

/* =============================================
   MAIN LAYOUT
   ============================================= */
main {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
    margin-bottom: calc(var(--space-lg) * 1.5);
    min-height: 70vh;
}

.hero-visual {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/5;
    background: var(--accent);
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.6s ease;
}

.hero-visual:hover img {
    transform: scale(1.03);
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-md) 0;
}

.hero-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent2);
    background: rgba(200, 169, 110, 0.12);
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid rgba(200, 169, 110, 0.3);
    width: fit-content;
}

.article-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.lead {
    font-size: 1.05rem;
    color: var(--muted);
    font-weight: 300;
    line-height: 1.75;
}

.meta-panel {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(26, 26, 24, 0.1);
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.meta-item .label {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0.7;
}

.meta-item .value {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text);
}

.meta-divider {
    width: 1px;
    height: 32px;
    background: rgba(26, 26, 24, 0.12);
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .hero-visual {
        aspect-ratio: 16/9;
    }
}

/* =============================================
   CONTENT WRAPPER (Article + Sidebar)
   ============================================= */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-lg);
    margin-bottom: calc(var(--space-lg) * 2);
    align-items: start;
}

@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    .author-sidebar {
        order: -1;
    }
}

/* =============================================
   ARTICLE CONTENT
   ============================================= */
.content-body {
    max-width: 100%;
}

.content-body p {
    margin-bottom: 1.6rem;
    color: #3a3a38;
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.8;
}

.content-body h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.7rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
    font-weight: 700;
}

.content-body h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.content-body blockquote {
    position: relative;
    border: none;
    margin: 2.5rem 0;
    padding: var(--space-md) var(--space-md) var(--space-md) calc(var(--space-md) + 28px);
    background: var(--surface);
    border-radius: var(--radius);
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--text);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

.content-body blockquote::before {
    content: '"';
    position: absolute;
    left: 20px;
    top: 12px;
    font-size: 3rem;
    line-height: 1;
    color: var(--accent2);
    font-family: 'Playfair Display', Georgia, serif;
}

.content-body blockquote cite {
    display: block;
    margin-top: 12px;
    font-style: normal;
    font-size: 0.85rem;
    font-family: var(--font-main);
    color: var(--muted);
    letter-spacing: 0.03em;
}

/* Info Box */
.info-box {
    background: var(--surface);
    border-radius: var(--radius);
    padding: var(--space-md);
    margin: 1.5rem 0 2rem;
    border: 1px solid rgba(26, 26, 24, 0.07);
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}

.info-box ul {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-box ul li {
    position: relative;
    padding-left: 20px;
    color: #3a3a38;
    font-size: 0.98rem;
    line-height: 1.7;
    font-weight: 300;
}

.info-box ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent2);
    font-weight: 500;
}

.info-box ul li strong {
    color: var(--text);
    font-weight: 500;
}

/* =============================================
   AUTHOR SIDEBAR
   ============================================= */
.author-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    position: sticky;
    top: 90px;
}

.author-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(26, 26, 24, 0.07);
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.author-avatar {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--accent);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.author-info {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.author-label {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent2);
}

.author-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

.author-bio {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.6;
    font-weight: 300;
}

.author-socials {
    display: flex;
    gap: 14px;
    padding-top: 8px;
    border-top: 1px solid rgba(26,26,24,0.07);
    margin-top: 4px;
}

.author-socials a {
    color: var(--muted);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26,26,24,0.05);
    transition: 0.2s;
}

.author-socials a:hover {
    background: var(--accent);
    color: #fff;
}

/* TOC Card */
.toc-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: var(--space-md);
    border: 1px solid rgba(26, 26, 24, 0.07);
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.toc-title {
    font-family: var(--font-main);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.toc-list {
    list-style: none;
    counter-reset: toc-counter;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toc-list li {
    counter-increment: toc-counter;
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--muted);
}

.toc-list li::before {
    content: counter(toc-counter, decimal-leading-zero);
    font-size: 0.7rem;
    color: var(--accent2);
    font-weight: 500;
    min-width: 20px;
}

.toc-list li a {
    color: var(--muted);
    transition: color 0.2s;
    line-height: 1.4;
}

.toc-list li a:hover {
    color: var(--accent);
}

/* =============================================
   RELATED SECTION
   ============================================= */
.related-section {
    margin-top: var(--space-lg);
    border-top: 1px solid rgba(26, 26, 24, 0.1);
    padding-top: var(--space-lg);
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.section-header h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.decoder-line {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(26,26,24,0.15), transparent);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-md);
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: var(--space-md);
    border: 1px solid rgba(26, 26, 24, 0.07);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(29, 58, 42, 0.2);
    box-shadow: 0 12px 32px -8px rgba(29, 58, 42, 0.1);
}

.card-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    background: rgba(29, 58, 42, 0.08);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 50px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    font-family: var(--font-main);
}

.badge.warning {
    background: rgba(200, 100, 50, 0.08);
    color: #c86432;
}

.card h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    color: var(--text);
    font-weight: 700;
    line-height: 1.3;
}

.card p {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.6;
    font-weight: 300;
    flex-grow: 1;
}

.card-status {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.02em;
    padding-top: 8px;
    border-top: 1px solid rgba(26,26,24,0.06);
    margin-top: auto;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent2);
    display: inline-block;
    flex-shrink: 0;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
    border-top: 1px solid rgba(26, 26, 24, 0.1);
    margin-top: var(--space-lg);
    background: var(--surface);
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-md) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-left .brand {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
}

.footer-left .copy {
    font-size: 0.8rem;
    color: var(--muted);
}

.footer-nav {
    display: flex;
    gap: 24px;
    font-size: 0.8rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.footer-nav a {
    color: var(--muted);
}

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

.footer-socials {
    display: flex;
    gap: 14px;
    align-items: center;
}

.footer-socials a {
    color: var(--muted);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(26,26,24,0.1);
    transition: 0.2s;
}

.footer-socials a:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.footer-bottom {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-md) var(--space-md);
    border-top: 1px solid rgba(26,26,24,0.07);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-bottom p {
    font-size: 0.68rem;
    color: var(--muted);
    opacity: 0.6;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.5;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 600px) {
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-nav {
        gap: 16px;
        flex-wrap: wrap;
    }
    .meta-panel {
        gap: 12px;
    }
    .meta-divider {
        display: none;
    }
}

/* =============================================
   SUBTLE ANIMATIONS
   ============================================= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-content {
    animation: fadeUp 0.7s ease both;
    animation-delay: 0.1s;
}

.hero-visual {
    animation: fadeUp 0.7s ease both;
}

.content-body {
    animation: fadeUp 0.5s ease both;
    animation-delay: 0.2s;
}
