/* ============================================================
   TechPulse — Luxury Editorial Design System
   Inspiration: Apple / Linear / Framer minimal dark editorial
   No gradients, no neon, no glass everywhere. Expensive.
   ============================================================ */

:root {
    /* Palette */
    --bg: #050505;
    --bg-2: #0B0B0B;
    --card: #111111;
    --card-2: #151515;
    --border: rgba(255, 255, 255, 0.08);
    --border-2: rgba(255, 255, 255, 0.14);
    --text: #F5F5F5;
    --text-2: #A0A0A0;
    --text-dim: #6B6B6B;
    --accent: #7FE39B;
    --accent-hover: #92F7AE;
    --purple: #B48EFF;

    /* Typography */
    --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;

    /* Scale */
    --h-1: clamp(2.75rem, 6.5vw, 4.5rem);   /* hero ~72px */
    --h-section: clamp(2rem, 4vw, 3.5rem);   /* section ~56px */
    --h-card: clamp(1.4rem, 2.2vw, 2.25rem); /* card ~36px */
    --body: 1.125rem;                        /* 18px */

    /* Geometry */
    --radius: 16px;
    --radius-sm: 12px;
    --radius-lg: 24px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: var(--body);
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* fallback for browsers without clip */
    overflow-x: clip;
    position: relative;
    min-height: 100vh;
}

/* ============================================================
   CINEMATIC BACKGROUND — smoky texture, vignette, soft blobs,
   faint noise. Never distracts from content.
   ============================================================ */
.bg-scene {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.035), transparent 40%),
        radial-gradient(ellipse at 85% 20%, rgba(127, 227, 155, 0.05), transparent 45%),
        radial-gradient(ellipse at 10% 75%, rgba(180, 142, 255, 0.045), transparent 45%);
}
.bg-scene::after {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.5;
}
.blob {
    position: absolute;
    z-index: 0;
    width: 44vw;
    height: 44vw;
    max-width: 480px;
    max-height: 480px;
    border-radius: 50%;
    filter: blur(90px);
    background: radial-gradient(circle, rgba(127, 227, 155, 0.05), transparent 70%);
    animation: drift 26s ease-in-out infinite alternate;
    pointer-events: none;
}
.blob, .blob-2 { left: -15vw; bottom: -20vw; }
.blob-2 { right: -15vw; top: -10vw; left: auto; bottom: auto;
         background: radial-gradient(circle, rgba(180, 142, 255, 0.05), transparent 70%);
         animation-duration: 32s;
         animation-delay: -12s; }
@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(6vw, -4vh) scale(1.08); }
}

::selection { background: rgba(127, 227, 155, 0.22); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, .serif { font-family: var(--font-serif); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }

.section {
    padding: 6.5rem 0;
    position: relative;
}
.section-tight { padding: 4rem 0; }

.eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.eyebrow::before {
    content: "";
    width: 26px;
    height: 1px;
    background: var(--accent);
    opacity: 0.5;
}

.section-head {
    margin-bottom: 3.5rem;
    max-width: 640px;
}
.section-head h2 { font-size: var(--h-section); margin-bottom: 0.9rem; }
.section-head p { color: var(--text-2); font-size: 1.05rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; max-width: 560px; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .eyebrow::before { display: none; }

/* ============================================================
   FLOATING NAV — centered rounded pill
   ============================================================ */
.site-header {
    position: fixed;
    top: 18px;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
}
.nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    height: 72px;
    padding: 0 1.6rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: rgba(11, 11, 11, 0.72);
    backdrop-filter: blur(22px) saturate(1.4);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    max-width: 900px;
    width: 100%;
}
.nav-logo {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
    margin-right: 0.5rem;
    white-space: nowrap;
}
.nav-logo em { font-style: normal; color: var(--accent); }
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    flex: 1;
    justify-content: center;
}
.nav-links a {
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    position: relative;
    transition: color 0.3s var(--ease);
}
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0.32rem;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { transform: scaleX(1); background: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: 0.6rem; }
.nav-actions button {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-2);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}
.nav-actions button:hover { color: var(--text); border-color: var(--border-2); transform: translateY(-1px); }

.btn-nav {
    padding: 0.55rem 1.35rem;
    border-radius: 999px;
    border: none;
    background: var(--text);
    color: #0B0B0B;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    white-space: nowrap;
}
.btn-nav:hover { background: #fff; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }

/* Hamburger (hidden on desktop) */
.btn-burger { display: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.9rem;
    border-radius: 999px;
    font: 600 0.95rem/1 var(--font-body);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.35s var(--ease);
    border: 1px solid var(--border-2);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-2);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.btn-solid {
    background: var(--accent);
    color: #050505;
    border-color: transparent;
    font-weight: 600;
}
.btn-solid:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(127,227,155,0.2); }

/* ============================================================
   HERO — two column editorial
   ============================================================ */
.hero {
    position: relative;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding: 8.5rem 0 4rem;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 4vw;
    align-items: center;
}
.hero-cat {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--purple);
    margin-bottom: 1.75rem;
    display: inline-block;
}
.hero h1 {
    font-size: var(--h-1);
    font-weight: 500;
    line-height: 1.05;
    margin-bottom: 1.75rem;
    max-width: 13ch;
    color: var(--text);
}
.hero h1 em {
    font-style: normal;
    color: var(--accent);
}
.hero-desc {
    color: var(--text-2);
    font-size: 1.15rem;
    max-width: 46ch;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-art {
    position: relative;
    padding: 2.5rem 0;
    min-width: 0;
    overflow: clip;
}
.hero-img-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    aspect-ratio: 4 / 4.5;
    max-width: 100%;
}
.hero-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-img-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5,5,5,0.45), transparent 45%);
}
/* overlap slightly outside container */
.hero-img-wrap {
    z-index: 1;
    transform: rotate(-1.5deg);
}
.hero-accent {
    position: absolute;
    z-index: 0;
    width: 68%;
    height: 68%;
    right: -6%;
    bottom: -6%;
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at 30% 30%, rgba(127,227,155,0.14), transparent 70%);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform 0.45s var(--ease), border-color 0.4s var(--ease), box-shadow 0.45s var(--ease);
}
.card:hover {
    transform: translateY(-6px);
    border-color: var(--border-2);
    box-shadow: var(--shadow);
}
.card-img {
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    aspect-ratio: 16 / 10;
    position: relative;
    background: var(--bg-2);
}
.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
    opacity: 0;
}
.card-img.loaded, .card-img.img-fallback { opacity: 1; }
.card:hover .card-img { transform: scale(1.05); }
.card:hover {
    border-color: var(--border-2);
}
.tall { border-radius: var(--radius-lg); }
.tall .card-img { border-radius: var(--radius-lg); }

/* ============================================================
   FEATURED GRID
   ============================================================ */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}
.featured-card { padding: 0; overflow: hidden; display: block; text-decoration: none; color: inherit; }
.featured-card .fc-img {
    aspect-ratio: 16 / 11;
    overflow: hidden;
    position: relative;
}
.featured-card .fc-body { padding: 1.75rem; }
.featured-card .fc-body h3 { font-size: var(--h-card); margin: 0.6rem 0 0.6rem; line-height: 1.25; color: var(--text); }
.featured-card .fc-body h3:hover { color: var(--accent-hover); }
.featured-card .fc-body p { color: var(--text-2); font-size: 0.98rem; line-height: 1.65; margin-bottom: 1.1rem; }
.fc-cat {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--purple);
}
.fc-meta { display: flex; gap: 1rem; align-items: center; font-size: 0.82rem; color: var(--text-dim); }
.fc-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-dim); }

/* ============================================================
   CATEGORY MENU
   ============================================================ */
.cat-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 999px;
    padding: 0.5rem;
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
}
.cat-menu a {
    padding: 0.6rem 1.3rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text-2);
    font-size: 0.92rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s var(--ease);
}
.cat-menu a:hover { color: var(--text); }
.cat-menu a.active { color: var(--text); }
.cat-menu a.active::after {
    content: "";
    position: absolute;
    left: 1.3rem;
    right: 1.3rem;
    bottom: 0.1rem;
    height: 2px;
    border-radius: 2px;
    background: var(--purple);
}

/* ============================================================
   LATEST + SIDEBAR
   ============================================================ */
.latest-wrap {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 4rem;
    align-items: start;
}
/* Grid items must be allowed to shrink below content min-width */
.latest-wrap > *, .featured-grid > *, .list-grid > *, .hero-grid > * { min-width: 0; }
.latest-list { display: flex; flex-direction: column; }
.latest-item {
    display: flex;
    gap: 1.75rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
    text-decoration: none;
    transition: padding 0.35s var(--ease);
}
.latest-item:last-child { border-bottom: none; }
.latest-item:hover { padding-left: 0.4rem; }
.latest-thumb {
    width: 148px;
    min-width: 148px;
    aspect-ratio: 16/10;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    background: var(--bg-2);
}
.latest-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s ease, transform 0.6s var(--ease); }
.latest-thumb img.loaded, .latest-thumb img.img-fallback { opacity: 1; }
.latest-item:hover .latest-thumb img { transform: scale(1.06); }
.latest-body { flex: 1; min-width: 0; }
.latest-body .fc-cat { display: block; margin-bottom: 0.4rem; }
.latest-body h3 { font-size: 1.5rem; margin: 0 0 0.5rem; line-height: 1.22; color: var(--text); }
.latest-body h3:hover { color: var(--accent-hover); }
.latest-body p { color: var(--text-2); font-size: 0.96rem; line-height: 1.6; margin-bottom: 0.75rem; }
.fc-meta { display: flex; gap: 1rem; align-items: center; font-size: 0.82rem; color: var(--text-dim); }
.fc-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-dim); }

/* Sidebar */
.sidebar { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 1.75rem; }

.newsletter-card {
    background: linear-gradient(160deg, #12321f, #0B1F14 60%, #0B0B0B);
    border: 1px solid rgba(127,227,155,0.16);
    border-radius: var(--radius-lg);
    padding: 2.25rem 2rem;
    position: relative;
    overflow: hidden;
}
.newsletter-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 0%, rgba(127,227,155,0.14), transparent 50%);
}
.newsletter-card > * { position: relative; }
.nc-eyebrow { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 1rem; }
.newsletter-card h3 { font-size: 1.9rem; line-height: 1.15; margin-bottom: 0.8rem; color: #fff; }
.newsletter-card p { color: rgba(255,255,255,0.6); font-size: 0.95rem; margin-bottom: 1.5rem; }
.nl-form { display: flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: 999px; padding: 0.3rem 0.3rem 0.3rem 1.2rem; }
.nl-form input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: #fff; font: 0.92rem var(--font-body); }
.nl-form input::placeholder { color: rgba(255,255,255,0.4); }
.nl-form button {
    width: 42px; height: 42px; border-radius: 50%; border: none;
    background: var(--accent); color: #050505;
    display: grid; place-items: center; cursor: pointer;
    transition: all 0.3s var(--ease);
}
.nl-form button:hover { background: var(--accent-hover); transform: scale(1.06); }

.popular-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.9rem; }
.popular-card h4 { font-family: var(--font-serif); font-size: 1.4rem; margin-bottom: 1.2rem; }
.popular-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.popular-tags a {
    padding: 0.35rem 0.85rem; border-radius: 999px; text-decoration: none;
    background: var(--bg-2); border: 1px solid var(--border); color: var(--text-2);
    font-size: 0.8rem; transition: all 0.3s var(--ease);
}
.popular-tags a:hover { color: var(--accent-hover); border-color: rgba(127,227,155,0.4); }

/* ============================================================
   QUOTE SECTION
   ============================================================ */
.quote-band {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid var(--border);
}
.quote-band img.qbg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.quote-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(5,5,5,0.72), rgba(5,5,5,0.6) 55%, rgba(5,5,5,0.82)); }
.quote-inner { position: relative; z-index: 2; max-width: 760px; padding: 4.5rem 2.5rem; }
.quote-mark { font-family: var(--font-serif); font-size: 5rem; color: var(--accent); line-height: 0.6; display: block; margin-bottom: 0.6rem; opacity: 0.7; }
.quote-inner blockquote {
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    font-style: italic;
    line-height: 1.3;
    color: #fff;
    margin-bottom: 1.75rem;
}
.quote-auth { text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.78rem; color: var(--accent); font-weight: 600; }

/* ============================================================
   ARTICLE / SINGLE
   ============================================================ */
.article { max-width: 820px; margin: 0 auto; }
.article-hero { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16/8; margin-bottom: 3rem; position: relative; background: var(--bg-2); }
.article-hero img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s ease; }
.article-hero img.loaded, .article-hero img.img-fallback { opacity: 1; }
.article-head { max-width: 720px; }
.article-head .fc-cat { display: inline-block; margin-bottom: 1.1rem; }
.article-head h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.06; margin-bottom: 1.4rem; }
.article-meta { display: flex; align-items: center; gap: 1rem; color: var(--text-dim); font-size: 0.87rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); margin-bottom: 2.5rem; flex-wrap: wrap; }
.article-meta .dot { width: 3px; height: 3px; background: var(--text-dim); border-radius: 50%; }
.article-meta .a-author { color: var(--text-2); }

.article-body { color: var(--text-2); }
.article-body h2 { font-size: 2rem; color: var(--text); margin: 2.6rem 0 1rem; }
.article-body h3 { font-size: 1.5rem; color: var(--text); margin: 2.2rem 0 0.8rem; }
.article-body p { margin: 1.05rem 0; font-size: 1.08rem; line-height: 1.8; }
.article-body ul, .article-body ol { margin: 1rem 0; padding-left: 1.6rem; }
.article-body li { margin: 0.4rem 0; }
.article-body a { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(127,227,155,0.35); }
.article-body a:hover { text-decoration-color: var(--accent); }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body blockquote {
    border-left: 2px solid var(--accent);
    padding: 0.5rem 0 0.5rem 1.5rem;
    margin: 1.5rem 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.3rem;
    color: var(--text);
}
.article-body code {
    background: var(--bg-2); border: 1px solid var(--border);
    padding: 0.15rem 0.5rem; border-radius: 6px; font-size: 0.88em;
    font-family: 'JetBrains Mono', monospace; color: var(--accent);
}
.article-body pre {
    background: #0a0a0a; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.5rem; overflow-x: auto; margin: 1.5rem 0; box-shadow: var(--shadow); font-size: 0.9rem;
}
.article-body pre code { background: none; border: none; padding: 0; color: #d6d6d6; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.92rem; }
.article-body th, .article-body td { padding: 0.75rem 1rem; border: 1px solid var(--border); text-align: left; }
.article-body th { background: var(--card); color: var(--text); }
.article-body img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 1.5rem 0; }
.article-body iframe, .article-body video, .article-body embed { max-width: 100%; display: block; }
.article-body { overflow-wrap: break-word; word-wrap: break-word; }

.article-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 2.5rem 0; }
.article-tags .tag {
    padding: 0.4rem 1rem; border-radius: 999px; text-decoration: none;
    background: var(--card); border: 1px solid var(--border); color: var(--text-2); font-size: 0.82rem; transition: all 0.3s var(--ease);
}
.article-tags .tag:hover { color: var(--accent-hover); border-color: rgba(127,227,155,0.35); }

/* ============================================================
   LIST / CATEGORY PAGES
   ============================================================ */
.page-head { padding: 8rem 0 3rem; max-width: 720px; }
.page-head .eyebrow { margin-bottom: 1.4rem; }
.page-head h1 { font-size: var(--h-section); margin-bottom: 1rem; }
.page-head p { color: var(--text-2); }

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    background: var(--bg-2);
}
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 6rem 2.25rem 2.5rem; text-align: center; }
.footer-logo { font-family: var(--font-serif); font-size: 2.4rem; color: var(--text); margin-bottom: 1rem; display: inline-block; text-decoration: none; }
.footer-logo em { font-style: normal; color: var(--accent); }
.footer-desc { color: var(--text-2); max-width: 420px; margin: 0 auto 2.75rem; font-size: 1rem; }
.footer-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem 2rem; margin-bottom: 2.5rem; }
.footer-nav a { color: var(--text-2); text-decoration: none; font-size: 0.95rem; transition: color 0.3s var(--ease); }
.footer-nav a:hover { color: var(--text); }
.footer-social { display: flex; justify-content: center; gap: 0.75rem; margin-bottom: 3rem; }
.footer-social a {
    width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center;
    border: 1px solid var(--border); color: var(--text-2); background: transparent;
    transition: all 0.3s var(--ease); text-decoration: none;
}
.footer-social a:hover { color: var(--text); border-color: var(--border-2); transform: translateY(-2px); }
.footer-copy { border-top: 1px solid var(--border); padding-top: 2rem; color: var(--text-dim); font-size: 0.85rem; }

/* ============================================================
   REVEAL ANIMATIONS (IntersectionObserver — Framer-Motion feel)
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
    will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal-stagger > *.revealed { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
    .blob { animation: none !important; }
    html { scroll-behavior: auto; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Tablet */
@media (max-width: 1024px) {
    .nav { gap: 1rem; padding: 0 1.2rem; }
    .nav-links { gap: 0.1rem; }
    .nav-links a { padding: 0.5rem 0.7rem; font-size: 0.9rem; }
    .featured-grid { grid-template-columns: repeat(2, 1fr); }
    .list-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-grid { gap: 2.5rem; }
    .latest-wrap { grid-template-columns: 1fr 320px; gap: 3rem; }
}

/* Small tablet / large phone */
@media (max-width: 820px) {
    .container { padding: 0 1.5rem; }
    .section { padding: 5rem 0; }
    .nav { justify-content: space-between; width: auto; padding: 0 1.1rem; }
    .nav-links { display: none; }
    .btn-nav { display: none; }
    .btn-burger { display: grid; }
    .nav-actions { gap: 0.4rem; }
    /* mobile sheet nav */
    .nav.open .nav-links {
        display: flex; flex-direction: column; align-items: stretch;
        position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%);
        background: rgba(11,11,11,0.96); backdrop-filter: blur(22px);
        border: 1px solid var(--border); border-radius: 20px; padding: 1rem; gap: 0.25rem;
        min-width: 260px; box-shadow: var(--shadow);
    }
    .nav-links a { padding: 0.8rem 1.2rem; border-radius: 12px; }
    .nav-links a::after { display: none; }
    .nav-links a.active { background: rgba(127,227,155,0.08); color: var(--accent-hover); }
    .hero { min-height: auto; padding: 7rem 0 3rem; }
    .hero-grid { grid-template-columns: 1fr; gap: 2.75rem; }
    .hero h1 { font-size: clamp(2.4rem, 9vw, 3.4rem); }
    .hero-img-wrap { max-width: 440px; }
    .latest-wrap { grid-template-columns: 1fr; gap: 3rem; }
    .sidebar { position: static; }
    .quote-band { min-height: 420px; }
    .footer-inner { padding-top: 4.5rem; }
}

/* Phone */
@media (max-width: 640px) {
    .container { padding: 0 1.15rem; }
    .section { padding: 3.75rem 0; }
    .featured-grid { grid-template-columns: 1fr; gap: 1.4rem; }
    .list-grid { grid-template-columns: 1fr; }
    .latest-item { flex-direction: column; gap: 1rem; }
    .latest-thumb { width: 100%; min-width: 0; aspect-ratio: 16/9; }
    .cat-menu { border-radius: var(--radius-sm); width: 100%; flex-wrap: wrap; justify-content: flex-start; }
    .newsletter-card { padding: 2rem 1.5rem; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .hero-cta .btn { justify-content: center; }
    /* table scroll */
    .article-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
}

/* Short viewports */
@media (max-height: 600px) {
    .hero { padding-top: 6.5rem; }
}

/* Dynamic viewport units */
@supports (min-height: 100dvh) { .hero { min-height: 100dvh; } }

/* Accessibility: focus states */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}