/* ============================================================
   Gandhiji — portfolio
   Palette: Proton dark — #16141C base, #6D4AFF / #8A6EFF accents
   ============================================================ */

:root {
  /* surfaces (sampled from Proton's dark theme) */
  --ink:          #16141C;
  --ink-2:        #1A1822;
  --ink-3:        #1E1C26;
  --ink-4:        #292733;

  /* borders */
  --line:         #2B2837;
  --line-2:       #3D394B;

  /* type */
  --text:         #FFFFFF;
  --muted:        #A7A4B5;
  --muted-2:      #8F8BA0;

  /* accents */
  --accent:       #8A6EFF;  /* text-safe purple, 5.0:1 on --ink */
  --accent-strong:#6D4AFF;  /* Proton purple — button fill only */
  --accent-hover: #7452FF;
  --accent-dim:   #7C5CFF;
  --accent-soft:  #C2B2FF;
  --cool:         #9FB4FF;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius:     14px;
  --radius-lg:  20px;
  --container:  1140px;
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: rgba(109, 74, 255, 0.42);
  color: #fff;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
em { font-style: normal; color: var(--text); }

.mono {
  font-family: var(--mono);
  font-feature-settings: "liga" 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 28px;
}

/* ── atmosphere ─────────────────────────────────────────── */

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

.atmos {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* aurora — three slow-drifting colour fields */
.aurora {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  transform: translate3d(0, calc(min(var(--sy, 0), 900) * -0.07px), 0);
  will-change: transform;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}
.blob--1 {
  width: 680px;
  height: 680px;
  top: -32%;
  left: 4%;
  background: radial-gradient(circle, rgba(109, 74, 255, 0.62), transparent 68%);
  animation: drift-a 30s ease-in-out infinite;
}
.blob--2 {
  width: 560px;
  height: 560px;
  top: 18%;
  right: -8%;
  background: radial-gradient(circle, rgba(138, 110, 255, 0.42), transparent 70%);
  animation: drift-b 38s ease-in-out infinite;
}
.blob--3 {
  width: 520px;
  height: 520px;
  bottom: -18%;
  left: 30%;
  background: radial-gradient(circle, rgba(64, 46, 158, 0.55), transparent 70%);
  animation: drift-c 34s ease-in-out infinite;
}

@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(6%, 8%, 0) scale(1.14); }
}
@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.06); }
  50%      { transform: translate3d(-7%, 5%, 0) scale(0.94); }
}
@keyframes drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.96); }
  50%      { transform: translate3d(4%, -7%, 0) scale(1.1); }
}

/* dot matrix — crawls one tile per cycle, so the loop is seamless */
.dots {
  position: absolute;
  inset: -34px;
  background-image: radial-gradient(rgba(194, 178, 255, 0.55) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.085;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 32%, #000 0%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 32%, #000 0%, transparent 76%);
  animation: dots-drift 64s linear infinite;
  will-change: transform;
}
@keyframes dots-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-34px, -34px, 0); }
}

/* pointer-following glow */
.cursor-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(138, 110, 255, 0.13), transparent 62%);
  transform: translate3d(var(--mx, 50vw), var(--my, 34vh), 0);
  opacity: 0;
  transition: opacity 0.8s var(--ease);
  will-change: transform;
}
.atmos.is-live .cursor-glow { opacity: 1; }

/* ── nav ────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(22, 20, 28, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}

.nav__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(150deg, rgba(138, 110, 255, 0.30), rgba(138, 110, 255, 0.08));
  border: 1px solid rgba(138, 110, 255, 0.42);
  color: var(--accent-soft);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 1px;
}
.brand__name { font-size: 15px; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  color: var(--muted);
}
.nav__links a {
  position: relative;
  transition: color 0.2s ease;
}
.nav__links a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__links a:not(.nav__cta):hover { color: var(--text); }
.nav__links a:not(.nav__cta):hover::after { transform: scaleX(1); }

.nav__cta {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.nav__cta:hover {
  border-color: rgba(138, 110, 255, 0.55);
  background: rgba(138, 110, 255, 0.12);
  color: var(--accent-soft);
}

.nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav__toggle span {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}
.nav__toggle span:first-child { top: 16px; }
.nav__toggle span:last-child  { top: 22px; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3px) rotate(-45deg); }

/* scroll progress — scaleX only, so it stays on the compositor */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent-soft));
  transform: scaleX(var(--sp, 0));
  transform-origin: 0 50%;
  box-shadow: 0 0 12px rgba(138, 110, 255, 0.65);
}

/* ── hero ───────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 148px 0 72px;
  z-index: 1;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 64px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-bottom: 26px;
}
.eyebrow .mono { color: var(--accent); font-size: 12.5px; }
.eyebrow__sep { color: var(--muted-2); }
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 0 0 rgba(194, 178, 255, 0.5);
  animation: pulse 2.6s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(194, 178, 255, 0.45); }
  70%  { box-shadow: 0 0 0 7px rgba(194, 178, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(194, 178, 255, 0); }
}

.hero__title {
  font-size: clamp(3.4rem, 8.2vw, 6.2rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  font-weight: 600;
  margin-bottom: 26px;
  background: linear-gradient(178deg, #FFFFFF 12%, #B8AFD9 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  font-size: clamp(1rem, 1.25vw, 1.09rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 34px;
}
.hero__lede em {
  color: var(--text);
  border-bottom: 1px solid rgba(138, 110, 255, 0.40);
  padding-bottom: 1px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 52px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  transition: transform 0.25s var(--ease), background 0.25s ease,
              border-color 0.25s ease, box-shadow 0.3s ease, color 0.25s ease;
  will-change: transform;
}
.btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease);
}
.btn:hover svg { transform: translateX(3px); }

.btn--primary {
  background: var(--accent-strong);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 6px 24px -8px rgba(109, 74, 255, 0.55);
}
.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(109, 74, 255, 0.75);
}

.btn--ghost {
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 13.5px;
}
.btn--ghost:hover {
  border-color: rgba(138, 110, 255, 0.50);
  color: var(--accent);
  background: rgba(138, 110, 255, 0.10);
  transform: translateY(-2px);
}

.hero__stats {
  display: flex;
  gap: 44px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.hero__stats dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 4px;
}
.hero__stats dd {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

/* ── terminal ───────────────────────────────────────────── */

.hero__terminal { position: relative; }

.term {
  position: relative;
  background: linear-gradient(170deg, #201E2A, #191722 62%);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  box-shadow:
    0 40px 90px -40px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  overflow: hidden;
}
.term::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 70% at 50% 0%, rgba(138, 110, 255, 0.10), transparent 60%);
}

.term__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.term__lights { display: flex; gap: 6px; }
.term__lights i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #343140;
}
.term__lights i:nth-child(1) { background: #52394A; }
.term__lights i:nth-child(2) { background: #4E4739; }
.term__lights i:nth-child(3) { background: #384B44; }
.term__title {
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}
.term__spacer { flex: 1; }

.term__body {
  position: relative;
  padding: 20px 20px 26px;
  font-size: 12.8px;
  line-height: 1.85;
  min-height: 330px;
  color: #B7B3C6;
  letter-spacing: -0.01em;
}

.t-line { display: flex; gap: 8px; white-space: pre-wrap; word-break: break-word; }
.t-prompt { color: var(--accent); flex: none; }
.t-cmd { color: #FFFFFF; }
.t-out { color: #A7A4B5; padding-left: 0; }
.t-out--accent { color: var(--accent); }
.t-out--mint { color: var(--accent-soft); }
.t-key { color: var(--cool); }

.t-cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--accent);
  vertical-align: -2px;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── marquee ────────────────────────────────────────────── */

.marquee {
  position: relative;
  border-block: 1px solid var(--line);
  padding: 18px 0;
  overflow: hidden;
  z-index: 1;
  background: rgba(255, 255, 255, 0.015);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__inner {
  transform: skewX(var(--skew, 0deg));
  transform-origin: 50% 50%;
  transition: transform 0.5s var(--ease);
  will-change: transform;
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  animation: scroll 34s linear infinite;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.marquee__track .sep { color: rgba(138, 110, 255, 0.55); font-size: 8px; }
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── sections ───────────────────────────────────────────── */

.section {
  position: relative;
  padding: 116px 0;
  z-index: 1;
  scroll-margin-top: 84px;
}
.section--tight { padding-top: 0; }

.section__head { max-width: 660px; margin-bottom: 52px; }

.section__label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  opacity: 0.9;
}

.section__title {
  font-size: clamp(1.85rem, 3.4vw, 2.65rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin-bottom: 16px;
}

.section__sub {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.65;
  max-width: 54ch;
}

/* ── stack ──────────────────────────────────────────────── */

.stack {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-2);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease),
              translate 0.3s var(--ease);
  overflow: hidden;
}
.chip::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  background: radial-gradient(120% 100% at 0% 0%, hsl(var(--h) 75% 66% / 0.14), transparent 62%);
}
.chip:hover {
  border-color: var(--line-2);
  translate: 0 -3px;
  background: #201E2A;
}
.chip:hover::before { opacity: 1; }

.chip__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: hsl(var(--h) 80% 80%);
  background: hsl(var(--h) 70% 64% / 0.14);
  border: 1px solid hsl(var(--h) 70% 64% / 0.30);
  transition: transform 0.3s var(--ease);
}
.chip:hover .chip__mark { transform: scale(1.06); }

.chip__meta { display: flex; flex-direction: column; min-width: 0; }
.chip__meta b {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.chip__meta small {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted-2);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── bento ──────────────────────────────────────────────── */

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.card {
  position: relative;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, var(--ink-3), var(--ink-2));
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  transition: border-color 0.35s var(--ease), translate 0.35s var(--ease);
}
.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(138, 110, 255, 0.45), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.card:hover { border-color: var(--line-2); translate: 0 -3px; }
.card:hover::after { opacity: 1; }

.card--wide { grid-column: span 2; }

.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.card h3 {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 46ch;
}
.tag {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

.snippet {
  margin-top: auto;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  font-size: 12.2px;
  line-height: 1.75;
  color: #B7B3C6;
  overflow-x: auto;
  letter-spacing: -0.01em;
}
.snippet--sm { font-size: 11.8px; padding: 14px 16px; }
.c-key { color: var(--cool); }
.c-fn  { color: var(--accent-soft); }
.c-cm  { color: #7B7790; font-style: italic; }
.c-var { color: var(--accent); }

.spark {
  margin-top: auto;
  width: 100%;
  height: 74px;
  overflow: visible;
}
.spark__line { stroke-dashoffset: 0; }
.spark__area { opacity: 1; }

.js .spark__line {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  transition: stroke-dashoffset 1.6s var(--ease);
}
.js .card.is-visible .spark__line { stroke-dashoffset: 0; }
.js .spark__area { opacity: 0; transition: opacity 1s ease 0.5s; }
.js .card.is-visible .spark__area { opacity: 1; }

.mock {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
}
.mock__bar {
  display: flex;
  gap: 5px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.mock__bar i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #343140;
}
.mock__lines { padding: 14px 12px; display: grid; gap: 7px; }
.mock__lines span {
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03));
}
.mock__lines span:nth-child(2) { width: 78%; }
.mock__lines span.short { width: 44%; background: rgba(138, 110, 255, 0.45); }

/* ── work ───────────────────────────────────────────────── */

.work { display: grid; gap: 0; border-top: 1px solid var(--line); }

.work__item {
  display: grid;
  grid-template-columns: 64px 1fr 40px;
  gap: 24px;
  align-items: start;
  padding: 30px 18px 30px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding-left 0.4s var(--ease), background 0.4s var(--ease);
}
.work__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}
.work__item:hover {
  padding-left: 22px;
  background: linear-gradient(90deg, rgba(138, 110, 255, 0.08), transparent 55%);
}
.work__item:hover::before { transform: scaleY(1); }

.work__idx {
  font-size: 11.5px;
  color: var(--muted-2);
  padding-top: 7px;
  letter-spacing: 0.08em;
}
.work__body h3 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
  transition: color 0.25s ease;
}
.work__item:hover .work__body h3 { color: var(--accent); }
.work__body p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.62;
  max-width: 62ch;
  margin-bottom: 14px;
}
.work__tags { display: flex; flex-wrap: wrap; gap: 7px; }
.work__tags li {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
}

.work__arrow {
  justify-self: end;
  padding-top: 4px;
  color: var(--muted-2);
  transition: color 0.25s ease, transform 0.35s var(--ease);
}
.work__arrow svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor;
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}
.work__item:hover .work__arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ── approach ───────────────────────────────────────────── */

.approach {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 64px;
  align-items: start;
}

.steps { display: grid; gap: 8px; }
.steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps__n {
  font-size: 11.5px;
  color: var(--accent);
  letter-spacing: 0.08em;
  padding-top: 4px;
}
.steps h3 {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.steps p {
  color: var(--muted);
  font-size: 14.2px;
  line-height: 1.62;
  max-width: 50ch;
}

/* ── contact ────────────────────────────────────────────── */

.contact {
  position: relative;
  padding: 130px 0 120px;
  border-top: 1px solid var(--line);
  z-index: 1;
  overflow: hidden;
  scroll-margin-top: 84px;
}
.contact::before {
  content: "";
  position: absolute;
  width: 780px;
  height: 420px;
  left: 50%;
  bottom: -260px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(138, 110, 255, 0.18), transparent 68%);
  filter: blur(60px);
  pointer-events: none;
}

.contact__inner { position: relative; text-align: center; }

.contact__title {
  font-size: clamp(2.2rem, 5.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 600;
  margin-bottom: 20px;
}

.contact__sub {
  color: var(--muted);
  font-size: 15.5px;
  max-width: 44ch;
  margin: 0 auto 40px;
}

.contact__mail {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1rem, 2.2vw, 1.42rem);
  letter-spacing: -0.02em;
  color: var(--text);
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(138, 110, 255, 0.42);
  transition: color 0.25s ease, border-color 0.25s ease, gap 0.3s var(--ease);
}
.contact__mail:hover {
  color: var(--accent);
  border-color: var(--accent);
  gap: 16px;
}
.contact__mail svg {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

.contact__links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 56px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}
.contact__links a {
  transition: color 0.25s ease;
  position: relative;
}
.contact__links a:hover { color: var(--accent); }

/* ── footer ─────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  position: relative;
  z-index: 1;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted-2);
  letter-spacing: 0.04em;
}

/* ── reveal ─────────────────────────────────────────────── */

[data-reveal] {
  opacity: 1;
  transform: none;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  transition-delay: calc(var(--d, 0) * 65ms);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
[data-delay="1"] { --d: 1; }
[data-delay="2"] { --d: 2; }
[data-delay="3"] { --d: 3; }
[data-delay="4"] { --d: 4; }

/* ── scroll-driven 3D ───────────────────────────────────── */

/* Perspective lives on the container; the items below rotate inside it.
   Ported from the 21st.dev "Container Scroll Animation" (Aceternity):
   perspective 1000px, rotateX 20deg → 0, scale 1.05 → 1, translateY 0 → -100. */
.hero__grid { perspective: 1500px; perspective-origin: 50% 40%; }
.stack,
.bento,
.work,
.steps { perspective: 1200px; perspective-origin: 50% 45%; }
.section__head,
.approach__aside,
.contact__inner { perspective: 900px; perspective-origin: 50% 100%; }

[data-scroll3d] {
  --rx: 0deg;
  --ry: 0deg;
  --tx: 0px;
  --ty: 0px;
  --tz: 0px;
  --sc: 1;
  transform:
    translate3d(var(--tx), var(--ty), var(--tz))
    rotateX(var(--rx))
    rotateY(var(--ry))
    scale(var(--sc));
  transform-origin: var(--origin, 50% 50%);
  backface-visibility: hidden;
}

[data-scroll3d="terminal"] { will-change: transform; }
[data-scroll3d="chip"]     { --origin: 50% 100%; }
[data-scroll3d="row"]      { --origin: 50% 0%; }
[data-scroll3d="title"]    { --origin: 50% 100%; }
[data-scroll3d="step"]     { --origin: 0% 50%; }

[data-hero-copy] { transform: translate3d(0, var(--py, 0px), 0); }

/* the terminal fades in once, then the scroll engine owns its transform */
.term { animation: term-in 0.9s var(--ease) both; }
@keyframes term-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── responsive ─────────────────────────────────────────── */

@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; gap: 52px; }
  .hero { padding-top: 132px; }
  .hero__lede { max-width: 56ch; }
  .hero__terminal { max-width: 580px; }
  .stack { grid-template-columns: repeat(3, 1fr); }
  .stack .chip:last-child { grid-column: span 3; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .card--wide { grid-column: span 2; }
  .approach { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 760px) {
  .container { padding-inline: 20px; }
  .nav__inner { padding: 14px 20px; }

  .nav__toggle { display: block; }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--line-2);
    border-radius: 14px;
    background: rgba(26, 24, 34, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .nav__links.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav__links a { padding: 11px 12px; border-radius: 9px; font-size: 15px; }
  .nav__links a:hover { background: rgba(255, 255, 255, 0.04); }
  .nav__links a:not(.nav__cta)::after { display: none; }
  .nav__cta { text-align: center; margin-top: 4px; border-color: rgba(138, 110, 255, 0.40); }

  .hero { padding: 118px 0 56px; }
  .hero__stats { gap: 30px; }
  .hero__actions { margin-bottom: 42px; }
  .term__body { font-size: 11.4px; min-height: 300px; padding: 16px 16px 22px; }

  .section { padding: 82px 0; }
  .section--tight { padding-top: 0; }
  .section__head { margin-bottom: 38px; }

  .stack { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stack .chip:last-child { grid-column: auto; }
  .chip { padding: 13px; gap: 10px; }
  .chip__mark { width: 32px; height: 32px; font-size: 11px; }
  .chip__meta small { font-size: 9.5px; }

  .bento { grid-template-columns: 1fr; }
  .card--wide { grid-column: span 1; }
  .card { padding: 22px; }

  .work__item {
    grid-template-columns: 34px 1fr;
    gap: 14px;
    padding: 24px 0;
  }
  .work__arrow { display: none; }
  .work__body h3 { font-size: 18px; }

  .contact { padding: 88px 0 78px; }
  .contact__links { gap: 22px; margin-top: 44px; }
  .footer__inner { justify-content: center; text-align: center; }
}

@media (max-width: 420px) {
  .hero__title { font-size: 3rem; }
  .hero__stats { gap: 22px; }
  .stack { grid-template-columns: 1fr; }
  .chip__meta small { font-size: 10px; }
}

/* ── reduced motion ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  [data-scroll3d] { transform: none; opacity: 1; }
  [data-hero-copy] { transform: none; }
  .marquee__inner { transform: none !important; }
  .marquee__track { animation: none; }
  .spark__line { stroke-dashoffset: 0; }
  .spark__area { opacity: 1; }
  .blob,
  .dots { animation: none !important; }
  .cursor-glow { display: none; }
}
