/* ==========================================================================
   Shahriar Alam — portfolio v3
   Editorial layout, one typeface, one accent. CSS-only motion, no scroll
   hijacking: everything animates on transform/opacity so it stays smooth on
   cheap phones.
   ========================================================================== */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #06070a;
  --ink: #ece9e4;
  --muted: #858a92;
  --line: rgba(236, 233, 228, 0.13);
  --cyan: #2ee6e0;
  --red: #ff2e3f;
  --pad: clamp(1.15rem, 4vw, 4.5rem);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.24, 1);
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 1560px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1rem, 0.94rem + 0.22vw, 1.08rem);
  line-height: 1.55;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
i { font-style: normal; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.035em; line-height: 1; }
strong { font-weight: 600; color: #fff; }
.muted { color: var(--muted); }

::selection { background: var(--cyan); color: #04060a; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.skip {
  position: absolute;
  left: -9999px;
  top: 1rem;
  background: var(--cyan);
  color: #04060a;
  padding: 0.6rem 1rem;
  z-index: 400;
  font-weight: 600;
}
.skip:focus { left: 1rem; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.026;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* scroll rail — a 2px progress line, pure transform --------------------- */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 120;
  pointer-events: none;
  display: none;
}
.js .rail { display: block; }
.rail span {
  display: block;
  height: 100%;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

/* header ---------------------------------------------------------------- */
.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem var(--pad);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.3s var(--ease);
}
.top.is-stuck { border-bottom-color: var(--line); }
.top__mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  flex: none;
}
.top__nav {
  display: flex;
  gap: clamp(0.9rem, 1.8vw, 1.8rem);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.66rem;
}
.top__nav a {
  position: relative;
  padding-block: 0.3rem;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4ch;
}
.top__nav i {
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}
.top__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--out);
}
.top__nav a:hover::after { transform: scaleX(1); }
.top__nav a:hover i { color: var(--cyan); }
.top__clock {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

/* shared bits ----------------------------------------------------------- */
.label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.label--r { justify-content: flex-end; }

.status {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5b6068;
  flex: none;
}
.status--live { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

section[id] { scroll-margin-top: 4.2rem; }

.sec-head {
  display: grid;
  grid-template-columns: auto minmax(0, auto) minmax(0, 1fr);
  align-items: baseline;
  gap: clamp(0.8rem, 2vw, 2rem);
  border-top: 1px solid var(--line);
  padding-top: clamp(0.9rem, 1.8vw, 1.4rem);
  margin-bottom: clamp(1.6rem, 4vw, 3rem);
}
.sec-num {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--cyan);
}
.sec-title {
  font-size: clamp(2.2rem, 7vw, 5.4rem);
  letter-spacing: -0.05em;
}
.sec-note {
  font-family: var(--mono);
  font-size: clamp(0.68rem, 0.62rem + 0.22vw, 0.78rem);
  letter-spacing: 0.05em;
  color: var(--muted);
  max-width: 40ch;
  justify-self: end;
  text-align: right;
  line-height: 1.5;
}

/* hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  max-width: var(--max);
  margin-inline: auto;
  min-height: 100svh;
  padding: clamp(5.2rem, 11vh, 8rem) var(--pad) clamp(1.4rem, 3.5vh, 2.4rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(1.4rem, 4vh, 3rem);
}
.hero__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: clamp(0.6rem, 0.55rem + 0.2vw, 0.72rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.9rem;
}
.hero__meta i { color: var(--cyan); margin-right: 0.6ch; }
.tag { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--ink); }

.hero__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(1rem, 3vw, 3rem);
}
.hero__name {
  font-size: clamp(3.4rem, 17vw, 16rem);
  line-height: 0.78;
  letter-spacing: -0.055em;
  font-weight: 500;
}
.hero__name .line { display: block; overflow: visible; transform-style: preserve-3d; }
.hero__name .line > span { display: inline-block; }
.hero__name .line--2 { margin-left: clamp(0.5rem, 8vw, 9rem); }

.hero__id {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding-bottom: clamp(0.4rem, 2vw, 1.6rem);
  perspective: 900px;
}
.avatar {
  position: relative;
  width: clamp(104px, 19vw, 292px);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transform: rotateY(calc(var(--px, 0) * 9deg)) rotateX(calc(var(--py, 0) * -6deg));
  transition: transform 0.6s var(--out);
  will-change: transform;
}
.avatar__face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: #040507;
  box-shadow: 0 0 0 1px rgba(236, 233, 228, 0.16), 0 18px 60px rgba(0, 0, 0, 0.75),
    0 0 70px rgba(46, 230, 224, 0.13);
  transform: translateZ(12px);
}
.avatar__face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.06) saturate(1.06);
  transition: transform 0.9s var(--out);
}
.hero__id:hover .avatar__face img { transform: scale(1.07); }
.avatar__ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    var(--cyan) 40deg,
    transparent 95deg,
    transparent 220deg,
    var(--red) 268deg,
    transparent 325deg
  );
  opacity: 0.6;
  animation: spin 18s linear infinite;
  filter: blur(1.5px);
  transform: translateZ(-26px) scale(1.04);
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero__handle {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.hero__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: clamp(1rem, 2.2vh, 1.6rem);
}
.hero__claim {
  max-width: 44ch;
  font-size: clamp(1.02rem, 0.9rem + 0.6vw, 1.4rem);
  line-height: 1.35;
  text-wrap: pretty;
}
.hero__cta { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.82rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 500;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: rgba(236,233,228,.28); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* proof ----------------------------------------------------------------- */
.proof { max-width: var(--max); margin-inline: auto; padding: 0 var(--pad) clamp(3rem, 8vw, 6rem); }
.proof__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  margin-bottom: 1px;
}
.proof__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.proof__list li {
  background: var(--bg);
  padding: clamp(1rem, 2.2vw, 1.8rem);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.proof__num {
  font-family: var(--mono);
  font-size: clamp(1.7rem, 4.4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}
.proof__label { font-size: 0.84rem; line-height: 1.45; color: #b9bdc4; text-wrap: pretty; }
.src {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5b6068;
}

/* sections -------------------------------------------------------------- */
.work, .method, .playbook, .about, .contact {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(3rem, 8vw, 7rem) var(--pad);
}

/* work ------------------------------------------------------------------ */
.work__list { list-style: none; margin: 0; padding: 0; }

.row {
  display: grid;
  grid-template-columns: 3rem minmax(8rem, 0.85fr) minmax(0, 1.55fr) 8rem;
  gap: clamp(1rem, 2.4vw, 2.4rem);
  align-items: start;
  padding: clamp(1.3rem, 2.8vw, 2.2rem) 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding-left 0.35s var(--out), background 0.35s var(--ease);
}
.row:first-child { border-top: 1px solid var(--line); }
.row:hover { background: rgba(236, 233, 228, 0.025); padding-left: 0.7rem; }

.row__no {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding-top: 0.5rem;
}
.row__title {
  font-size: clamp(1.35rem, 3.4vw, 2.6rem);
  letter-spacing: -0.045em;
  line-height: 1;
  transition: color 0.3s var(--ease), text-shadow 0.3s var(--ease);
}
.row:hover .row__title {
  color: #fff;
  text-shadow: -2px 0 var(--red), 2px 0 var(--cyan);
}
.row__role {
  margin-top: 0.45rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.row__desc { font-size: 0.9rem; line-height: 1.62; color: #b4b8bf; max-width: 58ch; text-wrap: pretty; }
.row__lede {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #cfd3d8;
  margin-bottom: 0.7rem;
  text-wrap: pretty;
}
.row__points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.34rem;
}
.row__points li {
  position: relative;
  padding-left: 1.05rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #a7acb4;
  text-wrap: pretty;
}
.row__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.5rem;
  height: 1px;
  background: #4c525a;
}
.row__date {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: right;
  padding-top: 0.4rem;
  white-space: nowrap;
}

/* method ---------------------------------------------------------------- */
.method__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.4rem, 3vw, 2.6rem);
}
.step {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  position: relative;
}
.step::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  height: 1px;
  width: 0;
  background: var(--cyan);
  transition: width 0.9s var(--out) 0.1s;
}
.step.in::before { width: 100%; }
.step__no { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.14em; color: var(--cyan); }
.step h3 { font-size: clamp(1.2rem, 2.3vw, 1.6rem); line-height: 1.12; text-wrap: balance; }
.step p { font-size: 0.92rem; line-height: 1.62; color: #b4b8bf; text-wrap: pretty; }

/* playbook -------------------------------------------------------------- */
.book {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2.6rem);
}

.book__card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  position: relative;
}
.book__card::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  height: 1px;
  width: 0;
  background: var(--cyan);
  transition: width 0.9s var(--out) 0.1s;
}
.book__card.in::before { width: 100%; }

.book__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.book__code { color: var(--cyan); }

.book__title {
  font-size: clamp(1.15rem, 2.1vw, 1.55rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
  text-wrap: balance;
  min-height: 2.4em;
}

.book__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
  counter-reset: step;
}
.book__steps li {
  position: relative;
  padding-left: 1.9rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: #b4b8bf;
  text-wrap: pretty;
  counter-increment: step;
}
.book__steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.22em;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: #565c64;
}

/* about ----------------------------------------------------------------- */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
}
.about__text p {
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
  line-height: 1.62;
  margin-bottom: 1.2rem;
  color: #d3d6da;
  max-width: 54ch;
  text-wrap: pretty;
}
.about__facts dl { margin: 0; display: grid; gap: 1rem; }
.about__facts dl > div { border-top: 1px solid var(--line); padding-top: 0.7rem; }
.about__facts dt {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.about__facts dd { margin: 0; font-size: 0.88rem; line-height: 1.55; color: #c3c7cd; }

/* contact --------------------------------------------------------------- */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: start;
}
.contact__mail {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.contact__line {
  font-size: clamp(1.15rem, 3.4vw, 2.4rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  word-break: break-word;
  transition: color 0.3s var(--ease), text-shadow 0.3s var(--ease);
}
.contact__mail:hover .contact__line {
  color: #fff;
  text-shadow: -2px 0 var(--red), 2px 0 var(--cyan);
}
.contact__links { list-style: none; margin: 0; padding: 0; }
.contact__links li { border-top: 1px solid var(--line); }
.contact__links li:last-child { border-bottom: 1px solid var(--line); }
.contact__links a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  transition: padding-left 0.35s var(--out), color 0.3s var(--ease);
}
.contact__links span { font-size: clamp(0.95rem, 1.6vw, 1.1rem); }
.contact__links em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}
.contact__links a:hover { padding-left: 0.6rem; color: var(--cyan); }
.contact__links a:hover em { color: var(--cyan); }

/* ticker ---------------------------------------------------------------- */
.ticker {
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding-block: clamp(0.5rem, 1.4vw, 1rem);
  user-select: none;
}
.ticker__track {
  display: flex;
  gap: clamp(1.5rem, 4vw, 4rem);
  width: max-content;
  animation: slide 26s linear infinite;
}
.ticker__track span {
  font-size: clamp(1.8rem, 6.4vw, 5rem);
  letter-spacing: -0.045em;
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 233, 228, 0.3);
}
.ticker__track span:nth-child(odd) {
  color: var(--ink);
  -webkit-text-stroke: 0;
}
@keyframes slide { to { transform: translateX(-50%); } }

/* footer ---------------------------------------------------------------- */
.foot {
  max-width: var(--max);
  margin-inline: auto;
  padding: 1.5rem var(--pad) 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot__nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.foot__nav a { transition: color 0.25s var(--ease); }
.foot__nav a:hover { color: var(--cyan); }

/* reveal ---------------------------------------------------------------- */
/* assembling type — characters break apart and lock back together --------- */
.is-split { perspective: 900px; }
.wd {
  display: inline-block;
  white-space: nowrap;
  transform-style: preserve-3d;
}
.ch {
  display: inline-block;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transform: translate3d(var(--x, 0), var(--y, 0), var(--z, 0))
    rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  opacity: 0;
  transition: transform 1s var(--out), opacity 0.5s var(--out);
  transition-delay: calc(var(--i, 0) * 24ms);
}
.is-in .ch,
.is-split.is-in .ch {
  transform: none;
  opacity: 1;
  transition-delay: calc(var(--i, 0) * 16ms);
}

@media (prefers-reduced-motion: reduce) {
  .ch { transform: none !important; opacity: 1 !important; transition: none; }
}

/* ==========================================================================
   3D layer — depth without WebGL. Everything here is transform/opacity only.
   ========================================================================== */

.glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 640px;
  height: 640px;
  margin: -320px 0 0 -320px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  background: radial-gradient(circle, rgba(46, 230, 224, 0.09) 0%, rgba(46, 230, 224, 0.03) 38%, transparent 65%);
  transform: translate3d(var(--gx, -999px), var(--gy, -999px), 0);
  transition: opacity 0.6s var(--ease);
  will-change: transform;
}
body.is-lit .glow { opacity: 1; }

/* hero: perspective floor ------------------------------------------------ */
.hero { perspective: 1500px; }
.hero__meta, .hero__body, .hero__foot { position: relative; z-index: 2; }

.stage {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.75) 30%, transparent 62%);
  mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.75) 30%, transparent 62%);
}
.stage::before {
  content: "";
  position: absolute;
  left: -22%;
  right: -22%;
  bottom: 0;
  height: 130%;
  background-image:
    linear-gradient(rgba(46, 230, 224, 0.30) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 230, 224, 0.30) 1px, transparent 1px);
  background-size: 84px 84px;
  transform-origin: 50% 100%;
  transform: perspective(1100px) rotateX(62deg);
}
.stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(46, 230, 224, 0.6), transparent);
  opacity: 0.6;
}

/* keep the copy readable over the floor */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    #06070a 0%,
    rgba(6, 7, 10, 0.92) 26%,
    rgba(6, 7, 10, 0.55) 62%,
    transparent 100%
  );
}

.hero__body { perspective: 1400px; transform-style: preserve-3d; }
.hero__name {
  transform: rotateY(calc(var(--px, 0) * 2.4deg)) rotateX(calc(var(--py, 0) * -1.6deg))
    translateZ(0);
  transform-origin: 50% 60%;
  transition: transform 0.7s var(--out);
  will-change: transform;
}
.hero__meta {
  transform: translate3d(calc(var(--px, 0) * -6px), calc(var(--py, 0) * -4px), 0);
  transition: transform 0.8s var(--out);
}
.hero__foot {
  transform: translate3d(calc(var(--px, 0) * 5px), calc(var(--py, 0) * 3px), 0);
  transition: transform 0.9s var(--out);
}

/* tilt cards ------------------------------------------------------------- */
[data-tilt] {
  --tx: 0deg;
  --ty: 0deg;
  transform: perspective(1300px) rotateX(var(--tx)) rotateY(var(--ty));
  transform-origin: 50% 50%;
  transition: transform 0.6s var(--out), background 0.3s var(--ease);
}
[data-tilt]:hover { transition: transform 0.12s linear, background 0.3s var(--ease); }

.row::before,
.step::after,
.book__card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 50%),
    rgba(46, 230, 224, 0.09),
    rgba(46, 230, 224, 0.02) 42%,
    transparent 68%
  );
}
.row:hover::before,
.step:hover::after,
.book__card:hover::after { opacity: 1; }

/* ticker sits on a plane -------------------------------------------------- */
.ticker { perspective: 700px; }
.ticker__track {
  transform-origin: 50% 100%;
  animation-name: slide3d;
}
@keyframes slide3d {
  from { transform: rotateX(-11deg) translateX(0); }
  to { transform: rotateX(-11deg) translateX(-50%); }
}

/* deeper reveal ----------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 30px, 0) scale(0.985);
  transition: opacity 0.8s var(--out), transform 0.9s var(--out);
}
.js .reveal.in { opacity: 1; transform: none; }

/* cards that tilt keep their own transform; they fade in rather than slide */
.js .reveal[data-tilt],
.js .reveal[data-tilt].in {
  transform: perspective(1300px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
}

@media (prefers-reduced-motion: reduce) {
  .hero__name, .hero__meta, .hero__foot, .avatar, [data-tilt] { transform: none !important; }
  .ticker__track { animation: none; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .avatar__ring, .ticker__track { animation: none; }
  .step::before { transition: none; }
}

/* mobile ---------------------------------------------------------------- */
@media (hover: none), (pointer: coarse) {
  [data-tilt] { transform: none !important; }
  .glow { display: none; }
  .hero__name, .hero__meta, .hero__foot, .avatar { transform: none !important; }
  .row::before, .step::after, .book__card::after { display: none; }
}
@media (max-width: 1023px) {
  .method__grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .about__grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .contact__grid { grid-template-columns: 1fr; }
  .sec-head { grid-template-columns: auto minmax(0, 1fr); }
  .sec-note { grid-column: 1 / -1; justify-self: start; text-align: left; margin-top: 0.2rem; }
}

@media (max-width: 900px) {
  .proof__list { grid-template-columns: repeat(2, 1fr); }
  .row {
    grid-template-columns: 2.4rem minmax(0, 1fr);
    row-gap: 0.6rem;
  }
  .row__main,
  .row__desc,
  .row__date { grid-column: 2; }
  .row__date { text-align: left; padding-top: 0; }
  .row__title { line-height: 1.02; }
  .row__role { margin-top: 0.45rem; }
  .book { grid-template-columns: 1fr; gap: 1.6rem; }
  .book__title { min-height: 0; }
}
@media (max-width: 760px) {
  .stage { display: none; }
  .hero::after { display: none; }
  .ticker__track { animation-name: slide; }
  .top { padding-block: 0.9rem; }
  .top__nav { display: none; }
  .top.is-stuck { background: #06070a; }
  .hero { min-height: auto; padding-top: 5rem; gap: 1.5rem; }
  .hero__body { grid-template-columns: 1fr; align-items: start; gap: 1.2rem; }
  .hero__id { flex-direction: row; align-items: center; gap: 0.9rem; padding: 0; }
  .avatar { width: 96px; }
  .hero__name .line--2 { margin-left: 0; }
  .hero__foot { flex-direction: column; align-items: flex-start; }
  .hero__cta { width: 100%; }
  .btn { flex: 1; }
  .work, .method, .playbook, .about, .contact { padding-block: 3.2rem; }
  .proof { padding-bottom: 3rem; }
}

@media (max-width: 420px) {
  .proof__list { grid-template-columns: 1fr; }
}

/* print ----------------------------------------------------------------- */
@media print {
  .grain, .top, .ticker, .hero__cta, .avatar__ring, .rail { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
