@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
    --gold: #C9A962;
    --gold-light: #E8D5A3;
    --gold-muted: rgba(201, 169, 98, 0.14);
    --gold-glow: rgba(201, 169, 98, 0.35);
    --cyan: #22D3EE;
    --teal: #14B8A6;
    --bg-deep: #08090d;
    --bg-top: #0c0e14;
    --bg-bottom: #12151c;
    --bg-elevated: rgba(255, 255, 255, 0.04);
    --bg-glass: rgba(255, 255, 255, 0.06);
    --bg-card: rgba(255, 255, 255, 0.03);
    --text: #f4f4f5;
    --text-secondary: rgba(255, 255, 255, 0.68);
    --text-tertiary: rgba(255, 255, 255, 0.42);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
    --shadow-card: 0 16px 48px rgba(0, 0, 0, 0.32);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --font: 'DM Sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --container: 1180px;
    --header-h: 72px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.25, 0.64, 1);
    --transition: 240ms var(--ease-out);
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-deep: #f6f4ef;
        --bg-top: #faf8f4;
        --bg-bottom: #ede9e1;
        --bg-elevated: rgba(255, 255, 255, 0.78);
        --bg-glass: rgba(255, 255, 255, 0.62);
        --bg-card: rgba(255, 255, 255, 0.72);
        --text: #18181b;
        --text-secondary: #3f3f46;
        --text-tertiary: #71717a;
        --border: rgba(0, 0, 0, 0.08);
        --border-hover: rgba(0, 0, 0, 0.14);
        --shadow: 0 32px 80px rgba(0, 0, 0, 0.08);
        --shadow-card: 0 16px 48px rgba(0, 0, 0, 0.06);
        --gold-muted: rgba(201, 169, 98, 0.18);
        --gold-glow: rgba(201, 169, 98, 0.22);
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font);
    color: var(--text);
    line-height: 1.6;
    min-height: 100dvh;
    background: linear-gradient(165deg, var(--bg-top) 0%, var(--bg-bottom) 55%, var(--bg-deep) 100%);
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container {
    width: min(100% - 2.5rem, var(--container));
    margin-inline: auto;
}

/* ===== Ambient ===== */
.ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    animation: drift 24s ease-in-out infinite;
}

.ambient-orb-1 {
    width: 50vw; height: 50vw; max-width: 640px; max-height: 640px;
    top: -15%; right: -5%;
    background: radial-gradient(circle, var(--gold-glow), transparent 68%);
}

.ambient-orb-2 {
    width: 38vw; height: 38vw; max-width: 480px; max-height: 480px;
    bottom: 5%; left: -8%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.14), transparent 70%);
    animation-delay: -9s;
}

.ambient-orb-3 {
    width: 28vw; height: 28vw; max-width: 360px; max-height: 360px;
    top: 42%; left: 38%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1), transparent 72%);
    animation-delay: -16s;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(2%, -3%) scale(1.04); }
    66% { transform: translate(-2%, 2%) scale(0.97); }
}

/* Matrix canvas behind hero */
.matrix-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.35;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 75%);
}

/* ===== Header ===== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--header-h);
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    display: flex;
    align-items: center;
    transition: background var(--transition), border-color var(--transition), backdrop-filter var(--transition);
}

.site-header.is-scrolled {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold), #a8863f);
    display: grid;
    place-items: center;
    box-shadow: 0 4px 16px var(--gold-glow);
}

.logo-mark svg { width: 18px; height: 18px; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.nav-links a {
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition), background var(--transition);
}

.nav-links a:hover {
    color: var(--text);
    background: var(--bg-elevated);
}

.nav-cta {
    margin-left: 0.5rem;
    padding: 0.5rem 1rem !important;
    background: var(--gold-muted) !important;
    color: var(--gold) !important;
    border: 1px solid rgba(201, 169, 98, 0.25);
}

.nav-cta:hover {
    background: rgba(201, 169, 98, 0.22) !important;
}

.lang-switch {
    margin-left: 0.25rem;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: color var(--transition), background var(--transition), border-color var(--transition);
    line-height: 1;
}

.lang-switch:hover {
    color: var(--gold);
    background: var(--gold-muted);
    border-color: rgba(201, 169, 98, 0.28);
}

.mobile-toggle {
    display: none;
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-glass);
    place-items: center;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    z-index: 1;
    padding: calc(var(--header-h) + 4.5rem) 0 5rem;
    min-height: 92dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3.5rem;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem 0.375rem 0.625rem;
    border-radius: 999px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(12px);
}

.eyebrow-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 12px var(--gold-glow);
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.hero h1 {
    font-size: clamp(2.75rem, 5.5vw, 4.25rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 1.25rem;
}

.hero h1 .accent {
    background: linear-gradient(135deg, var(--gold-light), var(--gold) 45%, #a8863f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 34rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.35rem;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 600;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: linear-gradient(135deg, var(--gold), #a8863f);
    color: #1a1510;
    box-shadow: 0 8px 28px var(--gold-glow);
}

.btn-primary:hover {
    box-shadow: 0 12px 36px var(--gold-glow);
    transform: translateY(-1px);
}

.btn-ghost {
    border: 1px solid var(--border);
    background: var(--bg-glass);
    color: var(--text);
    backdrop-filter: blur(12px);
}

.btn-ghost:hover {
    border-color: var(--border-hover);
    background: var(--bg-elevated);
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.stat-item strong {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
}

.stat-item span {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Matrix visual */
.matrix-visual {
    position: relative;
    width: min(100%, 420px);
    aspect-ratio: 1;
    max-width: 420px;
    margin-inline: auto;
    isolation: isolate;
}

.matrix-orbit {
    position: absolute;
    inset: 0;
    transform-origin: 50% 50%;
    will-change: transform;
}

.matrix-orbit.is-entering {
    animation: matrixEnter 1.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.matrix-orbit.is-spinning {
    animation: matrixSpin 108s linear infinite;
}

.matrix-visual.is-motion-active:hover .matrix-orbit.is-spinning,
.matrix-visual.is-motion-active:hover .matrix-orbit.is-spinning .matrix-node-face {
    animation-play-state: paused;
}

@keyframes matrixEnter {
    0% {
        transform: rotate(-150deg) scale(0.05);
        opacity: 0.35;
    }
    100% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
}

@keyframes matrixSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes matrixCounterSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

@keyframes matrixCounterEnter {
    0% {
        transform: rotate(150deg);
        opacity: 0;
    }
    100% {
        transform: rotate(0deg);
        opacity: 1;
    }
}

@keyframes matrixHubIn {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.matrix-visual.is-motion-active .matrix-hub {
    animation: matrixHubIn 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

.matrix-spokes {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.matrix-orbit-ring {
    fill: none;
    stroke: var(--border);
    stroke-width: 0.6;
    stroke-dasharray: 3 4;
    opacity: 0.9;
}

.matrix-spoke {
    stroke: var(--border);
    stroke-width: 0.35;
    opacity: 0.45;
}

.matrix-hub {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5.5rem;
    height: 5.5rem;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(16px);
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
    box-shadow: var(--shadow-card);
    z-index: 1;
}

.matrix-hub strong {
    display: block;
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    line-height: 1.2;
}

.matrix-hub span {
    display: block;
    font-size: 1.625rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-top: 0.1rem;
}

.matrix-node {
    position: absolute;
    left: var(--mx);
    top: var(--my);
    width: 3.25rem;
    height: 3.25rem;
    transform: translate(-50%, -50%);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.96);
    border: 1.5px solid var(--border);
    backdrop-filter: blur(12px);
    display: block;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    overflow: visible;
    padding: 0.3rem;
    z-index: 2;
}

.matrix-node-face {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    transform-origin: 50% 50%;
}

.matrix-orbit.is-entering .matrix-node-face {
    animation: matrixCounterEnter 1.55s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(0.08s + var(--node-i, 0) * 0.05s);
}

.matrix-orbit.is-spinning .matrix-node-face {
    animation: matrixCounterSpin 108s linear infinite;
}

.matrix-node-featured {
    width: 3.65rem;
    height: 3.65rem;
    border-color: color-mix(in srgb, var(--node-accent, var(--gold)) 35%, var(--border));
    box-shadow:
        0 0 0 3px color-mix(in srgb, var(--node-accent, var(--gold)) 12%, transparent),
        0 12px 32px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
    .matrix-node {
        background: rgba(22, 25, 32, 0.96);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    }
}

.matrix-node:hover {
    transform: translate(-50%, -50%) scale(1.1);
    border-color: var(--border-hover);
    z-index: 4;
}

.matrix-node.is-active {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-muted), var(--shadow-card);
}

.matrix-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 11px;
    display: block;
}

.matrix-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
}

.matrix-node:hover .matrix-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== Sections ===== */
section { position: relative; z-index: 1; }

.section-head {
    margin-bottom: 2.5rem;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.section-head h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.section-head p {
    color: var(--text-secondary);
    max-width: 36rem;
}

/* Filters */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid transparent;
    transition: all var(--transition);
}

.filter-btn:hover {
    color: var(--text);
    background: var(--bg-elevated);
}

.filter-btn.is-active {
    color: var(--gold);
    background: var(--gold-muted);
    border-color: rgba(201, 169, 98, 0.28);
}

.filter-count {
    margin-left: 0.35rem;
    opacity: 0.65;
    font-size: 0.8em;
}

/* Project grid — bento */
.projects-section {
    padding: 2rem 0 6rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.25rem;
}

.project-card {
    grid-column: span 4;
    position: relative;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(16px);
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, var(--card-accent, var(--gold-muted)), transparent 65%);
    opacity: 0.6;
    pointer-events: none;
}

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

.project-card.featured {
    grid-column: span 6;
    min-height: 320px;
}

.project-card.is-hidden {
    display: none;
}

.card-inner {
    position: relative;
    z-index: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.card-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    flex-shrink: 0;
    overflow: hidden;
}

.card-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    justify-content: flex-end;
}

.badge {
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-live {
    background: rgba(20, 184, 166, 0.15);
    color: #2dd4bf;
}

.badge-dev {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.badge-cat {
    background: var(--bg-elevated);
    color: var(--text-tertiary);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 0.5rem;
}

.card-tagline {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--card-accent-color, var(--gold));
    margin-bottom: 0.75rem;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    flex: 1;
    margin-bottom: 1.25rem;
}

.card-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1.25rem;
}

.stack-tag {
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    background: var(--bg-elevated);
    color: var(--text-tertiary);
    border: 1px solid var(--border);
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    transition: all var(--transition);
}

.card-link-primary {
    background: var(--card-accent, var(--gold-muted));
    color: var(--card-accent-color, var(--gold));
    border: 1px solid color-mix(in srgb, var(--card-accent-color, var(--gold)) 30%, transparent);
}

.card-link-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.card-link-secondary {
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.card-link-secondary:hover {
    color: var(--text);
    border-color: var(--border-hover);
}

.card-link svg { width: 14px; height: 14px; }

.card-qrcode {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    border: 1px solid var(--border);
}

.card-qrcode img {
    width: 88px;
    height: 88px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #fff;
}

.card-qrcode-hint {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    line-height: 1.5;
}

.card-link-muted {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

/* Ecosystem strip */
.ecosystem {
    padding: 4rem 0 5rem;
    border-top: 1px solid var(--border);
}

.eco-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.eco-card {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    text-align: center;
    transition: border-color var(--transition), transform var(--transition);
}

.eco-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.eco-icon {
    width: 44px; height: 44px;
    margin: 0 auto 1rem;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--gold-muted);
    color: var(--gold);
}

.eco-icon svg { width: 22px; height: 22px; }

.eco-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.eco-card p {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

/* Footer */
.site-footer {
    position: relative;
    z-index: 1;
    padding: 3rem 0 2.5rem;
}

.footer-panel {
    padding: 1.5rem 1.25rem 1rem;
    border-radius: var(--radius-lg);
    background: var(--bg-glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(16px);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.footer-beian {
    display: flex;
    justify-content: center;
    padding-top: 0.85rem;
}

.beian-icp {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color var(--transition);
}

.beian-icp:hover {
    color: var(--gold);
}

.footer-brand {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.footer-meta {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.footer-links {
    display: flex;
    gap: 1.25rem;
    list-style: none;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.footer-links a:hover { color: var(--gold); }

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
}

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

body.nav-open { overflow: hidden; }

/* Mobile nav */
@media (max-width: 900px) {
    .container { width: min(100% - 1.5rem, var(--container)); }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .matrix-visual { max-width: min(100%, 340px); }

    .project-card,
    .project-card.featured {
        grid-column: span 6;
    }

    .eco-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding-bottom: 0.35rem;
        margin-inline: -0.15rem;
        padding-inline: 0.15rem;
    }

    .filter-btn {
        flex-shrink: 0;
        scroll-snap-align: start;
    }
}

@media (max-width: 640px) {
    .container { width: min(100% - 1.25rem, var(--container)); }

    .mobile-toggle { display: grid; }

    .nav {
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        max-height: calc(100dvh - var(--header-h));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1rem 1.25rem max(1.5rem, env(safe-area-inset-bottom));
        background: var(--bg-glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        transform: translateY(-110%);
        opacity: 0;
        pointer-events: none;
        transition: transform var(--transition), opacity var(--transition);
    }

    .nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links a { padding: 0.75rem 1rem; }

    .nav-cta { margin-left: 0; }

    .lang-switch {
        margin-left: 0;
        width: 100%;
        padding: 0.75rem 1rem;
        text-align: center;
    }

    .project-card,
    .project-card.featured {
        grid-column: span 12;
    }

    .hero {
        padding-top: calc(var(--header-h) + 2rem + env(safe-area-inset-top, 0px));
        min-height: auto;
        padding-bottom: 3.5rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn { width: 100%; }

    .hero-stats {
        gap: 1rem;
        flex-direction: column;
    }

    .stat-item {
        display: flex;
        align-items: baseline;
        gap: 0.75rem;
    }

    .stat-item strong { font-size: 1.5rem; }

    .matrix-visual { max-width: min(100%, 300px); }

    .eco-grid { grid-template-columns: 1fr; }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 0.75rem 1rem;
    }

    .footer-panel { padding: 1.25rem 1rem 0.85rem; }

    .site-footer { padding-bottom: max(2.5rem, env(safe-area-inset-bottom)); }

    .card-actions {
        flex-direction: column;
    }

    .card-link {
        width: 100%;
        justify-content: center;
    }

    .card-top {
        flex-wrap: wrap;
    }

    .card-badges {
        justify-content: flex-start;
    }
}

@media (max-width: 400px) {
    .logo { font-size: 0.95rem; }
    .eyebrow { font-size: 0.75rem; margin-bottom: 1rem; }
    .section-head h2 { font-size: clamp(1.45rem, 6.5vw, 1.85rem); }
    .project-grid { gap: 1rem; }
    .card-inner { padding: 1.25rem; }
}
