/* ═══════════════════════════════════════════════════════
   PSW — Personal Website Design System
   Light (AlphaQubit) / Dark (navy+gold) dual theme
   ═══════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS — LIGHT (DEFAULT) ── */
:root, [data-theme="light"] {
    /* Core palette (constant) */
    --navy: #0f056b;
    --navy-deep: #08033d;
    --navy-light: #1a0f8a;
    --gold: #d4a843;
    --gold-light: #c49530;
    --gold-dim: #9a7525;
    --gold-glow: rgba(212, 168, 67, 0.12);
    --green-dot: #22c55e;
    --green-glow: rgba(34, 197, 94, 0.4);

    /* Functional (theme-dependent) */
    --bg-primary: #f5f2eb;
    --bg-secondary: #eae6dd;
    --bg-card: rgba(15, 5, 107, 0.04);
    --bg-card-hover: rgba(15, 5, 107, 0.08);
    --bg-card-featured: linear-gradient(135deg, rgba(15, 5, 107, 0.08), rgba(212, 168, 67, 0.05));
    --text-primary: #0a0a1a;
    --text-secondary: #4a4560;
    --text-muted: #7a7590;
    --border: rgba(15, 5, 107, 0.1);
    --border-hover: rgba(212, 168, 67, 0.4);
    --border-subtle: rgba(15, 5, 107, 0.05);
    --border-featured: rgba(212, 168, 67, 0.25);
    --tag-bg: rgba(15, 5, 107, 0.06);
    --tag-border: rgba(15, 5, 107, 0.1);
    --tag-hover-border: rgba(15, 5, 107, 0.18);

    /* Nav */
    --nav-bg: rgba(245, 242, 235, 0.92);
    --nav-shadow: rgba(0, 0, 0, 0.06);
    --mobile-bg: rgba(245, 242, 235, 0.97);

    /* Card hover shadow */
    --card-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), 0 0 60px rgba(15, 5, 107, 0.04);
    --card-shadow-featured: 0 12px 40px rgba(0, 0, 0, 0.08), 0 0 80px rgba(212, 168, 67, 0.06);

    /* Canvas particle colors */
    --particle-r: 15;
    --particle-g: 5;
    --particle-b: 107;
    --particle-connection-r: 15;
    --particle-connection-g: 5;
    --particle-connection-b: 107;

    /* Grain overlay */
    --grain-opacity: 0.015;

    /* Hero overlay */
    --hero-overlay:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(15, 5, 107, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 80% 20%, rgba(212, 168, 67, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse 40% 40% at 20% 80%, rgba(15, 5, 107, 0.05) 0%, transparent 50%),
        linear-gradient(to bottom, rgba(245,242,235,0) 0%, rgba(245,242,235,0.5) 80%, rgba(245,242,235,1) 100%);

    /* Selection */
    --selection-bg: var(--gold);
    --selection-color: #fff;

    /* Typography */
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
    --font-mono: 'Space Mono', 'Courier New', monospace;

    /* Spacing */
    --section-pad: clamp(80px, 10vw, 140px);
    --container-max: 1200px;
    --container-pad: clamp(20px, 4vw, 40px);

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration: 0.6s;
}

/* ── DESIGN TOKENS — DARK ── */
[data-theme="dark"] {
    --gold-light: #e8c872;
    --gold-dim: #a07e2e;
    --green-dot: #4ade80;
    --green-glow: rgba(74, 222, 128, 0.5);

    --bg-primary: #050510;
    --bg-secondary: #0a0a1a;
    --bg-card: rgba(15, 5, 107, 0.12);
    --bg-card-hover: rgba(15, 5, 107, 0.22);
    --bg-card-featured: linear-gradient(135deg, rgba(15, 5, 107, 0.25), rgba(212, 168, 67, 0.06));
    --text-primary: #f5f2eb;
    --text-secondary: #9994b0;
    --text-muted: #5c576e;
    --border: rgba(212, 168, 67, 0.12);
    --border-hover: rgba(212, 168, 67, 0.3);
    --border-subtle: rgba(255, 255, 255, 0.04);
    --border-featured: rgba(212, 168, 67, 0.2);
    --tag-bg: rgba(255, 255, 255, 0.04);
    --tag-border: rgba(255, 255, 255, 0.06);
    --tag-hover-border: rgba(255, 255, 255, 0.1);

    --nav-bg: rgba(5, 5, 16, 0.92);
    --nav-shadow: rgba(0, 0, 0, 0.3);
    --mobile-bg: rgba(5, 5, 16, 0.97);

    --card-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 60px rgba(15, 5, 107, 0.1);
    --card-shadow-featured: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 80px rgba(212, 168, 67, 0.08);

    --particle-r: 212;
    --particle-g: 168;
    --particle-b: 67;
    --particle-connection-r: 15;
    --particle-connection-g: 5;
    --particle-connection-b: 107;

    --grain-opacity: 0.022;

    --hero-overlay:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(15, 5, 107, 0.45) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 80% 20%, rgba(212, 168, 67, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse 40% 40% at 20% 80%, rgba(15, 5, 107, 0.2) 0%, transparent 50%),
        linear-gradient(to bottom, rgba(5,5,16,0) 0%, rgba(5,5,16,0.6) 80%, rgba(5,5,16,1) 100%);

    --selection-color: #050510;
}

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

html {
    font-size: 18px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

::selection {
    background: var(--selection-bg);
    color: var(--selection-color);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

/* ── SECTION HEADERS ── */
.section-index {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.12rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.75;
}

.section-header {
    margin-bottom: clamp(40px, 6vw, 72px);
}

/* ═══════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 var(--container-pad);
    transition: background var(--duration) var(--ease-out), backdrop-filter var(--duration), box-shadow var(--duration);
}

.nav--scrolled, .nav--solid {
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(1.2);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 30px var(--nav-shadow);
}

.nav__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.3s;
}
.nav__logo:hover { opacity: 0.8; }

.nav__logo-mark {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    color: var(--gold);
}

.nav__logo-sep {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--gold);
    opacity: 0.5;
    line-height: 1;
}

.nav__logo-phd {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--gold);
    opacity: 0.75;
    margin-right: 2px;
}

.nav__logo-nn {
    display: block;
    flex-shrink: 0;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.nav__logo:hover .nav__logo-nn { opacity: 1; }

.nav__logo-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

.nav__links {
    display: flex;
    gap: 32px;
}

.nav__link {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    transition: color 0.3s;
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.4s var(--ease-out);
}

.nav__link:hover, .nav__link--active { color: var(--gold); }
.nav__link:hover::after, .nav__link--active::after { width: 100%; }

.nav__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Language Toggle */
.lang-toggle, .theme-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(212, 168, 67, 0.08);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    transition: border-color 0.3s, background 0.3s;
    color: var(--text-muted);
}

.lang-toggle:hover, .theme-toggle:hover {
    border-color: var(--border-hover);
    background: rgba(212, 168, 67, 0.12);
}

.lang-toggle__option {
    color: var(--text-muted);
    transition: color 0.3s;
    cursor: pointer;
}

.lang-toggle__option--active {
    color: var(--gold);
    font-weight: 700;
}

.lang-toggle__separator {
    color: var(--text-muted);
    opacity: 0.4;
}

/* Theme Toggle */
.theme-toggle {
    padding: 6px 10px;
    font-size: 1rem;
    letter-spacing: 0;
}

.theme-toggle__icon {
    line-height: 1;
    transition: transform 0.3s var(--ease-out);
}

.theme-toggle:hover .theme-toggle__icon {
    transform: rotate(20deg);
}

/* Burger */
.nav__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav__burger span {
    width: 22px;
    height: 1.5px;
    background: var(--text-primary);
    transition: transform 0.3s var(--ease-out), opacity 0.3s;
    display: block;
}

.nav__burger--open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__burger--open span:nth-child(2) { opacity: 0; }
.nav__burger--open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav */
.nav__mobile {
    display: none;
    flex-direction: column;
    padding: 24px var(--container-pad) 32px;
    border-top: 1px solid var(--border);
    background: var(--mobile-bg);
    backdrop-filter: blur(24px);
}

.nav__mobile--open { display: flex; }

.nav__mobile-link {
    padding: 14px 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
    transition: color 0.3s, padding-left 0.3s;
}

.nav__mobile-link:hover {
    color: var(--gold);
    padding-left: 8px;
}

@media (max-width: 768px) {
    .nav__links { display: none; }
    .nav__burger { display: flex; }
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px var(--container-pad) 80px;
}

.hero__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: var(--hero-overlay);
    z-index: 1;
    transition: background 0.6s ease;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    text-align: center;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    margin-bottom: 40px;
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    animation: fadeInUp 1s var(--ease-out) 0.2s both;
}

.hero__badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green-dot);
    box-shadow: 0 0 8px var(--green-glow);
    animation: pulse-dot 2s ease-in-out infinite;
}

.hero__title {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.05;
    margin-bottom: 24px;
}

.hero__title-line {
    display: block;
    animation: fadeInUp 1s var(--ease-out) both;
}

.hero__title-line--1 { font-size: clamp(2.8rem, 7vw, 5.5rem); animation-delay: 0.4s; }
.hero__title-line--2 { font-size: clamp(2.8rem, 7vw, 5.5rem); animation-delay: 0.55s; }
.hero__title-line--3 { font-size: clamp(3.2rem, 8vw, 6.2rem); animation-delay: 0.7s; }

.hero__title-accent {
    color: var(--gold);
    font-style: italic;
    text-shadow: 0 0 60px rgba(212, 168, 67, 0.2);
}

.hero__subtitle {
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 48px;
    animation: fadeInUp 1s var(--ease-out) 0.9s both;
}

/* Stats */
.hero__stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 48px;
    animation: fadeInUp 1s var(--ease-out) 1.1s both;
}

.hero__stat { text-align: center; }

.hero__stat-number {
    font-family: var(--font-mono);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--gold);
}

.hero__stat-plus {
    font-family: var(--font-mono);
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    color: var(--gold);
    opacity: 0.7;
}

.hero__stat-text {
    font-family: var(--font-mono);
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    color: var(--gold);
    opacity: 0.6;
    margin-right: 4px;
}

.hero__stat-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 0.02em;
}

.hero__stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* CTAs */
.hero__cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s var(--ease-out) 1.3s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 8px;
    transition: all 0.4s var(--ease-out);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn--primary {
    background: var(--gold);
    color: #fff;
}

.btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn--primary:hover::before { transform: translateX(100%); }

.btn--primary:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(212, 168, 67, 0.3);
}

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn--ghost:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(212, 168, 67, 0.1);
}

/* Scroll indicator */
.hero__scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
    animation: fadeInUp 1s var(--ease-out) 1.6s both;
}

.hero__scroll span {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.hero__scroll-nn {
    display: block;
    margin-bottom: 2px;
    filter: drop-shadow(0 0 5px rgba(212, 168, 67, 0.4));
}

.hero__scroll-nn .nn-node {
    fill: var(--bg-card);
    stroke: var(--gold);
    stroke-width: 1.5;
}

.hero__scroll-nn .nn-node--output {
    fill: var(--gold);
}

.hero__scroll-nn .nn-link {
    stroke: var(--gold);
    stroke-width: 1;
    opacity: 0.35;
}

.hero__scroll-nn .nn-scroll-line {
    stroke: var(--gold);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: 26;
    stroke-dashoffset: 26;
    animation: flowLine 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes flowLine {
    0% { stroke-dashoffset: 26; opacity: 0; }
    20% { opacity: 1; }
    50% { stroke-dashoffset: 0; opacity: 1; }
    80% { opacity: 1; }
    100% { stroke-dashoffset: -26; opacity: 0; }
}

/* ═══════════════════════════════════════════
   ABOUT STRIP
   ═══════════════════════════════════════════ */
.about-strip {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    background: var(--bg-card);
    overflow: hidden;
    position: relative;
}

.about-strip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.03), transparent);
}

.about-strip__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

.about-strip__text p {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-align: center;
}

/* ═══════════════════════════════════════════
   BIO SECTION
   ═══════════════════════════════════════════ */
.bio {
    padding: 48px 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.bio__inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 36px;
    border-left: 3px solid var(--gold);
    background: var(--bg-card);
    border-radius: 0 12px 12px 0;
    position: relative;
}

.bio__text {
    font-size: 1.06rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════════ */
.projects {
    padding: var(--section-pad) 0;
}

.projects__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.project-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: clamp(28px, 4vw, 44px);
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 32px;
    align-items: start;
    transition: border-color 0.4s var(--ease-out), background 0.4s, transform 0.4s var(--ease-out), box-shadow 0.4s;
    overflow: hidden;
}

.project-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--card-shadow);
}

.project-card--featured {
    grid-template-columns: 1fr;
    background: var(--bg-card-featured);
    border-color: var(--border-featured);
}

/* Icon-on-top layout for text-heavy cards */
.project-card--icon-top {
    grid-template-columns: 1fr;
}

.project-card--icon-top .project-card__visual {
    display: flex;
    justify-content: flex-start;
    padding-top: 0;
    margin-bottom: 12px;
}

.project-card--icon-top .project-card__icon svg {
    width: 52px;
    height: 52px;
}

.project-card--featured:hover {
    border-color: rgba(212, 168, 67, 0.4);
    box-shadow: var(--card-shadow-featured);
}

.project-card--featured .project-card__visual {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.project-card__index {
    position: absolute;
    top: 20px;
    right: 24px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.project-card__badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--gold);
    background: rgba(212, 168, 67, 0.1);
    border: 1px solid rgba(212, 168, 67, 0.2);
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.project-card__visual {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8px;
}

.project-card__glow {
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.project-card__icon svg {
    width: 64px;
    height: 64px;
    transition: transform 0.6s var(--ease-out);
}

.project-card:hover .project-card__icon svg { transform: scale(1.08); }

.project-card--featured .project-card__icon svg { width: 80px; height: 80px; }

.project-card__title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 400;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-card__desc {
    font-size: 0.97rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 16px;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.project-card__tags span {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    padding: 5px 13px;
    border-radius: 5px;
    transition: border-color 0.3s, color 0.3s;
}

.project-card:hover .project-card__tags span { border-color: var(--tag-hover-border); }

.project-card__meta { margin-top: 8px; }

.project-card__status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.project-card__status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green-dot);
    box-shadow: 0 0 6px var(--green-glow);
    animation: pulse-dot 2s ease-in-out infinite;
}

.project-card__link {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--gold);
    letter-spacing: 0.04em;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.project-card__link:hover {
    color: var(--gold-light);
    transform: translateX(4px);
}

.project-card__link--icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.project-card__link--icon svg {
    flex-shrink: 0;
    opacity: 0.85;
    transition: opacity 0.3s;
}

.project-card__link--icon:hover svg {
    opacity: 1;
}

@media (max-width: 768px) {
    .project-card { grid-template-columns: 1fr; }
    .project-card__visual { display: none; }
    .project-card--featured .project-card__visual { display: flex; }
}

/* ═══════════════════════════════════════════
   COMPETENCIES (detailed)
   ═══════════════════════════════════════════ */
.competencies {
    padding: var(--section-pad) 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.competencies::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
    opacity: 0.3;
}

.competencies__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.competency-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    transition: border-color 0.4s, transform 0.4s var(--ease-out), background 0.4s;
    position: relative;
    overflow: hidden;
}

.competency-card--featured {
    grid-column: 1 / -1;
    background: var(--bg-card-featured);
    border-color: var(--border-featured);
}

.competency-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.competency-card:hover::before { opacity: 0.6; }

.competency-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    background: var(--bg-card-hover);
}

.competency-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.competency-card__icon {
    font-size: 1.2rem;
    color: var(--gold);
    flex-shrink: 0;
}

.competency-card__title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-primary);
}

.competency-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.competency-card__tags span {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    padding: 5px 13px;
    border-radius: 5px;
    transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.competency-card:hover .competency-card__tags span {
    border-color: var(--tag-hover-border);
}

.competency-card__tags span:hover {
    color: var(--gold);
    border-color: var(--gold);
}

/* Language bars */
.lang-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.lang-bar:last-child { margin-bottom: 0; }

.lang-bar__name {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
    min-width: 80px;
    letter-spacing: 0.03em;
}

.lang-bar__track {
    flex: 1;
    height: 4px;
    background: var(--tag-bg);
    border-radius: 2px;
    overflow: hidden;
}

.lang-bar__fill {
    height: 100%;
    background: var(--gold);
    border-radius: 2px;
    transition: width 1.2s var(--ease-out);
}

.lang-bar__level {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    min-width: 60px;
    text-align: right;
    letter-spacing: 0.04em;
}

@media (max-width: 768px) {
    .competencies__grid {
        grid-template-columns: 1fr;
    }
    .competency-card--featured {
        grid-column: auto;
    }
}

/* ═══════════════════════════════════════════
   TIMELINE
   ═══════════════════════════════════════════ */
.timeline {
    padding: var(--section-pad) 0;
}

.timeline__track {
    position: relative;
    padding-left: 48px;
}

.timeline__track::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--gold), var(--border), transparent);
}

.timeline__item {
    position: relative;
    margin-bottom: 48px;
}

.timeline__item:last-child { margin-bottom: 0; }

.timeline__marker {
    position: absolute;
    left: -44px;
    top: 4px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: var(--bg-primary);
    transition: background 0.3s, box-shadow 0.3s;
}

.timeline__item:first-child .timeline__marker {
    background: var(--gold);
    box-shadow: 0 0 12px rgba(212, 168, 67, 0.3);
}

.timeline__item:hover .timeline__marker {
    box-shadow: 0 0 12px rgba(212, 168, 67, 0.4);
}

.timeline__date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--gold-dim);
    margin-bottom: 8px;
}

.timeline__card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    transition: border-color 0.4s, transform 0.4s var(--ease-out), box-shadow 0.4s;
}

.timeline__card:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
    box-shadow: -4px 0 20px rgba(212, 168, 67, 0.05);
}

.timeline__org {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--gold);
    display: block;
    margin-bottom: 4px;
}

.timeline__card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.timeline__card p {
    font-size: 0.97rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 12px;
}

.timeline__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.timeline__tags span {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-muted);
    background: var(--tag-bg);
    padding: 5px 11px;
    border-radius: 4px;
    border: 1px solid var(--tag-border);
}

/* ═══════════════════════════════════════════
   VISION
   ═══════════════════════════════════════════ */
.vision {
    padding: var(--section-pad) 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.vision::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(15, 5, 107, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.vision__quote {
    margin-bottom: 56px;
    padding: 40px;
    border-left: 3px solid var(--gold);
    background: rgba(212, 168, 67, 0.04);
    border-radius: 0 12px 12px 0;
    position: relative;
}

.vision__quote::before {
    content: '\201C';
    position: absolute;
    top: -10px;
    left: 16px;
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--gold);
    opacity: 0.15;
    line-height: 1;
}

.vision__quote p {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-style: italic;
    line-height: 1.7;
    color: var(--text-primary);
}

.vision__quote-author {
    display: block;
    margin-top: 20px;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-style: normal;
    letter-spacing: 0.06em;
    color: var(--gold);
    opacity: 0.9;
}

.vision__pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.vision__pillar {
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.4s, transform 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.vision__pillar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.vision__pillar:hover::after { opacity: 0.5; }
.vision__pillar:hover { border-color: var(--border-hover); transform: translateY(-3px); }

.vision__pillar-number {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-style: italic;
    color: var(--gold);
    margin-bottom: 12px;
}

.vision__pillar h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.vision__pillar p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ═══════════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════════ */
.contact {
    padding: var(--section-pad) 0;
}

.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "tagline  visual"
        "links    visual"
        "links    blog";
    column-gap: 48px;
    row-gap: 0;
    align-items: start;
}

.contact__tagline {
    grid-area: tagline;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 32px;
}

.contact__links {
    grid-area: links;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.contact__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    transition: border-color 0.3s, padding-left 0.3s;
}

.contact__link:hover {
    border-color: var(--gold);
    padding-left: 4px;
}

.contact__link-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: color 0.3s;
}

.contact__link:hover .contact__link-icon {
    color: var(--gold);
}

.contact__link-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
    min-width: 100px;
}

.contact__link-value {
    font-size: 0.97rem;
    color: var(--text-primary);
    transition: color 0.3s;
    margin-left: auto;
}

.contact__link:hover .contact__link-value { color: var(--gold); }

.contact__link--badge .contact__link-value {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.contact__visual {
    grid-area: visual;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    position: relative;
}

.contact__pattern {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 1px solid var(--border);
    position: relative;
    animation: rotate-slow 40s linear infinite;
    flex-shrink: 0;
}

.contact__pattern::before,
.contact__pattern::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--border);
}

.contact__pattern::before { inset: 30px; }
.contact__pattern::after { inset: 60px; border-color: rgba(212, 168, 67, 0.15); }

.contact__photo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 148px;
    height: 148px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 2px solid var(--gold);
    box-shadow: 0 0 24px rgba(212, 168, 67, 0.18);
    z-index: 2;
    /* Counter-rotate to cancel parent's rotate-slow animation */
    animation: photo-counter-rotate 40s linear infinite;
}

@keyframes photo-counter-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(-360deg); }
}

/* ── Blog button with ripple animation ── */
.contact__blog-wrap {
    grid-area: blog;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    width: 260px;
    height: 72px;
    margin-top: 16px;
}

.contact__blog-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    color: #fff;
    background: var(--gold);
    border-radius: 40px;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.contact__blog-btn:hover {
    transform: translateY(-2px);
    background: var(--gold-light);
    box-shadow: 0 8px 28px rgba(212, 168, 67, 0.45);
}

.contact__blog-ripple {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid var(--gold);
    opacity: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: blog-ripple 2.4s ease-out infinite;
    pointer-events: none;
}

.contact__blog-ripple--1 { animation-delay: 0s; }
.contact__blog-ripple--2 { animation-delay: 0.8s; }
.contact__blog-ripple--3 { animation-delay: 1.6s; }

@keyframes blog-ripple {
    0%   { width: 80px;  height: 80px;  opacity: 0.6; }
    100% { width: 230px; height: 230px; opacity: 0; }
}

@keyframes rotate-slow { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
    /* Switch to flex column — enables order-based reordering */
    .contact__grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    /* 1 — Tagline stays first */
    .contact__tagline {
        order: 1;
        text-align: center;
        margin-bottom: 24px;
        font-size: 1.1rem;
        width: 100%;
    }

    /* 2 — Photo comes just after tagline */
    .contact__visual {
        order: 2;
        display: flex;
        margin-bottom: 28px;
    }

    /* Scale down the rotating rings on mobile */
    .contact__pattern {
        width: 200px;
        height: 200px;
    }

    .contact__photo {
        width: 108px;
        height: 108px;
    }

    /* 3 — Contact links below the photo */
    .contact__links {
        order: 3;
        width: 100%;
        margin-bottom: 32px;
    }

    /* 4 — Blog button last */
    .contact__blog-wrap {
        order: 4;
        margin-top: 0;
    }
}

/* ═══════════════════════════════════════════
   SCROLL TO TOP BUTTON
   All colors hardcoded — button is theme-invariant
   (identical appearance in light mode and dark mode)
   ═══════════════════════════════════════════ */

/* Fixed palette — never touched by light/dark theme variables */
:root {
    --stb-bg:         #070f1a;   /* dark navy background */
    --stb-border:     #d4a843;   /* gold border          */
    --stb-border-hov: #e8c04a;   /* gold hover           */
    --stb-gold:       #e8c04a;   /* node / hat / particle */
    --stb-glow:       rgba(212, 168, 67, 0.5);
}

.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 999;
    /* Vertical rounded rectangle */
    width: 44px;
    height: 74px;
    border-radius: 14px;
    background: var(--stb-bg);
    border: 1.5px solid var(--stb-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Hidden by default — shown via JS when user scrolls down */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.85);
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease,
                border-color 0.3s ease, box-shadow 0.3s ease;
}

.scroll-top--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-top:hover {
    border-color: var(--stb-border-hov);
    box-shadow: 0 8px 32px var(--stb-glow);
    transform: translateY(-4px) scale(1.04);
}

/* ── MLP Convergence (3 → 2 → 1) pointing upward ── */
.scroll-top__mlp {
    width: 24px;
    height: 50px;
    overflow: visible;
}

.mlp-edge {
    stroke: #ffffff;
    stroke-width: 1px;
    stroke-linecap: round;
    opacity: 0.15;
    animation: mlp-signal 1.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.mlp-node {
    fill: var(--stb-gold);
    stroke: #ffffff;
    stroke-width: 1.2px;
    opacity: 0.35;
    animation: mlp-signal 1.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.mlp-hat {
    fill: none;
    stroke: var(--stb-gold);
    stroke-width: 2.4px;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.6;
    animation: hat-pulse 1.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 3px rgba(212,168,67,0.45));
}

/* Particle rising from bottom to top */
.mlp-particle {
    fill: var(--stb-gold);
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: particle-rise 1.8s infinite cubic-bezier(0.42, 0, 0.58, 1);
    filter: drop-shadow(0 0 3px var(--stb-gold));
}

/* Layer delays: bottom (1) fires first, chevron (4) fires last */
.mlp-layer-1  { animation-delay: 0s; }
.mlp-layer-2  { animation-delay: 0.22s; }
.mlp-layer-3  { animation-delay: 0.44s; }
.mlp-layer-4  { animation-delay: 0.64s; }
.mlp-particle { animation-delay: 0.04s; }

@keyframes mlp-signal {
    0%        { opacity: 0.15; transform: scale(1);    filter: brightness(1); }
    15%       { opacity: 1;    transform: scale(1.15); filter: brightness(1.6) drop-shadow(0 0 4px var(--stb-gold)); }
    45%, 100% { opacity: 0.15; transform: scale(1);    filter: brightness(1); }
}

@keyframes hat-pulse {
    0%, 55%   { opacity: 0.6; transform: translateY(0); }
    70%       { opacity: 1;   transform: translateY(-5px);
                filter: brightness(1.9) drop-shadow(0 0 7px var(--stb-gold)); }
    92%, 100% { opacity: 0.6; transform: translateY(0); }
}

@keyframes particle-rise {
    0%   { transform: translateY(0);     opacity: 0; }
    6%   { opacity: 0.95; }
    82%  { opacity: 0.7; }
    100% { transform: translateY(-44px); opacity: 0; }
}

/* Mobile: slightly smaller */
@media (max-width: 768px) {
    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 38px;
        height: 64px;
        border-radius: 12px;
    }
    .scroll-top__mlp {
        width: 20px;
        height: 42px;
    }
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 24px;
}

.footer__left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer__left p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.footer__center {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.footer__social-link {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: color 0.3s, transform 0.3s;
}

.footer__social-link:hover {
    color: var(--gold);
    transform: translateY(-2px);
}

.footer__right {
    text-align: right;
}

.footer__right p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   BLOG PAGE
   ═══════════════════════════════════════════ */
.blog-hero {
    padding: 140px 0 60px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 30% 50%, rgba(15, 5, 107, 0.08), transparent);
    pointer-events: none;
}

.blog-hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 400;
    margin-bottom: 16px;
}

.blog-hero__subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 640px;
    line-height: 1.7;
    margin-bottom: 40px;
}

.blog-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.blog-filter {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    background: none;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.blog-filter:hover {
    border-color: var(--border-hover);
    color: var(--text-secondary);
}

.blog-filter--active {
    background: rgba(212, 168, 67, 0.1);
    border-color: var(--gold);
    color: var(--gold);
}

.blog-grid-section {
    padding: 60px 0 var(--section-pad);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

.blog-card {
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
    transition: border-color 0.4s, background 0.4s, transform 0.4s var(--ease-out), box-shadow 0.4s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--card-shadow);
}

.blog-card--featured {
    grid-column: 1 / -1;
    background: var(--bg-card-featured);
    border-color: var(--border-featured);
}

.blog-card--hidden { display: none; }

.blog-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.blog-card__category {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: var(--gold);
    text-transform: uppercase;
    background: rgba(212, 168, 67, 0.08);
    padding: 4px 10px;
    border-radius: 4px;
}

.blog-card__date {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
}

.blog-card__title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--text-primary);
    transition: color 0.3s;
}

.blog-card:hover .blog-card__title { color: var(--gold-light); }
.blog-card--featured .blog-card__title { font-size: 1.6rem; }

.blog-card__excerpt {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
    flex: 1;
}

.blog-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.blog-card__tags span {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-muted);
    background: var(--tag-bg);
    padding: 5px 11px;
    border-radius: 4px;
    border: 1px solid var(--tag-border);
}

.blog-card__link {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--gold);
    letter-spacing: 0.04em;
    align-self: flex-start;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.blog-card__link:hover {
    color: var(--gold-light);
    transform: translateX(4px);
}

/* Actions row: "Lire l'article" left · YouTube CTA right */
.blog-card__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.blog-card__link--yt {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.73rem;
    opacity: 0.85;
    align-self: auto;
}

.blog-card__link--yt:hover {
    opacity: 1;
    transform: translateX(0) scale(1.03);
}

@media (max-width: 768px) {
    .blog-grid { grid-template-columns: 1fr; }
    .hero { padding-bottom: 160px; }
    .hero__stats { flex-direction: column; gap: 20px; }
    .hero__stat-divider { width: 40px; height: 1px; }
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal--stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal--stagger.reveal--visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.reveal--stagger.reveal--visible > *:nth-child(2) { transition-delay: 0.08s; opacity: 1; transform: translateY(0); }
.reveal--stagger.reveal--visible > *:nth-child(3) { transition-delay: 0.08s; opacity: 1; transform: translateY(0); }
.reveal--stagger.reveal--visible > *:nth-child(4) { transition-delay: 0.16s; opacity: 1; transform: translateY(0); }
.reveal--stagger.reveal--visible > *:nth-child(5) { transition-delay: 0.24s; opacity: 1; transform: translateY(0); }
.reveal--stagger.reveal--visible > *:nth-child(6) { transition-delay: 0.32s; opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════
   GRAIN OVERLAY
   ═══════════════════════════════════════════ */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: var(--grain-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 480px) {
    .hero { padding-bottom: 220px; }
    .hero__scroll { bottom: 20px; }
    .hero__badge { font-size: 0.65rem; padding: 6px 14px; }
    .hero__cta { flex-direction: column; align-items: center; }
    .btn { width: 100%; justify-content: center; }
    .about-strip__text p { font-size: 0.65rem; }
    .footer__inner { flex-direction: column; text-align: center; }
    .footer__right { text-align: center; }
    .footer__left { flex-direction: column; }
}

@media (min-width: 1024px) {
    .projects__grid { grid-template-columns: repeat(2, 1fr); }
    .project-card--featured { grid-column: 1 / -1; }
}

/* ═══════════════════════════════════════════
   FOCUS & ACCESSIBILITY
   ═══════════════════════════════════════════ */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .hero__canvas { display: none; }
}

/* ═══════════════════════════════════════════
   ARTICLE PAGES
   ═══════════════════════════════════════════ */
.article {
    max-width: 740px;
    margin: 0 auto;
    padding: 140px var(--container-pad) var(--section-pad);
}

.article__back {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--gold);
    letter-spacing: 0.04em;
    margin-bottom: 32px;
    transition: color 0.3s;
}

.article__back:hover {
    color: var(--gold-light);
}

.article__header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.article__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.article__category {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: var(--gold);
    text-transform: uppercase;
    background: var(--gold-glow);
    padding: 4px 10px;
    border-radius: 4px;
}

.article__date {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
}

.article__title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.article__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.article__tags span {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-muted);
    background: var(--tag-bg);
    padding: 5px 11px;
    border-radius: 4px;
    border: 1px solid var(--tag-border);
}

/* Article body typography */
.article__body {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-secondary);
}

.article__body h2 {
    font-family: var(--font-display);
    font-size: 1.72rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 48px 0 16px;
}

.article__body h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 32px 0 12px;
}

.article__body p {
    margin-bottom: 1.5em;
}

.article__body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article__body a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article__body a:hover {
    color: var(--gold-light);
}

.article__body blockquote {
    border-left: 3px solid var(--gold);
    padding: 16px 24px;
    margin: 24px 0;
    background: var(--gold-glow);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.article__body code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--tag-bg);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--tag-border);
}

.article__body pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    overflow-x: auto;
    margin: 24px 0;
}

.article__body pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.article__body ul, .article__body ol {
    padding-left: 24px;
    margin-bottom: 1.5em;
}

.article__body li {
    margin-bottom: 0.5em;
}

.article__body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 24px 0;
}

.article__body .math-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 24px;
    margin: 24px 0;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
    text-align: center;
}

/* Article tables — horizontal scroll container */
.article__table-wrap {
    position: relative;
    overflow-x: auto;
    overflow-y: visible;
    margin: 24px 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    /* Smooth momentum scroll on iOS */
    -webkit-overflow-scrolling: touch;
    /* Scrollbar: thin + gold thumb */
    scrollbar-width: thin;
    scrollbar-color: var(--gold) transparent;
}

/* Webkit scrollbar: visible but elegant */
.article__table-wrap::-webkit-scrollbar {
    height: 5px;
}
.article__table-wrap::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 0 0 8px 8px;
}
.article__table-wrap::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}
.article__table-wrap::-webkit-scrollbar-thumb:hover {
    background: var(--gold-light);
}

/* Right-side fade gradient — scroll hint */
.article__table-wrap::after {
    content: '';
    position: sticky;
    right: 0;
    top: 0;
    display: block;
    width: 40px;
    min-height: 100%;
    pointer-events: none;
    background: linear-gradient(to right, transparent, var(--bg-primary) 85%);
    float: right;
    margin-left: -40px;
    border-radius: 0 8px 8px 0;
}

.article__table {
    /* Let table breathe — min-width prevents column compression */
    width: 100%;
    min-width: 540px;
    border-collapse: collapse;
    font-size: 0.92rem;
    line-height: 1.5;
    /* Ensure table stays as a real table layout */
    display: table;
}

.article__table thead {
    background: var(--bg-secondary);
}

.article__table th,
.article__table td {
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    /* No wrapping — cells stay on one line */
    white-space: nowrap;
}

.article__table th {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    position: sticky;
    top: 0;
}

.article__table td {
    color: var(--text-secondary);
}

.article__table tbody tr:hover {
    background: var(--bg-secondary);
}

.article__table tbody tr:last-child td {
    border-bottom: none;
}

/* CV button style */
.btn--cv {
    border-color: var(--gold-dim);
    color: var(--gold);
}
.btn--cv:hover {
    border-color: var(--gold);
    background: var(--gold-glow);
}

/* ═══════════════════════════════════════════
   ARTICLE — RESPONSIVE MOBILE
   ═══════════════════════════════════════════ */

/* Contain all overflow inside article pages */
.page-article body,
.page-article {
    overflow-x: hidden;
}

.article {
    overflow-x: hidden;
    word-break: break-word;
}

/* SVGs: force full fluid width for figure/diagram SVGs */
.article svg,
.article__body svg {
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* MathJax SVGs: reset — do NOT stretch to 100% width */
.article mjx-container svg,
.article__body mjx-container svg,
mjx-container[jax="SVG"] svg {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
}

/* ── MathJax SVG — unified rules ── */
mjx-container {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    caret-color: transparent !important;
    outline: none !important;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

mjx-container[display="true"] {
    display: block;
    overflow-x: auto;
    padding: 6px 0;
}

mjx-container * {
    caret-color: transparent !important;
}

mjx-container:focus,
mjx-container:focus-within {
    outline: none !important;
}

/* Kill assistive MML + cursor elements */
mjx-assistive-mml,
mjx-cursor {
    display: none !important;
}

.MathJax,
.MathJax_Display,
.MJX-TEX {
    overflow-x: auto;
    max-width: 100%;
    caret-color: transparent !important;
    outline: none !important;
}

/* Pre/code blocks */
.article__body pre {
    overflow-x: auto;
    white-space: pre;
}

/* Raw tables not using .article__table-wrap — fallback scroll */
.article__body table:not(.article__table) {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .article {
        padding-top: 100px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .article__meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .article__category {
        white-space: normal;
        word-break: break-word;
    }

    .article__title {
        font-size: clamp(1.55rem, 6vw, 2.2rem);
        line-height: 1.25;
    }

    .article__body {
        font-size: 1rem;
        line-height: 1.8;
    }

    .article__body h2 { font-size: 1.4rem; }
    .article__body h3 { font-size: 1.15rem; }

    .article__body blockquote {
        padding: 12px 16px;
        margin: 16px 0;
    }

    /* Inline SVG wrappers that might add fixed padding */
    .article__body figure,
    .article__body .svg-wrap,
    .article__body div[style] {
        max-width: 100% !important;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .article {
        padding-top: 88px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .article__title {
        font-size: clamp(1.35rem, 7vw, 1.8rem);
    }

    /* Webinaire badge wrapping */
    .webinaire-badge {
        flex-wrap: wrap;
        font-size: 0.7rem;
        padding: 6px 12px;
    }

    .article__body {
        font-size: 0.97rem;
    }
}

/* ── Article contact card ── */
.article-contact {
    margin-top: 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 24px 28px;
    background: var(--bg-secondary);
}
.article-contact__name {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 18px;
}
.article-contact__links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.article-contact__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s, gap 0.2s;
}
.article-contact__link:hover {
    color: var(--gold-light);
    gap: 14px;
}
/* ═══════════════════════════════════════════════════════════════
   HIGHLIGHT.JS — Light Theme Overrides
   vs2015 (dark theme) uses near-white colors (#dcdcdc, #9cdcfe, etc.)
   that are invisible on light backgrounds. These overrides remap
   every token to high-contrast equivalents matching VS Code Light+.
   Scoped to [data-theme="light"] so dark mode is untouched.
   ═══════════════════════════════════════════════════════════════ */
[data-theme="light"] .hljs {
    background: var(--bg-secondary);
    color: #1e1e1e;                  /* default identifier text */
}

/* Keywords: if, def, class, import, return, from, as, True, False … */
[data-theme="light"] .hljs-keyword,
[data-theme="light"] .hljs-selector-tag,
[data-theme="light"] .hljs-tag {
    color: #0000ff;
    font-weight: 500;
}

/* Function / class / method names */
[data-theme="light"] .hljs-title,
[data-theme="light"] .hljs-title.class_,
[data-theme="light"] .hljs-title.function_,
[data-theme="light"] .hljs-title.function_.invoke__,
[data-theme="light"] .hljs-section {
    color: #795e26;                  /* VS Code light: brownish gold */
}

/* String literals */
[data-theme="light"] .hljs-string,
[data-theme="light"] .hljs-template-string,
[data-theme="light"] .hljs-addition,
[data-theme="light"] .hljs-attr {
    color: #a31515;                  /* dark red */
}

/* Numbers */
[data-theme="light"] .hljs-number,
[data-theme="light"] .hljs-literal {
    color: #098658;                  /* dark green */
}

/* Comments */
[data-theme="light"] .hljs-comment {
    color: #008000;
    font-style: italic;
}

/* Variable / parameter names */
[data-theme="light"] .hljs-variable,
[data-theme="light"] .hljs-variable.language_,
[data-theme="light"] .hljs-params,
[data-theme="light"] .hljs-subst {
    color: #001080;                  /* dark navy — replaces #9cdcfe light blue */
}

/* Built-ins: self, super, True, False, None, print, len … */
[data-theme="light"] .hljs-built_in,
[data-theme="light"] .hljs-class,
[data-theme="light"] .hljs-name {
    color: #0070c1;                  /* medium blue */
}

/* Types / annotations */
[data-theme="light"] .hljs-type,
[data-theme="light"] .hljs-meta {
    color: #267f99;                  /* teal — stays readable */
}

/* Operators, punctuation */
[data-theme="light"] .hljs-operator,
[data-theme="light"] .hljs-punctuation {
    color: #000000;
}

/* Function call highlight (for some grammars) */
[data-theme="light"] .hljs-function {
    color: #1e1e1e;
}

/* Deletion / diff */
[data-theme="light"] .hljs-deletion {
    color: #9a1212;
}

/* Emphasis */
[data-theme="light"] .hljs-emphasis   { font-style: italic; }
[data-theme="light"] .hljs-strong     { font-weight: 700; }

/* ═══════════════════════════════════════════════════════════════ */

.article-contact__link svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   BLOG UTILITY CLASSES — shared across all articles
   Used by: claude-code-token-optimization, sota-*, and any
   future article that needs callouts, badges, paper blocks, etc.
   ═══════════════════════════════════════════════════════════════ */

/* ── Language hint banner ── */
.lang-hint {
    background: rgba(201,168,76,0.08);
    border: 1px solid rgba(201,168,76,0.25);
    border-radius: 8px;
    padding: 0.75rem 1.2rem;
    margin-bottom: 2rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    text-align: center;
}
.lang-hint strong { color: var(--gold); }

/* ── Callout blocks ── */
.callout {
    background: rgba(201,168,76,0.07);
    border-left: 3px solid var(--gold);
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.2rem;
    margin: 1.5rem 0;
}
.callout p   { margin: 0; font-size: 0.95rem; }
.callout--warn    { background: rgba(251,191,36,0.07); border-color: #fbbf24; }
.callout--success { background: rgba(67,217,173,0.07); border-color: #43d9ad; }

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 0.18em 0.55em;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono);
}
.badge--green  { background: rgba(67,217,173,0.12);  color: #43d9ad; }
.badge--amber  { background: rgba(251,191,36,0.12);  color: #fbbf24; }
.badge--red    { background: rgba(239,68,68,0.12);   color: #f87171; }
.badge--gold   { background: rgba(201,168,76,0.12);  color: var(--gold); }
.badge--blue   { background: rgba(96,165,250,0.12);  color: #60a5fa; }

/* ── Stat grid (KPI cards) ── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}
.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
}
.stat-card__value {
    font-family: var(--font-mono);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
    display: block;
}
.stat-card__value--green { color: #43d9ad; }
.stat-card__value--amber { color: #fbbf24; }
.stat-card__label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.4rem;
    line-height: 1.35;
}

/* ── Budget bar ── */
.budget-bar {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.2rem 1.5rem;
    margin: 1.5rem 0;
}
.budget-bar__header {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}
.budget-bar__header strong { color: var(--text-primary); }
.bar-track { height: 8px; background: var(--border); border-radius: 100px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--gold), #fbbf24); }
.budget-bar__note { font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.5rem; }

/* ── Paper block (SOTA ArXiv digest articles) ── */
.paper-block {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    background: var(--bg-secondary);
    transition: border-color 0.2s;
}
.paper-block:hover { border-color: var(--gold); }
.paper-block__header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.paper-block__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    line-height: 1.4;
}
.paper-block__title a {
    color: var(--text-primary);
    text-decoration: none;
}
.paper-block__title a:hover { color: var(--gold); }
.paper-block__authors {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem;
}
.paper-block__summary {
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0 0 1rem;
}
.paper-block__footer {
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}
.paper-block__link {
    font-size: 0.85rem;
    color: var(--gold);
    text-decoration: none;
    font-family: var(--font-mono);
}
.paper-block__link:hover { text-decoration: underline; }

/* Mathematical method block inside paper-block */
.paper-block__method {
    background: var(--bg-secondary);
    border-left: 3px solid var(--gold);
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
    font-size: 0.88rem;
    line-height: 1.6;
}
.method-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-dim);
    margin-bottom: 0.35rem;
}

/* Resources / HuggingFace links row */
.paper-block__resources {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0 0;
    align-items: center;
}
.hf-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy);
    background: var(--gold-glow);
    border: 1px solid var(--gold);
    border-radius: 20px;
    padding: 0.2rem 0.65rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.hf-link:hover {
    background: var(--gold);
    color: #fff;
}
[data-theme="dark"] .hf-link {
    color: var(--gold);
    border-color: var(--gold-dim);
}
[data-theme="dark"] .hf-link:hover {
    background: var(--gold);
    color: var(--navy-deep);
}

/* Wolof applicability score */
.paper-block__wolof-score {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.5rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 0.6rem;
}
.paper-block__wolof-score .score-stars {
    color: var(--gold);
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.paper-block__wolof-score .score-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    white-space: nowrap;
}
.paper-block__wolof-score span:last-child {
    flex-basis: 100%;
}
@media (min-width: 480px) {
    .paper-block__wolof-score span:last-child {
        flex-basis: auto;
    }
}

/* Model of the week card */
.model-of-the-week {
    border: 2px solid var(--gold);
    border-radius: 14px;
    background: var(--bg-card-featured);
    padding: 1.5rem;
    margin: 2rem 0;
}
.model-of-the-week__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.model-of-the-week__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.model-badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--gold);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}
.model-of-the-week__specs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}
.model-spec {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
}
.model-spec__key {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    font-weight: 600;
}
.model-spec__value {
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.15rem;
}

/* ── Responsive overrides ── */
@media (max-width: 600px) {
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .stat-grid .stat-card:last-child { grid-column: span 2; }
}
