/* ============================================================
   FABLEHESION — "Stick to your story."
   fablehesion.com
   
   Palette: Ink #0C0C0C · Parchment #F5F0E8 · Gold #C4A265
   Fonts:   Instrument Serif (display) · Inter (body)
   ============================================================ */

/* ---- FONTS (self-hosted, no CDN) ---- */
@font-face {
    font-family: 'Instrument Serif';
    src: url('../fonts/InstrumentSerif-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Instrument Serif';
    src: url('../fonts/InstrumentSerif-Italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 16px; line-height: 1.7; color: #1A1A1A; background: #F5F0E8; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; }

/* ---- TOKENS ---- */
:root {
    --ink: #0C0C0C;
    --parchment: #F5F0E8;
    --gold: #C4A265;
    --gold-light: #D4B87A;
    --gold-dark: #A38A52;
    --surface: #FFFFFF;
    --text: #1A1A1A;
    --text-mid: #4A4A4A;
    --text-light: #8A8A8A;
    --border: #E0DCD4;
    --border-dark: #C8C2B8;
    --shadow: rgba(12, 12, 12, 0.06);
    --shadow-md: rgba(12, 12, 12, 0.1);
    --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-width: 1200px;
    --content-width: 720px;
    --header-height: 72px;
    --timeline-width: 2px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- LAYOUT ---- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: var(--content-width); margin: 0 auto; padding: 0 24px; }

/* ---- READING PROGRESS BAR ---- */
.reading-progress { position: fixed; top: 0; left: 0; height: 2px; background: var(--gold); z-index: 1001; width: 0; transition: width 0.1s linear; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: var(--parchment); border-bottom: 1px solid var(--border); transition: transform var(--transition), box-shadow var(--transition); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.is-scrolled { box-shadow: 0 1px 8px var(--shadow); }

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

.site-brand { display: flex; align-items: center; gap: 12px; }
.site-brand__mark { width: 28px; height: 28px; flex-shrink: 0; }
.site-brand__mark svg { width: 100%; height: 100%; }
.site-brand__text { display: flex; flex-direction: column; line-height: 1; }
.site-brand__name { font-family: var(--font-display); font-size: 22px; font-weight: 400; color: var(--ink); letter-spacing: 0.01em; }
.site-brand__tagline { font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-light); margin-top: 2px; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav__link { font-size: 13px; font-weight: 500; letter-spacing: 0.02em; color: var(--text-mid); padding: 6px 14px; border-radius: 2px; transition: color var(--transition), background var(--transition); }
.main-nav__link:hover, .main-nav__link.is-active { color: var(--ink); background: rgba(12, 12, 12, 0.04); }
.main-nav__link--cta { background: var(--ink); color: var(--gold); font-weight: 600; letter-spacing: 0.04em; }
.main-nav__link--cta:hover { background: #1a1a1a; color: var(--gold-light); }

/* Mobile menu toggle */
.nav-toggle { display: none; background: none; border: none; width: 40px; height: 40px; position: relative; }
.nav-toggle__line { display: block; width: 22px; height: 1.5px; background: var(--ink); margin: 0 auto; transition: transform var(--transition), opacity var(--transition); }
.nav-toggle__line + .nav-toggle__line { margin-top: 6px; }
.nav-toggle.is-open .nav-toggle__line:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle__line:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .nav-toggle__line:nth-child(3) { transform: translateY(-3.75px) rotate(-45deg); }

/* ============================================================
   HERO / MASTHEAD
   ============================================================ */
.masthead { padding: 120px 0 80px; text-align: center; border-bottom: 1px solid var(--border); }
.masthead__eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 20px; }
.masthead__title { font-family: var(--font-display); font-size: clamp(36px, 5vw, 56px); font-weight: 400; color: var(--ink); line-height: 1.15; margin-bottom: 16px; }
.masthead__subtitle { font-size: 18px; color: var(--text-mid); max-width: 600px; margin: 0 auto; line-height: 1.6; }

/* ============================================================
   TIMELINE — THE HERO FEATURE
   ============================================================ */
.timeline { position: relative; padding: 60px 0 80px; }

/* The vertical line */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--timeline-width);
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--border-dark) 60px, var(--border-dark) calc(100% - 60px), transparent);
}

/* Pen tip mark at top of timeline */
.timeline__origin {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 48px;
}
.timeline__origin-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--ink);
    border-radius: 50%;
    margin-bottom: 12px;
}
.timeline__origin-mark svg { width: 24px; height: 24px; fill: var(--gold); }
.timeline__origin-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-light);
}

/* Year markers on the timeline */
.timeline__year-marker {
    position: relative;
    z-index: 2;
    text-align: center;
    margin: 48px 0 32px;
}
.timeline__year-marker span {
    display: inline-block;
    background: var(--parchment);
    padding: 8px 20px;
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--gold-dark);
    border: 1px solid var(--border);
    border-radius: 2px;
}

/* Timeline items (articles) */
.timeline__item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.timeline__item.is-visible { opacity: 1; transform: translateY(0); }

/* Connecting dot */
.timeline__item::after {
    content: '';
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: var(--gold);
    border: 2px solid var(--parchment);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 3px var(--border-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.timeline__item:hover::after {
    transform: translateX(-50%) scale(1.3);
    box-shadow: 0 0 0 4px var(--gold);
}

/* Odd items: content left, empty right */
.timeline__item:nth-child(odd) .timeline__card { grid-column: 1; text-align: right; }
.timeline__item:nth-child(odd) .timeline__spacer { grid-column: 2; }
.timeline__item:nth-child(odd) { transform: translateX(-20px) translateY(30px); }
.timeline__item:nth-child(odd).is-visible { transform: translateX(0) translateY(0); }

/* Even items: empty left, content right */
.timeline__item:nth-child(even) .timeline__spacer { grid-column: 1; }
.timeline__item:nth-child(even) .timeline__card { grid-column: 2; text-align: left; }
.timeline__item:nth-child(even) { transform: translateX(20px) translateY(30px); }
.timeline__item:nth-child(even).is-visible { transform: translateX(0) translateY(0); }

/* The article card */
.timeline__card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.timeline__card:hover {
    border-color: var(--border-dark);
    box-shadow: 0 4px 24px var(--shadow-md);
}

.timeline__card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
}
.timeline__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.timeline__card:hover .timeline__card-image img { transform: scale(1.03); }

.timeline__card-body { padding: 24px; }

.timeline__card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 0.02em;
}
.timeline__item:nth-child(odd) .timeline__card-meta { justify-content: flex-end; }

.timeline__card-category {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-dark);
    background: rgba(196, 162, 101, 0.1);
    padding: 3px 8px;
    border-radius: 2px;
}

.timeline__card-date { font-size: 12px; color: var(--text-light); }

.timeline__card-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.3;
    margin-bottom: 10px;
    transition: color var(--transition);
}
.timeline__card:hover .timeline__card-title { color: var(--gold-dark); }

.timeline__card-excerpt {
    font-size: 14px;
    color: var(--text-mid);
    line-height: 1.6;
    margin-bottom: 14px;
}

.timeline__card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
}
.timeline__item:nth-child(odd) .timeline__card-footer { flex-direction: row-reverse; }

.timeline__card-read-more {
    font-weight: 600;
    color: var(--gold-dark);
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition), gap var(--transition);
}
.timeline__card-read-more:hover { color: var(--ink); gap: 8px; }
.timeline__card-read-more svg { width: 14px; height: 14px; }

/* Featured post — larger, spans full width */
.timeline__item--featured {
    grid-template-columns: 1fr;
    gap: 0;
}
.timeline__item--featured .timeline__card {
    max-width: 680px;
    margin: 0 auto;
    text-align: left;
}
.timeline__item--featured .timeline__card-title { font-size: 28px; }
.timeline__item--featured .timeline__spacer { display: none; }

/* ============================================================
   POST LIST (Category, Tag, Search, Archive pages)
   ============================================================ */
.post-list { padding: 48px 0 80px; }
.post-list__header { margin-bottom: 40px; border-bottom: 1px solid var(--border); padding-bottom: 24px; }
.post-list__title { font-family: var(--font-display); font-size: 32px; font-weight: 400; color: var(--ink); margin-bottom: 8px; }
.post-list__description { font-size: 15px; color: var(--text-mid); line-height: 1.6; max-width: 600px; }
.post-list__count { font-size: 13px; color: var(--text-light); margin-top: 8px; }

.post-list__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

/* Post card (grid version) */
.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    opacity: 0;
    transform: translateY(20px);
}
.post-card.is-visible { opacity: 1; transform: translateY(0); }
.post-card:hover { border-color: var(--border-dark); box-shadow: 0 4px 24px var(--shadow-md); transform: translateY(-2px); }

.post-card__image { aspect-ratio: 16 / 9; overflow: hidden; }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.post-card:hover .post-card__image img { transform: scale(1.03); }

.post-card__body { padding: 20px; }

.post-card__meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--text-light); }
.post-card__category { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-dark); }

.post-card__title { font-family: var(--font-display); font-size: 20px; font-weight: 400; color: var(--ink); line-height: 1.3; margin-bottom: 8px; transition: color var(--transition); }
.post-card:hover .post-card__title { color: var(--gold-dark); }

.post-card__excerpt { font-size: 14px; color: var(--text-mid); line-height: 1.6; margin-bottom: 12px; }

.post-card__footer { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-light); }

/* ============================================================
   SINGLE POST
   ============================================================ */
.post-single { padding: 48px 0 80px; }

.post-single__header { text-align: center; max-width: var(--content-width); margin: 0 auto 40px; }
.post-single__category { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 16px; }
.post-single__title { font-family: var(--font-display); font-size: clamp(28px, 4vw, 44px); font-weight: 400; color: var(--ink); line-height: 1.2; margin-bottom: 12px; }
.post-single__subtitle { font-size: 18px; color: var(--text-mid); line-height: 1.5; margin-bottom: 20px; }

.post-single__meta { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 13px; color: var(--text-light); flex-wrap: wrap; }
.post-single__meta-divider { width: 3px; height: 3px; border-radius: 50%; background: var(--border-dark); }

.post-single__hero { margin: 0 auto 40px; max-width: 960px; border-radius: 3px; overflow: hidden; border: 1px solid var(--border); }
.post-single__hero img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }

/* Article body */
.post-single__body {
    max-width: var(--content-width);
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.8;
    color: var(--text);
}
.post-single__body h2 { font-family: var(--font-display); font-size: 28px; font-weight: 400; color: var(--ink); margin: 48px 0 16px; line-height: 1.3; }
.post-single__body h3 { font-family: var(--font-display); font-size: 22px; font-weight: 400; color: var(--ink); margin: 36px 0 12px; line-height: 1.35; }
.post-single__body h4 { font-size: 16px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink); margin: 28px 0 10px; }
.post-single__body p { margin-bottom: 20px; }
.post-single__body a { color: var(--gold-dark); border-bottom: 1px solid rgba(196, 162, 101, 0.3); transition: border-color var(--transition); }
.post-single__body a:hover { border-color: var(--gold-dark); }
.post-single__body blockquote { margin: 32px 0; padding: 20px 24px 20px 28px; border-left: 3px solid var(--gold); background: rgba(196, 162, 101, 0.06); border-radius: 0 3px 3px 0; font-style: italic; color: var(--text-mid); }
.post-single__body blockquote p:last-child { margin-bottom: 0; }
.post-single__body ul, .post-single__body ol { margin: 0 0 20px 24px; }
.post-single__body ul { list-style: disc; }
.post-single__body ol { list-style: decimal; }
.post-single__body li { margin-bottom: 6px; }
.post-single__body img { border-radius: 3px; margin: 24px 0; border: 1px solid var(--border); }
.post-single__body pre { background: var(--ink); color: #E0DCD4; padding: 20px 24px; border-radius: 3px; overflow-x: auto; font-size: 14px; margin: 24px 0; line-height: 1.6; }
.post-single__body code { font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace; font-size: 0.9em; }
.post-single__body p code { background: rgba(12, 12, 12, 0.06); padding: 2px 6px; border-radius: 3px; }
.post-single__body hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
.post-single__body figure { margin: 32px 0; }
.post-single__body figcaption { font-size: 13px; color: var(--text-light); text-align: center; margin-top: 8px; }

/* Tags */
.post-single__tags { max-width: var(--content-width); margin: 40px auto 0; padding-top: 24px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; }
.post-single__tag { font-size: 12px; font-weight: 500; color: var(--text-mid); background: rgba(12, 12, 12, 0.04); padding: 4px 12px; border-radius: 2px; border: 1px solid var(--border); transition: border-color var(--transition), color var(--transition); }
.post-single__tag:hover { border-color: var(--gold); color: var(--gold-dark); }

/* Author card */
.post-single__author { max-width: var(--content-width); margin: 48px auto 0; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 3px; display: flex; gap: 20px; align-items: flex-start; }
.post-single__author-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--border); }
.post-single__author-name { font-family: var(--font-display); font-size: 18px; color: var(--ink); margin-bottom: 4px; }
.post-single__author-title { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 8px; }
.post-single__author-bio { font-size: 14px; color: var(--text-mid); line-height: 1.6; }

/* Post navigation */
.post-nav { max-width: var(--content-width); margin: 48px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.post-nav__link { padding: 20px; border: 1px solid var(--border); border-radius: 3px; transition: border-color var(--transition), box-shadow var(--transition); }
.post-nav__link:hover { border-color: var(--border-dark); box-shadow: 0 2px 12px var(--shadow); }
.post-nav__link--next { text-align: right; }
.post-nav__label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-light); margin-bottom: 6px; }
.post-nav__title { font-family: var(--font-display); font-size: 16px; color: var(--ink); line-height: 1.3; }

/* Series navigation */
.series-nav { max-width: var(--content-width); margin: 40px auto 0; padding: 24px; background: rgba(196, 162, 101, 0.06); border: 1px solid var(--border); border-radius: 3px; }
.series-nav__title { font-family: var(--font-display); font-size: 18px; color: var(--ink); margin-bottom: 12px; }
.series-nav__list { list-style: none; }
.series-nav__list li { padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--border); }
.series-nav__list li:last-child { border-bottom: none; }
.series-nav__list li a { color: var(--text-mid); transition: color var(--transition); }
.series-nav__list li a:hover { color: var(--gold-dark); }
.series-nav__list li.is-current a { color: var(--ink); font-weight: 600; }

/* Related posts */
.related-posts { padding: 60px 0; border-top: 1px solid var(--border); }
.related-posts__title { font-family: var(--font-display); font-size: 24px; color: var(--ink); margin-bottom: 28px; text-align: center; }
.related-posts__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ============================================================
   SHARE BAR
   ============================================================ */
.share-bar { max-width: var(--content-width); margin: 32px auto 0; display: flex; align-items: center; gap: 12px; }
.share-bar__label { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-light); }
.share-bar__btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); transition: border-color var(--transition), background var(--transition); }
.share-bar__btn:hover { border-color: var(--gold); background: rgba(196, 162, 101, 0.08); }
.share-bar__btn svg { width: 16px; height: 16px; fill: var(--text-mid); }

/* ============================================================
   SUBSCRIBE SECTION
   ============================================================ */
.subscribe-section { padding: 60px 0; background: var(--ink); color: #fff; text-align: center; }
.subscribe-section__title { font-family: var(--font-display); font-size: 28px; font-weight: 400; margin-bottom: 12px; color: #fff; }
.subscribe-section__text { font-size: 15px; color: rgba(255, 255, 255, 0.6); margin-bottom: 28px; max-width: 480px; margin-left: auto; margin-right: auto; }

.subscribe-form { display: flex; gap: 8px; max-width: 440px; margin: 0 auto; }
.subscribe-form__input { flex: 1; padding: 12px 16px; font-size: 14px; font-family: var(--font-body); border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.06); color: #fff; border-radius: 2px; outline: none; transition: border-color var(--transition); }
.subscribe-form__input::placeholder { color: rgba(255, 255, 255, 0.35); }
.subscribe-form__input:focus { border-color: var(--gold); }
.subscribe-form__btn { padding: 12px 24px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; background: var(--gold); color: var(--ink); border: none; border-radius: 2px; transition: background var(--transition); white-space: nowrap; }
.subscribe-form__btn:hover { background: var(--gold-light); }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-page { padding: 48px 0 80px; }
.contact-page__intro { max-width: var(--content-width); margin: 0 auto 40px; text-align: center; }
.contact-page__intro h1 { font-family: var(--font-display); font-size: 36px; font-weight: 400; color: var(--ink); margin-bottom: 16px; }
.contact-page__intro p { font-size: 16px; color: var(--text-mid); line-height: 1.6; }

.contact-form { max-width: 560px; margin: 0 auto; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mid); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 12px 16px; font-size: 15px; font-family: var(--font-body);
    border: 1px solid var(--border); background: var(--surface); border-radius: 2px;
    outline: none; transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--gold); }
.form-group textarea { min-height: 140px; resize: vertical; }

.form-submit { padding: 14px 32px; font-size: 14px; font-weight: 600; letter-spacing: 0.05em; background: var(--ink); color: var(--gold); border: none; border-radius: 2px; transition: background var(--transition); width: 100%; }
.form-submit:hover { background: #1a1a1a; }

/* ============================================================
   SUBSCRIBE PAGE
   ============================================================ */
.subscribe-page { padding: 48px 0 80px; }
.subscribe-page__intro { max-width: var(--content-width); margin: 0 auto 40px; text-align: center; }
.subscribe-page__intro h1 { font-family: var(--font-display); font-size: 36px; font-weight: 400; color: var(--ink); margin-bottom: 16px; }
.subscribe-page__intro p { font-size: 16px; color: var(--text-mid); line-height: 1.6; }

/* ============================================================
   SEARCH
   ============================================================ */
.search-page { padding: 48px 0 80px; }
.search-form { display: flex; gap: 8px; max-width: 560px; margin: 0 auto 40px; }
.search-form__input { flex: 1; padding: 14px 16px; font-size: 15px; font-family: var(--font-body); border: 1px solid var(--border); background: var(--surface); border-radius: 2px; outline: none; }
.search-form__input:focus { border-color: var(--gold); }
.search-form__btn { padding: 14px 24px; font-size: 14px; font-weight: 600; background: var(--ink); color: var(--gold); border: none; border-radius: 2px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.5); padding: 60px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.footer-brand__name { font-family: var(--font-display); font-size: 22px; color: #fff; margin-bottom: 4px; }
.footer-brand__tagline { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.footer-brand__text { font-size: 14px; line-height: 1.6; max-width: 300px; }

.footer-col__title { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); margin-bottom: 16px; }
.footer-col__list li { margin-bottom: 8px; }
.footer-col__list a { font-size: 14px; color: rgba(255, 255, 255, 0.5); transition: color var(--transition); }
.footer-col__list a:hover { color: var(--gold); }

.footer-bottom { max-width: var(--max-width); margin: 40px auto 0; padding: 20px 24px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.footer-bottom a { color: rgba(255, 255, 255, 0.5); }
.footer-bottom a:hover { color: var(--gold); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 40px 0; }
.pagination__link { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; font-size: 14px; font-weight: 500; color: var(--text-mid); border: 1px solid var(--border); border-radius: 2px; transition: all var(--transition); }
.pagination__link:hover { border-color: var(--gold); color: var(--ink); }
.pagination__link.is-active { background: var(--ink); color: var(--gold); border-color: var(--ink); }
.pagination__link.is-disabled { opacity: 0.4; pointer-events: none; }

/* ============================================================
   404
   ============================================================ */
.page-404 { padding: 120px 0; text-align: center; }
.page-404__code { font-family: var(--font-display); font-size: 80px; color: var(--border-dark); margin-bottom: 16px; }
.page-404__title { font-family: var(--font-display); font-size: 28px; color: var(--ink); margin-bottom: 12px; }
.page-404__text { font-size: 16px; color: var(--text-mid); margin-bottom: 28px; }
.page-404__link { display: inline-block; padding: 12px 28px; background: var(--ink); color: var(--gold); font-size: 14px; font-weight: 600; letter-spacing: 0.04em; border-radius: 2px; }

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash { max-width: var(--content-width); margin: 20px auto; padding: 14px 20px; border-radius: 3px; font-size: 14px; border: 1px solid; }
.flash--success { background: rgba(34, 139, 34, 0.06); border-color: rgba(34, 139, 34, 0.2); color: #2E7D32; }
.flash--error { background: rgba(211, 47, 47, 0.06); border-color: rgba(211, 47, 47, 0.2); color: #C62828; }
.flash--info { background: rgba(196, 162, 101, 0.08); border-color: rgba(196, 162, 101, 0.3); color: var(--gold-dark); }

/* ============================================================
   COOKIE CONSENT
   ============================================================ */
.consent-banner { position: fixed; bottom: 0; left: 0; right: 0; background: var(--ink); color: rgba(255, 255, 255, 0.7); padding: 16px 24px; z-index: 999; display: none; align-items: center; justify-content: center; gap: 16px; font-size: 13px; }
.consent-banner.is-visible { display: flex; }
.consent-banner__btn { padding: 8px 20px; font-size: 12px; font-weight: 600; background: var(--gold); color: var(--ink); border: none; border-radius: 2px; cursor: pointer; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    /* Timeline collapses to left-aligned */
    .timeline::before { left: 20px; transform: none; }
    .timeline__origin { text-align: left; padding-left: 56px; }
    .timeline__year-marker { text-align: left; padding-left: 40px; }

    .timeline__item {
        grid-template-columns: 1fr;
        gap: 0;
        padding-left: 56px;
    }
    .timeline__item::after { left: 20px; transform: translateX(-50%); }
    .timeline__item:nth-child(odd) .timeline__card,
    .timeline__item:nth-child(even) .timeline__card { grid-column: 1; text-align: left; }
    .timeline__item:nth-child(odd) .timeline__card-meta,
    .timeline__item:nth-child(even) .timeline__card-meta { justify-content: flex-start; }
    .timeline__item:nth-child(odd) .timeline__card-footer,
    .timeline__item:nth-child(even) .timeline__card-footer { flex-direction: row; }
    .timeline__spacer { display: none; }
    .timeline__item:nth-child(odd),
    .timeline__item:nth-child(even) { transform: translateX(0) translateY(30px); }
    .timeline__item:nth-child(odd).is-visible,
    .timeline__item:nth-child(even).is-visible { transform: translateX(0) translateY(0); }

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

@media (max-width: 640px) {
    :root { --header-height: 60px; }

    .nav-toggle { display: flex; flex-direction: column; justify-content: center; }
    .main-nav { position: fixed; top: var(--header-height); left: 0; right: 0; background: var(--parchment); border-bottom: 1px solid var(--border); flex-direction: column; padding: 16px 24px; gap: 4px; transform: translateY(-100%); opacity: 0; transition: transform var(--transition), opacity var(--transition); pointer-events: none; }
    .main-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .main-nav__link { width: 100%; text-align: left; padding: 10px 0; }

    .masthead { padding: 100px 0 48px; }
    .masthead__title { font-size: 28px; }

    .timeline__item { padding-left: 44px; margin-bottom: 32px; }
    .timeline::before { left: 16px; }
    .timeline__item::after { left: 16px; }
    .timeline__origin { padding-left: 44px; }
    .timeline__year-marker { padding-left: 32px; }
    .timeline__card-body { padding: 16px; }
    .timeline__card-title { font-size: 18px; }

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

    .subscribe-form { flex-direction: column; }
    .search-form { flex-direction: column; }

    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

    .post-single__author { flex-direction: column; align-items: center; text-align: center; }
}
