:root {
    --bg: #030305;
    --bg-alt: #08080c;
    --fg: #ffffff;
    --accent: #22d3ee;
    /* Electric Cyan */
    --accent-glow: rgba(34, 211, 238, 0.5);
    --surface: rgba(255, 255, 255, 0.03);
    --surface-border: rgba(255, 255, 255, 0.08);
    --font-display: 'Syne', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
    --easing: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Hide default cursor */
}

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    overflow-x: hidden;
    font-size: 18px;
    line-height: 1.6;
}

/* --- Canvas & Overlays --- */
#neuro-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    opacity: 0.6;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc1MDAlJyBoZWlnaHQ9JzUwMCUnPjxmaWx0ZXIgaWQ9J25vaXNlJz48ZmVUdXJidWxlbmNlIHR5cGU9J2ZyYWN0YWxOb2lzZScgYmFzZUZyZXF1ZW5jeT0nMC42NScgbnVtT2N0YXZZcz0nMycgc3RpdGNoVGlsZXM9J3N0aXRjaCcvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPScxMDAlJyBoZWlnaHQ9JzEwMCUnIGZpbHRlcj0ndXJsKCNub2lzZSknIG9wYWNpdHk9JzAuMDUnLz48L3N2Zz4=');
    pointer-events: none;
    z-index: 900;
    opacity: 0.4;
}

/* --- Custom Cursor --- */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--fg);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    z-index: 9999;
    pointer-events: none;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    z-index: 9998;
    pointer-events: none;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline.hovered {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: transparent;
    mix-blend-mode: difference;
}

/* --- Navigation --- */
.glass-nav {
    position: absolute;
    /* Changed from fixed to absolute to sit at top initially */
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: all 0.4s var(--easing);
}

/* Scrolled state becomes fixed and floats */
.glass-nav.scrolled {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    padding: 1rem 2rem;
    background: rgba(3, 3, 5, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.logo {
    text-decoration: none;
    color: var(--fg);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 102;
}

.logo-mark {
    display: inline-block;
    padding: 5px 10px;
    background: var(--fg);
    color: var(--bg);
    border-radius: 4px;
}

.nav-links {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--fg);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    position: relative;
    padding: 10px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s var(--easing);
}

.nav-links a:hover::after {
    width: 100%;
}

.cta-button {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px !important;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--fg);
    color: var(--bg) !important;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 102;
    padding: 10px;
}

.bar {
    width: 24px;
    height: 2px;
    background-color: var(--fg);
    transition: 0.3s;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center vertically */
    padding: 15vh 5vw 5vh;
    /* Large top padding to avoid nav overlap */
    position: relative;
    overflow: hidden;
}

.hero-container {
    width: 100%;
}

.overline {
    color: var(--accent);
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    font-weight: 700;
    display: block;
}

h1 {
    font-family: var(--font-display);
    /* Safe font scaling to always fit on one line */
    font-size: clamp(2rem, 7.5vw, 6.5rem);
    line-height: 1.1;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 3rem;
    width: 100%;
}

h1 .line {
    display: block;
    overflow: visible;
    white-space: nowrap;
    /* FORCE ONE LINE */
}

h1 .indented {
    margin-left: 5vw;
    color: var(--accent);
    -webkit-text-stroke: 1px var(--accent);
    color: transparent;
}

h1 .gradient-text {
    background: linear-gradient(90deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 4rem;
}

.hero-mission {
    max-width: 500px;
    font-size: 1.1rem;
    color: #9ca3af;
    text-align: right;
    line-height: 1.6;
}

.highlight {
    color: var(--fg);
    font-weight: 600;
}

.scroll-indicator {
    display: flex;
    gap: 1rem;
    align-items: center;
    opacity: 0.5;
}

.mouse {
    width: 24px;
    height: 36px;
    border: 2px solid var(--fg);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 2px;
    height: 6px;
    background: var(--fg);
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

/* --- Marquee --- */
.marquee-strip {
    background: var(--fg);
    color: var(--bg);
    padding: 1.5rem 0;
    overflow: hidden;
    position: relative;
    transform: rotate(-2deg) scale(1.05);
    /* Stylish tilt */
    z-index: 10;
}

.marquee-strip.reversed {
    transform: rotate(2deg) scale(1.05);
    background: var(--accent);
    color: var(--bg);
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
}

.marquee-content span {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2rem;
    text-transform: uppercase;
    margin-right: 4rem;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* --- Philosophy --- */
section {
    padding: 8rem 5vw;
}

.fluid-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.sticky-label h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    text-transform: uppercase;
    color: var(--accent);
    position: sticky;
    top: 8rem;
}

.reveal-text {
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    line-height: 1.25;
    margin-bottom: 4rem;
    opacity: 0.2;
    transition: opacity 0.5s ease;
}

.reveal-text.in-view {
    opacity: 1;
}

/* --- Featured Project (Card) --- */
.featured-project {
    display: flex;
    justify-content: center;
}

.parallax-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 30px;
    width: 100%;
    max-width: 1100px;
    padding: 4rem;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    backdrop-filter: blur(20px);
}

.card-visual {
    background: radial-gradient(circle, rgba(34, 211, 238, 0.1) 0%, transparent 70%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--accent);
}

.project-tag {
    font-size: 0.8rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 5px 10px;
    border-radius: 20px;
    margin-bottom: 2rem;
    display: inline-block;
}

.card-content h3 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
}

.specs-grid {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    border-top: 1px solid var(--surface-border);
    padding-top: 2rem;
    flex-wrap: wrap;
}

.spec-item {
    display: flex;
    flex-direction: column;
}

.spec-item .label {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.spec-item .value {
    font-size: 1.1rem;
    font-weight: 600;
}

/* --- Bento Grid --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 300px 300px;
    gap: 1.5rem;
}

.bento-box {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s var(--easing);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-box:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.gaming-box {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.05), transparent);
}

.hardware-box {
    grid-column: span 1;
}

.method-box {
    grid-column: span 1;
    background: var(--bg-alt);
}

.neuro-box {
    grid-column: span 2;
}

/* Renamed from pediatric */

.box-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.bento-box h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.bento-box p {
    font-size: 0.95rem;
    color: #cbd5e1;
}

.process-list {
    list-style: none;
    margin-top: auto;
}

.process-list li {
    font-size: 0.9rem;
    border-bottom: 1px solid var(--surface-border);
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
}

.process-list .num {
    color: var(--accent);
    font-family: monospace;
}

/* --- Footer --- */
footer {
    padding: 8rem 5vw 4rem;
    background: #000;
}

footer h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    width: 60%;
    margin-bottom: 4rem;
}

.giant-mail-link {
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 6rem);
    text-decoration: none;
    color: var(--fg);
    display: block;
    margin-bottom: 4rem;
    transition: color 0.3s ease;
    word-break: break-all;
}

.giant-mail-link:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.socials {
    display: flex;
    gap: 2rem;
}

.social-link {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.social-link:hover {
    color: var(--fg);
}

/* --- Mobile --- */
@media (max-width: 1024px) {
    .fluid-grid {
        grid-template-columns: 1fr;
    }

    .sticky-label {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .gaming-box,
    .hardware-box,
    .method-box,
    .neuro-box {
        grid-column: span 1 !important;
        min-height: 250px;
    }

    .marquee-strip {
        transform: rotate(0) scale(1);
    }

    .hero-section {
        padding-top: 120px;
        /* Force space for nav on mobile as well */
        justify-content: flex-start;
    }

    .hero-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
        margin-top: 2rem;
    }

    .hero-mission {
        position: relative;
        text-align: left;
        max-width: 100%;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(3, 3, 5, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        z-index: 99;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    h1 {
        /* Adjusted for safer mobile fitting of long words */
        font-size: clamp(1.8rem, 10vw, 3.5rem);
        letter-spacing: -0.05em;
        margin-bottom: 2rem;
        word-wrap: normal;
        /* Maintain single line structure */
    }

    h1 .indented {
        margin-left: 0;
    }

    .parallax-card {
        grid-template-columns: 1fr;
        text-align: left;
        padding: 2rem;
    }

    .card-visual {
        height: 200px;
    }

    .glass-nav {
        padding: 1.5rem;
        position: relative;
        /* On mobile it can be relative or fixed */
        /* To keep it consistent, let's keep absolute/fixed logic but ensure it sits well */
    }

    .glass-nav.scrolled {
        width: 95%;
        top: 10px;
    }

    footer h2 {
        width: 100%;
    }
}