:root {
    --bg: #0b0f1a;
    --bg-soft: #111622;
    --ink: #eef2ff;
    --ink-soft: #b4c0e0;
    --muted: #7b89b0;
    --accent: #4f8cff;
    --accent-light: rgba(79, 140, 255, 0.12);
    --coral: #ff6b7a;
    --coral-light: rgba(255, 107, 122, 0.12);
    --mint: #3dd9a6;
    --mint-light: rgba(61, 217, 166, 0.12);
    --amber: #f5b042;
    --amber-light: rgba(245, 176, 66, 0.12);
    --violet: #9f6eff;
    --violet-light: rgba(159, 110, 255, 0.1);
    --line: rgba(238, 242, 255, 0.07);
    --line-dark: rgba(238, 242, 255, 0.13);
    --card: #151a28;
    --card-hover: #1c2132;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.45);
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--ink);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent);
    color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s var(--ease);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 clamp(18px, 3.5vw, 44px);
}

h1,
h2,
h3 {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    letter-spacing: -.02em;
}

/* NAV */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    background: rgba(11, 15, 26, 0.78);
    border-bottom: 1px solid var(--line);
    transition: box-shadow 0.35s ease;
}

nav.scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    background: rgba(11, 15, 26, 0.9);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Instrument Serif', serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -.01em;
    z-index: 2;
}

.logo-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--violet));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(79, 140, 255, 0.3);
    transition: transform 0.35s var(--ease-bounce);
}

.logo:hover .logo-icon {
    transform: rotate(-6deg) scale(1.1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-right a {
    padding: 8px 15px;
    border-radius: 8px;
    font-size: .86rem;
    font-weight: 500;
    color: var(--ink-soft);
    transition: all 0.22s ease;
}

.nav-right a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--ink);
}

.nav-right a.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

.mobile-btn {
    display: none;
    background: none;
    border: none;
    color: var(--ink);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    z-index: 2;
}

/* PAGE HERO */
.page-hero {
    padding-top: calc(62px + clamp(60px, 8vh, 100px));
    padding-bottom: clamp(60px, 8vh, 100px);
    text-align: center;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.page-hero h1 {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    line-height: 1;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.page-hero h1 em {
    font-style: italic;
    background: linear-gradient(135deg, var(--accent), var(--violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-hero .subtitle {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 520px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-glow {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 140, 255, 0.15), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* STORY SECTION */
.story {
    padding: clamp(50px, 7vh, 90px) 0;
    position: relative;
    z-index: 1;
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 5vw, 80px);
    align-items: center;
}

.story-visual {
    background: var(--card);
    border-radius: var(--radius-xl);
    padding: 40px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
}

.story-visual .ring-group {
    position: relative;
    width: 200px;
    height: 200px;
}

.story-visual .ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid var(--line-dark);
}

.ring.r1 {
    width: 180px;
    height: 180px;
    border-color: rgba(79, 140, 255, 0.2);
    animation: spin 20s linear infinite;
}

.ring.r2 {
    width: 140px;
    height: 140px;
    border-color: rgba(159, 110, 255, 0.2);
    animation: spin 25s linear infinite reverse;
}

.ring.r3 {
    width: 100px;
    height: 100px;
    border-color: rgba(61, 217, 166, 0.2);
    animation: spin 18s linear infinite;
}

.story-visual .core {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 40px rgba(79, 140, 255, 0.5);
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.story-text h2 {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    line-height: 1.1;
    margin-bottom: 20px;
}

.story-text p {
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.story-text .highlight {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    padding: 2px 12px;
    border-radius: 100px;
    font-weight: 600;
    font-size: .9rem;
}

/* VALUES */
.values {
    padding: clamp(50px, 7vh, 90px) 0;
    position: relative;
    z-index: 1;
}

.section-head {
    text-align: center;
    margin-bottom: clamp(40px, 5vw, 64px);
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: .73rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: .13em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.section-tag::before,
.section-tag::after {
    content: '';
    width: 18px;
    height: 1px;
    background: var(--accent);
    opacity: .4;
}

.section-head h2 {
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.1;
    margin-bottom: 12px;
}

.section-head p {
    color: var(--muted);
    font-size: .98rem;
    max-width: 480px;
    margin: 0 auto;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.value-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: clamp(22px, 2.5vw, 32px);
    text-align: center;
    transition: all 0.35s var(--ease);
}

.value-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    background: var(--card-hover);
}

.value-card .vc-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 1.3rem;
}

.vc-icon.blue {
    background: var(--accent-light);
    color: var(--accent);
}

.vc-icon.coral {
    background: var(--coral-light);
    color: var(--coral);
}

.vc-icon.mint {
    background: var(--mint-light);
    color: var(--mint);
}

.vc-icon.violet {
    background: var(--violet-light);
    color: var(--violet);
}

.value-card h3 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 8px;
    letter-spacing: 0;
}

.value-card p {
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.65;
}

/* TIMELINE */
.timeline {
    padding: clamp(50px, 7vh, 90px) 0;
    position: relative;
    z-index: 1;
}

.timeline-track {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 30px;
    border-left: 2px dashed var(--line-dark);
}

.timeline-item {
    position: relative;
    margin-bottom: 36px;
    padding-left: 24px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -38px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 2px var(--accent);
}

.timeline-item .year {
    font-family: 'JetBrains Mono', monospace;
    font-size: .78rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: .05em;
    margin-bottom: 6px;
}

.timeline-item h4 {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0;
}

.timeline-item p {
    color: var(--muted);
    font-size: .9rem;
}

/* TEAM */
.team {
    padding: clamp(50px, 7vh, 90px) 0;
    position: relative;
    z-index: 1;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.team-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    transition: all 0.3s var(--ease);
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    background: var(--card-hover);
}

.team-card .avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Instrument Serif', serif;
}

.team-card h4 {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0;
}

.team-card .role {
    font-size: .8rem;
    color: var(--muted);
    margin-top: 4px;
}

/* TECH STATS (NEW SECTION) */
.tech-stats {
    padding: 30px 0 80px;
    position: relative;
    z-index: 1;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.tech-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.tech-card:hover {
    background: var(--card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.tech-num {
    font-family: 'Instrument Serif', serif;
    font-size: 2.4rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
}

.tech-num span {
    font-size: 0.6em;
    vertical-align: super;
}

.tech-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* FOOTER */
.footer {
    border-top: 1px solid var(--line);
    padding: 50px 0 24px;
    position: relative;
    z-index: 1;
    background: #0d1120;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr 1fr;
    gap: clamp(20px, 3.5vw, 50px);
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--muted);
    font-size: .85rem;
    max-width: 260px;
    line-height: 1.7;
    margin-top: 12px;
}

.footer-col h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: .72rem;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 16px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.footer-col li {
    margin-bottom: 9px;
}

.footer-col a {
    color: var(--muted);
    font-size: .85rem;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: .75rem;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
}

/* REVEAL ANIMATION */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: all 0.7s var(--ease);
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

.reveal-d1 {
    transition-delay: .08s;
}

.reveal-d2 {
    transition-delay: .16s;
}

.reveal-d3 {
    transition-delay: .24s;
}

.reveal-d4 {
    transition-delay: .32s;
}

/* RESPONSIVE */
@media(max-width:1024px) {
    .story-grid {
        grid-template-columns: 1fr;
    }
    .story-visual {
        min-height: 280px;
    }
    .values-grid {
        grid-template-columns: 1fr 1fr;
    }
    .team-grid {
        grid-template-columns: 1fr 1fr;
    }
    .tech-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media(max-width:768px) {
    .nav-right a:not(.nav-right a.active) {
        display: none;
    }
    .nav-right a.active {
        display: block;
    }
    .mobile-btn {
        display: block;
    }
    .values-grid {
        grid-template-columns: 1fr;
    }
    .team-grid {
        grid-template-columns: 1fr;
    }
    .tech-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
    .timeline-track {
        padding-left: 20px;
    }
}

@media(max-width:480px) {
    .story-visual {
        min-height: 220px;
    }
    .ring.r1 {
        width: 140px;
        height: 140px;
    }
    .ring.r2 {
        width: 110px;
        height: 110px;
    }
    .ring.r3 {
        width: 80px;
        height: 80px;
    }
}