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

:root {
    --bg: #050508;
    --surface: rgba(255,255,255,0.03);
    --border: rgba(255,255,255,0.07);
    --white: #ffffff;
    --muted: rgba(255,255,255,0.4);
    --accent: #4f46e5;
    --accent-glow: rgba(79,70,229,0.35);
    --accent2: #06b6d4;
    --tag-bg: rgba(79,70,229,0.12);
    --tag-border: rgba(79,70,229,0.3);
    --ff-display: 'Syne', sans-serif;
    --ff-mono: 'Space Mono', monospace;
}

/* ============================
   BASE
============================ */

html, body {
    min-height: 100%;
    width: 100%;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--white);
    scroll-behavior: smooth;
}

/* ============================
   GRAIN OVERLAY
============================ */

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

/* ============================
   PARTICLES
============================ */

#particles-js {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ============================
   PAGE WRAPPER
============================ */

.page {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    z-index: 2;
    pointer-events: none;
}

.page > * {
    pointer-events: auto;
}

/* ============================
   HEADER
============================ */

header {
    position: relative;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(1rem, 2.5vh, 1.5rem)
             clamp(1.2rem, 4vw, 3rem);
    border-bottom: 1px solid var(--border);
    background: rgba(5,5,8,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ============================
   LOGO
============================ */

.logo-wrap {
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.logo-mark {
    font-family: var(--ff-display);
    font-weight: 800;
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    color: var(--white);
    letter-spacing: -0.02em;
}

.logo-mark span {
    color: var(--accent2);
}

.logo-sub {
    font-family: var(--ff-mono);
    font-size: clamp(9px, 1vw, 11px);
    color: var(--muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ============================
   DESKTOP NAV
============================ */

.nav-desktop {
    display: flex;
    align-items: center;
    gap: clamp(1.2rem, 2.5vw, 2.5rem);
}

.nav-desktop a {
    position: relative;
    font-family: var(--ff-mono);
    font-size: clamp(11px, 1vw, 13px);
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.nav-desktop a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent2);
    transition: width 0.3s ease;
}

.nav-desktop a:hover {
    color: var(--white);
}

.nav-desktop a:hover::after {
    width: 100%;
}

/* ============================
   CTA BUTTON
============================ */

.btn-cta {
    font-family: var(--ff-mono);
    font-size: clamp(10px, 1vw, 12px);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--white);
    background: dimgray;
    padding: 0.55rem 1.2rem;
    border-radius: 4px;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.2s;
}

.btn-cta:hover {
    opacity: 0.88;
    transform: translateY(-2px);
}

/* ============================
   HAMBURGER
============================ */

#menu-toggle {
    display: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    width: 26px;
    z-index: 2001;
    transition: transform 0.3s;
}

.hamburger:hover {
    transform: scale(1.08);
}

.bar {
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}

.bar:nth-child(1) { width: 26px; }
.bar:nth-child(2) { width: 18px; }
.bar:nth-child(3) { width: 22px; }

#menu-toggle:checked ~ .hamburger .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    width: 26px;
}

#menu-toggle:checked ~ .hamburger .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menu-toggle:checked ~ .hamburger .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    width: 26px;
}

/* ============================
   MOBILE NAV
============================ */

.nav-mobile {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(290px, 90vw);
    height: fit-content;
    overflow-y: auto;
    background: rgba(10,10,16,0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-left: 1px solid var(--border);
    padding: 5rem 0 2rem;
    z-index: 2000;
    opacity: 0;
    transition:
        right 0.35s cubic-bezier(0.4,0,0.2,1),
        opacity 0.3s ease;
}

#menu-toggle:checked ~ .nav-mobile {
    right: 0;
    opacity: 1;
}

.nav-mobile a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.8rem;
    font-family: var(--ff-mono);
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition:
        color 0.2s,
        border-color 0.2s,
        background 0.2s;
}

.nav-mobile a:hover {
    color: var(--white);
    border-left-color: var(--accent2);
    background: rgba(255,255,255,0.03);
}

.nav-mobile a i {
    width: 16px;
    text-align: center;
    color: var(--accent2);
}

.nav-mobile-footer {
    padding: 1rem 1.5rem 0;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

.nav-mobile-footer a {
    display: flex;
    justify-content: center;
    background: var(--white);
    color: var(--bg);
    font-family: var(--ff-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.8rem;
    border-radius: 6px;
    text-decoration: none;
}

/* ============================
   MAIN
============================ */

main {
    position: relative;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 2.5vh, 2rem);
    text-align: center;
    pointer-events: none;
}
.main-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ============================
   GLOW ORB
============================ */

.glow-orb {
    position: absolute;
    width: min(500px, 80vw);
    height: min(500px, 80vw);
    border-radius: 50%;
    background:
        radial-gradient(circle,
        var(--accent-glow) 0%,
        transparent 70%);
    z-index: 0;
    pointer-events: none;
    animation: pulse 6s ease-in-out infinite;
    will-change: transform, opacity;
}

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

/* ============================
   AVATAR
============================ */

.avatar-ring {
    position: relative;
    z-index: 2;
    width: clamp(100px, 12vw, 130px);
    height: clamp(100px, 12vw, 130px);
    border-radius: 50%;
    padding: 3px;
    background:
        conic-gradient(
            from 0deg,
            var(--accent),
            var(--accent2),
            var(--accent)
        );
    animation:
        spin-ring 8s linear infinite,
        fadein-up 0.8s ease both;
}

.avatar-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg);
}

.avatar-ring img.hidden {
    display: none;
}

.avatar-fallback.hidden {
    display: none;
}

@keyframes spin-ring {
    from { filter: hue-rotate(0deg); }
    to { filter: hue-rotate(360deg); }
}

/* ============================
   TAG
============================ */

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    color: var(--accent2);
    font-family: var(--ff-mono);
    font-size: clamp(9px, 1.1vw, 11px);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    z-index: 2;
    pointer-events: auto;
}

.tag .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent2);
    animation: blink 1.6s ease infinite;
}

@keyframes blink {
    0%,100% { opacity: 1; }
    50% { opacity: 0.2; }
}

/* ============================
   HERO TEXT
============================ */

.hero-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-heading {
    font-family: var(--ff-display);
    font-weight: 800;
    font-size: clamp(1.5rem, 6vw, 10rem);
    line-height: 1;
    letter-spacing: -0.03em;
    z-index: 2;
}

.hero-heading .accent-word {
    background:
        linear-gradient(
            90deg,
            var(--accent),
            var(--accent2)
        );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    max-width: 520px;
    font-family: var(--ff-mono);
    font-size: clamp(11px, 1.4vw, 15px);
    line-height: 1.8;
    color: var(--muted);
    z-index: 2;
}

.hero-sub code {
    color: var(--accent2);
}
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    pointer-events: auto;
    z-index: 2;
}
.btn-primary,
.btn-outline {
    font-family: var(--ff-mono);
    font-size: clamp(10px, 1.1vw, 13px);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.75rem 1.8rem;
    border-radius: 5px;
    transition: 0.25s ease;
}

.btn-primary {
    color: var(--white);
    background: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
}

.btn-outline {
    color: var(--white);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.112);
}

.btn-outline:hover {
    border-color: rgba(255,255,255,0.35);
    transform: translateY(-3px);
}

/* ============================
   STATS
============================ */

.stat-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(1rem, 4vw, 4rem);
    z-index: 2;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-family: var(--ff-display);
    font-weight: 800;
    font-size: clamp(1.1rem, 3vw, 2rem);
}

.stat-label {
    font-family: var(--ff-mono);
    font-size: clamp(8px, 0.9vw, 10px);
    color: var(--muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.stat-divider {
    width: 1px;
    background: var(--border);
}

/* ============================
   FOOTER
============================ */

footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding:
        clamp(0.6rem, 1.5vh, 1rem)
        clamp(1.2rem, 4vw, 3rem);
    border-top: 1px solid var(--border);
    background: rgba(5,5,8,0.85);
}

.footer-left {
    font-family: var(--ff-mono);
    font-size: clamp(9px, 0.9vw, 11px);
    color: var(--muted);
}

.footer-left span {
    color: var(--accent2);
}

.footer-socials {
    display: flex;
    gap: 1.2rem;
}

.footer-socials a {
    color: var(--muted);
    text-decoration: none;
    transition: 0.2s ease;
}

.footer-socials a:hover {
    color: var(--white);
    transform: translateY(-2px);
}

/* ============================
   SCROLLBAR
============================ */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

/* ============================
   ANIMATIONS
============================ */

@keyframes fadein-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 740px) {

    .nav-desktop {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    footer {
        justify-content: center;
        text-align: center;
    }
}

@media (min-width: 741px) {

    .nav-mobile {
        display: none !important;
    }

    .hamburger {
        display: none;
    }
}

@media (max-width: 480px) {

    .hero-heading {
        font-size: clamp(1.8rem, 11vw, 2.5rem);
    }

    .hero-actions {
        gap: 0.7rem;
    }

    .btn-primary,
    .btn-outline {
        padding: 0.65rem 1.2rem;
    }

    .stat-strip {
        gap: 1rem;
    }
}