/* ----------  Tokens  ---------- */
:root {
    --bg-0: #03060a;
    --bg-1: #060c14;
    --bg-2: #0a141e;
    --neon: #00ff88;
    --neon-soft: #4dffb0;
    --neon-deep: #0bbf67;
    --text: #e6f7ee;
    --text-dim: #8aa39a;
    --line: rgba(0, 255, 136, 0.18);
    --line-strong: rgba(0, 255, 136, 0.45);
    --panel-w: 100vw;
    --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html, body { 
    margin: 0; padding: 0; height: 100%; 
    background-color: #03060a; /* Prevent white edges during elastic scroll */
}

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
    color: var(--text);
    background: radial-gradient(ellipse at 20% 10%, #06141a 0%, var(--bg-0) 60%, #000 100%);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

/* ----------  Background layers  ---------- */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.circuit-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.55;
    animation: drift 40s ease-in-out infinite alternate;
}
.vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.6) 100%),
        radial-gradient(ellipse at top, rgba(0,255,136,0.06), transparent 60%);
}
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(0,255,136,0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,255,136,0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, #000 40%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 85%);
}

@keyframes drift {
    0%   { transform: translate3d(0, 0, 0) scale(1.02); }
    100% { transform: translate3d(-1.5%, -1%, 0) scale(1.05); }
}

.node { animation: nodePulse 3s ease-in-out infinite; }
.node:nth-child(2n) { animation-delay: 0.5s; }
.node:nth-child(3n) { animation-delay: 1.1s; }
.node:nth-child(4n) { animation-delay: 1.7s; }

@keyframes nodePulse {
    0%, 100% { opacity: 0.4; r: 2; }
    50%      { opacity: 1; r: 3.5; }
}

/* ----------  Top bar  ---------- */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 36px;
    padding-top: calc(18px + env(safe-area-inset-top));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: linear-gradient(to bottom, rgba(3, 6, 10, 0.7), rgba(3, 6, 10, 0));
    border-bottom: 1px solid var(--line);
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 18px;
}
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: rgba(0, 255, 136, 0.04);
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.15) inset;
}
.brand-text { color: var(--text); }
.brand-accent {
    color: var(--neon);
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
}

.nav-links {
    display: flex;
    gap: 28px;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 500;
}
.nav-links a {
    position: relative;
    color: var(--text-dim);
    padding: 6px 0;
    transition: color 0.25s var(--ease);
}
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: var(--neon);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
    box-shadow: 0 0 8px var(--neon);
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

/* ----------  Section dots  ---------- */
.dots {
    position: fixed;
    right: 26px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 25;
    display: flex;
    flex-direction: column;
    gap: 14px;
    list-style: none;
    margin: 0; padding: 0;
}
.dots li {
    width: 10px; height: 10px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: transparent;
    transition: all 0.3s var(--ease);
    cursor: pointer;
}
.dots li.active {
    background: var(--neon);
    box-shadow: 0 0 14px var(--neon);
    transform: scale(1.2);
}

/* ----------  Track + panels  ---------- */
.track {
    position: relative;
    z-index: 5;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: y mandatory; /* Clean section snaps */
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.track::-webkit-scrollbar { display: none; }

.panel {
    flex: 0 0 100dvh;
    width: 100vw;
    height: 100dvh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 8vw 80px;
    padding-top: calc(80px + env(safe-area-inset-top));
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
    position: relative;
}

.panel-inner {
    width: 100%;
    max-width: 1200px;
}

.eyebrow {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    font-size: 11px;
    color: var(--neon);
    margin: 0 0 18px;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.7);
}

.section-title,
.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    line-height: 1.05;
    margin: 0 0 18px;
    letter-spacing: -0.01em;
}
.hero-title { 
    font-size: clamp(2.2rem, 5.4vw, 4.6rem); 
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.15);
}
.section-title { font-size: clamp(1.8rem, 4vw, 3.2rem); }

.grad-text {
    background: linear-gradient(90deg, var(--neon) 0%, var(--neon-soft) 50%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.25);
}

.lead, .hero-sub {
    color: var(--text-dim);
    font-size: clamp(0.95rem, 1.2vw, 1.05rem);
    line-height: 1.7;
    max-width: 60ch;
    margin: 0 0 28px;
}
.hero-sub { max-width: 56ch; }

/* ----------  Hero  ---------- */
.hero {
    max-width: 980px;
}
.hero-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 56px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 24px;
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.25s var(--ease);
    border: 1px solid transparent;
    cursor: pointer;
}
.btn-primary {
    background: var(--neon);
    color: #001a0e;
    box-shadow: 0 0 24px rgba(0, 255, 136, 0.4);
}
.btn-primary:hover {
    background: var(--neon-soft);
    box-shadow: 0 0 36px rgba(0, 255, 136, 0.65);
    transform: translateY(-1px);
}
.btn-ghost {
    border-color: var(--line-strong);
    color: var(--text);
    background: rgba(0, 255, 136, 0.03);
}
.btn-ghost:hover {
    border-color: var(--neon);
    background: rgba(0, 255, 136, 0.08);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
    padding-top: 32px;
    border-top: 1px solid rgba(0, 255, 136, 0.1);
}
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-num {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    color: var(--neon);
    text-shadow: 0 0 16px rgba(0, 255, 136, 0.4);
    font-weight: 700;
}
.stat-label {
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-dim);
    opacity: 0.8;
}
.stat-sep {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--line-strong), transparent);
    opacity: 0.6;
}

/* ----------  About  ---------- */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; }
.about-copy { max-width: 640px; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
.pillar {
    border: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(0,255,136,0.04), rgba(0,0,0,0.2));
    padding: 22px;
    border-radius: 6px;
    transition: all 0.3s var(--ease);
}
.pillar:hover {
    border-color: var(--line-strong);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 255, 136, 0.08);
}
.pillar-icon {
    width: 44px; height: 44px;
    display: inline-flex;
    align-items: center; justify-content: center;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    margin-bottom: 14px;
    background: rgba(0, 255, 136, 0.06);
}
.pillar h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    margin: 0 0 8px;
    letter-spacing: 0.04em;
}
.pillar p {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0;
}

/* About visual: orb */
.about-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}
.orb {
    position: relative;
    width: min(420px, 36vw);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.orb-core {
    position: absolute;
    inset: 35%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--neon-soft), var(--neon-deep) 60%, #001a0e 100%);
    box-shadow:
        0 0 60px rgba(0, 255, 136, 0.5),
        0 0 120px rgba(0, 255, 136, 0.25);
    animation: corePulse 4s ease-in-out infinite;
}
.orb-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    animation: spin 20s linear infinite;
}
.orb-ring.r1 { inset: 18%; border-style: dashed; }
.orb-ring.r2 { inset: 6%;  animation-duration: 30s; animation-direction: reverse; border-color: var(--line); }
.orb-ring.r3 {
    inset: -2%;
    border-color: rgba(0, 255, 136, 0.15);
    animation-duration: 45s;
    background: conic-gradient(from 0deg, transparent 0%, rgba(0,255,136,0.18) 25%, transparent 50%);
    -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%, #000 64%, transparent 65%);
            mask: radial-gradient(circle, transparent 60%, #000 61%, #000 64%, transparent 65%);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes corePulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}

/* ----------  Team  ---------- */
.team-head { margin-bottom: 36px; max-width: 720px; }
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.member {
    border: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(0,255,136,0.04), rgba(0,0,0,0.25));
    padding: 26px;
    border-radius: 8px;
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}
.member::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon), transparent);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}
.member:hover {
    border-color: var(--line-strong);
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(0, 255, 136, 0.1);
}
.member:hover::before { opacity: 1; }

.avatar {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    margin-bottom: 18px;
    background:
        repeating-linear-gradient(45deg, rgba(0,255,136,0.04) 0 8px, transparent 8px 16px),
        rgba(0, 255, 136, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.avatar-placeholder {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.3em;
    color: var(--text-dim);
    border: 1px dashed var(--line-strong);
    padding: 8px 14px;
    border-radius: 4px;
}
.avatar-empty {
    background: transparent;
}
.avatar-empty span {
    font-size: 2.2rem;
    color: var(--text-dim);
    font-family: 'Orbitron', sans-serif;
}

.member-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05rem;
    margin: 0 0 4px;
    letter-spacing: 0.04em;
}
.member-role {
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--neon);
    margin: 0 0 14px;
}
.member-bio {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0;
}
.muted { opacity: 0.55; }

/* ----------  Contact  ---------- */
.contact {
    max-width: 760px;
    text-align: left;
}
.email-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 22px 26px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: linear-gradient(160deg, rgba(0,255,136,0.06), rgba(0,0,0,0.3));
    margin: 24px 0 60px;
    transition: all 0.3s var(--ease);
    box-shadow: 0 0 24px rgba(0, 255, 136, 0.08);
}
.email-card:hover {
    border-color: var(--neon);
    transform: translateY(-2px);
    box-shadow: 0 0 36px rgba(0, 255, 136, 0.25);
}
.email-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.email-addr {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
    color: var(--neon);
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
    word-break: break-all;
}
.email-cta {
    font-size: 1.6rem;
    color: var(--neon);
    transition: transform 0.25s var(--ease);
}
.email-card:hover .email-cta { transform: translateX(6px); }

.footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    border-top: 1px solid var(--line);
    padding-top: 18px;
}
.footer-sep { opacity: 0.5; }

/* ----------  Scroll hint  ---------- */
.scroll-hint {
    position: fixed;
    bottom: 22px;
    left: 36px;
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--text-dim);
    animation: hintPulse 2.4s ease-in-out infinite;
}
@keyframes hintPulse {
    0%, 100% { opacity: 0.45; transform: translateY(0); }
    50%      { opacity: 1;    transform: translateY(6px); }
}

/* ----------  Reveal animation  ---------- */
.panel-inner > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.panel.is-active .panel-inner > * {
    opacity: 1;
    transform: translateY(0);
}
.panel.is-active .panel-inner > *:nth-child(1) { transition-delay: 0.05s; }
.panel.is-active .panel-inner > *:nth-child(2) { transition-delay: 0.15s; }
.panel.is-active .panel-inner > *:nth-child(3) { transition-delay: 0.25s; }
.panel.is-active .panel-inner > *:nth-child(4) { transition-delay: 0.35s; }
.panel.is-active .panel-inner > *:nth-child(5) { transition-delay: 0.45s; }

/* ----------  Responsive  ---------- */
@media (max-width: 1000px) {
    .about { grid-template-columns: 1fr; gap: 40px; }
    .about-visual { order: -1; }
    .orb { width: min(280px, 60vw); }
    .team-grid { grid-template-columns: 1fr 1fr; }
    .member-add { display: none; }
}

@media (max-width: 768px) {
    /* PERFORMANCE: Completely hide animated circles on mobile */
    .pulse { display: none !important; }
    
    /* PERFORMANCE: Disable heavy filters on mobile */
    .circuit-svg, .node, .hero-title, .brand-accent, .eyebrow, .stat-num, .email-addr {
        filter: none !important;
        text-shadow: none !important;
    }
    
    .topbar { 
        padding: calc(10px + env(safe-area-inset-top)) 20px 14px;
        background: rgba(3, 6, 10, 0.98);
        border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    }
    .brand-text { font-size: 16px; }
    .nav-links { display: none; }
    
    .panel {
        padding-left: 24px;
        padding-right: 24px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 100dvh;
    }
    
    .hero-title { font-size: 2.2rem; line-height: 1.1; }
    .section-title { font-size: 1.8rem; }
    
    .stat-row { 
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        padding-top: 15px;
    }
    .stat-sep { display: none; }
    
    .dots { display: none; }
    
    .scroll-hint {
        bottom: calc(15px + env(safe-area-inset-bottom));
        background: rgba(3, 6, 10, 0.8);
        padding: 6px 14px;
        border-radius: 20px;
        backdrop-filter: blur(4px);
        border: 1px solid rgba(0, 255, 136, 0.2);
    }
}

@media (max-height: 700px) {
    .panel { padding-top: 70px; }
    .hero-cta { margin-bottom: 24px; }
    .stat-row { padding-top: 16px; }
}

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