/* ===========================================================
   JEFFSON LUIZ — Full Stack Developer Portfolio
   Visual system: obsidian canvas / electric blue & cyan / Montserrat 800 + DM Sans + JetBrains Mono
   =========================================================== */

:root {
  --ink: #000000;
  --ink-2: #04070d;
  --ink-3: #080d16;
  --panel: #0b111d;
  --panel-2: #101827;

  --acc: #3B82F6;
  --acc-glow: #38BDF8;
  --acc-dim: rgba(59, 130, 246, .35);

  --fg: #FFFFFF;
  --fg-2: #94A3B8;
  --fg-3: #64748B;
  --fg-4: #475569;
  --fg-5: #1E293B;

  --line: #151f30;
  --line-2: #0f172a;

  --ok: #22C55E;

  --display: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --body: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --ease: cubic-bezier(.16, 1, .3, 1);

  --gut: clamp(20px, 5vw, 64px);
  --nav-h: 72px;
}

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

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

body {
  background: var(--ink);
  color: var(--fg);
  font-family: var(--body);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  background: none;
  border: 0;
  color: inherit;
}

::selection {
  background: var(--acc);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gut);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Grain + custom cursor ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

#cursor,
#cursor-ring {
  display: none;
}

body.has-cursor {
  cursor: none;
}

body.has-cursor a,
body.has-cursor button {
  cursor: none;
}

body.has-cursor #cursor {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--acc-glow);
  pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  will-change: transform;
}

body.has-cursor #cursor-ring {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--acc-dim);
  pointer-events: none;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: width .25s ease, height .25s ease, border-color .25s ease;
}

body.cursor-hot #cursor {
  width: 16px;
  height: 16px;
}

body.cursor-hot #cursor-ring {
  width: 56px;
  height: 56px;
  border-color: rgba(56, 189, 248, .65);
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 300;
  background: transparent;
  pointer-events: none;
}

.scroll-progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--acc), var(--acc-glow));
  transform: scaleX(0);
  transform-origin: left;
}

/* ===========================================================
   NAV
   =========================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 220;
  height: var(--nav-h);
  padding: 0 var(--gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .4s ease, border-color .4s ease, backdrop-filter .4s ease;
}

.nav.is-scrolled {
  background: rgba(4, 7, 13, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--fg);
}

.nav-logo .code-mark {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--acc-glow);
  padding: 4px 8px;
  border: 1px solid rgba(59, 130, 246, .45);
  background: rgba(59, 130, 246, .08);
  border-radius: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  list-style: none;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--fg-2);
  transition: color .2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--acc-glow);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 3px;
  border: 1px solid var(--fg-5);
  background: rgba(15, 23, 42, .55);
  color: var(--fg-3);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.lang-switch:hover {
  border-color: var(--acc);
  background: rgba(59, 130, 246, .12);
}

.lang-switch span {
  transition: color .2s ease;
}

.lang-switch span.is-active {
  color: var(--acc-glow);
}

.lang-switch .sep {
  color: var(--fg-4);
  font-weight: 400;
}

.nav-cta {
  font-family: var(--mono) !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
  color: #FFFFFF !important;
  background: var(--acc);
  padding: 9px 18px;
  border-radius: 3px;
  white-space: nowrap;
  box-shadow: 0 0 20px rgba(59, 130, 246, .28);
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.nav-cta:hover {
  background: var(--acc-glow);
  color: #04070d !important;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  z-index: 240;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  transition: transform .35s var(--ease), opacity .25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===========================================================
   SHARED TYPE / LABELS
   =========================================================== */
.eyebrow {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--acc-glow);
}

.eyebrow-mute {
  color: var(--fg-4);
}

.h-display {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.02em;
  line-height: .92;
  color: var(--fg);
}

.h-xl {
  font-size: clamp(34px, 7vw, 84px);
}

.h-lg {
  font-size: clamp(28px, 5vw, 54px);
}

.h-md {
  font-size: clamp(22px, 3.4vw, 38px);
}

.outline {
  -webkit-text-stroke: 1px var(--acc-glow);
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.lede {
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--fg-2);
  line-height: 1.75;
  max-width: 56ch;
}

.section {
  padding: clamp(72px, 11vw, 140px) 0;
}

.section-tight {
  padding-top: 0;
}

.section-head {
  margin-bottom: clamp(36px, 6vw, 72px);
}

.section-head .eyebrow {
  display: block;
  margin-bottom: 14px;
}

.section-head p {
  margin-top: 18px;
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
}

/* motion primitives */
.reveal-line {
  overflow: hidden;
  display: inline-block;
  vertical-align: top;
  padding-bottom: .14em;
  margin-bottom: -.14em;
}

.reveal-line>span {
  display: inline-block;
  will-change: transform;
}

.fade-up {
  opacity: 0;
  transform: translateY(24px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 3px;
  transition: opacity .2s ease, color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.btn-primary {
  background: var(--acc);
  color: #fff;
  box-shadow: 0 0 24px rgba(59, 130, 246, .32);
}

.btn-primary:hover {
  background: var(--acc-glow);
  color: #04070d;
}

.btn-ghost {
  color: var(--fg-2);
  border: 1px solid var(--fg-5);
  background: rgba(11, 17, 29, .5);
}

.btn-ghost:hover {
  color: var(--acc-glow);
  border-color: var(--acc-glow);
}

/* ===========================================================
   HOME HERO
   =========================================================== */
.hero-wrap {
  position: relative;
}

.hero {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 560px;
  background: var(--ink);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--gut) clamp(56px, 9vh, 90px);
}

.hero-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: -16%;
  height: 132%;
  z-index: 0;
  will-change: transform;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% top;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to right, rgba(0, 0, 0, .95) 0%, rgba(2, 5, 11, .76) 44%, rgba(2, 5, 11, .18) 72%, rgba(2, 5, 11, .55) 100%),
    linear-gradient(to top, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, 0) 42%);
}

.hero-rule {
  position: absolute;
  top: 0;
  left: calc(var(--gut) + 32px);
  width: 2px;
  height: 100%;
  background: var(--acc);
  opacity: .35;
  z-index: 2;
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 1.2s var(--ease) .1s;
}

.is-loaded .hero-rule {
  transform: scaleY(1);
}

.hero-status {
  position: absolute;
  top: calc(var(--nav-h) + 24px);
  left: var(--gut);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: pulse 2s ease infinite;
}

.hero-status span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: .14em;
  text-transform: uppercase;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .35
  }
}

.hero-place {
  position: absolute;
  top: 40%;
  right: calc(var(--gut) - 16px);
  z-index: 4;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .32em;
  color: var(--fg-3);
  writing-mode: vertical-rl;
  text-transform: uppercase;
}

.hero-inner {
  position: relative;
  z-index: 3;
  will-change: transform;
}

.hero-kicker {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(14px, 2vw, 24px);
  letter-spacing: .55em;
  color: var(--acc-glow);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hero-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(54px, 12.5vw, 168px);
  line-height: .88;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: var(--fg);
}

.hero-tag {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: clamp(18px, 3vw, 32px);
}

.hero-tag .bar {
  width: 44px;
  height: 2px;
  background: var(--acc);
  flex-shrink: 0;
}

.hero-tag span {
  font-family: var(--mono);
  font-size: clamp(11px, 1.3vw, 14px);
  color: var(--fg-2);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero-tag b {
  color: var(--acc-glow);
  font-weight: 700;
}

.hero-blurb {
  margin-top: 22px;
  max-width: 56ch;
  font-size: clamp(13.5px, 1.4vw, 15.5px);
  color: var(--fg-2);
  line-height: 1.75;
}

.hero-actions {
  margin-top: clamp(24px, 4vw, 40px);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 28px;
  right: var(--gut);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-scroll span {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--fg-3);
  letter-spacing: .25em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.hero-scroll i {
  width: 1px;
  height: 38px;
  background: linear-gradient(to bottom, var(--acc), transparent);
}

/* ===========================================================
   MARQUEE
   =========================================================== */
.marquee {
  background: linear-gradient(90deg, var(--acc), #2563EB, var(--acc));
  overflow: hidden;
  padding: 15px 0;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  position: relative;
  z-index: 5;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee span {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .26em;
  color: #FFFFFF;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0 22px;
}

@keyframes marquee {
  from {
    transform: translateX(0)
  }

  to {
    transform: translateX(-50%)
  }
}

/* ===========================================================
   STATS
   =========================================================== */
.stats {
  background: var(--ink);
  position: relative;
  z-index: 5;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.stat {
  background: var(--ink);
  padding: clamp(24px, 3.4vw, 44px);
  transition: background .3s ease;
}

.stat:hover {
  background: var(--panel);
}

.stat-number {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1;
  color: var(--acc-glow);
  letter-spacing: -.03em;
  margin-bottom: 12px;
}

.stat-label {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 12px;
}

.stat-desc {
  font-size: 13.5px;
  color: var(--fg-2);
  line-height: 1.7;
}

/* ===========================================================
   PINNED HORIZONTAL — SELECTED CASES
   =========================================================== */
.pin-wrap {
  position: relative;
}

.pin-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 560px;
  background: var(--ink-2);
  overflow: hidden;
}

.pin-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: calc(var(--nav-h) + 18px) var(--gut) 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  background: linear-gradient(to bottom, var(--ink-2) 58%, transparent);
  pointer-events: none;
}

.pin-head .eyebrow {
  display: block;
  margin-bottom: 9px;
}

.pin-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.pin-dots i {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: var(--fg-5);
  transition: width .4s var(--ease), background .3s ease;
}

.pin-dots i.on {
  width: 26px;
  background: var(--acc-glow);
}

.pin-count {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: .2em;
  margin-left: 8px;
}

.htrack {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  align-items: stretch;
  will-change: transform;
}

.hcard {
  width: 100vw;
  height: 100%;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  padding: clamp(130px, 17vh, 190px) var(--gut) clamp(70px, 10vh, 96px);
  border-right: 1px solid var(--line);
  overflow: hidden;
  color: inherit;
}

.hcard-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hcard-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .75;
}

.hcard-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(4, 7, 13, .96) 0%, rgba(4, 7, 13, .84) 48%, rgba(4, 7, 13, .45) 100%);
}

.hcard-num {
  position: absolute;
  top: 50%;
  right: clamp(16px, 4vw, 56px);
  transform: translateY(-50%);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(110px, 20vw, 260px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px #132038;
  letter-spacing: -.04em;
  user-select: none;
  pointer-events: none;
  z-index: 1;
  transition: -webkit-text-stroke-color .5s ease;
}

.hcard.on .hcard-num {
  -webkit-text-stroke-color: rgba(59, 130, 246, .28);
}

.hcard-accent {
  position: absolute;
  left: clamp(10px, 2.2vw, 28px);
  top: 0;
  width: 2px;
  height: 0;
  background: linear-gradient(to bottom, var(--acc), var(--acc-glow));
  z-index: 2;
  transition: height .8s var(--ease);
}

.hcard.on .hcard-accent {
  height: 100%;
}

.hcard-body {
  position: relative;
  z-index: 3;
  max-width: 600px;
}

.hcard-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.hcard-meta .idx {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  color: var(--acc-glow);
  letter-spacing: .35em;
}

.hcard-meta .sep {
  width: 28px;
  height: 1px;
  background: var(--fg-4);
}

.hcard-meta .cat {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-2);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hcard-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(32px, 6vw, 74px);
  line-height: .92;
  text-transform: uppercase;
  letter-spacing: -.02em;
  color: var(--fg);
  margin-bottom: 14px;
}

.hcard-tagline {
  font-size: clamp(15px, 1.9vw, 21px);
  font-weight: 500;
  color: var(--fg-2);
  line-height: 1.4;
  margin-bottom: 16px;
  max-width: 36ch;
}

.hcard-desc {
  font-size: 14px;
  color: var(--fg-3);
  line-height: 1.7;
  max-width: 48ch;
  margin-bottom: 24px;
}

.hcard-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.hcard-tags span {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid var(--fg-5);
  color: var(--fg-2);
  background: rgba(11, 17, 29, .65);
  border-radius: 2px;
}

.hcard-go {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--acc-glow);
}

.hcard-go i {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--acc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  transition: background .3s ease, color .3s ease;
}

.hcard:hover .hcard-go i {
  background: var(--acc);
  color: #fff;
}

.hcard-year {
  position: absolute;
  top: clamp(118px, 16vh, 180px);
  right: var(--gut);
  z-index: 4;
  position: absolute;
  top: clamp(196px, 24vh, 236px);
  right: var(--gut);
  z-index: 4;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: .25em;
  font-size: 11px;
  color: var(--acc-glow);
  letter-spacing: .2em;
  text-transform: uppercase;
  background: rgba(8, 13, 22, .85);
  border: 1px solid rgba(56, 189, 248, .32);
  padding: 6px 14px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.pin-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-3);
  letter-spacing: .25em;
  text-transform: uppercase;
  transition: opacity .4s ease;
  pointer-events: none;
}

/* ===========================================================
   STICKY STACK — EXPERIENCE
   =========================================================== */
.stack-wrap {
  position: relative;
}

.stack-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 560px;
  background: var(--ink);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.stack-head {
  padding: calc(var(--nav-h) + 18px) var(--gut) 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.stack-head .eyebrow {
  display: block;
  margin-bottom: 9px;
}

.stack-area {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.stack-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px var(--gut);
  will-change: transform, opacity;
}

.stack-card {
  width: 100%;
  max-width: 980px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 2px solid var(--line);
  padding: clamp(26px, 3.4vw, 44px) clamp(22px, 3.6vw, 52px);
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 0 clamp(20px, 3vw, 44px);
  align-items: start;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  transition: border-color .35s ease;
}

.stack-item.on .stack-card {
  border-top-color: var(--acc);
  border-color: var(--fg-5);
}

.stack-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1;
  color: #1e293b;
  transition: color .4s ease;
}

.stack-item.on .stack-num {
  color: var(--acc-glow);
}

.stack-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.stack-title h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(20px, 3vw, 36px);
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: 1;
  color: var(--fg);
}

.stack-title .role {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--acc-glow);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.stack-desc {
  font-size: 14.5px;
  color: var(--fg-2);
  line-height: 1.75;
  max-width: 58ch;
  margin-bottom: 20px;
}

.stack-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stack-tags span {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 11px;
  border: 1px solid var(--fg-5);
  color: var(--fg-2);
  border-radius: 2px;
}

.stack-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  padding-top: 4px;
}

.stack-year {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: .16em;
  white-space: nowrap;
}

/* ===========================================================
   CTA BAND
   =========================================================== */
.cta-band {
  background: var(--ink);
  position: relative;
  overflow: hidden;
  padding: clamp(90px, 14vw, 150px) 0 clamp(80px, 12vw, 130px);
  text-align: center;
}

.ghost-word {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(60px, 15vw, 190px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px #0d1626;
  letter-spacing: -.03em;
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 2;
}

.cta-words {
  margin: 34px 0 40px;
}

.cta-words div {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(38px, 8.5vw, 104px);
  line-height: .9;
  text-transform: uppercase;
  letter-spacing: -.02em;
  padding-bottom: 6px;
}

.cta-words div:nth-child(2) {
  color: var(--acc-glow);
}

.cta-mail {
  display: inline-block;
  font-family: var(--mono);
  font-size: clamp(14px, 1.9vw, 20px);
  font-weight: 600;
  color: var(--fg-2);
  border-bottom: 1px solid var(--fg-5);
  padding-bottom: 4px;
  letter-spacing: .04em;
  transition: color .2s ease, border-color .2s ease;
}

.cta-mail:hover {
  color: var(--acc-glow);
  border-color: var(--acc-glow);
}

.cta-links {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 5vw, 48px);
  margin-top: 40px;
  flex-wrap: wrap;
}

.cta-links a {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--fg-3);
  transition: color .2s ease;
}

.cta-links a:hover {
  color: var(--acc-glow);
}

/* ===========================================================
   FOOTER
   =========================================================== */
.footer {
  background: var(--ink);
  border-top: 1px solid var(--line);
  padding: 20px var(--gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer .nav-logo {
  font-size: 9px;
  letter-spacing: .36em;
  color: var(--fg-3);
}

.footer-copy {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-4);
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 7px;
}

.footer-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 5px var(--ok);
}

.footer-status span {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-3);
  letter-spacing: .1em;
}

/* ===========================================================
   PAGE HEADER (about / contact / case)
   =========================================================== */
.page-hero {
  padding: calc(var(--nav-h) + clamp(60px, 11vw, 120px)) 0 clamp(40px, 6vw, 70px);
  position: relative;
  overflow: hidden;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.about-figure {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}

.about-figure img {
  width: 100%;
  height: auto;
  will-change: transform;
}

.about-figure .barline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--acc), var(--acc-glow));
  transform: scaleX(0);
  transform-origin: left;
}

.about-figcap {
  margin-top: 14px;
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-family: var(--mono);
  font-weight: 700;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 34px;
}

.about-stats .v {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(24px, 3vw, 34px);
  color: var(--acc-glow);
  line-height: 1;
  margin-bottom: 6px;
}

.about-stats .l {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  line-height: 1.4;
}

.about-lines>.mask>span {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(22px, 3.5vw, 44px);
  line-height: 1.06;
  text-transform: uppercase;
  letter-spacing: -.01em;
  color: var(--fg);
}

.about-lines>.mask:first-child>span {
  color: var(--acc-glow);
}

.about-body {
  margin-top: 30px;
}

.about-body p {
  font-size: 15px;
  color: var(--fg-2);
  line-height: 1.8;
  margin-bottom: 18px;
}

/* philosophy */
.phil-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.phil-card {
  background: var(--ink);
  padding: clamp(24px, 3vw, 40px);
  position: relative;
  overflow: hidden;
  transition: background .3s ease;
}

.phil-card:hover {
  background: var(--panel);
}

.phil-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--fg-5);
  margin-bottom: 20px;
  transition: -webkit-text-stroke-color .3s ease;
}

.phil-card:hover .phil-num {
  -webkit-text-stroke-color: var(--acc-glow);
}

.phil-card h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 12px;
}

.phil-card p {
  font-size: 13.5px;
  color: var(--fg-2);
  line-height: 1.75;
}

/* pills */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.pill {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  padding: 9px 16px;
  border: 1px solid var(--fg-5);
  background: rgba(11, 17, 29, .6);
  color: var(--fg-2);
  border-radius: 2px;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.pill:hover {
  border-color: var(--acc-glow);
  color: var(--acc-glow);
  background: rgba(59, 130, 246, .1);
}

/* timeline */
.timeline {
  position: relative;
  max-width: 920px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 0 24px;
  align-items: start;
  padding: 0 0 clamp(34px, 5vw, 52px);
}

.timeline-item:last-of-type {
  padding-bottom: 0;
}

.timeline-dot-col {
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.timeline-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--acc-glow);
  transform: scale(0);
  position: relative;
  z-index: 2;
  box-shadow: 0 0 0 4px var(--ink), 0 0 12px var(--acc);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), background .25s ease;
}

.timeline-dot.is-reached {
  transform: scale(1) !important;
}

.timeline-role {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(16px, 2.2vw, 22px);
  text-transform: uppercase;
  letter-spacing: -.01em;
  color: var(--fg);
  margin-bottom: 5px;
}

.timeline-company {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--acc-glow);
  margin-bottom: 12px;
}

.timeline-desc {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.75;
  max-width: 62ch;
}

.timeline-date {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--fg-3);
  white-space: nowrap;
  padding-top: 8px;
}

.timeline-progress {
  position: absolute;
  width: 2px;
  background: var(--line);
  z-index: 1;
  transform: translateX(-50%);
}

.timeline-progress-fill {
  width: 100%;
  height: 0;
  background: linear-gradient(to bottom, var(--acc), var(--acc-glow));
  box-shadow: 0 0 10px rgba(56, 189, 248, .55);
  opacity: .95;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(34px, 6vw, 72px);
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 17, 29, .7);
  padding: 8px 16px;
  margin-bottom: 26px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-2);
}

.status-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: pulse 2s ease infinite;
}

.contact-block {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.contact-label {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 10px;
}

.contact-email {
  font-family: var(--mono);
  font-size: clamp(15px, 2.1vw, 22px);
  font-weight: 600;
  color: var(--fg);
  border-bottom: 1px solid var(--fg-5);
  padding-bottom: 4px;
  transition: color .2s ease, border-color .2s ease;
  display: inline-block;
  word-break: break-word;
}

.contact-email:hover {
  color: var(--acc-glow);
  border-color: var(--acc-glow);
}

.contact-links-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-link {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-2);
  transition: color .2s ease;
}

.contact-link:hover {
  color: var(--acc-glow);
}

.contact-visual {
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  padding: clamp(12px, 2vw, 20px);
}

.contact-visual img {
  width: 100%;
  will-change: transform;
}

/* ===========================================================
   CASE PAGES
   =========================================================== */
.case-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + clamp(50px, 9vw, 96px)) 0 clamp(48px, 7vw, 84px);
  border-bottom: 1px solid var(--line);
}

.case-hero-num {
  position: absolute;
  top: calc(var(--nav-h) + 10px);
  right: var(--gut);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(100px, 18vw, 230px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px #111c30;
  user-select: none;
  pointer-events: none;
  letter-spacing: -.04em;
}

.case-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
  position: relative;
  z-index: 2;
}

.case-eyebrow {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--acc-glow);
  margin-bottom: 18px;
}

.case-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 5.4vw, 62px);
  line-height: .94;
  text-transform: uppercase;
  letter-spacing: -.02em;
  color: var(--fg);
}

.case-hero-desc {
  margin-top: 22px;
  font-size: clamp(14px, 1.6vw, 17px);
  color: var(--fg-2);
  line-height: 1.7;
  max-width: 52ch;
}

.case-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(18px, 3vw, 44px);
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.case-meta-label {
  display: block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 9.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 7px;
}

.case-meta-value {
  display: block;
  font-size: 13.5px;
  color: var(--fg);
  font-weight: 600;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.case-tags span {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid var(--fg-5);
  color: var(--fg-2);
  border-radius: 2px;
}

.case-hero-phone {
  position: relative;
}

.case-hero-phone img {
  width: 100%;
  will-change: transform;
}

.case-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 36px;
}

.case-stat {
  background: var(--ink);
  padding: clamp(20px, 2.6vw, 30px);
}

.case-stat-number {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 46px);
  color: var(--acc-glow);
  line-height: 1;
  letter-spacing: -.02em;
  margin-bottom: 10px;
}

.case-stat-label {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 9px;
}

.case-stat-desc {
  font-size: 12.5px;
  color: var(--fg-2);
  line-height: 1.65;
}

/* narrative blocks */
.case-block {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(20px, 4vw, 54px);
  padding: clamp(40px, 6vw, 70px) 0;
  border-bottom: 1px solid var(--line);
}

.case-block-label {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(16px, 2.2vw, 24px);
  text-transform: uppercase;
  letter-spacing: -.01em;
  color: var(--fg);
  position: relative;
  padding-left: 20px;
}

.case-block-label::before {
  content: '/';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--acc-glow);
}

.case-block-body p {
  font-size: 15px;
  color: var(--fg-2);
  line-height: 1.8;
}

.case-block-sub {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(17px, 2.2vw, 24px);
  text-transform: uppercase;
  color: var(--acc-glow) !important;
  letter-spacing: -.01em;
  margin-bottom: 14px;
}

.case-block-desc {
  color: var(--fg-2) !important;
}

.case-list {
  list-style: none;
  margin-top: 22px;
}

.case-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 13px;
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.7;
}

.case-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 2px;
  background: var(--acc-glow);
}

/* pull statement */
.case-statement {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: clamp(20px, 4vw, 50px);
  align-items: center;
  padding: clamp(30px, 4.6vw, 58px);
  margin: clamp(40px, 6vw, 70px) 0;
}

.case-statement p {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(20px, 3.2vw, 38px);
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: -.02em;
  color: var(--fg);
}

.case-statement p em {
  color: var(--acc-glow);
  font-style: normal;
}

.case-statement-media img {
  width: 100%;
  will-change: transform;
}

/* gallery */
.case-gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  border: 1px solid var(--line);
  background: var(--ink-3);
  overflow: hidden;
  cursor: pointer;
}

.case-gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .7s var(--ease);
}

.case-gallery-slide.is-active {
  opacity: 1;
}

.case-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.case-gallery-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}

.case-gallery-dots button {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: var(--fg-5);
  cursor: pointer;
  transition: width .4s var(--ease), background .3s ease;
}

.case-gallery-dots button.is-active {
  width: 26px;
  background: var(--acc-glow);
}

/* role + process grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.mini-card {
  background: var(--ink);
  padding: clamp(22px, 2.6vw, 32px);
  transition: background .3s ease;
}

.mini-card:hover {
  background: var(--panel);
}

.mini-card h4 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 11px;
}

.mini-card p {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.7;
}

.mini-num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .28em;
  color: var(--acc-glow);
  margin-bottom: 16px;
}

/* results */
.results-card {
  border: 1px solid var(--line);
  background: var(--panel);
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(28px, 4vw, 54px);
}

.results-card .media img {
  width: 100%;
  will-change: transform;
}

.results-list {
  display: grid;
  gap: clamp(24px, 3vw, 38px);
}

.result-number {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(32px, 5vw, 60px);
  line-height: 1;
  color: var(--acc-glow);
  letter-spacing: -.03em;
  margin-bottom: 10px;
}

.result-label {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 9px;
}

.result-desc {
  font-size: 13.5px;
  color: var(--fg-2);
  line-height: 1.7;
  max-width: 46ch;
}

/* up next */
.case-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(30px, 4.5vw, 54px) 0;
  margin-bottom: clamp(40px, 6vw, 70px);
  transition: padding-left .35s var(--ease);
}

.case-next:hover {
  padding-left: 14px;
}

.case-next-label {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--acc-glow);
  margin-bottom: 12px;
}

.case-next-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(19px, 3vw, 34px);
  text-transform: uppercase;
  letter-spacing: -.01em;
  color: var(--fg);
  line-height: 1.05;
}

.case-next-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-2);
  transition: color .3s ease;
}

.case-next:hover .case-next-btn {
  color: var(--acc-glow);
}

.arrow-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--fg-5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}

.case-next:hover .arrow-circle {
  background: var(--acc);
  border-color: var(--acc);
  color: #fff;
}

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width:1024px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .case-hero-grid {
    grid-template-columns: 1fr;
  }

  .case-hero-phone {
    max-width: 420px;
  }

  .phil-grid,
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .results-card {
    grid-template-columns: 1fr;
  }

  .results-card .media {
    max-width: 340px;
    margin: 0 auto;
  }

  .case-statement {
    grid-template-columns: 1fr;
  }

  .case-statement-media {
    max-width: 340px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .case-block {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width:900px) {

  .pin-wrap,
  .stack-wrap {
    height: auto !important;
  }

  .pin-stage,
  .stack-stage {
    position: static;
    height: auto;
    min-height: 0;
  }

  .pin-head {
    position: static;
    background: none;
    padding: clamp(56px, 11vw, 80px) var(--gut) 28px;
    pointer-events: auto;
  }

  .pin-dots,
  .pin-hint {
    display: none;
  }

  .htrack {
    position: static;
    display: flex;
    flex-direction: column;
    height: auto;
    transform: none !important;
  }

  .hcard {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: clamp(28px, 7vw, 44px) var(--gut) clamp(34px, 8vw, 52px);
    border-right: 0;
    border-top: 1px solid var(--line);
    border-left: 2px solid var(--acc);
  }

  .hcard-accent {
    display: none;
  }

  .hcard-num {
    display: none;
  }

  .hcard-year {
    position: static;
    display: block;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    position: relative;
    z-index: 3;
    top: auto;
    right: auto;
    display: inline-flex;
    align-items: center;
    margin-top: 22px;
    padding: 7px 14px;
    color: var(--acc-glow);
    background: rgba(11, 17, 29, .92);
    border: 1px solid rgba(56, 189, 248, .4);
    border-radius: 999px;
  }

  .hcard-body {
    max-width: none;
  }

  .stack-head {
    padding: 0 var(--gut) 28px;
    border-bottom: 0;
  }

  .stack-area {
    position: static;
    overflow: visible;
  }

  .stack-item {
    position: static;
    display: block;
    padding: 0 var(--gut) 16px;
    transform: none !important;
    opacity: 1 !important;
  }

  .stack-card {
    max-width: none;
    grid-template-columns: 1fr;
    border-top-color: var(--acc);
  }

  .stack-num {
    color: var(--acc-glow);
    font-size: 32px;
    margin-bottom: 14px;
  }

  .stack-side {
    align-items: flex-start;
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid var(--line);
  }
}

@media (max-width:860px) {
  .nav-toggle {
    display: flex;
  }

  .nav .nav-cta {
    display: none;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 230;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 26px;
    background: rgba(2, 5, 11, .97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .38s var(--ease), visibility .38s;
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links a {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(24px, 7vw, 38px);
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--fg);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .case-stats {
    grid-template-columns: 1fr;
  }

  .phil-grid,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 34px 1fr;
  }

  .timeline-date {
    grid-column: 2;
    padding-top: 12px;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .hero {
    justify-content: flex-end;
  }

  .hero-place {
    display: none;
  }

  .hero-scroll {
    display: none;
  }

  .hero-rule {
    left: calc(var(--gut) - 10px);
  }

  .hero-bg img {
    object-position: 66% top;
  }

  .hero-veil {
    background:
      linear-gradient(to top, rgba(0, 0, 0, .96) 12%, rgba(2, 5, 11, .45) 58%, rgba(2, 5, 11, .65) 100%),
      linear-gradient(to right, rgba(0, 0, 0, .75) 0%, rgba(2, 5, 11, .35) 60%, rgba(2, 5, 11, .6) 100%);
  }

  .case-next {
    flex-direction: column;
    align-items: flex-start;
  }

  .case-hero-num {
    display: none;
  }
}

@media (max-width:560px) {
  .about-stats {
    grid-template-columns: 1fr;
  }

  .hero-blurb {
    display: none;
  }

  .case-gallery {
    aspect-ratio: 4/3;
  }

  .btn {
    padding: 12px 20px;
    font-size: 11.5px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .marquee-track {
    animation: none;
  }

  .hero-status .dot,
  .status-badge .dot {
    animation: none;
  }

  * {
    transition-duration: .01ms !important;
  }
}

/* ---------- Line masks for load-in reveals ---------- */
.mask {
  overflow: hidden;
  display: block;
}

/* ---------- Device mockup inside each case card ---------- */
.hcard-device {
  position: absolute;
  right: clamp(28px, 7vw, 110px);
  bottom: 4%;
  width: clamp(230px, 26vw, 370px);
  z-index: 2;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .8));
  pointer-events: none;
  transition: transform .6s var(--ease);
}

.hcard.on .hcard-device {
  transform: translateY(-10px);
}

@media (max-width:900px) {
  .hcard-device {
    display: none;
  }
}