:root {
    --bg: #111317;
    --bg-lowest: #0c0e12;
    --surface: #1a1c20;
    --surface-container: #1e2024;
    --surface-high: #282a2e;
    --surface-highest: #333539;
    --on-surface: #e2e2e8;
    --on-surface-variant: #b9cacb;
    --outline-variant: #3b494b;
    --cyan: #00dbe9;
    --cyan-bright: #00f0ff;
    --cyan-pale: #dbfcff;
    --lime: #c3f400;
    --lime-dim: #abd600;
    --purple: #d1bcff;
    --purple-bright: #7213ff;
    --font-display: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --gutter: 24px;
    --container-max: 1240px;
    --header-h: 80px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
    margin: 0;
    background: var(--bg);
    color: var(--on-surface);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; color: var(--on-surface); }
p { margin: 0; }

.shell { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--gutter); }
section[id] { scroll-margin-top: var(--header-h); }

.skip-link {
    position: absolute; top: -100px; left: 16px; z-index: 100;
    background: var(--cyan-bright); color: #00363a; padding: 10px 18px;
    border-radius: 6px; font-family: var(--font-mono); font-weight: 600;
    transition: top .2s ease;
}
.skip-link:focus { top: 16px; }

/* Background shader + glow */
.bg-shader { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; background: var(--bg-lowest); }
.bg-glow {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(600px 600px at 15% 10%, rgba(0, 219, 233, 0.10), transparent 60%),
        radial-gradient(500px 500px at 90% 60%, rgba(114, 19, 255, 0.10), transparent 60%);
}

/* Glassmorphism */
.glass {
    background: rgba(22, 25, 30, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.glass-hover { transition: background .3s ease, border-color .3s ease, box-shadow .3s ease, transform .3s ease; }
.glass-hover:hover {
    background: rgba(30, 34, 40, 0.85);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 240, 255, 0.12);
}

.gradient-text {
    background: linear-gradient(135deg, #00dbe9 0%, #d1bcff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.button {
    display: inline-flex; align-items: center; gap: 10px; justify-content: center;
    padding: 16px 32px; border-radius: 10px; border: none; cursor: pointer;
    font-family: var(--font-mono); font-size: 12px; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    background: linear-gradient(135deg, #00f0ff 0%, #7213ff 100%);
    color: #fff; transition: box-shadow .3s ease, transform .3s ease;
}
.button:hover { box-shadow: 0 4px 24px rgba(0, 240, 255, 0.4); transform: translateY(-2px); }
.button:active { transform: translateY(0) scale(0.97); }
.button-outline {
    background: transparent; border: 1px solid var(--cyan);
    color: var(--cyan-pale);
}
.button-outline:hover { background: rgba(0, 219, 233, 0.1); box-shadow: none; }
.button-small { padding: 11px 22px; }

.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--on-surface-variant); font-family: var(--font-mono); font-size: 14px; transition: color .25s ease; }
.text-link:hover { color: var(--cyan-pale); }

/* Header */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    background: rgba(17, 19, 23, 0.65);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.brand-mark {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px;
    background: linear-gradient(135deg, #00f0ff, #7213ff); color: #fff; font-size: 13px; font-weight: 800;
}
.brand-dot { color: var(--lime); }
.site-nav { display: flex; gap: 32px; align-items: center; }
.site-nav a { font-size: 15px; color: var(--on-surface-variant); transition: color .25s ease; }
.site-nav a:hover { color: var(--cyan-pale); }
.nav-cta { display: inline-flex; }
.menu-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    align-items: center; width: 44px; height: 44px; padding: 0;
    background: none; border: none; border-radius: 8px; cursor: pointer;
}
.menu-toggle span { width: 22px; height: 2px; background: var(--cyan-pale); transition: transform .25s ease, opacity .25s ease; }
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero {
    min-height: 92vh; display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center;
    gap: var(--gutter); padding-top: calc(var(--header-h) + 40px); padding-bottom: 60px;
}
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono);
    font-size: 13px; letter-spacing: 0.05em; color: var(--on-surface-variant); margin-bottom: 20px;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(195, 244, 0, 0.6); animation: pulse 2s infinite; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(195, 244, 0, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(195, 244, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(195, 244, 0, 0); }
}
.hero h1 { font-size: 64px; line-height: 1.08; letter-spacing: -0.02em; font-weight: 800; margin-bottom: 20px; }
.hero-intro { font-size: 18px; line-height: 1.6; color: var(--on-surface-variant); max-width: 540px; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-actions svg { width: 18px; height: 18px; fill: currentColor; }
.hero-meta { display: flex; gap: 32px; }
.hero-meta strong { display: block; font-family: var(--font-display); font-size: 18px; color: var(--on-surface); }
.hero-meta span { font-family: var(--font-mono); font-size: 12px; color: var(--on-surface-variant); text-transform: uppercase; letter-spacing: 0.06em; }

.hero-visual { display: flex; align-items: center; justify-content: center; }
.orb-wrap { position: relative; width: 100%; height: 420px; }
#heroKnot { width: 100%; height: 100%; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* Sections */
.section { padding: 90px 0; }
.section-index { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--cyan-pale); margin-bottom: 12px; text-transform: uppercase; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 48px; flex-wrap: wrap; }
.section-heading h2 { font-size: 36px; line-height: 1.25; font-weight: 700; }
.section-heading > p { max-width: 380px; color: var(--on-surface-variant); font-size: 16px; }

/* Capability / Expertise */
.capability-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
.capability-card {
    border-radius: 16px; padding: 28px; position: relative; overflow: hidden;
}
.card-number { position: absolute; top: 14px; right: 18px; font-family: var(--font-mono); font-size: 34px; font-weight: 700; color: rgba(255,255,255,0.05); }
.card-icon {
    display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 10px;
    border-radius: 8px; background: var(--surface-high); border: 1px solid rgba(255,255,255,0.06);
    font-family: var(--font-mono); font-size: 14px; color: var(--cyan-pale); margin-bottom: 20px;
}
.capability-card h3 { font-size: 19px; margin-bottom: 10px; }
.capability-card p { color: var(--on-surface-variant); font-size: 15px; margin-bottom: 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
    background: var(--surface-high); padding: 6px 10px; border-radius: 6px;
    font-family: var(--font-mono); font-size: 12px; color: var(--cyan-pale); border: 1px solid rgba(255,255,255,0.05);
}

/* Skills band */
.skills-band { padding: 80px 0; border-top: 1px solid rgba(255,255,255,0.06); border-bottom: 1px solid rgba(255,255,255,0.06); }
.skills-heading { text-align: center; margin-bottom: 40px; }
.skills-heading .section-index { justify-content: center; }
.skills-heading h2 { font-size: 30px; }
.skill-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.skill-list span {
    padding: 14px 22px; border-radius: 10px; font-family: var(--font-mono); font-size: 13px;
    font-weight: 600; color: var(--on-surface); letter-spacing: 0.02em;
}
.skill-list span:nth-child(odd):hover { border-color: var(--lime); }
.skill-list span:nth-child(even):hover { border-color: var(--cyan); }
.skill-list span:hover { transform: translateY(-4px) scale(1.05); }

/* Projects */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.project-card { border-radius: 16px; padding: 28px; display: flex; flex-direction: column; }
.project-card-featured { grid-column: span 2; border-color: rgba(0, 240, 255, 0.25); background: rgba(0, 219, 233, 0.05); }
.project-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.project-number { font-family: var(--font-mono); font-size: 13px; color: var(--cyan-pale); font-weight: 700; }
.project-context { font-family: var(--font-mono); font-size: 12px; color: var(--on-surface-variant); text-transform: uppercase; letter-spacing: 0.05em; }
.project-card h3 { font-size: 20px; margin-bottom: 10px; }
.project-card > p { color: var(--on-surface-variant); font-size: 15px; margin-bottom: 16px; }
.project-features { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.project-features li { font-size: 14px; color: var(--on-surface-variant); padding-left: 20px; position: relative; }
.project-features li::before { content: '›'; position: absolute; left: 0; color: var(--lime); font-weight: 700; }
.project-card .tags { margin-top: auto; }

/* Contact */
.contact { padding: 90px 0 110px; display: flex; justify-content: center; }
.contact-card { max-width: 720px; width: 100%; text-align: center; border-radius: 24px; padding: 72px 48px; }
.contact-card .section-index { justify-content: center; }
.contact-card h2 { font-size: 42px; line-height: 1.2; margin-bottom: 20px; }
.contact-card > p { color: var(--on-surface-variant); font-size: 17px; max-width: 480px; margin: 0 auto 36px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; align-items: center; }

/* Footer */
.site-footer { border-top: 1px solid rgba(255,255,255,0.06); background: var(--bg-lowest); padding: 40px 0; }
.footer-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-wrap p { font-size: 14px; color: var(--on-surface-variant); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-family: var(--font-mono); font-size: 13px; color: var(--on-surface-variant); transition: color .25s ease; }
.footer-links a:hover { color: var(--cyan-pale); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.capability-grid .reveal:nth-child(1), .project-grid .reveal:nth-child(1) { transition-delay: .05s; }
.capability-grid .reveal:nth-child(2), .project-grid .reveal:nth-child(2) { transition-delay: .15s; }
.capability-grid .reveal:nth-child(3), .project-grid .reveal:nth-child(3) { transition-delay: .25s; }
.capability-grid .reveal:nth-child(4), .project-grid .reveal:nth-child(4) { transition-delay: .35s; }
.project-grid .reveal:nth-child(5) { transition-delay: .45s; }

@media (max-width: 960px) {
    .hero {
        position: relative; isolation: isolate; overflow: hidden;
        grid-template-columns: 1fr; min-height: auto; gap: 0; text-align: center;
        padding-top: calc(var(--header-h) + 40px); padding-bottom: 64px;
    }
    .hero-copy { position: relative; z-index: 2; }
    .hero-intro { margin-left: auto; margin-right: auto; }
    .hero-actions, .hero-meta { justify-content: center; }
    .hero-visual {
        position: absolute; z-index: 1; top: calc(var(--header-h) - 12px); left: 50%;
        width: min(90vw, 520px); pointer-events: none;
    }
    .hero-visual.reveal { opacity: 0; transform: translate(-50%, 28px); }
    .hero-visual.reveal.in-view { opacity: .62; transform: translate(-50%, 0); }
    .orb-wrap { height: clamp(300px, 55vw, 420px); }
    .hero h1 {
        position: relative; font-size: clamp(44px, 8vw, 64px);
        text-shadow: 0 2px 18px rgba(12, 14, 18, .9), 0 0 38px rgba(12, 14, 18, .72);
    }
    .hero h1 .gradient-text {
        background: linear-gradient(135deg, #51f7ff 0%, #eee8ff 52%, #c9a8ff 100%);
        -webkit-background-clip: text; background-clip: text;
        -webkit-text-fill-color: transparent;
        text-shadow: none;
        filter: drop-shadow(0 3px 10px rgba(5, 8, 14, .95));
    }
    .capability-grid { grid-template-columns: repeat(2, 1fr); }
    .project-grid { grid-template-columns: repeat(2, 1fr); }
    .project-card-featured { grid-column: span 2; }
    .section-heading { text-align: center; justify-content: center; }
    .section-heading > p { max-width: 100%; margin: 0 auto; }
}

@media (max-width: 720px) {
    :root { --gutter: 18px; --header-h: 68px; }
    body.menu-open { overflow: hidden; }
    .brand { font-size: 18px; }
    .brand-mark { width: 34px; height: 34px; }
    .site-nav { position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; gap: 0;
        background: rgba(17, 19, 23, 0.97); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255,255,255,0.08);
        max-height: 0; visibility: hidden; overflow: hidden; transition: max-height .3s ease, visibility .3s ease; }
    .site-nav.is-open { max-height: calc(100dvh - var(--header-h)); visibility: visible; overflow-y: auto; }
    .site-nav a { width: 100%; min-height: 56px; display: flex; align-items: center; padding: 16px var(--gutter); border-top: 1px solid rgba(255,255,255,0.05); }
    .menu-toggle { display: flex; }
    .nav-cta { display: none; }
    .hero {
        gap: 0; padding-top: calc(var(--header-h) + 32px); padding-bottom: 56px;
    }
    .hero-visual {
        position: absolute; z-index: 1; top: calc(var(--header-h) - 8px); left: 50%;
        width: min(112vw, 440px);
    }
    .orb-wrap { height: clamp(270px, 82vw, 350px); }
    .hero h1 {
        font-size: clamp(34px, 10vw, 44px); overflow-wrap: anywhere;
    }
    .hero-intro { font-size: 16px; margin-bottom: 28px; }
    .hero-actions { gap: 12px; margin-bottom: 32px; }
    .hero-actions .button { flex: 1 1 100%; min-height: 52px; }
    .hero-meta { gap: 16px; flex-wrap: wrap; }
    .section { padding: 64px 0; }
    .section-heading { gap: 20px; margin-bottom: 32px; }
    .section-heading h2 { font-size: 30px; }
    .capability-grid { grid-template-columns: 1fr; }
    .capability-card, .project-card { padding: 22px; }
    .skills-band { padding: 60px 0; }
    .skills-heading { margin-bottom: 28px; }
    .skill-list { gap: 10px; }
    .skill-list span { padding: 11px 14px; font-size: 12px; }
    .project-grid { grid-template-columns: 1fr; }
    .project-card-featured { grid-column: span 1; }
    .contact { padding: 64px 0 72px; }
    .contact-card { padding: 44px 20px; border-radius: 18px; }
    .contact-card h2 { font-size: 30px; }
    .contact-card > p { font-size: 16px; }
    .contact-actions { gap: 18px; }
    .contact-actions .button { width: 100%; min-height: 52px; padding-left: 16px; padding-right: 16px; }
    .text-link { max-width: 100%; overflow-wrap: anywhere; }
    .site-footer { padding: 32px 0; }
    .footer-wrap { justify-content: center; text-align: center; }
    .footer-wrap p { width: 100%; }
}

@media (max-width: 380px) {
    :root { --gutter: 14px; }
    .hero h1 { font-size: 32px; }
    .eyebrow { font-size: 11px; }
    .button { width: 100%; padding: 14px 16px; }
    .section-heading h2, .contact-card h2 { font-size: 27px; }
    .capability-card, .project-card { padding: 20px 18px; }
    .project-card-top { align-items: flex-start; }
}

@media (hover: none) {
    .glass-hover:hover, .skill-list span:hover, .button:hover { transform: none; }
}

@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; }
    .reveal { opacity: 1; transform: none; }
}
