:root {
  --page-pad: clamp(24px, 4.167vw, 80px);
  --content-width: calc(100vw - (var(--page-pad) * 2));
  --section-space: clamp(100px, 10vw, 160px);
  --bg: #050505;
  --surface: #050505;
  --ink: #f4f4f0;
  --muted: #86868b;
  --line-soft: rgba(255, 255, 255, .16);
  --control-bg: rgba(5, 5, 5, .72);
  --control-hover-bg: #f4f4f0;
  --control-hover-ink: #050505;
  --hero-overlay-rgb: 5, 5, 5;
  --font-display: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-text: "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: var(--font-display);
  --mono: var(--font-text);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --overlap: -180px;
}

html[data-theme="light"] {
  --bg: #fff;
  --surface: #fff;
  --ink: #050505;
  --muted: #5f5f64;
  --line-soft: rgba(0, 0, 0, .16);
  --control-bg: rgba(255, 255, 255, .78);
  --control-hover-bg: #050505;
  --control-hover-ink: #fff;
  --hero-overlay-rgb: 255, 255, 255;
}

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

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: clip;
  background: var(--bg);
}

body {
  color: var(--ink);
  font: 400 17px/1.4705882353 var(--font-text);
  letter-spacing: -.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
a { color: inherit; }

button { font: inherit; }
a { text-decoration: none; }

::selection { color: #050505; background: #fff; }

.site-nav {
  position: fixed;
  z-index: 120;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  padding: 0 var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: color-mix(in srgb, var(--ink) 78%, transparent);
  font: 700 14px/1 var(--font-display);
  letter-spacing: .34em;
  text-transform: uppercase;
  transition: color .2s ease, opacity .2s ease;
}

.site-logo:hover,
.site-logo:focus-visible {
  outline: none;
  color: var(--ink);
}

.site-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.nav-button {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  color: color-mix(in srgb, var(--ink) 72%, transparent);
  background: var(--control-bg);
  font: 600 11px/1 var(--font-text);
  letter-spacing: .02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .25s var(--spring);
}

.nav-button:hover,
.nav-button:focus-visible {
  outline: none;
  color: var(--control-hover-ink);
  background: var(--control-hover-bg);
  border-color: var(--control-hover-bg);
  transform: translateY(-1px);
}

.nav-language { padding: 0 11px; }
.nav-language span { opacity: .5; }
.nav-language span.is-active { opacity: 1; color: currentColor; }
.nav-theme {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  border-color: transparent;
  border-radius: 50%;
  background: transparent;
  overflow: visible;
}

.nav-theme:hover,
.nav-theme:focus-visible {
  color: var(--ink);
  border-color: transparent;
  background: transparent;
  transform: scale(1.08) rotate(8deg);
}

.nav-theme:active,
.nav-contact:active {
  transform: scale(.96);
}

.nav-contact {
  position: relative;
  min-width: 168px;
  height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  color: #f7f7f4;
  background: #030303;
  border-color: rgba(255,255,255,.22);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -.02em;
  text-transform: none;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06) inset,
    0 0 38px rgba(255,255,255,.10),
    0 12px 34px rgba(0,0,0,.45);
  overflow: hidden;
}

.nav-contact::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle, rgba(255,255,255,.62) 1.2px, transparent 1.8px) 18px 12px / 34px 24px,
    linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  content: "";
  opacity: .42;
  pointer-events: none;
}

.nav-contact span,
.nav-contact {
  isolation: isolate;
}

.nav-contact:hover,
.nav-contact:focus-visible {
  color: #f6f1e8;
  background: #030303;
  border-color: rgba(255,255,255,.34);
  transform: translateY(-1px) scale(1.025);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.14) inset,
    0 0 42px rgba(255,255,255,.18),
    0 14px 38px rgba(0,0,0,.42);
}

.theme-icon {
  position: relative;
  width: 22px;
  height: 22px;
  border: 1.6px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 0 14px color-mix(in srgb, currentColor 32%, transparent);
}

.theme-icon::before {
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  background:
    radial-gradient(circle, currentColor 1.5px, transparent 2px) 50% 0 / 100% 100% no-repeat,
    radial-gradient(circle, currentColor 1.5px, transparent 2px) 50% 100% / 100% 100% no-repeat,
    radial-gradient(circle, currentColor 1.5px, transparent 2px) 0 50% / 100% 100% no-repeat,
    radial-gradient(circle, currentColor 1.5px, transparent 2px) 100% 50% / 100% 100% no-repeat,
    radial-gradient(circle, currentColor 1.25px, transparent 1.8px) 14% 14% / 100% 100% no-repeat,
    radial-gradient(circle, currentColor 1.25px, transparent 1.8px) 86% 14% / 100% 100% no-repeat,
    radial-gradient(circle, currentColor 1.25px, transparent 1.8px) 14% 86% / 100% 100% no-repeat,
    radial-gradient(circle, currentColor 1.25px, transparent 1.8px) 86% 86% / 100% 100% no-repeat;
  content: "";
  opacity: .85;
}

html[data-theme="light"] .theme-icon {
  width: 24px;
  height: 24px;
  border: 2.5px solid #344054;
  background: transparent;
  box-shadow: none;
  transform: rotate(-18deg);
}

html[data-theme="light"] .theme-icon::before {
  inset: -4px -6px 4px 8px;
  background: #fff;
  opacity: 1;
}

html[data-theme="light"] .nav-contact {
  color: #050505;
  background: #fff;
  border-color: rgba(5,5,5,.12);
  box-shadow:
    0 0 0 1px rgba(5,5,5,.04) inset,
    0 0 30px rgba(5,5,5,.055),
    0 12px 32px rgba(5,5,5,.06);
}

html[data-theme="light"] .nav-contact::before {
  background:
    radial-gradient(circle, rgba(255,78,28,.75) 1.2px, transparent 1.9px) 18px 12px / 34px 24px,
    linear-gradient(90deg, transparent, rgba(255,118,68,.08), transparent);
  opacity: .5;
}

html[data-theme="light"] .nav-contact:hover,
html[data-theme="light"] .nav-contact:focus-visible {
  color: #050505;
  background: #fff;
  border-color: rgba(5,5,5,.22);
  box-shadow:
    0 0 0 1px rgba(5,5,5,.08) inset,
    0 0 40px rgba(255,110,54,.12),
    0 14px 34px rgba(5,5,5,.08);
}

.page {
  position: relative;
  width: 100%;
  height: var(--vh, 100vh);
  min-height: 0;
  padding: clamp(48px, 7vh, 80px) var(--page-pad);
  overflow: hidden;
}

.site {
  width: 100%;
  overflow: clip;
  background: var(--bg);
}

.hero-scroll {
  position: relative;
  height: var(--vh, 100vh);
  background: var(--bg);
}

.hero-screen {
  position: relative;
  height: var(--vh, 100vh);
  padding-top: clamp(48px, 7vh, 80px);
  background: var(--bg);
}

.hero-particles {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: none;
  overflow: hidden;
  opacity: .86;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, #000 0%, #000 78%, transparent 100%);
}

.hero-particles::before {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 78% 62%, rgba(255,255,255,.025), transparent 17%),
    radial-gradient(circle at 18% 72%, rgba(255,255,255,.016), transparent 15%);
  content: "";
  animation: hero-ambient-glow 12s ease-in-out infinite alternate;
}

.hero-particle-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.hero-particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  box-shadow:
    0 0 8px rgba(255,255,255,.55),
    0 0 22px rgba(255,255,255,.18);
  opacity: var(--alpha);
  animation: hero-particle-float var(--duration) cubic-bezier(.45, 0, .55, 1) var(--delay) infinite alternate;
  will-change: transform, opacity;
}

.hero-particle.is-bright {
  background: #fff;
  box-shadow:
    0 0 10px rgba(255,255,255,.68),
    0 0 26px rgba(255,255,255,.24);
}

.hero-particle.is-accent {
  background: #fff;
  box-shadow:
    0 0 12px rgba(255,255,255,.85),
    0 0 34px rgba(255,255,255,.38);
}

.hero-particle.is-dim {
  background: rgba(255,255,255,.82);
  box-shadow:
    0 0 6px rgba(255,255,255,.32),
    0 0 18px rgba(255,255,255,.1);
}

@keyframes hero-particle-float {
  0% { transform: translate3d(0, 0, 0) scale(.7); opacity: var(--alpha-low); }
  32% { transform: translate3d(var(--drift-x-a), var(--drift-y-a), 0) scale(1.12); opacity: var(--alpha); }
  67% { transform: translate3d(var(--drift-x-b), var(--drift-y-b), 0) scale(.82); opacity: var(--alpha-end); }
  100% { transform: translate3d(var(--drift-x), var(--drift-y), 0) scale(1.35); opacity: var(--alpha-end); }
}

@keyframes hero-ambient-glow {
  from { transform: translate3d(-2%, 1%, 0) scale(.96); opacity: .7; }
  to { transform: translate3d(2%, -1%, 0) scale(1.04); opacity: 1; }
}

.hero-screen::after {
  content: "";
  position: absolute;
  z-index: 10;
  inset: 0;
  background: rgba(var(--hero-overlay-rgb), var(--hero-shade, 0));
  pointer-events: none;
}

.title-stage {
  position: relative;
  z-index: 20;
  width: 100%;
  overflow: visible;
  margin-bottom: 0;
  transition: height .3s ease;
}

.title-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .08s linear;
  will-change: opacity;
}

.title-panel.is-active {
  z-index: 2;
  opacity: 1;
}

.title-panel.is-exiting {
  z-index: 1;
  opacity: 1;
}

.title-panel.is-waiting {
  z-index: 2;
  opacity: 0;
}

.text-effect-line {
  display: block;
  overflow: hidden;
  margin-bottom: -.12em;
  padding-bottom: .12em;
}

.text-effect-line-inner {
  display: block;
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  will-change: transform, opacity;
}

.title-panel.is-active .text-effect-line-inner {
  animation: title-line-in .4s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: calc(var(--line-index) * .2s);
}

.title-panel.is-exiting .text-effect-line-inner {
  animation: title-line-out .2s ease both;
}

@keyframes title-line-in {
  from { opacity: 0; transform: translate3d(0, 40px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes title-line-out {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to { opacity: 0; transform: translate3d(0, -12px, 0); }
}

.title-panel h1,
.title-panel h2 {
  color: var(--ink);
  font: 600 clamp(48px, 5.6vw, 112px)/1.08 var(--font-display);
  letter-spacing: -.015em;
}

.inline-photo {
  width: .76em;
  height: .76em;
  margin: 0 .08em;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #050505, #494949);
  border: 1px solid rgba(255,255,255,.7);
  font: 600 14px/1 var(--font-text);
  letter-spacing: 0;
}

.inline-shine {
  width: .72em;
  height: .72em;
  margin-left: .08em;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  color: #fff;
  font: 400 .62em/1 var(--font-display);
}

.subtitle {
  position: relative;
  z-index: 30;
  margin-top: clamp(40px, 5vh, 60px);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font: 400 17px/1.4705882353 var(--font-text);
  letter-spacing: -.022em;
}

.subtitle a {
  position: relative;
  color: #fff;
  font-weight: 600;
}

.subtitle a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s ease;
}

.subtitle a:hover::after { transform: scaleX(1); transform-origin: left; }

.online-dot {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 3px solid #5d5d5d;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .22);
  animation: online 2s infinite;
}

@keyframes online {
  50% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
}

.cards-container {
  position: absolute;
  z-index: 20;
  left: 50%;
  right: auto;
  bottom: -5%;
  width: var(--content-width);
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  overflow: visible;
  transform: translateX(-50%);
}

.card {
  --edge-top: #58c9ff;
  --edge-mid: #286f9f;
  --edge-bottom: #17232b;
  position: relative;
  width: 300px;
  height: 400px;
  flex: 0 0 300px;
  margin-right: var(--overlap);
  overflow: hidden;
  border: 3px solid var(--edge-mid);
  border-radius: 16px;
  box-shadow: none;
  cursor: pointer;
  opacity: 1;
  transform: translateY(0);
  animation: card-rise .6s calc(.2s + var(--i) * .1s) var(--spring);
  animation-fill-mode: backwards;
  transition: transform .4s var(--spring), box-shadow .3s ease, opacity .3s ease;
  will-change: transform, box-shadow, opacity;
  touch-action: none;
  color: #fff;
  background-color: #080808;
  background-image: linear-gradient(155deg, var(--veil-a, rgba(255,255,255,.12)), var(--veil-b, rgba(0,0,0,.72))), url("./assets/projects/tech-card-art.webp");
  background-repeat: no-repeat;
  background-position: center, var(--art-x, 50%) center;
  background-size: 100% 100%, 550% auto;
  background-blend-mode: soft-light, normal;
}

.card::before {
  position: absolute;
  z-index: 6;
  inset: -3px;
  padding: 3px;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--edge-top) 0%, var(--edge-mid) 48%, var(--edge-bottom) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  content: "";
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(0,0,0,.48) 0%, transparent 30%, rgba(0,0,0,.28) 100%);
}

.card:last-child { margin-right: 0; }

@keyframes card-rise {
  0% { transform: translateY(200px); opacity: 0; }
  60% { transform: translateY(-20px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

.card:hover,
.card:focus-visible {
  outline: none;
  transform: translateY(-82px) rotate(-1deg);
  box-shadow: 0 0 22px color-mix(in srgb, var(--edge-top) 24%, transparent);
}

.card:hover + .card,
.card:focus-visible + .card { transform: translateY(-40px) rotate(.5deg); }

.card:hover + .card + .card,
.card:focus-visible + .card + .card { transform: translateY(-25px) rotate(.25deg); }

.card:hover + .card + .card + .card,
.card:focus-visible + .card + .card + .card { transform: translateY(-12px); }

/* The first card uses the shallower two-step ripple from the reference. */
.card:first-child:hover + .card,
.card:first-child:focus-visible + .card { transform: translateY(-25px) rotate(.5deg); }

.card:first-child:hover + .card + .card,
.card:first-child:focus-visible + .card + .card { transform: translateY(-12px) rotate(.25deg); }

.card:first-child:hover + .card + .card + .card,
.card:first-child:focus-visible + .card + .card + .card { transform: translateY(0); }

.card-title {
  position: absolute;
  z-index: 4;
  top: 20px;
  left: 24px;
  color: currentColor;
  font: 600 19px/1.2105263158 var(--font-display);
  letter-spacing: .012em;
  white-space: nowrap;
  text-shadow: 0 2px 18px rgba(0,0,0,.72);
}

.card-title.dark { color: currentColor; }

.visual {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: currentColor;
  pointer-events: none;
  display: none;
}

.card-cyan {
  --art-x: 0%;
  --veil-a: rgba(255,255,255,.05);
  --veil-b: rgba(0,0,0,.3);
  --edge-top: #2bf2ff;
  --edge-mid: #287fe6;
  --edge-bottom: #121a32;
  background-image: linear-gradient(155deg, var(--veil-a), var(--veil-b)), url("./assets/projects/westshade/cover.webp");
  background-position: center, center;
  background-size: 100% 100%, cover;
}
.card-teal {
  --veil-a: rgba(255,255,255,.04);
  --veil-b: rgba(0,0,0,.28);
  --edge-top: #48bdff;
  --edge-mid: #267baa;
  --edge-bottom: #1d2d36;
  background-image: linear-gradient(155deg, var(--veil-a), var(--veil-b)), url("./assets/projects/extremetent/cover.webp");
  background-position: center, center;
  background-size: 100% 100%, cover;
}
.card-charcoal {
  --veil-a: rgba(255,255,255,.04);
  --veil-b: rgba(0,0,0,.3);
  --edge-top: #f7d79f;
  --edge-mid: #a08768;
  --edge-bottom: #3d3934;
  background-image: linear-gradient(155deg, var(--veil-a), var(--veil-b)), url("./assets/projects/argahome/cover.webp");
  background-position: center, center;
  background-size: 100% 100%, cover;
}
.card-red { --art-x: 30%; --veil-a: rgba(255,255,255,.08); --veil-b: rgba(0,0,0,.84); }
.card-paper { --art-x: 40%; --veil-a: rgba(255,255,255,.24); --veil-b: rgba(0,0,0,.62); }
.card-orange { --art-x: 50%; --veil-a: rgba(255,255,255,.06); --veil-b: rgba(0,0,0,.86); }
.card-pink { --art-x: 60%; --veil-a: rgba(255,255,255,.2); --veil-b: rgba(0,0,0,.72); }
.card-blue { --art-x: 70%; --veil-a: rgba(255,255,255,.05); --veil-b: rgba(0,0,0,.84); }
.card-black { --art-x: 80%; --veil-a: rgba(255,255,255,.16); --veil-b: rgba(0,0,0,.76); }
.card-yellow { --art-x: 90%; --veil-a: rgba(255,255,255,.07); --veil-b: rgba(0,0,0,.86); }
.card-grey { --art-x: 100%; --veil-a: rgba(255,255,255,.22); --veil-b: rgba(0,0,0,.66); }

.visual-orbits i {
  position: absolute;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: .82;
}
.visual-orbits i:nth-child(1) { width: 78%; aspect-ratio: 1; }
.visual-orbits i:nth-child(2) { width: 48%; aspect-ratio: 1; }
.visual-orbits i:nth-child(3) { width: 12%; aspect-ratio: 1; background: currentColor; opacity: 1; }

.visual-monogram,
.visual-letter {
  font: 700 7rem/1 Arial, sans-serif;
  letter-spacing: -.13em;
  transform: rotate(-9deg);
}

.visual-ring i {
  width: 58%;
  aspect-ratio: 1;
  border: 3px solid currentColor;
  border-radius: 50%;
  box-shadow: 22px 22px 0 currentColor;
}

.visual-grid {
  padding: 82px 36px 38px;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  transform: rotate(9deg);
}
.visual-grid i { width: 100%; aspect-ratio: 1; border: 2px solid currentColor; }
.visual-grid i:nth-child(2), .visual-grid i:nth-child(3) { background: currentColor; }

.visual-prototype { font: 400 13rem/1 var(--serif); transform: rotate(-12deg); }

.visual-lines { padding: 100px 42px 48px; align-content: center; gap: 22px; }
.visual-lines i { width: 100%; height: 3px; background: currentColor; transform: rotate(-8deg); }
.visual-lines i:nth-child(2) { width: 70%; justify-self: end; }
.visual-lines i:nth-child(3) { width: 85%; justify-self: start; }

.visual-mail i {
  width: 58%;
  aspect-ratio: 1.4;
  border: 4px solid currentColor;
  border-radius: 7px;
}
.visual-mail i::before,
.visual-mail i::after {
  content: "";
  position: absolute;
  top: 45%;
  width: 38%;
  height: 4px;
  background: currentColor;
}
.visual-mail i::before { left: 19%; transform: rotate(28deg); }
.visual-mail i::after { right: 19%; transform: rotate(-28deg); }

.visual-resume { align-content: center; gap: 16px; }
.visual-resume b { font: 700 6rem/1 var(--mono); }
.visual-resume i { width: 52%; height: 3px; background: currentColor; }
.visual-resume i:nth-of-type(2) { width: 38%; }

.cards-container.stack-mode {
  position: absolute;
  top: 65%;
  left: 42%;
  right: auto;
  bottom: auto;
  width: var(--stack-w);
  height: var(--stack-h);
  display: block;
  transform: translate(-50%, -50%);
  overflow: visible;
  isolation: isolate;
  perspective: 600px;
}

.stack-mode .card {
  position: absolute;
  inset: 0;
  width: var(--stack-w);
  height: var(--stack-h);
  margin: 0;
  opacity: var(--stack-opacity, 1);
  animation: none;
  overflow: hidden;
  transform-origin: 90% 90%;
  transform-style: preserve-3d;
  transform:
    translate3d(var(--stack-x, 0px), var(--stack-y, 0px), 0)
    rotateX(var(--stack-rotate-x, 0deg))
    rotateY(var(--stack-rotate-y, 0deg))
    rotate(var(--stack-rotate))
    scale(var(--stack-scale));
  filter: brightness(var(--stack-brightness, 1));
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition:
    transform .4s cubic-bezier(.34, 1.56, .64, 1),
    box-shadow .3s ease,
    opacity .3s ease,
    filter .3s ease;
}

.stack-mode .card::after {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.stack-mode .card:not(.is-top) { pointer-events: none; }
.stack-mode .card.is-top {
  cursor: grab;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.stack-mode .card.is-dragging { cursor: grabbing; transition: none; }

.cards-container.stack-mode {
  transform: translate(-50%, -50%);
}

.stack-mode .card-title {
  top: 20px;
  left: 24px;
  font-size: 1.5rem;
}

/* Mobile and tablet: centered hero card with three fanned cards on either side. */
.cards-container.fan-mode {
  left: 50%;
  perspective: none;
}

.fan-mode .card {
  transform-origin: 50% 100%;
  border: 3px solid var(--edge-mid);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0,0,0,.3);
  background-blend-mode: normal;
  transition:
    transform .48s cubic-bezier(.2, .8, .2, 1),
    box-shadow .32s ease,
    opacity .28s ease,
    filter .36s ease;
}

.fan-mode .card::before {
  display: block;
}

.fan-mode .card::after {
  background:
    linear-gradient(
      rgba(0,0,0,var(--stack-mask, 0)),
      rgba(0,0,0,var(--stack-mask, 0))
    ),
    linear-gradient(180deg, rgba(0,0,0,.06) 0%, transparent 54%, rgba(0,0,0,.24) 100%);
  box-shadow: none;
  -webkit-backdrop-filter: blur(var(--stack-blur, 0));
  backdrop-filter: blur(var(--stack-blur, 0));
}

.fan-mode .card.is-top {
  box-shadow: 0 14px 36px rgba(0,0,0,.4);
}

.fan-mode .card-title {
  top: auto;
  right: auto;
  bottom: 18px;
  left: 50%;
  max-width: calc(100% - 28px);
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  color: #fff;
  background: transparent;
  font: 600 15px/1.1 var(--font-display);
  letter-spacing: .01em;
  text-overflow: ellipsis;
  text-shadow: 0 2px 14px rgba(0,0,0,.78);
  transform: translateX(-50%);
  transition: opacity .2s ease;
}

.fan-mode .card:not(.is-top) .card-title {
  opacity: 0;
}

@media (min-width: 1024px) {
  :root {
    --desktop-card-width: clamp(220px, min(19vw, 37vh), 300px);
  }

  .cards-container:not(.stack-mode) .card {
    width: var(--desktop-card-width);
    height: auto;
    aspect-ratio: 3 / 4;
    flex-basis: var(--desktop-card-width);
  }

  .cards-container:not(.stack-mode) .card-title {
    top: clamp(15px, 1.4vw, 20px);
    left: clamp(17px, 1.7vw, 24px);
    font-size: clamp(1rem, 1.35vw, 1.5rem);
  }
}

.scroll-cue {
  position: absolute;
  z-index: 30;
  right: var(--page-pad);
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.62);
  font: 400 10px/1 var(--mono);
  letter-spacing: .16em;
  opacity: var(--hero-copy-opacity);
  transform: translateY(var(--hero-copy-y));
}

.scroll-cue i {
  position: relative;
  width: 38px;
  height: 1px;
  overflow: hidden;
  background: rgba(255,255,255,.22);
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform: translateX(-100%);
  animation: scroll-line 1.8s ease-in-out infinite;
}

@keyframes scroll-line {
  45%, 55% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

.section-index {
  color: rgba(255,255,255,.56);
  font: 400 11px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.showcase-intro {
  --intro-scale: .82;
  --intro-opacity: 0;
  --intro-y: 80px;
  --glow-scale: .65;
  --glow-opacity: .25;
  position: relative;
  z-index: 30;
  height: 170vh;
  background: #050505;
}

.showcase-intro-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background: #050505;
}

.showcase-glow {
  position: absolute;
  z-index: -1;
  width: min(76vw, 1320px);
  aspect-ratio: 1.75;
  border-radius: 50%;
  opacity: var(--glow-opacity);
  transform: scale(var(--glow-scale));
  background: radial-gradient(ellipse at center, #9627ff 0%, #641bb5 30%, rgba(54,19,86,.7) 53%, rgba(5,5,5,0) 76%);
  filter: blur(42px);
  will-change: transform, opacity;
}

.showcase-copy {
  width: var(--content-width);
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
  opacity: var(--intro-opacity);
  transform: translateY(var(--intro-y)) scale(var(--intro-scale));
  transform-origin: center;
  will-change: transform, opacity;
}

.showcase-copy h2 {
  font: 600 clamp(64px, 6.4vw, 80px)/1.05 var(--font-display);
  letter-spacing: -.015em;
}

.showcase-copy > p:last-child {
  max-width: 620px;
  color: #86868b;
  font: 400 17px/1.4705882353 var(--font-text);
  letter-spacing: -.022em;
}

.featured-work {
  --feature-progress: 0;
  position: relative;
  z-index: 40;
  height: 650vh;
  background: #050505;
}

.featured-work-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 112%, rgba(136,63,255,.16), rgba(5,5,5,0) 44%),
    #050505;
  isolation: isolate;
}

.featured-work-shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5,5,5,.15), rgba(5,5,5,.78)),
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.05), rgba(5,5,5,0) 42%);
  opacity: calc(.25 + (var(--feature-progress) * .35));
  pointer-events: none;
}

.project-panel {
  position: absolute;
  z-index: var(--project-index);
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  pointer-events: none;
}

.project-panel:has(.featured-project:hover),
.project-panel:has(.featured-project:focus-visible) {
  z-index: var(--project-index);
}

.featured-project {
  --panel-y: 76vh;
  --panel-scale: .88;
  --panel-opacity: 0;
  --panel-dim: .65;
  --panel-blur: 0px;
  position: relative;
  width: var(--content-width);
  height: min(58vh, 620px);
  display: grid;
  grid-template-columns: minmax(520px, 68%) minmax(340px, 32%);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  color: var(--ink);
  background: #080808;
  box-shadow: 0 24px 90px rgba(0,0,0,.58);
  opacity: var(--panel-opacity);
  transform: translate3d(0, var(--panel-y), 0) scale(var(--panel-scale));
  transform-origin: center;
  filter: brightness(calc(1 - var(--panel-dim) * .42)) blur(var(--panel-blur));
  pointer-events: auto;
  will-change: transform, opacity, filter;
}

.featured-project::before {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(255,255,255,.12) 52%, rgba(255,255,255,.48));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.featured-project::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0;
  background: rgba(0,0,0,var(--panel-dim));
  pointer-events: none;
  transition: opacity .2s linear;
}

.featured-project-copy {
  position: relative;
  z-index: 3;
  min-width: 0;
  padding: clamp(34px, 4vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  border-left: 1px solid rgba(255,255,255,.18);
  background: rgba(5,5,5,.97);
}

.featured-project.is-reverse .featured-project-copy {
  order: 2;
  border-left: 1px solid rgba(255,255,255,.2);
}

.featured-project-count,
.featured-project-type {
  color: rgba(255,255,255,.55);
  font: 400 11px/1.2 var(--mono);
  letter-spacing: .13em;
}

.featured-project h3 {
  margin: 18px 0 26px;
  font: 600 clamp(48px, 4.4vw, 64px)/1.0625 var(--font-display);
  letter-spacing: -.009em;
  overflow-wrap: anywhere;
}

.featured-project-description {
  max-width: 470px;
  color: rgba(255,255,255,.68);
  font: 400 clamp(15px, 1.15vw, 17px)/1.4705882353 var(--font-text);
  letter-spacing: -.022em;
}

.featured-project-link {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 14px/1.4285714286 var(--font-text);
  letter-spacing: .08em;
}

.featured-project-link b {
  font: 400 22px/1 Arial, sans-serif;
  transition: transform .3s var(--spring);
}

.featured-project:hover .featured-project-link b,
.featured-project:focus-visible .featured-project-link b { transform: translate(5px, -5px); }

.featured-project:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

.featured-project-visual {
  position: relative;
  min-width: 0;
  order: -1;
  overflow: hidden;
  background-color: #0b0e12;
  background-image: linear-gradient(140deg, rgba(255,255,255,.12), rgba(0,0,0,.56)), url("./assets/projects/tech-card-art.webp");
  background-repeat: no-repeat;
  background-position: center, var(--art-x) center;
  background-size: 100% 100%, 550% auto;
  transition: filter .45s ease, transform .6s var(--spring);
}

.featured-project-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.46));
}

.featured-project-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 46% 42%, rgba(255,255,255,.12), rgba(255,255,255,0) 24%),
    linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,0) 28%, rgba(255,255,255,.06));
  mix-blend-mode: screen;
  opacity: .7;
}

.featured-project-visual span {
  position: absolute;
  z-index: 2;
  left: clamp(24px, 3vw, 52px);
  bottom: clamp(24px, 3vw, 52px);
  font: 600 clamp(21px, 2.2vw, 32px)/1.1904761905 var(--font-display);
  letter-spacing: .011em;
  text-shadow: 0 4px 24px #000;
}

.featured-project:hover .featured-project-visual { filter: brightness(1.14); }

.archive-section {
  position: relative;
  z-index: 60;
  height: 240vh;
  background: #050505;
}

.archive-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #050505;
}

.archive-copy {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 50%;
  width: min(800px, var(--content-width));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  opacity: var(--archive-copy-opacity, 0);
  transform: translate(-50%, -50%) scale(var(--archive-copy-scale, .82));
  will-change: transform, opacity;
}

.archive-copy h2 {
  font: 600 clamp(64px, 6.4vw, 80px)/1.05 var(--font-display);
  letter-spacing: -.015em;
}

.archive-copy > a {
  position: relative;
  margin-top: 10px;
  padding-bottom: 7px;
  font: 600 14px/1.4285714286 var(--font-text);
  letter-spacing: -.016em;
}

.archive-copy > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transition: transform .3s ease;
}

.archive-copy > a:hover::after { transform: scaleX(.35); }

.archive-card {
  --archive-x: 0px;
  --archive-y: 0px;
  --archive-r: 0deg;
  position: absolute;
  z-index: 4;
  width: clamp(210px, 24vw, 440px);
  aspect-ratio: 1.28;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.36);
  border-radius: 8px;
  background-color: #0b0e12;
  background-image: linear-gradient(145deg, rgba(255,255,255,.12), rgba(0,0,0,.68)), url("./assets/projects/tech-card-art.webp");
  background-repeat: no-repeat;
  background-position: center, var(--art-x) center;
  background-size: 100% 100%, 550% auto;
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
  opacity: var(--archive-card-opacity, 0);
  transform: translate3d(var(--archive-x), var(--archive-y), 0) rotate(var(--archive-r)) scale(var(--archive-card-scale, .9));
  transition: filter .35s ease, box-shadow .35s ease;
  will-change: transform, opacity;
}

.archive-card span {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 20px;
  font: 600 clamp(13px, 1.3vw, 19px)/1.2105263158 var(--font-display);
  text-shadow: 0 3px 18px #000;
}

.archive-card:hover,
.archive-card:focus-visible {
  outline: none;
  filter: brightness(1.2);
  box-shadow: 0 22px 72px rgba(255,255,255,.08);
}

.archive-card-one { top: 7vh; left: 7vw; }
.archive-card-two { top: 7vh; right: 7vw; }
.archive-card-three { bottom: 7vh; left: 11vw; }
.archive-card-four { right: 10vw; bottom: 7vh; }

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-screen { padding-top: clamp(48px, 7vh, 80px); }
  .title-panel,
  .title-panel.is-exiting { transform: none; }
  .title-panel h1,
  .title-panel h2 { font-size: clamp(52px, 6.25vw, 64px); line-height: 1.0625; letter-spacing: -.009em; }
  .subtitle { margin-top: 40px; font-size: 17px; gap: 12px; }
  .showcase-glow { width: 110vw; }
  .featured-work { height: 620vh; }
  .project-panel { padding: 0; }
  .featured-project {
    height: 84vh;
    grid-template-columns: 1fr;
    grid-template-rows: 58% 42%;
  }
  .featured-project-visual,
  .featured-project.is-reverse .featured-project-visual { order: 1; }
  .featured-project-copy,
  .featured-project.is-reverse .featured-project-copy {
    order: 2;
    padding: 28px 32px;
    gap: 20px;
    border: 0;
    border-top: 1px solid rgba(255,255,255,.2);
  }
  .featured-project h3 { margin: 12px 0 14px; font-size: clamp(46px, 8vw, 74px); }
  .featured-project-description { max-width: 620px; font-size: 13px; }
  .featured-project-link { position: absolute; right: 32px; bottom: 30px; }
  .archive-card { width: min(35vw, 330px); }
  .archive-card-one { left: 4vw; }
  .archive-card-two { right: 4vw; }
  .archive-card-three { left: 6vw; }
  .archive-card-four { right: 6vw; }
}

@media (max-width: 767px) {
  .hero-screen {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .hero-particles { opacity: .78; }
  .hero-particles::before { opacity: .5; }
  .title-panel,
  .title-panel.is-exiting { transform: none; }
  .title-panel h1,
  .title-panel h2 { font-size: clamp(40px, 12vw, 48px); line-height: 1.0834933333; letter-spacing: -.003em; }
  .inline-photo { font-size: 8px; }
  .subtitle { position: absolute; left: var(--page-pad); bottom: 24px; margin: 0; font-size: 15px; }
  .online-dot { width: 10px; height: 10px; flex-basis: 10px; border-width: 2px; }
  .card-title { top: 12px; left: 14px; font-size: 14px; line-height: 1.2; letter-spacing: -.01em; }
  .visual-monogram,
  .visual-letter { font-size: 5rem; }
  .hero-scroll { height: var(--vh, 100svh); }
  .showcase-glow { width: 140vw; filter: blur(30px); }
  .showcase-copy { gap: 16px; }
  .showcase-copy h2 { font-size: 48px; line-height: 1.0834933333; letter-spacing: -.003em; }
  .showcase-copy > p:last-child { max-width: 300px; font-size: 15px; line-height: 1.4666666667; }
  .section-index { font-size: 9px; }
  .featured-work { height: 620svh; }
  .project-panel { padding: 0; }
  .featured-project {
    width: var(--content-width);
    height: 84svh;
    grid-template-columns: 1fr;
    grid-template-rows: 54% 46%;
    border-radius: 12px;
  }
  .featured-project-visual,
  .featured-project.is-reverse .featured-project-visual { order: 1; }
  .featured-project-copy,
  .featured-project.is-reverse .featured-project-copy {
    order: 2;
    padding: 20px;
    gap: 12px;
    border: 0;
    border-top: 1px solid rgba(255,255,255,.2);
  }
  .featured-project-count { position: absolute; top: 20px; right: 20px; }
  .featured-project-type { font-size: 8px; }
  .featured-project h3 { margin: 12px 0 16px; font-size: 48px; line-height: 1.0834933333; }
  .featured-project-description { max-width: calc(100% - 10px); font-size: 15px; line-height: 1.4666666667; }
  .featured-project-link { position: static; font-size: 12px; }
  .featured-project-link b { font-size: 16px; }
  .featured-project-visual span { left: 18px; bottom: 18px; font-size: 18px; }
  .archive-section { height: 210vh; }
  .archive-copy { width: 80vw; gap: 18px; }
  .archive-copy h2 { font-size: 48px; line-height: 1.0834933333; letter-spacing: -.003em; }
  .archive-copy > a { font-size: 12px; }
  .archive-card { width: 42vw; border-radius: 6px; }
  .archive-card span { top: 12px; left: 12px; font-size: 10px; }
  .archive-card-one { top: 10vh; left: -5vw; }
  .archive-card-two { top: 13vh; right: -7vw; }
  .archive-card-three { bottom: 11vh; left: -8vw; }
  .archive-card-four { right: -5vw; bottom: 8vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
