/* ============================================================
   SHASHANK MADALA
   quiet blue-black, cream serif, hairline borders, grain
   ============================================================ */

:root {
  --bg: #0a0d12;
  --panel: #0e1219;
  --panel-2: #111623;
  --ink: #ece9e2;
  --body: #a7afbd;
  --dim: #8791a1;
  --faint: #737e99;
  --line: rgba(226, 232, 244, 0.07);
  --line-2: rgba(226, 232, 244, 0.13);
  --blue: #5c9dff;
  --blue-2: #8fbcff;
  --indigo: #6d7ff2;
  --sky: #4cc3ff;
  --cyan: #38e1e8;
  --grad: linear-gradient(100deg, #6d7ff2, #5c9dff 45%, #4cc3ff 80%, #38e1e8);
  --btn: #2e63d8;
  --btn-hover: #3a71e8;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(92, 157, 255, 0.25); color: var(--ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--mono); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 500;
  background: var(--btn); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip:focus { left: 12px; top: 12px; }

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

/* ============ preloader ============ */
.loader {
  position: fixed; inset: 0; z-index: 400;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-inner { display: flex; align-items: center; }
.loader-name { font-size: 14px; letter-spacing: 0.14em; color: var(--dim); text-transform: lowercase; }
.loader-caret {
  width: 8px; height: 17px; margin-left: 3px; background: var(--blue);
  animation: blink 0.75s steps(1) infinite;
}

/* ============ scroll progress ============ */
.progress {
  position: fixed; top: 0; left: 0; z-index: 250;
  height: 1px; width: 100%;
  background: var(--blue);
  transform-origin: 0 50%;
  transform: scaleX(0);
  opacity: 0.7;
}

/* ============ nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  transition: transform 0.5s var(--ease), background 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 13, 18, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.nav.hidden { transform: translateY(-100%); }
.nav.hidden:focus-within { transform: none; }
.nav-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 20px 28px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.nav-links { justify-self: center; }
.nav-cta { justify-self: end; }
.nav-name {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 16px; font-weight: 600;
  letter-spacing: -0.01em;
}
.nav-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue);
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: 14px; color: var(--dim);
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  color: var(--ink) !important;
  border: 1px solid var(--line-2);
  padding: 8px 18px; border-radius: 10px;
  transition: border-color 0.25s, background 0.25s;
}
.nav-cta:hover { border-color: var(--blue); }

/* ============ shared ============ */
.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px; letter-spacing: 0.22em;
  color: var(--blue);
  display: flex; align-items: center; gap: 10px;
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue); display: inline-block; flex: none;
}
.pulse-sm { width: 6px; height: 6px; }

.sec-head { margin-bottom: 64px; }
.sec-title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  line-height: 1.06; letter-spacing: -0.025em;
  margin-top: 16px;
}

.chip {
  display: inline-block;
  font-size: 11px; letter-spacing: 0.18em;
  color: var(--dim);
}
.chip-blue { color: var(--blue); }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 500;
  padding: 13px 22px; border-radius: 10px;
  transition: background 0.25s, border-color 0.25s, transform 0.3s var(--ease);
  will-change: transform;
}
.btn-primary {
  background: linear-gradient(120deg, #3255e0, #2e6ee6 55%, #2f9bea);
  background-size: 150% 100%;
  color: #f5f8ff;
  transition: background-position 0.5s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s;
  box-shadow: 0 6px 26px rgba(46, 110, 230, 0.32);
}
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 10px 34px rgba(47, 155, 234, 0.4); }
.btn-ghost {
  border: 1px solid var(--line-2); color: var(--ink);
}
.btn-ghost:hover { border-color: var(--blue); }

.link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 500; color: var(--blue);
  transition: color 0.25s, gap 0.25s;
}
.link:hover { color: var(--blue-2); gap: 11px; }

/* ============ cursor spotlight on cards ============ */
.spot { position: relative; }
.spot::after {
  content: ""; position: absolute; inset: -1px;
  border-radius: inherit;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(92, 157, 255, 0.09), transparent 65%);
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
}
.spot:hover::after { opacity: 1; }

/* ============ reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.on { opacity: 1; transform: none; }
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }

/* ============ hero ============ */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 190px 0 80px;
  overflow: clip;
}
.hero-glow {
  position: absolute; inset: auto 0 0 0; height: 66%;
  background:
    linear-gradient(to top, rgba(46, 99, 216, 0.24), transparent 72%),
    radial-gradient(60% 50% at 28% 100%, rgba(109, 127, 242, 0.16), transparent 65%),
    radial-gradient(55% 45% at 74% 98%, rgba(56, 225, 232, 0.1), transparent 65%);
  pointer-events: none;
}
.hero-cursor {
  position: absolute; top: 0; left: 0; z-index: 1;
  width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(circle, rgba(76, 195, 255, 0.07), rgba(92, 157, 255, 0.05) 40%, transparent 65%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
  will-change: transform;
}
.hero.mouse-in .hero-cursor { opacity: 1; }

.hero-inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.hero-eyebrow { margin-bottom: 36px; }
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.2em;
  color: var(--dim);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 9px 18px;
}
.eyebrow-pill .pulse { background: var(--blue); }

.hero-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.9rem, 7.6vw, 6.2rem);
  line-height: 1.04; letter-spacing: -0.032em;
  min-height: 1.1em;
}
.caret {
  display: inline-block;
  width: 0.08em; height: 0.8em;
  margin-left: 0.06em;
  background: var(--blue);
  vertical-align: baseline;
  transform: translateY(0.08em);
  animation: blink 0.8s steps(1) infinite;
}
.caret-sm { height: 1em; width: 7px; }
.hero.typed .caret:not(.caret-sm) { display: none; }
@keyframes blink { 50% { opacity: 0; } }

.hero-role {
  margin-top: 28px;
  font-size: clamp(0.92rem, 1.5vw, 1.05rem);
  letter-spacing: 0.04em;
  min-height: 1.6em;
}
.hero-role #typeRole {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  margin-top: 26px;
  max-width: 640px;
  margin-left: auto; margin-right: auto;
  font-size: clamp(1rem, 1.4vw, 1.13rem);
  color: var(--body);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.hero-actions {
  margin-top: 38px;
  display: flex; gap: 12px; flex-wrap: wrap;
  justify-content: center;
}
#heroActions { opacity: 0; transform: translateY(12px); transition: opacity 0.9s var(--ease) 0.12s, transform 0.9s var(--ease) 0.12s; }
.hero.typed .hero-sub, .hero.typed #heroActions { opacity: 1; transform: none; }

/* terminal */
.term-wrap {
  position: relative; z-index: 2;
  margin-top: 96px;
  perspective: 1400px;
}
.term {
  max-width: 860px;
  margin: 0 auto;
  background: rgba(13, 17, 25, 0.88);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(4, 7, 14, 0.55);
  will-change: transform;
}

/* floating chips */
.float-chip {
  position: absolute; z-index: 3;
  display: flex; flex-direction: column; gap: 3px;
  font-size: 11px; letter-spacing: 0.06em;
  color: var(--dim);
  background: rgba(14, 18, 25, 0.9);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 13px 16px;
  box-shadow: 0 16px 40px rgba(4, 7, 14, 0.45);
  animation: floaty 7s ease-in-out infinite alternate;
}
.float-chip b { font-weight: 500; letter-spacing: 0.18em; font-size: 10px; color: var(--blue); }
.float-a b { color: var(--sky); }
.float-b b { color: var(--blue); }
.float-c b { color: var(--indigo); }
.float-a { top: -26px; left: 1%; animation-delay: 0s; }
.float-b { top: 34%; right: 0.5%; animation-delay: -2.6s; }
.float-c { bottom: -18px; left: 6%; animation-delay: -4.8s; }
@keyframes floaty {
  from { transform: translate(var(--px, 0px), calc(var(--py, 0px) - 7px)); }
  to { transform: translate(var(--px, 0px), calc(var(--py, 0px) + 9px)); }
}
@media (max-width: 1180px) { .float-chip { display: none; } }
.term-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}
.term-dots { display: flex; gap: 7px; }
.term-dots i {
  width: 10px; height: 10px; border-radius: 50%;
  background: #262d3b;
}
.term-title { font-size: 12px; color: var(--faint); letter-spacing: 0.06em; }
.term-status {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  font-size: 10.5px; letter-spacing: 0.2em; color: var(--blue);
}
.term-body {
  padding: 26px 26px 32px;
  font-size: 13.5px;
  line-height: 1.85;
  min-height: 330px;
  color: var(--dim);
  white-space: pre-wrap;
}
.term-body .t-prompt { color: var(--blue); }
.term-body .t-cmd { color: var(--ink); }
.term-body .t-out { color: var(--dim); }
.term-body .t-hl { color: var(--blue-2); }
.term-body .t-ok { color: #6fd39a; }
.term-caret {
  display: inline-block; width: 8px; height: 15px;
  background: var(--blue); vertical-align: -2px;
  animation: blink 0.8s steps(1) infinite;
}

.hero-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: 3; pointer-events: none;
}

/* ============ marquee ============ */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 17px 0;
  overflow: hidden;
}
.marquee-track {
  display: flex; align-items: center;
  width: max-content;
  font-family: var(--mono);
  font-size: 11.5px; letter-spacing: 0.22em;
  color: var(--faint);
  animation: marquee 40s linear infinite;
}
.marquee-track > * { margin-right: 36px; }
.marquee-track span { white-space: nowrap; }
.marquee-track i { color: var(--sky); font-style: normal; opacity: 0.65; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ============ statement ============ */
.statement { height: 190vh; position: relative; }
.statement-sticky {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; align-items: center;
}
.statement-text {
  margin-top: 32px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.4vw, 3.6rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  max-width: 980px;
}
.statement-text .w {
  color: rgba(236, 233, 226, 0.14);
  transition: color 0.3s ease;
}
.statement-text .w.lit { color: var(--ink); }
.statement-text .w.lit.key {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============ now ============ */
.now {
  padding: 150px 0;
  background: radial-gradient(55% 45% at 88% 0%, rgba(109, 127, 242, 0.06), transparent 60%);
}
.now-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.now-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 28px;
  transition: border-color 0.3s, opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.now-item:hover { border-color: var(--line-2); }
.now-item p { margin-top: 16px; font-size: 14.5px; color: var(--body); }
.now-item strong { color: var(--ink); font-weight: 600; }

/* ============ stats ============ */
.stats { padding: 20px 0 150px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.stat {
  border-top: 1px solid var(--line-2);
  padding-top: 22px;
}
.stat .num {
  font-family: var(--display);
  font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(2.3rem, 4.2vw, 3.5rem);
  line-height: 1;
  display: flex; align-items: baseline;
}
.stat .num > span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat .num em {
  font-style: normal; color: var(--sky);
  font-size: 0.55em; margin-left: 2px;
}
.stat p { margin-top: 10px; font-size: 13.5px; color: var(--dim); max-width: 220px; }

/* ============ work / sticky stack ============ */
.work {
  padding: 150px 0 40px;
  background: radial-gradient(50% 30% at 10% 5%, rgba(76, 195, 255, 0.05), transparent 60%);
}
.stack { padding-bottom: 110px; }
.stack-card {
  position: sticky;
  top: 100px;
  margin-bottom: 40px;
  will-change: transform, filter;
}
.stack-in {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-2);
  border-radius: 20px;
  padding: clamp(30px, 4.5vw, 54px);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  min-height: 360px;
  box-shadow: 0 -14px 50px rgba(4, 7, 14, 0.5);
}
.stack-meta { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.stack-num {
  font-size: 14px; color: var(--faint); letter-spacing: 0.2em;
}
.stack-title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  line-height: 1.06; letter-spacing: -0.025em;
  margin-bottom: 16px;
}
.stack-desc { color: var(--body); font-size: 15.5px; max-width: 640px; }
.tags {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 9px;
  margin: 22px 0;
}
.tags li {
  font-family: var(--mono);
  font-size: 11.5px; letter-spacing: 0.03em;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px;
}

/* ============ honors / receipt ============ */
.honors {
  padding: 150px 0;
  background: radial-gradient(55% 45% at 50% 15%, rgba(92, 157, 255, 0.055), transparent 65%);
}
.receipt {
  max-width: 600px; margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 38px 36px 30px;
  box-shadow: 0 24px 70px rgba(4, 7, 14, 0.5);
}
.receipt-head {
  display: flex; justify-content: space-between;
  font-size: 11.5px; letter-spacing: 0.2em; color: var(--blue);
}
.receipt-rule {
  border-top: 1px dashed var(--line-2);
  margin: 20px 0;
}
.receipt-list { list-style: none; }
.r-row {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 13px;
  padding: 7px 0;
  color: var(--ink);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.r-row.on { opacity: 1; transform: none; }
.r-row span { flex: none; max-width: 78%; }
.r-row::after {
  content: ""; flex: 1; order: 1;
  border-bottom: 1px dotted var(--faint);
  opacity: 0.4;
  transform: translateY(-4px);
}
.r-row b {
  order: 2; flex: none;
  font-weight: 500; font-size: 10.5px; letter-spacing: 0.14em;
  color: var(--blue);
}
.receipt-total { font-size: 12.5px; letter-spacing: 0.06em; color: var(--dim); }
.receipt-total b { color: var(--ink); }
.receipt-bar {
  margin: 24px auto 0; height: 38px; width: 190px;
  background: repeating-linear-gradient(90deg,
    var(--ink) 0 2px, transparent 2px 5px,
    var(--ink) 5px 6px, transparent 6px 11px,
    var(--ink) 11px 14px, transparent 14px 17px,
    var(--ink) 17px 18px, transparent 18px 22px);
  opacity: 0.7;
}
.receipt-foot {
  margin-top: 14px; text-align: center;
  font-size: 10px; letter-spacing: 0.24em; color: var(--faint);
}

/* ============ photos ============ */
.photos { padding: 0 0 150px; }
.photo-strip {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
}
.photo {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: 14px 14px 12px;
  box-shadow: 0 20px 60px rgba(4, 7, 14, 0.45);
  transition: transform 0.5s var(--ease), border-color 0.3s, opacity 0.9s var(--ease);
}
.photo:nth-child(1) { grid-column: 1 / -1; transform: rotate(-0.5deg); }
.photo:nth-child(2) { transform: rotate(0.8deg); }
.photo:nth-child(3) { transform: rotate(-0.9deg); }
.photo:hover { transform: rotate(0deg) translateY(-6px); border-color: rgba(92, 157, 255, 0.35); }
.photo.reveal { opacity: 0; }
.photo.reveal.on { opacity: 1; }
.photo img {
  width: 100%; border-radius: 10px;
  display: block;
}
.photo:nth-child(2) img, .photo:nth-child(3) img {
  aspect-ratio: 4 / 4.6; object-fit: cover;
}
.photo:nth-child(4) { transform: rotate(0.7deg); }
.photo:nth-child(5) { transform: rotate(-0.6deg); }
.photo:nth-child(4) img, .photo:nth-child(5) img {
  aspect-ratio: 4 / 2.95; object-fit: cover;
}
.photo figcaption {
  padding: 12px 6px 4px;
  font-size: 10.5px; letter-spacing: 0.2em;
  color: var(--faint);
  display: flex; justify-content: space-between; gap: 10px;
}
.photo figcaption b { color: var(--sky); font-weight: 500; }
@media (max-width: 700px) {
  .photo-strip { grid-template-columns: 1fr; }
}

/* ============ press ============ */
.press {
  padding: 150px 0;
  background: radial-gradient(50% 35% at 90% 10%, rgba(56, 225, 232, 0.045), transparent 60%);
}
.press-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
.press-card {
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px;
  min-height: 230px;
  transition: border-color 0.3s, transform 0.5s var(--ease), opacity 0.9s var(--ease);
}
.press-card:hover { border-color: var(--line-2); transform: translateY(-4px); }
.press-top {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 10.5px; letter-spacing: 0.18em; color: var(--blue);
  margin-bottom: 18px;
}
.press-card h3 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  line-height: 1.25; letter-spacing: -0.015em;
}
.press-peek {
  color: var(--body); font-size: 15px;
  margin-top: 14px;
  max-height: 0; opacity: 0;
  transform: translateY(6px);
  transition: max-height 0.5s var(--ease), opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.press-card:hover .press-peek, .press-card:focus-visible .press-peek {
  max-height: 96px; opacity: 1; transform: none;
}
.press-feature { grid-column: 1 / -1; min-height: 190px; }
.press-feature h3 { font-size: clamp(1.55rem, 2.8vw, 2.1rem); max-width: 700px; }
.press-cta {
  margin-top: auto; padding-top: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10.5px; letter-spacing: 0.24em; color: var(--faint);
  transition: color 0.3s, gap 0.3s;
}
.press-card:hover .press-cta { color: var(--blue); gap: 12px; }
@media (hover: none) {
  .press-peek { max-height: 96px; opacity: 1; transform: none; }
}

/* ============ beyond ============ */
.beyond { padding: 0 0 150px; }
.beyond-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.beyond-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 22px;
  transition: border-color 0.3s, opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.beyond-card:hover { border-color: var(--line-2); }
.beyond-card p { margin-top: 13px; font-size: 13.5px; color: var(--body); }

/* ============ contact ============ */
.contact {
  position: relative;
  padding: 180px 0 200px;
  text-align: center;
  overflow: clip;
}
.contact-glow {
  position: absolute; inset: auto 0 0 0; height: 70%;
  background: linear-gradient(to top, rgba(46, 99, 216, 0.18), transparent 75%);
  pointer-events: none;
}
.contact .wrap { position: relative; z-index: 2; }
.contact .eyebrow { justify-content: center; }
.contact-big {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(3rem, 8.4vw, 6.6rem);
  line-height: 1.02; letter-spacing: -0.032em;
  margin-top: 28px;
}
.contact-big em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.contact-sub { margin-top: 22px; color: var(--body); }
.contact .hero-actions { justify-content: center; margin-top: 40px; opacity: 1; transform: none; }

/* ============ footer ============ */
.foot {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}
.foot-row {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 10.5px; letter-spacing: 0.2em; color: var(--faint);
}

/* ============ responsive ============ */
@media (max-width: 960px) {
  .now-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 34px 22px; }
  .press-grid { grid-template-columns: 1fr; }
  .beyond-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-in { grid-template-columns: 1fr; gap: 18px; min-height: 0; }
  .stack-meta { flex-direction: row; align-items: center; gap: 18px; }
  .stack-card { position: static; margin-bottom: 22px; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding-top: 150px; }
  .hero-title { min-height: 2.15em; }
  .term-body { font-size: 12px; min-height: 300px; }
  .beyond-grid { grid-template-columns: 1fr; }
  .statement { height: 170vh; }
  .r-row span { max-width: 70%; }
  .foot-row { justify-content: center; text-align: center; }
}

/* ============ reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .r-row, .hero-sub, #heroActions { opacity: 1 !important; transform: none !important; }
  .statement { height: auto; padding: 150px 0; }
  .statement-sticky { position: static; height: auto; }
  .statement-text .w { color: var(--ink); }
  .stack-card { position: static; }
}



/* ============ hero tile grid ============ */
#tileCanvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  pointer-events: none;
}
@media (hover: none), (pointer: coarse) {
  #tileCanvas { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #tileCanvas { display: none; }
}



/* ============ micro-delights ============ */
#typeTitle .tl {
  display: inline-block;
  white-space: pre;
  transition: transform 0.25s ease-out;
  will-change: transform;
}
.nav-dot.md-spin {
  background: var(--grad);
  animation: md-dotspin 0.7s var(--ease);
}
@keyframes md-dotspin {
  0% { transform: rotate(0deg) scale(1); box-shadow: 0 0 0 0 rgba(56, 225, 232, 0); }
  40% { transform: rotate(150deg) scale(1.25); box-shadow: 0 0 12px 3px rgba(56, 225, 232, 0.55); }
  100% { transform: rotate(360deg) scale(1); box-shadow: 0 0 0 0 rgba(56, 225, 232, 0); }
}


/* ============ tilt glare + button ripples ============ */
/* JS owns hover motion on these cards; keep border-color changes from the earlier rules */
.press-card:hover { transform: none; }
.photo:hover { transform: none; }

.tilt-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
}
.tilt-glare-dot {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.028) 38%, transparent 66%);
  will-change: transform;
}

.btn, .nav-cta {
  position: relative;
  overflow: hidden;
}
.ripple-fx {
  position: absolute;
  border-radius: 50%;
  background: rgba(92, 157, 255, 0.2);
  transform: scale(0);
  pointer-events: none;
  animation: ripple-grow 0.6s var(--ease) forwards;
}
.ripple-bright { background: rgba(255, 255, 255, 0.25); }
@keyframes ripple-grow {
  to { transform: scale(1); opacity: 0; }
}


/* ============ terminal: live input after the demo ============ */
#term { position: relative; }
#term.term-live { cursor: text; transition: border-color 0.3s; }
#term.term-typing { border-color: rgba(92, 157, 255, 0.35); }
.term-cli-input {
  position: absolute;
  left: 10px;
  bottom: 10px;
  width: 2px;
  height: 2px;
  padding: 0;
  border: 0;
  opacity: 0;
  background: transparent;
  color: transparent;
  font-size: 16px;
  pointer-events: none;
}
.term-cli-input:focus { outline: none; }
#term.term-live .term-body {
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(226, 232, 244, 0.18) transparent;
}
#term.term-live .term-body::-webkit-scrollbar { width: 8px; }
#term.term-live .term-body::-webkit-scrollbar-thumb { background: rgba(226, 232, 244, 0.14); border-radius: 4px; }
#term.term-live .term-body::-webkit-scrollbar-track { background: transparent; }




/* ============================================================
   PHOTOS, REBUILT
   The "Some pictures." strip is dissolved. Three pictures now sit
   next to the sentences they prove: the flag under NOW, the
   classroom in the margin of work card 02, and Shenzhen as the
   sign-off. Appended last, so equal-specificity ties go to these.
   ============================================================ */

/* --- the actual cause of the cropping --------------------------------
   .photo img set a width but never a height, so the HTML height
   attribute survived as a literal pixel height. With both axes
   definite, aspect-ratio was ignored and object-fit: cover carved each
   photo down to that height. height: auto is the repair. */
.photo img { height: auto; max-width: 100%; object-fit: contain; }

/* --- neutralize the dead strip rules ---------------------------------
   .photo:nth-child(1..5) above is not scoped to .photo-strip, so any new
   .photo landing on sibling index 1-5 anywhere on the page would still
   inherit those crops. Reset them at equal specificity; each figure
   re-declares what it actually wants further down. */
.photos, .photo-strip { display: none; }
.photo:nth-child(1), .photo:nth-child(2), .photo:nth-child(3),
.photo:nth-child(4), .photo:nth-child(5) { grid-column: auto; }
.photo:nth-child(1) img, .photo:nth-child(2) img, .photo:nth-child(3) img,
.photo:nth-child(4) img, .photo:nth-child(5) img {
  aspect-ratio: auto;
  object-fit: contain;
}

/* --- shared frame ----------------------------------------------------- */
.photo { position: relative; }   /* containing block for .tilt-glare */
.photo.pic { margin: 0; }
.photo.pic img { width: 100%; height: auto; display: block; border-radius: 10px; }
.photo.pic figcaption {
  padding: 12px 6px 2px;
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px; flex-wrap: wrap;
  font-size: 10.5px; letter-spacing: 0.2em; color: var(--faint);
}
.photo.pic figcaption b { color: var(--sky); font-weight: 500; }

/* --- 1. the band: closes NOW, right above the 6th-of-52 counter -------- */
.photo.pic-band {
  margin-top: 20px;              /* same gap the .now-grid uses */
  padding: 14px 14px 10px;
  transform: rotate(-0.35deg);
}
.photo.pic-band img {
  aspect-ratio: 1400 / 350;      /* the file's real 4:1, nothing cropped */
  object-fit: contain;
  filter: saturate(0.85);        /* the IEO backdrop is hot pink; this seats it */
}

/* --- 2. the classroom: margin column of work card 02 ------------------- */
.stack-in.has-pic { grid-template-columns: clamp(200px, 21vw, 250px) minmax(0, 1fr); }
.photo.pic-margin {
  width: 100%; margin-top: 6px;
  padding: 10px 10px 8px;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(4, 7, 14, 0.4);
  transform: rotate(-0.8deg);
}
.photo.pic-margin img {
  aspect-ratio: 1179 / 871;      /* the file's real ratio */
  object-fit: contain;
  border-radius: 8px;
}
.photo.pic-margin figcaption {
  flex-direction: column; gap: 4px;
  padding: 10px 4px 0;
  font-size: 9.5px; letter-spacing: 0.16em;
}

/* --- 3. the sign-off: last thing before the footer --------------------- */
.photo.pic-sign {
  width: 300px; max-width: 100%;
  margin: 76px auto 0;
  transform: rotate(0.7deg);
}
.photo.pic-sign img {
  aspect-ratio: 1050 / 1400;     /* EXIF orientation 6: this file is portrait */
  object-fit: contain;
}
.photo.pic-sign figcaption {
  flex-direction: column; align-items: center;
  gap: 5px; text-align: center;
  padding: 12px 4px 2px;
}

/* --- responsive -------------------------------------------------------- */
@media (max-width: 960px) {
  /* the stack collapses to one column here, so the margin photo has to
     leave the meta row instead of sitting beside the number and chip */
  .stack-in.has-pic { grid-template-columns: 1fr; }
  .stack-in.has-pic .stack-meta { flex-wrap: wrap; }
  .photo.pic-margin { flex: 0 0 100%; max-width: 320px; margin-top: 4px; }
}
@media (max-width: 700px) {
  /* a 4:1 band is 75px tall on a phone and the five of them vanish.
     2.2:1 with cover is height-driven, so it only trims illustrated
     skyline off the sides: no face, no flag, no headline is cut. */
  .photo.pic-band { padding: 10px 10px 8px; }
  .photo.pic-band img {
    aspect-ratio: 2.2 / 1;
    object-fit: cover;
    object-position: 48% 50%;
  }
  .photo.pic figcaption { font-size: 9.5px; letter-spacing: 0.14em; }
  .photo.pic-sign { width: 260px; margin-top: 56px; }
}
