/* ==========================================================================
   SARAB — personal site
   Mobile-first · RTL · dark
   ========================================================================== */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Persian glyphs inside code blocks, so monospace fonts don't supply their own */
@font-face {
  font-family: "Vazirmatn Arabic";
  src: url("../fonts/vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  --bg: #0a0a0c;
  --ink: #eee9e1;
  --ink-2: #b4aea5;
  --ink-3: #8a847b;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --ice: #74c0ff;
  --ice-2: #3f8fe0;
  --lamp: #f2bd72;
  --chrome: linear-gradient(180deg, #ffffff 6%, #e3e9f1 34%, #8e9cb2 51%, #d3dbe6 64%, #ffffff 80%, #a6b3c4 100%);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --gutter: 20px;
  --max: 1160px;
  --font: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --mono: "Vazirmatn Arabic", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --tab-space: calc(86px + env(safe-area-inset-bottom, 0px));
  color-scheme: dark;
}

/* ---------- base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* film grain over everything (static, cheap) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, figure, pre { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
em { font-style: normal; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
::selection { background: rgba(116, 192, 255, .35); color: #fff; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.ic {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip {
  position: fixed;
  z-index: 300;
  top: 8px;
  inset-inline-start: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #fff;
  color: #000;
  transform: translateY(-160%);
  transition: transform .2s;
}
.skip:focus { transform: none; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { position: relative; padding-block: clamp(88px, 17vw, 170px); }

/* grid items must not grow to fit their scrollers' content */
.about__grid > *, .langs__grid > *, .work__list > *, .project > *, .contact__grid > *, .contact__side > * { min-width: 0; }

/* ---------- type ---------- */

.kicker {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: .85em;
  margin: 0 0 1.1rem;
  font-size: .68rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--ice);
}
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.kicker b { font-weight: 700; color: var(--ink); letter-spacing: .12em; }

.h2 { --lh: 1.34em; font-size: clamp(2rem, 8.6vw, 3.7rem); font-weight: 850; line-height: 1.34; }

/* metallic text like the logo; the gradient repeats once per line */
.chrome-text {
  background: var(--chrome);
  background-size: 100% var(--lh, 1.34em);
  background-repeat: repeat-y;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.lead {
  margin-top: 1.1rem;
  max-width: 36em;
  font-size: clamp(1rem, 4.1vw, 1.16rem);
  line-height: 2;
  color: var(--ink-2);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 52px;
  padding: 0 1.45em;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
  transition: transform .25s var(--ease), box-shadow .3s, background .3s;
}
.btn:active { transform: scale(.955); }
.btn .ic { width: 19px; height: 19px; }
.btn--primary {
  color: #0b0d12;
  background: linear-gradient(180deg, #ffffff 0%, #e6ecf3 48%, #b7c3d3 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(20, 30, 50, .16), 0 12px 32px -10px rgba(116, 192, 255, .5);
}
.btn--ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, .05);
  box-shadow: inset 0 0 0 1px var(--line-2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn--sm { min-height: 42px; padding: 0 1.1em; font-size: .88rem; }
.btn--block { display: flex; width: 100%; }

/* ---------- reveal on scroll ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  filter: blur(6px);
  transition: opacity .9s var(--ease), transform 1.1s var(--ease), filter 1s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }

.js [data-enter] { opacity: 0; transform: translateY(18px); filter: blur(8px); }
.is-ready [data-enter] {
  opacity: 1;
  transform: none;
  filter: none;
  transition: opacity 1s var(--ease), transform 1.2s var(--ease), filter 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}

.no-anim [data-reveal],
.no-anim [data-enter] { opacity: 1 !important; transform: none !important; filter: none !important; }

/* ---------- intro ---------- */

.intro { display: none; }
.is-intro .intro {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 24px;
  background: radial-gradient(60% 45% at 50% 45%, #121824, var(--bg) 70%);
  transition: opacity .8s var(--ease), filter .8s var(--ease), transform .9s var(--ease);
}
.is-intro body { overflow: hidden; }
.intro.is-out { opacity: 0; filter: blur(14px); transform: scale(1.06); pointer-events: none; }
.intro__mark { position: relative; width: 124px; aspect-ratio: 363 / 420; animation: introMark 1.3s var(--ease) both; }
.intro__mark img { width: 100%; height: 100%; }
.intro__shine {
  position: absolute;
  inset: 0;
  -webkit-mask: url("../img/logo-mark.webp") center / contain no-repeat;
  mask: url("../img/logo-mark.webp") center / contain no-repeat;
  background: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, .95) 50%, transparent 62%) 0 0 / 300% 100% no-repeat;
  background-position: 100% 0;
  animation: introShine 1.2s .6s var(--ease-io) both;
}
.intro__word { width: 148px; height: auto; animation: introWord 1s .35s var(--ease) both; }
.intro__bar { width: 120px; height: 1px; overflow: hidden; background: rgba(255, 255, 255, .1); }
.intro__bar i {
  display: block;
  height: 100%;
  background: linear-gradient(to left, var(--ice), #fff);
  transform-origin: 100% 50%;
  animation: introBar 1.5s var(--ease) both;
}
@keyframes introMark { from { opacity: 0; filter: blur(18px); transform: scale(.9) translateY(10px); } }
@keyframes introShine { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes introWord { from { opacity: 0; transform: translateY(10px); filter: blur(8px); } }
@keyframes introBar { from { transform: scaleX(0); } }

/* ---------- scroll progress ---------- */

.progress {
  position: fixed;
  z-index: 110;
  top: 0;
  inset-inline: 0;
  height: 2px;
  background: linear-gradient(to left, var(--ice), #fff);
  transform-origin: 100% 50%;
  transform: scaleX(0);
  pointer-events: none;
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: calc(var(--tab-space) + 10px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90% 50% at 50% 24%, rgba(116, 192, 255, .13), transparent 70%),
    radial-gradient(70% 36% at 50% 60%, rgba(80, 150, 230, .09), transparent 70%);
}

.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: auto; height: 36px; }
.brand__word { width: auto; height: 12px; }
.topbar__meta { font-size: .6rem; letter-spacing: .32em; color: var(--ink-3); }

.hero__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 4px;
}
.hero__visual { position: relative; z-index: 1; }

.portrait {
  --hr: 1.7768;
  --cw: min(56vw, calc(37vh / var(--hr)), 330px);
  position: relative;
  width: var(--cw);
  perspective: 1100px;
  perspective-origin: 50% 85%;
}
.portrait__card {
  position: relative;
  aspect-ratio: 1 / var(--hr);
  overflow: hidden;
  border-radius: 20px;
  background: #15161a center / cover no-repeat;
  transform-origin: 50% 100%;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  box-shadow: 0 50px 80px -40px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .08);
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.portrait__card img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.portrait__card::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(165deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .1) 28%, rgba(255, 255, 255, .04) 62%, rgba(150, 200, 255, .55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.portrait__glare {
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 45% at var(--gx, 30%) var(--gy, 12%), rgba(255, 255, 255, .3), transparent 65%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.portrait__sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 38%, rgba(255, 255, 255, .2) 48%, rgba(190, 225, 255, .12) 52%, transparent 62%);
  transform: translateX(130%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: sweep 9s var(--ease-io) 2.6s infinite;
}
@keyframes sweep { 0% { transform: translateX(130%); } 20%, 100% { transform: translateX(-130%); } }

/* the reflection on the water */
.portrait__water {
  position: absolute;
  top: 100%;
  inset-inline: 0;
  height: calc(var(--cw) * var(--hr) * .36);
  transform-origin: 50% 0;
  transform: rotateX(calc(var(--rx, 0deg) * -1)) rotateY(var(--ry, 0deg));
  pointer-events: none;
}
.portrait__canvas,
.portrait__mirror { position: absolute; inset: 0; width: 100%; height: 100%; }
.portrait__mirror {
  object-fit: cover;
  object-position: 50% 100%;
  transform: scaleY(-1);
  opacity: .34;
  filter: blur(1.2px) saturate(.5) brightness(.9);
  -webkit-mask-image: linear-gradient(to top, #000, transparent 88%);
  mask-image: linear-gradient(to top, #000, transparent 88%);
}
.portrait.has-gl .portrait__mirror { display: none; }

.horizon {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 100vw;
  height: 90px;
  transform: translateX(-50%);
  pointer-events: none;
}
.horizon i {
  position: absolute;
  top: var(--t);
  left: 50%;
  width: var(--w);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(150, 205, 255, var(--o)) 50%, transparent);
  animation: streak 5s ease-in-out var(--dl) infinite alternate;
}
.horizon i:nth-child(1) { --t: 0px; --w: 120%; --o: .75; --dl: 0s; box-shadow: 0 0 18px 1px rgba(116, 192, 255, .3); animation: none; }
.horizon i:nth-child(2) { --t: 10px; --w: 74%; --o: .36; --dl: -1s; }
.horizon i:nth-child(3) { --t: 22px; --w: 52%; --o: .28; --dl: -2.2s; }
.horizon i:nth-child(4) { --t: 37px; --w: 36%; --o: .22; --dl: -3.1s; }
.horizon i:nth-child(5) { --t: 56px; --w: 22%; --o: .16; --dl: -4s; }
@keyframes streak {
  from { transform: translateX(-50%) scaleX(.84); opacity: .55; }
  to { transform: translateX(-47%) scaleX(1.06); opacity: 1; }
}

.hero__copy { position: relative; z-index: 2; max-width: 34rem; margin-top: 58px; text-align: center; }
.hero__hello {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .04);
  box-shadow: inset 0 0 0 1px var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.hero__hello::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ice);
  box-shadow: 0 0 0 3px rgba(116, 192, 255, .18), 0 0 12px var(--ice);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(116, 192, 255, 0), 0 0 12px var(--ice); } }

.hero__title { margin-top: 12px; font-size: clamp(2.25rem, 10.4vw, 4.8rem); font-weight: 900; line-height: 1.28; }
.hero__title .line { display: block; background-size: 100% 100%; }
.js .hero__title.is-entering { filter: url(#mirage-in); }
.mirage {
  display: inline-block;
  padding-inline: .06em;
  color: var(--ice);
  -webkit-text-fill-color: var(--ice);
  text-shadow: 0 0 30px rgba(116, 192, 255, .55);
  filter: url(#mirage);
}
.hero__lead { max-width: 29em; margin: 12px auto 0; font-size: clamp(.97rem, 4vw, 1.14rem); line-height: 1.95; color: var(--ink-2); }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.hero__platforms { margin-top: 20px; font-size: .6rem; letter-spacing: .34em; color: var(--ink-3); }

/* ==========================================================================
   MANIFESTO
   ========================================================================== */

.manifesto { position: relative; padding-block: clamp(96px, 20vw, 200px) clamp(64px, 12vw, 140px); }
.manifesto__text { font-size: clamp(1.5rem, 6.5vw, 2.9rem); font-weight: 760; line-height: 1.85; }
.manifesto__text b { font-weight: 900; color: var(--ice); text-shadow: 0 0 26px rgba(116, 192, 255, .35); }
.js .manifesto__text .w {
  display: inline-block;
  opacity: .13;
  filter: blur(4px);
  transform: translateY(.14em);
  transition: opacity .6s var(--ease), filter .8s var(--ease), transform .8s var(--ease);
}
.js .manifesto__text .w.is-real { opacity: 1; filter: none; transform: none; }

/* ==========================================================================
   ABOUT
   ========================================================================== */

.about__grid { display: grid; gap: 30px; }
.about__head .h2 { max-width: 12em; }

.about__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  background: #16171b center / cover no-repeat;
  box-shadow: 0 50px 90px -50px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .08);
}
.about__frame img { width: 100%; height: 100%; object-fit: cover; }
/* the desk lamp in the photo keeps glowing */
.about__lamp {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(16% 9% at 92.5% 13.4%, rgba(255, 214, 150, .75), transparent 70%),
    radial-gradient(38% 30% at 90% 26%, rgba(255, 190, 110, .2), transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: lamp 6s ease-in-out infinite;
}
@keyframes lamp { 0%, 100% { opacity: .7; } 42% { opacity: 1; } 46% { opacity: .82; } 50% { opacity: 1; } }
.about__dust i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 228, 185, .95);
  box-shadow: 0 0 6px rgba(255, 200, 120, .9);
  opacity: 0;
  animation: dust var(--t) ease-in-out var(--d) infinite;
}
@keyframes dust {
  0% { opacity: 0; transform: translate(0, 0); }
  30% { opacity: .9; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)); }
}

.about__body { display: grid; gap: 16px; font-size: 1.04rem; line-height: 2.05; color: var(--ink-2); }
.about__body strong { font-weight: 800; color: var(--ink); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  box-shadow: inset 0 0 0 1px var(--line);
}
.stat strong { --lh: 1.15em; font-size: 2.7rem; font-weight: 900; line-height: 1.15; }
.stat > span, .stat__txt > span { font-size: .88rem; line-height: 1.75; color: var(--ink-2); }
.stat--watch { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 18px; }
.stat__txt { display: flex; flex-direction: column; gap: 4px; }
.stat--watch strong { font-size: 3.4rem; }

.watch { flex: none; width: 118px; height: 118px; filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .6)); }
.watch__idx { fill: #3a404b; transition: fill .35s; }
.watch__idx.on { fill: #f4f0e9; }
.watch__brand { font: 700 7px var(--font); letter-spacing: 2.2px; fill: #cfd6e0; }
.watch__sub { font: 600 4.2px var(--font); letter-spacing: 1.3px; fill: var(--ice); }
.watch__hour, .watch__min { fill: #eef2f7; transform-origin: 60px 60px; }
.watch__min { fill: #fff; }
.watch__sec { transform-origin: 60px 60px; animation: tick 60s steps(60) infinite; }
.watch__sec rect { fill: var(--ice); }
.watch__cap { fill: #dfe6ee; stroke: #0b0c0f; stroke-width: 1; }
@keyframes tick { to { transform: rotate(360deg); } }

.team {
  padding: 22px 18px;
  border-radius: 26px;
  background: radial-gradient(120% 80% at 100% 0%, rgba(116, 192, 255, .08), transparent 60%), rgba(255, 255, 255, .025);
  box-shadow: inset 0 0 0 1px var(--line);
}
.team h3 { font-size: 1.3rem; font-weight: 850; line-height: 1.5; }
.team > p { margin-top: 6px; font-size: .95rem; line-height: 1.9; color: var(--ink-2); }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.roles li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: .84rem;
  font-weight: 650;
  line-height: 1.5;
  background: rgba(255, 255, 255, .035);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}
.roles .ic { width: 20px; height: 20px; color: var(--ice); }

/* ==========================================================================
   SKILLS — morphing device
   ========================================================================== */

.skills { position: relative; padding-top: clamp(88px, 17vw, 170px); }
.morph { position: relative; height: calc(100vh + var(--n) * 64vh); margin-top: 6px; }
.morph__sticky {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px;
  height: 100vh;
  height: 100svh;
  padding: calc(env(safe-area-inset-top, 0px) + 26px) var(--gutter) calc(var(--tab-space) + 8px);
  overflow: hidden;
}
.morph__stage { position: relative; isolation: isolate; container-type: size; display: grid; place-items: center; }
.morph__stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: 0;
  width: 80%;
  height: 18%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(116, 192, 255, .22), transparent);
  pointer-events: none;
}

.device { position: relative; width: var(--w); height: var(--h); transition: width .9s var(--ease), height .9s var(--ease); }
.device[data-kind="ios"] { --h: 92cqh; --w: calc(var(--h) * .49); --r: calc(var(--w) * .2); --bz: calc(var(--w) * .038); }
.device[data-kind="android"] { --h: 92cqh; --w: calc(var(--h) * .47); --r: calc(var(--w) * .11); --bz: calc(var(--w) * .032); }
.device[data-kind="web"] { --w: min(96cqw, 125cqh); --h: calc(var(--w) * .66); --r: 14px; --bz: 0px; }
.device[data-kind="tv"] { --w: min(98cqw, 150cqh); --h: calc(var(--w) * .5625); --r: 8px; --bz: 5px; }
.device[data-kind="design"] { --h: min(84cqh, 115cqw); --w: calc(var(--h) * .7); --r: 4px; --bz: 0px; }

.device__body {
  position: absolute;
  inset: 0;
  padding: var(--bz);
  border-radius: var(--r);
  background: linear-gradient(150deg, #3a414d 0%, #111318 22%, #0b0c0f 60%, #2b313b 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 60px 90px -50px rgba(0, 0, 0, .95), 0 0 90px -30px rgba(116, 192, 255, .3);
  transition: border-radius .9s var(--ease), padding .9s var(--ease), background .6s, box-shadow .6s;
}
.device__screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: max(2px, calc(var(--r) - var(--bz)));
  background: #0c0d11;
  container-type: size;
  transition: border-radius .9s var(--ease), background .6s;
}
.device[data-kind="web"] .device__body { background: #1b1e25; }
.device[data-kind="design"] .device__body { background: #f4f3ef; box-shadow: 0 0 0 1.5px #0d99ff, 0 60px 90px -50px rgba(0, 0, 0, .95); }
.device[data-kind="design"] .device__screen { background: #f4f3ef; }

.d-island, .d-punch, .d-stand, .d-handles, .d-label { position: absolute; opacity: 0; transition: opacity .35s; pointer-events: none; }
.d-island { z-index: 3; top: calc(var(--bz) + 2.2%); left: 50%; width: 31%; height: 3.3%; transform: translateX(-50%); border-radius: 99px; background: #000; }
.d-punch { z-index: 3; top: calc(var(--bz) + 2.3%); left: 50%; width: 4.6%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: #000; box-shadow: 0 0 0 1.5px #1c1f25; }
.d-stand {
  top: 100%;
  left: 50%;
  width: 28%;
  height: 10%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #2a2f38, #0d0e11);
  clip-path: polygon(40% 0, 60% 0, 62% 62%, 100% 76%, 100% 100%, 0 100%, 0 76%, 38% 62%);
}
.d-handles { inset: 0; }
.d-handles i { position: absolute; width: 9px; height: 9px; border: 1.5px solid #0d99ff; border-radius: 2px; background: #fff; }
.d-handles i:nth-child(1) { top: -5px; left: -5px; }
.d-handles i:nth-child(2) { top: -5px; right: -5px; }
.d-handles i:nth-child(3) { bottom: -5px; left: -5px; }
.d-handles i:nth-child(4) { bottom: -5px; right: -5px; }
.d-label { bottom: calc(100% + 9px); left: 0; font: 600 11px/1 var(--mono); color: #0d99ff; white-space: nowrap; }

.device[data-kind="ios"] .d-island,
.device[data-kind="android"] .d-punch,
.device[data-kind="tv"] .d-stand,
.device[data-kind="design"] .d-handles,
.device[data-kind="design"] .d-label { opacity: 1; transition-delay: .45s; }

/* browsers without container units (e.g. iOS 15) get fixed device sizes */
@supports not (width: 1cqw) {
  .device[data-kind="ios"], .device[data-kind="android"] { --h: 40vh; --w: calc(var(--h) * .48); }
  .device[data-kind="web"] { --w: 84vw; --h: calc(var(--w) * .66); }
  .device[data-kind="tv"] { --w: 86vw; --h: calc(var(--w) * .5625); }
  .device[data-kind="design"] { --h: 38vh; --w: calc(var(--h) * .7); }
}

/* the little interfaces inside the device */
.ui { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; transition: opacity .4s var(--ease); pointer-events: none; }
.device[data-kind="ios"] .ui--ios,
.device[data-kind="android"] .ui--android,
.device[data-kind="web"] .ui--web,
.device[data-kind="tv"] .ui--tv,
.device[data-kind="design"] .ui--design { opacity: 1; transition-delay: .35s; }

/* shared skeleton pieces */
.bar { flex: none; display: block; width: var(--w, 60%); height: .5em; border-radius: 99px; background: rgba(255, 255, 255, .13); }
.bar--hi { background: rgba(255, 255, 255, .62); }
.bar--xl { height: .85em; }
.art { position: relative; display: block; overflow: hidden; background: var(--art, #222); }
.art::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .5));
  clip-path: polygon(0 62%, 14% 40%, 24% 52%, 40% 14%, 55% 46%, 68% 30%, 82% 50%, 100% 36%, 100% 100%, 0 100%);
}
.art--1 { --art: radial-gradient(90% 70% at 25% 18%, rgba(140, 205, 255, .55), transparent 60%), linear-gradient(165deg, #25476e, #0b1422 72%); }
.art--2 { --art: radial-gradient(90% 70% at 75% 20%, rgba(255, 196, 130, .55), transparent 60%), linear-gradient(165deg, #6a3520, #160b07 74%); }
.art--3 { --art: radial-gradient(90% 70% at 30% 18%, rgba(200, 160, 255, .5), transparent 60%), linear-gradient(165deg, #432468, #110a1e 74%); }
.art--4 { --art: radial-gradient(90% 70% at 70% 16%, rgba(120, 255, 220, .45), transparent 60%), linear-gradient(165deg, #175650, #06191a 74%); }
.art--5 { --art: radial-gradient(90% 70% at 28% 16%, rgba(255, 140, 160, .5), transparent 60%), linear-gradient(165deg, #641f33, #1c0910 74%); }
.art--6 { --art: radial-gradient(90% 70% at 60% 12%, rgba(255, 255, 255, .4), transparent 60%), linear-gradient(165deg, #465062, #101318 74%); }

.u-status, .m-status {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: 2.6em;
  padding: 0 2em 0 2.2em;
  font-size: .7em;
  font-weight: 700;
  color: #fff;
}
.u-status b, .m-status b { font-family: -apple-system, system-ui, sans-serif; font-weight: 700; }
.u-status i, .m-status i { position: relative; width: 2.3em; height: 1.05em; border-radius: .32em; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7); }
.u-status i::after, .m-status i::after { content: ""; position: absolute; inset: 2px 30% 2px 2px; border-radius: .15em; background: #fff; }

/* iOS */
.ui--ios { font-size: 7px; font-size: 4.6cqw; background: linear-gradient(180deg, #10131a, #0a0b0e); }
.ios-large { display: flex; flex-direction: column; gap: .5em; padding: 1.1em 1.2em .9em; }
.ios-widget { flex: none; display: flex; flex-direction: column; justify-content: flex-end; gap: .5em; height: 8.6em; margin: 0 1.2em; padding: 1em; border-radius: 1.3em; }
.ios-widget .bar { position: relative; z-index: 1; }
.ios-list { margin: 1em 1.2em 0; overflow: hidden; border-radius: 1.1em; background: rgba(255, 255, 255, .055); }
.ios-list li { display: flex; align-items: center; gap: .8em; padding: .8em .9em; }
.ios-list li + li { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.ico { flex: none; width: 1.8em; height: 1.8em; border-radius: .5em; background: linear-gradient(135deg, #8fd0ff, #3f7fe0); }
.ico--2 { background: linear-gradient(135deg, #ffd08a, #e0843f); }
.ico--3 { background: linear-gradient(135deg, #c3a8ff, #6a48e0); }
.ios-tabs {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 3.6em;
  margin: auto 1.2em 1.6em;
  border-radius: 99px;
  background: rgba(255, 255, 255, .09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.ios-tabs i, .md-nav i, .m-tabs i { width: 1.35em; height: 1.35em; border-radius: .42em; background: rgba(255, 255, 255, .28); }
.ios-tabs i.on, .m-tabs i.on { background: var(--ice); box-shadow: 0 0 .8em rgba(116, 192, 255, .6); }

/* Android */
.ui--android { font-size: 7px; font-size: 4.6cqw; gap: .8em; background: #0f1013; }
.md-search { flex: none; display: flex; align-items: center; gap: .8em; height: 3em; margin: .4em 1.1em 0; padding: 0 1.1em; border-radius: 99px; background: #1f2229; }
.md-search::before { content: ""; flex: none; width: 1em; height: 1em; border-radius: 50%; box-shadow: inset 0 0 0 .17em rgba(255, 255, 255, .5); }
.md-chips { display: flex; gap: .5em; padding: 0 1.1em; }
.md-chips i { width: 4.6em; height: 2.1em; border-radius: .7em; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.md-chips i.on { background: #2d4058; box-shadow: none; }
.md-card { display: flex; flex-direction: column; gap: .55em; margin: 0 1.1em; padding: .7em; border-radius: 1.4em; background: #1a1c21; }
.md-card .art { height: 7.4em; border-radius: 1em; }
.md-card--row { flex-direction: row; align-items: center; gap: .8em; }
.md-card--row .art { flex: none; width: 4.2em; height: 4.2em; }
.md-card--row span { flex: 1; display: flex; flex-direction: column; gap: .5em; }
.md-fab { position: absolute; bottom: 5.6em; inset-inline-end: 1.1em; width: 3.4em; height: 3.4em; border-radius: 1.1em; background: #cfe6ff; box-shadow: 0 .4em 1em rgba(0, 0, 0, .4); }
.md-fab::before, .md-fab::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1.3em; height: .2em; border-radius: 1em; background: #0b2a4a; transform: translate(-50%, -50%); }
.md-fab::after { transform: translate(-50%, -50%) rotate(90deg); }
.md-nav { display: flex; align-items: center; justify-content: space-around; height: 4.4em; margin-top: auto; background: #16181c; }
.md-nav i.on { position: relative; width: 3.4em; height: 2em; border-radius: 99px; background: #2d4058; }
.md-nav i.on::after { content: ""; position: absolute; inset: .35em 1.05em; border-radius: .35em; background: #cfe6ff; }

/* Web */
.ui--web { font-size: 6px; font-size: 1.9cqw; background: #0e0f13; }
.web-chrome { flex: none; display: flex; align-items: center; gap: 1em; height: 3em; padding: 0 1.1em; background: #1c1f26; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .06); }
.web-dots { display: flex; gap: .5em; }
.web-dots i { width: .85em; height: .85em; border-radius: 50%; background: #ff5f57; }
.web-dots i:nth-child(2) { background: #febc2e; }
.web-dots i:nth-child(3) { background: #28c840; }
.web-url { flex: 0 1 46%; display: grid; place-items: center; height: 1.9em; margin-inline: auto; border-radius: .6em; font: 500 .95em/1 var(--mono); color: var(--ink-2); background: #111318; }
.web-page { flex: 1; display: flex; flex-direction: column; gap: 1.8em; padding: 1.6em 2.2em; }
.web-nav { display: flex; align-items: center; gap: 1.6em; }
.web-nav .bar { width: 4.5em; }
.web-logo { flex: none; width: 2em; height: 2em; border-radius: .6em; background: var(--chrome); }
.web-navbtn { width: 6.5em; height: 2.2em; margin-inline-start: auto; border-radius: 99px; background: var(--ice); }
.web-hero { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 2.4em; }
.web-hero__txt { display: flex; flex-direction: column; gap: .9em; }
.web-btn { width: 9em; height: 2.6em; margin-top: .6em; border-radius: 99px; background: linear-gradient(180deg, #fff, #c6d1df); }
.web-hero__img { height: 13em; border-radius: 1.4em; }
.web-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3em; }
.web-cards .art { height: 7em; border-radius: 1em; }

/* TV */
.ui--tv { font-size: 6px; font-size: 1.9cqw; background: #060709; }
.tvu-hero { flex: 1; display: flex; align-items: center; padding: 0 3.2em; }
.tvu-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, rgba(6, 7, 9, .92) 20%, transparent 72%), linear-gradient(to top, #060709, transparent 40%);
}
.tvu-hero > div { position: relative; z-index: 1; display: flex; flex-direction: column; gap: .9em; width: 42%; }
.tvu-btn { width: 8em; height: 2.6em; margin-top: .5em; border-radius: .7em; background: #fff; }
.tvu-row { display: flex; gap: 1.3em; padding: 1.2em 3.2em 2.6em; }
.tvu-row i { flex: 1; aspect-ratio: 16 / 10; border-radius: .7em; animation: tvFocus 7.5s var(--ease) infinite; animation-delay: calc(var(--k) * 1.5s); }
@keyframes tvFocus {
  0%, 20%, 100% { transform: none; box-shadow: none; }
  3%, 17% { transform: scale(1.12); box-shadow: 0 0 0 .28em #fff, 0 1.2em 2em rgba(0, 0, 0, .6); }
}

/* Design */
.ui--design { font-size: 8px; font-size: 3.4cqw; gap: 1.1em; padding: 1.5em; color: #15171c; background: #f4f3ef; }
.ui--design .bar { background: #d8d5cd; }
.dz-img { flex: none; height: 34%; border-radius: .9em; }
.dz-type { display: flex; align-items: center; gap: .9em; }
.dz-type b { font-size: 3.2em; font-weight: 800; line-height: 1; }
.dz-type span { flex: 1; display: flex; flex-direction: column; gap: .5em; }
.dz-swatches { display: flex; gap: .6em; }
.dz-swatches i { width: 2.3em; height: 2.3em; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.dz-btn { position: relative; align-self: flex-start; margin-top: auto; margin-bottom: .6em; padding: .55em 1.9em; border-radius: 99px; font-size: 1.05em; font-weight: 750; line-height: 1.7; color: #fff; background: #15171c; }
.dz-sel { position: absolute; inset: -.4em; border: 1.5px solid #0d99ff; border-radius: .2em; }
.dz-sel i { position: absolute; width: .55em; height: .55em; border: 1.5px solid #0d99ff; background: #fff; }
.dz-sel i:nth-child(1) { top: -.3em; left: -.3em; }
.dz-sel i:nth-child(2) { top: -.3em; right: -.3em; }
.dz-sel i:nth-child(3) { bottom: -.3em; left: -.3em; }
.dz-sel i:nth-child(4) { bottom: -.3em; right: -.3em; }
.dz-cursor { position: absolute; z-index: 4; top: 64%; left: 50%; display: flex; direction: ltr; align-items: flex-start; font-size: 11px; will-change: transform; animation: cursor 8s var(--ease-io) infinite; }
.dz-cursor svg { width: 18px; height: 18px; fill: #ff5fa2; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }
.dz-cursor em { margin-top: 13px; padding: 1px 8px; border-radius: 8px; font-weight: 700; line-height: 1.7; color: #fff; background: #ff5fa2; }
@keyframes cursor {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-50px, -90px); }
  50% { transform: translate(-6px, -150px); }
  75% { transform: translate(-70px, -30px); }
}
.dz-measure { position: absolute; top: 50%; right: calc(100% + .5em); width: 2.8em; padding-top: .25em; border-top: 1px solid #ff4d8d; font: 700 .62em/1 var(--mono); text-align: center; color: #ff4d8d; }

/* panel */
.morph__panel { position: relative; }
.seg {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .05);
  box-shadow: inset 0 0 0 1px var(--line);
}
.seg button { position: relative; z-index: 1; min-height: 38px; font-size: .74rem; font-weight: 700; color: var(--ink-3); transition: color .3s; }
.seg button.is-on { color: var(--ink); }
.seg__pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  inset-inline-start: 4px;
  width: calc((100% - 8px) / 5);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
  translate: calc(var(--seg, 0) * -100%) 0;
  transition: translate .6s var(--ease);
}
.msteps { display: grid; margin-top: 16px; }
.mstep {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  filter: blur(6px);
  transition: opacity .45s var(--ease), transform .7s var(--ease), filter .6s var(--ease), visibility 0s .7s;
}
.mstep.is-on { opacity: 1; visibility: visible; transform: none; filter: none; transition-delay: .1s, .1s, .1s, 0s; }
.mstep h3 { font-size: clamp(1.35rem, 6vw, 2.2rem); font-weight: 850; line-height: 1.45; }
.mstep p { margin-top: 6px; font-size: .96rem; line-height: 1.95; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 12px; }
.chips li {
  padding: 3px 11px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 650;
  line-height: 1.8;
  color: #cfe8ff;
  background: rgba(116, 192, 255, .08);
  box-shadow: inset 0 0 0 1px rgba(116, 192, 255, .2);
}

/* ==========================================================================
   LANGUAGES
   ========================================================================== */

.langs__grid { display: grid; gap: 26px; }
.code {
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(180deg, #13151b, #0c0d11);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 80px -40px rgba(0, 0, 0, .9), 0 0 70px -30px rgba(116, 192, 255, .25);
}
.code__bar { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 16px; font: 500 .78rem/1 var(--mono); color: var(--ink-2); background: rgba(255, 255, 255, .03); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .06); }
.code__dots { display: flex; gap: 7px; }
.code__dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.code__dots i:nth-child(2) { background: #febc2e; }
.code__dots i:nth-child(3) { background: #28c840; }
.code__file { color: var(--ink); }
.code__lang { margin-left: auto; padding: 4px 9px; border-radius: 99px; font-size: .7rem; color: var(--ice); background: rgba(116, 192, 255, .12); }
.code__body { display: flex; min-height: calc(7 * 1.75em + 32px); padding: 16px 0; font: 400 clamp(.72rem, 3.3vw, .9rem)/1.75 var(--mono); }
.code__gutter { flex: none; width: 42px; padding-right: 14px; font: inherit; text-align: right; color: #3f4450; -webkit-user-select: none; user-select: none; }
.code__src { flex: 1; min-width: 0; overflow: hidden; font: inherit; white-space: pre; color: #d9dee7; }
.code__caret { display: inline-block; width: .55em; height: 1.15em; margin-left: 1px; vertical-align: -.2em; background: var(--ice); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.t-k { color: #c79bff; }
.t-t { color: #74c0ff; }
.t-f { color: #8ee6d1; }
.t-s { color: #f2c98a; }
.t-n { color: #ffb38a; }
.t-c { color: #5d6472; }
.code__out { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font: 500 .82rem/1.6 var(--mono); color: var(--ink-3); background: rgba(0, 0, 0, .25); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.code__prompt { color: var(--ice); }
.code__out bdi { font-family: var(--font); font-weight: 750; color: var(--ink); opacity: 0; transform: translateY(4px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.code__ok { margin-left: auto; color: #6fdc8c; opacity: 0; transition: opacity .4s .15s; }
.code__out.is-on bdi { opacity: 1; transform: none; }
.code__out.is-on .code__ok { opacity: 1; }

.keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  padding: 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, #16181d, #0d0e11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 0 0 1px rgba(255, 255, 255, .05), 0 30px 60px -30px rgba(0, 0, 0, .9);
}
.key {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 2px;
  min-width: 0;
  aspect-ratio: 1 / .9;
  padding: 8px 9px;
  border-radius: 12px;
  direction: ltr;
  text-align: left;
  color: var(--ink-2);
  background: linear-gradient(180deg, #2a2e36 0%, #1c1f25 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -2px 0 rgba(0, 0, 0, .25), 0 4px 0 #0a0b0e, 0 6px 12px rgba(0, 0, 0, .5);
  transition: transform .08s ease-out, box-shadow .08s ease-out, color .3s, background .3s;
}
.key b { max-width: 100%; overflow: hidden; font: 700 clamp(.66rem, 2.9vw, .82rem)/1.2 var(--font); text-overflow: ellipsis; white-space: nowrap; }
.key small { font: 500 .58rem/1 var(--mono); color: var(--ink-3); }
.key::before { content: ""; position: absolute; top: 8px; right: 8px; width: 5px; height: 5px; border-radius: 50%; background: #3a3f48; transition: background .3s, box-shadow .3s; }
.key:active, .key.is-press {
  transform: translateY(3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 -1px 0 rgba(0, 0, 0, .25), 0 1px 0 #0a0b0e, 0 2px 5px rgba(0, 0, 0, .5);
}
.key.is-on {
  color: #fff;
  background: linear-gradient(180deg, #2c3441, #1d232c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(116, 192, 255, .35), 0 4px 0 #0a0b0e, 0 6px 18px rgba(116, 192, 255, .25);
}
.key.is-on::before { background: var(--ice); box-shadow: 0 0 8px var(--ice); }
.key.is-on:active, .key.is-on.is-press {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(116, 192, 255, .35), 0 1px 0 #0a0b0e, 0 2px 10px rgba(116, 192, 255, .25);
}

/* ==========================================================================
   WORK
   ========================================================================== */

.work { overflow-x: hidden; overflow-x: clip; }
.work__list { display: grid; gap: clamp(96px, 22vw, 170px); margin-top: 60px; }
.project { display: grid; gap: 26px; }
.project__head { display: flex; align-items: flex-start; gap: 16px; }
.project__num { flex: none; font-size: 3.1rem; font-weight: 900; line-height: 1.05; color: transparent; -webkit-text-stroke: 1px rgba(200, 215, 235, .45); }
.project__tag { font-size: .85rem; font-weight: 650; color: var(--ice); }
.project__title { --lh: 1.3em; font-size: clamp(2.1rem, 9.6vw, 3.6rem); font-weight: 900; line-height: 1.3; }
.project__latin { margin-top: 2px; font-size: .64rem; letter-spacing: .38em; text-align: right; color: var(--ink-3); }
.project__body { display: grid; gap: 16px; }
.project__desc { font-size: 1.02rem; line-height: 2; color: var(--ink-2); }
.what { display: flex; flex-wrap: wrap; gap: 8px; }
.what li { padding: 5px 13px; border-radius: 99px; font-size: .82rem; font-weight: 650; line-height: 1.8; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line); }
.plats { display: flex; justify-content: flex-end; gap: 16px; font-size: .66rem; letter-spacing: .24em; color: var(--ink-3); }
.project__links { display: flex; flex-wrap: wrap; gap: 10px; }
.project__links:not(:has(a[href]:not([href=""]))) { display: none; }
[data-link][href=""] { display: none; }

.hint { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; font-size: .8rem; color: var(--ink-3); }
.hint .ic { width: 18px; height: 18px; color: var(--ice); animation: nudge 2.4s var(--ease-io) infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-5px); } }

.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 6px; }
.pager__count { min-width: 4.5em; font-size: .88rem; font-weight: 700; text-align: center; color: var(--ink-2); }
.round-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, .05);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: transform .2s var(--ease), background .3s;
}
.round-btn:active { transform: scale(.9); background: rgba(255, 255, 255, .1); }
.round-btn .ic { width: 20px; height: 20px; }

/* phone frame used by the showcases */
.phone {
  position: relative;
  aspect-ratio: 9 / 19.5;
  padding: 3.4%;
  border-radius: 16% / 7.4%;
  background: linear-gradient(145deg, #3d434e, #0e1014 28%, #15181d 72%, #474e5a);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 40px 70px -30px rgba(0, 0, 0, .95);
}
.phone__screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 12.6% / 5.8%; background: #0d0e12; container-type: inline-size; }
.phone__screen > img { width: 100%; height: 100%; object-fit: cover; object-position: top; -webkit-user-drag: none; }
.phone__island { position: absolute; z-index: 4; top: 4.6%; left: 50%; width: 29%; height: 2.9%; transform: translateX(-50%); border-radius: 99px; background: #000; }

/* 01 · coverflow on a film strip */
.flow { position: relative; margin-inline: calc(var(--gutter) * -1); }
.film {
  height: 18px;
  background-color: #141519;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='18'%3E%3Crect x='7' y='5' width='12' height='8' rx='2' fill='%230a0a0c'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), inset 0 -1px 0 rgba(255, 255, 255, .05);
}
.flow__track {
  --iw: min(56vw, 262px);
  display: flex;
  overflow-x: auto;
  padding: 30px calc(50% - var(--iw) / 2);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  outline: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.flow__track::-webkit-scrollbar { display: none; }
.flow__track:focus-visible { box-shadow: inset 0 0 0 2px var(--ice); }
.flow__item { position: relative; flex: 0 0 var(--iw); perspective: 1200px; scroll-snap-align: center; cursor: pointer; }
.flow__item .phone { will-change: transform; }

/* 01b · website screenshots in a browser window */
.flow--web .flow__track { --iw: min(80vw, 560px); }
.browser {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 16 / 10.6;
  overflow: hidden;
  border-radius: 12px;
  background: #1b1e25;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 40px 70px -30px rgba(0, 0, 0, .95);
}
.browser__bar { flex: none; display: flex; align-items: center; gap: 10px; height: 26px; padding: 0 10px; background: #1c1f26; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .06); }
.browser__dots { display: flex; gap: 5px; }
.browser__dots i { width: 8px; height: 8px; border-radius: 50%; background: #ff5f57; }
.browser__dots i:nth-child(2) { background: #febc2e; }
.browser__dots i:nth-child(3) { background: #28c840; }
.browser__url { flex: 0 1 58%; margin-inline: auto; overflow: hidden; height: 16px; border-radius: 5px; font: 500 9px/16px var(--mono); text-align: center; white-space: nowrap; text-overflow: ellipsis; color: var(--ink-2); background: #111318; }
.browser__screen { position: relative; flex: 1; overflow: hidden; background: #0e0f13; container-type: inline-size; }
.browser__screen > img { width: 100%; height: 100%; object-fit: cover; object-position: top; -webkit-user-drag: none; }
.wmock { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 1.8em; padding: 1.6em 2.2em; font-size: 7px; font-size: 1.9cqw; color: var(--ink); }
.wmock--dash { flex-direction: row; gap: 1.6em; padding: 0; }
.wd-side { flex: none; display: flex; flex-direction: column; gap: 1.1em; width: 22%; padding: 1.6em 1.3em; background: #15171c; }
.wd-side .web-logo { margin-bottom: .8em; }
.wd-main { flex: 1; display: flex; flex-direction: column; gap: 1.4em; padding: 1.6em 1.6em 1.6em 0; }
.wd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1em; }
.wd-stats i { display: flex; flex-direction: column; justify-content: flex-end; gap: .5em; height: 5.2em; padding: .9em; border-radius: .9em; background: #16181e; }
.wd-chart { flex: 1; min-height: 0; border-radius: 1em; background: #16181e; }
.wd-chart svg { width: 100%; height: 100%; fill: none; stroke: var(--ice); stroke-width: 2; }
.wa-cover { flex: none; height: 42%; border-radius: 1.2em; }
.wa-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 2em; }
.wa-cols > span { display: flex; flex-direction: column; gap: .7em; }

/* 02 · TV + remote */
.tvshow { position: relative; display: flex; flex-direction: column; align-items: center; }
.tv {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 5px;
  border-radius: 12px;
  background: linear-gradient(180deg, #23262d, #0c0d10);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 40px 70px -35px rgba(0, 0, 0, .95);
}
.tv__screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 8px; background: #000; container-type: inline-size; outline: none; }
.tv__screen:focus-visible { box-shadow: 0 0 0 2px var(--ice); }
.tv__stand { position: relative; z-index: 1; width: 30%; height: 14px; background: linear-gradient(180deg, #1d2026, #0b0c0e); clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%); }
.tv__glow {
  position: absolute;
  z-index: 0;
  top: 6%;
  left: 8%;
  right: 8%;
  height: 34%;
  border-radius: 50%;
  background: var(--glow, #3d7fc4);
  filter: blur(46px);
  opacity: .5;
  transition: background .6s;
  pointer-events: none;
}

.tvm { position: absolute; inset: 0; overflow: hidden; font-size: 7px; font-size: 2.05cqw; color: #fff; background: #050608; }
.tvm__bg { position: absolute; inset: 0 0 30% 0; }
.tvm__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to left, rgba(5, 6, 8, .94) 18%, rgba(5, 6, 8, .25) 65%, transparent), linear-gradient(to top, #050608 2%, transparent 45%);
}
.tvm__nav { position: relative; z-index: 2; display: flex; align-items: center; gap: .5em; padding: 1.5em 2.6em 0; }
.tvm__logo {
  margin-inline-end: 1.2em;
  font-size: .95em;
  font-weight: 900;
  letter-spacing: .14em;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tvm__nav b { padding: .2em .9em; border-radius: 99px; font-size: .92em; font-weight: 600; color: rgba(255, 255, 255, .7); transition: transform .25s var(--ease), background .25s, color .25s; }
.tvm__hero { position: relative; z-index: 2; display: flex; flex-direction: column; gap: .8em; width: 44%; padding: 2.3em 2.6em 0; }
.tvm__btns { display: flex; gap: .7em; margin-top: .5em; }
.tvm__btns b { padding: .4em 1.3em; border-radius: .6em; font-size: .92em; font-weight: 700; background: rgba(255, 255, 255, .14); transition: transform .25s var(--ease), background .25s, color .25s; }
.tvm__row { position: absolute; z-index: 2; inset: auto 0 2.2em; display: flex; gap: 1.1em; padding: 0 2.6em; }
.tvm__row i { flex: none; width: 13.5%; aspect-ratio: 2 / 3; border-radius: .6em; transition: transform .35s var(--ease), box-shadow .35s; }
.tvm .is-focus { z-index: 3; }
.tvm__nav b.is-focus, .tvm__btns b.is-focus { color: #000; background: #fff; transform: scale(1.08); }
.tvm__row i.is-focus { transform: scale(1.15); box-shadow: 0 0 0 .22em #fff, 0 1em 2em rgba(0, 0, 0, .7); }
.tvm .is-press { animation: press .3s var(--ease); }
@keyframes press { 40% { scale: .92; } }
.tvm__player { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; background: linear-gradient(rgba(0, 0, 0, .25), rgba(0, 0, 0, .6)), var(--art, #000); animation: fadeIn .35s var(--ease); }
.tvm__player::after { display: none; }
.tvm__player[hidden] { display: none; }
.tvm__pp { position: relative; width: 5em; height: 5em; border-radius: 50%; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.tvm__pp::before, .tvm__pp::after { content: ""; position: absolute; top: 32%; bottom: 32%; width: .55em; border-radius: .2em; background: #fff; }
.tvm__pp::before { left: 36%; }
.tvm__pp::after { right: 36%; }
.tvm__player small { position: absolute; top: 2em; inset-inline-start: 2.6em; font-size: 1em; color: rgba(255, 255, 255, .8); }
.tvm__prog { position: absolute; inset: auto 2.6em 2.6em; height: .35em; overflow: hidden; border-radius: 1em; background: rgba(255, 255, 255, .2); }
.tvm__prog em { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--ice); animation: prog 8s linear forwards; }
@keyframes prog { to { width: 100%; } }
@keyframes fadeIn { from { opacity: 0; } }

.tvs { position: absolute; inset: 0; }
.tvs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s var(--ease); }
.tvs img.is-on { opacity: 1; }

.remote {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 26px;
  padding: 14px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #20232a, #111317);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 40px -16px rgba(0, 0, 0, .9);
}
.rm {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--ink-2);
  background: linear-gradient(180deg, #2b2f37, #1a1c21);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 3px 0 #08090b;
  transition: transform .1s, box-shadow .1s, color .2s;
}
.rm .ic { width: 20px; height: 20px; }
.dpad {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: radial-gradient(circle, #1c1f25 0 34%, #282c33 35% 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 3px #131519, 0 0 0 4px rgba(200, 215, 235, .2);
}
.dpad button[data-k] { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink-3); transition: color .2s, transform .1s; }
.dpad [data-k="up"] { top: 0; left: 50%; transform: translateX(-50%); }
.dpad [data-k="down"] { bottom: 0; left: 50%; transform: translateX(-50%); }
.dpad [data-k="left"] { left: 0; top: 50%; transform: translateY(-50%); }
.dpad [data-k="right"] { right: 0; top: 50%; transform: translateY(-50%); }
.dpad button[data-k] .ic { width: 20px; height: 20px; }
.dpad .dpad__ok {
  top: 50%;
  left: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%);
  font-size: .8rem;
  font-weight: 800;
  color: var(--ink);
  background: linear-gradient(180deg, #30343d, #1b1e23);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 0 1px rgba(0, 0, 0, .45), 0 3px 0 #08090b;
}
.dpad button.is-press { color: var(--ice); }
.dpad .dpad__ok.is-press, .rm.is-press { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 0 1px rgba(0, 0, 0, .45), 0 1px 0 #08090b; }
.dpad .dpad__ok.is-press { transform: translate(-50%, -48%); }
.rm.is-press { transform: translateY(2px); color: var(--ice); }
.dpad::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from calc(var(--a, 0) * 1deg - 45deg), rgba(116, 192, 255, .35) 0 90deg, transparent 90deg);
  -webkit-mask: radial-gradient(circle, transparent 34%, #000 35%);
  mask: radial-gradient(circle, transparent 34%, #000 35%);
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.dpad.is-glow::after { opacity: 1; transition: opacity .05s; }

/* 03 · card stack */
.stack { display: flex; flex-direction: column; align-items: center; }
.stack__deck { position: relative; width: min(56vw, 262px); aspect-ratio: 9 / 19.5; margin: 26px auto 14px; touch-action: pan-y; }
.stack__card { position: absolute; inset: 0; transition: transform .55s var(--ease), opacity .4s; will-change: transform; cursor: grab; -webkit-user-select: none; user-select: none; }
.stack__card.is-drag { transition: none; cursor: grabbing; }

/* ---------- mock screens (shown until real screenshots are added) ---------- */
.mock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: .75em;
  padding: 2.8em 0 1em;
  overflow: hidden;
  font-size: 9px;
  font-size: 4.3cqw;
  color: var(--ink);
  background: linear-gradient(180deg, #0f1116, #0a0b0e);
}
.mock .m-status { position: absolute; top: 0; inset-inline: 0; z-index: 5; }
.mock--bleed { padding-top: 0; }
.m-top { display: flex; align-items: center; justify-content: space-between; gap: .7em; padding: 0 1.1em; }
.m-top > span:not(.m-logo) { flex: 1; display: flex; flex-direction: column; gap: .4em; }
.m-logo { font-size: .95em; font-weight: 900; letter-spacing: .18em; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.m-av { flex: none; width: 2em; height: 2em; border-radius: 50%; background: linear-gradient(135deg, #cfd8e3, #6f7c90); }
.m-bell { flex: none; width: 2em; height: 2em; border-radius: .7em; background: rgba(255, 255, 255, .08); }
.m-hero { flex: none; height: 12.5em; margin: 0 1.1em; border-radius: 1.2em; }
.m-hero__in { position: absolute; inset: auto 0 0; z-index: 1; display: flex; flex-direction: column; gap: .5em; padding: 1em; }
.m-pill { align-self: flex-start; margin-top: .3em; padding: .15em 1.1em; border-radius: 99px; font-size: .75em; font-weight: 800; line-height: 1.8; color: #0b0c10; background: #fff; }
.m-sec { padding: .2em 1.1em 0; }
.m-row { display: flex; gap: .6em; padding: 0 1.1em; }
.m-row > i { flex: none; width: 5.2em; aspect-ratio: 2 / 3; border-radius: .7em; }
.m-row--wide > i { width: 9.6em; aspect-ratio: 16 / 10; }
.m-row--wide em { position: absolute; z-index: 1; inset: auto .6em .5em; height: .25em; border-radius: 1em; background: rgba(255, 255, 255, .25); }
.m-row--wide em::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--p); border-radius: inherit; background: var(--ice); }
.m-tabs {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-around;
  height: 3.4em;
  margin: auto 1.1em .6em;
  border-radius: 99px;
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}
.m-cover { flex: none; height: 44%; }
.m-cover::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, #0b0c0f 4%, transparent 55%); }
.m-body { position: relative; z-index: 2; display: flex; flex-direction: column; gap: .55em; margin-top: -2.2em; padding: 0 1.1em; }
.m-body--flat { margin-top: .4em; }
.m-meta { display: flex; gap: .4em; }
.m-meta i { width: 2.6em; height: 1.3em; border-radius: .4em; background: rgba(255, 255, 255, .12); }
.m-cta { display: grid; place-items: center; height: 2.6em; margin: .3em 0; border-radius: .8em; font-size: .8em; font-weight: 800; color: #06121f; background: var(--ice); }
.m-cta--block { flex: none; height: 3.2em; margin: auto 1.3em 1.4em; border-radius: 1em; font-size: .85em; }
.m-eps { display: flex; flex-direction: column; gap: .6em; padding: .4em 1.1em 0; }
.m-eps > div { display: flex; align-items: center; gap: .7em; }
.m-eps .art { flex: none; width: 6em; aspect-ratio: 16 / 10; border-radius: .6em; }
.m-eps span { flex: 1; display: flex; flex-direction: column; gap: .45em; }
.m-video { flex: none; height: 32%; display: grid; place-items: center; }
.m-play { position: relative; z-index: 1; width: 3.4em; height: 3.4em; border-radius: 50%; background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.m-play::after { content: ""; position: absolute; left: 56%; top: 50%; transform: translate(-50%, -50%); border-style: solid; border-width: .6em 0 .6em 1em; border-color: transparent transparent transparent #fff; }
.m-scrub { position: absolute; z-index: 1; inset: auto 1em .9em; height: .25em; border-radius: 1em; background: rgba(255, 255, 255, .25); }
.m-scrub em { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--p); border-radius: inherit; background: var(--ice); }
.m-scrub em::after { content: ""; position: absolute; top: 50%; inset-inline-end: -.4em; width: .8em; height: .8em; border-radius: 50%; background: #fff; transform: translateY(-50%); }
.m-search { flex: none; display: flex; align-items: center; gap: .7em; height: 2.8em; margin: .4em 1.1em 0; padding: 0 1em; border-radius: .9em; background: rgba(255, 255, 255, .07); }
.m-search::before { content: ""; flex: none; width: .95em; height: .95em; border-radius: 50%; box-shadow: inset 0 0 0 .16em rgba(255, 255, 255, .5); }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; padding: 0 1.1em; }
.m-grid > i { aspect-ratio: 4 / 3; border-radius: .8em; }
.m-grid > i .bar { position: absolute; z-index: 1; bottom: .7em; inset-inline-start: .7em; }

.mock--app { background: radial-gradient(120% 60% at 50% 0%, #16223a, #0b0c10 60%); }
.m-orb {
  flex: none;
  width: 60%;
  aspect-ratio: 1;
  margin: 2.6em auto .6em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 4%, #bfe3ff 12%, #74c0ff 36%, #2a5aa8 70%, #0d1a33 100%);
  box-shadow: 0 0 4em rgba(116, 192, 255, .45);
}
.m-center { display: flex; flex-direction: column; align-items: center; gap: .6em; padding: 1em 1.4em 0; }
.m-dots { display: flex; justify-content: center; gap: .4em; margin-top: .8em; }
.m-dots i { width: .5em; height: .5em; border-radius: 1em; background: rgba(255, 255, 255, .25); }
.m-dots i.on { width: 1.4em; background: var(--ice); }
.m-card { position: relative; flex: none; display: flex; flex-direction: column; gap: .55em; height: 9em; margin: 0 1.1em; padding: 1em; overflow: hidden; border-radius: 1.3em; background: linear-gradient(135deg, #3f8fe0, #74c0ff 55%, #b9e0ff); }
.m-card .bar { background: rgba(255, 255, 255, .55); }
.m-card .bar--hi { background: #fff; }
.m-card svg { position: absolute; inset: auto 0 0; width: 100%; height: 55%; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }
.m-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6em; padding: 0 1.1em; }
.m-actions i { position: relative; aspect-ratio: 1; border-radius: 1em; background: rgba(255, 255, 255, .06); }
.m-actions i::after { content: ""; position: absolute; inset: 32%; border-radius: .45em; background: var(--c, var(--ice)); }
.m-list { display: flex; flex-direction: column; padding: 0 1.1em; }
.m-list > div { display: flex; align-items: center; gap: .7em; padding: .55em 0; }
.m-list > div + div { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.m-list .m-av { width: 2.3em; height: 2.3em; }
.m-list span { flex: 1; display: flex; flex-direction: column; gap: .45em; }
.m-list em { flex: none; width: 1.2em; height: 1.2em; border-radius: 50%; background: var(--ice); }
.m-profile { display: flex; flex-direction: column; align-items: center; gap: .6em; padding: 1.4em 0 .6em; }
.m-profile .m-av { width: 5em; height: 5em; box-shadow: 0 0 0 .3em rgba(116, 192, 255, .25); }
.m-set { margin: 0 1.1em; overflow: hidden; border-radius: 1.1em; background: rgba(255, 255, 255, .05); }
.m-set > div { display: flex; align-items: center; gap: .7em; padding: .8em .9em; }
.m-set > div + div { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.m-toggle { position: relative; flex: none; margin-inline-start: auto; width: 2.6em; height: 1.5em; border-radius: 1em; background: rgba(255, 255, 255, .18); }
.m-toggle::after { content: ""; position: absolute; top: .15em; inset-inline-start: .15em; width: 1.2em; height: 1.2em; border-radius: 50%; background: #fff; }
.m-toggle.on { background: #34c759; }
.m-toggle.on::after { inset-inline-start: auto; inset-inline-end: .15em; }

/* ---------- lightbox ---------- */
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: rgba(5, 6, 8, .96);
}
.lightbox::backdrop { background: rgba(0, 0, 0, .6); }
.lightbox[open] { animation: fadeIn .3s var(--ease); }
.lightbox__track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lightbox__track::-webkit-scrollbar { display: none; }
.lightbox__track figure { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; min-height: 0; padding: calc(env(safe-area-inset-top, 0px) + 70px) 16px calc(env(safe-area-inset-bottom, 0px) + 64px); scroll-snap-align: center; }
.lightbox__track img { width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: 18px; object-fit: contain; }
.lightbox__close { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 14px); inset-inline-end: 14px; }
.lightbox__count { position: fixed; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); left: 50%; transform: translateX(-50%); font-size: .9rem; font-weight: 700; color: var(--ink-2); }
.lb-open { overflow: hidden; }

/* ==========================================================================
   CONTACT
   ========================================================================== */

.contact__grid { display: grid; gap: 30px; }
.contact__big { margin-top: 6px; font-size: clamp(2.3rem, 11vw, 4.6rem); font-weight: 900; line-height: 1.3; }
.contact__big em { color: var(--ice); text-shadow: 0 0 30px rgba(116, 192, 255, .5); }
.contact__side { display: grid; gap: 14px; }
.clist { overflow: hidden; border-radius: 24px; background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px var(--line); }
.clist li + li { box-shadow: inset 0 1px 0 var(--line); }
.crow { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 14px 16px; text-decoration: none; transition: background .2s; }
.crow:active { background: rgba(255, 255, 255, .05); }
.crow__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, var(--c1), var(--c2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 14px -6px var(--c2);
}
.crow__icon .ic { width: 22px; height: 22px; stroke-width: 1.8; }
.crow__txt { flex: 1; display: flex; flex-direction: column; line-height: 1.55; }
.crow__txt b { font-weight: 750; }
.crow__txt small { font-size: .8rem; color: var(--ink-3); }
.crow__chev { width: 18px; height: 18px; color: var(--ink-3); }

/* ==========================================================================
   FOOTER + TABBAR
   ========================================================================== */

.footer { position: relative; padding: 72px 0 calc(var(--tab-space) + 34px); text-align: center; box-shadow: inset 0 1px 0 var(--line); }
.footer__word { width: min(78%, 520px); height: auto; margin: 0 auto; cursor: pointer; -webkit-user-select: none; user-select: none; }
.footer__word.is-haze { filter: url(#mirage-touch); }
.footer__line { margin-top: 20px; font-size: 1.1rem; font-weight: 750; }
.footer__copy { margin-top: 6px; font-size: .8rem; color: var(--ink-3); }

.tabbar {
  position: fixed;
  z-index: 100;
  bottom: 0;
  inset-inline: 0;
  display: flex;
  justify-content: center;
  padding: 0 12px calc(10px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  transition: transform .8s var(--ease), opacity .6s;
}
.is-intro .tabbar, .lb-open .tabbar { opacity: 0; transform: translateY(140%); }
.tabbar__glass {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 430px);
  padding: 6px;
  border-radius: 28px;
  background: rgba(24, 26, 32, .62);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(255, 255, 255, .07), 0 18px 40px -10px rgba(0, 0, 0, .7);
  pointer-events: auto;
}
.tabbar__pill {
  position: absolute;
  top: 6px;
  bottom: 6px;
  inset-inline-start: 6px;
  width: calc((100% - 12px) / 5);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(255, 255, 255, .06), 0 4px 16px rgba(0, 0, 0, .3);
  translate: calc(var(--i, 0) * -100%) 0;
  transition: translate .6s var(--ease);
}
.tabbar__pill.is-stretch { animation: stretch .6s var(--ease); }
@keyframes stretch { 35% { scale: 1.24 .86; } }
.tab {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 54px;
  border-radius: 22px;
  font-size: .66rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  color: var(--ink-3);
  transition: color .3s;
}
.tab .ic { width: 22px; height: 22px; transition: transform .4s var(--ease), color .3s; }
.tab.is-active { color: var(--ink); }
.tab.is-active .ic { color: var(--ice); }
.tab:active .ic { transform: scale(.86); }

/* ==========================================================================
   LARGER SCREENS
   ========================================================================== */

@media (min-width: 600px) {
  .roles { grid-template-columns: repeat(4, 1fr); }
  .flow__track { --iw: min(34vw, 262px); }
}

@media (min-width: 600px) and (max-width: 899px) {
  .keys { grid-template-columns: repeat(8, 1fr); }
}

@media (min-width: 900px) {
  :root { --gutter: 40px; }

  .hero__inner { flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 60px; padding-block: 20px 60px; }
  .portrait { --cw: min(26vw, calc(56vh / var(--hr)), 350px); margin-bottom: 16vh; }
  .hero__copy { margin-top: 0; max-width: 580px; text-align: start; }
  .hero__cta { justify-content: flex-start; }
  .hero__platforms { text-align: right; }

  .about__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "head photo" "body photo" "stats photo" "team team";
    align-items: start;
    column-gap: 70px;
    row-gap: 28px;
  }
  .about__head { grid-area: head; }
  .about__photo { grid-area: photo; position: sticky; top: 90px; }
  .about__body { grid-area: body; }
  .stats { grid-area: stats; }
  .team { grid-area: team; margin-top: 40px; padding: 30px; }

  .morph__sticky {
    grid-template-rows: none;
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    gap: 70px;
    width: min(100%, var(--max));
    margin-inline: auto;
    padding: 90px var(--gutter) 130px;
  }
  .morph__stage { grid-column: 2; grid-row: 1; height: 64vh; }
  .morph__panel { grid-column: 1; grid-row: 1; }

  .langs__grid { grid-template-columns: 1.1fr .9fr; align-items: center; column-gap: 50px; }
  .langs__grid .sec-head { grid-column: 1 / -1; }

  .project { grid-template-columns: 1fr 1fr; grid-template-areas: "head head" "show body"; align-items: center; column-gap: 70px; }
  .project__head { grid-area: head; }
  .project__show { grid-area: show; }
  .project__body { grid-area: body; }
  .flow { margin-inline: 0; }
  .project--tv { grid-template-columns: 1.3fr .7fr; }

  .contact__grid { grid-template-columns: 1.1fr .9fr; align-items: end; column-gap: 70px; }
}

@media (hover: hover) {
  .btn--primary:hover { box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(20, 30, 50, .16), 0 16px 40px -10px rgba(116, 192, 255, .7); }
  .btn--ghost:hover, .round-btn:hover { background: rgba(255, 255, 255, .09); }
  .crow:hover { background: rgba(255, 255, 255, .04); }
  .tab:hover { color: var(--ink); }
  .key:hover { color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .mirage { filter: none; }
}
