:root {
  --bg: #0c0c0d;
  --bg-2: #141416;
  --fg: #f2efe8;
  --muted: #8d8a84;
  --line: rgba(242, 239, 232, 0.12);
  --accent: #ff4d2e;
  --lime: #e9ff70;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(16px, 4vw, 56px);
  --sans: "Inter Tight", system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em, .serif { font-family: var(--serif); font-style: italic; font-weight: 400; }
::selection { background: var(--accent); color: var(--bg); }

@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
}

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--accent); color: var(--bg);
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: var(--pad);
  transition: clip-path 1.1s var(--ease);
  clip-path: inset(0 0 0 0);
}
.loader.is-done { clip-path: inset(0 0 100% 0); }
.loader__count { font-size: clamp(80px, 18vw, 260px); font-weight: 800; line-height: .9; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.loader__count sup { font-size: .3em; vertical-align: top; }
.loader__name { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 3vw, 40px); }

/* ---------- Background field & grain ---------- */
.field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); } 20% { transform: translate(-5%,3%); }
  40% { transform: translate(4%,-6%); } 60% { transform: translate(-3%,5%); } 80% { transform: translate(6%,2%); }
}
main, .nav, .foot { position: relative; z-index: 1; }

/* ---------- Cursor ---------- */
.cursor, .cursor-dot { position: fixed; top: 0; left: 0; z-index: 95; pointer-events: none; display: none; }
body.has-cursor .cursor, body.has-cursor .cursor-dot { display: block; }
.cursor {
  width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  border: 1px solid rgba(242,239,232,.5);
  display: grid; place-items: center;
  transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), background .3s, border-color .3s;
  mix-blend-mode: difference;
}
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--fg); mix-blend-mode: difference; }
.cursor__label { font-size: 13px; font-weight: 600; color: var(--bg); opacity: 0; transform: scale(.5); transition: .3s var(--ease); white-space: nowrap; }
.cursor.is-hover { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: var(--fg); border-color: var(--fg); }
.cursor.is-hover .cursor__label { opacity: 1; transform: scale(1); }
.cursor.is-link { width: 70px; height: 70px; margin: -35px 0 0 -35px; background: var(--fg); }
.cursor.is-down { transform: scale(.8); }

/* hover image for experience */
.hover-img {
  position: fixed; top: 0; left: 0; z-index: 3; pointer-events: none;
  width: 340px; height: 240px; margin: -120px 0 0 -170px;
}
.hover-img__inner {
  width: 100%; height: 100%; border-radius: 14px; overflow: hidden;
  background-size: cover; background-position: center 30%;
  transform: scale(0) rotate(-8deg); opacity: 0;
  transition: transform .5s var(--ease), opacity .3s;
  display: grid; place-items: center;
  font-size: 54px; font-weight: 800; letter-spacing: -.04em; color: var(--bg);
}
.hover-img.is-on .hover-img__inner { transform: scale(1) rotate(0); opacity: 1; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--pad);
  mix-blend-mode: difference;
}
.nav__logo { font-weight: 800; font-size: 22px; letter-spacing: -.04em; display: inline-block; }
.nav__logo span { color: var(--accent); }
.nav__links { display: flex; gap: 28px; align-items: center; font-size: 14px; }
.nav__cta { padding: 10px 18px; border: 1px solid var(--fg); border-radius: 999px; display: inline-block; }
.link { position: relative; display: inline-block; }
.link::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.link:hover::after { transform: scaleX(1); transform-origin: left; }
@media (max-width: 720px) { .nav__links .link { display: none; } }

/* ---------- Common ---------- */
section { padding: 0 var(--pad); }
.label { font-size: 13px; color: var(--muted); letter-spacing: .02em; margin-bottom: 40px; }
.label--light { color: rgba(242,239,232,.75); }
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* split letters */
.line { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.1em; }
.word { display: inline-block; }
.char {
  display: inline-block; transform: translateY(110%);
  transition: transform 1.1s var(--ease);
  font-variation-settings: "wght" var(--w, 800);
  will-change: transform;
}
.is-ready .in .char, .in > .line .char, .in .char { transform: translateY(0); }
.char--space { width: .25em; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh; position: relative;
  display: grid; grid-template-rows: auto 1fr auto;
  padding-top: 110px; padding-bottom: 32px;
}
.hero__meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }

.hero__title {
  margin: 0; align-self: center; position: relative; z-index: 2;
  font-size: clamp(64px, 15.5vw, 260px); line-height: .86; letter-spacing: -.055em; font-weight: 800;
  pointer-events: none; user-select: none;
}
.hero__title .char { transition: transform 1.1s var(--ease), color .3s; }
.line--indent { padding-left: 14vw; }

.hero__photo {
  position: absolute; right: var(--pad); top: 50%;
  width: clamp(200px, 27vw, 420px); aspect-ratio: 4 / 5; margin: 0;
  transform: translateY(-46%);
  perspective: 900px; z-index: 1;
}
.hero__photo-inner {
  width: 100%; height: 100%; border-radius: 200px 200px 24px 24px; overflow: hidden; position: relative;
  transform-style: preserve-3d; transition: transform .2s linear;
  clip-path: inset(100% 0 0 0);
}
.is-ready .hero__photo-inner { clip-path: inset(0 0 0 0); transition: clip-path 1.4s var(--ease) .3s, transform .2s linear; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transform: scale(1.25); transition: transform 1.8s var(--ease) .3s, filter .6s; filter: grayscale(1) contrast(1.05); }
.is-ready .hero__photo img { transform: scale(1.08); }
.hero__photo:hover img { filter: grayscale(0); }
@media (hover: none) { .hero__photo img { filter: none; } }
.hero__photo-glare { position: absolute; inset: 0; background: radial-gradient(circle at var(--gx,50%) var(--gy,50%), rgba(255,255,255,.28), transparent 50%); mix-blend-mode: overlay; pointer-events: none; }

.hero__badge { position: absolute; left: -60px; bottom: -40px; width: 140px; height: 140px; display: grid; place-items: center; }
.hero__badge-ring { position: absolute; inset: 0; animation: spin 14s linear infinite; fill: var(--fg); font-size: 15.5px; font-weight: 600; letter-spacing: .14em; }
.hero__badge-core { width: 62px; height: 62px; border-radius: 50%; background: var(--accent); color: var(--bg); display: grid; place-items: center; font-weight: 800; font-size: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; position: relative; z-index: 2; }
.hero__lead { max-width: 440px; font-size: clamp(17px, 1.6vw, 22px); line-height: 1.35; margin: 0; }
.hero__lead em { color: var(--accent); font-size: 1.15em; }
.hero__scroll { display: inline-flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.hero__scroll svg { animation: bob 2s var(--ease) infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }

@media (max-width: 820px) {
  .hero { grid-template-rows: auto auto auto auto; gap: 28px; }
  .hero__title { align-self: start; margin-top: 20px; }
  .line--indent { padding-left: 0; }
  .hero__photo { position: relative; right: auto; top: auto; transform: none; width: min(78%, 360px); justify-self: end; }
  .hero__badge { left: -40px; bottom: -30px; width: 110px; height: 110px; }
  .hero__badge-core { width: 48px; height: 48px; font-size: 18px; }
  .hero__scroll { display: none; }
}

/* ---------- Marquee ---------- */
.marquee {
  padding: 28px 0; margin: 60px 0 0; border-block: 1px solid var(--line);
  overflow: hidden; white-space: nowrap; background: var(--bg);
  transform: rotate(-2deg) scale(1.04);
}
.marquee__track { display: inline-flex; align-items: center; gap: 36px; font-size: clamp(36px, 6vw, 88px); font-weight: 700; letter-spacing: -.04em; will-change: transform; }
.marquee__track i { font-style: normal; color: var(--accent); font-size: .5em; }
.marquee__track .serif { font-weight: 400; color: var(--lime); }

/* ---------- About ---------- */
.about { padding-top: clamp(120px, 18vw, 220px); padding-bottom: clamp(80px, 12vw, 160px); }
.about__text { font-size: clamp(26px, 4vw, 58px); line-height: 1.1; letter-spacing: -.03em; font-weight: 500; max-width: 1200px; margin: 0; }
.about__text .w { opacity: .14; transition: opacity .4s; }
.about__text .w.on { opacity: 1; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: clamp(64px, 9vw, 120px); border-top: 1px solid var(--line); }
.stat { padding: 28px 20px 0 0; border-right: 1px solid var(--line); padding-left: 20px; }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat__num { font-size: clamp(48px, 7vw, 110px); font-weight: 800; letter-spacing: -.06em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat__label { color: var(--muted); font-size: 14px; margin-top: 10px; }
@media (max-width: 820px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { border-right: 0; padding-left: 0; border-bottom: 1px solid var(--line); padding-bottom: 24px; }
}

/* ---------- Experience ---------- */
.exp { padding-bottom: clamp(100px, 14vw, 180px); }
.exp__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.exp__row { border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.exp__row::before {
  content: ""; position: absolute; inset: 0; background: var(--fg);
  transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease);
}
.exp__link {
  position: relative; display: grid; grid-template-columns: 140px 1.3fr 1fr; gap: 8px 24px; align-items: baseline;
  padding: 34px 0; transition: color .4s, padding .6s var(--ease);
}
.exp__year { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; transition: color .4s; }
.exp__co { font-size: clamp(34px, 5.5vw, 84px); font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.exp__role { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2vw, 28px); }
.exp__desc { grid-column: 2 / -1; color: var(--muted); max-width: 640px; transition: color .4s; }
@media (hover: hover) {
  .exp__row:hover::before { transform: scaleY(1); }
  .exp__row:hover .exp__link { color: var(--bg); padding-left: 24px; padding-right: 24px; }
  .exp__row:hover .exp__year, .exp__row:hover .exp__desc { color: rgba(12,12,13,.65); }
}
@media (max-width: 820px) {
  .exp__link { grid-template-columns: 1fr; }
  .exp__desc { grid-column: auto; }
}

.edu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; margin-top: 80px; }
.edu__item { display: flex; flex-direction: column; padding: 20px 0; border-bottom: 1px solid var(--line); }
.edu__item span { font-weight: 600; }
.edu__item em { color: var(--muted); font-size: 18px; }
@media (max-width: 720px) { .edu { grid-template-columns: 1fr; } }

/* ---------- Outside ---------- */
.outside { padding: 0; }
.outside__hero { position: relative; height: 130vh; overflow: hidden; clip-path: inset(var(--clip, 12%) var(--clipx, 8%) round 28px); }
.outside__img { position: absolute; inset: -8% 0; will-change: transform; }
.outside__img picture { display: block; width: 100%; height: 100%; }
.outside__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; transform: scale(var(--s, 1.08)); }
@media (max-width: 720px) {
  .outside__hero { height: 60svh; clip-path: inset(var(--clip, 6%) var(--clipx, 4%) round 20px); }
  .outside__img img { object-position: 50% 45%; }
  .outside__copy { bottom: 12%; }
}
.outside__hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,12,13,.0) 40%, rgba(12,12,13,.75)); }
.outside__copy { position: absolute; left: var(--pad); right: var(--pad); bottom: 18%; z-index: 2; }
.outside__title { font-size: clamp(36px, 6.4vw, 104px); line-height: .95; letter-spacing: -.045em; font-weight: 700; max-width: 1100px; margin: 0; }
.outside__title em { color: var(--accent); }

.strip { padding: 80px 0 140px; overflow: hidden; touch-action: pan-y; user-select: none; }
.strip__track { display: flex; gap: 20px; padding: 0 var(--pad); will-change: transform; width: max-content; }
.strip__item { margin: 0; flex: 0 0 auto; width: clamp(220px, 24vw, 340px); position: relative; }
.strip__item--wide { width: clamp(320px, 40vw, 580px); }
.strip__item img { width: 100%; height: clamp(300px, 36vw, 460px); object-fit: cover; border-radius: 18px; transform: skewX(var(--skew, 0deg)) scale(var(--sc, 1)); transition: filter .5s; filter: saturate(.85); pointer-events: none; }
.strip__item:hover img { filter: saturate(1.1); }
.strip__item figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { padding-top: 40px; padding-bottom: 120px; }
.contact__title { font-size: clamp(56px, 13vw, 220px); line-height: .9; letter-spacing: -.055em; font-weight: 800; margin: 0 0 56px; }
.contact__title .serif { font-weight: 400; color: var(--accent); letter-spacing: -.03em; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  padding: 20px 34px; border-radius: 999px; border: 1px solid var(--fg); font-size: 17px; font-weight: 600;
}
.btn--big { padding: 34px 60px; font-size: clamp(20px, 2.4vw, 30px); background: var(--fg); color: var(--bg); }
.btn__fill { position: absolute; left: var(--fx, 50%); top: var(--fy, 50%); width: 0; height: 0; border-radius: 50%; background: var(--accent); transform: translate(-50%, -50%); transition: width .6s var(--ease), height .6s var(--ease); }
.btn:hover .btn__fill { width: 260%; height: 600%; }
.btn__text { position: relative; transition: color .3s; }
.btn:hover .btn__text { color: var(--bg); }

/* ---------- Footer ---------- */
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px var(--pad); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .char { transform: none; }
  .reveal { opacity: 1; transform: none; }
  .hero__photo-inner { clip-path: none; }
}
