/* ==========================================================================
   ERFAN MOHAMADBOLAND — Warm editorial dark
   Palette: charcoal #0E0D0B · cream #F2EDE4 · copper #C8855A
   Type: Instrument Serif (display) · Inter (body) · DM Mono (meta)
   ========================================================================== */

:root {
  --bg: #0e0d0b;
  --bg-soft: #15130f;
  --bg-elev: #1a1714;
  --surface: rgba(26, 23, 20, 0.7);
  --surface-strong: rgba(32, 28, 24, 0.92);
  --ink: #f2ede4;
  --ink-soft: #d8d0c2;
  --muted: #9a8f7e;
  --dim: #6b6354;
  --line: rgba(242, 237, 228, 0.1);
  --line-soft: rgba(242, 237, 228, 0.06);
  --line-strong: rgba(242, 237, 228, 0.22);
  --copper: #c8855a;
  --copper-bright: #d99a6c;
  --copper-deep: #a86a42;
  --ember: #e0a47a;
  --page: min(1320px, calc(100vw - 64px));
  --header-height: 80px;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --mono: "DM Mono", "JetBrains Mono", Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.45, 0, 0.15, 1);
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(200, 133, 90, 0.08), transparent 40rem),
    radial-gradient(circle at 92% 90%, rgba(200, 133, 90, 0.05), transparent 36rem),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Grain + canvas layer */
#world {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

body::after {
  position: fixed;
  z-index: 1;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.95  0 0 0 0 0.93  0 0 0 0 0.89  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.035;
  mix-blend-mode: overlay;
  pointer-events: none;
  content: "";
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 5px;
}

::selection { background: var(--copper); color: var(--bg); }

/* Custom cursor */
.cursor-dot,
.cursor-ring {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--ember);
}

.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(224, 164, 122, 0.5);
  transition: width 260ms var(--ease), height 260ms var(--ease),
    border-color 260ms var(--ease), background 260ms var(--ease);
}

.cursor-ring.is-hover {
  width: 64px;
  height: 64px;
  border-color: var(--copper);
  background: rgba(200, 133, 90, 0.06);
}

@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* Skip link */
.skip-link {
  position: fixed;
  z-index: 100;
  top: 16px;
  left: 16px;
  padding: 12px 16px;
  transform: translateY(-160%);
  border-radius: 99px;
  background: var(--ink);
  color: var(--bg);
  transition: transform 180ms ease;
}
.skip-link:focus { transform: translateY(0); }

/* Scroll progress rail */
.scroll-progress {
  position: fixed;
  z-index: 90;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: rgba(242, 237, 228, 0.05);
}
.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--copper-deep), var(--ember));
  will-change: transform;
}

main, .site-header, .site-footer { position: relative; z-index: 2; }

/* Header */
.site-header {
  position: fixed;
  z-index: 50;
  top: 18px;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: var(--page);
  min-height: 64px;
  margin: 0 auto;
  padding: 10px 12px 10px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(14, 13, 11, 0.55);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  width: fit-content;
  min-height: 44px;
}
.brand > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--copper-bright);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: -0.05em;
}
.brand small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 99px;
  background: rgba(242, 237, 228, 0.02);
}
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 99px;
  color: var(--muted);
  font-size: 12px;
  transition: background 240ms ease, color 240ms ease;
}
.site-header nav a:hover,
.site-header nav a.is-active {
  background: rgba(242, 237, 228, 0.06);
  color: var(--ink);
}
.site-header nav a.is-active { color: var(--copper-bright); }

.motion-toggle {
  justify-self: end;
  min-width: 100px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color 240ms ease, color 240ms ease, background 240ms ease;
}
.motion-toggle:hover {
  border-color: var(--line-strong);
  background: rgba(242, 237, 228, 0.04);
  color: var(--ink);
}

/* Sections */
.section {
  position: relative;
  width: var(--page);
  margin: 0 auto;
  padding: 140px 0;
}

.section-index {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 86px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  position: relative;
  margin: 0 0 28px;
  padding-left: 40px;
  color: var(--copper-bright);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  line-height: 1.5;
  text-transform: uppercase;
}
.eyebrow::before {
  position: absolute;
  top: 7px;
  left: 0;
  width: 28px;
  height: 1px;
  background: currentColor;
  content: "";
}

h1, h2, h3, h4, p { margin-top: 0; }

h1, h2 {
  margin-bottom: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.96;
}
h2 { font-size: clamp(56px, 7vw, 112px); }
h2 em, h1 em {
  font-style: italic;
  color: var(--copper-bright);
}

/* HERO */
.hero {
  display: grid;
  min-height: 100svh;
  padding-top: clamp(160px, 20vh, 220px);
  padding-bottom: 52px;
}
.hero-copy { position: relative; z-index: 2; max-width: 1100px; }
.hero h1 {
  max-width: 1040px;
  font-size: clamp(64px, 8.8vw, 148px);
  text-wrap: balance;
}
.hero h1 .word { display: inline-block; overflow: hidden; }
.hero h1 .word > span { display: inline-block; }
.hero-intro {
  max-width: 600px;
  margin: 42px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 40px;
}
.primary-link, .contact-email {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 99px;
  background: var(--copper);
  color: var(--bg);
  box-shadow: 0 20px 60px rgba(200, 133, 90, 0.28);
  font-size: 13px;
  font-weight: 500;
  transition: background 260ms var(--ease), box-shadow 260ms var(--ease), transform 260ms var(--ease);
}
.primary-link:hover, .contact-email:hover {
  background: var(--copper-bright);
  box-shadow: 0 24px 80px rgba(200, 133, 90, 0.4);
}
.text-link {
  position: relative;
  padding: 12px 0;
  color: var(--muted);
  font-size: 13px;
}
.text-link::after {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  height: 1px;
  transform: scaleX(0.3);
  transform-origin: left;
  background: currentColor;
  content: "";
  transition: transform 340ms var(--ease);
}
.text-link:hover { color: var(--ink); }
.text-link:hover::after { transform: scaleX(1); }

.hero-meta {
  align-self: end;
  display: grid;
  grid-template-columns: minmax(180px, 0.5fr) minmax(300px, 1fr);
  gap: 60px;
  width: min(650px, 70%);
  margin-top: 110px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero-meta div { display: grid; gap: 7px; }
.hero-meta strong {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}
.meta-label {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 90px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  display: grid;
  gap: 8px;
  padding: 0 24px;
  border-left: 1px solid var(--line);
  justify-items: start;
}
.stat:first-child { padding-left: 0; border-left: none; }
.stat-value {
  display: block;
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 76px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(180deg, var(--ink) 20%, var(--copper-bright));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scene-caption {
  position: absolute;
  right: 0;
  bottom: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: rotate(-90deg) translateX(100%);
  transform-origin: right bottom;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.scene-line { width: 60px; height: 1px; background: var(--line-strong); }

/* MARQUEE */
.marquee-section {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 26px 0 30px;
  overflow: hidden;
}
.marquee {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 0;
  will-change: transform;
  animation: marquee-scroll 44s linear infinite;
}
body.motion-paused .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}
.marquee-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.marquee-list li {
  position: relative;
  padding: 0 34px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(30px, 3.4vw, 52px);
  font-style: italic;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.marquee-list li::after {
  position: absolute;
  right: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--copper-bright);
  box-shadow: 0 0 14px var(--copper);
  transform: translateY(-50%);
  content: "";
}

/* ABOUT */
.about { min-height: 120vh; }
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(50px, 10vw, 150px);
  align-items: end;
}
.about-copy { padding-bottom: 6px; }
.about-copy > p:first-child {
  margin-bottom: 38px;
  color: var(--ink-soft);
  font-size: clamp(18px, 1.7vw, 25px);
  line-height: 1.7;
}
.current-note {
  display: grid;
  gap: 9px;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.current-note span {
  color: var(--copper-bright);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 130px;
  perspective: 1200px;
}
.focus-card {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 80% 0%, rgba(200, 133, 90, 0.1), transparent 50%),
    linear-gradient(160deg, rgba(26, 23, 20, 0.7), rgba(14, 13, 11, 0.6));
  box-shadow: inset 0 1px rgba(242, 237, 228, 0.04), 0 30px 80px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
  transition: border-color 320ms ease, transform 320ms var(--ease);
}
.focus-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}
.focus-card > span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
}
.focus-card h3 {
  margin: 100px 0 16px;
  font-family: var(--serif);
  font-size: clamp(30px, 2.8vw, 42px);
  font-weight: 400;
  letter-spacing: -0.025em;
}
.focus-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

/* WORK */
.work { padding-bottom: 220px; }
.work-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(480px, 1fr);
  gap: clamp(50px, 9vw, 150px);
  align-items: start;
}
.work-sticky {
  position: sticky;
  top: 150px;
}
.work-sticky h2 { font-size: clamp(58px, 6vw, 96px); }
.work-sticky > p:last-child {
  max-width: 420px;
  margin: 38px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.project-list {
  display: grid;
  gap: 22px;
  perspective: 1400px;
}
.project-card {
  position: relative;
  overflow: hidden;
  min-height: 510px;
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 8%, rgba(200, 133, 90, 0.14), transparent 36%),
    linear-gradient(155deg, rgba(26, 23, 20, 0.92), rgba(14, 13, 11, 0.82));
  box-shadow: 0 42px 120px rgba(0, 0, 0, 0.3), inset 0 1px rgba(242, 237, 228, 0.05);
  backdrop-filter: blur(20px);
  transform-style: preserve-3d;
}
.project-card::after {
  position: absolute;
  right: -120px;
  bottom: -160px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(200, 133, 90, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(200, 133, 90, 0.03), 0 0 0 90px rgba(242, 237, 228, 0.012);
  content: "";
}
.project-topline {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.project-eyebrow {
  margin: 110px 0 16px;
  color: var(--copper-bright);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.project-card h3 {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: clamp(40px, 4.8vw, 68px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.98;
}
.project-description {
  position: relative;
  z-index: 1;
  max-width: 590px;
  color: var(--muted);
  font-size: 14px;
}
.tag-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 42px;
  padding: 0;
  list-style: none;
}
.tag-list li {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
}
.project-link {
  position: absolute;
  z-index: 2;
  right: clamp(28px, 4vw, 52px);
  bottom: clamp(28px, 4vw, 48px);
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  font-size: 11px;
  transition: border-color 260ms ease, background 260ms ease;
}
a.project-link:hover {
  border-color: var(--copper);
  background: rgba(200, 133, 90, 0.08);
}
.project-link-muted { color: var(--dim); }

/* TOOLKIT (bento) */
.toolkit { padding-bottom: 60px; }
.stack-intro { max-width: 1000px; }

/* Magnified lens showcase */
.lens-showcase {
  display: flex;
  justify-content: center;
  margin-bottom: 110px;
}
.lens-card {
  position: relative;
  width: min(100%, 760px);
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(26, 23, 20, 0.85), rgba(14, 13, 11, 0.75));
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3), inset 0 1px rgba(242, 237, 228, 0.04);
  backdrop-filter: blur(18px);
  transition: transform 500ms var(--ease), box-shadow 500ms var(--ease);
}
.lens-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 50px 130px rgba(0, 0, 0, 0.4), inset 0 1px rgba(242, 237, 228, 0.06);
}
.lens-stage {
  position: relative;
  overflow: hidden;
  height: 280px;
  border-radius: 22px;
  background: rgba(14, 13, 11, 0.6);
}
.lens-base,
.lens-reveal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 0 20px;
}
.lens-reveal {
  z-index: 2;
  pointer-events: none;
  user-select: none;
  clip-path: circle(30px at 50% 50%);
  -webkit-clip-path: circle(30px at 50% 50%);
}
.lens-base {
  z-index: 1;
  -webkit-mask-image: radial-gradient(circle 30px at 50% 50%, transparent 100%, black 100%);
  mask-image: radial-gradient(circle 30px at 50% 50%, transparent 100%, black 100%);
}
.lens-row {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: lens-scroll 28s linear infinite;
}
.lens-row[data-direction="rtl"] {
  animation-direction: reverse;
  align-self: flex-end;
}
body.motion-paused .lens-row { animation-play-state: paused; }
@keyframes lens-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-33.333%); }
}
.lens-base .lens-row li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(242, 237, 228, 0.03);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}
.lens-reveal .lens-row li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid rgba(200, 133, 90, 0.35);
  border-radius: 99px;
  background: var(--bg-elev);
  color: var(--copper-bright);
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
  transform: scale(1.22);
  transform-origin: left center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.lens-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  transform: translate3d(0, 0, 0);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
  pointer-events: none;
  transition: opacity 200ms ease;
}
.lens-handle svg { width: 100%; height: 100%; }
.lens-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22%;
  z-index: 4;
  pointer-events: none;
}
.lens-fade-left {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}
.lens-fade-right {
  right: 0;
  background: linear-gradient(-90deg, var(--bg), transparent);
}
.lens-meta {
  padding: 30px 28px 34px;
}
.lens-meta h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(26px, 2.4vw, 36px);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.lens-meta p {
  margin: 0;
  max-width: 600px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}
@media (hover: none), (pointer: coarse) {
  .lens-handle { display: none; }
  .lens-reveal { display: none; }
  .lens-base {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(220px, auto);
  grid-auto-flow: dense;
  gap: 16px;
  margin-top: 110px;
  perspective: 1600px;
}
.bento-card {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 220px;
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 0%, rgba(200, 133, 90, 0.1), transparent 55%),
    linear-gradient(155deg, rgba(26, 23, 20, 0.9), rgba(14, 13, 11, 0.8));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.22), inset 0 1px rgba(242, 237, 228, 0.04);
  backdrop-filter: blur(18px);
  transform-style: preserve-3d;
  transform: perspective(1200px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: border-color 320ms ease, box-shadow 320ms ease;
}
.bento-card.wide { grid-column: span 2; }
.bento-card.tall { grid-row: span 2; }
.bento-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.3), inset 0 1px rgba(242, 237, 228, 0.06);
}
.bento-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  transform: translateZ(40px);
}
.bento-card h3 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(25px, 2.2vw, 34px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.bento-card p {
  margin: 0 0 22px;
  max-width: 460px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.bento-card .tag-list { margin: 0; }
.bento-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 133, 90, 0.2), transparent 65%);
  filter: blur(30px);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(var(--glow-x, 50%), var(--glow-y, 50%), 0);
  transition: opacity 320ms ease;
}
.bento-card:hover .bento-glow { opacity: 1; }

/* STACK / skills */
.stack { min-height: 120vh; }
.skill-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 110px;
  perspective: 1200px;
}
.skill-group {
  min-height: 470px;
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(21, 19, 15, 0.7);
  box-shadow: inset 0 1px rgba(242, 237, 228, 0.03), 0 28px 80px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(16px);
}
.skill-group > p {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.skill-group h3 {
  max-width: 460px;
  margin: 70px 0 38px;
  font-family: var(--serif);
  font-size: clamp(34px, 3.6vw, 54px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
}
.skill-group ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.skill-group li {
  position: relative;
  padding: 11px 0 11px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  transition: color 240ms ease;
}
.skill-group li::before {
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--copper);
  transform: translateY(-50%);
  content: "";
}
.skill-group li:hover { color: var(--ink); }

/* TIMELINE */
.timeline { padding-bottom: 220px; }
.timeline-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.75fr) minmax(500px, 1fr);
  gap: clamp(60px, 10vw, 150px);
}
.timeline-heading {
  position: sticky;
  top: 150px;
  align-self: start;
}
.timeline-heading h2 { font-size: clamp(58px, 6vw, 96px); }
.timeline-content { display: grid; gap: 110px; }
.timeline-block > h3 {
  margin: 0 0 30px;
  color: var(--copper-bright);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.timeline-item {
  display: grid;
  grid-template-columns: minmax(110px, 0.35fr) 1fr;
  gap: 30px;
  padding: 32px 0 38px;
  border-top: 1px solid var(--line);
}
.timeline-date {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.7;
  text-transform: uppercase;
}
.timeline-item h4 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(26px, 2.4vw, 36px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.timeline-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}
.timeline-company {
  margin-bottom: 14px !important;
  color: var(--ink-soft) !important;
  font-size: 12px !important;
}
.timeline-company a { border-bottom: 1px solid var(--line-strong); }

/* CONTACT */
.contact {
  display: grid;
  min-height: 100svh;
  place-items: center;
  align-content: center;
  text-align: center;
}
.contact h2 {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  font-size: clamp(64px, 8.6vw, 142px);
}
.contact-email {
  position: relative;
  z-index: 1;
  margin-top: 58px;
  padding-right: 18px;
  padding-left: 24px;
}
.social-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-top: 44px;
}
.social-row a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 240ms ease, color 240ms ease;
}
.social-row a:hover {
  border-color: var(--copper);
  color: var(--ink);
}
.contact-orbit {
  position: absolute;
  width: min(70vw, 900px);
  aspect-ratio: 1;
  border: 1px solid rgba(242, 237, 228, 0.05);
  border-radius: 50%;
  pointer-events: none;
}
.contact-orbit::before,
.contact-orbit::after {
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(242, 237, 228, 0.045);
  border-radius: inherit;
  content: "";
}
.contact-orbit::after { inset: 28%; }
.contact-orbit span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--copper-bright);
  box-shadow: 0 0 30px var(--copper);
}
.contact-orbit span:nth-child(1) { top: 10%; left: 24%; }
.contact-orbit span:nth-child(2) { right: 5%; bottom: 38%; background: var(--ember); box-shadow: 0 0 30px var(--ember); }
.contact-orbit span:nth-child(3) { bottom: 14%; left: 18%; width: 4px; height: 4px; }

/* FOOTER */
.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 30px;
  align-items: center;
  width: var(--page);
  margin: 0 auto;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }

/* 404 */
.error-title {
  max-width: 920px;
  margin: 0 0 52px;
  font-family: var(--serif);
  font-size: clamp(70px, 10vw, 150px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.92;
}

/* Reveal + parallax */
[data-reveal] { opacity: 1; }
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity 1100ms var(--ease), transform 1100ms var(--ease);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
[data-depth] {
  --parallax-y: 0px;
  --parallax-rx: 0deg;
}
[data-depth].is-visible {
  transform: translate3d(0, var(--parallax-y), 0) rotateX(var(--parallax-rx));
}
body.motion-paused [data-depth].is-visible { transform: none; }

/* Hero word stagger */
.js .hero h1 .word > span {
  transform: translate3d(0, 110%, 0);
  transition: transform 1100ms var(--ease);
}
.js .hero h1.is-visible .word > span {
  transform: translate3d(0, 0, 0);
  transition-delay: calc(var(--i, 0) * 70ms);
}

/* Magnetic elements */
.magnetic {
  transition: transform 260ms var(--ease);
  will-change: transform;
}

/* Responsive */
@media (max-width: 980px) {
  :root { --page: min(100% - 36px, 900px); }
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .hero h1 { font-size: clamp(60px, 12vw, 104px); }
  .about-grid,
  .work-layout,
  .timeline-grid { grid-template-columns: 1fr; }
  .about-copy { max-width: 680px; }
  .work-sticky,
  .timeline-heading {
    position: relative;
    top: auto;
    margin-bottom: 30px;
  }
  .project-list {
    width: min(100%, 760px);
    margin-left: auto;
  }
  .skill-groups { grid-template-columns: 1fr; }
  .skill-group { min-height: 420px; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
  .stat { border-left: none; padding-left: 0; }
  .stat:nth-child(odd) {
    border-right: 1px solid var(--line);
    padding-right: 24px;
  }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-card.wide,
  .bento-card.tall {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 700px) {
  :root { --page: calc(100% - 28px); }
  .site-header {
    top: 10px;
    min-height: 58px;
    padding: 8px 9px 8px 14px;
    border-radius: 14px;
  }
  .brand small { display: none; }
  .brand > span { width: 34px; height: 34px; }
  .motion-toggle { min-width: 92px; min-height: 44px; }
  .section { padding: 105px 0; }
  .section-index { margin-bottom: 54px; }
  .hero { min-height: 100svh; padding-top: 150px; padding-bottom: 26px; }
  .hero h1 { font-size: clamp(52px, 16vw, 82px); }
  .hero-intro { margin-top: 30px; font-size: 16px; }
  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-top: 30px;
  }
  .primary-link { width: 100%; }
  .hero-meta {
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    margin-top: 64px;
  }
  .scene-caption { display: none; }
  h2 { font-size: clamp(48px, 14vw, 72px); }
  .stats-strip { grid-template-columns: 1fr; gap: 18px; }
  .stat {
    padding: 18px 0;
    border-left: none;
    border-top: 1px solid var(--line);
  }
  .stat:first-child { border-top: none; }
  .focus-grid { grid-template-columns: 1fr; margin-top: 80px; }
  .focus-card { min-height: 260px; }
  .focus-card h3 { margin-top: 76px; }
  .project-card { min-height: 540px; border-radius: 18px; }
  .project-eyebrow { margin-top: 82px; }
  .project-card h3 { font-size: clamp(38px, 12vw, 54px); }
  .project-link {
    right: 26px;
    bottom: 26px;
    left: 26px;
    justify-content: space-between;
  }
  .skill-group { min-height: auto; }
  .skill-group h3 { margin-top: 50px; }
  .skill-group ul { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 14px; }
  .contact h2 { font-size: clamp(52px, 15vw, 78px); }
  .contact-email {
    width: 100%;
    overflow: hidden;
    gap: 10px;
    font-size: 11px;
  }
  .contact-orbit { width: 110vw; }
  .site-footer { grid-template-columns: 1fr; gap: 12px; }
  .bento { grid-template-columns: 1fr; }
  .bento-card.wide,
  .bento-card.tall { grid-column: span 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .hero h1 .word > span { transform: none; }
}

@media (forced-colors: active) {
  .site-header,
  .focus-card,
  .project-card,
  .bento-card,
  .skill-group { border: 1px solid CanvasText; }
}
