/* ============================================
   LAB MINTS — 2030 "Lab Console" Theme
   Single-viewport, glassmorphism, animated mesh
   ============================================ */

/* === ANIMATABLE CUSTOM PROPERTIES === */
@property --gradient-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
@property --mesh-x1 { syntax: '<percentage>'; initial-value: 20%; inherits: false; }
@property --mesh-y1 { syntax: '<percentage>'; initial-value: 30%; inherits: false; }
@property --mesh-x2 { syntax: '<percentage>'; initial-value: 70%; inherits: false; }
@property --mesh-y2 { syntax: '<percentage>'; initial-value: 60%; inherits: false; }

/* === TOKENS === */
:root {
    /* Core palette */
    --mint: #00ffa3;
    --mint-dim: #00cc82;
    --mint-glow: rgba(0, 255, 163, 0.15);
    --purple: #7b61ff;
    --purple-glow: rgba(123, 97, 255, 0.15);

    /* Backgrounds */
    --bg-deep: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;
    --bg-surface: #16161f;

    /* Text */
    --text-primary: #e8e8ed;
    --text-secondary: #8a8a9a;
    --text-dim: #55556a;

    /* Borders */
    --border: #1e1e2e;
    --border-glow: rgba(0, 255, 163, 0.3);

    /* Glass */
    --glass-bg: rgba(18, 18, 26, 0.55);
    --glass-bg-hover: rgba(26, 26, 37, 0.65);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-blur: 20px;

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Radii */
    --radius: 12px;
    --radius-sm: 8px;

    /* Layout */
    --header-h: 48px;
    --footer-h: 32px;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--mint); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--mint-dim); }
img { max-width: 100%; height: auto; display: block; }

/* === HOMEPAGE VIEWPORT LOCK === */
body.home {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
body.home.admin-bar {
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
}
/* Block theme wrapper — must chain flex through .wp-site-blocks */
body.home > .wp-site-blocks {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* === ANIMATED MESH GRADIENT BACKGROUND === */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at var(--mesh-x1) var(--mesh-y1),
            rgba(0, 255, 163, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse 70% 50% at var(--mesh-x2) var(--mesh-y2),
            rgba(123, 97, 255, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 20%,
            rgba(0, 255, 163, 0.03) 0%, transparent 40%);
    animation: meshShift 20s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}
@keyframes meshShift {
    0%   { --mesh-x1: 20%; --mesh-y1: 30%; --mesh-x2: 70%; --mesh-y2: 60%; }
    33%  { --mesh-x1: 50%; --mesh-y1: 20%; --mesh-x2: 30%; --mesh-y2: 80%; }
    66%  { --mesh-x1: 80%; --mesh-y1: 50%; --mesh-x2: 20%; --mesh-y2: 40%; }
    100% { --mesh-x1: 30%; --mesh-y1: 70%; --mesh-x2: 60%; --mesh-y2: 20%; }
}

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

/* === HEADER — 48px GLASS BAR === */
.site-header {
    position: relative;
    z-index: 100;
    height: var(--header-h);
    flex-shrink: 0;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
}
.header-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}
.site-logo:hover { color: var(--text-primary); }
.logo-flask {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 8px var(--mint));
}
.logo-accent { color: var(--mint); }
.site-nav {
    display: flex;
    gap: 4px;
}
.nav-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
    color: var(--mint);
    background: var(--mint-glow);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: 0.3s;
}

/* === MAIN === */
.site-main {
    position: relative;
    z-index: 1;
}
body.home .site-main {
    flex: 1 !important;
    min-height: 0 !important;
    display: flex !important;
    overflow: hidden;
}
/* Override WordPress block layout classes on front page */
body.home .site-main.is-layout-flow {
    display: flex !important;
}
body:not(.home) .site-main {
    min-height: calc(100vh - var(--header-h) - 80px);
}

/* === FRONT PAGE CONTENT — SPLIT LAYOUT === */
.front-page-content {
    flex: 1;
    display: grid;
    grid-template-columns: 38% 62%;
    gap: 16px;
    padding: 16px;
    min-height: 0;
    position: relative;
    --mouse-x: 50%;
    --mouse-y: 50%;
}

/* Mouse cursor glow */
.front-page-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y),
        rgba(0, 255, 163, 0.04),
        transparent 60%
    );
    pointer-events: none;
    z-index: 0;
    transition: background 0.1s;
}

/* === HERO PANEL — LEFT SIDE GLASS === */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    position: relative;
    z-index: 1;
    overflow: hidden;
}
.hero-content {
    position: relative;
    z-index: 1;
}
.hero-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--mint);
    background: var(--mint-glow);
    display: inline-block;
    padding: 4px 14px;
    border-radius: 100px;
    border: 1px solid rgba(0, 255, 163, 0.2);
    margin-bottom: 20px;
}
.hero-title {
    font-size: clamp(1.8rem, 3.2vw, 2.8rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}
.typed-text {
    color: var(--mint);
    text-shadow:
        0 0 10px rgba(0, 255, 163, 0.5),
        0 0 40px rgba(0, 255, 163, 0.15);
}
.cursor {
    color: var(--mint);
    animation: blink 1s step-end infinite;
    font-weight: 300;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-sub {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 450px;
    margin-bottom: 28px;
    line-height: 1.5;
}
.hero-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.stat-num {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}
.stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-dim);
}
.stat-dot.active {
    background: var(--mint);
    box-shadow: 0 0 12px var(--mint);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 8px var(--mint); }
    50% { box-shadow: 0 0 20px var(--mint), 0 0 40px rgba(0, 255, 163, 0.3); }
}

/* === PROJECTS PANEL — RIGHT SIDE === */
.projects-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
    z-index: 1;
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-shrink: 0;
    padding: 0 4px;
}
.section-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.section-marker { color: var(--mint); }
.section-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

/* === PROJECT GRID — 3-COLUMN, FILL HEIGHT === */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    flex: 1;
    min-height: 0;
}

/* === PROJECT CARD — GLASSMORPHISM === */
.project-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}
.project-card:hover {
    border-color: rgba(0, 255, 163, 0.2);
    background: var(--glass-bg-hover);
    box-shadow:
        0 0 40px rgba(0, 255, 163, 0.06),
        inset 0 0 40px rgba(0, 255, 163, 0.02);
}

/* Animated gradient border on hover */
.project-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    padding: 1px;
    background: conic-gradient(
        from var(--gradient-angle),
        transparent 0%,
        var(--mint) 10%,
        var(--purple) 20%,
        transparent 30%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
    animation: borderRotate 4s linear infinite;
    pointer-events: none;
}
.project-card:hover::before { opacity: 1; }

@keyframes borderRotate {
    to { --gradient-angle: 360deg; }
}

/* Hide card images on front page */
.front-page-content .card-image { display: none; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px 0;
}
.card-number {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}
.card-status {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.status-active { color: var(--mint); background: var(--mint-glow); }
.status-experimental { color: var(--purple); background: var(--purple-glow); }
.status-brewing { color: #ffb800; background: rgba(255, 184, 0, 0.15); }
.status-archived { color: var(--text-dim); background: rgba(85, 85, 106, 0.15); }

.card-body {
    padding: 12px 16px;
    flex: 1;
}
.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.card-title a { color: var(--text-primary); }
.card-title a:hover { color: var(--mint); }
.card-excerpt {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-type { margin-bottom: 6px; }
.type-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--purple);
    background: var(--purple-glow);
    padding: 2px 8px;
    border-radius: 100px;
    margin-right: 4px;
}
.card-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 52px;
    overflow: hidden;
}
.tech-tag {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
}
.card-footer {
    display: flex;
    gap: 12px;
    padding: 10px 16px 14px;
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
}
.card-link {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
}

/* Card image styles — used on archive/single, hidden on front page */
.card-image {
    margin: 12px 16px 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 16/9;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.project-card:hover .card-image img { transform: scale(1.03); }
.card-image-placeholder {
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
}
.placeholder-art {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.placeholder-art span {
    font-family: var(--font-mono);
    font-size: 2rem;
    color: var(--text-dim);
    opacity: 0.5;
}

/* === NO PROJECTS STATE === */
.no-projects {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}
.empty-flask {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.3;
}

/* === FOOTER — 32px STATUS BAR === */
.site-footer {
    position: relative;
    z-index: 1;
    height: var(--footer-h);
    flex-shrink: 0;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--glass-border);
}
body:not(.home) .site-footer {
    height: auto;
}
.footer-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.footer-lab-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
}
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 8px var(--mint);
    animation: pulse 2s ease-in-out infinite;
}
.footer-copy {
    font-size: 0.7rem;
    color: var(--text-dim);
}

/* ============================================
   NON-FRONT-PAGE STYLES (archive, single, etc.)
   ============================================ */

/* === ARCHIVE HEADER === */
.archive-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px 40px;
}
.archive-title {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.archive-desc {
    color: var(--text-secondary);
    max-width: 600px;
}

/* Archive/non-homepage project grid — scrollable, wider cards */
body:not(.home) .projects-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 80px;
}
body:not(.home) .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}
body:not(.home) .project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}
body:not(.home) .project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
}
body:not(.home) .project-card:hover {
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 40px rgba(0, 255, 163, 0.08);
}
body:not(.home) .card-image { display: flex; }
body:not(.home) .card-header { padding: 16px 20px 0; }
body:not(.home) .card-body { padding: 16px 20px; }
body:not(.home) .card-title { font-size: 1.15rem; }
body:not(.home) .card-footer { padding: 12px 20px 16px; gap: 16px; }

/* === SINGLE PROJECT === */
.project-single { max-width: 900px; margin: 0 auto; padding: 40px 24px 80px; }
.project-meta-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.project-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
}
.project-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 12px;
}
.project-excerpt {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}
.project-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: var(--mint);
    color: var(--bg-deep);
}
.btn-primary:hover {
    background: var(--mint-dim);
    color: var(--bg-deep);
    box-shadow: 0 4px 20px rgba(0, 255, 163, 0.3);
}
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--mint);
    color: var(--mint);
}
.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.project-featured-image {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid var(--border);
}
.project-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-secondary);
}
.project-content h2, .project-content h3 {
    color: var(--text-primary);
    margin: 2em 0 0.75em;
    font-weight: 700;
}
.project-content h2 { font-size: 1.5rem; }
.project-content h3 { font-size: 1.2rem; }
.project-content p { margin-bottom: 1.25em; }
.project-content code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--bg-surface);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
}
.project-content pre {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    overflow-x: auto;
    margin: 1.5em 0;
}
.project-content pre code {
    background: none;
    border: none;
    padding: 0;
}
.project-content a {
    color: var(--mint);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.project-content img {
    border-radius: var(--radius-sm);
    margin: 1.5em 0;
}
.project-content ul, .project-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.25em;
}
.project-content li { margin-bottom: 0.5em; }
.project-nav {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.back-to-lab {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}
.pagination a, .pagination span {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.pagination .current {
    background: var(--mint-glow);
    border-color: var(--mint);
    color: var(--mint);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    body::before { animation: none; }
    .project-card::before { animation: none; }
    .stat-dot.active { animation: none; }
    .status-dot { animation: none; }
    .cursor { animation: none; opacity: 1; }
}

/* Tablet (769–1024px) */
@media (max-width: 1024px) {
    .front-page-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    .hero {
        padding: 20px 24px;
    }
    .hero-title { font-size: 1.8rem; }
    .hero-sub { font-size: 0.85rem; margin-bottom: 16px; }
    .hero-stats { gap: 16px; }
    .project-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
    .site-nav { display: none; }
    .site-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-bottom: 1px solid var(--glass-border);
        padding: 16px 24px;
        gap: 4px;
        z-index: 200;
    }
    .nav-toggle { display: flex; }

    .front-page-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        gap: 8px;
        padding: 8px;
    }
    .hero {
        padding: 16px 20px;
    }
    .hero-badge { display: none; }
    .hero-title { font-size: 1.5rem; margin-bottom: 8px; }
    .hero-sub { font-size: 0.8rem; margin-bottom: 10px; }
    .hero-stats { gap: 12px; }
    .stat { font-size: 0.7rem; }
    .stat-num { font-size: 1rem; }

    .projects-panel { min-height: 0; overflow: hidden; }
    .panel-header { padding: 4px 0; margin-bottom: 8px; }
    .section-title { font-size: 0.7rem; }

    .project-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 8px;
        padding-bottom: 4px;
    }
    .project-card {
        min-width: 260px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    /* Archive/single mobile */
    body:not(.home) .project-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
    .project-actions { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
}

/* Small mobile (max 400px) */
@media (max-width: 400px) {
    .hero-sub { display: none; }
    .hero-title { font-size: 1.3rem; }
    .project-card { min-width: 220px; }
    .card-excerpt { display: none; }
    body:not(.home) .project-grid { grid-template-columns: 1fr; gap: 16px; }
}
