/*
Theme Name: Saeed Theme
Theme URI: https://saeedtaghavi.com
Author: Saeed Taghavi
Author URI: https://saeedtaghavi.com
Description: Personal site of Saeed Taghavi — writer on AI, content, and craft. Minimal sectional design with a warm amber-rose accent on a deep dark canvas. Rebuilt with a clean template structure: front-page handles the homepage, a dedicated "Blog Archive" page template handles /blog, and the standard WordPress hierarchy handles single posts, archives, and 404s.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: saeed-theme
*/

/* =========================================================
   Tokens
   ========================================================= */
:root {
    --bg: #0a0707;
    --bg-soft: #100b0b;
    --bg-elev: #15100f;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.18);
    --text: #f5efe9;
    --text-muted: rgba(245, 239, 233, 0.62);
    --text-faint: rgba(245, 239, 233, 0.38);
    --amber: #f59e0b;
    --amber-soft: #fbbf24;
    --rose: #fb7185;
    --rose-soft: #fda4af;
    --orange: #fb923c;
    --grad: linear-gradient(135deg, #f59e0b 0%, #fb7185 100%);
    --grad-soft: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(251, 113, 133, 0.18) 100%);
    --serif: "Fraunces", "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
    --sans: "Inter", "Helvetica Neue", system-ui, -apple-system, sans-serif;
    --max: 1200px;
    --max-prose: 720px;
    --radius-sm: 10px;
    --radius: 18px;
    --radius-lg: 28px;
    --shadow-amber: 0 18px 60px -20px rgba(245, 158, 11, 0.45);
    --shadow-rose: 0 18px 60px -20px rgba(251, 113, 133, 0.45);
}

/* =========================================================
   Reset
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
::selection { background: var(--amber); color: var(--bg); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; padding: .5rem 1rem; background: var(--amber); color: var(--bg); z-index: 999; border-radius: 6px; }

.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px; width: 1px; overflow: hidden;
}

/* =========================================================
   Layout helpers
   ========================================================= */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 7rem 0; position: relative; }
@media (max-width: 768px) { .section { padding: 5rem 0; } }

.eyebrow {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 1.25rem;
    position: relative;
    padding-left: 28px;
}
.eyebrow::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 20px; height: 1px;
    background: var(--amber);
}

.section-title {
    font-size: clamp(2.4rem, 5.5vw, 4.5rem);
    margin-bottom: 1rem;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.section-lede {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 38rem;
    margin: 0 0 3rem;
}

/* =========================================================
   Reveal-on-scroll
   ========================================================= */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.22, 1, .36, 1);
    will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1 !important; transform: none !important; }
}

/* =========================================================
   Header / Navigation
   ========================================================= */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: rgba(10, 7, 7, 0.72);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--line);
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 0;
}
.brand {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.nav-list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 2.25rem;
    align-items: center;
}
.nav-list a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color .2s ease;
    position: relative;
    padding: 4px 0;
}
.nav-list a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    height: 1px; width: 0;
    background: var(--grad);
    transition: width .3s ease;
}
.nav-list a:hover, .nav-list a.is-active { color: var(--text); }
.nav-list a:hover::after, .nav-list a.is-active::after { width: 100%; }

.menu-toggle {
    display: none;
    width: 38px; height: 38px;
    align-items: center; justify-content: center;
    color: var(--text);
}
.menu-toggle span {
    display: block;
    width: 22px; height: 1.5px;
    background: currentColor;
    position: relative;
}
.menu-toggle span::before, .menu-toggle span::after {
    content: ""; position: absolute;
    left: 0; width: 22px; height: 1.5px;
    background: currentColor;
    transition: transform .3s ease, top .3s ease;
}
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }
.menu-toggle.is-open span { background: transparent; }
.menu-toggle.is-open span::before { top: 0; transform: rotate(45deg); }
.menu-toggle.is-open span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav-list {
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(10, 7, 7, 0.96);
        backdrop-filter: blur(22px);
        border-bottom: 1px solid var(--line);
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s ease;
    }
    .nav-list.is-open { max-height: 60vh; }
    .nav-list li { width: 100%; border-top: 1px solid var(--line); }
    .nav-list a { display: block; padding: 1.1rem 1.5rem; }
}

.has-fixed-header { padding-top: 70px; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 8rem 0 6rem;
}
.hero::before, .hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}
.hero::before {
    width: 520px; height: 520px;
    background: var(--amber);
    top: -120px; left: -120px;
    animation: drift1 14s ease-in-out infinite;
}
.hero::after {
    width: 520px; height: 520px;
    background: var(--rose);
    bottom: -120px; right: -120px;
    animation: drift2 18s ease-in-out infinite;
}
@keyframes drift1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(80px, 60px) scale(1.15); }
}
@keyframes drift2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-90px, -40px) scale(1.2); }
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero-eyebrow { color: var(--text-muted); }
.hero-title {
    font-size: clamp(3rem, 9vw, 7.5rem);
    line-height: 0.95;
    margin-bottom: 1.5rem;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.hero-sub {
    font-size: clamp(1.05rem, 1.5vw, 1.35rem);
    color: var(--text-muted);
    max-width: 38rem;
    margin: 0 auto 2.5rem;
}
.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}
.scroll-cue {
    position: absolute;
    bottom: 2rem; left: 50%;
    transform: translateX(-50%);
    color: var(--text-faint);
    z-index: 1;
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    animation: bob 2.4s ease-in-out infinite;
}
.scroll-cue::after {
    content: "";
    width: 1px; height: 28px;
    background: linear-gradient(to bottom, var(--text-faint), transparent);
}
@keyframes bob {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 8px); }
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.95rem 1.75rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn-primary {
    background: var(--grad);
    color: #1a0f0c;
    font-weight: 600;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-amber); }
.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-color: var(--line-strong);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.09);
    transform: translateY(-2px);
}
.btn-link {
    color: var(--amber);
    padding: 0;
    background: none;
    font-weight: 500;
}
.btn-link::after {
    content: "→";
    transition: transform .2s ease;
    display: inline-block;
    margin-left: 6px;
}
.btn-link:hover::after { transform: translateX(4px); }

/* =========================================================
   About
   ========================================================= */
.about {
    background:
        radial-gradient(ellipse at top left, rgba(245, 158, 11, 0.06), transparent 60%),
        radial-gradient(ellipse at bottom right, rgba(251, 113, 133, 0.06), transparent 60%);
}
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 280px) 1fr;
    gap: 4.5rem;
    align-items: center;
}
@media (max-width: 860px) {
    .about-grid { grid-template-columns: 1fr; gap: 2.5rem; justify-items: center; }
}
.about-portrait {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius);
    background: var(--bg-soft);
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}
.about-portrait::after {
    content: "";
    position: absolute;
    left: -1px; right: -1px; bottom: -1px;
    height: 35%;
    background: linear-gradient(to top, rgba(245, 158, 11, 0.18), transparent);
    pointer-events: none;
    z-index: 2;
}
.about-portrait img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: inherit;
    z-index: 1;
    transition: transform .8s cubic-bezier(.22, 1, .36, 1);
}
.about-portrait:hover img { transform: scale(1.03); }

.about-text p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.75; }
.about-text p + p { margin-top: 1.1em; }

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--line);
}
.stat-num {
    font-family: var(--serif);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    line-height: 1;
}
.stat-label {
    font-size: 0.82rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
}

/* =========================================================
   Experience (work history)
   ========================================================= */
.exp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
@media (max-width: 980px) { .exp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .exp-grid { grid-template-columns: 1fr; } }
.exp-card {
    position: relative;
    padding: 1.6rem 1.5rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform .35s cubic-bezier(.22, 1, .36, 1), border-color .35s ease, background .35s ease;
    overflow: hidden;
}
.exp-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.06), rgba(251, 113, 133, 0.04));
}
.exp-role {
    font-family: var(--serif);
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
}
.exp-company {
    font-size: 0.95rem;
    color: var(--amber);
}
.exp-loc {
    display: inline-block;
    margin-top: 0.85rem;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
    padding-top: 0.85rem;
    border-top: 1px solid var(--line);
    width: 100%;
}

/* =========================================================
   Books
   ========================================================= */
.books {
    background:
        linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 50%, var(--bg) 100%);
}
.books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
@media (max-width: 900px) { .books-grid { grid-template-columns: 1fr; } }
.book {
    perspective: 1200px;
}
.book-cover {
    aspect-ratio: 2 / 3;
    border-radius: var(--radius);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff8f0;
    transform-style: preserve-3d;
    transition: transform .5s cubic-bezier(.22, 1, .36, 1), box-shadow .5s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.book-cover::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 40%);
    pointer-events: none;
}
.book-cover::after {
    content: "";
    position: absolute;
    left: 8px; top: 0; bottom: 0;
    width: 1px;
    background: rgba(0, 0, 0, 0.25);
}
.book:hover .book-cover {
    transform: rotateY(-8deg) rotateX(2deg) translateY(-6px);
    box-shadow: -20px 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.book-cover.cv-madman {
    background: linear-gradient(160deg, #7a1f1f 0%, #c2410c 100%);
}
.book-cover.cv-leonardo {
    background: linear-gradient(160deg, #1f3b3a 0%, #0f766e 100%);
}
.book-cover.cv-writesmart {
    background: linear-gradient(160deg, #4c1d2e 0%, #b45309 100%);
}

/* Uploaded cover image — fills the card behind the design overlay */
.book-cover > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    border-radius: inherit;
    transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}
.book:hover .book-cover > img { transform: scale(1.04); }
.book-cover > .book-meta,
.book-cover > .book-title {
    position: relative;
    z-index: 2;
}
.book-cover.has-image::before {
    background:
        linear-gradient(180deg,
            rgba(10, 7, 7, 0.55) 0%,
            rgba(10, 7, 7, 0)    22%,
            rgba(10, 7, 7, 0)    52%,
            rgba(10, 7, 7, 0.88) 100%),
        linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, transparent 45%);
    z-index: 1;
}
.book-cover.has-image::after { z-index: 2; }
.book-meta {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.8;
}
.book-title {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 2.2vw, 2.1rem);
    line-height: 1.05;
}

/* =========================================================
   Magazine teaser
   ========================================================= */
.mag-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 900px) { .mag-grid { grid-template-columns: 1fr; } }
.mag-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-soft);
    transition: transform .35s ease, border-color .35s ease;
    display: flex;
    flex-direction: column;
}
.mag-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.mag-thumb {
    aspect-ratio: 16 / 10;
    background: var(--grad-soft);
    overflow: hidden;
}
.mag-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.mag-card:hover .mag-thumb img { transform: scale(1.06); }
.mag-body { padding: 1.4rem 1.5rem 1.6rem; flex: 1; display: flex; flex-direction: column; }
.mag-title {
    font-family: var(--serif);
    font-size: 1.35rem;
    margin-bottom: 0.6rem;
    line-height: 1.25;
}
.mag-title a { background: linear-gradient(currentColor, currentColor) bottom / 0% 1px no-repeat; transition: background-size .35s ease; padding-bottom: 2px; }
.mag-card:hover .mag-title a { background-size: 100% 1px; }
.mag-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 1rem;
    flex: 1;
}
.mag-meta {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--amber);
}

/* =========================================================
   Contact
   ========================================================= */
.contact {
    background:
        radial-gradient(ellipse at center, rgba(245, 158, 11, 0.04), transparent 60%);
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; } }
.social-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.85rem; }
.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.05rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    transition: transform .25s ease, background .25s ease, border-color .25s ease;
}
.social-link:hover {
    transform: translateX(8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--line-strong);
}
.social-icon {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--grad-soft);
    display: grid;
    place-items: center;
    color: var(--amber);
}
.social-quote {
    margin-top: 2.5rem;
    padding: 1.75rem;
    border-radius: var(--radius);
    background: var(--grad-soft);
    border: 1px solid var(--line);
    color: var(--text);
    font-style: italic;
    line-height: 1.7;
}
.contact-form .field { margin-bottom: 1.25rem; }
.contact-form label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.95rem 1.1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    transition: border-color .2s ease, background .2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--amber);
    background: rgba(255, 255, 255, 0.06);
}
.contact-form textarea { resize: vertical; min-height: 140px; }

.hp-field {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.form-status {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    border: 1px solid var(--line);
    line-height: 1.5;
}
.form-status.success {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(251, 113, 133, 0.10));
    border-color: rgba(245, 158, 11, 0.5);
    color: var(--amber-soft);
}
.form-status.error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

/* =========================================================
   Blog index — sectional cards
   ========================================================= */
.blog-hero {
    padding: 9rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.blog-hero::before {
    content: "";
    position: absolute;
    top: -100px; left: 50%;
    width: 600px; height: 600px;
    background: var(--grad-soft);
    filter: blur(120px);
    transform: translateX(-50%);
    opacity: 0.65;
    z-index: 0;
}
.blog-hero > * { position: relative; z-index: 1; }
.blog-hero h1 {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    margin-bottom: 1rem;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.blog-hero p { color: var(--text-muted); font-size: 1.15rem; max-width: 36rem; margin: 0 auto; }

.blog-list { padding: 4rem 0 8rem; }
.blog-section {
    position: relative;
    margin-bottom: 5rem;
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(255,255,255,0.025), rgba(255,255,255,0));
    overflow: hidden;
    transition: transform .4s cubic-bezier(.22,1,.36,1), border-color .4s ease;
}
.blog-section:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
}
.blog-section .num {
    font-family: var(--serif);
    font-size: clamp(3rem, 7vw, 5rem);
    line-height: 0.9;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    opacity: 0.55;
    margin-bottom: 1rem;
    display: block;
}
.blog-section .meta {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 1rem;
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: center;
}
.blog-section .meta .dot {
    width: 4px; height: 4px;
    background: var(--text-faint);
    border-radius: 50%;
    display: inline-block;
}
.blog-section h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    margin-bottom: 1.25rem;
    color: var(--text);
}
.blog-section h2 a {
    background: linear-gradient(currentColor, currentColor) bottom / 0% 1px no-repeat;
    transition: background-size .4s ease;
    padding-bottom: 4px;
}
.blog-section:hover h2 a { background-size: 100% 1px; }
.blog-section .excerpt {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.75;
    margin-bottom: 1.75rem;
    max-width: 55ch;
}
.blog-section .with-image {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
    align-items: center;
}
.blog-section .with-image.flip { grid-template-columns: 1fr 1.4fr; }
.blog-section .with-image.flip .copy { order: 2; }
@media (max-width: 800px) {
    .blog-section { padding: 2rem; }
    .blog-section .with-image,
    .blog-section .with-image.flip { grid-template-columns: 1fr; gap: 1.75rem; }
    .blog-section .with-image.flip .copy { order: 0; }
}
.blog-thumb {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--grad-soft);
}
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.blog-section:hover .blog-thumb img { transform: scale(1.05); }

.blog-section.alt-1 { background: linear-gradient(160deg, rgba(245,158,11,0.06), rgba(255,255,255,0)); }
.blog-section.alt-2 { background: linear-gradient(160deg, rgba(251,113,133,0.06), rgba(255,255,255,0)); }
.blog-section.alt-3 { background: linear-gradient(160deg, rgba(251,146,60,0.06), rgba(255,255,255,0)); }

.pager {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.pager a, .pager span {
    padding: 0.65rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: border-color .2s ease, color .2s ease;
}
.pager a:hover { color: var(--text); border-color: var(--amber); }
.pager .current { background: var(--grad); color: var(--bg); border-color: transparent; }

/* =========================================================
   Single post — sectional design
   ========================================================= */
.post-hero {
    padding: 9rem 0 4rem;
    position: relative;
    overflow: hidden;
}
.post-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(245,158,11,0.18), transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(251,113,133,0.18), transparent 50%);
    pointer-events: none;
}
.post-hero-inner { max-width: 880px; margin: 0 auto; padding: 0 1.5rem; position: relative; }
.post-hero .meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    color: var(--amber);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}
.post-hero .meta .dot { width: 4px; height: 4px; background: var(--text-faint); border-radius: 50%; }
.post-hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    line-height: 1.05;
    margin-bottom: 1.25rem;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.post-hero .lede {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 38rem;
}
.post-featured {
    max-width: 1100px;
    margin: 2rem auto 0;
    padding: 0 1.5rem;
}
.post-featured img {
    border-radius: var(--radius-lg);
    width: 100%;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    border: 1px solid var(--line);
}

.post-body {
    max-width: var(--max-prose);
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
    font-size: 1.13rem;
    line-height: 1.85;
    color: rgba(245, 239, 233, 0.86);
}
.post-body p { margin: 0 0 1.5em; }
.post-body h2 {
    font-family: var(--serif);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin: 3.5rem 0 1.25rem;
    line-height: 1.15;
    color: var(--text);
    position: relative;
    padding-top: 2rem;
}
.post-body h2::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 60px; height: 2px;
    background: var(--grad);
    border-radius: 2px;
}
.post-body h3 {
    font-family: var(--serif);
    font-size: 1.5rem;
    margin: 2.25rem 0 1rem;
    color: var(--text);
}
.post-body a {
    color: var(--amber);
    background: linear-gradient(currentColor, currentColor) bottom / 100% 1px no-repeat;
    padding-bottom: 1px;
}
.post-body a:hover { color: var(--rose); }
.post-body blockquote {
    margin: 2.5rem 0;
    padding: 1.5rem 1.75rem;
    border-left: 3px solid var(--amber);
    background: rgba(245, 158, 11, 0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-family: var(--serif);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text);
}
.post-body blockquote p { margin: 0; }
.post-body ul, .post-body ol { padding-left: 1.5rem; margin: 0 0 1.75em; }
.post-body li { margin: 0.5em 0; }
.post-body img {
    border-radius: var(--radius);
    margin: 2rem auto;
    border: 1px solid var(--line);
}
.post-body code {
    background: rgba(245, 158, 11, 0.1);
    color: var(--amber-soft);
    padding: 0.15em 0.45em;
    border-radius: 4px;
    font-size: 0.92em;
}
.post-body pre {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 2rem 0;
}
.post-body pre code { background: none; color: var(--text); padding: 0; }
.post-body hr {
    border: 0;
    height: 1px;
    background: var(--line);
    margin: 3rem 0;
}

.post-nav {
    max-width: var(--max-prose);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 6rem;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.post-nav a {
    flex: 1;
    min-width: 200px;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .25s ease, transform .25s ease;
}
.post-nav a:hover { border-color: var(--amber); transform: translateY(-3px); }
.post-nav .label {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 0.4rem;
}
.post-nav .title { font-family: var(--serif); font-size: 1.1rem; color: var(--text); }
.post-nav .next { text-align: right; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 3rem 0;
    color: var(--text-faint);
    font-size: 0.9rem;
    text-align: center;
}
.site-footer .brand-mark {
    font-family: var(--serif);
    font-size: 1.2rem;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 0.5rem;
    display: inline-block;
}

/* =========================================================
   404
   ========================================================= */
.notfound {
    min-height: 70vh;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 6rem 1.5rem;
}
.notfound h1 {
    font-size: clamp(4rem, 12vw, 9rem);
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 1rem;
}
.notfound p { color: var(--text-muted); margin-bottom: 2rem; max-width: 30rem; }
