:root {
  --bg: #050507;
  --c1: #9d4edd;   /* royal amethyst */
  --c2: #00e5ff;   /* electric cyan */
  --c3: #c9a2f2;   /* light amethyst */
  --text: #f2f4ff;
  --muted: #a3a8c3;
  --glass: rgba(8, 8, 12, 0.66);
  --line: rgba(255, 255, 255, 0.12);
  --display: "Sora", "Inter", system-ui, sans-serif;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--text); background: var(--bg);
  font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.05; letter-spacing: -0.02em; }

/* WORLD */
#world { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; touch-action: pan-y; }
body.no3d #world { display: none; }
body.no3d { background: radial-gradient(80vw 60vh at 70% 20%, rgba(157,78,221,.25), transparent 70%), radial-gradient(70vw 60vh at 10% 80%, rgba(0,229,255,.15), transparent 70%), var(--bg); background-attachment: fixed; }
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0,0,0,.7)); }
.scanlines { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.55) 0 1px, transparent 1px 3px); }
.track { height: 1100vh; position: relative; z-index: 0; pointer-events: none; }

/* LOADER */
.loader { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--bg); transition: opacity .9s ease, visibility .9s; color: var(--muted); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; }
.loader.done { opacity: 0; visibility: hidden; }
.loader-ring { width: 64px; height: 64px; border-radius: 50%; border: 2px solid transparent;
  border-top-color: var(--c1); border-right-color: var(--c2); border-bottom-color: var(--c3); animation: spin 1s linear infinite;
  filter: drop-shadow(0 0 12px var(--c2)); }
@keyframes spin { to { transform: rotate(360deg); } }

/* NAV */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 22px;
  padding: 14px max(16px, 3vw); }
.brand { display: flex; align-items: center; gap: 10px; font: 700 17px var(--display); margin-right: auto; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #05050a;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 0 18px rgba(157,78,221,.6); }
.chapters { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.chapters a { padding: 7px 14px; border-radius: 999px; font-size: 13.5px; color: var(--muted); transition: color .2s, background .2s; }
.chapters a:hover, .chapters a.on { color: #fff; background: var(--c1); }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.06); }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--c1), var(--c2)); box-shadow: 0 0 12px var(--c2); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
  color: #05050a; background: linear-gradient(110deg, var(--c2), var(--c3)); border: 0; cursor: pointer;
  box-shadow: 0 0 24px rgba(0,229,255,.35); transition: transform .2s, box-shadow .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 0 34px rgba(201,162,242,.5); }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--text); border: 1px solid rgba(157,78,221,.6); box-shadow: 0 0 18px rgba(157,78,221,.25) inset; }
.btn-ghost:hover { box-shadow: 0 0 22px rgba(157,78,221,.5); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

/* LAYERS: fixed text that fades with the film */
.layers { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.layer { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  padding: 90px max(16px, 6vw) 60px; visibility: hidden; }
.layer.on { visibility: visible; }
.layer.live a, .layer.live button, .layer.live .glass, .layer.live .skill { pointer-events: auto; }

.blend { will-change: opacity, filter, transform; }
.blend-chars .ch { display: inline-block; will-change: opacity, filter, transform; }

.kicker { margin: 0 0 18px; font: 600 12.5px var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--c1);
  text-shadow: 0 0 12px rgba(157,78,221,.7); }
.sub { margin: 18px 0 0; font-size: clamp(16px, 1.6vw, 20px); color: #cfd3ea; max-width: 560px; }
.hint { margin-top: 40px; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }

.layer-intro { align-items: center; text-align: center; }
.layer-intro .sub { margin-inline: auto; }
.mega { font-size: clamp(72px, 19vw, 290px); font-weight: 900; line-height: .9; position: relative; letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.9); }
.mega .ch { filter: blur(var(--b, 0px)) drop-shadow(0 0 18px var(--gc)); }
.mega .ch:nth-child(3n+1) { -webkit-text-stroke-color: var(--c1); --gc: var(--c1); }
.mega .ch:nth-child(3n+2) { -webkit-text-stroke-color: var(--c2); --gc: var(--c2); }
.mega .ch:nth-child(3n)   { -webkit-text-stroke-color: var(--c3); --gc: var(--c3); }

.big { font-size: clamp(30px, 4.2vw, 60px); font-weight: 700; max-width: 16ch; }
.layer-statement { justify-content: flex-end; padding-bottom: 64px; }
.layer-statement .big { max-width: none; }
.n1 { color: var(--c1); text-shadow: 0 0 22px rgba(157,78,221,.6); font-style: normal; }
.n2 { color: var(--c2); text-shadow: 0 0 22px rgba(0,229,255,.55); font-style: normal; }
.n3 { color: var(--c3); text-shadow: 0 0 22px rgba(201,162,242,.5); font-style: normal; }
.tap-chip { display: inline-block; padding: 1px 10px; border-radius: 999px; color: #001418; background: var(--c2); box-shadow: 0 0 16px rgba(0,229,255,.6); }

/* project chapters: text on the left, device comes to the right */
.layer-project { max-width: 640px; }
.layer-project h2 { font-size: clamp(34px, 4.6vw, 64px); }
.layer-project .tag { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.tone-c2 { color: var(--c2); } .tone-c3 { color: var(--c3); }
.layer-project .line { margin: 16px 0 0; font-size: clamp(16px, 1.5vw, 19px); color: #dde0f2; max-width: 520px; }
.feat { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; max-width: 520px; }
.feat li { display: flex; gap: 10px; align-items: baseline; font-size: 15px; color: #c3c7de; }
.feat b { color: var(--text); font-weight: 600; }
.chips { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 7px; }
.chips li { padding: 5px 11px; border-radius: 999px; font-size: 12.5px; border: 1px solid rgba(157,78,221,.4); color: #e4dcff;
  background: rgba(157,78,221,.08); }
.p-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: 26px; padding: 30px;
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }

.layer-skills .skill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: 14px; margin-top: 30px; }
.skill { padding: 20px 22px; border-radius: 20px; background: rgba(8, 8, 12, .74); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.skill h3 { font-size: 17px; margin-bottom: 8px; }
.skill p { margin: 0; font-size: 14px; color: var(--muted); }

.layer-contact { align-items: center; text-align: center; }
.mega-2 { font-size: clamp(38px, 7vw, 108px); font-weight: 900; max-width: 13ch; }
.layer-contact .sub { margin-inline: auto; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }

.drag-hint { position: fixed; z-index: 6; left: 50%; bottom: 18px; transform: translateX(-50%); margin: 0; pointer-events: none;
  font-size: 11.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); opacity: 0; transition: opacity .5s; }
.drag-hint.on { opacity: .8; }

/* OVERVIEW (tap a device) */
.overview { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px;
  background: rgba(3, 3, 8, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.overview[hidden] { display: none; }
.ov-card { position: relative; width: min(1040px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 30px; padding: 30px; border-radius: 28px;
  background: rgba(10, 10, 24, .82); border: 1px solid transparent;
  background-clip: padding-box; box-shadow: 0 0 0 1px rgba(157,78,221,.4), 0 0 60px -10px rgba(157,78,221,.4), 0 40px 80px -30px #000;
  animation: ovIn .55s cubic-bezier(.2,.9,.2,1); }
@keyframes ovIn { from { opacity: 0; transform: perspective(900px) rotateX(14deg) translateY(40px) scale(.94); filter: blur(10px); } }
.ov-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255,255,255,.05); color: var(--text); font-size: 15px; cursor: pointer; z-index: 2; }
.ov-close:hover { border-color: var(--c2); box-shadow: 0 0 14px var(--c2); }
.ov-screens { position: relative; min-height: 380px; display: flex; align-items: center; justify-content: center; gap: 14px; }
.ov-phone { width: 30%; max-width: 170px; border-radius: 22px; overflow: hidden; border: 4px solid #15151f; position: relative;
  box-shadow: 0 20px 40px -18px #000; transition: transform .5s cubic-bezier(.2,.9,.2,1), box-shadow .3s; }
.ov-phone:nth-child(2) { transform: translateY(-14px) scale(1.08); z-index: 1; }
.ov-phone.hi { box-shadow: 0 0 0 2px var(--c2), 0 0 30px rgba(0,229,255,.5); }
.ov-browser { width: 100%; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #10101a; box-shadow: 0 20px 40px -18px #000; }
.ov-bar { display: flex; gap: 6px; padding: 9px 12px; background: #161624; }
.ov-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--c2); }
.ov-bar i:nth-child(2) { background: var(--c3); } .ov-bar i:nth-child(3) { background: var(--c1); }
.ov-browser .ov-view { position: relative; aspect-ratio: 16 / 10; }
.ov-browser .ov-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s; }
.ov-browser .ov-view img.on { opacity: 1; }
.ov-tabs { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.ov-tabs button { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.ov-tabs button.on { color: #fff; background: var(--c1); border-color: var(--c1); }
.ov-web { width: 100%; }
.ov-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px; font-size: 11px; text-align: center; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.ov-info { display: flex; flex-direction: column; justify-content: center; }
.ov-type { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.ov-info h2 { font-size: clamp(26px, 3vw, 38px); }
.ov-line { margin: 12px 0 0; color: #dde0f2; }
.ov-features { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.ov-features li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 14px;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07);
  opacity: 0; transform: translateX(20px); animation: featIn .5s forwards; }
.ov-features li span { font-size: 20px; line-height: 1.2; }
.ov-features b { display: block; font-size: 14.5px; }
.ov-features small { color: var(--muted); font-size: 13px; }
@keyframes featIn { to { opacity: 1; transform: none; } }
.ov-links { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* RESPONSIVE */
@media (max-width: 820px) {
  .chapters { display: none; }
  .layer { padding: 84px 18px 40px; }
  .layer-project { justify-content: flex-start; max-width: none; }
  .layer-project .glass { padding: 20px; }
  .layer-project .feat li:nth-child(n+3) { display: none; }
  .layer-statement, .layer-skills { justify-content: flex-start; padding-top: 110px; }
  .layer-skills .skill-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .skill { padding: 14px; } .skill h3 { font-size: 14px; } .skill p { font-size: 12.5px; }
  .ov-card { grid-template-columns: 1fr; padding: 20px; gap: 18px; }
  .ov-screens { min-height: 0; }
}
@media (max-width: 480px) {
  .nav .btn-sm { display: none; }
  .layer-project h2 { font-size: 30px; }
  .layer-project .line { font-size: 15px; }
  .layer-project .chips, .layer-project .feat { display: none; }
  .layer-project .p-actions { margin-top: 16px; }
  .drag-hint { font-size: 10px; letter-spacing: .18em; white-space: nowrap; }
  .ov-phone { border-width: 3px; border-radius: 16px; }
  .mega { -webkit-text-stroke-width: 1.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .loader-ring { animation-duration: 3s; }
  .ov-card { animation: none; }
}

/* soft dark pool behind centred text so it reads over the film */
.layer-contact::before, .layer-intro::before { content: ""; position: absolute; inset: 15% 10%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(5, 5, 7, .7), transparent); }

/* text lives in the 3D world; this copy is only for screen readers / search */
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body.no3d .sr-only { position: relative !important; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal;
  z-index: 5; max-width: 760px; padding: 110px 18px 80px; margin-inline: auto; }
body.no3d .track { display: none; }

/* action bar: the clickable buttons for the chapter on screen */
.actions { position: fixed; z-index: 8; left: 50%; bottom: 54px; transform: translate(-50%, 16px); display: flex; gap: 10px; flex-wrap: wrap;
  justify-content: center; opacity: 0; pointer-events: none; transition: opacity .45s ease, transform .45s ease; width: max-content; max-width: calc(100vw - 32px); }
.actions.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.btn { background: linear-gradient(110deg, var(--c2), #7cf3ff); color: #001418; box-shadow: 0 6px 22px -8px rgba(0,229,255,.55); }
.btn:hover { box-shadow: 0 10px 28px -8px rgba(0,229,255,.7); }
.btn-ghost { background: rgba(10,10,14,.6); color: var(--text); border: 1px solid rgba(157,78,221,.7); box-shadow: none;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-ghost:hover { box-shadow: 0 0 0 1px var(--c1); }
.nav .btn-sm { color: #001418; }
.brand-mark { color: #fff; }
.chapters a:hover, .chapters a.on { color: #fff; background: var(--c1); }
.progress span { background: linear-gradient(90deg, var(--c1), var(--c2)); box-shadow: none; }
.loader-ring { border-top-color: var(--c1); border-right-color: var(--c2); border-bottom-color: var(--c1); filter: none; }
.ov-phone.hi { box-shadow: 0 0 0 2px var(--c2), 0 10px 30px -10px rgba(0,229,255,.5); }
.ov-tabs button.on { color: #001418; background: var(--c2); border-color: var(--c2); }
.ov-card { box-shadow: 0 0 0 1px rgba(157,78,221,.55), 0 40px 80px -30px #000; background: rgba(8, 8, 12, .9); }
.tone-c3 { color: var(--c2); } .tone-c2 { color: var(--c3); }
@media (max-width: 480px) { .actions { bottom: 46px; } .actions .btn { padding: 11px 18px; } }

/* ===== Header + buttons: quiet, premium (glass, white, a hint of amethyst) ===== */
.nav { background: linear-gradient(rgba(5,5,7,.55), rgba(5,5,7,0)); }
.brand { font-weight: 600; letter-spacing: .01em; }
.brand-mark { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); color: #fff; font-family: var(--display); }
.chapters { background: rgba(12,12,18,.45); border: 1px solid rgba(255,255,255,.1); }
.chapters a { color: rgba(255,255,255,.62); letter-spacing: .04em; transition: color .25s, background .25s; }
.chapters a:hover { color: #fff; background: rgba(255,255,255,.06); }
.chapters a.on { color: #fff; background: rgba(157,78,221,.22); box-shadow: inset 0 0 0 1px rgba(201,162,242,.35); }
.btn { background: #f4f2fb; color: #0b0a12; box-shadow: 0 8px 26px -14px rgba(201,162,242,.7); letter-spacing: .02em; font-weight: 600; }
.btn:hover { background: #fff; box-shadow: 0 10px 30px -12px rgba(0,229,255,.55); transform: translateY(-1px); }
.btn-ghost { background: rgba(10,10,16,.45); color: #f4f2fb; border: 1px solid rgba(255,255,255,.22); box-shadow: none;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); box-shadow: none; }
.nav .btn-sm { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3); box-shadow: none; }
.nav .btn-sm:hover { background: rgba(255,255,255,.08); border-color: rgba(0,229,255,.6); }
.progress { height: 1px; background: rgba(255,255,255,.06); }
.progress span { background: linear-gradient(90deg, rgba(157,78,221,.9), rgba(0,229,255,.9)); }
.ov-tabs button.on { color: #0b0a12; background: #f4f2fb; border-color: #f4f2fb; }
.ov-phone.hi { box-shadow: 0 0 0 1.5px rgba(201,162,242,.9), 0 10px 30px -12px rgba(157,78,221,.6); }
