/* =========================================================
   Ronak Sarda / portfolio
   Two worlds: night (deep space) and morning (anime valley)
   ========================================================= */

:root {
    --font-body: 'Hanken Grotesk', system-ui, sans-serif;
    --font-display: 'Archivo', 'Hanken Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --ease-back: cubic-bezier(.22, 1, .36, 1);
    --radius: 12px;
    --max: 1180px;

    /* night defaults */
    --bg: #05060f;
    --text: #eef0ff;
    --muted: #9aa0c3;
    --line: rgba(255, 255, 255, .09);
    --glass: rgba(12, 14, 34, .88);
    --glass-strong: rgba(14, 16, 38, .82);
    --a1: #9fd6ff;
    --a2: #f6c177;
    --a3: #ff8f6b;
    --a1-rgb: 159, 214, 255;
    --a3-rgb: 255, 143, 107;
    --grad: #ff8f6b;
    --shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
    --ink-on-accent: #05060f;
}

html[data-world="day"] {
    --bg: #bfe3f7;
    --text: #18263a;
    --muted: #4c5d74;
    --line: rgba(24, 38, 58, .12);
    --glass: rgba(255, 255, 255, .9);
    --glass-strong: rgba(255, 255, 255, .9);
    --a1: #2f8f5b;
    --a2: #2f7fc1;
    --a3: #ff7a59;
    --a1-rgb: 47, 143, 91;
    --a3-rgb: 255, 122, 89;
    --grad: #e8603c;
    --shadow: 0 30px 70px -35px rgba(30, 60, 90, .45);
    --ink-on-accent: #fff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: color .6s var(--ease);
}
body.no-cursor-fx { cursor: auto; }
body.loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: var(--a3); color: var(--ink-on-accent); }
code { font-family: var(--font-mono); font-size: .9em; padding: .1em .4em; border-radius: 6px; background: var(--line); }

/* View transition for world switch (circle reveal from toggle) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 9999; }

/* ================= LOADER ================= */
#loader {
    position: fixed; inset: 0; z-index: 10000;
    display: grid; place-items: center; align-content: center; gap: 22px;
    background: #05060f; color: #eef0ff;
    transition: clip-path 1s var(--ease), opacity .4s;
    clip-path: circle(150% at 50% 50%);
}
#loader.done { clip-path: circle(0% at 50% 50%); pointer-events: none; }
.ld-orbit { position: relative; width: 110px; height: 110px; border: 1px dashed rgba(255,255,255,.2); border-radius: 50%; animation: spin 2.4s linear infinite; }
.ld-planet { position: absolute; inset: 32px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #e3f3ff, #9fd6ff 40%, #f6c177); box-shadow: 0 0 40px #9fd6ff; animation: spin 2.4s linear infinite reverse; }
.ld-moon { position: absolute; width: 14px; height: 14px; top: -7px; left: calc(50% - 7px); border-radius: 50%; background: #ff8f6b; box-shadow: 0 0 18px #ff8f6b; }
.ld-text { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .3em; text-transform: uppercase; color: #9aa0c3; }
.ld-bar { width: min(280px, 70vw); height: 2px; background: rgba(255,255,255,.1); overflow: hidden; border-radius: 2px; }
.ld-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #9fd6ff, #ff8f6b); }
.ld-count { font-family: var(--font-display); font-size: 3.4rem; line-height: 1; }

/* ================= WORLDS ================= */
.world { position: fixed; inset: 0; z-index: 0; pointer-events: none; transition: opacity 1.2s var(--ease); overflow: hidden; }
#world-day { opacity: 0; }
html[data-world="day"] #world-day { opacity: 1; }
html[data-world="day"] #world-night { opacity: 0; }
.world canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* --- night --- */
#world-night { background: radial-gradient(ellipse at 50% 120%, #1f1530 0%, #07081a 45%, #03040b 100%); }
.nebula { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; mix-blend-mode: screen; animation: drift 26s ease-in-out infinite alternate; }
.nb1 { width: 55vw; height: 55vw; left: -12vw; top: -10vw; background: radial-gradient(circle, rgba(246,193,119,.55), transparent 65%); }
.nb2 { width: 50vw; height: 50vw; right: -14vw; top: 30vh; background: radial-gradient(circle, rgba(255,143,107,.4), transparent 65%); animation-duration: 32s; }
.nb3 { width: 45vw; height: 45vw; left: 30vw; bottom: -20vw; background: radial-gradient(circle, rgba(159,214,255,.32), transparent 65%); animation-duration: 38s; }
@keyframes drift { to { transform: translate3d(6vw, -4vh, 0) scale(1.15); } }

.planet-big {
    position: absolute; width: 260px; height: 260px; left: -90px; bottom: -70px; border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, #ffe9c9 0%, #ff8f6b 22%, #c2562e 58%, #2a1208 82%);
    box-shadow: inset -30px -20px 60px rgba(0,0,0,.6), 0 0 90px rgba(255,143,107,.35);
    will-change: transform; opacity: .85;
}
.planet-big .ring { position: absolute; inset: 40% -45%; border-radius: 50%; border: 10px solid rgba(159,214,255,.45); border-top-color: rgba(159,214,255,.12); transform: rotate(-18deg); box-shadow: 0 0 30px rgba(159,214,255,.3); }
.planet-small { position: absolute; width: 54px; height: 54px; right: 4vw; top: 13vh; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #eef7ff, #9fd6ff 35%, #2b4a73 80%); box-shadow: inset -12px -8px 20px rgba(0,0,0,.6), 0 0 40px rgba(159,214,255,.4); will-change: transform; opacity: .8; }

/* --- day --- */
.sky { position: absolute; inset: 0; background: linear-gradient(180deg, #4aa6e8 0%, #7cc4f0 30%, #bfe3f7 58%, #ffe9c7 78%, #ffd7a8 100%); }
.sun {
    position: absolute; width: 150px; height: 150px; left: 70%; top: 14%; border-radius: 50%;
    background: radial-gradient(circle, #fffef2 0%, #fff4c2 40%, #ffd98a 70%, rgba(255,217,138,0) 72%);
    box-shadow: 0 0 120px 60px rgba(255,236,170,.55), 0 0 300px 140px rgba(255,220,150,.35);
    will-change: transform;
}
html[data-world="day"] .sun { animation: sunrise 2.2s var(--ease) both; }
@keyframes sunrise { from { transform: translateY(45vh) scale(.8); } }
.sun .rays { position: absolute; inset: -260px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255,250,220,.22) 0 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(circle, #000 15%, transparent 65%); mask: radial-gradient(circle, #000 15%, transparent 65%); animation: spin 90s linear infinite; }
#valley { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; }
#valley .layer { will-change: transform; }
#valley .river { stroke-dasharray: 18 26; animation: flow 3s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -88; } }
#valley .mist { animation: mist 18s ease-in-out infinite alternate; }
@keyframes mist { to { transform: translateX(-80px); } }
#valley .tree { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 5s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-1.5deg); } to { transform: rotate(1.8deg); } }
.birds { position: absolute; left: -10%; top: 22%; animation: fly 38s linear infinite; }
.birds i { position: absolute; width: 22px; height: 10px; }
.birds i::before, .birds i::after { content: ''; position: absolute; top: 4px; width: 12px; height: 2px; background: #2c3e55; border-radius: 2px; animation: flap .6s ease-in-out infinite alternate; }
.birds i::before { left: 0; transform-origin: right center; }
.birds i::after { right: 0; transform-origin: left center; animation-direction: alternate-reverse; }
.birds i:nth-child(1) { left: 0; top: 0; }
.birds i:nth-child(2) { left: 30px; top: 14px; transform: scale(.8); }
.birds i:nth-child(3) { left: -26px; top: 18px; transform: scale(.85); }
.birds i:nth-child(4) { left: 64px; top: 30px; transform: scale(.6); }
.birds i:nth-child(5) { left: -60px; top: 34px; transform: scale(.65); }
@keyframes flap { from { transform: rotate(22deg); } to { transform: rotate(-18deg); } }
@keyframes fly { from { transform: translate(0, 0); } 50% { transform: translate(60vw, -6vh); } to { transform: translate(125vw, 4vh); } }

/* ================= FX ================= */
#fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none; }
.grain { position: fixed; inset: -50%; z-index: 61; pointer-events: none; opacity: .06; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1s steps(6) infinite; }
@keyframes grain { 0%,100% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); } 40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-1%); } 80% { transform: translate(3%,3%); } }
#cursor { position: fixed; left: 0; top: 0; z-index: 9000; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.75); pointer-events: none; display: grid; place-items: center; transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .3s, border-color .3s; }
html[data-world="day"] #cursor { border-color: var(--a3); }
#cursor.big { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: var(--a1); border-color: transparent; }
html[data-world="day"] #cursor.big { background: rgba(255,122,89,.9); }
#cursor-label { font: 600 .66rem/1 var(--font-mono); color: #05060f; opacity: 0; text-transform: lowercase; transition: opacity .2s; white-space: nowrap; }
html[data-world="day"] #cursor-label { color: #fff; }
#cursor.big #cursor-label { opacity: 1; }
@media (hover: none) { #cursor { display: none; } }
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 9500; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }
#toast { position: fixed; left: 50%; bottom: 28px; z-index: 9600; transform: translate(-50%, 140%); padding: 12px 20px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font: 500 .9rem var(--font-mono); transition: transform .5s var(--ease-back), opacity .3s, visibility .3s; box-shadow: var(--shadow); max-width: calc(100vw - 32px); opacity: 0; visibility: hidden; }
#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ================= NAV ================= */
.nav { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 100; width: min(var(--max), calc(100% - 28px)); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px 10px 18px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); transition: transform .5s var(--ease), background .6s; }
.nav.hide { transform: translate(-50%, -140%); }
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.05rem var(--font-mono); }
.brand-orb { width: 22px; height: 22px; border-radius: 50%; background: var(--grad); animation: spin 6s linear infinite; position: relative; }
.brand-orb::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--bg); }
.blink { animation: blink 1s steps(1) infinite; color: var(--a3); }
@keyframes blink { 50% { opacity: 0; } }
.nav-links { display: flex; gap: 4px; }
.nav-links a { position: relative; padding: 8px 14px; border-radius: 999px; font-size: .92rem; color: var(--muted); transition: color .3s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--a3); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.btn-mini { padding: 9px 16px; border-radius: 999px; background: var(--text); color: var(--bg); font: 600 .85rem var(--font-mono); white-space: nowrap; transition: transform .3s var(--ease-back); }
.btn-mini:hover { transform: scale(1.06); }

.world-toggle { display: flex; align-items: center; gap: 8px; font: 600 .78rem var(--font-mono); color: var(--muted); }
.wt-track { position: relative; width: 60px; height: 30px; border-radius: 999px; background: linear-gradient(135deg, #191d4a, #2b1450); border: 1px solid rgba(255,255,255,.15); overflow: hidden; transition: background .8s var(--ease); }
html[data-world="day"] .wt-track { background: linear-gradient(135deg, #67bff5, #bfe8ff); }
.wt-knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; transition: transform .8s var(--ease-back); }
html[data-world="day"] .wt-knob { transform: translateX(30px) rotate(180deg); }
.wt-moon, .wt-sun { position: absolute; inset: 0; border-radius: 50%; transition: opacity .5s; }
.wt-moon { background: #e8ebff; box-shadow: inset -6px -3px 0 #b7bce8; }
.wt-sun { background: #ffd34d; box-shadow: 0 0 12px #ffd34d; opacity: 0; }
html[data-world="day"] .wt-sun { opacity: 1; }
html[data-world="day"] .wt-moon { opacity: 0; }
.wt-stars i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; transition: opacity .5s, transform .6s; }
.wt-stars i:nth-child(1) { left: 36px; top: 7px; } .wt-stars i:nth-child(2) { left: 46px; top: 16px; width: 2px; height: 2px; } .wt-stars i:nth-child(3) { left: 38px; top: 21px; width: 2px; height: 2px; }
html[data-world="day"] .wt-stars i { opacity: 0; transform: translateY(10px); }
.wt-cloud { position: absolute; left: 6px; top: 12px; width: 18px; height: 8px; border-radius: 8px; background: #fff; opacity: 0; transform: translateY(10px); transition: opacity .5s .2s, transform .6s .2s; }
.wt-cloud::before { content: ''; position: absolute; left: 4px; top: -5px; width: 9px; height: 9px; border-radius: 50%; background: #fff; }
html[data-world="day"] .wt-cloud { opacity: 1; transform: none; }

.burger { display: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); transition: transform .4s var(--ease); }
.burger span:first-child { top: 15px; } .burger span:last-child { top: 23px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ================= LAYOUT ================= */
main, .footer { position: relative; z-index: 2; }
.section { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; padding: 130px 0 40px; }
.sec-head { margin-bottom: 40px; max-width: 60ch; }
.sec-num { display: none; }
.sec-title { font: 800 clamp(2.4rem, 6.5vw, 5.2rem)/0.95 var(--font-display); letter-spacing: -.02em; }
.sec-title::after { content: '.'; color: var(--a3); }
.sec-note { color: var(--muted); font-family: var(--font-mono); font-size: .85rem; margin-top: 12px; }
.sub-title { font: 700 1.4rem var(--font-display); margin: 70px 0 22px; }
.sub-title span { font: 400 .9rem var(--font-mono); color: var(--muted); }
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); transition: background .6s, border-color .3s; }
.grad-text { color: var(--a3); }
@keyframes shimmer { to { background-position: -200% 0; } }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); font: 500 .82rem var(--font-mono); }
.muted { color: var(--muted); }
mark { background: linear-gradient(transparent 60%, rgba(var(--a3-rgb), .35) 60%); color: inherit; padding: 0 2px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* buttons */
.btn { position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; border-radius: 999px; font-weight: 600; overflow: hidden; isolation: isolate; transition: transform .4s var(--ease-back); }
.btn b { transition: transform .4s var(--ease-back); }
.btn:hover b { transform: translateX(5px); }
.btn-primary { background: var(--grad); background-size: 200% 100%; color: var(--ink-on-accent); }
.btn-ghost { border: 1px solid var(--line); background: var(--glass); }
.btn-ghost::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--text); transform: translateY(101%); border-radius: inherit; transition: transform .5s var(--ease); }
.btn-ghost:hover { color: var(--bg); }
.btn-ghost:hover::before { transform: none; }

/* ================= HERO ================= */
.hero { position: relative; min-height: 100svh; width: min(var(--max), calc(100% - 32px)); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; gap: 40px; padding: 120px 0 80px; }
.status-pill { display: none; align-items: center; gap: 10px; padding: 8px 16px 8px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-size: .88rem; margin-bottom: 26px; }
.pulse, .dot-live { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #3dff9a; flex: none; }
.pulse::after, .dot-live::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 1.6s ease-out infinite; }
@keyframes ping { to { transform: scale(3.4); opacity: 0; } }
.hero-hello { font: 500 1.1rem var(--font-mono); color: var(--muted); }
.hero-name { font: 800 clamp(3.2rem, 8.2vw, 8.4rem)/.86 var(--font-display); letter-spacing: -.035em; margin: 6px 0 18px; user-select: none; }
.hn-row { display: block; white-space: nowrap; }
.hn-row .ch { display: inline-block; transform-origin: 50% 100%; will-change: transform; }
.hn-row .ch.drop { animation: drop 1.1s var(--ease-back) both; animation-delay: calc(var(--i) * .06s + .2s); }
@keyframes drop { from { transform: translateY(-120%) rotate(-25deg); opacity: 0; } }
.hn-row .ch.jelly { animation: jelly .8s var(--ease) both; }
@keyframes jelly { 0% { transform: scale(1,1); } 30% { transform: scale(1.25,.75); } 45% { transform: scale(.8,1.2) translateY(-12%); } 65% { transform: scale(1.1,.9); } 100% { transform: scale(1,1); } }
.hn-row .ch:hover { color: var(--a1); }
.hn-solid .ch { color: var(--a3); }
.hn-solid .ch:hover { color: var(--text); }
.hero-aka { color: var(--muted); font-size: 1.02rem; }
.aka-chip { display: inline-block; padding: 1px 12px; border-radius: 999px; background: var(--grad); color: var(--ink-on-accent); font-weight: 700; transform: rotate(-4deg);  }
@keyframes wobble { 50% { transform: rotate(4deg) scale(1.05); } }
.hero-tag { font-size: clamp(1.2rem, 2.4vw, 1.7rem); font-weight: 500; margin: 22px 0 34px; max-width: 34ch; }
.typed-wrap { white-space: nowrap; font-family: var(--font-mono); color: var(--a1); }
.caret { animation: blink .9s steps(1) infinite; color: var(--a3); margin-left: 2px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-open { margin-top: 30px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-family: var(--font-mono); font-size: .86rem; }
.hero-open b { color: var(--text); }

.hero-right { display: grid; place-items: center; }
.avatar-system { position: relative; width: min(420px, 80vw); aspect-ratio: 1; display: grid; place-items: center; }
.avatar-core { position: relative; width: 52%; aspect-ratio: 1; border-radius: 50%; padding: 5px; background: var(--grad); will-change: transform; transition: transform .2s; }
.avatar-core img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; border-radius: 50%; border: 4px solid var(--bg); }
.avatar-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 24s linear infinite; }
.avatar-ring text { font: 600 11.2px var(--font-mono); letter-spacing: .14em; fill: var(--muted); }
.orbit { position: absolute; border-radius: 50%; border: 1px dashed var(--line); animation: spin var(--t) linear infinite; }
.orbit.o1 { inset: 4%; --t: 14s; } .orbit.o2 { inset: -6%; --t: 22s; animation-direction: reverse; } .orbit.o3 { inset: 14%; --t: 10s; } .orbit.o4 { inset: -16%; --t: 30s; }
.sat { position: absolute; top: -17px; left: calc(50% - 17px); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 .68rem var(--font-mono); background: var(--glass-strong); border: 1px solid var(--line); color: var(--a1); animation: spin var(--t) linear infinite reverse; }
.o2 .sat { color: var(--a3); animation-direction: normal; } .o4 .sat { color: var(--a2); }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; width: 26px; height: 42px; margin-left: -13px; border: 2px solid var(--muted); border-radius: 20px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--a1); animation: cue 1.6s ease-in-out infinite; }
@keyframes cue { to { transform: translateY(14px); opacity: 0; } }

/* ================= MARQUEE ================= */
.marquee { position: relative; z-index: 2; overflow: hidden; padding: 20px 0; background: var(--text); color: var(--bg); transform: rotate(-2.5deg) scale(1.04); margin: 30px 0; box-shadow: var(--shadow); }
.mq-track { display: flex; gap: 32px; width: max-content; animation: marquee 26s linear infinite; font: 800 clamp(1.4rem, 3.4vw, 2.4rem)/1 var(--font-display); white-space: nowrap; }
.mq-track i { font-style: normal; color: var(--a3); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ================= ABOUT ================= */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.terminal { overflow: hidden; font-family: var(--font-mono); font-size: .86rem; background: rgba(6, 8, 20, .85); color: #d7dcff; border-color: rgba(255,255,255,.1); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.term-bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: auto; color: #8086ad; font-size: .75rem; }
.term-body { height: 380px; overflow-y: auto; padding: 16px 18px; scrollbar-width: thin; }
.term-body .ln { white-space: pre-wrap; word-break: break-word; }
.term-body .c1 { color: #9fd6ff; } .term-body .c2 { color: #ff8f6b; } .term-body .c3 { color: #3dff9a; } .term-body .c4 { color: #8086ad; } .term-body .c5 { color: #ffd34d; }
.term-body a { color: #9fd6ff; text-decoration: underline; }
.term-line { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.term-ps { color: #3dff9a; flex: none; }
#term-input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font: inherit; caret-color: #ff8f6b; cursor: text; }
#term-input::placeholder { color: #4b5078; }
.about-copy .lead { font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.5; font-weight: 500; margin-bottom: 18px; }
.about-copy p { color: var(--muted); margin-bottom: 28px; max-width: 62ch; }
.about-copy .lead { color: var(--text); }
.stat-grid { display: grid; grid-template-columns: repeat(4, auto); gap: 14px 28px; justify-content: start; border-top: 1px solid var(--line); padding-top: 22px; }
.stat { padding: 0; background: none; border: 0; }
.stat b { display: block; font: 800 2.4rem/1 var(--font-display); }
.stat span { font-size: .85rem; color: var(--muted); }

/* ================= JOURNEY ================= */
.journey { list-style: none; position: relative; padding-left: 46px; display: grid; gap: 26px; }
.journey-line { position: absolute; left: 14px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.journey-line span { position: absolute; inset: 0; background: var(--grad); transform-origin: top; transform: scaleY(0); border-radius: 2px; }
.j-item { position: relative; }
.j-node { position: absolute; left: -40px; top: 28px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 2px solid var(--a1); transition: background .4s, transform .4s var(--ease-back); }
.j-item.in .j-node { background: var(--a1); transform: scale(1.15); }
.j-card { padding: 26px 28px; }
.j-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.j-when { font: 500 .8rem var(--font-mono); color: var(--muted); }
.j-tag { font: 600 .78rem var(--font-mono); padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line); }
.j-tag.hot { background: var(--grad); color: var(--ink-on-accent); border: 0; }
.j-card h3 { font: 700 1.35rem/1.25 var(--font-display); }
.j-where { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.j-card ul { margin-top: 14px; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.j-card li { position: relative; padding-left: 22px; color: var(--muted); font-size: .96rem; }
.j-card li::before { content: '›'; position: absolute; left: 0; color: var(--a3); font-size: .8rem; top: 2px; }
.j-card li b { color: var(--text); font-weight: 600; }

/* ================= WORK ================= */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.filter { padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--glass); font: 500 .88rem var(--font-mono); transition: background .3s, color .3s, transform .3s var(--ease-back); }
.filter:hover { transform: translateY(-2px); }
.filter.active { background: var(--text); color: var(--bg); }
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.proj { position: relative; display: flex; flex-direction: column; overflow: hidden; text-align: left; transform-style: preserve-3d; transition: opacity .5s var(--ease), transform .5s var(--ease), filter .5s; will-change: transform; }
.proj.wide { grid-column: span 2; }
.proj.wide .proj-viz { aspect-ratio: 21 / 8; }
.proj.hidden { display: none; }
.proj.leaving { opacity: 0; transform: scale(.92); filter: blur(6px); }
.proj::before { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--a1-rgb), .14), transparent 40%); opacity: 0; transition: opacity .4s; }
.proj:hover::before { opacity: 1; }
.proj-viz { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); background: #070919; color: #e9ecff; }
html[data-world="day"] .proj-viz { background: #12223a; }
.proj-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.proj-top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.proj h3 { font: 800 1.6rem/1.1 var(--font-display); }
.proj-kicker { font: 500 .8rem var(--font-mono); color: var(--a3); }
.proj-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge { font: 600 .68rem var(--font-mono); padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.badge.live { border-color: #3dff9a; color: #3dff9a; } html[data-world="day"] .badge.live { color: #1c7a45; border-color: #1c7a45; }
.badge.wip { border-color: #ffd34d; color: #ffd34d; } html[data-world="day"] .badge.wip { color: #9a6a00; border-color: #c99a1d; }
.badge.team { border-color: var(--a2); color: var(--a2); }
.badge.star { color: var(--text); }
.proj p { color: var(--muted); font-size: .96rem; }
.proj-hook { color: var(--text) !important; font-weight: 600; font-size: 1.02rem !important; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.tags span { font: 500 .72rem var(--font-mono); padding: 4px 10px; border-radius: 6px; background: var(--line); }
.proj-open { font: 600 .8rem var(--font-mono); color: var(--a1); margin-top: 8px; display: inline-flex; gap: 6px; }
.proj:hover .proj-open b { transform: translateX(5px); }
.proj-open b { transition: transform .3s var(--ease-back); }

/* --- project visualisations --- */
.viz { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); }
.viz-gif img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: transform 1.2s var(--ease); }
.proj:hover .viz-gif img { transform: scale(1.06); }
.viz-gif::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 2px, transparent 2px 4px); mix-blend-mode: multiply; pointer-events: none; }
.viz-label { position: absolute; left: 14px; bottom: 12px; font-size: .72rem; padding: 4px 10px; border-radius: 6px; background: rgba(0,0,0,.55); color: #9fd6ff; z-index: 2; }

/* funnel */
.funnel { width: 78%; display: grid; gap: 10px; }
.funnel div { position: relative; height: 30px; border-radius: 8px; background: rgba(255,255,255,.06); overflow: hidden; }
.funnel div span { position: absolute; inset: 0 auto 0 0; display: flex; align-items: center; padding-left: 12px; font-size: .78rem; white-space: nowrap; color: #05060f; font-weight: 600; background: linear-gradient(90deg, #9fd6ff, #f6c177); width: 0; animation: fill 4s var(--ease) infinite; }
.funnel div:nth-child(2) span { animation-delay: .4s; --w: 52%; background: linear-gradient(90deg, #f6c177, #ff8f6b); }
.funnel div:nth-child(3) span { animation-delay: .8s; --w: 24%; background: linear-gradient(90deg, #ff8f6b, #ffd34d); }
.funnel div:nth-child(1) span { --w: 100%; }
@keyframes fill { 0% { width: 0; } 35%, 80% { width: var(--w); } 100% { width: var(--w); opacity: 0; } }
.viz-timer { position: absolute; top: 12px; right: 14px; font-size: .74rem; color: #3dff9a; }

/* budget */
.budget { width: 80%; }
.budget-row { display: flex; justify-content: space-between; font-size: .78rem; margin-bottom: 8px; color: #b8bde6; }
.budget-bar { height: 16px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; position: relative; }
.budget-bar span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; animation: budget 5s var(--ease) infinite; background: linear-gradient(90deg, #3dff9a, #ffd34d 70%, #ff5f57); }
@keyframes budget { 0% { width: 10%; } 40%, 85% { width: 84%; } 100% { width: 10%; } }
.memo { margin-top: 16px; padding: 10px 12px; border-radius: 10px; border: 1px dashed rgba(255,211,77,.6); font-size: .74rem; color: #ffd34d; opacity: 0; animation: memo 5s ease infinite; }
@keyframes memo { 0%, 35% { opacity: 0; transform: translateY(8px); } 45%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* label scan */
.label-card { position: relative; width: 56%; padding: 14px 16px; border-radius: 10px; background: #f7f2e4; color: #2a2a2a; font-size: .7rem; line-height: 1.7; overflow: hidden; transform: rotate(-3deg); box-shadow: 0 20px 40px rgba(0,0,0,.4); }
.label-card b { font-size: .8rem; }
.label-card .ok { float: right; color: #1c9a50; opacity: 0; animation: tick 4s infinite; }
.label-card div:nth-child(3) .ok { animation-delay: .5s; } .label-card div:nth-child(4) .ok { animation-delay: 1s; } .label-card div:nth-child(5) .ok { animation-delay: 1.5s; }
@keyframes tick { 0%, 20% { opacity: 0; transform: scale(0); } 30%, 90% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
.label-card::after { content: ''; position: absolute; left: 0; right: 0; height: 3px; background: #ff3d6e; box-shadow: 0 0 16px 4px rgba(255,61,110,.6); animation: scan 2s ease-in-out infinite alternate; top: 0; }
@keyframes scan { to { top: calc(100% - 3px); } }

/* waveform */
.wave { display: flex; align-items: center; gap: 5px; height: 60%; }
.wave i { width: 6px; border-radius: 3px; background: linear-gradient(#9fd6ff, #ff8f6b); animation: bar 1s ease-in-out infinite alternate; height: 20%; }
@keyframes bar { to { height: 100%; } }
.keycap { position: absolute; left: 16px; top: 14px; padding: 6px 12px; border-radius: 8px; background: #1a1d3a; border: 1px solid #3a3f6a; box-shadow: 0 4px 0 #0b0d1f; font-size: .78rem; animation: press 2s infinite; }
@keyframes press { 0%, 80%, 100% { transform: none; box-shadow: 0 4px 0 #0b0d1f; } 85% { transform: translateY(4px); box-shadow: 0 0 0 #0b0d1f; } }

/* doc chat */
.chat { width: 78%; display: grid; gap: 10px; font-size: .74rem; }
.chat .q, .chat .a { padding: 9px 12px; border-radius: 12px; max-width: 80%; opacity: 0; animation: pop 6s infinite; }
.chat .q { justify-self: end; background: #f6c177; color: #fff; border-bottom-right-radius: 3px; }
.chat .a { background: rgba(255,255,255,.08); border-bottom-left-radius: 3px; animation-delay: 1s; }
.chat .q2 { animation-delay: 2.2s; } .chat .a2 { animation-delay: 3.2s; }
@keyframes pop { 0% { opacity: 0; transform: translateY(10px) scale(.95); } 8%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.doc-ico { position: absolute; left: 16px; top: 14px; font-size: .72rem; color: #3dff9a; }

/* neon trail */
.trail svg { width: 90%; height: 80%; }
.trail path { fill: none; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 4s ease-in-out infinite; filter: drop-shadow(0 0 8px currentColor); color: #9fd6ff; stroke: currentColor; }
@keyframes draw { 50% { stroke-dashoffset: 0; color: #ff8f6b; } 100% { stroke-dashoffset: -1200; color: #3dff9a; } }
.emo { position: absolute; right: 16px; top: 12px; font-size: 1.6rem; animation: emo 4s steps(1) infinite; }
.fps { position: absolute; left: 16px; top: 14px; font-size: .74rem; color: #3dff9a; }

/* vault */
.vault-lock { position: relative; width: 110px; height: 110px; border-radius: 50%; border: 6px solid #9fd6ff; display: grid; place-items: center; box-shadow: 0 0 40px rgba(159,214,255,.35), inset 0 0 30px rgba(159,214,255,.2); }
.vault-lock::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; border: 3px dashed #ff8f6b; animation: spin 4s cubic-bezier(.7,0,.3,1) infinite; }
.vault-lock span { font-size: 1.8rem; }
.bits { position: absolute; inset: 0; overflow: hidden; font-size: .7rem; color: rgba(159,214,255,.22); line-height: 1.4; padding: 10px; word-break: break-all; }
.bits div { animation: bits 8s linear infinite; }
@keyframes bits { to { transform: translateY(-50%); } }

/* hangar + lab */
.hangar-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.hangar-card { position: relative; padding: 22px 24px; overflow: hidden; }
.hangar-card h4 { font: 700 1.2rem var(--font-display); margin-bottom: 6px; display: flex; gap: 10px; align-items: center; }
.hangar-card p { color: var(--muted); font-size: .92rem; }
.hangar-card .progress { margin-top: 14px; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.hangar-card .progress span { display: block; height: 100%; border-radius: inherit; background: var(--a1); }
@keyframes stripes { to { background-position: 28px 0; } }
.lab-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.lab-chip { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass); transition: border-color .3s; }
.lab-chip:hover { border-color: var(--a1); }
.lab-chip b { font-weight: 600; }
.lab-chip span { font: .75rem var(--font-mono); color: var(--muted); }

/* ================= WINS ================= */
.trophies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.trophy { position: relative; padding: 22px; text-align: left; overflow: hidden; display: flex; flex-direction: column; gap: 8px; }
.trophy .t-ico { font-size: 1.8rem; }
.trophy .t-big { font: 800 2.1rem/1 var(--font-display); color: var(--a3); }
.trophy h4 { font-size: 1rem; font-weight: 600; }
.trophy p { color: var(--muted); font-size: .86rem; }
.trophy .t-cert { position: absolute; top: 18px; right: 18px; font: .8rem var(--font-mono); color: var(--a1); }
.trophy.has-cert:hover { border-color: var(--a1); }

.cert-rail { display: flex; gap: 22px; overflow-x: auto; padding: 20px 4px 34px; scroll-snap-type: x mandatory; scrollbar-width: thin; -webkit-mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.cert-rail.dragging { cursor: grabbing; scroll-snap-type: none; }
.cert { flex: none; width: 300px; scroll-snap-align: center; padding: 10px 10px 14px; text-align: left; transition: transform .5s var(--ease-back); }
.cert:hover { border-color: var(--a1); }
.cert img { width: 100%; aspect-ratio: 1.41; object-fit: cover; border-radius: 14px; pointer-events: none; background: #fff; }
.cert b { display: block; margin-top: 10px; font-size: .92rem; padding: 0 4px; }
.cert span { display: block; font: .74rem var(--font-mono); color: var(--muted); padding: 0 4px; }
.cert-extra { display: flex; flex-wrap: wrap; gap: 10px; }

/* ================= STACK ================= */
.stack-rows { display: grid; gap: 16px; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.stack-row { overflow: hidden; }
.stack-track { display: flex; gap: 14px; width: max-content; animation: marquee var(--dur, 40s) linear infinite; animation-direction: var(--dir, normal); }
.stack-row:hover .stack-track { animation-play-state: paused; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass); font-weight: 600; font-size: 1.05rem; white-space: nowrap; transition: transform .35s var(--ease-back), background .3s, color .3s; }
.pill i { font-style: normal; font: 600 .7rem var(--font-mono); color: var(--muted); }
.pill:hover { border-color: var(--a1); }

/* ================= STATS ================= */
.stats-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; }
.panel { padding: 26px; min-width: 0; }
.panel-wide { grid-column: span 2; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font: 600 .9rem var(--font-mono); margin-bottom: 22px; }
.panel-head a { color: var(--a1); }
.gh-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 26px; }
.gh-nums b { display: block; font: 800 2.6rem/1 var(--font-display); }
.gh-nums span { font-size: .8rem; color: var(--muted); }
.lang-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--line); }
.lang-bar span { height: 100%; width: 0; transition: width 1.4s var(--ease); }
.lang-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font: .78rem var(--font-mono); color: var(--muted); }
.lang-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.lc-wrap { position: relative; width: 170px; margin: 0 auto 18px; }
.lc-ring { width: 100%; transform: rotate(-90deg); }
.lc-ring circle { fill: none; stroke-width: 10; }
.lc-bg { stroke: var(--line); }
.lc-arc { stroke-linecap: round; stroke-dasharray: 0 999; transition: stroke-dasharray 1.6s var(--ease); }
.lc-easy { stroke: #3dd68c; } .lc-med { stroke: #ffc01e; } .lc-hard { stroke: #ff375f; }
.lc-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.lc-center b { font: 800 2.4rem/1 var(--font-display); }
.lc-center span { font-size: .78rem; color: var(--muted); }
.lc-rows { display: grid; gap: 8px; font: .85rem var(--font-mono); }
.lc-rows div { display: flex; align-items: center; gap: 8px; }
.lc-rows b { margin-left: auto; }
.lc-dot { width: 9px; height: 9px; border-radius: 50%; } .lc-dot.easy { background: #3dd68c; } .lc-dot.med { background: #ffc01e; } .lc-dot.hard { background: #ff375f; }
.lc-note { margin-top: 14px; text-align: center; font: .78rem var(--font-mono); color: var(--a3); }
.contrib { overflow-x: auto; padding: 10px; border-radius: 14px; background: rgba(5, 6, 15, .5); }
html[data-world="day"] .contrib { background: rgba(255,255,255,.6); }
.contrib img { min-width: 680px; width: 100%; }

/* ================= CONTACT ================= */
.mega-mail { position: relative; display: block; width: 100%; text-align: left; padding: 10px 0 30px; border-bottom: 2px solid var(--line); margin-bottom: 40px; }
.mm-text { display: block; font: 800 clamp(1.6rem, 7.4vw, 6rem)/1 var(--font-display); letter-spacing: -.03em; overflow-wrap: normal; color: var(--text); transition: color .3s; }
.mega-mail:hover .mm-text { color: var(--a3); }
.mm-hint { display: inline-block; margin-top: 16px; font: .85rem var(--font-mono); color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; border-top: 1px solid var(--line); }
.c-tile { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 4px; text-align: left; min-width: 0; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; transition: color .3s; }
.c-tile:hover { color: var(--a3); }
.c-ico { display: none; }
.c-k { font: .8rem var(--font-mono); color: var(--muted); }
.c-v { font-weight: 600; overflow-wrap: anywhere; text-align: right; }
.c-resume .c-v { color: var(--a3); }

/* ================= FOOTER ================= */
.footer { padding: 120px 0 30px; overflow: hidden; }
.footer-big { display: flex; justify-content: center; gap: 3vw; font: 800 clamp(2.6rem, 10.5vw, 11rem)/.85 var(--font-display); letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.5px var(--line); user-select: none; white-space: nowrap; }
.footer-big span { transition: color .6s, -webkit-text-stroke-color .6s; }
.footer-big:hover span { color: rgba(var(--a1-rgb), .12); -webkit-text-stroke-color: var(--a1); }
.footer-row { width: min(var(--max), calc(100% - 32px)); margin: 30px auto 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font: .8rem var(--font-mono); color: var(--muted); }
.footer-row a:hover, .footer-row b { color: var(--text); }
.egg { opacity: .55; }

/* ================= MODAL ================= */
.modal { position: fixed; inset: 0; z-index: 9800; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 4, 12, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade .4s var(--ease); }
.modal-card { position: relative; width: min(820px, 100%); max-height: calc(100svh - 32px); overflow-y: auto; padding: 34px; background: var(--glass-strong); animation: modalIn .6s var(--ease-back); }
.modal-card.img-mode { width: min(1100px, 100%); padding: 14px; }
.modal-card.img-mode img { width: 100%; border-radius: 14px; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass-strong); z-index: 2; transition: transform .4s var(--ease-back); }
.modal-x:hover { transform: rotate(90deg); }
@keyframes fade { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(40px) scale(.94) rotateX(10deg); } }
.m-kicker { font: 600 .8rem var(--font-mono); color: var(--a3); }
.m-title { font: 800 clamp(2rem, 5vw, 3rem)/1 var(--font-display); margin: 8px 0 14px; }
.m-hook { font-size: 1.15rem; font-weight: 600; margin-bottom: 18px; }
.m-list { list-style: none; display: grid; gap: 10px; margin: 18px 0 24px; }
.m-list li { position: relative; padding-left: 24px; color: var(--muted); }
.m-list li::before { content: '→'; position: absolute; left: 0; color: var(--a1); }
.m-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.m-team { margin-top: 10px; padding: 12px 16px; border-radius: 12px; border: 1px dashed var(--a2); font-size: .9rem; color: var(--muted); }
.m-cap { padding: 12px 6px 4px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.m-cap b { font-size: 1rem; } .m-cap span { font: .8rem var(--font-mono); color: var(--muted); }

/* ================= MODES ================= */
html.warp .nebula { animation-duration: 3s; }
html.warp body { animation: shake .3s infinite; }
@keyframes shake { 25% { transform: translate(1px, -1px); } 75% { transform: translate(-1px, 1px); } }

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

/* ================= RESPONSIVE ================= */
@media (max-width: 980px) {
    .nav-links { position: fixed; top: 74px; left: 0; right: 0; flex-direction: column; padding: 14px; border-radius: 24px; background: var(--glass-strong); border: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transform: translateY(-14px) scale(.97); opacity: 0; pointer-events: none; transition: .4s var(--ease); }
    .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
    .nav-links a { padding: 12px 16px; font-size: 1.05rem; }
    .burger { display: block; }
    .hero { grid-template-columns: 1fr; padding-top: 130px; text-align: left; }
    .hero-right { order: -1; }
    .avatar-system { width: min(300px, 70vw); }
    .about-grid, .stats-grid { grid-template-columns: 1fr; }
    .panel-wide { grid-column: auto; }
    .trophies { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    .planet-big { width: 150px; height: 150px; }
}
@media (max-width: 720px) {
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .projects, .hangar-grid { grid-template-columns: 1fr; }
    .proj.wide { grid-column: auto; }
    .proj.wide .proj-viz { aspect-ratio: 16 / 9; }
    .section { padding-top: 100px; }
    .btn-mini { display: none; }
    .wt-label { display: none; }
    .term-body { height: 320px; }
    .trophies { grid-template-columns: 1fr; }
    .cert { width: 250px; }
    .gh-nums b { font-size: 2rem; }
    .nav { padding-left: 14px; }
    .footer-row { flex-direction: column; }
}
@media (max-width: 420px) {
    .c-tile { flex-direction: column; gap: 2px; } .c-v { text-align: left; }
    .stat b { font-size: 1.9rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}

/* ================= IDENTITY LAYER ================= */
/* Expanded Archivo for display type */
.hero-name, .sec-title, .sub-title, .mq-track, .stat b, .t-big, .proj h3, .j-card h3,
.gh-nums b, .lc-center b, .mm-text, .footer-big, .ld-count, .m-title, .hangar-card h4 { font-stretch: 122%; }
.hero-name { letter-spacing: -.03em; }
.sec-title { font-weight: 800; letter-spacing: -.02em; }

.scratch { position: relative; display: inline-block; font-weight: 800; line-height: 1; color: var(--a3); padding: 0 .08em; }
.scratch svg { position: absolute; left: 0; right: 0; bottom: -.28em; width: 100%; height: .42em; overflow: visible; }
.scratch path { fill: none; stroke: var(--a3); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 260; stroke-dashoffset: 260; animation: scribble 1.4s 1.6s var(--ease) forwards; }
@keyframes scribble { to { stroke-dashoffset: 0; } }

.sec-note { font-size: .95rem; }

.trophy .t-ico { font: 500 .8rem var(--font-mono); color: var(--muted); }
.trophy .t-cert { font: 600 .78rem var(--font-mono); padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px; }
.mq-track i { font-weight: 400; opacity: .6; }

/* ================= MOBILE SAFETY ================= */
@media (max-width: 720px) {
    .hero { padding: 110px 0 70px; gap: 28px; min-height: auto; }
    .hero-name { font-size: 14vw; }
    .hero-tag { font-size: 1.15rem; }
    .typed-wrap { white-space: normal; }
    .hero-cta .btn { flex: 1 1 auto; justify-content: center; padding: 14px 18px; }
    .avatar-system { width: min(260px, 64vw); }
    .orbit.o4, .orbit.o2 { display: none; }
    .marquee { transform: rotate(-2deg) scale(1.08); }
    .sec-title { font-size: clamp(2rem, 10.5vw, 3rem); }
    .about-grid { gap: 26px; }
    .term-body { height: 280px; font-size: .78rem; }
    .j-card { padding: 20px; }
    .journey { padding-left: 34px; }
    .j-node { left: -29px; }
    .journey-line { left: 8px; }
    .proj-body { padding: 18px; }
    .proj h3 { font-size: 1.35rem; }
    .proj-top { flex-direction: column; }
    .proj-badges { justify-content: flex-start; }
    .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
    .filter { flex: none; }
    .stats-grid { gap: 16px; }
    .panel { padding: 20px; }
    .mm-text { font-size: 9vw; }
    .lc-wrap { width: 150px; }
    .gh-nums span { font-size: .72rem; }
    .footer-big { font-size: 11vw; gap: 2vw; }
    .modal-card { padding: 26px 20px; }
    .planet-big { width: 130px; height: 130px; left: -60px; bottom: -40px; }
    .nav { top: 10px; padding: 8px 8px 8px 14px; }
}
@media (max-width: 380px) {
    .nav-right { gap: 6px; }
    .wt-track { width: 54px; }
    html[data-world="day"] .wt-knob { transform: translateX(24px) rotate(180deg); }
    .gh-nums b { font-size: 1.7rem; }
}

/* ================= SCROLLBAR ================= */
html { scrollbar-width: thin; scrollbar-color: rgba(var(--a1-rgb), .45) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--a1-rgb), .35); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--a1-rgb), .65); background-clip: padding-box; }
.term-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); background-clip: padding-box; }

/* ================= MORNING FOOTER READABILITY ================= */
html[data-world="day"] .footer { background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(246, 250, 255, .78) 28%, rgba(246, 250, 255, .92) 100%); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
html[data-world="day"] .footer-big { color: rgba(24, 38, 58, .9); -webkit-text-stroke-color: transparent; }
html[data-world="day"] .footer-big:hover span { color: var(--a3); }
html[data-world="day"] .footer-row { color: var(--text); padding: 14px 22px; border-radius: 18px; background: rgba(255, 255, 255, .82); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow); }
html[data-world="day"] .footer-row .egg { opacity: .7; }
