@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-display: swap; src: url('../fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url('../fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url('../fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  --bg: #03040a;
  --ink: #e8f1ff;
  --dim: #8b9bb8;
  --cyan: #00f0ff;
  --violet: #7b5cff;
  --pink: #ff3ea5;
  --line: rgba(120, 170, 255, .16);
  --glass: rgba(10, 14, 30, .55);
  --sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  --gut: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
.mono { font-family: var(--mono); }
a { color: inherit; text-decoration: none; }
em { font-style: normal; background: linear-gradient(100deg, var(--cyan), var(--violet) 60%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
::selection { background: var(--cyan); color: #00131a; }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.fx-vignette { background: radial-gradient(120% 90% at 50% 40%, transparent 45%, rgba(0, 0, 4, .85) 100%); }
.fx-grain { opacity: .06; mix-blend-mode: screen; 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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
body.no-webgl { background: radial-gradient(60% 50% at 70% 40%, rgba(0, 240, 255, .18), transparent 70%), radial-gradient(50% 50% at 20% 70%, rgba(123, 92, 255, .2), transparent 70%), var(--bg); }
body.no-webgl #gl { display: none; }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 50; }
.progress i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink)); box-shadow: 0 0 12px var(--cyan); }

/* ---- boot ---- */
#boot { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; transition: opacity .8s ease, visibility .8s; }
#boot.done { opacity: 0; visibility: hidden; }
.boot-in { width: min(420px, 84vw); font-size: 13px; color: var(--dim); }
.boot-logo { font-family: var(--sans); font-weight: 700; font-size: 42px; letter-spacing: .06em; color: var(--ink); margin-bottom: 22px; text-shadow: 0 0 24px rgba(0, 240, 255, .55); }
#boot-lines { min-height: 7.2em; white-space: pre-wrap; }
#boot-lines .ok { color: var(--cyan); }
.boot-bar { margin-top: 16px; height: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--violet)); transition: width .35s ease; }

/* ---- nav ---- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px var(--gut); background: linear-gradient(180deg, rgba(3, 4, 10, .75), transparent); }
.logo { font-weight: 700; font-size: 22px; letter-spacing: .08em; }
.logo b { color: var(--cyan); margin: 0 1px; text-shadow: 0 0 12px var(--cyan); }
.links { display: flex; gap: 28px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.links a { position: relative; padding: 4px 0; transition: color .25s; }
.links a::after { content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: var(--cyan); transform: scaleX(0); transform-origin: 0 50%; transition: transform .3s; }
.links a:hover, .links a.on { color: var(--ink); }
.links a:hover::after, .links a.on::after { transform: scaleX(1); }
.lang { display: flex; gap: 2px; font-size: 11px; }
.lang button { background: none; border: 1px solid transparent; color: var(--dim); font: inherit; letter-spacing: .1em; padding: 5px 8px; border-radius: 6px; cursor: pointer; transition: all .2s; }
.lang button:hover { color: var(--ink); }
.lang button.on { color: var(--cyan); border-color: var(--line); background: rgba(0, 240, 255, .06); }

/* ---- layout ---- */
main { position: relative; z-index: 2; }
section { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px var(--gut); }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; }
.wrap.left > * { max-width: 600px; }
.wrap.right { padding-left: 0; }
.wrap.right > .grid { margin-left: auto; }
.wrap.right > h2, .wrap.right > .kicker { margin-left: auto; width: min(100%, 720px); }
.wrap.center { text-align: center; max-width: 820px; }
.wrap.two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; }

.kicker { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); margin-bottom: 18px; }
h2 { font-size: clamp(34px, 5.4vw, 74px); line-height: 1.02; letter-spacing: -.02em; font-weight: 700; margin-bottom: 26px; text-wrap: balance; }
h3 { font-size: 21px; line-height: 1.2; font-weight: 700; margin-bottom: 8px; }
.lead { font-size: clamp(17px, 1.5vw, 21px); color: #bccae6; max-width: 560px; }
.wrap.center .lead { margin-inline: auto; }

/* ---- hero ---- */
#hero { flex-direction: column; justify-content: center; text-align: center; padding-top: 90px; }
.hero-in { display: flex; flex-direction: column; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); padding: 8px 16px; border: 1px solid var(--line); border-radius: 99px; background: var(--glass); backdrop-filter: blur(8px); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(0, 240, 255, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(0, 240, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0); } }
h1 { position: relative; font-size: clamp(88px, 21vw, 330px); line-height: .88; letter-spacing: -.045em; font-weight: 700; margin: 28px 0 22px; color: transparent; -webkit-text-stroke: 1.5px rgba(160, 235, 255, .85); filter: drop-shadow(0 0 28px rgba(0, 240, 255, .35)); cursor: default; }
h1::before, h1::after { content: attr(data-text); position: absolute; inset: 0; opacity: 0; }
h1::before { color: var(--pink); -webkit-text-stroke: 0; mix-blend-mode: screen; }
h1::after { color: var(--cyan); -webkit-text-stroke: 0; mix-blend-mode: screen; }
h1.glitching::before { animation: gl1 .35s steps(2) 1 forwards; }
h1.glitching::after { animation: gl2 .35s steps(2) 1 forwards; }
@keyframes gl1 { 0% { opacity: .75; transform: translate(-6px, 2px); clip-path: inset(10% 0 60% 0); } 50% { opacity: .75; transform: translate(5px, -2px); clip-path: inset(55% 0 12% 0); } 100% { opacity: 0; transform: none; clip-path: inset(0); } }
@keyframes gl2 { 0% { opacity: .75; transform: translate(6px, -2px); clip-path: inset(60% 0 8% 0); } 50% { opacity: .75; transform: translate(-5px, 2px); clip-path: inset(15% 0 55% 0); } 100% { opacity: 0; transform: none; clip-path: inset(0); } }
.tagline { font-size: clamp(18px, 2vw, 27px); max-width: 700px; color: #e4edff; text-wrap: balance; text-shadow: 0 2px 6px rgba(3, 4, 10, .95), 0 0 28px rgba(3, 4, 10, .9); }
.cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 34px; }
.scrollhint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--dim); }
.scrollhint i { width: 1px; height: 46px; background: linear-gradient(var(--cyan), transparent); animation: drip 2s ease-in-out infinite; transform-origin: 0 0; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---- buttons ---- */
.btn { --x: 0px; --y: 0px; display: inline-flex; align-items: center; gap: 12px; padding: 15px 26px; border-radius: 99px; font: 500 15px/1 var(--sans); letter-spacing: .02em; cursor: pointer; border: 1px solid var(--line); color: var(--ink); background: var(--glass); backdrop-filter: blur(10px); transform: translate(var(--x), var(--y)); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, border-color .3s, background .3s; }
.btn:hover { border-color: rgba(0, 240, 255, .6); box-shadow: 0 0 30px rgba(0, 240, 255, .22); }
.btn.primary { border: 0; color: #00131a; font-weight: 700; background: linear-gradient(100deg, var(--cyan), #7ef3ff 40%, #a99bff); box-shadow: 0 0 34px rgba(0, 240, 255, .35); }
.btn.primary:hover { box-shadow: 0 0 52px rgba(0, 240, 255, .6); }
.arr { width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8h11M9 3l5 5-5 5' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8h11M9 3l5 5-5 5' fill='none' stroke='%23000' stroke-width='1.8'/%3E%3C/svg%3E") center/contain no-repeat; transition: transform .25s; }
.btn:hover .arr { transform: translateX(4px); }

/* ---- marquee ---- */
.marquee { position: relative; z-index: 2; overflow: hidden; border-block: 1px solid var(--line); background: rgba(3, 4, 10, .55); backdrop-filter: blur(6px); padding: 16px 0; }
.track { display: flex; width: max-content; gap: 46px; animation: slide 38s linear infinite; font-size: 13px; letter-spacing: .28em; color: var(--dim); }
.track span { position: relative; }
.track span::after { content: '✦'; position: absolute; right: -30px; color: var(--cyan); opacity: .7; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---- stats ---- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; max-width: 620px; }
.stats div { padding-top: 14px; border-top: 1px solid var(--line); }
.stats b { display: block; font-size: clamp(40px, 5vw, 64px); line-height: 1; font-weight: 700; letter-spacing: -.03em; background: linear-gradient(120deg, #fff, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { display: block; margin-top: 8px; font-size: 13px; line-height: 1.4; color: var(--dim); }

/* ---- cards ---- */
.grid { display: grid; gap: 18px; width: 100%; }
.cards-2 { grid-template-columns: repeat(2, 1fr); max-width: 760px; }
.cards-3 { grid-template-columns: repeat(6, 1fr); margin-top: 20px; }
.cards-3 .project { grid-column: span 3; }
.cards-3 .project.big { grid-column: span 4; }
.cards-3 .project:nth-child(2) { grid-column: span 2; }
.card { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; position: relative; padding: 28px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px) saturate(1.3); transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .25s ease-out, border-color .3s; overflow: hidden; will-change: transform; }
.card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(260px circle at var(--mx) var(--my), rgba(0, 240, 255, .16), transparent 65%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.card:hover { border-color: rgba(0, 240, 255, .4); }
.card:hover::before { opacity: 1; }
.card p { color: #aebbd6; font-size: 15.5px; }
.num { display: block; font-size: 12px; color: var(--cyan); letter-spacing: .2em; margin-bottom: 18px; }
.project .tags { display: block; font-size: 11px; letter-spacing: .16em; color: var(--violet); margin-bottom: 14px; }
.project.big h3 { font-size: clamp(26px, 3vw, 38px); }

/* ---- method ---- */
.steps { list-style: none; counter-reset: s; margin-top: 30px; display: grid; gap: 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 54px 1fr; column-gap: 8px; padding: 16px 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(s, decimal-leading-zero); grid-row: span 2; font: 500 13px var(--mono); color: var(--cyan); padding-top: 4px; }
.steps b { font-size: 19px; }
.steps span { color: var(--dim); font-size: 15px; }
.term { border-radius: 16px; background: rgba(4, 7, 16, .78); border: 1px solid var(--line); backdrop-filter: blur(12px); box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 60px rgba(123, 92, 255, .12); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a3350; }
.term-bar i:nth-child(1) { background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; font-size: 12px; color: var(--dim); }
.term pre { padding: 22px; min-height: 320px; font-size: 13.5px; line-height: 1.75; color: #b9c8e6; white-space: pre-wrap; }
.term .c { color: var(--cyan); } .term .v { color: var(--violet); } .term .p { color: var(--pink); } .term .g { color: #5ee6a0; } .term .d { color: #5d6b8a; }
.term .caret { display: inline-block; width: 8px; height: 1em; background: var(--cyan); vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---- form ---- */
.form { margin-top: 38px; text-align: left; display: grid; gap: 16px; padding: clamp(20px, 3vw, 34px); border-radius: 24px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px) saturate(1.3); box-shadow: 0 30px 90px rgba(0, 0, 0, .5); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label span { display: block; font: 500 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.form input, .form textarea { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(2, 4, 12, .6); color: var(--ink); font: 400 16px var(--sans); outline: none; resize: vertical; transition: border-color .25s, box-shadow .25s; }
.form input:focus, .form textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 240, 255, .14), 0 0 24px rgba(0, 240, 255, .15); }
.form input.bad, .form textarea.bad { border-color: var(--pink); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.status { font-size: 13px; color: var(--dim); min-height: 1.4em; }
.status.ok { color: #5ee6a0; } .status.err { color: var(--pink); }
button[disabled] { opacity: .6; pointer-events: none; }

.foot { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px var(--gut) 34px; font-size: 12px; letter-spacing: .12em; color: var(--dim); border-top: 1px solid var(--line); background: rgba(3, 4, 10, .7); }

/* ---- cursor ---- */
.cursor { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; display: none; mix-blend-mode: screen; }
.cursor b { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.cursor i { position: absolute; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; border: 1px solid rgba(0, 240, 255, .5); transition: width .25s, height .25s, margin .25s, background .25s; }
.cursor.hot i { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(0, 240, 255, .08); }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } body, a, button { cursor: none; } input, textarea { cursor: text; } }

/* ---- reveal ---- */
.reveal { opacity: 0; transform: translateY(34px); filter: blur(6px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1), filter .9s; }
.reveal.in { opacity: 1; transform: none; filter: none; }
.card.reveal.in { transition: opacity .9s, filter .9s, transform .25s ease-out, border-color .3s; }

/* ---- responsive ---- */
@media (max-width: 1000px) {
  .links { display: none; }
  .wrap.two { grid-template-columns: 1fr; }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .cards-3 .project, .cards-3 .project:nth-child(2) { grid-column: auto; }
  .cards-3 .project.big, .cards-3 .project:nth-child(4) { grid-column: span 2; }
  .wrap.right > h2, .wrap.right > .kicker { margin-left: 0; width: 100%; }
  .wrap.right > .grid { margin-left: 0; }
  section { padding-block: 110px 80px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .cards-2, .cards-3 { grid-template-columns: 1fr; }
  .cards-3 .project, .cards-3 .project.big, .cards-3 .project:nth-child(2), .cards-3 .project:nth-child(4) { grid-column: auto; }
  .row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
  .stats span { font-size: 11.5px; }
  .eyebrow { font-size: 10px; letter-spacing: .1em; padding: 7px 12px; }
  h1 { -webkit-text-stroke-width: 1px; }
  .card { padding: 22px; }
  .nav { padding-block: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .track, .pulse, .scrollhint i { animation: none; }
}
