/* ============ TOKENS ============ */
:root {
  --paper: #ffffff; /* warm document cream */
  --paper-2: #ece8dc; /* faint panel */
  --ink: #1a1613; /* warm near-black */
  --ink-soft: #6c6456; /* muted meta */
  --line: #d8d1bf; /* hairline */
  --seal: #a5162a; /* E-BEY stamp red */
  --seal-deep: #78101e; /* pressed red */
  --seal-tint: #efe2dd; /* red wash on paper */

  --f-disp: 'Bricolage Grotesque', Georgia, serif;
  --f-body: 'Inter', system-ui, sans-serif;
  --f-mono: 'Space Mono', ui-monospace, monospace;

  --pad: clamp(20px, 5vw, 72px);
  --maxw: 1500px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
html.js-smooth {
  scroll-behavior: auto;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
::selection {
  background: var(--seal);
  color: var(--paper);
}

/* film grain / paper texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  mix-blend-mode: multiply;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.mono {
  font-family: var(--f-mono);
  letter-spacing: 0.04em;
}
.up {
  text-transform: uppercase;
}

/* ============ TOP BAR ============ */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px var(--pad);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.35s ease;
}
.topbar.scrolled {
  box-shadow: 0 1px 14px rgba(26, 22, 19, 0.09);
}
.topbar .brand {
  font-weight: 700;
}
.topbar .brand b {
  color: var(--seal);
}
.topbar .right {
  display: flex;
  gap: 22px;
  align-items: center;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--seal);
  display: inline-block;
  box-shadow: 0 0 0 0 var(--seal);
  animation: pulse 2.6s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(165, 22, 42, 0.5);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(165, 22, 42, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(165, 22, 42, 0);
  }
}
.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.menu-btn:hover {
  color: var(--seal);
}

/* ============ SIDE COUNTER RAIL ============ */
.rail {
  position: fixed;
  left: var(--pad);
  bottom: 26px;
  z-index: 110;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 6px 18px rgba(26, 22, 19, 0.08);
  will-change: bottom;
}
.rail b {
  color: var(--ink);
}
.rail .bar {
  width: 120px;
  height: 1px;
  background: var(--line);
  margin-top: 8px;
  position: relative;
}
.rail .bar i {
  position: absolute;
  left: 0;
  top: 0;
  height: 1px;
  background: var(--seal);
  width: 0%;
}

/* ============ SHELL ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
}
section {
  padding: clamp(70px, 11vh, 150px) var(--pad);
  position: relative;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--seal);
  margin-bottom: 34px;
}
.eyebrow .num {
  color: var(--ink);
}
.eyebrow .rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.eyebrow .en {
  color: var(--ink-soft);
  letter-spacing: 0.1em;
}

/* reveal primitive: line masks up */
.reveal {
  overflow: hidden;
  display: block;
}
.reveal > * {
  display: block;
  transform: translateY(115%);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.in .reveal > *,
.reveal.in > * {
  transform: translateY(0);
}
.fade {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.in .fade,
.fade.in {
  opacity: 1;
  transform: none;
}
.d1 {
  transition-delay: 0.08s;
}
.d2 {
  transition-delay: 0.16s;
}
.d3 {
  transition-delay: 0.24s;
}
.d4 {
  transition-delay: 0.32s;
}
.d5 {
  transition-delay: 0.4s;
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 120px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}
.hero-copy {
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: clamp(2.9rem, 8.2vw, 8.2rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0;
}
.hero h1 .q {
  color: var(--seal);
}
.hero .kicker {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--seal);
  margin-bottom: 26px;
}
.hero .lede {
  max-width: 52ch;
  margin-top: 30px;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.6;
}
.hero .lede b {
  color: var(--ink);
  font-weight: 600;
}
.hero-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 26px 40px;
  align-items: center;
  margin-top: 46px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero-foot .clock b {
  color: var(--ink);
}
.scrollcue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.scrollcue .ln {
  width: 44px;
  height: 1px;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}
.scrollcue .ln::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--seal);
  animation: swipe 2.1s infinite;
}
@keyframes swipe {
  0% {
    transform: translateX(-100%);
  }
  55% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* ============ HERO PORTRAIT (banner) ============ */
.hero-portrait {
  position: relative;
  z-index: 0;
  flex: none;
  justify-self: end;
  pointer-events: none;
  width: clamp(280px, 34vw, 600px);
  margin-left: clamp(-90px, -8vw, -30px);
}
.hero-portrait img {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
  animation: press 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes press {
  0% {
    opacity: 0;
    transform: scale(1.14) rotate(-7deg);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-portrait img {
    animation: none;
    opacity: 1;
  }
}

/* ============ MARQUEE ============ */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  overflow: hidden;
  white-space: nowrap;
  background: var(--paper);
}
.ticker .track {
  display: inline-flex;
  gap: 0;
  animation: marq 34s linear infinite;
  will-change: transform;
}
.ticker:hover .track {
  animation-play-state: paused;
}
.ticker span {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.5vw, 2.1rem);
  letter-spacing: -0.01em;
  padding: 0 34px;
  display: inline-flex;
  align-items: center;
  gap: 34px;
}
.ticker span::after {
  content: '✶';
  color: var(--seal);
  font-size: 0.7em;
}
@keyframes marq {
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ticker .track {
    animation: none;
  }
}

/* ============ PROFILE ============ */
.profile-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(30px, 5vw, 90px);
  align-items: start;
}
.profile h2 {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
}
.profile h2 em {
  font-style: normal;
  color: var(--seal);
}
.profile .body p {
  margin: 0 0 18px;
  color: var(--ink);
  max-width: 56ch;
}
.profile .body .stamp {
  color: var(--seal);
  font-weight: 600;
}
.aitools {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.aitools b {
  color: var(--ink);
}

/* ============ EXPERIENCE LIST ============ */
.work {
  border-top: 1px solid var(--line);
}
.work .row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 30px 6px;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding-left 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}
.work .row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--seal-tint);
  z-index: -1;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.work .row:hover {
  padding-left: 26px;
}
.work .row:hover::before {
  width: 100%;
}
.work .row .idx {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--seal);
  padding-top: 8px;
}
.work .role {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.6vw, 2.15rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.work .org {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-top: 6px;
}
.work .org b {
  color: var(--ink);
  font-weight: 600;
}
.work .meta {
  text-align: right;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-transform: uppercase;
  white-space: nowrap;
  padding-top: 6px;
}
.work .meta .yr {
  color: var(--ink);
  display: block;
}
.work .detail {
  grid-column: 2/4;
  opacity: 1;
  margin-top: 16px;
}
.work .detail ul {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 40px;
}
.work .detail li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.5;
  break-inside: avoid;
}
.work .detail li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--seal);
}
.work .tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.work .tags a,
.work .tags span {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--ink-soft);
}
.work .tags a:hover {
  border-color: var(--seal);
  color: var(--seal);
}

/* ---- project brand cards with website / instagram links ---- */
.projects {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.projects .plabel {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--seal);
  margin-bottom: 12px;
}
.brands {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.brand-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  transition:
    border-color 0.3s ease,
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease;
}
.brand-card .bn {
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-card .bf {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
}
.brand-card .links {
  display: inline-flex;
  gap: 6px;
  margin-left: 2px;
}
.brand-card .lk {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  transition: all 0.28s ease;
}
.brand-card .lk svg {
  width: 13px;
  height: 13px;
  display: block;
}
.brand-card .lk:hover {
  background: var(--seal);
  border-color: var(--seal);
  color: #fff;
}
.brand-card:hover {
  border-color: var(--seal);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(26, 22, 19, 0.07);
}
.brand-card.nolink {
  opacity: 0.75;
}

/* ============ SKILLS ============ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.skills-grid .cell {
  background: var(--paper);
  padding: 22px 20px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background 0.35s ease;
}
.skills-grid .cell:hover {
  background: var(--seal-tint);
}
.skills-grid .cell .k {
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--seal);
  letter-spacing: 0.08em;
}
.skills-grid .cell .v {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-top: auto;
}

/* ============ SEAL DIVIDER (logo, mid-page) ============ */
.seal-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: clamp(35px, 4.9vw, 63px) var(--pad) clamp(14px, 2.8vw, 35px);
}
.seal-divider .cap {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.seal-divider .cap b {
  color: var(--seal);
}
.seal {
  position: relative;
  width: clamp(195px, 21vw, 300px);
  aspect-ratio: 1;
}
.seal .ring {
  position: absolute;
  inset: 0;
  animation: spin 30s linear infinite;
  pointer-events: none;
}
.seal .ring circle {
  fill: none;
  stroke: var(--seal);
  opacity: 0.42;
}
.seal .ring .ticks {
  stroke: var(--seal);
  stroke-width: 1.4;
  opacity: 0.5;
  stroke-linecap: round;
}
.seal .core {
  position: absolute;
  inset: 9%;
  display: grid;
  place-items: center;
}
.seal .core img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  mix-blend-mode: multiply;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .seal .ring {
    animation: none;
  }
}

/* ============ ACHIEVEMENTS ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.stat {
  background: var(--paper);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(28px, 4vw, 54px) clamp(22px, 3vw, 44px);
}
.stat .n {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.stat .n .u {
  color: var(--seal);
}
.stat .l {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 0.96rem;
  max-width: 34ch;
}
.stat .l b {
  color: var(--ink);
  font-weight: 600;
}

/* ============ EDUCATION / LANGUAGES ============ */
.two {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(30px, 5vw, 80px);
  align-items: start;
}
.edu-item {
  padding: 22px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
}
.edu-item:last-child {
  border-bottom: 1px solid var(--line);
}
.edu-item .yr {
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  white-space: nowrap;
  padding-top: 5px;
}
.edu-item .deg {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.edu-item .sch {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-top: 4px;
}
.edu-item .sch b {
  color: var(--seal);
}
.langs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.lang {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.lang .name b {
  font-weight: 600;
}
.lang .name span {
  color: var(--ink-soft);
  font-family: var(--f-mono);
  font-size: 11px;
  margin-left: 8px;
}
.pips {
  display: flex;
  gap: 5px;
}
.pip {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--seal);
}
.pip.on {
  background: var(--seal);
}

/* ============ CONTACT ============ */
.contact {
  padding-bottom: clamp(90px, 14vh, 180px);
}
.contact h2 {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 6.5rem);
  line-height: 0.94;
  letter-spacing: -0.025em;
  margin: 0 0 40px;
}
.contact h2 .q {
  color: var(--seal);
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 16px 30px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.cta .arw {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.cta:hover {
  background: var(--seal);
  border-color: var(--seal);
  color: var(--paper);
}
.cta:hover .arw {
  transform: translateX(6px);
}
.contact-rows {
  margin-top: 56px;
  border-top: 1px solid var(--line);
}
.crow {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.4s ease;
}
.crow:hover {
  padding-left: 14px;
}
.crow .k {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--seal);
}
.crow .v {
  font-family: var(--f-disp);
  font-weight: 500;
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  letter-spacing: -0.01em;
}
.crow .go {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
}

/* ============ FOOTER ============ */
.foot {
  padding: 20px var(--pad);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--paper);
}
.foot b {
  color: var(--ink);
}
.foot .seal-red {
  color: var(--seal);
}

/* ============ MENU OVERLAY ============ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--paper);
  transform: translateY(-100%);
  transition: transform 0.7s cubic-bezier(0.76, 0, 0.24, 1);
  display: flex;
  flex-direction: column;
  padding: var(--pad);
}
.overlay.open {
  transform: translateY(0);
}
.overlay .ohead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.overlay nav {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.overlay nav a {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: clamp(2rem, 8vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 20px;
  color: var(--ink);
  transition:
    color 0.3s ease,
    padding-left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.overlay nav a .n {
  font-family: var(--f-mono);
  font-size: 14px;
  color: var(--seal);
}
.overlay nav a:hover {
  color: var(--seal);
  padding-left: 18px;
}
.overlay .ofoot {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.overlay .ofoot a:hover {
  color: var(--seal);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-portrait {
    justify-self: center;
    order: -1;
    margin: 0 auto 20px;
    width: min(340px, 75vw);
    max-width: 100%;
  }
  .hero-portrait img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }
}
@media (max-width: 900px) {
  .profile-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .two {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .work .row {
    grid-template-columns: 34px 1fr;
    gap: 14px;
  }
  .work .meta {
    grid-column: 2;
    text-align: left;
    padding-top: 2px;
  }
  .work .detail {
    grid-column: 1/3;
  }
  .work .detail ul {
    columns: 1;
  }
  .work .row:hover .detail,
  .work .detail {
    max-height: none;
    opacity: 1;
    margin-top: 14px;
  } /* tap-friendly: always show on small */
  .work .row:hover {
    padding-left: 6px;
  }
  .crow {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .crow .go {
    display: none;
  }
  .rail {
    display: none;
  }
  .topbar .right .status {
    display: none;
  }
  .axis-track {
    display: none;
  }
}
@media (max-width: 520px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .hero-foot {
    gap: 16px 26px;
  }
}

/* ============ LENIS SMOOTH SCROLL ============ */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

/* ============ VERTICAL AXIS LINE & NODE TRACKER ============ */
.axis-track {
  position: fixed;
  left: clamp(10px, 2vw, 28px);
  top: 0;
  bottom: 0;
  width: 2px;
  z-index: 100;
  pointer-events: none;
}
.axis-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: rgba(216, 209, 191, 0.4);
}
.axis-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--seal);
  box-shadow: 0 0 8px rgba(165, 22, 42, 0.4);
}
.axis-node {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--seal);
  background: var(--paper);
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(26, 22, 19, 0.08);
  will-change: transform;
  transition: opacity 0.3s ease;
}
.axis-node .bracket {
  color: var(--ink-soft);
}
.axis-node .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--seal);
  box-shadow: 0 0 6px var(--seal);
}

/* ============ WORK LAVALAMP & PINNED EXPANSION ============ */
.work {
  position: relative;
}
.work-lavalamp {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 0;
  background: var(--seal-tint);
  border-left: 3px solid var(--seal);
  border-radius: 0 8px 8px 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.work-lavalamp.active {
  opacity: 1;
}
.work .row {
  position: relative;
  z-index: 1;
}
.work .row.is-active {
  padding-left: 26px;
}
.work .row.is-active::before {
  width: 100%;
}

/* ============ MOTION UTILITIES ============ */
.magnet-btn {
  will-change: transform;
  transition: transform 0.15s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal > * {
    transform: none !important;
  }
  .fade {
    opacity: 1 !important;
    transform: none !important;
  }
  .axis-track {
    display: none !important;
  }
}
