/* ==========================================================================
   Homepage sections. Shared tokens, chrome and components live in style.css.
   Every section reads fine without JavaScript; home.js layers motion on top.
   ========================================================================== */

/* Intro: pure CSS, started by the "intro" class the inline head script adds (unless motion is
   reduced). It never waits on a script download, and without JS everything is simply visible. */
@keyframes rise {
  from { transform: translateY(118%); }
  to { transform: none; }
}

@keyframes rise-tilt {
  from { transform: translateY(118%) rotate(6deg); }
  to { transform: none; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.intro .hero-line--first .char {
  animation: rise 1.4s var(--ease-out) both;
  animation-delay: calc(0.12s + var(--i) * 0.05s);
}

.intro .hero-line--last .char {
  animation: rise-tilt 1.4s var(--ease-out) both;
  animation-delay: calc(0.28s + var(--i) * 0.035s);
}

.intro .hero-eyebrow > *,
.intro [data-intro],
.intro .hero-meas li {
  animation: fade-up 1.1s var(--ease-out) both;
  animation-delay: 0.45s;
}

/* The paragraph is the largest text block, so it is visible from the first paint (fast LCP). */
.intro .hero-cta { animation-delay: 0.5s; }
.intro .hero-status { animation-delay: 0.6s; }
.intro .hero-meas li:nth-child(1) { animation-delay: 0.65s; }
.intro .hero-meas li:nth-child(2) { animation-delay: 0.72s; }
.intro .hero-meas li:nth-child(3) { animation-delay: 0.79s; }
.intro .scroll-cue [data-intro] { animation-delay: 1s; }

.status-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--chm);
  box-shadow: 0 0 0 0 rgb(124 240 168 / 0.6);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgb(124 240 168 / 0.55); }
  70%, 100% { box-shadow: 0 0 0 10px rgb(124 240 168 / 0); }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  overflow-x: clip; /* the paragraph scrim and wide letters must not widen the page */
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  min-height: 100%;
  padding-top: calc(var(--header-h) + clamp(18px, 4vh, 48px));
  padding-bottom: clamp(70px, 9vh, 110px);
  gap: 0 32px;
}

.hero-eyebrow {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.hero-eyebrow-sep {
  color: var(--ink-3);
}

.hero-title {
  grid-column: 1 / -1;
  align-self: center;
  margin: clamp(20px, 5vh, 56px) 0;
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.05em;
  /* letters sit above the back trace but below the front trace */
}

.hero-line {
  display: block;
}

.hero-line--first {
  --wdth: 125;
  /* "GAURAV" at wdth 125 is ~5.25em wide: 16.2vw keeps it on one line down to 320px screens. */
  font-size: clamp(3rem, 16.2vw, 18.5rem);
  font-variation-settings: "wdth" var(--wdth);
  text-transform: uppercase;
  letter-spacing: -0.055em;
  margin-left: -0.05em;
}

.hero-line--last {
  font-size: clamp(3.6rem, 13.2vw, 14rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin-top: -0.04em;
  padding-left: clamp(0px, 9vw, 180px);
  color: var(--ink);
}

.hero-line .char {
  will-change: transform;
}

.hero-foot {
  position: relative;
  z-index: 0;
  grid-column: 1;
  align-self: end;
  max-width: 600px;
}

/* A soft scrim so the signal never fights the paragraph for contrast */
.hero-foot::before {
  content: "";
  position: absolute;
  inset: -60px -90px -50px -120px;
  z-index: -1;
  background: radial-gradient(ellipse 60% 58% at 45% 52%, rgba(7, 8, 10, 0.86), rgba(7, 8, 10, 0.55) 55%, transparent 80%);
  pointer-events: none;
}

.hero-lede {
  font-size: clamp(1.02rem, 1.25vw, 1.18rem);
  line-height: 1.6;
  color: var(--ink-2);
  text-shadow: 0 0 18px var(--bg), 0 0 3px var(--bg);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 26px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

.hero-meas {
  grid-column: 2;
  grid-row: 3;
  align-self: end;
  display: grid;
  gap: 14px;
  min-width: 220px;
  font-family: var(--font-mono);
}

.hero-meas li {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
}

.meas-k {
  grid-column: 1 / -1;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.meas-v {
  font-family: var(--font-sans);
  font-size: 1.7rem;
  font-weight: 600;
  font-variation-settings: "wdth" 80;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ch1);
}

.meas-l {
  align-self: center;
  font-size: 0.74rem;
  color: var(--ink-2);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  min-height: 44px;
}

.scroll-cue-track {
  position: relative;
  width: 1px;
  height: 42px;
  background: var(--line-2);
  overflow: hidden;
}

.scroll-cue-track span {
  position: absolute;
  left: -1px;
  top: 0;
  width: 3px;
  height: 12px;
  border-radius: 3px;
  background: var(--ch1);
  box-shadow: 0 0 8px var(--ch1);
  animation: cue 2s var(--ease-in-out) infinite;
}

@keyframes cue {
  0% { transform: translateY(-14px); }
  100% { transform: translateY(46px); }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto auto;
    padding-bottom: 40px;
  }

  .hero-title {
    align-self: start;
    margin-top: 18vh;
  }

  .hero-line--last {
    padding-left: 0.4em;
  }

  .hero-meas {
    grid-column: 1;
    grid-row: 4;
    grid-template-columns: repeat(3, 1fr);
    min-width: 0;
    margin-top: 36px;
    gap: 10px;
  }

  .hero-meas li {
    grid-template-columns: 1fr;
  }

  .meas-v {
    font-size: 1.35rem;
  }

  .meas-l {
    font-size: 0.66rem;
  }

  .scroll-cue {
    display: none;
  }
}

@media (max-width: 520px) {
  .hero-cta .btn {
    flex: 1 1 auto;
  }
}

/* ==========================================================================
   About
   ========================================================================== */

.about {
  --ch: var(--ch1);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 64px) clamp(16px, 2vw, 32px);
  margin-top: clamp(32px, 5vw, 64px);
}

.statement {
  grid-column: 1 / span 11;
  font-size: clamp(1.75rem, 3.7vw, 3.6rem);
  font-weight: 500;
  font-variation-settings: "wdth" 92;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.statement em {
  font-size: 1.08em;
  color: var(--ch1);
}

.statement .word {
  display: inline-block;
}

.portrait {
  grid-column: 9 / span 4;
  grid-row: 2 / span 2;
  align-self: start;
}

.portrait-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-3);
  aspect-ratio: 540 / 587;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08) brightness(0.92);
  transition: filter 0.8s ease;
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgb(255 181 71 / 0.38), rgb(7 8 10 / 0.1) 55%, rgb(92 225 255 / 0.18));
  mix-blend-mode: color;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.portrait:hover .portrait-frame img {
  filter: none;
}

.portrait:hover .portrait-frame::after {
  opacity: 0;
}

.portrait-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 22%;
  background: linear-gradient(to bottom, transparent, rgb(255 181 71 / 0.16), transparent);
  animation: scan 5s linear infinite;
  pointer-events: none;
}

@keyframes scan {
  from { transform: translateY(-100%); }
  to { transform: translateY(560%); }
}

.portrait-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 0 solid var(--ch1);
  z-index: 1;
}

.portrait-corner.tl { left: 10px; top: 10px; border-left-width: 1.5px; border-top-width: 1.5px; }
.portrait-corner.tr { right: 10px; top: 10px; border-right-width: 1.5px; border-top-width: 1.5px; }
.portrait-corner.bl { left: 10px; bottom: 10px; border-left-width: 1.5px; border-bottom-width: 1.5px; }
.portrait-corner.br { right: 10px; bottom: 10px; border-right-width: 1.5px; border-bottom-width: 1.5px; }

.portrait figcaption {
  margin-top: 12px;
}

.about-body {
  grid-column: 1 / span 6;
  grid-row: 2;
  display: grid;
  gap: 18px;
  font-size: 1.08rem;
  color: var(--ink-2);
}

.facts {
  grid-column: 1 / span 7;
  grid-row: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.facts > div {
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.facts dd {
  margin-top: 6px;
  font-weight: 500;
}

@media (max-width: 900px) {
  .statement,
  .about-body,
  .facts {
    grid-column: 1 / -1;
  }

  .portrait {
    grid-column: 1 / span 9;
    grid-row: auto;
    max-width: 420px;
  }

  .about-body,
  .facts {
    grid-row: auto;
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================================================
   Experience: a horizontal timeline riding the YT waveform
   ========================================================================== */

.xp {
  --ch: var(--ch2);
  position: relative;
  padding-block: clamp(96px, 12vw, 160px) clamp(60px, 8vw, 120px);
}

.xp-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
}

.xp-head-main {
  display: grid;
  gap: 20px;
}

.xp-display {
  max-width: 14ch;
}

.xp-viewport {
  margin-top: clamp(40px, 6vw, 80px);
}

.xp-track {
  position: relative;
  display: flex;
  padding-inline: var(--gutter);
}

.xp-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 4%, var(--line-2) 96%, transparent);
}

.xp-item {
  position: relative;
  flex: none;
  width: clamp(300px, 30vw, 440px);
  padding: 34px clamp(24px, 3vw, 48px) 8px 0;
  scroll-snap-align: start;
}

.xp-marker {
  position: absolute;
  left: 0;
  top: -6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--c);
  background: var(--bg);
  box-shadow: 0 0 0 4px var(--bg), 0 0 18px var(--c);
  transition: background-color 0.4s ease, transform 0.5s var(--ease-out);
}

.xp-item.is-active .xp-marker {
  background: var(--c);
  transform: scale(1.25);
}

.xp-when {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c);
}

.xp-now {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--c);
  color: #111;
}

.xp-org {
  margin-top: 14px;
  font-size: clamp(1.7rem, 2.6vw, 2.5rem);
  font-weight: 600;
  font-variation-settings: "wdth" 85;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.xp-org-sub {
  font-weight: 400;
  color: var(--ink-3);
  font-size: 0.6em;
  letter-spacing: -0.01em;
}

.xp-role {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.xp-role .serif {
  font-size: 1.3em;
  color: var(--ink);
}

.xp-points {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.xp-points li {
  position: relative;
  padding-left: 18px;
}

.xp-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 1px;
  background: var(--c);
}

.xp-tech {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.xp-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: clamp(28px, 4vw, 48px);
}

.xp-axis {
  display: flex;
  gap: clamp(16px, 4vw, 64px);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

/* Desktop without pinning (no JS, reduced motion): native horizontal scroll */
@media (min-width: 901px) {
  .xp-viewport {
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: var(--line-2) transparent;
    padding-top: 8px;
  }

  .xp.is-pinned .xp-viewport {
    overflow: visible;
    scroll-snap-type: none;
  }

  .xp.is-pinned .xp-pin {
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: var(--header-h);
  }

  .xp.is-pinned {
    padding-block: 0;
  }

  .xp.is-pinned .xp-track {
    will-change: transform;
  }
}

/* Mobile: a vertical timeline */
@media (max-width: 900px) {
  .xp-track {
    flex-direction: column;
    padding-inline: var(--gutter);
  }

  .xp-track::before {
    left: calc(var(--gutter) + 5px);
    right: auto;
    top: 6px;
    bottom: 0;
    width: 1px;
    height: auto;
    background: linear-gradient(to bottom, var(--line-2), var(--line-2) 92%, transparent);
  }

  .xp-item {
    width: auto;
    padding: 0 0 44px 34px;
  }

  .xp-marker {
    top: 4px;
  }

  .xp-axis {
    display: none;
  }
}

/* ==========================================================================
   Stack: an exploded view, silicon at the bottom, interface at the top
   ========================================================================== */

.stack {
  --ch: var(--ch3);
}

.stack-head {
  display: grid;
  gap: 22px;
  max-width: 900px;
}

.stack-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 96px);
  margin-top: clamp(40px, 6vw, 80px);
}

.stack-visual {
  position: sticky;
  top: 12vh;
  height: 76vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
}

.stack-scene {
  width: min(40vw, 560px);
  aspect-ratio: 1;
  perspective: 1500px;
  display: grid;
  place-items: center;
}

.stack-3d {
  --gap: 34px;
  --rx: 58deg;
  --rz: -38deg;
  position: relative;
  width: 58%;
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateZ(var(--rz)) translateZ(calc(var(--gap) * -2.5));
}

.plane {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 7%;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--c) 12%, transparent), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 19px, rgba(238, 235, 227, 0.05) 19px 20px),
    repeating-linear-gradient(90deg, transparent 0 19px, rgba(238, 235, 227, 0.05) 19px 20px),
    rgba(11, 13, 16, 0.72);
  transform: translateZ(calc(var(--i) * var(--gap)));
  opacity: 0.55;
  transition: opacity 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.plane.is-active {
  opacity: 1;
  border-color: var(--c);
  box-shadow: 0 0 60px -12px var(--c), inset 0 0 40px -18px var(--c);
}

.plane-label {
  font-family: var(--font-mono);
  font-size: clamp(0.55rem, 0.8vw, 0.72rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c);
}

.plane-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8%;
  align-content: center;
  padding: 6% 0;
}

.plane-chips i {
  display: grid;
  place-items: center;
  aspect-ratio: 2.2;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  background: rgba(7, 8, 10, 0.6);
  font-family: var(--font-mono);
  font-style: normal;
  font-size: clamp(0.45rem, 0.66vw, 0.62rem);
  color: var(--ink-2);
  white-space: nowrap;
}

.stack-readout {
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stack-layers {
  display: grid;
}

.layer {
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 0 24px clamp(18px, 2.4vw, 36px);
  border-left: 1px solid var(--line);
  transition: border-color 0.5s ease;
}

.layer.is-active {
  border-left-color: var(--c);
}

.layer-idx {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--c);
}

.layer-name {
  margin-top: 8px;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  font-weight: 600;
  font-variation-settings: "wdth" 85;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.layer-desc {
  margin-top: 14px;
  max-width: 46ch;
  color: var(--ink-2);
}

.layer-tags {
  margin-top: 16px;
  max-width: 52ch;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.9;
  color: var(--ink);
}

.stack-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: clamp(40px, 5vw, 72px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.stack-langs .kicker-meta {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .stack-grid {
    grid-template-columns: 1fr;
  }

  .stack-visual {
    position: relative;
    top: 0;
    height: auto;
    padding-block: 12px;
  }

  .stack-scene {
    width: min(86vw, 420px);
  }

  .stack-3d {
    --gap: 26px;
  }

  .layer {
    min-height: 0;
    padding-block: 28px;
  }
}

/* ==========================================================================
   Work
   ========================================================================== */

.work {
  --ch: var(--ch4);
  position: relative;
  padding-top: clamp(96px, 12vw, 180px);
}

.work-intro {
  overflow: hidden;
}

.work-marquee {
  margin: clamp(20px, 3vw, 40px) 0 clamp(12px, 2vw, 24px);
  display: flex;
  gap: 0.35em;
  white-space: nowrap;
  font-size: clamp(4.4rem, 15vw, 15rem);
  font-weight: 700;
  font-variation-settings: "wdth" 75;
  letter-spacing: -0.05em;
  line-height: 0.95;
  color: transparent;
  -webkit-text-stroke: 1px rgba(238, 235, 227, 0.28);
  will-change: transform;
}

.work-marquee .serif {
  -webkit-text-stroke: 0;
  color: rgb(var(--glow-rgb, 164 147 255) / 0.75);
  font-variation-settings: normal;
  letter-spacing: -0.02em;
}

.work-lede {
  max-width: 52ch;
}

.project {
  position: relative;
  padding-block: clamp(90px, 13vw, 200px);
}

.project + .project::before {
  content: "";
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: center;
}

.project-grid--flip {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.project-grid--flip .project-copy {
  order: 2;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.project-meta span:first-child {
  color: var(--c);
}

.project-meta span + span::before {
  content: "/";
  margin-right: 14px;
  color: var(--line-2);
}

.project-title {
  margin-top: 14px;
  font-size: clamp(3.4rem, 9.5vw, 9.6rem);
  font-weight: 700;
  font-variation-settings: "wdth" 78;
  letter-spacing: -0.055em;
  line-height: 0.88;
  padding-bottom: 0.04em;
}

.project-title .char {
  display: inline-block;
}

.project--vision .project-title {
  font-size: clamp(2.8rem, 5.8vw, 6.6rem);
  font-variation-settings: "wdth" 70;
}

.project-sub {
  margin-top: 22px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.4rem, 2.1vw, 2rem);
  line-height: 1.2;
  color: var(--ink);
}

.project-body {
  margin-top: 18px;
  color: var(--ink-2);
  max-width: 60ch;
}

.project-tech {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.9;
  color: var(--ink-3);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin-top: 28px;
}

.project-links .btn {
  border-color: color-mix(in srgb, var(--c) 60%, transparent);
}

.private-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-3);
}

.private-note svg {
  width: 14px;
  height: 14px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.stats div {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
}

.stats dd {
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  font-weight: 600;
  font-variation-settings: "wdth" 78;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--c);
  font-variant-numeric: tabular-nums;
}

.stats dt {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Browser-framed screenshot */
.browser {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  overflow: hidden;
  box-shadow: 0 40px 120px -40px color-mix(in srgb, var(--c) 45%, transparent), 0 0 0 1px rgba(0, 0, 0, 0.4);
  transform-origin: 50% 100%;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-3);
}

.browser-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(238, 235, 227, 0.16);
}

.browser-bar span {
  margin-left: 12px;
  padding: 3px 12px;
  border-radius: 6px;
  background: rgba(238, 235, 227, 0.06);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-2);
}

.browser img {
  width: 100%;
  aspect-ratio: 1600 / 716;
  object-fit: cover;
}

.browser figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

/* LaTeX schematic (Chills) */
.latex {
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: #0a0b0e;
  overflow: hidden;
  box-shadow: 0 40px 120px -40px color-mix(in srgb, var(--c) 55%, transparent);
}

.latex-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-2);
}

.latex-tag {
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px dashed var(--line-2);
  color: var(--ink-3);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.latex-code {
  padding: 18px 0;
  font-family: var(--font-mono);
  font-size: clamp(0.66rem, 0.95vw, 0.82rem);
  line-height: 1.5;
}

.ln {
  position: relative;
  display: grid;
  grid-template-columns: 3.2em minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 7px 16px 7px 0;
  border-left: 2px solid transparent;
}

.ln code {
  padding: 0;
  background: none;
  font-size: 1em;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.ln-no {
  text-align: right;
  color: var(--ink-3);
  opacity: 0.6;
}

.ln-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.86em;
  white-space: nowrap;
}

.ln-badge svg {
  width: 11px;
  height: 11px;
}

.ln--frozen code { color: var(--ink-3); }
.ln--frozen .ln-badge { color: var(--ink-2); border: 1px solid var(--line-2); }

.ln--del { background: rgb(255 95 162 / 0.07); border-left-color: rgb(255 95 162 / 0.7); }
.ln--del code { text-decoration: line-through; text-decoration-color: rgb(255 95 162 / 0.7); }
.ln--del .ln-badge { color: var(--ch3); }

.ln--add { background: rgb(124 240 168 / 0.07); border-left-color: rgb(124 240 168 / 0.8); }
.ln--add code { color: var(--ink); }
.ln--add .ln-badge { color: var(--chm); }

.ln--edit .ln-badge { color: var(--ch4); border: 1px solid rgb(164 147 255 / 0.5); }

.ln--block { background: rgb(255 95 95 / 0.08); border-left-color: #ff5f5f; }
.ln--block code { color: #ff9a9a; }
.ln--block .ln-badge { background: #ff5f5f; color: #140808; font-weight: 500; }
.ln--block.is-flagged { animation: flag 0.5s ease-in-out 3; }

@keyframes flag {
  50% { background: rgb(255 95 95 / 0.26); }
}

.latex figcaption {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
}

/* Smart Surveillance */
.vision-stage {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: center;
}

.vision-feed {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(ellipse at 50% 120%, rgb(255 181 71 / 0.16), transparent 60%),
    linear-gradient(to bottom, #090a0c, #0e0f12);
  color: var(--ch1);
  overflow: hidden;
}

.vision-feed svg {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.vf-box {
  stroke-dasharray: 420;
  stroke-dashoffset: 0;
}

.vf-box--a,
.vf-box--c { stroke: var(--ch1); }
.vf-box--b { stroke: var(--chm); }

.vf-scan {
  animation: vf-scan 4.5s linear infinite;
  transform-box: view-box;
}

@keyframes vf-scan {
  from { transform: translateY(-70px); }
  to { transform: translateY(450px); }
}

.vision-readouts {
  position: absolute;
  left: 16px;
  top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vision-readouts span {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgb(255 181 71 / 0.4);
  background: rgba(7, 8, 10, 0.7);
}

.vision-feed figcaption {
  padding: 10px 16px 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
}

/* Lastone */
.lastone-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 80px);
  align-items: center;
}

.lastone-num {
  --fill: 100%;
  font-size: clamp(7rem, 23vw, 23rem);
  font-weight: 800;
  font-variation-settings: "wdth" 66;
  letter-spacing: -0.06em;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--chm);
  background-image: linear-gradient(to top, rgb(124 240 168 / 0.9) var(--fill), transparent var(--fill));
  -webkit-background-clip: text;
  background-clip: text;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lastone-plus {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  -webkit-text-stroke: 0;
  color: var(--chm);
  letter-spacing: 0;
}

.lastone-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.lastone-flow span {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgb(124 240 168 / 0.4);
  color: var(--ink);
}

.lastone-flow i {
  position: relative;
  width: 24px;
  height: 1px;
  background: rgb(124 240 168 / 0.5);
  overflow: hidden;
}

@media (max-width: 900px) {
  .project-grid,
  .project-grid--flip,
  .vision-stage,
  .lastone-grid {
    grid-template-columns: 1fr;
  }

  .project-grid--flip .project-copy {
    order: 0;
  }

  .stats {
    gap: 10px;
  }

  .lastone-num {
    font-size: clamp(6rem, 38vw, 12rem);
  }
}

/* ==========================================================================
   Lab: the LLM router simulation
   ========================================================================== */

.lab {
  --ch: var(--ch3);
}

.lab-head {
  display: grid;
  gap: 22px;
  max-width: 980px;
}

.router {
  margin-top: clamp(36px, 5vw, 64px);
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: rgba(10, 11, 14, 0.9);
  overflow: hidden;
  box-shadow: 0 60px 160px -60px rgb(255 95 162 / 0.45);
}

.router-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 18px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-2);
}

.router-note {
  color: var(--ink-3);
}

.router-body {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 300px;
}

.router-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.router-controls fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 6px;
}

.router-controls legend {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.router-controls label {
  position: relative;
  display: block;
  cursor: pointer;
}

.router-controls input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.router-controls label span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-3);
  transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.router-controls label b {
  font-weight: 500;
  font-size: 0.74rem;
  color: var(--ink-2);
}

.router-controls label:hover span {
  border-color: var(--line-2);
}

.router-controls input:checked + span {
  border-color: var(--ch3);
  background: rgb(255 95 162 / 0.08);
  color: var(--ink-2);
}

.router-controls input:checked + span b {
  color: var(--ink);
}

.router-controls input:focus-visible + span {
  outline: 2px solid var(--ch1);
  outline-offset: 2px;
}

.router-run {
  margin-top: 4px;
  background: var(--ch3);
  border-color: var(--ch3);
  box-shadow: 0 10px 40px -12px rgb(255 95 162 / 0.6);
}

.router-run[disabled] {
  opacity: 0.55;
  cursor: progress;
}

.router-diagram {
  position: relative;
  display: grid;
  align-content: center;
  padding: 22px 18px 44px;
  min-width: 0;
}

.router-diagram svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.r-edge {
  stroke: rgba(238, 235, 227, 0.14);
  stroke-width: 1.3;
  transition: stroke 0.3s ease;
}

.r-edge.is-hot {
  stroke: var(--ch3);
  stroke-dasharray: 5 6;
  animation: dash 0.8s linear infinite;
}

.r-edge--retry {
  stroke-dasharray: 3 6;
}

.r-edge--retry.is-hot {
  stroke: var(--ch1);
}

@keyframes dash {
  to { stroke-dashoffset: -22; }
}

.r-node rect {
  fill: #0f1115;
  stroke: rgba(238, 235, 227, 0.18);
  stroke-width: 1.2;
  transition: fill 0.3s ease, stroke 0.3s ease;
}

.r-node text {
  font-family: var(--font-mono);
  font-size: 12px;
  fill: var(--ink-2);
  text-anchor: middle;
}

.r-node .r-sub {
  font-size: 9.5px;
  fill: var(--ink-3);
}

.r-node.is-selected rect {
  stroke: rgba(238, 235, 227, 0.5);
}

.r-node.is-active rect {
  stroke: var(--ch3);
  fill: rgb(255 95 162 / 0.1);
}

.r-node.is-wait rect {
  stroke: var(--ch1);
  fill: rgb(255 181 71 / 0.1);
}

.r-node.is-error rect {
  stroke: #ff5f5f;
  fill: rgb(255 95 95 / 0.12);
}

.r-node.is-ok rect {
  stroke: var(--chm);
  fill: rgb(124 240 168 / 0.1);
}

.r-node.is-active text,
.r-node.is-ok text,
.r-node.is-error text,
.r-node.is-wait text {
  fill: var(--ink);
}

.r-retry-label {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--ink-3);
  text-anchor: middle;
}

.r-packet {
  fill: var(--ch3);
  filter: drop-shadow(0 0 6px var(--ch3));
  opacity: 0;
}

.r-packet.is-on {
  opacity: 1;
}

.router-status {
  position: absolute;
  left: 18px;
  bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.router-log-wrap {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  min-width: 0;
}

.router-log-title {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.router-log {
  flex: 1;
  max-height: 360px;
  overflow-y: auto;
  padding: 12px 16px 16px;
  display: grid;
  align-content: start;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.router-log li {
  word-break: break-word;
}

.router-log .is-dim { color: var(--ink-3); }
.router-log .is-warn { color: var(--ch1); }
.router-log .is-err { color: #ff8080; }
.router-log .is-ok { color: var(--chm); }

.lab-foot {
  margin-top: 18px;
}

@media (max-width: 1200px) {
  .router-body {
    grid-template-columns: 1fr;
  }

  .router-controls {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .router-controls fieldset {
    flex: 1 1 260px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .router-controls legend {
    grid-column: 1 / -1;
  }

  .router-log-wrap {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .router-log {
    max-height: 240px;
  }
}

/* Phones: keep the diagram legible and let it scroll sideways inside its panel */
@media (max-width: 640px) {
  .router-diagram {
    overflow-x: auto;
    padding-bottom: 52px;
    scrollbar-width: thin;
    scrollbar-color: var(--line-2) transparent;
  }

  .router-diagram svg {
    min-width: 600px;
  }

  .router-status {
    position: sticky;
    left: 0;
  }
}

/* ==========================================================================
   More builds
   ========================================================================== */

.more {
  --ch: var(--ch4);
  padding-top: clamp(40px, 6vw, 80px);
}

.more-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.more-list {
  margin-top: 28px;
  border-bottom: 1px solid var(--line);
}

.more-row {
  position: relative;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) minmax(0, 260px) 120px;
  gap: 24px;
  align-items: baseline;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  transition: background-color 0.35s ease;
}

.more-row::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--gutter) * -0.5);
  z-index: -1;
  border-radius: 10px;
  background: var(--panel-2);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.more-row:hover::before {
  opacity: 1;
}

.more-year {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-3);
}

.more-main h3 {
  font-size: clamp(1.25rem, 1.9vw, 1.7rem);
  font-weight: 600;
  font-variation-settings: "wdth" 88;
  letter-spacing: -0.025em;
  line-height: 1.15;
  transition: transform 0.5s var(--ease-out), color 0.3s ease;
}

.more-row:hover .more-main h3 {
  transform: translateX(8px);
  color: rgb(var(--glow-rgb, 164 147 255));
}

.more-main p {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 0.95rem;
  max-width: 64ch;
}

.more-tech {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
}

.more-links {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.more-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
}

.more-links a:hover {
  color: var(--ch1);
}

.more-preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  width: 300px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  will-change: transform;
}

.more-preview.is-on {
  opacity: 1;
}

.more-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

@media (max-width: 900px) {
  .more-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .more-links {
    justify-content: flex-start;
  }

  .more-preview {
    display: none;
  }
}

/* ==========================================================================
   Credentials
   ========================================================================== */

.creds {
  --ch: var(--ch1);
}

.creds-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 96px);
  margin-top: clamp(32px, 5vw, 64px);
  align-items: end;
}

.edu-cgpa {
  display: flex;
  align-items: baseline;
  gap: 18px;
}

.edu-num {
  font-size: clamp(5.5rem, 15vw, 14rem);
  font-weight: 700;
  font-variation-settings: "wdth" 70;
  letter-spacing: -0.06em;
  line-height: 0.85;
  color: var(--ch1);
  font-variant-numeric: tabular-nums;
}

.edu-of {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.edu-degree {
  margin-top: 22px;
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  font-weight: 600;
  font-variation-settings: "wdth" 88;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.edu-school {
  margin-top: 8px;
  color: var(--ink-2);
}

.edu-course {
  margin-top: 14px;
}

.pub {
  padding: clamp(22px, 3vw, 36px);
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: linear-gradient(150deg, rgb(255 181 71 / 0.07), transparent 60%), var(--bg-2);
}

.pub-badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--ch1);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ch1);
}

.pub-title {
  margin-top: 18px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  line-height: 1.1;
}

.pub-meta {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.pub .link-arrow {
  margin-top: 10px;
}

.ledger {
  margin-top: clamp(48px, 6vw, 90px);
  border-bottom: 1px solid var(--line);
}

.ledger li {
  position: relative;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.ledger li::after {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 100%;
  height: 1px;
  background: var(--ch1);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.6s var(--ease-out);
}

.ledger li:hover::after {
  transform: scaleX(1);
}

.ledger time {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-3);
}

.ledger-name {
  font-size: 1.05rem;
  font-weight: 500;
}

.ledger-org {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-2);
  text-align: right;
}

.ledger-org a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .creds-grid {
    grid-template-columns: 1fr;
  }

  .ledger li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .ledger-org {
    text-align: left;
  }
}

/* ==========================================================================
   Notes — the three newest posts, pulled from the CMS by blog-home.js.
   The card itself is the shared .post-card component in style.css.
   ========================================================================== */

.notes {
  --ch: var(--ch2);
}

.notes-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
  margin-top: clamp(24px, 3.2vw, 42px);
}

.notes-display {
  max-width: 20ch;
  font-size: clamp(2.3rem, 5.4vw, 4.6rem);
}

.notes-head .link-arrow {
  flex: none;
  color: var(--ink-2);
}

.notes-head .link-arrow:hover {
  color: var(--ink);
}

.notes-grid {
  margin-top: clamp(34px, 4.4vw, 60px);
}

@media (min-width: 1120px) {
  .notes-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* The strip keeps its height while the CMS answers, so the sections below it
   do not shuffle when the posts land. */
.notes-grid .post-skel,
.notes-grid .post-card {
  min-height: 330px;
}

.notes-grid .blog-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  padding-block: 20px;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  --ch: var(--ch1);
  padding-bottom: clamp(110px, 14vw, 200px);
}

.contact-display {
  margin-top: 26px;
  font-size: clamp(3rem, 9vw, 9rem);
  max-width: 12ch;
}

.contact-lede {
  margin-top: 26px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(36px, 6vw, 110px);
  margin-top: clamp(40px, 6vw, 80px);
  align-items: start;
}

.contact-email {
  display: inline-flex;
  align-items: flex-start;
  gap: 14px;
  font-size: clamp(1.25rem, 2.3vw, 2.05rem);
  font-weight: 500;
  font-variation-settings: "wdth" 85;
  letter-spacing: -0.025em;
  line-height: 1.2;
  overflow-wrap: anywhere;
  background-image: linear-gradient(var(--ch1), var(--ch1));
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 6px;
  transition: background-size 0.6s var(--ease-out);
}

.contact-email:hover,
.contact-email:focus-visible {
  background-size: 100% 2px;
}

.contact-email svg {
  width: 26px;
  height: 26px;
  margin-top: 0.15em;
  flex: none;
  color: var(--ch1);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-top: 14px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-2);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.copy-btn:hover {
  color: var(--ink);
  border-color: var(--ink-2);
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.contact-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 36px;
  border-top: 1px solid var(--line);
}

.contact-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding-right: 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  transition: color 0.25s ease, padding-left 0.4s var(--ease-out);
}

.contact-links a:hover {
  color: var(--ch1);
  padding-left: 6px;
}

.contact-links svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--ink-2);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 24px;
  padding: clamp(22px, 3vw, 36px);
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: rgba(11, 13, 16, 0.86);
}

.form-title {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.field {
  display: grid;
  gap: 8px;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.85rem;
  color: var(--ink-2);
}

.optional {
  color: var(--ink-3);
}

.field input,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  background: transparent;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--ch1);
  box-shadow: 0 1px 0 0 var(--ch1);
}

.field [aria-invalid="true"] {
  border-bottom-color: #ff6b6b;
}

.field-error {
  font-size: 0.8rem;
  color: #ff8a8a;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}

.form-status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-2);
}

.form-status.is-ok { color: var(--chm); }
.form-status.is-err { color: #ff8a8a; }

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .contact-form {
    grid-template-columns: 1fr;
  }

  .contact-links {
    grid-template-columns: 1fr;
  }
}
