:root {
    --cyan: #00f5d4;
    --blue: #3b82f6;
    --bg: #070711;
    --bg2: #0d0d1a;
    --surface: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.08);
    --text: #e2e8f0;
    --muted: #64748b;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    overflow-x: hidden;
}

/* ── NOISE 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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

/* ── LOADER ──────────────────────────────────── */
/* The brand decodes while the bar tracks page load (inline script), then the
   whole screen lifts away like a curtain. */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(600px circle at 50% 45%, rgba(0, 245, 212, 0.06), transparent 70%), var(--bg);
    transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s linear 0.9s;
}

/* Same faint grid as the hero, so the reveal feels continuous */
#loader::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 245, 212, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 212, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
    pointer-events: none;
}

/* Glowing edge along the bottom of the curtain as it lifts */
#loader::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    box-shadow: 0 0 24px 2px var(--cyan);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#loader.hidden {
    transform: translateY(-100%);
    visibility: hidden;
}

#loader.hidden::after {
    opacity: 1;
}

.loader-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: loader-in 0.6s ease both;
    transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
}

#loader.hidden .loader-inner {
    opacity: 0;
    transform: translateY(-40px);
}

@keyframes loader-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

.loader-brand {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(2.4rem, 8vw, 4rem);
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    color: var(--cyan);
    text-shadow: 0 0 24px rgba(0, 245, 212, 0.45);
}

.loader-bracket {
    color: var(--muted);
    text-shadow: none;
}

/* Letters that are still scrambling */
.loader-letters .scramble {
    color: rgba(0, 245, 212, 0.35);
    text-shadow: none;
}

.loader-bar {
    width: min(260px, 70vw);
    height: 2px;
    margin-top: 28px;
    border-radius: 2px;
    background: var(--border);
    overflow: hidden;
}

.loader-progress {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    box-shadow: 0 0 12px var(--cyan);
    transform: scaleX(0);
    transform-origin: left;
}

.loader-meta {
    width: min(260px, 70vw);
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--muted);
}

.loader-percent {
    color: var(--cyan);
}

@media (prefers-reduced-motion: reduce) {
    #loader {
        transition: opacity 0.4s ease, visibility 0s linear 0.4s;
    }

    #loader.hidden {
        transform: none;
        opacity: 0;
    }
}

/* ── NAVBAR ──────────────────────────────────── */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 18px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(20px);
    background: rgba(7, 7, 17, 0.7);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

/* Same <CNCC/> wordmark as the loader, scaled down */
.nav-brand {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--cyan);
    text-shadow: 0 0 12px rgba(0, 245, 212, 0.35);
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-bracket {
    color: var(--muted);
    text-shadow: none;
}

.nav-brand img {
    width: 32px;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

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

.nav-links a:hover {
    color: var(--cyan);
}

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

.nav-links a.active {
    color: var(--cyan);
}

.nav-links a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* ── HERO ──────────────────────────────────────── */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 6% 60px;
    position: relative;
    overflow: hidden;
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 245, 212, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 212, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.hero-glow {
    position: absolute;
    top: 20%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 245, 212, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 60px;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 245, 212, 0.08);
    border: 1px solid rgba(0, 245, 212, 0.2);
    border-radius: 50px;
    padding: 6px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--cyan);
    margin-bottom: 24px;
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--cyan);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

.hero-name {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 12px;
}

.hero-name span {
    background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-role {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 20px;
}

.hero-role span {
    color: var(--cyan);
}

.hero-desc {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--muted);
    margin-bottom: 36px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: var(--bg);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 245, 212, 0.3);
    color: var(--bg);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-ghost:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    transform: translateY(-2px);
}

.hero-socials {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
}

.social-link:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(0, 245, 212, 0.05);
}

/* Profile: a gradient-rimmed portrait inside two HUD rings (a comet on the
   orbit ring, a dashed reticle outside it), with stat cards floating over them.
   The rings hang off .hero-portrait, which is always square, so they stay round
   whatever the stat cards do. The margin reserves room for the outer ring. */
.hero-image-wrap {
    position: relative;
    flex-shrink: 0;
    margin: 40px;
}

.hero-portrait {
    position: relative;
    width: 340px;
    aspect-ratio: 1;
    padding: 3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue) 55%, rgba(59, 130, 246, 0.15));
    box-shadow: 0 0 40px rgba(0, 245, 212, 0.2), 0 0 120px rgba(59, 130, 246, 0.12);
}

/* Outer reticle: a dashed ring with ticks at the four compass points, turning
   slowly against the comet */
.hero-portrait::before {
    content: '';
    position: absolute;
    inset: -40px;
    border-radius: 50%;
    border: 1px dashed rgba(0, 245, 212, 0.2);
    background:
        linear-gradient(rgba(0, 245, 212, 0.6) 0 0) top / 1px 12px,
        linear-gradient(rgba(0, 245, 212, 0.6) 0 0) bottom / 1px 12px,
        linear-gradient(rgba(0, 245, 212, 0.6) 0 0) left / 12px 1px,
        linear-gradient(rgba(0, 245, 212, 0.6) 0 0) right / 12px 1px;
    background-repeat: no-repeat;
    background-origin: border-box;
    animation: rotate 60s linear infinite reverse;
    pointer-events: none;
}

/* Rim light and a teal uplight, so the dark photo sits in the frame instead of
   reading as a hole */
.hero-portrait::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 115%, rgba(0, 245, 212, 0.22), transparent 55%);
    box-shadow: inset 0 0 28px rgba(0, 245, 212, 0.18);
    pointer-events: none;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    background: var(--bg);
}

/* Orbit ring. The ring turns; its arc (::after) is a conic gradient that
   brightens toward the dot (::before), so the dot drags a fading comet tail. */
.hero-image-ring {
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    animation: rotate 14s linear infinite;
    pointer-events: none;
}

.hero-image-ring::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(rgba(0, 245, 212, 0.1) 0deg 200deg, rgba(0, 245, 212, 0.9) 360deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
}

.hero-image-ring::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--cyan), 0 0 24px rgba(0, 245, 212, 0.6);
    transform: translate(-50%, -50%);
    z-index: 1;
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

/* Glass stat cards pinned to opposite corners of the portrait */
.hero-stat-cards {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.stat-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px 12px 12px;
    background: rgba(13, 13, 26, 0.72);
    border: 1px solid rgba(0, 245, 212, 0.16);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.8);
    text-align: left;
    white-space: nowrap;
}

.stat-card:nth-child(1) {
    top: 10%;
    left: -72px;
}

.stat-card:nth-child(2) {
    bottom: 8%;
    right: -56px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(0, 245, 212, 0.2);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.16), rgba(59, 130, 246, 0.16));
    color: var(--cyan);
    font-size: 16px;
}

.stat-num {
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-lbl {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

@media (prefers-reduced-motion: reduce) {

    .hero-image-ring,
    .hero-portrait::before {
        animation: none;
    }
}

/* ── SECTION BASE ─────────────────────────────── */
section {
    position: relative;
    z-index: 1;
}

.section-tag {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 16px;
}

.section-sub {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.8;
    max-width: 560px;
}

/* ── SCROLL ANIMATIONS ──────────────────────────── */
/* data-aos="stagger": AOS toggles the group, and each child rises in with the
   delay the inline script gives it. Both states are driven by animations, never
   by the children's own opacity/transform, so their `transition: all` doesn't
   kick in and their hover lifts still work once the rise has finished. */
[data-aos="stagger"].aos-init>* {
    animation: aos-hidden 1s both paused;
}

[data-aos="stagger"].aos-init.aos-animate>* {
    animation: aos-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

@keyframes aos-hidden {

    from,
    to {
        opacity: 0;
    }
}

@keyframes aos-rise {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* Once risen in, the hero stat cards bob in opposite phase. `translate` stacks
   on the rise's `transform`, so the two animations don't fight. Desktop only:
   side by side on mobile, a see-saw would look wobbly. */
@media (min-width: 901px) {
    .hero-stat-cards.aos-init.aos-animate>.stat-card {
        animation: aos-rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) backwards,
            stat-float 3s ease-in-out infinite alternate;
    }

    .hero-stat-cards.aos-init.aos-animate>.stat-card:nth-child(2) {
        animation-direction: normal, alternate-reverse;
    }
}

@keyframes stat-float {
    to {
        translate: 0 -8px;
    }
}

/* ── ABOUT ──────────────────────────────────────── */
#about {
    padding: 120px 6%;
    background: var(--bg2);
}

.about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.about-image-wrap {
    position: relative;
}

.about-img-frame {
    width: 100%;
    aspect-ratio: 4/5;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.about-img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-corner {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 20px;
    opacity: 0.15;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.astat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
}

.astat:hover {
    border-color: rgba(0, 245, 212, 0.3);
    transform: translateY(-2px);
}

.astat-num {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--cyan);
}

.astat-lbl {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.tag {
    padding: 6px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 13px;
    color: var(--muted);
    transition: all 0.3s;
}

.tag:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

/* ── JOURNEY ──────────────────────────────────── */
#journey {
    padding: 120px 6%;
    background: var(--bg);
}

.journey-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.journey-header {
    text-align: center;
    margin-bottom: 64px;
}

.journey-header .section-sub {
    margin: 0 auto;
}

.timeline {
    position: relative;
}

.timeline-line {
    --x: 50%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--x);
    width: 2px;
    margin-left: -1px;
    background: linear-gradient(to bottom, transparent, var(--border) 40px);
}

/* Height is set from scroll position by the inline script */
.timeline-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    border-radius: 2px;
    background: linear-gradient(to bottom, transparent, var(--cyan) 40px, var(--blue));
    box-shadow: 0 0 12px rgba(0, 245, 212, 0.45);
}

/* Glowing head riding the end of the fill */
.timeline-fill::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.25), 0 0 16px var(--cyan);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline.is-active .timeline-fill::after {
    opacity: 1;
}

.timeline-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.timeline-item {
    --gap: 64px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr var(--gap) 1fr;
    align-items: start;
}

.timeline-item+.timeline-item {
    margin-top: 32px;
}

.timeline-node {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    position: relative;
    z-index: 1;
    width: 16px;
    height: 16px;
    margin-top: 24px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--border);
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Short connector from the node to its card */
.timeline-node::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: calc(var(--gap) / 2 - 8px);
    height: 2px;
    margin-top: -1px;
    background: var(--border);
    transition: background 0.4s ease;
}

.timeline-item:nth-child(odd) .timeline-node::before {
    left: auto;
    right: 100%;
}

.timeline-item.is-lit .timeline-node {
    background: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 0 0 5px rgba(0, 245, 212, 0.15), 0 0 18px rgba(0, 245, 212, 0.6);
}

.timeline-item.is-lit .timeline-node::before {
    background: rgba(0, 245, 212, 0.5);
}

.timeline-item--now.is-lit .timeline-node {
    animation: pulse 2s infinite;
}

.timeline-content {
    grid-column: 3;
    grid-row: 1;
}

.timeline-item:nth-child(odd) .timeline-content {
    grid-column: 1;
}

.timeline-card {
    padding: 22px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
        border-color 0.35s ease, box-shadow 0.35s ease;
}

.timeline-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 245, 212, 0.35);
    box-shadow: 0 16px 36px -18px rgba(0, 245, 212, 0.3);
}

.timeline-year {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--cyan);
}

.timeline-item--now .timeline-year::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    animation: pulse 2s infinite;
}

.timeline-card h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

.timeline-place {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text);
    opacity: 0.7;
}

.timeline-card p {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--muted);
}

.timeline-card .project-tags {
    margin: 14px 0 0;
}

/* ── PROJECTS ─────────────────────────────────── */
#projects {
    padding: 120px 6%;
    background: var(--bg);
}

.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 60px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

/* AOS animates this wrapper, so the card's own transform is free for the tilt */
.project-wrap {
    position: relative;
    perspective: 1000px;
}

/* Custom AOS entrance: the card materializes out of a blurred, overexposed glow */
[data-aos="holo-in"] {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    filter: blur(8px) brightness(1.6);
    transition-property: opacity, transform, filter;
}

[data-aos="holo-in"].aos-animate {
    opacity: 1;
    transform: none;
    filter: none;
}

/* Scan line that sweeps down the card as it materializes. The band sits just
   outside the box before and after, so it only shows while it's moving. */
.project-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(to bottom, transparent, rgba(0, 245, 212, 0.1) 70%,
            rgba(0, 245, 212, 0.9) 98%, transparent) 0 -120px / 100% 120px no-repeat;
    transition: background-position 1.1s ease-in-out;
    transition-delay: inherit;
    pointer-events: none;
}

.project-wrap.aos-animate::after {
    background-position: 0 calc(100% + 120px);
}

.project-card {
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
        border-color 0.4s ease, box-shadow 0.4s ease;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    transform: scaleX(0);
    transition: transform 0.4s ease;
    z-index: 4;
}

/* Holo-foil sheen + cursor glare, positioned by --mx/--my from the tilt script */
.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, 0.1), transparent 45%),
        linear-gradient(115deg, transparent 25%, rgba(0, 245, 212, 0.12) 40%,
            rgba(59, 130, 246, 0.12) 50%, rgba(0, 245, 212, 0.08) 60%, transparent 75%);
    background-size: 100% 100%, 250% 250%;
    background-position: center, var(--mx, 50%) var(--my, 50%);
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 3;
}

.project-card:hover {
    border-color: rgba(0, 245, 212, 0.4);
    transform: translateY(-6px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.2s ease-out, border-color 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 20px 44px -16px rgba(0, 245, 212, 0.28);
}

.project-card:hover::before,
.project-card:hover::after {
    transform: scaleX(1);
    opacity: 1;
}

.project-img {
    width: 100%;
    height: 160px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

/* Projector beam rising from the centre of the .holo-pad disc */
.project-img::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 24px;
    width: 180px;
    height: calc(100% - 24px);
    transform: translateX(-50%);
    background:
        radial-gradient(ellipse 22% 8% at 50% 100%, rgba(0, 245, 212, 0.85), rgba(0, 245, 212, 0.2) 55%, transparent 75%),
        linear-gradient(to top, rgba(0, 245, 212, 0.26), rgba(59, 130, 246, 0.06) 70%, transparent);
    clip-path: polygon(28% 100%, 72% 100%, 100% 0, 0 0);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* Scanlines + a sweeping scan bar */
.project-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, transparent, rgba(0, 245, 212, 0.16) 50%, transparent) 0 -40px / 100% 40px no-repeat,
        repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0 1px, transparent 1px 3px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.project-card:hover .project-img::before,
.project-card:hover .project-img::after {
    opacity: 1;
}

.project-card:hover .project-img::after {
    animation: holo-sweep 2.4s linear infinite;
}

/* Projector disc: a glowing ring seen at an angle that powers on under the
   beam, with two ripples (::before/::after) pulsing outward in turn */
.holo-pad {
    position: absolute;
    left: 50%;
    bottom: 14px;
    width: 100px;
    height: 20px;
    border: 2px solid rgba(0, 245, 212, 0.9);
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(0, 245, 212, 0.4), rgba(0, 245, 212, 0.08) 70%, transparent);
    box-shadow: 0 0 14px rgba(0, 245, 212, 0.55), inset 0 0 8px rgba(0, 245, 212, 0.5);
    transform: translateX(-50%) scale(0.5);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}

.holo-pad::before,
.holo-pad::after {
    content: '';
    position: absolute;
    inset: -2px;
    border: 1px solid rgba(0, 245, 212, 0.7);
    border-radius: 50%;
    opacity: 0;
}

.project-card:hover .holo-pad {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.project-card:hover .holo-pad::before,
.project-card:hover .holo-pad::after {
    animation: holo-ripple 2s ease-out infinite;
}

.project-card:hover .holo-pad::after {
    animation-delay: 1s;
}

.project-img img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    transition: transform 0.4s;
}

/* The icons are drawn on white: invert makes the white black, screen drops the
   black out, and the sepia/hue-rotate chain tints what's left cyan. */
.project-card:hover .project-img img {
    filter: invert(1) grayscale(1) sepia(1) saturate(3) hue-rotate(122deg);
    mix-blend-mode: screen;
    animation: holo-boot 0.6s linear both,
        holo-float 3.2s ease-in-out infinite,
        holo-flicker 5s linear 0.6s infinite;
}

.project-card:hover .project-body h3 {
    text-shadow: -1px 0 rgba(59, 130, 246, 0.7), 1px 0 rgba(0, 245, 212, 0.6);
}

@keyframes holo-boot {
    0% {
        opacity: 0;
        clip-path: inset(100% 0 0 0);
    }

    30% {
        opacity: 0.8;
    }

    40% {
        opacity: 0.2;
    }

    55% {
        opacity: 1;
    }

    65% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

@keyframes holo-float {

    0%,
    100% {
        transform: translateY(-4px) scale(1.12);
    }

    50% {
        transform: translateY(-10px) scale(1.12);
    }
}

@keyframes holo-flicker {

    0%,
    42%,
    44%,
    78%,
    80%,
    100% {
        opacity: 0.95;
    }

    43% {
        opacity: 0.5;
    }

    79% {
        opacity: 0.75;
    }
}

@keyframes holo-sweep {
    from {
        background-position: 0 -40px, 0 0;
    }

    to {
        background-position: 0 200px, 0 12px;
    }
}

@keyframes holo-ripple {
    from {
        transform: scale(1);
        opacity: 0.8;
    }

    to {
        transform: scale(1.7);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {

    .project-card:hover .project-img img,
    .project-card:hover .project-img::after,
    .project-card:hover .holo-pad::before,
    .project-card:hover .holo-pad::after {
        animation: none;
    }
}

.project-body {
    padding: 20px;
}

.project-body h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.project-body p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 14px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.tech-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.5px;
    padding: 4px 9px;
    border-radius: 6px;
    color: var(--cyan);
    background: rgba(0, 245, 212, 0.08);
    border: 1px solid rgba(0, 245, 212, 0.18);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cyan);
    text-decoration: none;
    transition: gap 0.2s;
}

.project-link:hover {
    gap: 10px;
    color: var(--cyan);
}

/* ── SKILLS ───────────────────────────────────── */
#skills {
    padding: 120px 6%;
    background: var(--bg2);
}

.skills-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.skills-header {
    margin-bottom: 48px;
}

.skills-bento {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Glass panel on a faint tech grid. On hover a spotlight and a border glow
   follow the cursor (--x/--y come from the inline script). */
.skill-panel {
    position: relative;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background:
        linear-gradient(rgba(0, 245, 212, 0.025) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, rgba(0, 245, 212, 0.025) 1px, transparent 1px) 0 0 / 28px 28px,
        var(--surface);
}

.skill-panel::before,
.skill-panel::after {
    content: '';
    position: absolute;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Border glow: the gradient is masked down to the 1px ring of the border */
.skill-panel::before {
    inset: -1px;
    padding: 1px;
    background: radial-gradient(300px circle at var(--x, 50%) var(--y, 0%), rgba(0, 245, 212, 0.7), transparent 60%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
}

.skill-panel::after {
    inset: 0;
    background: radial-gradient(420px circle at var(--x, 50%) var(--y, 0%), rgba(0, 245, 212, 0.06), transparent 60%);
}

.skill-panel:hover::before,
.skill-panel:hover::after {
    opacity: 1;
}

.panel-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.panel-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(0, 245, 212, 0.08);
    border: 1px solid rgba(0, 245, 212, 0.2);
    color: var(--cyan);
    font-size: 14px;
}

.panel-head h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.panel-count {
    margin-left: auto;
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 1px;
}

.skill-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* A short last row stretches so the panel never ends with a gap */
.skill-grid> :last-child:nth-child(3n + 1) {
    grid-column: span 3;
}

.skill-grid> :last-child:nth-child(3n + 2) {
    grid-column: span 2;
}

.skill-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 10px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    text-align: center;
    overflow: hidden;
    cursor: default;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
        border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease, color 0.35s ease;
}

/* Brand-colored glow that fades in from the top on hover */
.skill-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.skill-icon {
    position: relative;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.skill-icon img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

/* Dark logos: invert the lightness, then rotate the hue back so colors survive */
.skill-icon img.logo-invert {
    filter: invert(1) hue-rotate(180deg);
}

.skill-tile:hover {
    transform: translateY(-4px);
    color: #fff;
    border-color: color-mix(in srgb, var(--c) 55%, transparent);
    background: color-mix(in srgb, var(--c) 6%, transparent);
    box-shadow: 0 16px 32px -18px color-mix(in srgb, var(--c) 70%, transparent);
}

.skill-tile:hover::before {
    opacity: 1;
}

.skill-tile:hover .skill-icon {
    transform: scale(1.08) rotate(-4deg);
    border-color: color-mix(in srgb, var(--c) 50%, transparent);
    box-shadow: 0 0 24px -4px color-mix(in srgb, var(--c) 60%, transparent);
}

/* Mobile / Tools: slim strips with the heading beside a row of compact chips */
.skill-panel--strip {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-block: 16px;
}

.skill-panel--strip .panel-head {
    margin-bottom: 0;
    min-width: 170px;
}

.skill-panel--strip .skill-grid {
    flex: 1;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.skill-panel--strip .skill-grid> :last-child {
    grid-column: auto;
}

.skill-panel--strip .skill-tile {
    flex-direction: row;
    gap: 12px;
    padding: 10px 14px;
    text-align: left;
}

.skill-panel--strip .skill-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.skill-panel--strip .skill-icon img {
    width: 22px;
    height: 22px;
}

/* ── CONTACT ─────────────────────────────────── */
#contact {
    padding: 120px 6%;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

#contact::before {
    content: '';
    position: absolute;
    bottom: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.contact-inner {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 60px 50px;
    margin-top: 40px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
}

.contact-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}

.contact-link-row:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    transform: translateX(4px);
}

.contact-link-row .left {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
}

.contact-link-row .icon-circle {
    width: 36px;
    height: 36px;
    background: rgba(0, 245, 212, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--cyan);
}

.contact-link-row span {
    font-size: 12px;
    color: var(--muted);
}

/* ── FOOTER ──────────────────────────────────── */
footer {
    padding: 32px 6%;
    border-top: 1px solid var(--border);
    background: var(--bg2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

footer p {
    font-size: 13px;
    color: var(--muted);
}

footer p span {
    color: var(--cyan);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--cyan);
}

/* ── DIVIDER ─────────────────────────────────── */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 1100px) {
    .hero-portrait {
        width: 280px;
    }
}

@media (max-width: 900px) {
    .hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-image-wrap {
        order: 1;
        margin: 40px 0 0;
    }

    .hero-portrait {
        width: 280px;
        margin: 0 auto;
    }

    .hero-desc {
        margin: 0 auto 36px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-socials {
        justify-content: center;
    }

    /* Stat cards drop into a row below the rings */
    .hero-stat-cards {
        position: static;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        margin-top: 56px;
    }

    .stat-card {
        position: static;
    }

    .about-inner {
        grid-template-columns: 1fr;
    }

    .about-image-wrap {
        max-width: 360px;
        margin: 0 auto;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
        flex-direction: column;
    }

    .projects-header {
        flex-direction: column;
        gap: 20px;
    }

    .journey-header {
        text-align: left;
    }

    .journey-header .section-sub {
        margin: 0;
    }

    /* Timeline collapses to one column with the line on the left */
    .timeline-line {
        --x: 12px;
    }

    .timeline-item {
        grid-template-columns: 24px 1fr;
        column-gap: 16px;
    }

    .timeline-node {
        grid-column: 1;
    }

    .timeline-node::before,
    .timeline-item:nth-child(odd) .timeline-node::before {
        left: 100%;
        right: auto;
        width: 20px;
    }

    .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content {
        grid-column: 2;
    }

    /* AOS starts fade-left cards 100px to the right, which pushes the single
       column past the screen edge and widens the page — rise in instead */
    .timeline-content[data-aos] {
        transform: translate3d(0, 40px, 0);
    }

    .skills-bento {
        grid-template-columns: 1fr;
    }

    .skill-panel--strip {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .skill-panel--strip .panel-head {
        margin-bottom: 16px;
    }
}

@media (max-width: 600px) {
    #hero {
        padding: 90px 5% 60px;
    }

    #about,
    #projects,
    #skills,
    #contact {
        padding: 80px 5%;
    }

    .contact-card {
        padding: 40px 24px;
    }

    /* Keep the offset accent inside the screen on small phones */
    .about-corner {
        right: -12px;
        bottom: -12px;
    }

    .skill-panel {
        padding: 18px;
    }

    .skill-grid {
        gap: 10px;
    }

    .skill-tile {
        padding: 14px 6px 12px;
        font-size: 12px;
    }

    .hero-portrait {
        width: 220px;
    }
}

/* ── TYPING CURSOR ───────────────────────────── */
.typed-cursor {
    color: var(--cyan);
}