/* ==========================================================================
   ATELIER INDUSTRIEL — Stylesheet v7
   Big 16:9 cards (Scott Milton) · infinite carousel · stickers · continuous
   ========================================================================== */

@font-face { font-family: 'TX-02'; src: url('../fonts/TX-02/TX-02-Regular.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'TX-02'; src: url('../fonts/TX-02/TX-02-Oblique.otf') format('opentype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'TX-02'; src: url('../fonts/TX-02/TX-02-Medium.otf') format('opentype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'TX-02'; src: url('../fonts/TX-02/TX-02-Medium-Oblique.otf') format('opentype'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'TX-02'; src: url('../fonts/TX-02/TX-02-Bold.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'TX-02'; src: url('../fonts/TX-02/TX-02-Bold-Oblique.otf') format('opentype'); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'TX-02'; src: url('../fonts/TX-02/TX-02-ExtraBold.otf') format('opentype'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'TX-02'; src: url('../fonts/TX-02/TX-02-Retina.otf') format('opentype'); font-weight: 350; font-style: normal; font-display: swap; }

:root {
  --black: #0A0A0A; --ink: #111111; --paper: #F4F1EA; --bone: #E8E2D5;
  --accent: #EF4444; --steel: #6B7280; --grey: #9CA3AF; --grey-d: #4B5563; --grey-l: #D1D5DB; --white: #FFFFFF;
  --font: 'TX-02', sans-serif; --max-w: 1600px;
  --ease-heavy: cubic-bezier(0.16, 1, 0.3, 1); --ease-snap: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-drift: cubic-bezier(0.25, 0.46, 0.45, 0.94); --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font); background: var(--paper); color: var(--ink); font-weight: 400; line-height: 1.5; overflow-x: hidden; }
.t-utility { font-size: 0.72rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.t-num { font-feature-settings: 'tnum' 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* OVERLAYS */
.grain { position: fixed; inset: 0; z-index: 9998; pointer-events: none; opacity: 0.03; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* Custom crosshair cursor — scanner vibe with mix-blend-mode difference (negative effect) */
@media (hover: hover) and (pointer: fine) {
  * { cursor: none !important; }
}
.cursor-cross { position: fixed; top: 0; left: 0; width: 20px; height: 20px; pointer-events: none; z-index: 9999; will-change: transform; mix-blend-mode: difference; }
/* Ring: fixed size (36px — just wider than the 20px cross), perfectly centered on cursor */
.cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999; border-radius: 50%; width: 36px; height: 36px; border: 1.5px solid #fff; mix-blend-mode: difference; opacity: 0; will-change: transform; transition: opacity .15s ease; }

/* Crosshair lines for the custom cursor */
.cursor-cross__h { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 20px; height: 1px; background: #fff; }
.cursor-cross__v { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 1px; height: 20px; background: #fff; }
/* Tiny center dot for precision feel */
.cursor-cross__dot { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 3px; height: 3px; background: var(--accent); mix-blend-mode: normal; border-radius: 50%; }

/* When hovering clickable elements: circle appears on top of cross, both centered on cursor */
body.cursor-hovering .cursor-ring { opacity: 1; }

/* SCANNER */
.scanner { position: fixed; z-index: 10000; pointer-events: none; opacity: 0; transition: opacity 0.12s; transform: translate(-50%, -50%); }
.scanner.active { opacity: 1; }
.scanner__box { width: 200px; height: 200px; position: relative; border: 1px solid rgba(239, 68, 68, 0.6); }
.scanner__crosshair-h, .scanner__crosshair-v { position: absolute; top: 50%; left: 50%; background: var(--accent); transform: translate(-50%, -50%); }
.scanner__crosshair-h { width: 14px; height: 1px; }
.scanner__crosshair-v { width: 1px; height: 14px; }
.scanner__header { position: absolute; top: -22px; left: -1px; background: var(--accent); color: var(--white); padding: 3px 8px; font-size: 10px; font-family: var(--font); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.scanner__footer { position: absolute; bottom: -22px; right: -1px; background: rgba(10,10,10,0.92); color: var(--accent); padding: 2px 7px; font-size: 10px; font-family: var(--font); font-weight: 500; border: 1px solid rgba(239,68,68,0.35); }
.scanner__corner { position: absolute; width: 10px; height: 10px; border: 1.5px solid var(--accent); }
.scanner__corner--tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.scanner__corner--tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.scanner__corner--bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.scanner__corner--br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* NAV */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 200; display: flex; align-items: center; justify-content: space-between; padding: 1.5rem 2.5rem; transition: transform 0.5s var(--ease-heavy), background 0.4s, padding 0.4s, color 0.4s; transform: translateY(-100%); }
.nav.visible { transform: translateY(0); }
/* always-visible: header stays fixed on Work/About/Project pages (never stuck hidden) */
.nav.always-visible { transform: translateY(0); }
.nav.scrolled { background: rgba(244, 241, 234, 0.92); backdrop-filter: blur(14px); padding: 1rem 2.5rem; border-bottom: 1px solid rgba(0,0,0,0.06); }
/* Dark variant for dark-background pages (About, Contact) */
.nav.dark-page.scrolled { background: rgba(10, 10, 10, 0.92); border-bottom: 1px solid rgba(255,255,255,0.08); color: var(--paper); }
.nav.dark-page.scrolled .nav__logo, .nav.dark-page.scrolled .nav__links a { color: var(--paper); }
.nav.dark-page.scrolled .t-utility { color: var(--paper); }
.nav:not(.scrolled) { color: var(--paper); }
.nav:not(.scrolled) .nav__logo .nav__slash { color: var(--accent); }
.nav:not(.scrolled) .t-utility { color: var(--paper); }
.nav__logo { font-size: 0.85rem; font-weight: 500; letter-spacing: 0.02em; }
.nav__logo .nav__slash { margin: 0 0.4em; color: var(--grey-d); }
.nav__logo .nav__sub { margin: 0; color: inherit; }
.nav__links { display: flex; gap: 2rem; list-style: none; }
.nav__links a { position: relative; padding-bottom: 3px; transition: color 0.2s; }
.nav__links a::after { content: ''; position: absolute; bottom: 0; left: 0; height: 1px; width: 0; background: var(--accent); transition: width .3s var(--ease-snap); }
.nav__links a:hover { color: var(--accent); }
.nav__links a:hover::after { width: 100%; }

.app { min-height: 100vh; }

/* LANDING */
.landing { position: relative; min-height: 100vh; background: var(--black); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.landing__render-wrap { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; cursor: crosshair; }
/* Render: near full brightness — only slight contrast boost, NO darkening filter */
.landing__render { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.05); opacity: 0; }
/* Render visible after video ends */
.landing__render-wrap.intro-done .landing__render { opacity: 1; }
/* Intro video: covers render, plays once then instantly hidden to reveal render+scanner */
.landing__intro-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 5; }
.landing__intro-video.done { display: none; }
/* Thermal layer: masked wrapper containing thermal image + technical overlay */
.landing__thermal-layer { position: absolute; inset: 0; z-index: 2; opacity: 1; pointer-events: none; -webkit-mask-image: linear-gradient(black, black); mask-image: linear-gradient(black, black); -webkit-mask-size: 200px 200px; mask-size: 200px 200px; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: var(--mx, -300px) var(--my, -300px); mask-position: var(--mx, -300px) var(--my, -300px); }
.landing__render-wrap.intro-done:hover .landing__thermal-layer .landing__thermal { opacity: 1; }
.landing__render-wrap.intro-done:hover .landing__thermal-layer .landing__overlay { opacity: 0.8; }
.landing__thermal { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: hue-rotate(180deg) saturate(3.5) contrast(1.4) brightness(1.15); transition: opacity 0.3s; }
/* Technical overlay aligned on top of thermal — CRT glitchy analog signal effect */
.landing__overlay { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; mix-blend-mode: screen; transition: opacity 0.3s; animation: crt-glitch-overlay 3s steps(1) infinite; }
@keyframes crt-glitch-overlay {
  0%, 100% { transform: translate(0); filter: none; opacity: 0.8; }
  2% { transform: translate(-2px, 1px); filter: hue-rotate(90deg); opacity: 0.6; }
  4% { transform: translate(2px, -1px); opacity: 0.9; }
  6% { transform: translate(-1px, 0); filter: hue-rotate(180deg); opacity: 0.7; }
  8% { transform: translate(1px, 1px); opacity: 0.85; }
  10% { transform: translate(0); filter: none; opacity: 0.8; }
  47% { transform: translate(0, 0); }
  48% { transform: translate(3px, -2px); filter: hue-rotate(45deg); opacity: 0.5; }
  49% { transform: translate(-3px, 2px); filter: hue-rotate(-45deg); opacity: 0.9; }
  50% { transform: translate(0); filter: none; opacity: 0.8; }
  73% { transform: translate(0); opacity: 0.8; }
  74% { transform: translate(-1px, 2px); filter: hue-rotate(270deg); opacity: 0.6; }
  75% { transform: translate(2px, -1px); filter: none; opacity: 0.85; }
}

/* CRT scanlines + HEAVY moving grain (old thermal camera) on the thermal layer */
.landing__thermal-layer::before {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.2) 0px, rgba(0,0,0,0.2) 1px, transparent 1px, transparent 2px);
  mix-blend-mode: multiply;
  animation: grain-shift 0.08s steps(1) infinite;
}
/* CRT flicker + heavy noise — simulates old thermal camera grain */
.landing__thermal-layer::after {
  content: ''; position: absolute; inset: -20px; z-index: 4; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2.5' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.4 0 0 0 0 0.27 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  mix-blend-mode: screen;
  opacity: 0.35;
  animation: grain-noise 0.06s steps(1) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-1px, 1px); }
  40% { transform: translate(1px, -1px); }
  60% { transform: translate(-1px, 0); }
  80% { transform: translate(1px, 1px); }
  100% { transform: translate(0, -1px); }
}
@keyframes grain-noise {
  0% { transform: translate(0, 0); }
  10% { transform: translate(-5px, 3px); }
  20% { transform: translate(4px, -2px); }
  30% { transform: translate(-3px, 5px); }
  40% { transform: translate(5px, 1px); }
  50% { transform: translate(-4px, -3px); }
  60% { transform: translate(3px, 4px); }
  70% { transform: translate(-5px, -1px); }
  80% { transform: translate(2px, -5px); }
  90% { transform: translate(-2px, 2px); }
  100% { transform: translate(0, 0); }
}
/* Old flickering brightness pulse */
@keyframes crt-flicker {
  0% { opacity: 0.3; }
  25% { opacity: 0.5; }
  50% { opacity: 0.2; }
  75% { opacity: 0.6; }
  100% { opacity: 0.35; }
}

/* DYNAMIC DETECTION — Blob Tracking constellation style (TouchDesigner-inspired) */
.landing__detect { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.detect-node { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%); box-shadow: 0 0 4px rgba(255,255,255,0.6); transition: opacity 0.3s; }
.detect-node.active { box-shadow: 0 0 8px rgba(239,68,68,0.9), 0 0 2px rgba(255,255,255,0.8); }
.detect-ring { position: absolute; border: 0.6px solid rgba(255,255,255,0.35); border-radius: 50%; transform: translate(-50%, -50%); transition: opacity 0.3s; pointer-events: none; }
.detect-ring.active { border-color: rgba(239,68,68,0.5); }
.detect-wire { position: absolute; height: 0.5px; background: rgba(255,255,255,0.2); transform-origin: left center; pointer-events: none; transition: opacity 0.3s; }
.detect-wire.active { background: rgba(239,68,68,0.4); height: 0.8px; }
.detect-tag { position: absolute; font-size: 0.38rem; font-family: monospace; color: rgba(255,255,255,0.55); transform: translate(6px, -50%); white-space: nowrap; transition: opacity 0.3s, color 0.3s; }
.detect-tag.active { color: var(--accent); }
.detect-cross { position: absolute; width: 30px; height: 30px; transform: translate(-50%, -50%); opacity: 0.7; pointer-events: none; }
.detect-cross::before, .detect-cross::after { content: ''; position: absolute; background: rgba(255,255,255,0.2); }
.detect-cross::before { top: 50%; left: 0; right: 0; height: 0.5px; transform: translateY(-50%); }
.detect-cross::after { left: 50%; top: 0; bottom: 0; width: 0.5px; transform: translateX(-50%); }
.detect-cross.active::before, .detect-cross.active::after { background: rgba(239,68,68,0.4); }
.landing__inner { position: relative; z-index: 3; padding: 0 2.5rem 5rem; color: var(--paper); pointer-events: none; }
.landing__label { color: rgba(244, 241, 234, 0.55); }
.landing__scroll-hint { position: absolute; bottom: 2rem; right: 2.5rem; z-index: 3; color: rgba(244, 241, 234, 0.35); pointer-events: none; animation: bob 2.5s var(--ease-drift) infinite; }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(6px)} }

/* INTRO — more fun, engaging philosophy + organic interests */
.intro { position: relative; background: var(--black); color: var(--paper); padding: 10rem 2.5rem; overflow: hidden; }
.intro__inner { max-width: 1200px; margin: 0 auto; }
.intro__label { color: var(--accent); margin-bottom: 1.5rem; }

/* Philosophy: big editorial heading with marquee strip of keywords */
.intro__heading { font-size: clamp(2.5rem, 7vw, 5.5rem); font-weight: 200; line-height: 0.95; margin-bottom: 3rem; max-width: 1000px; letter-spacing: -0.02em; }
.intro__heading em { color: var(--accent); font-style: normal; font-weight: 500; }

/* Split body: two-column layout with sticky label */
.intro__body-grid { display: grid; grid-template-columns: 200px 1fr; gap: 4rem; margin-bottom: 5rem; }
.intro__body-label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); padding-top: 0.5rem; border-top: 1px solid var(--accent); position: sticky; top: 120px; align-self: start; }
.intro__body { max-width: 620px; }
.intro__body p { color: rgba(244, 241, 234, 0.6); line-height: 1.8; margin-bottom: 1.5rem; }

/* Keywords: ticker/marquee strip */
.intro__keywords { display: flex; gap: 0; margin-top: 2.5rem; border-top: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1); overflow: hidden; }
.intro__keyword { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey); padding: 0.6rem 1.2rem; border-right: 1px solid rgba(255,255,255,0.08); transition: all 0.3s; white-space: nowrap; }
.intro__keyword:last-child { border-right: none; }
.intro__keyword:hover { border-color: var(--accent); color: var(--accent); }

/* Interests & Obsessions — organic scattered layout */
.intro__interests-label { color: var(--grey); margin-top: 5rem; margin-bottom: 2rem; display: flex; align-items: center; gap: 1rem; }
.intro__interests-label::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.1); }

/* Organic masonry — varied sizes, slight rotations, no hover reactivity */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 80px;
  gap: 10px;
}
.interests-grid__item { position: relative; overflow: hidden; background: var(--ink); cursor: default; }
/* Varied organic sizes — every Nth item spans differently */
.interests-grid__item:nth-child(1)  { grid-column: span 2; grid-row: span 3; }
.interests-grid__item:nth-child(2)  { grid-column: span 1; grid-row: span 2; }
.interests-grid__item:nth-child(3)  { grid-column: span 2; grid-row: span 2; }
.interests-grid__item:nth-child(4)  { grid-column: span 1; grid-row: span 3; }
.interests-grid__item:nth-child(5)  { grid-column: span 1; grid-row: span 2; }
.interests-grid__item:nth-child(6)  { grid-column: span 2; grid-row: span 3; }
.interests-grid__item:nth-child(7)  { grid-column: span 1; grid-row: span 2; }
.interests-grid__item:nth-child(8)  { grid-column: span 2; grid-row: span 2; }
.interests-grid__item:nth-child(9)  { grid-column: span 1; grid-row: span 3; }
.interests-grid__item:nth-child(10) { grid-column: span 2; grid-row: span 2; }
.interests-grid__item:nth-child(11) { grid-column: span 1; grid-row: span 2; }
.interests-grid__item:nth-child(12) { grid-column: span 2; grid-row: span 3; }
.interests-grid__item:nth-child(13) { grid-column: span 1; grid-row: span 2; }
/* Secondary content — static treatment, no hover reaction */
.interests-grid__item--plate { display: flex; align-items: flex-end; }
.interests-grid__item img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.9) brightness(0.55) contrast(1.2); }
.interests-grid__name { position: absolute; bottom: 8px; left: 8px; z-index: 2; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--white); pointer-events: none; }

/* ============================================================
   WORKS — Big 16:9 cards, Scott Milton rhythm with whitespace
   ============================================================ */
/* ==== WORK — teenage.engineering grid: borderless, gapless, 3-col tiles ==== */
.works { padding: 7rem 0 0; max-width: none; margin: 0 auto; }
.works__head { padding: 0 3rem 1.6rem; display: flex; justify-content: space-between;
  align-items: baseline; gap: 1.5rem; color: var(--steel); }
.works__count { color: var(--steel); }

.work-grid { display: block; }
.work-row { display: grid; grid-template-columns: repeat(3, 1fr); }
.work-card { position: relative; display: block; overflow: hidden; background: var(--ink);
  cursor: pointer; will-change: transform, opacity; aspect-ratio: 4/3; }
.work-card--big { grid-column: 1 / -1; aspect-ratio: 21/9; }
.work-card img, .work-card svg, .work-card__plate { width: 100%; height: 100%;
  object-fit: cover; display: block; transition: transform 1.1s var(--ease-heavy), filter .5s; }
.work-card__plate { position: absolute; inset: 0; display: flex; align-items: flex-end;
  justify-content: flex-end; padding: 1.5rem; }
.work-card__plate span { font-size: clamp(4rem, 10vw, 9rem); font-weight: 500;
  letter-spacing: -0.06em; color: rgba(255,255,255,0.10); line-height: 0.8; }
.work-card:hover img { transform: scale(1.025); filter: brightness(1.06); }

/* always-on label — small product-name strip, TE style */
.work-card__label { position: absolute; top: 1.1rem; left: 1.2rem; z-index: 3;
  color: #F4F1EA; mix-blend-mode: difference; font-size: 0.78rem; letter-spacing: 0.06em;
  font-weight: 500; }
.work-card__label-num { color: var(--accent); margin-right: 0.55rem; font-family: 'Courier New', monospace; font-size: 0.7rem; }

/* bottom meta strip — visible on hover, quiet by default */
.work-card__overlay { position: absolute; inset: auto 0 0 0; z-index: 2; display: flex;
  flex-direction: column; gap: 0.15rem; padding: 2.6rem 1.3rem 1.1rem;
  background: linear-gradient(to top, rgba(8,8,9,0.78), rgba(8,8,9,0) );
  opacity: 0; transform: translateY(6px); transition: opacity .45s ease, transform .45s var(--ease-heavy); }
.work-card:hover .work-card__overlay, .work-card:focus-visible .work-card__overlay
  { opacity: 1; transform: translateY(0); }
.work-card__num { color: var(--accent); }
.work-card__title { color: var(--paper); font-size: clamp(1.05rem, 1.6vw, 1.45rem);
  font-weight: 500; line-height: 1.1; }
.work-card__subtitle { color: rgba(244,241,234,0.72); font-size: 0.85rem; font-style: italic; }
.work-card__meta { color: rgba(244,241,234,0.55); }
.work-card--coming { outline: 1px dashed rgba(255,255,255,0.16); outline-offset: -8px; }
.work-card--util .work-card__label { color: var(--paper); }

@media (max-width: 980px) {
  .work-row { grid-template-columns: repeat(2, 1fr); }
  .works__head { padding: 0 1.4rem 1.2rem; flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .work-row { grid-template-columns: 1fr; }
  .work-card, .work-card--big { aspect-ratio: 4/3; }
}

/* PERSONAL — infinite carousel */
.personal-section { position: relative; background: var(--black); padding: 5rem 0; overflow: hidden; }
.personal-section__head { padding: 0 2.5rem; margin-bottom: 2.5rem; display: flex; justify-content: space-between; align-items: flex-end; }
.personal-section__title { font-size: 1.1rem; font-weight: 500; color: var(--paper); }
.personal-section__label { color: var(--grey); }
.carousel-viewport { overflow: hidden; position: relative; }
.carousel-track { display: flex; gap: 1.5rem; padding: 0 2.5rem; will-change: transform; }
.carousel-track--infinite { animation: carousel-scroll 40s linear infinite; }
.carousel-track--infinite:hover { animation-play-state: paused; }
@keyframes carousel-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.carousel-card { flex: 0 0 340px; position: relative; overflow: hidden; background: var(--ink); aspect-ratio: 3/4; }
.carousel-card img, .carousel-card__plate { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.5) contrast(1.1) brightness(0.8); transition: filter 0.5s, transform 0.5s var(--ease-heavy); }
.carousel-card__plate { filter: none; }
.carousel-card:hover img { filter: none; transform: scale(1.05); }
.carousel-card__overlay { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.5rem; background: linear-gradient(to top, rgba(10,10,10,0.9) 0%, transparent 60%); }
.carousel-card__tag { font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; }
.carousel-card__title { color: var(--paper); font-size: 1.1rem; font-weight: 500; margin-bottom: 0.5rem; }
.carousel-card__desc { color: rgba(244,241,234,0.55); font-size: 0.85rem; line-height: 1.4; }

/* FOOTER */
.footer { background: var(--black); color: var(--paper); padding: 6rem 2.5rem 2rem; }
.footer__inner { max-width: var(--max-w); margin: 0 auto; }
.footer__top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; padding-bottom: 4rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer__cta { max-width: 400px; }
.footer__cta-label { color: var(--accent); margin-bottom: 1rem; }
.footer__email { display: inline-block; font-size: clamp(1.2rem, 3vw, 2rem); font-weight: 350; margin-bottom: 1rem; border-bottom: 1px solid var(--grey-d); transition: color .3s, border-color .3s; }
.footer__email:hover { color: var(--accent); border-color: var(--accent); }
.footer__location { color: var(--grey); margin-top: 0.5rem; }
.footer__col-label { color: var(--grey); margin-bottom: 1rem; }
.footer__col-links { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__col-links a { color: rgba(244,241,234,0.7); transition: color .3s; }
.footer__col-links a:hover { color: var(--accent); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; flex-wrap: wrap; gap: 1rem; }
.footer__copy { color: rgba(244,241,234,0.4); }
.footer__socials { display: flex; gap: 1.5rem; }
.footer__socials a { color: rgba(244,241,234,0.5); transition: color .3s; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.footer__socials a:hover { color: var(--accent); }

/* DETAIL PAGES */
.detail { padding-top: 6rem; }
.detail--ted { padding-top: 0; background: #0B0B0B; }
.detail--ted .footer { margin-top: 0; }
.detail--exo { padding-top: 0; background: #EDE6D6; }
.detail--exo .footer { margin-top: 0; }
.detail--hornet { padding-top: 0; background: #030404; }
.detail--hornet .footer { margin-top: 0; }
.detail--speaker { padding-top: 0; background: #F4F3F0; }
.detail--speaker .footer { margin-top: 0; }
.detail--cloud { padding-top: 0; background: #FAF7F2; }
.detail--cloud .footer { margin-top: 0; }
.detail--keysculpt { padding-top: 0; background: #111213; }
.detail--keysculpt .footer { margin-top: 0; }
.detail__nav { max-width: var(--max-w); margin: 0 auto; padding: 0 2.5rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.detail__back { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--steel); transition: color .3s; }
.detail__back:hover { color: var(--accent); }
.detail__hero { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 2.5rem; margin-bottom: 3rem; }
.detail__hero-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.detail__hero-img--full { aspect-ratio: 21/9; }
.detail__hero-plate { width: 100%; aspect-ratio: 16/9; display: flex; align-items: flex-end; padding: 2rem; color: var(--paper); }
.detail__header { max-width: var(--max-w); margin: 0 auto; padding: 0 2.5rem 3rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.detail__title { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 500; line-height: 1.1; }
.detail__title-num { color: var(--accent); font-size: 0.8rem; margin-bottom: 0.5rem; }
.detail__subtitle { color: var(--steel); margin-top: 0.75rem; font-style: italic; }
.detail__specs { display: flex; flex-direction: column; gap: 0.75rem; align-self: end; }
.detail__spec-row { display: flex; gap: 1rem; }
.detail__spec-row .t-utility:first-child { color: var(--steel); width: 100px; flex-shrink: 0; }
.detail__section { max-width: var(--max-w); margin: 0 auto; padding: 3rem 2.5rem; border-top: 1px solid rgba(0,0,0,0.06); }
.detail__section-label { color: var(--accent); margin-bottom: 1rem; }
.detail__body { max-width: 640px; line-height: 1.7; color: var(--ink); }
.detail__body p { margin-bottom: 1rem; }
.detail__gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; max-width: var(--max-w); margin: 0 auto; padding: 3rem 2.5rem; }
.detail__gallery img { width: 100%; height: 100%; object-fit: cover; }
.detail__gallery--full { grid-template-columns: 1fr; }
.detail__gallery--full img { aspect-ratio: 21/9; }
.detail--technical .detail__specs-table { max-width: var(--max-w); margin: 0 auto; padding: 3rem 2.5rem; }
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table th, .specs-table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.06); font-size: 0.85rem; }
.specs-table th { color: var(--steel); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.detail--artsy .detail__header { grid-template-columns: 1fr; }
.detail--artsy .detail__body { max-width: 480px; }
.detail--artsy .detail__gallery { grid-template-columns: 1fr; }
.detail--artsy .detail__gallery img { aspect-ratio: 4/5; }
.detail--indepth .case-study { max-width: 800px; margin: 0 auto; }
.detail--indepth .case-study__block { margin-bottom: 3rem; }
.detail--indepth .case-study__label { color: var(--accent); margin-bottom: 0.5rem; }
.detail--indepth .case-study__heading { font-size: 1.3rem; margin-bottom: 1rem; }
.detail--cinematic .detail__hero { padding: 0; max-width: 100%; }
.detail--cinematic .detail__hero-img { aspect-ratio: 2.39/1; }
.detail--cinematic .detail__header { max-width: 900px; }
.detail--cinematic .detail__section { max-width: 900px; }
.detail--quick .detail__hero { padding: 0 2.5rem; margin-bottom: 2rem; }
.detail--quick .detail__header { padding-bottom: 2rem; }
.detail--quick .detail__section { display: none; }

/* ============================================================
   RICH PROJECT DETAIL — exploded scroll, legends, video
   ============================================================ */

/* Sticky project nav (back + header always accessible) */
.detail__sticky-nav { position: sticky; top: 0; z-index: 100; background: rgba(244,241,234,0.92); backdrop-filter: blur(14px); padding: 1rem 2.5rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(0,0,0,0.06); transform: translateY(-100%); transition: transform .4s var(--ease-heavy); }
.detail__sticky-nav.visible { transform: translateY(0); }
.detail__sticky-nav .detail__back { color: var(--ink); }

/* Hero short */
.detail__hero-short { position: relative; width: 100%; height: 80vh; min-height: 500px; overflow: hidden; }
.detail__hero-short img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.7) contrast(1.15); }
.detail__hero-short-text { position: absolute; bottom: 3rem; left: 2.5rem; z-index: 2; color: var(--paper); }
.detail__hero-short-text .t-utility { color: var(--accent); margin-bottom: 0.5rem; }
.detail__hero-short-text h1 { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 200; line-height: 0.95; letter-spacing: -0.02em; }
.detail__hero-short-text p { color: rgba(244,241,234,0.7); margin-top: 0.5rem; font-style: italic; }

/* Detailed shot with technical legend */
.detail__legend-shot { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; max-width: var(--max-w); margin: 0 auto; padding: 5rem 2.5rem; align-items: center; }
.detail__legend-shot--reverse { grid-template-columns: 300px 1fr; }
.detail__legend-img { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--ink); }
.detail__legend-img img { width: 100%; height: 100%; object-fit: cover; }
/* Technical annotation markers on the image */
.detail__legend-marker { position: absolute; width: 12px; height: 12px; border: 1.5px solid var(--accent); border-radius: 50%; background: rgba(239,68,68,0.1); animation: marker-pulse 2s infinite; }
@keyframes marker-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); } 50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); } }
.detail__legend-info { padding: 1rem 0; }
.detail__legend-info .t-utility { color: var(--accent); margin-bottom: 1rem; }
.detail__legend-info h3 { font-size: 1.3rem; font-weight: 500; margin-bottom: 1rem; }
.detail__legend-info p { color: var(--steel); line-height: 1.7; margin-bottom: 1rem; }
/* Technical legend list */
.detail__legend-list { list-style: none; margin-top: 1.5rem; }
.detail__legend-list li { display: flex; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid rgba(0,0,0,0.06); font-size: 0.85rem; }
.detail__legend-list li span:first-child { color: var(--accent); font-weight: 500; width: 30px; flex-shrink: 0; font-size: 0.75rem; }
.detail__legend-list li span:last-child { color: var(--ink); }

/* Video section */
.detail__video { max-width: var(--max-w); margin: 0 auto; padding: 5rem 2.5rem; }
.detail__video-label { color: var(--accent); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 2rem; }
.detail__video-frame { position: relative; aspect-ratio: 16/9; background: var(--black); overflow: hidden; }
.detail__video-frame img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; filter: grayscale(0.3); }
.detail__video-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 80px; height: 80px; border: 2px solid var(--paper); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--paper); font-size: 1.5rem; padding-left: 6px; transition: transform .3s, background .3s; }
.detail__video-play:hover { transform: translate(-50%, -50%) scale(1.1); background: var(--accent); border-color: var(--accent); }
.detail__video-meta { position: absolute; bottom: 1rem; left: 1rem; color: var(--paper); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; }

/* EXPLODED VIEW — scroll-driven assembly (Apple-style) */
.detail__exploded { position: relative; background: var(--black); color: var(--paper); }
.detail__exploded-pin { height: 100vh; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.detail__exploded-stage { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.detail__exploded-svg { width: min(600px, 70vw); height: min(600px, 70vw); position: relative; }
.detail__exploded-part { position: absolute; will-change: transform; transition: filter 0.4s; }
.detail__exploded-part svg { width: 100%; height: 100%; filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5)); }
.detail__exploded-label { position: absolute; bottom: 3rem; left: 50%; transform: translateX(-50%); text-align: center; z-index: 10; }
.detail__exploded-label .t-utility { color: var(--accent); margin-bottom: 0.5rem; }
.detail__exploded-label h3 { font-size: 2rem; font-weight: 300; color: var(--paper); }
.detail__exploded-progress { position: absolute; top: 50%; right: 3rem; transform: translateY(-50%); width: 2px; height: 200px; background: rgba(255,255,255,0.1); z-index: 10; }
.detail__exploded-progress-bar { position: absolute; top: 0; left: 0; width: 100%; background: var(--accent); height: 0%; }
.detail__exploded-step { position: absolute; right: 3.5rem; color: rgba(255,255,255,0.3); font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; }
.detail__exploded-step.active { color: var(--accent); }

/* ABOUT — white background, rich CV-style layout with 3D head top-left */
.about-page { background: var(--paper); color: var(--ink); min-height: 100vh; padding-top: 6rem; position: relative; }

/* Top section: 3D head (top-left, small) + intro text */
.about-page__top { display: grid; grid-template-columns: 360px 1fr; gap: 3rem; padding: 3rem 3rem 5rem; max-width: var(--max-w); margin: 0 auto; align-items: start; }
.about-page__head-wrap { position: sticky; top: 100px; }
.about-page__head-3d { position: relative; width: 340px; height: 500px; overflow: visible; background: transparent; border-radius: 4px; }
.about-page__head-3d canvas { width: 100% !important; height: 100% !important; display: block; }
.about-page__head-hint { position: absolute; bottom: 8px; left: 8px; right: 8px; font-size: 0.55rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(0,0,0,0.35); pointer-events: none; z-index: 2; text-align: center; }
/* CV-style meta under the head */
.about-page__head-meta { margin-top: 1rem; }
.about-page__head-meta .t-utility { color: var(--steel); display: block; margin-bottom: 0.3rem; }
.about-page__head-meta-name { font-size: 1rem; font-weight: 500; color: var(--ink); margin-bottom: 0.2rem; }

/* Intro text (right side) */
.about-page__intro { padding-top: 0.5rem; }
.about-page__intro-label { color: var(--accent); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 1.5rem; }
.about-page__intro-name { font-size: clamp(3.4rem, 8vw, 7rem); font-weight: 500; line-height: 0.88; letter-spacing: -0.045em; margin-bottom: 0.75rem; text-transform: uppercase; }
.about-page__intro-role { font-size: 1.1rem; color: var(--steel); font-style: italic; margin-bottom: 2.5rem; }
.about-page__intro-quote { font-size: 1.2rem; font-weight: 300; line-height: 1.5; color: var(--ink); border-left: 2px solid var(--accent); padding-left: 1.5rem; max-width: 520px; margin-bottom: 2.5rem; }
.about-page__intro-bio { color: var(--steel); line-height: 1.8; font-size: 1rem; max-width: 560px; }
.about-page__intro-bio p { margin-bottom: 1rem; }
.about-page__download { display: inline-block; color: var(--accent); border: 1px solid rgba(239,68,68,0.3); padding: 0.6rem 1.2rem; margin-top: 1rem; transition: background .3s, border-color .3s; letter-spacing: 0.08em; }
.about-page__download:hover { background: rgba(239,68,68,0.08); border-color: var(--accent); }

/* Section divider with label */
.about-page__section-divider { max-width: var(--max-w); margin: 0 auto; padding: 0 3rem; }
.about-page__section-divider-line { display: flex; align-items: center; gap: 1.5rem; border-top: 1px solid rgba(0,0,0,0.08); padding-top: 2rem; margin-bottom: 0; }
.about-page__section-divider-line .t-utility { color: var(--accent); font-size: 0.72rem; letter-spacing: 0.12em; }

/* Rich content: Experience + Education two columns */
.about-page__content { max-width: var(--max-w); margin: 0 auto; padding: 3rem 3rem 5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }

/* Experience column */
.about-page__col-label { color: var(--accent); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 2rem; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(0,0,0,0.08); }
.about-page__entry { display: grid; grid-template-columns: 90px 1fr; gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.about-page__entry:last-child { border-bottom: none; }
.about-page__entry-year { color: var(--accent); font-size: 0.8rem; font-weight: 500; font-feature-settings: 'tnum' 1; padding-top: 2px; }
.about-page__entry-title { font-size: 1rem; font-weight: 500; color: var(--ink); margin-bottom: 0.3rem; line-height: 1.3; }
.about-page__entry-org { font-size: 0.85rem; color: var(--steel); margin-bottom: 0.5rem; }
.about-page__entry-desc { font-size: 0.85rem; color: var(--steel); line-height: 1.6; }

/* Stats strip */
.about-page__stats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4rem 3rem; max-width: var(--max-w); margin: 0 auto; gap: 0; border-top: 1px solid rgba(0,0,0,0.08); border-bottom: 1px solid rgba(0,0,0,0.08); }
.about-page__stat { display: flex; flex-direction: column; gap: 0.5rem; padding: 0 2rem; border-left: 1px solid rgba(0,0,0,0.08); }
.about-page__stat:first-child { border-left: none; padding-left: 0; }
.about-page__stat .t-num { font-size: clamp(2.5rem, 4vw, 3.5rem); font-weight: 200; line-height: 1; color: var(--ink); }
.about-page__stat .t-utility { color: var(--steel); }

/* Skills */
.about-page__skills { padding: 4rem 3rem; max-width: var(--max-w); margin: 0 auto; }
.about-page__skills-label { color: var(--accent); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 2rem; }
.about-page__skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.6rem; }
.about-page__skill { font-size: 0.82rem; padding: 0.6rem 1rem; border: 1px solid rgba(0,0,0,0.1); color: var(--ink); transition: border-color .3s, color .3s, background .3s; }
.about-page__skill:hover { border-color: var(--accent); color: var(--accent); }

/* CONTACT */
.contact { text-align: center; padding: 8rem 2.5rem 3rem; background: var(--black); color: var(--paper); }
.contact__label { color: rgba(244,241,234,0.5); margin-bottom: 2rem; }
.contact__email { display: inline-block; font-size: 1.1rem; margin-bottom: 2.5rem; padding-bottom: 4px; border-bottom: 1px solid var(--grey-d); transition: color .3s, border-color .3s; }
.contact__email:hover { color: var(--accent); border-color: var(--accent); }
.contact__download { display: inline-block; color: var(--accent); border: 1px solid rgba(239,68,68,0.3); padding: 0.7rem 1.5rem; margin-bottom: 2.5rem; transition: background .3s, border-color .3s; letter-spacing: 0.08em; }
.contact__download:hover { background: rgba(239,68,68,0.1); border-color: var(--accent); }
.contact__socials { display: flex; gap: 2rem; justify-content: center; margin-bottom: 4rem; }
.contact__socials a { color: rgba(244,241,234,0.7); transition: color .3s; }
.contact__socials a:hover { color: var(--accent); }

/* GLITCH — contained to the element only (no layout breakage) */
[data-glitch] { position: relative; display: inline-block; isolation: isolate; }
[data-glitch]::before, [data-glitch]::after { content: attr(data-glitch); position: absolute; top: 0; left: 0; width: 100%; opacity: 0; pointer-events: none; }
[data-glitch]:hover::before { opacity: 0.8; color: var(--accent); animation: glitch-x 0.3s infinite linear alternate-reverse; clip-path: inset(20% 0 60% 0); }
[data-glitch]:hover::after { opacity: 0.8; color: var(--white); animation: glitch-x 0.2s infinite linear alternate-reverse; clip-path: inset(60% 0 10% 0); }
@keyframes glitch-x { 0% { transform: translate(0); } 20% { transform: translate(-2px, 1px); } 40% { transform: translate(2px, -1px); } 60% { transform: translate(-1px, 0); } 80% { transform: translate(1px, 1px); } 100% { transform: translate(0); } }
.scramble-active { color: var(--accent) !important; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav { padding: 1rem 1.25rem; }
  .nav__links { gap: 1.25rem; }
  .nav__logo { font-size: 0.75rem; }
  .works { padding: 6rem 0 3rem; }
  .works__head { padding: 0 1.25rem; }
  .work-grid { padding: 0 1.25rem; }
  .work-card--half-row { grid-template-columns: 1fr; }
  .work-card--full { aspect-ratio: 4/3; }
  .intro { padding: 6rem 1.25rem; }
  .interests-grid { grid-template-columns: repeat(3, 1fr); }
  .interests-grid__item:nth-child(n) { grid-column: span 1; grid-row: span 2; }
  .interests-grid__item:nth-child(3n+1) { grid-column: span 2; grid-row: span 3; }
  .detail__hero, .detail__header, .detail__section, .detail__gallery { padding-left: 1.25rem; padding-right: 1.25rem; }
  .detail__legend-shot { grid-template-columns: 1fr; padding: 3rem 1.25rem; }
  .detail__legend-shot--reverse { grid-template-columns: 1fr; }
  .detail__video { padding: 3rem 1.25rem; }
  .detail__hero-short-text { left: 1.25rem; bottom: 2rem; }
  .about-page__hero { grid-template-columns: 1fr; }
  .about-page__top { grid-template-columns: 1fr; padding: 2rem 1.25rem 3rem; }
  .about-page__head-wrap { position: relative; top: 0; margin: 0 auto; }
  .about-page__head-3d { margin: 0 auto; }
  .about-page__content { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1.25rem 3rem; }
  .about-page__stats { grid-template-columns: 1fr; padding: 2rem 1.25rem; }
  .about-page__stat { border-left: none; border-top: 1px solid rgba(0,0,0,0.08); padding: 1.5rem 0 0; }
  .about-page__stat:first-child { border-top: none; padding-top: 0; }
  .about-page__skills { padding: 2rem 1.25rem; }
  .about-page__section-divider { padding: 0 1.25rem; }
  .detail__header { grid-template-columns: 1fr; }
  .about-page { padding: 6rem 1.25rem 3rem; }
  .about-page__inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer { padding: 4rem 1.25rem 2rem; }
  .footer__top { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .carousel-card { flex: 0 0 260px; }
  .personal-section__head { padding: 0 1.25rem; }
}
@media (max-width: 560px) {
  .nav__links { gap: 0.9rem; }
  .nav__logo { white-space: nowrap; font-size: 0.8rem; }
  .nav__logo .nav__sub, .nav__logo .nav__slash { display: none; }
  .about-page__stats { flex-wrap: wrap; }
  .contact__socials { flex-direction: column; gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .landing__scroll-hint { animation: none; }
  [data-glitch]:hover::before, [data-glitch]:hover::after { animation: none; }
  .carousel-track--infinite { animation: none; }
}
