:root {
  color-scheme: dark;
  --bg: #000;
  --text: #f7f7f2;
  --muted: rgba(255, 255, 255, .64);
  --soft: rgba(255, 255, 255, .12);
  --line: rgba(255, 255, 255, .18);
  --gold: #d7c36f;
  --max: 1180px;
  --nav-top: clamp(112px, 18vh, 152px);
  --hero-progress: 0;
  --scroll: 0%;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #000;
}

/* Lenis smooth-scroll hooks */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  letter-spacing: -0.025em;
}

body.is-locked {
  overflow: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

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

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: rgba(215, 195, 111, .36);
  color: #fff;
}

.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;
}

/* Serif italic accents inside headings */
h1 em,
h2 em,
h3 em,
.loader-name em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.015em;
  color: var(--gold);
}

/* ---------------------------------------------------------------- loader */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #050505;
  will-change: transform;
}

.loader-inner {
  text-align: center;
}

.loader-kicker {
  margin: 0 0 16px;
  color: rgba(215, 195, 111, .85);
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
}

.loader-name {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: 1;
  color: rgba(255, 255, 255, .94);
}

.loader-count {
  position: absolute;
  right: clamp(20px, 4vw, 48px);
  bottom: clamp(8px, 3vw, 28px);
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(3.2rem, 9vw, 7rem);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .55);
}

body.is-loaded .page-loader {
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease, visibility .6s ease;
}

/* ---------------------------------------------------- progress + cursor */
.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 120;
  width: var(--scroll);
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), var(--gold));
  box-shadow: 0 0 18px rgba(215, 195, 111, .55);
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 140;
  pointer-events: none;
  opacity: 0;
  translate: -50% -50%;
}

.cursor-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}

.cursor-ring {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 50%;
  transition: width .25s ease, height .25s ease, background .25s ease, border-color .25s ease;
}

.cursor-label {
  font-family: var(--font-mono);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #050505;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .2s ease, transform .2s ease;
}

body.has-cursor .cursor-dot,
body.has-cursor .cursor-ring {
  opacity: 1;
}

body.cursor-active .cursor-ring {
  width: 64px;
  height: 64px;
  border-color: rgba(215, 195, 111, .58);
  background: rgba(215, 195, 111, .08);
}

body.cursor-view .cursor-ring {
  width: 86px;
  height: 86px;
  border-color: transparent;
  background: rgba(215, 195, 111, .95);
}

body.cursor-view .cursor-label {
  opacity: 1;
  transform: none;
}

body.cursor-view .cursor-dot {
  opacity: 0;
}

/* --------------------------------------------------------------- webgl */
#webgl {
  position: fixed;
  inset: 0;
  z-index: -4;
  width: 100vw;
  height: 100svh;
  pointer-events: none;
}

/* --------------------------------------------------------------- stage */
.global-stage {
  position: fixed;
  inset: 0;
  z-index: -5;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, .10), transparent 18%),
    radial-gradient(circle at 50% 95%, rgba(255, 255, 255, .08), transparent 25%),
    #000;
}

.stage-gradient {
  position: absolute;
  filter: blur(20px);
  opacity: .55;
}

.stage-gradient-a {
  width: 70vw;
  height: 48vw;
  left: 18vw;
  top: 4vh;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .18), transparent 58%);
}

.stage-gradient-b {
  width: 92vw;
  height: 48vw;
  left: 4vw;
  bottom: -28vw;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, .10), transparent 66%);
}

.orb {
  position: absolute;
  display: block;
  border-radius: 50%;
  opacity: .18;
  filter: blur(.2px);
  background: radial-gradient(circle at 42% 34%, rgba(255, 255, 255, .55), rgba(255, 255, 255, .16) 36%, rgba(255, 255, 255, .04) 68%, transparent 72%);
  transform: translate3d(0, calc(var(--move-y, 0) * 1px), 0) rotate(var(--r, 0deg));
}

.orb-1 {
  width: 44vw;
  height: 44vw;
  right: -15vw;
  top: 22vh;
  --r: 0deg;
}

.orb-2 {
  width: 36vw;
  height: 36vw;
  left: -13vw;
  top: 40vh;
  --r: 8deg;
}

.orb-3 {
  width: 34vw;
  height: 34vw;
  right: 12vw;
  bottom: -8vw;
  --r: -12deg;
}

.orb-4 {
  width: 26vw;
  height: 26vw;
  left: 38vw;
  bottom: 12vh;
  --r: 18deg;
}

.petal {
  position: absolute;
  display: block;
  width: clamp(210px, 32vw, 520px);
  height: clamp(210px, 32vw, 520px);
  opacity: .33;
  background:
    radial-gradient(ellipse at 26% 25%, rgba(255, 255, 255, .32), rgba(255, 255, 255, .08) 42%, rgba(255, 255, 255, .015) 74%, transparent 78%),
    linear-gradient(135deg, rgba(255, 255, 255, .06), transparent 58%);
  border-radius: 0 86% 0 86%;
  transform: translate3d(0, calc(var(--move-y, 0) * 1px), 0) rotate(var(--rot, 0deg));
  animation: floatPetal var(--dur, 16s) ease-in-out infinite alternate;
}

.petal-1 {
  left: -3vw;
  top: 23vh;
  --rot: 0deg;
  --dur: 18s;
}

.petal-2 {
  left: 23vw;
  top: 15vh;
  --rot: 0deg;
  --dur: 21s;
}

.petal-3 {
  right: -5vw;
  top: 2vh;
  --rot: 90deg;
  --dur: 19s;
}

.petal-4 {
  right: 4vw;
  top: 46vh;
  --rot: -18deg;
  --dur: 24s;
}

.petal-5 {
  left: 3vw;
  bottom: -6vw;
  --rot: 90deg;
  --dur: 22s;
}

.petal-6 {
  left: 36vw;
  bottom: -14vw;
  --rot: 0deg;
  --dur: 20s;
}

.petal-7 {
  right: 18vw;
  bottom: 7vh;
  --rot: 0deg;
  --dur: 26s;
}

.petal-8 {
  left: 64vw;
  top: 66vh;
  --rot: 90deg;
  --dur: 17s;
}

@keyframes floatPetal {
  from {
    margin-top: -10px;
    margin-left: -6px;
    filter: blur(.15px);
  }

  to {
    margin-top: 18px;
    margin-left: 10px;
    filter: blur(.65px);
  }
}

/* -------------------------------------------------------------- header */
.site-header {
  position: fixed;
  top: var(--nav-top);
  left: 50%;
  z-index: 110;
  width: min(calc(100% - 30px), var(--max));
  height: 54px;
  transform: translateX(-50%);
  transition: top .55s cubic-bezier(.22, 1, .36, 1), width .55s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}

body.is-scrolled {
  --nav-top: 18px;
}

.brand {
  position: absolute;
  left: 0;
  top: 2px;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(0, 0, 0, .34);
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(-10px) scale(.82);
  transition: opacity .45s ease, transform .45s ease, border-color .3s ease;
  pointer-events: auto;
}

body.is-scrolled .brand {
  opacity: 1;
  transform: none;
}

.brand:hover {
  border-color: rgba(215, 195, 111, .75);
}

.nav-pill {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: max-content;
  max-width: calc(100vw - 30px);
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .91);
  border: 1px solid rgba(255, 255, 255, .36);
  box-shadow:
    0 18px 80px rgba(0, 0, 0, .58),
    0 0 28px rgba(255, 255, 255, .10);
  color: #050505;
  backdrop-filter: blur(18px);
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.nav-link {
  min-width: 72px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 750;
  color: rgba(0, 0, 0, .72);
  transition: background .24s ease, color .24s ease, transform .24s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: #000;
  color: #fff;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  position: absolute;
  right: 0;
  top: 2px;
  display: none;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
  background: rgba(0, 0, 0, .42);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  margin: 5px auto;
  background: #fff;
  transition: transform .24s ease;
}

body.menu-open .nav-toggle span:first-child {
  transform: translateY(3px) rotate(45deg);
}

body.menu-open .nav-toggle span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.one-page-stage {
  position: relative;
  z-index: 1;
}

.section {
  position: relative;
  isolation: isolate;
}

/* ---------------------------------------------------------------- hero */
.hero {
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.hero-spotlight {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: calc(1 - (var(--hero-progress) * .36));
  transform: scale(calc(1 + (var(--hero-progress) * .10))) translateY(calc(var(--hero-progress) * -34px));
  transform-origin: 50% 18%;
  filter: contrast(1.04) brightness(1.02);
  mask-image: linear-gradient(to bottom, #000 0%, #000 68%, transparent 97%);
}

.hero-shadow {
  position: absolute;
  inset: auto 0 0;
  z-index: -2;
  height: 42vh;
  background: linear-gradient(to bottom, transparent, #000 92%);
}

.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 31px;
  width: min(400px, 42vw);
  height: 21px;
  transform: translateX(-50%);
  opacity: .54;
  background: radial-gradient(ellipse at center, #fff 0%, rgba(255, 255, 255, .68) 21%, rgba(255, 255, 255, .16) 52%, transparent 70%);
  filter: blur(2px);
}

.hero-meta {
  position: absolute;
  top: clamp(77px, 13vh, 112px);
  z-index: 2;
  margin: 0;
  color: rgba(255, 255, 255, .76);
  font-family: var(--font-mono);
  font-size: clamp(.6rem, .72vw, .78rem);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(255, 255, 255, .16);
}

.hero-meta-left {
  left: max(7vw, calc((100vw - var(--max)) / 2));
}

.hero-meta-right {
  right: max(7vw, calc((100vw - var(--max)) / 2));
}

.hero-center {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform: translateY(calc(var(--hero-progress) * -72px));
}

.hero-portrait {
  position: absolute;
  left: 0;
  right: 0;
  /* Increased the top values to push the image further down */
  top: clamp(140px, 18vh, 220px);
  z-index: 1;
  /* Increased the width values to make the image noticeably larger */
  width: clamp(340px, 40vw, 560px);
  aspect-ratio: 0.85;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 32px;
  background: rgba(255, 255, 255, .08);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, .9),
    0 0 0 1px rgba(255, 255, 255, .2),
    0 0 80px rgba(255, 255, 255, .12);
  transform: scale(calc(1 - (var(--hero-progress) * .05)));
  pointer-events: auto;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 20%;
  filter: saturate(.92) contrast(1.04);
}

.hero-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .12), transparent 38%, rgba(0, 0, 0, .14));
  pointer-events: none;
}

.hero-title-block {
  position: absolute;
  left: 0;
  right: 0;
  /* Adjusted to perfectly overlap the bottom half of the portrait */
  top: clamp(340px, 52vh, 540px);
  /* High z-index ensures text stays clickable and visible */
  z-index: 10;
  width: min(920px, calc(100% - 36px));
  margin-inline: auto;
  text-align: center;
  opacity: calc(.90 - (var(--hero-progress) * .55));
}

.eyebrow {
  margin: 0 0 16px;
  color: rgba(215, 195, 111, .88);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .68rem;
  font-weight: 700;
}

.hero-title-block h1 {
  margin: 0;
  font-size: clamp(3rem, 11vw, 10.5rem);
  line-height: .84;
  letter-spacing: -.09em;
  font-weight: 900;
  color: rgba(255, 255, 255, .76);
  text-shadow: 0 30px 90px rgba(0, 0, 0, .85);
}

.h-line {
  display: block;
}

.hero-badge {
  position: absolute;
  right: max(6vw, calc((100vw - var(--max)) / 2));
  bottom: 42px;
  z-index: 5;
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
}

.badge-rotor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.badge-rotor text {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .12em;
  fill: rgba(255, 255, 255, .72);
}

.badge-core {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(215, 195, 111, .6);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1.05rem;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(6px);
  transition: background .3s ease, color .3s ease;
}

.hero-badge:hover .badge-core {
  background: var(--gold);
  color: #050505;
}

.hero-scroll {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  z-index: 4;
  width: max-content;
  margin-inline: auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, .6);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hero-scroll span {
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, .84), transparent);
  animation: scrollLine 1.7s ease-in-out infinite;
}

@keyframes scrollLine {

  0%,
  100% {
    transform: scaleY(.42);
    opacity: .45;
  }

  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* ------------------------------------------------------------- marquee */
.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: clamp(14px, 2vw, 22px) 0;
  border-block: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .02);
}

.marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: marqueeSlide 26s linear infinite;
}

.marquee-seg {
  display: inline-flex;
  align-items: baseline;
  gap: .6em;
  padding-right: .6em;
  white-space: nowrap;
  font-size: clamp(1.05rem, 2.2vw, 1.7rem);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: -.02em;
  color: rgba(255, 255, 255, .85);
}

.marquee-seg i {
  font-style: normal;
  color: var(--gold);
  font-size: .78em;
}

.marquee-seg em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--gold);
  font-size: 1.12em;
}

/* CSS fallback; GSAP takes over and removes it */
body.gsap-marquee .marquee-track {
  animation: none;
}

@keyframes marqueeSlide {
  to {
    transform: translateX(-50%);
  }
}

/* ------------------------------------------------------------ sections */
.section-flow {
  min-height: 105svh;
  display: flex;
  align-items: center;
  padding: clamp(86px, 13vw, 172px) max(22px, 6vw);
  background: transparent;
}

.section-flow::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .045), transparent 62%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 255, 255, .03), transparent 62%);
  opacity: .82;
}

.section-grid,
.about-shell,
.contact-shell,
.section-copy.centered {
  width: min(100%, var(--max));
  margin-inline: auto;
}

.section-grid-skills {
  display: grid;
  grid-template-columns: minmax(320px, .92fr) minmax(300px, 1fr);
  align-items: center;
  gap: clamp(50px, 9vw, 120px);
}

.section-copy h2,
.about-shell h2,
.contact-card h2,
.work-head h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.3rem, 6vw, 6.2rem);
  line-height: .92;
  letter-spacing: -.075em;
  color: rgba(255, 255, 255, .88);
}

.lead,
.about-text p {
  margin: 24px 0 0;
  max-width: 610px;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.28rem);
  line-height: 1.65;
  letter-spacing: -.035em;
}

/* SplitText word/line wrappers */
[data-split] .split-word {
  display: inline-block;
  will-change: transform;
}

/* -------------------------------------------------------------- skills */
.section-grid-skills .section-copy h2 {
  font-size: clamp(2rem, 4.4vw, 4.6rem);
}

/* Cascade deck: every card's number + title peeks out; hover brings it forward */
.stacked-cards {
  position: relative;
  order: -1;
  min-height: 480px;
}

.skill-card {
  position: absolute;
  left: calc(var(--card) * 12px);
  top: calc(var(--card) * 88px);
  z-index: calc(1 + var(--card));
  width: min(390px, calc(100vw - 52px));
  min-height: 204px;
  padding: 24px 28px;
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(132, 132, 127, .98), rgba(96, 96, 92, .97));
  color: #efefea;
  border: 1px solid rgba(215, 195, 111, .72);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, .48),
    inset 0 1px 0 rgba(255, 255, 255, .24);
  transform: rotate(calc(var(--card) * -0.8deg));
  transition:
    transform .45s cubic-bezier(.22, 1, .36, 1),
    opacity .35s ease,
    border-color .35s ease,
    box-shadow .45s ease;
}

@media (hover: hover) {
  .stacked-cards:hover .skill-card:not(:hover) {
    opacity: .38;
  }
}

.skill-card:hover {
  z-index: 10;
  border-color: #fff;
  transform: translateY(-12px) scale(1.03) rotate(0deg);
  box-shadow:
    0 42px 95px rgba(0, 0, 0, .6),
    inset 0 1px 0 rgba(255, 255, 255, .24);
}

.skill-card span {
  display: block;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, .78);
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .18em;
}

.skill-card h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  letter-spacing: -.045em;
}

.skill-card p {
  margin: 0;
  color: rgba(255, 255, 255, .65);
  line-height: 1.55;
  font-size: .92rem;
}

/* ---------------------------------------------------------------- work */
.work-section {
  overflow: hidden;
  z-index: 2;
  background: var(--bg);
}

.work-pin {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(86px, 13vw, 172px) max(22px, 6vw);
  background: var(--bg);
}

.work-head {
  width: min(100%, var(--max));
  margin-inline: auto;
}

.work-head h2 {
  max-width: 880px;
}

.work-track {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(60px, 8vw, 90px) clamp(18px, 2.4vw, 30px);
  width: min(100%, var(--max));
  margin-inline: auto;
  margin-top: clamp(42px, 7vw, 84px);
  padding-top: 44px;
}

.work-panel {
  position: relative;
}

.panel-index {
  position: absolute;
  top: -34px;
  right: 12px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: clamp(3.6rem, 7vw, 6.4rem);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2.5px rgba(215, 195, 111, .6);
  pointer-events: none;
}

.panel-card {
  overflow: hidden;
  height: 100%;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(145deg, rgba(255, 255, 255, .90), rgba(220, 220, 216, .86));
  color: #0b0b0b;
  box-shadow: 0 38px 95px rgba(0, 0, 0, .48);
  transform-style: preserve-3d;
  transition: transform .34s cubic-bezier(.22, 1, .36, 1), box-shadow .34s ease;
}

.panel-media {
  min-height: 245px;
  padding: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, .72);
}

.panel-media img {
  width: 114%;
  max-width: none;
  height: 232px;
  margin-left: -7%;
  object-fit: cover;
  object-position: top center;
  border-radius: 22px;
  border: 1px solid rgba(0, 0, 0, .07);
  will-change: transform;
}

.panel-info {
  padding: 24px 26px 28px;
}

.panel-info p {
  margin: 0 0 10px;
  color: rgba(0, 0, 0, .54);
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
}

.panel-info h3 {
  margin: 0 0 18px;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: .96;
  letter-spacing: -.06em;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .86rem;
  font-weight: 850;
}

.text-link::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  transition: width .24s ease;
}

.text-link:hover::after {
  width: 48px;
}

.panel-card-cta {
  display: grid;
  align-items: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  border: 1px solid rgba(215, 195, 111, .45);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.cta-body {
  padding: clamp(28px, 4vw, 48px);
}

.cta-body .eyebrow {
  margin-bottom: 18px;
}

.cta-body h3 {
  margin: 0 0 26px;
  max-width: 420px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: .98;
  letter-spacing: -.06em;
  color: rgba(255, 255, 255, .92);
}

.panel-card-cta .text-link {
  color: var(--gold);
}

.work-progress {
  display: none;
}

/* Horizontal rail mode — enabled by JS on desktop */
body.has-rail .work-pin {
  height: 100svh;
  justify-content: flex-start;
  gap: clamp(20px, 4vh, 40px);
  padding: 0;
  overflow: hidden;
}

body.has-rail .work-head {
  width: min(100% - 44px, var(--max));
  padding-top: 6vh;
}

body.has-rail .work-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 3.6rem);
}

body.has-rail .panel-media {
  min-height: 0;
}

body.has-rail .panel-media img {
  height: clamp(180px, 28vh, 300px);
}

body.has-rail .work-track {
  display: flex;
  align-items: stretch;
  width: max-content;
  max-width: none;
  margin: 0;
  gap: clamp(24px, 3vw, 44px);
  padding: 44px max(22px, 6vw) 0;
  will-change: transform;
}

body.has-rail .work-panel {
  width: clamp(420px, 42vw, 620px);
  flex-shrink: 0;
}

body.has-rail .work-progress {
  display: block;
  width: min(420px, 40vw);
  height: 2px;
  margin: 10px auto 5vh;
  border-radius: 99px;
  background: rgba(255, 255, 255, .14);
  overflow: hidden;
}

body.has-rail .work-progress span {
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #fff, var(--gold));
}

.mock-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-radius: 34px 34px 0 0;
}

.mock-top {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .08);
}

.mock-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .24);
}

.mock-hero {
  height: 90px;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 10%, rgba(0, 0, 0, .22), rgba(0, 0, 0, .05));
}

.mock-line {
  height: 14px;
  border-radius: 99px;
  background: rgba(0, 0, 0, .11);
}

.mock-line.small {
  width: 62%;
}

.mock-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.mock-grid span {
  height: 54px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .08);
}

/* --------------------------------------------------------------- about */
.about-section {
  min-height: 92svh;
}

.about-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .75fr);
  gap: clamp(42px, 7vw, 100px);
  align-items: start;
  padding: clamp(30px, 4vw, 52px);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 42px;
  background: rgba(255, 255, 255, .025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 36px 110px rgba(0, 0, 0, .30);
  backdrop-filter: blur(8px);
}

.about-text p:first-child {
  margin-top: 4px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
  color: rgba(255, 255, 255, .74);
  background: rgba(255, 255, 255, .04);
  font-size: .78rem;
  font-weight: 700;
}

.stats-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: clamp(8px, 2vw, 24px);
  padding-top: clamp(22px, 3vw, 34px);
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.stat-value {
  margin: 0;
  font-size: clamp(2.4rem, 4.6vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: 1;
  color: rgba(255, 255, 255, .92);
}

.stat-suffix {
  color: var(--gold);
}

.stat-label {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .16em;
}

/* ------------------------------------------------------------- contact */
.contact-section {
  min-height: 96svh;
  padding-bottom: clamp(90px, 11vw, 150px);
}

.contact-shell {
  display: grid;
  grid-template-columns: minmax(300px, .85fr) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(42px, 8vw, 112px);
}

.contact-form {
  display: grid;
  gap: 14px;
  width: min(100%, 440px);
}

.contact-form label {
  display: grid;
  gap: 8px;
}

.contact-form span {
  margin-left: 18px;
  color: rgba(255, 255, 255, .52);
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, .86);
  color: #050505;
  padding: 14px 20px;
  transition: border-color .24s ease, background .24s ease, box-shadow .24s ease;
}

.contact-form textarea {
  min-height: 112px;
  resize: vertical;
  border-radius: 20px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(215, 195, 111, .9);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(215, 195, 111, .12);
}

.send-button {
  justify-self: start;
  min-height: 38px;
  padding: 0 30px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  color: #fff;
  background: #000;
  font-size: .78rem;
  font-weight: 850;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .36);
  transition: border-color .24s ease;
}

.send-button:hover {
  border-color: rgba(215, 195, 111, .85);
}

.form-status {
  min-height: 18px;
  margin: 0;
  color: rgba(255, 255, 255, .58);
  font-size: .82rem;
}

.contact-card {
  justify-self: end;
  width: min(100%, 560px);
}

.contact-list {
  display: grid;
  gap: 10px;
  margin: 34px 0 0;
}

.contact-list div {
  display: grid;
  grid-template-columns: 104px 1fr;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  background: rgba(0, 0, 0, .46);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.contact-list dt,
.contact-list dd {
  margin: 0;
  font-size: .86rem;
}

.contact-list dt {
  padding-left: 18px;
  color: rgba(255, 255, 255, .62);
  font-weight: 800;
}

.contact-list dd {
  padding: 0 16px 0 6px;
  color: #fff;
}

.contact-list dd span {
  color: rgba(255, 255, 255, .5);
}

/* -------------------------------------------------------------- footer */
.site-footer {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: clamp(64px, 9vw, 120px) max(24px, 7vw) 26px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 40%), #050505;
  border-top: 1px solid rgba(255, 255, 255, .10);
  color: rgba(255, 255, 255, .78);
  font-size: .82rem;
  letter-spacing: -.015em;
}

.site-footer a {
  transition: color .22s ease;
}

.site-footer a:hover {
  color: #fff;
}

.footer-top {
  width: min(100%, var(--max));
  margin-inline: auto;
}

.footer-mail {
  display: inline-block;
  margin-top: 14px;
  font-size: clamp(1.55rem, 4.6vw, 4rem);
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: 1;
  color: rgba(255, 255, 255, .92);
}

.footer-mail:hover {
  color: var(--gold) !important;
}

.footer-grid {
  width: min(100%, var(--max));
  margin: clamp(40px, 6vw, 70px) auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding-top: clamp(28px, 4vw, 44px);
  border-top: 1px solid rgba(255, 255, 255, .10);
}

.footer-col {
  display: grid;
  gap: 9px;
  align-content: start;
  justify-items: start;
}

.footer-col-title {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: rgba(215, 195, 111, .85);
}

.footer-col a {
  color: rgba(255, 255, 255, .66);
}

.footer-time {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: .06em;
  color: #fff;
}

.footer-place {
  margin: 0;
  color: rgba(255, 255, 255, .55);
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 8px;
  color: rgba(255, 255, 255, .78);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8be28b;
  box-shadow: 0 0 12px rgba(139, 226, 139, .9);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  50% {
    opacity: .35;
  }
}

.to-top {
  color: rgba(215, 195, 111, .85);
  font-weight: 700;
}

.to-top:hover {
  color: var(--gold) !important;
}

.footer-big {
  width: min(100%, var(--max));
  margin: clamp(44px, 7vw, 90px) auto 0;
  text-align: center;
  font-size: clamp(2.6rem, 11.5vw, 11rem);
  font-weight: 900;
  line-height: .82;
  letter-spacing: -.055em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(215, 195, 111, .30);
  user-select: none;
  pointer-events: none;
}

.footer-bottom {
  width: min(100%, var(--max));
  margin: clamp(26px, 4vw, 40px) auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .45);
  font-size: .72rem;
}

.footer-bottom p {
  margin: 0;
}

/* ------------------------------------------------------------ AI chat */
.ai-chat {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 180;
  color: var(--text);
  font-family: var(--font-sans);
}

.ai-chat-toggle {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(215, 195, 111, .42);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, .32), transparent 32%),
    rgba(215, 195, 111, .92);
  color: #080806;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .46);
}

.ai-chat-toggle span {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: 0;
}

.ai-chat-panel {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: min(390px, calc(100vw - 28px));
  height: min(620px, calc(100svh - 116px));
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(18, 18, 16, .96), rgba(6, 6, 6, .94)),
    #080808;
  box-shadow: 0 32px 100px rgba(0, 0, 0, .58);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(.97);
  transform-origin: 100% 100%;
  transition: opacity .22s ease, visibility .22s ease, transform .22s ease;
  backdrop-filter: blur(18px);
}

.ai-chat.is-open .ai-chat-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.ai-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.ai-chat-kicker {
  margin: 0 0 5px;
  color: rgba(215, 195, 111, .82);
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ai-chat-head h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.ai-chat-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
}

.ai-chat-messages {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(215, 195, 111, .55) transparent;
}

.ai-message {
  width: fit-content;
  max-width: 86%;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  color: rgba(255, 255, 255, .86);
  font-size: .88rem;
  line-height: 1.45;
  letter-spacing: 0;
  white-space: pre-wrap;
}

.ai-message-bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, .07);
}

.ai-message-user {
  align-self: flex-end;
  border-color: rgba(215, 195, 111, .32);
  background: rgba(215, 195, 111, .16);
  color: #fff;
}

.ai-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.ai-chat-form textarea {
  width: 100%;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  padding: 12px 13px;
  font-size: .88rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.ai-chat-form textarea:focus {
  border-color: rgba(215, 195, 111, .52);
}

.ai-chat-form button {
  min-width: 68px;
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  background: var(--gold);
  color: #080806;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: 0;
}

.ai-chat-form button:disabled,
.ai-chat-form textarea:disabled {
  cursor: wait;
  opacity: .62;
}

.ai-chat-status {
  min-height: 28px;
  margin: 0;
  padding: 0 16px 12px;
  color: rgba(255, 255, 255, .52);
  font-size: .72rem;
  line-height: 1.3;
  letter-spacing: 0;
}

/* --------------------------------------------------------- breakpoints */
@media (max-width: 980px) {
  :root {
    --nav-top: 18px;
  }

  .site-header {
    width: calc(100% - 28px);
  }

  .brand {
    opacity: 1;
    transform: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-pill {
    top: 65px;
    right: 0;
    left: auto;
    width: min(310px, calc(100vw - 28px));
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    border-radius: 26px;
    transform: translateY(-14px) scale(.96);
    transform-origin: 100% 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .24s ease, visibility .24s ease, transform .24s ease;
  }

  body.menu-open .nav-pill {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-link {
    width: 100%;
    min-height: 42px;
  }

  .hero-meta {
    top: 132px;
  }

  .hero-meta-left {
    left: 22px;
  }

  .hero-meta-right {
    right: 22px;
  }

  .hero-portrait {
    top: 105px;   /* Adjusted to match the new downward flow */
    width: 280px; /* Scaled up so it remains larger than mobile */
    border-radius: 22px;
  }

  .hero-title-block {
    top: 48vh;
  }

  .section-grid-skills,
  .about-shell,
  .contact-shell {
    grid-template-columns: 1fr;
  }

  .stacked-cards {
    min-height: 490px;
    order: 0;
  }

  .section-copy h2,
  .about-shell h2,
  .contact-card h2,
  .work-head h2 {
    font-size: clamp(2.7rem, 13vw, 5.5rem);
  }

  .section-grid-skills .section-copy h2 {
    font-size: clamp(2.4rem, 10vw, 4.6rem);
  }

  .contact-card {
    justify-self: start;
  }

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

@media (max-width: 899px) {
  .hero-badge {
    display: none;
  }
}

@media (min-width: 700px) {
  .work-track {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 96svh;
  }

  .hero-spotlight {
    object-position: center top;
  }

  .hero::after {
    width: 230px;
    top: 30px;
  }

  .hero-meta {
    top: 178px;
    max-width: 150px;
    font-size: .58rem;
    line-height: 1.35;
  }

  .hero-portrait {
    top: clamp(86px, 13svh, 116px);
    width: clamp(258px, 78vw, 318px);
    border-radius: 24px;
  }

  .hero-portrait img {
    object-position: 58% 18%;
  }

  .hero-title-block {
    top: 55vh;
  }

  .hero-title-block h1 {
    font-size: clamp(3.1rem, 18vw, 5.4rem);
  }

  .hero-scroll {
    bottom: 20px;
  }

  .section-flow {
    min-height: auto;
    padding-block: 110px;
  }

  .stacked-cards {
    min-height: auto;
    display: grid;
    gap: 14px;
  }

  .skill-card {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    min-height: auto;
    transform: none !important;
  }

  .work-pin {
    padding-block: 110px;
  }

  .work-track {
    grid-template-columns: 1fr;
    padding-top: 36px;
    gap: 64px;
  }

  .panel-index {
    top: -28px;
    font-size: 3rem;
  }

  .panel-card {
    border-radius: 26px;
  }

  .panel-media {
    min-height: auto;
    padding: 12px;
  }

  .panel-media img {
    height: 210px;
    border-radius: 18px;
  }

  .panel-info {
    padding: 0 20px 22px;
  }

  .about-shell {
    border-radius: 28px;
    padding: 24px;
  }

  .stats-row {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .contact-list div {
    grid-template-columns: 1fr;
    gap: 4px;
    border-radius: 18px;
    padding: 10px 0;
  }

  .contact-list dt,
  .contact-list dd {
    padding-inline: 16px;
  }

  .loader-count {
    font-size: 3rem;
  }

  .orb {
    opacity: .12;
  }

  .petal {
    opacity: .24;
  }

  .ai-chat {
    right: 14px;
    bottom: 14px;
  }

  .ai-chat-toggle {
    width: 58px;
    height: 58px;
  }

  .ai-chat-panel {
    bottom: 70px;
    height: min(560px, calc(100svh - 96px));
    border-radius: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  .cursor-dot,
  .cursor-ring {
    display: none;
  }

  .marquee-track {
    animation: none;
  }
}
