@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Noto+Serif+TC:wght@400;500;600;700;900&family=Noto+Sans+TC:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

:root {
    --ink:        #1C1917;
    --ink-soft:   #44403C;
    --ink-muted:  #78716C;
    --paper:      #FAF7F2;
    --paper-2:    #F4EFE6;
    --card:       #FFFDF9;
    --border:     #E8DFD0;
    --border-soft:#F0E8DA;
    --forest:     #2F4F3E;
    --forest-dk:  #1E3326;
    --sage:       #8BA888;
    --sage-bg:    #E8EEE4;
    --terra:      #C8704D;
    --terra-soft: #F5E6DD;
    --butter:     #E8B84C;
    --butter-soft:#FBF0D4;
    --rose:       #B8556E;
    --rose-soft:  #F5E1E8;
    --ochre:      #A67C3D;
    --ochre-soft: #F3E8D4;
    --shadow-sm:  0 1px 2px rgba(28, 25, 23, 0.04), 0 1px 3px rgba(28, 25, 23, 0.03);
    --shadow-md:  0 4px 6px -1px rgba(28, 25, 23, 0.06), 0 2px 4px -1px rgba(28, 25, 23, 0.04);
    --shadow-lg:  0 10px 25px -5px rgba(47, 79, 62, 0.08), 0 4px 10px -3px rgba(28, 25, 23, 0.04);
}

* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans TC', -apple-system, sans-serif;
    background-color: var(--paper);
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(200, 112, 77, 0.06), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(47, 79, 62, 0.05), transparent);
    color: var(--ink);
    margin: 0;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' /%3E%3CfeColorMatrix values='0 0 0 0 0.4 0 0 0 0 0.3 0 0 0 0 0.2 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' /%3E%3C/svg%3E");
    opacity: 0.6;
    z-index: 1;
    mix-blend-mode: multiply;
}

body > * { position: relative; z-index: 2; }

/* TYPOGRAPHY */
.font-display {
    font-family: 'DM Serif Display', 'Noto Serif TC', Georgia, serif;
    font-weight: 400;
    letter-spacing: -0.015em;
}
.font-display-zh {
    font-family: 'Noto Serif TC', 'DM Serif Display', Georgia, serif;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.font-mono {
    font-family: 'DM Mono', ui-monospace, monospace;
}
.eyebrow {
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

/* LAYOUT */
.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px;
}
.container-wide {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* HEADER NAV */
.top-nav {
    background: rgba(255, 253, 249, 0.85);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.top-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
}
.brand-logo {
    width: 34px;
    height: 34px;
    background: var(--forest);
    color: var(--paper);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
    font-weight: 400;
}
.brand-text {
    font-family: 'Noto Serif TC', serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.02em;
}
.nav-links {
    display: flex;
    gap: 22px;
    align-items: center;
}
.nav-links a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--forest); }
.nav-links a.active { color: var(--forest); font-weight: 600; }
.nav-cta {
    background: var(--forest);
    color: var(--paper) !important;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    transition: background 0.2s;
}
.nav-cta:hover { background: var(--forest-dk); color: var(--paper) !important; }

@media (max-width: 768px) {
    .nav-links { gap: 14px; }
    .nav-links a:not(.nav-cta) { display: none; }
    .nav-links a.nav-cta { display: inline-block; }
}

/* ARTICLE TYPOGRAPHY */
article.long-form {
    padding: 40px 0 80px;
}
article.long-form .eyebrow-tag {
    color: var(--terra);
    margin-bottom: 14px;
    display: inline-block;
}
article.long-form h1 {
    font-family: 'Noto Serif TC', serif;
    font-weight: 600;
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 18px;
    letter-spacing: -0.01em;
}
article.long-form .article-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    color: var(--ink-muted);
    font-size: 13px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
article.long-form .article-meta .author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-soft);
    font-weight: 500;
}
article.long-form .article-meta .author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--sage);
    color: var(--forest-dk);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Serif Display', serif;
    font-size: 14px;
    font-weight: 500;
}
article.long-form .lede {
    font-family: 'Noto Serif TC', serif;
    font-size: 18px;
    line-height: 1.65;
    color: var(--ink-soft);
    margin-bottom: 32px;
    padding-left: 16px;
    border-left: 3px solid var(--terra);
    font-weight: 400;
}
article.long-form h2 {
    font-family: 'Noto Serif TC', serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 1.35;
    color: var(--ink);
    margin: 48px 0 16px;
    letter-spacing: 0;
    scroll-margin-top: 80px;
}
article.long-form h2::before {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    background: var(--terra);
    margin-bottom: 12px;
    border-radius: 2px;
}
article.long-form h3 {
    font-family: 'Noto Serif TC', serif;
    font-weight: 600;
    font-size: 19px;
    line-height: 1.4;
    color: var(--ink);
    margin: 32px 0 12px;
}
article.long-form p {
    font-size: 15.5px;
    line-height: 1.85;
    color: var(--ink-soft);
    margin: 0 0 18px;
}
article.long-form ul, article.long-form ol {
    padding-left: 22px;
    margin: 0 0 22px;
}
article.long-form li {
    font-size: 15.5px;
    line-height: 1.85;
    color: var(--ink-soft);
    margin-bottom: 8px;
}
article.long-form li::marker {
    color: var(--terra);
}
article.long-form strong {
    color: var(--ink);
    font-weight: 600;
}
article.long-form a {
    color: var(--forest);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.2s;
}
article.long-form a:hover { color: var(--forest-dk); }
article.long-form blockquote {
    margin: 28px 0;
    padding: 20px 24px;
    background: var(--sage-bg);
    border-left: 3px solid var(--forest);
    border-radius: 0 12px 12px 0;
    font-family: 'Noto Serif TC', serif;
    font-style: normal;
    color: var(--forest-dk);
}
article.long-form blockquote p { color: var(--forest-dk); margin: 0; font-size: 15px; }

/* TOC */
.toc {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 24px;
    margin: 30px 0 40px;
}
.toc-title {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--terra);
    margin-bottom: 12px;
}
.toc ol {
    padding-left: 22px;
    margin: 0;
    columns: 2;
    column-gap: 24px;
}
.toc li {
    margin-bottom: 6px;
    font-size: 13.5px;
}
.toc a {
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 0.2s;
}
.toc a:hover { color: var(--forest); }
@media (max-width: 600px) {
    .toc ol { columns: 1; }
}

/* CALLOUT BOXES */
.callout {
    margin: 24px 0;
    padding: 20px 24px;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--border);
}
.callout.tip {
    background: var(--butter-soft);
    border-color: #E8D08A;
}
.callout.info {
    background: var(--sage-bg);
    border-color: var(--sage);
}
.callout.warn {
    background: var(--terra-soft);
    border-color: #E8C4B2;
}
.callout-label {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--terra);
    margin-bottom: 8px;
    display: block;
}
.callout.info .callout-label { color: var(--forest); }
.callout.tip .callout-label { color: #8B6A1F; }
.callout p:last-child { margin-bottom: 0; }
.callout p { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 12px; }

/* TABLES */
article.long-form table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
    background: var(--card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
article.long-form th {
    background: var(--paper-2);
    text-align: left;
    padding: 12px 14px;
    font-weight: 600;
    color: var(--ink);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
article.long-form td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--ink-soft);
    vertical-align: top;
}
article.long-form tr:last-child td { border-bottom: 0; }

/* CTA BLOCKS */
.cta-block {
    margin: 40px 0;
    padding: 32px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    text-align: center;
}
.cta-block h3 {
    font-family: 'Noto Serif TC', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 8px;
}
.cta-block p {
    color: var(--ink-soft);
    margin-bottom: 20px;
}
.btn-primary {
    background: var(--forest);
    color: var(--paper) !important;
    padding: 12px 28px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none !important;
    font-size: 14px;
    display: inline-block;
    transition: all 0.2s;
    box-shadow: 0 2px 0 var(--forest-dk), var(--shadow-sm);
}
.btn-primary:hover {
    background: var(--forest-dk);
    transform: translateY(-1px);
}

/* AD CONTAINER */
.ad-container {
    margin: 36px 0;
    padding: 16px;
    background: var(--paper-2);
    border: 1px dashed var(--border);
    border-radius: 14px;
    text-align: center;
}
.ad-container .eyebrow {
    display: block;
    margin-bottom: 8px;
}

/* RELATED ARTICLES */
.related {
    margin: 60px 0 40px;
    padding: 40px 0 0;
    border-top: 1px solid var(--border);
}
.related-title {
    font-family: 'Noto Serif TC', serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 24px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.related-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    text-decoration: none;
    color: var(--ink);
    transition: all 0.2s;
    display: block;
}
.related-card:hover {
    border-color: var(--forest);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.related-card .eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--terra);
}
.related-card h4 {
    font-family: 'Noto Serif TC', serif;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--ink);
}
.related-card p {
    color: var(--ink-muted);
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

/* FOOTER */
footer.site-footer {
    background: var(--paper-2);
    border-top: 1px solid var(--border);
    padding: 50px 20px 30px;
    margin-top: 60px;
}
footer.site-footer .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 36px;
    margin-bottom: 30px;
}
footer.site-footer h5 {
    font-family: 'Noto Serif TC', serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 12px;
}
footer.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
footer.site-footer li {
    margin-bottom: 8px;
}
footer.site-footer a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}
footer.site-footer a:hover { color: var(--forest); }
footer.site-footer .footer-brand-desc {
    color: var(--ink-muted);
    font-size: 13px;
    line-height: 1.7;
    margin: 12px 0 0;
}
footer.site-footer .footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--ink-muted);
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.05em;
}
@media (max-width: 768px) {
    footer.site-footer .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    footer.site-footer .footer-brand { grid-column: 1 / -1; }
}

/* HERO */
.hero {
    padding: 60px 0 40px;
    text-align: center;
}
.hero h1 {
    font-family: 'Noto Serif TC', serif;
    font-weight: 600;
    font-size: clamp(32px, 6vw, 52px);
    line-height: 1.15;
    color: var(--ink);
    margin: 18px 0 16px;
    letter-spacing: 0.01em;
}
.hero p {
    font-size: 17px;
    color: var(--ink-soft);
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.65;
}
.hero .hero-eyebrow {
    display: inline-block;
    margin-bottom: 0;
}
