/* Kage portfolio
   Change the five theme tokens and the rest of the page follows. */

:root {
  --primary-color: #1a2744;
  --secondary-color: #ffffff;
  --accent-color: #f15c24;
  --background-color: #fffaf6;
  --text-color: #1a2744;

  --ink: var(--background-color);
  --ink-2: #fff1e8;
  --bone: var(--text-color);
  --bone-dim: rgba(26, 39, 68, .72);
  --muted: #8a7568;
  --card-ink: #1a2744;
  --card-label: #a15a3a;
  --line: rgba(26, 39, 68, .14);
  --line-soft: rgba(26, 39, 68, .08);
  --vermilion: var(--accent-color);
  --ember: #c2410c;
  --gold: #e24b12;
  --pad: clamp(20px, 3.4vw, 56px);
  --nav-h: 84px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
  color-scheme: light;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: 'Onest', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; height: 100vh; }
::selection { background: #f15c24; color: #fffaf6; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--vermilion); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 200;
  padding: 8px 14px;
  background: var(--bone);
  color: var(--ink);
}
.skip:focus { top: 16px; }

#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  background: var(--ink);
}
#grain {
  position: fixed;
  inset: -1px;
  z-index: 60;
  pointer-events: none;
  opacity: .08;
  mix-blend-mode: multiply;
  background-repeat: repeat;
  background-size: 180px 180px;
}
#vignette {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  background: radial-gradient(125% 95% at 50% 42%, transparent 55%, rgba(241, 92, 36, .1) 100%);
}
.page { position: relative; z-index: 10; overflow-x: clip; }

#shift {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .5s var(--ease), visibility .5s;
}
#shift.on { opacity: 1; visibility: visible; pointer-events: auto; }
.shift-in { width: min(420px, 74vw); text-align: center; }
.shift-name {
  margin: 0 0 20px;
  font-size: 12px;
  letter-spacing: .5em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
#shift .pre-mark { margin: 0 auto 22px; }

.eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--bone-dim);
  text-shadow: none;
}
h1, h2, h3 { font-weight: 400; margin: 0; letter-spacing: -.005em; }
.display {
  text-transform: uppercase;
  line-height: 1.02;
  letter-spacing: -.02em;
  font-weight: 400;
  text-shadow: none;
}
.h-hero { font-size: clamp(48px, 6.6vw, 108px); }
.h-hero .mask-line:first-child { color: var(--accent-color); }
.h-sec { font-size: clamp(30px, 4vw, 60px); }
.body-lg {
  font-size: clamp(15px, 1.16vw, 19px);
  line-height: 1.66;
  color: rgba(26, 39, 68, .78);
  text-shadow: none;
}
.body {
  font-size: 14px;
  line-height: 1.68;
  color: rgba(26, 39, 68, .66);
  font-weight: 300;
  text-shadow: none;
}
.num {
  font-size: clamp(26px, 2.5vw, 36px);
  font-weight: 300;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

[data-rv] { opacity: 0; }
[data-rv="up"] { transform: translate3d(0, 26px, 0); }
[data-rv="fade"] { transform: none; }
[data-rv].rv-in {
  opacity: 1;
  transform: none;
  transition: opacity .9s var(--ease-out), transform 1.05s var(--ease-out);
}
.mask-line { display: block; overflow: hidden; }
.mask-line > span {
  display: block;
  transform: translate3d(0, 110%, 0);
  transition: transform 1.05s var(--ease-out);
}
.rv-in .mask-line > span,
.mask-line.rv-in > span { transform: none; }

#pre {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .8s var(--ease), visibility .8s;
}
#pre.done { opacity: 0; visibility: hidden; pointer-events: none; }
.pre-in { width: min(420px, 74vw); text-align: center; }
.pre-mark { margin: 0 auto 26px; width: 44px; height: 44px; }
.pre-mark svg { width: 100%; height: 100%; display: block; }
.pre-name {
  font-size: 12px;
  letter-spacing: .5em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: 20px;
}
.pre-bar { position: relative; height: 1px; background: rgba(26, 39, 68, .14); overflow: hidden; }
.pre-bar i {
  position: absolute;
  inset: 0 100% 0 0;
  background: var(--bone);
  transition: right .35s linear;
}
.pre-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.pre-meta b { font-weight: 500; color: var(--bone-dim); font-variant-numeric: tabular-nums; }

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--vw, 100%);
  height: var(--nav-h);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 var(--pad);
  transition: transform .55s var(--ease);
}
.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: #fffaf6;
  opacity: 1;
}
.nav::after {
  content: '';
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: 0;
  height: 1px;
  background: var(--line-soft);
  opacity: 0;
  transition: opacity .5s;
}
.nav.stuck::after { opacity: 1; }
.nav.hide { transform: translate3d(0, -101%, 0); }
.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand svg { width: 34px; height: 34px; display: block; }
.brand-tx { display: flex; flex-direction: column; line-height: 1; gap: 3px; }
.brand-tx b { font-size: 12px; font-weight: 500; letter-spacing: .26em; }
.brand-tx i { font-style: normal; font-size: 8px; letter-spacing: .34em; color: var(--muted); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  height: 46px;
  padding: 5px;
  border-radius: 14px;
  border: 1px solid rgba(26, 39, 68, .1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .45) 42%),
    rgba(255, 250, 246, .78);
  box-shadow: 0 10px 24px rgba(26, 39, 68, .08), inset 0 1px rgba(255, 255, 255, .9);
}
.nav-link {
  position: relative;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(26, 39, 68, .55);
  display: block;
  height: 36px;
  line-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  overflow: hidden;
  white-space: nowrap;
  background: transparent;
  transition: color .18s var(--ease), background .2s var(--ease), border-color .2s;
}
.nav-link span {
  display: block;
  height: 36px;
  line-height: 36px;
  transition: transform .45s var(--ease-out), color .18s;
}
.nav-link .alt {
  position: absolute;
  inset: 0;
  transform: translate3d(0, 100%, 0);
  color: #fffaf6;
  letter-spacing: .22em;
}
.nav-link:hover,
.nav-link.on {
  color: #fffaf6;
  background: #f15c24;
  box-shadow: 0 8px 18px rgba(241, 92, 36, .28);
}
.nav-link.on::after { content: none; }
.nav-burger {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  position: relative;
  flex: 0 0 auto;
}
.nav-burger i {
  position: absolute;
  right: 9px;
  height: 1.5px;
  background: var(--bone);
  transition: width .45s var(--ease-out), transform .45s var(--ease-out), top .45s var(--ease-out);
}
.nav-burger i:nth-child(1) { top: 17px; width: 26px; }
.nav-burger i:nth-child(2) { top: 25px; width: 17px; }
.nav-burger:hover i:nth-child(2) { width: 26px; }
.nav-burger:hover i:nth-child(1) { width: 17px; }

.hero {
  position: relative;
  min-height: 100svh;
  padding: 0 var(--pad);
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}
.hero::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  pointer-events: none;
  background:
    radial-gradient(72% 44% at 50% 118%, rgba(241, 92, 36, .16) 0%, rgba(241, 92, 36, .05) 42%, transparent 74%),
    linear-gradient(180deg, transparent 58%, rgba(241, 92, 36, .04) 100%);
}
.hero-top {
  padding-top: calc(var(--nav-h) + clamp(18px, 3vh, 40px));
  max-width: min(640px, 52vw);
  position: relative;
  z-index: 2;
}
.hero-top .eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.hero-top .eyebrow .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--vermilion);
  box-shadow: 0 0 10px var(--vermilion);
}
.hero h1 { margin-bottom: 16px; }
.tagline {
  margin: 0 0 12px;
  max-width: 22ch;
  font-size: clamp(16px, 1.4vw, 22px);
  line-height: 1.45;
  color: var(--bone);
  font-weight: 300;
}
.hero-sub { max-width: min(46ch, 100%); margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.socials { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; }
.socials a {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--bone-dim);
  transition: color .35s;
}
.socials a:hover { color: var(--bone); }
.hero-spacer { flex: 1 1 auto; min-height: clamp(72px, 12vh, 160px); }
.hero-foot { padding-bottom: clamp(22px, 4vh, 42px); position: relative; z-index: 2; }
.hero-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 9px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-cue .track { width: 54px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.hero-cue .track i {
  position: absolute;
  inset: 0;
  background: var(--bone);
  transform-origin: left;
  animation: cue 2.8s var(--ease-io) infinite;
}
@keyframes cue {
  0% { transform: scaleX(0); }
  42% { transform: scaleX(1); }
  100% { transform: scaleX(1) translateX(100%); }
}
.chapters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 28px);
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
}
@media (min-width: 901px) {
  .chapters { padding-right: calc(clamp(150px, 16vw, 240px) + 36px); }
}
.chip { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.chip .num { line-height: 1; font-size: clamp(28px, 2.6vw, 42px); transition: color .4s, transform .5s var(--ease-out); }
.chip b {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: 4px;
  transition: color .4s;
}
.chip p { margin: 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.chip:hover .num { color: var(--ember); transform: translate3d(0, -2px, 0); }
.chip:hover b { color: var(--bone); }

.peek {
  position: absolute;
  z-index: 2;
  right: var(--pad);
  bottom: clamp(28px, 6vh, 72px);
  width: clamp(150px, 16vw, 240px);
  display: block;
  transition: transform .8s var(--ease-out);
}
.peek-fr {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  outline: 1px solid rgba(26, 39, 68, .12);
  outline-offset: -1px;
  box-shadow: 0 34px 70px -30px rgba(0, 0, 0, .9);
  background: var(--secondary-color);
}
.peek-fr img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.peek:hover { transform: translate3d(0, -5px, 0); }
.peek:hover img { transform: scale(1.04); }
.peek-cap { display: flex; flex-direction: column; gap: 4px; margin-top: 9px; width: 100%; min-width: 0; }
.peek-cap b,
.peek-cap i {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.peek-cap b { font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--bone-dim); }
.peek-cap i { font-style: normal; font-size: 10px; letter-spacing: .12em; line-height: 1.45; text-transform: uppercase; color: var(--muted); }
.hero-side {
  position: absolute;
  z-index: 2;
  right: var(--pad);
  top: calc(var(--nav-h) + clamp(8px, 2vh, 28px));
  pointer-events: none;
}
.hero-side .v {
  writing-mode: vertical-rl;
  font-size: clamp(12px, 1.1vw, 15px);
  letter-spacing: .42em;
  text-transform: uppercase;
  color: rgba(26, 39, 68, .55);
}
.word-fb { display: none; }

.sec { position: relative; padding: clamp(88px, 14vh, 170px) var(--pad); overflow-x: clip; }
.sec::before {
  content: '';
  position: absolute;
  inset: -8% -4%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(80% 55% at 18% 0%, rgba(241, 92, 36, .08), transparent 70%);
}
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: clamp(28px, 4.5vh, 56px);
}
.sec-head .k {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.sec-head .k b { color: var(--vermilion); font-weight: 500; }
.rule { flex: 1 1 auto; height: 1px; background: var(--line-soft); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
.portrait {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  outline: 1px solid var(--line);
  outline-offset: -1px;
  background: var(--secondary-color);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.about-copy .lead { margin: 0 0 16px; }
.about-copy .body { margin: 0 0 14px; }
.about-note {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--bone-dim);
}
.plates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(36px, 6vh, 72px);
}
.plate {
  min-height: 160px;
  padding: 26px 24px;
  color: var(--card-ink);
  background: var(--secondary-color);
  border: 0;
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(26, 39, 68, .08);
  transition: transform .55s var(--ease-out), box-shadow .6s var(--ease);
}
.plate:hover {
  border-color: transparent;
  transform: translate3d(0, -6px, 0);
  box-shadow: 0 28px 56px rgba(26, 39, 68, .12);
}
.plate span {
  display: block;
  margin-bottom: 12px;
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--card-label);
}
.plate p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--card-ink); }
.gate-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(36px, 6vh, 72px);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.gate-stats div { min-height: 108px; padding: 20px 18px; border-left: 1px solid var(--line-soft); }
.gate-stats div:last-child { border-right: 1px solid var(--line-soft); }
.gate-stats b {
  display: block;
  font-size: clamp(22px, 2.1vw, 32px);
  font-weight: 300;
  letter-spacing: -.02em;
}
.gate-stats span {
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}

.cur { border-top: 1px solid var(--line-soft); }
.les {
  position: relative;
  display: grid;
  align-items: center;
  grid-template-columns: 64px minmax(0, .9fr) minmax(0, 1.3fr) minmax(120px, .7fr);
  gap: clamp(12px, 2vw, 32px);
  padding: clamp(18px, 2.2vw, 28px) 0;
  border-bottom: 1px solid var(--line-soft);
  transition: padding .5s var(--ease-out);
}
.les::before {
  content: '';
  position: absolute;
  left: calc(var(--pad) * -1);
  right: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(241, 92, 36, .12), transparent 48%);
  opacity: 0;
  transition: opacity .55s var(--ease);
  pointer-events: none;
}
.les:hover::before { opacity: 1; }
.les:hover { padding-left: clamp(8px, 1.2vw, 18px); }
.les .k { font-size: 11px; letter-spacing: .16em; color: var(--muted); font-variant-numeric: tabular-nums; }
.les:hover .k { color: var(--vermilion); }
.les h3 { font-size: clamp(16px, 1.45vw, 22px); }
.les p { margin: 0; font-size: 13px; line-height: 1.55; color: rgba(26, 39, 68, .72); }
.les .t { text-align: right; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.les .bar {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: 100%;
  background: var(--vermilion);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .7s var(--ease-out);
}
.les:hover .bar { transform: scaleX(1); }

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.svc {
  position: relative;
  min-height: 210px;
  padding: 26px 24px;
  color: var(--card-ink);
  background: var(--secondary-color);
  border: 0;
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(26, 39, 68, .08);
  overflow: hidden;
  transition: transform .55s var(--ease-out), box-shadow .6s var(--ease);
}
.svc:hover {
  transform: translate3d(0, -8px, 0);
  box-shadow: 0 28px 56px rgba(26, 39, 68, .12);
}
.svc-ico { display: block; width: 28px; height: 28px; margin-bottom: 28px; color: #f15c24; }
.svc-ico svg { width: 28px; height: 28px; display: block; }
.svc h3 { font-size: 18px; margin-bottom: 10px; color: var(--card-ink); }
.svc p { margin: 0; font-size: 13px; line-height: 1.6; color: rgba(26, 39, 68, .72); }
.svc::after {
  content: '';
  position: absolute;
  left: 22px;
  bottom: 0;
  width: 36px;
  height: 1px;
  background: var(--vermilion);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--ease-out);
}
.svc:hover::after { transform: scaleX(1); }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 28px);
  align-items: start;
}
.card { position: relative; perspective: 900px; }
.card:nth-child(2) { transform: translateY(clamp(28px, 4vw, 64px)); }
.card:nth-child(3) { transform: translateY(clamp(56px, 8vw, 120px)); }
.card-fr {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 28px;
  outline: 0;
  background: var(--secondary-color);
  isolation: isolate;
  box-shadow: 0 18px 44px rgba(26, 39, 68, .1);
  transform-style: preserve-3d;
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease);
}
.card.is-tilt .card-fr { transition: box-shadow .5s; }
.card:hover .card-fr { box-shadow: 0 28px 60px rgba(26, 39, 68, .14); }
.card-fr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease-out);
}
.card:hover .card-fr img { transform: scale(1.05); }
.card-fr::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 42%, rgba(255, 250, 246, .88));
  pointer-events: none;
}
.glow {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  left: var(--gx);
  top: var(--gy);
  width: calc(var(--gr) * 2);
  aspect-ratio: 1;
  translate: -50% -50%;
  mix-blend-mode: normal;
  animation: glow-swell var(--gt2) var(--ease-io) infinite alternate;
}
.glow::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--gc1), var(--gc2) 40%, transparent 72%);
  animation: glow-pulse var(--gt) var(--ease-io) infinite;
}
@keyframes glow-swell { from { transform: scale(.93); } to { transform: scale(1.07); } }
@keyframes glow-pulse { from { opacity: .78; } 50% { opacity: 1; } to { opacity: .78; } }
.card-lab {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-end;
}
.card-lab b { font-size: clamp(16px, 1.4vw, 22px); font-weight: 400; letter-spacing: .04em; text-transform: uppercase; }
.card-lab b { color: var(--card-ink); }
.card-lab span { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--card-label); }
.card-body { padding-top: 14px; }
.card-body p { margin: 0 0 12px; font-size: 14px; line-height: 1.6; color: rgba(26, 39, 68, .72); }
.tech { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 14px; padding: 0; }
.tech li {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bone-dim);
  border: 1px solid var(--line);
  padding: 5px 8px;
}
.card-links { display: flex; gap: 18px; }
.card-links a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bone);
  border-bottom: 1px solid transparent;
  transition: border-color .35s, color .35s;
}
.card-links a:hover { border-bottom-color: var(--vermilion); color: var(--ember); }

.timeline { position: relative; border-top: 1px solid var(--line-soft); }
.timeline::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.tl {
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  padding: 28px 0 28px 28px;
  border-bottom: 1px solid var(--line-soft);
}
.tl::before {
  content: '';
  position: absolute;
  left: 0;
  top: 38px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vermilion);
  box-shadow: 0 0 12px var(--vermilion);
}
.tl-year {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-color);
  padding-top: 6px;
}
.tl h3 { font-size: clamp(20px, 2vw, 28px); margin-bottom: 6px; }
.place { margin: 0 0 12px; color: var(--bone-dim); font-size: 14px; }
.tl ul { margin: 0 0 12px; padding-left: 16px; color: var(--text-color); font-size: 15px; line-height: 1.55; }
.tl li + li { margin-top: 8px; }
.subjects, .tech-line {
  margin: 0;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
}
.role { margin: 0 0 4px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--ember); }

.resume-lead { max-width: 42ch; margin: 0 0 18px; }
#experience-lead { color: var(--text-color); max-width: 58ch; }
.resume-layout {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  gap: clamp(24px, 3.5vw, 48px);
  align-items: start;
}
.resume-mark {
  position: sticky;
  top: calc(var(--nav-h) + 12px);
  margin: 0;
}
.mark-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  overflow: hidden;
  background: #fffaf6;
  box-shadow: 0 18px 44px rgba(26, 39, 68, .1);
  touch-action: none;
  cursor: grab;
}
.mark-stage.is-drag { cursor: grabbing; }
.mark-stage canvas,
.resume-mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.mark-stage canvas { display: none; }
.mark-stage.is-live canvas { display: block; }
.mark-stage.is-live img { display: none; }
.resume-mark figcaption { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.resume-mark b { font-size: 18px; font-weight: 500; letter-spacing: -.01em; color: var(--text-color); }
.resume-mark span {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-color);
}
.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
  margin-top: 28px;
  align-items: start;
}
.resume-block.is-wide { grid-column: 1 / -1; }
.resume-block h3 {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-color);
}
.resume-block ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.resume-block li { font-size: 14px; color: rgba(26, 39, 68, .86); line-height: 1.4; }
.resume-block li span { display: block; font-size: 11px; letter-spacing: .06em; color: rgba(26, 39, 68, .62); margin-top: 1px; }
.resume-block.is-wide ul { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.resume-block.is-wide li {
  flex: 1 1 150px;
  max-width: 210px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(26, 39, 68, .06);
}

.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 48px;
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  overflow: hidden;
  color: #fffaf6;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  box-shadow: 0 12px 24px rgba(241, 92, 36, .28);
  transition: color .35s var(--ease), transform .45s var(--ease-out), box-shadow .4s var(--ease);
}
.cta i {
  position: absolute;
  inset: 0;
  background: #f15c24;
  transform: none;
  transition: background .35s var(--ease);
  z-index: -1;
}
.cta span, .cta svg { position: relative; z-index: 1; }
.cta:hover {
  color: #fffaf6;
  transform: translate3d(0, -3px, 0);
  box-shadow: 0 18px 36px rgba(26, 39, 68, .16);
}
.cta:hover i { background: #1a2744; }
.cta:hover svg path { stroke: #fffaf6; }
.cta:active { transform: translate3d(0, 0, 0); transition-duration: .1s; }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 90px);
  align-items: start;
}
.contact-id h2 { margin-bottom: 16px; }
.contact-list { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.contact-list span {
  display: block;
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.contact-list a, .contact-list p { margin: 0; font-size: 16px; color: var(--bone); }
#contact-phones { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.contact-list a { border-bottom: 1px solid transparent; transition: border-color .35s, color .35s; }
.contact-list a:hover { border-bottom-color: var(--vermilion); }

.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-color);
}
.field input, .field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--text-color);
  border-radius: 0;
  padding: 12px 0;
  color: var(--text-color);
  caret-color: var(--text-color);
  outline: none;
  transition: border-color .35s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--accent-color); }
.field .err {
  min-height: 1.2em;
  font-size: 12px;
  color: var(--ember);
  opacity: 0;
  transform: translate3d(0, -4px, 0);
  transition: opacity .35s, transform .35s var(--ease-out);
}
.field.bad input, .field.bad textarea { border-bottom-color: var(--vermilion); }
.field.bad .err { opacity: 1; transform: none; }
.form-status {
  min-height: 1.4em;
  margin: 0;
  font-size: 13px;
  color: var(--bone-dim);
}
.form.sent .cta { pointer-events: none; }

.foot {
  position: relative;
  padding: clamp(48px, 8vh, 90px) var(--pad) clamp(24px, 4vh, 40px);
  border-top: 1px solid var(--line-soft);
  overflow-x: clip;
}
.foot::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(rgba(255, 250, 246, .2), rgba(255, 244, 236, .82));
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, .6fr));
  gap: clamp(22px, 4vw, 48px);
}
.foot-brand {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-soft);
}
.foot-brand p {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(18px, 1.8vw, 28px);
  line-height: 1.35;
  color: var(--bone-dim);
}
.foot h4 {
  margin: 0 0 14px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.foot li a { font-size: 13px; color: rgba(26, 39, 68, .62); transition: color .35s; }
.foot li a:hover { color: #f15c24; }
.foot-base {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: clamp(32px, 5vh, 64px);
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.rail {
  position: fixed;
  right: calc(var(--pad) - 8px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.rail a, .rail button { width: 28px; height: 14px; display: grid; place-items: center; }
.rail i {
  display: block;
  width: 12px;
  height: 1px;
  background: rgba(26, 39, 68, .28);
  transition: .5s var(--ease-out);
}
.rail a.on i, .rail a:hover i,
.rail button.on i, .rail button:hover i { width: 22px; background: var(--bone); }

body[data-page]:not([data-page="home"]) .page > .sec:first-of-type {
  padding-top: calc(var(--nav-h) + clamp(28px, 5vh, 64px));
  min-height: 100svh;
}
body[data-page="resume"]:not([data-page="home"]) .page > .sec:first-of-type,
body[data-page="experience"]:not([data-page="home"]) .page > .sec:first-of-type {
  min-height: 0;
  padding-bottom: clamp(28px, 5vh, 56px);
}
body[data-page]:not([data-page="home"]) .page > .sec:first-of-type:not(:only-of-type) {
  min-height: 0;
  padding-bottom: clamp(28px, 4vh, 48px);
}
body[data-page]:not([data-page="home"]) .page > .sec:first-of-type + .sec {
  padding-top: 0;
}

html.is-arrive #pre { visibility: hidden; opacity: 0; }
html.is-arrive #veil {
  transform: none;
  visibility: visible;
  pointer-events: auto;
}

#veil {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: var(--ink);
  transform: translate3d(0, 101%, 0);
  visibility: hidden;
  pointer-events: none;
}
#veil.armed,
#veil.cover {
  visibility: visible;
  pointer-events: auto;
}
#veil.armed.enter {
  transform: none;
  transition: transform .22s var(--ease);
}
#veil.cover { transform: none; }
#veil.cover.lift {
  transform: translate3d(0, -101%, 0);
  transition: transform .28s var(--ease-out);
}
.veil-mark { width: 44px; height: 44px; }
.veil-mark svg { width: 100%; height: 100%; display: block; }
.veil-name {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.veil-line {
  width: min(220px, 46vw);
  height: 1px;
  background: rgba(26, 39, 68, .16);
  position: relative;
  overflow: hidden;
}
.veil-line i {
  position: absolute;
  inset: 0;
  background: var(--bone);
  transform: scaleX(0);
  transform-origin: left;
}
#veil.enter .veil-line i,
#veil.cover .veil-line i {
  transform: none;
  transition: transform .55s var(--ease-out) .12s;
}

.noscript {
  position: relative;
  z-index: 5;
  padding: 24px var(--pad);
  color: var(--bone-dim);
}

.no-webgl #gl { display: none; }
.no-webgl body, body.no-webgl {
  background:
    radial-gradient(70% 46% at 50% 118%, rgba(241, 92, 36, .18), transparent 70%),
    radial-gradient(40vw 28vw at 82% 8%, rgba(26, 39, 68, .06), transparent 68%),
    var(--ink);
  background-attachment: fixed;
}
.no-webgl .word-fb {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18%;
  z-index: 1;
  font-weight: 500;
  font-size: 14vw;
  line-height: .8;
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
  color: transparent;
  background: linear-gradient(rgba(241,92,36,.35), rgba(26,39,68,.12));
  -webkit-background-clip: text;
  background-clip: text;
}

@media (max-width: 1280px) {
  .nav-burger { display: block; }
  .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(84vw, 380px);
    margin: 0;
    padding: calc(var(--nav-h) + 18px) var(--pad) 34px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(255, 250, 246, .98);
    border-left: 1px solid var(--line-soft);
    transform: translate3d(100%, 0, 0);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .65s var(--ease-out), opacity .4s, visibility 0s linear .65s;
  }
  .nav.menu-open .nav-links {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }
  .nav-links .nav-link {
    width: 100%;
    height: auto;
    padding: 16px 0;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    border-bottom: 1px solid var(--line-soft);
    font-size: 18px;
    letter-spacing: .18em;
    line-height: 1.2;
  }
  .nav-links .nav-link span { height: auto; line-height: 1.2; transform: none !important; }
  .nav-links .nav-link .alt {
    position: static;
    display: block;
    margin-top: 4px;
    font-size: 10px;
    letter-spacing: .22em;
    color: var(--muted);
  }
  .nav.menu-open { transform: none; transition: none; }
  .nav-burger.active i:nth-child(1) { top: 21px; width: 26px; transform: rotate(45deg); }
  .nav-burger.active i:nth-child(2) { top: 21px; width: 26px; transform: rotate(-45deg); }
  html.nav-open, html.nav-open body { overflow: hidden; }
  .hero-top { max-width: none; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resume-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 250, 246, .94) 0 42%, rgba(255, 250, 246, .55) 68%, transparent 100%);
  }
  .about-grid, .contact-grid, .resume-layout { grid-template-columns: 1fr; }
  .resume-mark { position: static; max-width: 260px; }
  .portrait { max-width: 280px; }
  .plates { grid-template-columns: 1fr; }
  .les { grid-template-columns: 42px minmax(0, 1fr); }
  .les p, .les .t { display: none; }
  .cards { grid-template-columns: 1fr; }
  .card:nth-child(2), .card:nth-child(3) { transform: none; }
  .peek, .hero-side, .hero-cue, .rail { display: none; }
  .chapters { grid-template-columns: 1fr 1fr; }
  .gate-stats { grid-template-columns: 1fr 1fr; }
  .gate-stats div:nth-child(1),
  .gate-stats div:nth-child(2) { border-bottom: 1px solid var(--line-soft); }
  .tl { grid-template-columns: 1fr; gap: 8px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --nav-h: 72px; }
  .services, .resume-grid, .chapters, .foot-grid { grid-template-columns: 1fr; }
  .hero-actions .cta { width: 100%; }
  .gate-stats div { min-height: 88px; padding: 16px; }
  .h-hero { font-size: clamp(44px, 14vw, 72px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-rv] { opacity: 1 !important; transform: none !important; }
  .mask-line > span { transform: none !important; }
  .glow, .glow::before { animation: none; }
}
