/* ============================================================
   DOMENICO VESPUCCI — folio 01
   Phase 1: foundation, global layers, preloader, nav, #hero
   ============================================================ */

/* ---------- FONTS ---------- */
@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/anton-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/space-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/space-mono-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/caveat-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- TOKENS ---------- */
:root {
  --bg: #0d0d0d;
  --bg-2: #1c1c1c;
  --hero-bg: #14cd68;
  --img-radius: 12px;
  --fg: #f2f0ea;
  --muted: rgba(242, 240, 234, 0.55);
  --accent: #d0fc03;
  --line: rgba(242, 240, 234, 0.10);

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
  --font-hand: 'Caveat', 'Comic Sans MS', cursive;

  --pad: clamp(20px, 4vw, 56px);
  --header-h: 92px;
}

/* ---------- BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: auto; }

html.is-locked,
html.is-locked body { overflow: hidden !important; height: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.char { display: inline-block; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- GLOBAL LAYERS ---------- */
.noise-overlay,
.scanlines,
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 96px 96px;
}

.noise-overlay {
  z-index: 60;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  background-size: 120px 120px;
  opacity: 0.06;
  animation: noise-flicker 0.35s steps(4) infinite;
}
@keyframes noise-flicker {
  0%   { background-position: 0 0; }
  25%  { background-position: -34px 18px; }
  50%  { background-position: 22px -40px; }
  75%  { background-position: -12px -26px; }
  100% { background-position: 40px 8px; }
}

.scanlines {
  z-index: 61;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.18) 1px, transparent 1px);
  background-size: 100% 3px;
}

.vignette {
  z-index: 62;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px var(--pad);
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }

.brand { display: inline-block; }
.brand-tagline {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.brand-tagline sup { font-size: 8px; vertical-align: super; }
.brand-caption {
  display: block;
  margin-top: 7px;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.nav-desktop ul { display: flex; gap: clamp(20px, 3.4vw, 52px); }
.nav-desktop a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 4px 0 8px;
}
.nav-num {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted);
  transition: color 0.3s ease;
}
.nav-roll {
  display: inline-block;
  overflow: hidden;
  height: 1.1em;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.nav-roll-track {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-roll-line { display: block; line-height: 1.1; }

.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) {
  .nav-desktop a:hover .nav-roll-track { transform: translateY(-50%); }
  .nav-desktop a:hover .nav-num { color: var(--accent); }
  .nav-desktop a:hover::after {
    transform: scaleX(1);
    transform-origin: left center;
  }
}

.nav-desktop a.is-active .nav-num { color: var(--accent); }
.nav-desktop a.is-active .nav-roll-line { color: var(--accent); }
.nav-desktop a.is-active::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
}

/* menu button + mobile menu */
.menu-btn {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.menu-btn-label { font-size: 11px; font-weight: 700; letter-spacing: 0.2em; }
.menu-btn-boxes { display: flex; gap: 4px; }
.menu-box {
  width: 12px;
  height: 12px;
  background: var(--fg);
  transition: background 0.25s ease;
}
.menu-btn.is-open .menu-box { background: var(--accent); }

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: var(--bg-2);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
}
.mobile-menu-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 48px;
  padding: calc(var(--header-h) + 20px) var(--pad) 40px;
}
.mobile-menu ul { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu li { overflow: hidden; }
.mobile-menu li a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 10vw, 4.5rem);
  line-height: 1;
  text-transform: uppercase;
  transform: translateY(110%);
}
.mobile-menu .m-num { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.mobile-menu li a.is-active .m-label { color: var(--accent); }
.mobile-menu-foot { font-size: 10px; letter-spacing: 0.2em; color: var(--muted); }

/* ============================================================
   HERO — 01 INTRODUCE
   ============================================================ */
.section-hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 2;
  background: var(--hero-bg, #14cd68);
}

/* hero-local color adjustments on the bright background */
.section-hero .hero-line--solid,
.section-hero .hero-line--outline { --stroke: #0d0d0d; }
.section-hero .hero-line--outline,
.section-hero .hero-line--solid { color: #0d0d0d; }
.section-hero .hero-line--outline {
  -webkit-text-stroke-color: #0d0d0d;
}
.section-hero .hero-underline { background: #0d0d0d; }
.section-hero .scribble,
.section-hero .brand-caption,
.section-hero .site-header,
.section-hero .hud { color: #0d0d0d; }
.section-hero .scribble-text { color: #0d0d0d; }
.section-hero .scribble-arrow { color: #0d0d0d; }
.section-hero .hero-bg {
  filter: none;
  opacity: 0.55;
  mix-blend-mode: soft-light;
}

.hero-stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: var(--pad);
  will-change: transform;
}

.hero-bg {
  position: absolute;
  inset: -12%;
  z-index: 1;
  background:
    radial-gradient(ellipse 58% 46% at 50% 36%, rgba(208, 252, 3, 0.09), transparent 62%),
    radial-gradient(ellipse 70% 55% at 50% 46%, rgba(242, 240, 234, 0.07), transparent 64%),
    radial-gradient(ellipse 85% 70% at 50% 50%, #202025, transparent 75%);
  filter: blur(4px);
  will-change: transform, opacity;
}

/* giant H1 */
.hero-h1 {
  position: absolute;
  top: 48%;
  left: 0;
  right: 0;
  transform: translateY(-54%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  font-family: var(--font-display);
  font-size: clamp(6rem, 22vw, 26rem);
  line-height: 0.82;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  will-change: transform;
}
.hero-line { display: block; white-space: nowrap; }
.hero-line--solid { padding-left: var(--pad); color: var(--fg); }
.hero-line--outline {
  padding-right: var(--pad);
  text-align: right;
  color: transparent;
  -webkit-text-stroke: 2px var(--fg);
}
.line-mask { display: inline-block; overflow: hidden; vertical-align: bottom; }
.line-inner { display: inline-block; will-change: transform; }
.line-inner .char { display: inline-block; will-change: transform; }

/* portrait — sits IN FRONT of word 1, BEHIND word 2 */
.hero-portrait {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 3;
  width: clamp(280px, 30vw, 460px);
  aspect-ratio: 4 / 5;
  will-change: transform, clip-path;
}
.hero-portrait img {
  border-radius: var(--img-radius, 12px);
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  will-change: transform;
}

.hero-underline {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: calc(var(--pad) + 74px);
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

/* scribbles */
.scribble {
  position: absolute;
  z-index: 4;
  font-family: var(--font-hand);
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  line-height: 1.05;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  will-change: transform, opacity;
}
.scribble-text .char { display: inline-block; white-space: pre; }
/* note 1 sits ON the portrait, horizontally centered over the image */
.scribble--1 {
  top: 12%;
  left: 50%;
  transform: translate(-50%, 0) rotate(-4deg);
  right: auto;
  width: max-content;
}
/* note 2 sits right of centre, clear of the portrait */
.scribble--2 {
  bottom: calc(var(--pad) + 120px);
  right: clamp(17vw, 25vw, 25vw);
  transform: rotate(3deg);
  width: max-content;
}
.scribble-arrow { display: inline-block; margin-right: 6px; }

/* ============================================================
   HUD
   ============================================================ */
.hud {
  position: fixed;
  left: var(--pad);
  bottom: 16px;
  z-index: 65;
  display: flex;
  gap: 18px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  pointer-events: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.hud-item { display: inline-block; }
.hud-sep { letter-spacing: 0; }

/* ============================================================
   SECTION STUBS (remaining phases)
   ============================================================ */
.section-stub {
  position: relative;
  min-height: 60vh;
  z-index: 2;
}

/* ============================================================
   SHARED PIECES
   ============================================================ */
.w-mask { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.w-inner { display: inline-block; will-change: transform; }
.w-inner .char { display: inline-block; white-space: pre; }

.h-line { display: block; white-space: nowrap; }
h2 .h-line--accent,
.h2-accent { color: var(--accent); }
.h-line--accent { color: var(--accent); }

/* kicker */
.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--muted);
}
.kicker-rule {
  display: block;
  width: 54px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
}
.kicker-text { display: inline-block; will-change: transform, opacity; }

/* ============================================================
   MANIFESTO BAND (unnamed → belongs to INTRODUCE)
   ============================================================ */
.manifesto {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: clamp(110px, 16vh, 200px) var(--pad);
  border-top: 1px solid var(--line);
}
.manifesto-inner { max-width: 1440px; margin: 0 auto; }
.manifesto-h2 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7.2vw, 7.5rem);
  line-height: 0.94;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.manifesto-copy {
  max-width: 46ch;
  margin-top: clamp(28px, 4vw, 52px);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  will-change: transform, opacity;
}

/* stat cards */
.stats {
  margin-top: clamp(56px, 9vw, 110px);
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr;
}
.stat-card {
  padding: clamp(18px, 3vw, 36px) clamp(14px, 3vw, 44px) clamp(18px, 3vw, 30px);
  will-change: transform, opacity;
}
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 5.2rem);
  line-height: 1;
  color: var(--fg);
  transition: color 0.3s ease;
}
.stat-value { font-variant-numeric: tabular-nums; }
.stat-suffix { color: var(--accent); font-size: 0.55em; vertical-align: 0.35em; }
.stat-label {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.stat-sub {
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.03em;
  color: var(--muted);
  transition: letter-spacing 0.3s ease;
}
.stat-divider {
  background: var(--line);
  width: 1px;
  transform: scaleY(0);
  transform-origin: top center;
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .stat-card:hover .stat-number { color: var(--accent); }
  .stat-card:hover .stat-sub { letter-spacing: 0.05em; }
}

/* ============================================================
   SKILLS — 02 CAPABILITIES
   ============================================================ */
.section-skills {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: clamp(110px, 15vh, 190px) var(--pad);
}
.skills-inner { max-width: 1440px; margin: 0 auto; }

.skills-head { display: flex; flex-direction: column; align-items: flex-start; }

.skills-h2 {
  margin-top: clamp(20px, 3vw, 40px);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.5vw, 7rem);
  line-height: 0.94;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.skills-grid {
  margin-top: clamp(48px, 7vw, 96px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 2vw, 28px);
}
.skill-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(24px, 3vw, 44px);
  border: 1px solid var(--line);
  background: transparent;
  will-change: transform, opacity;
}
.skill-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom center;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.skill-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(23, 23, 26, 0.28), transparent 72%);
  transition: opacity 0.3s ease;
}
.card-num,
.card-title,
.card-tech { position: relative; z-index: 2; }

.card-num {
  position: absolute;
  top: clamp(18px, 2.4vw, 32px);
  right: clamp(18px, 2.4vw, 32px);
  z-index: 2;
  overflow: hidden;
  height: 1.1em;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
  transition: color 0.3s ease;
}
.card-num .roll-track {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.card-num .roll-line { display: block; line-height: 1.1; }

.card-title {
  max-width: 8em;
  font-size: clamp(1.2rem, 1.9vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}
.card-tech {
  margin-top: clamp(16px, 2.2vw, 26px);
  display: flex;
  flex-wrap: wrap;
  column-gap: 8px;
  row-gap: 2px;
}
.tech-item {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  transition: color 0.3s ease;
}
.tech-item:not(:last-child)::after { content: "·"; margin-left: 8px; }

@media (hover: hover) and (pointer: fine) {
  .skill-card:hover::before { transform: scaleY(1); }
  .skill-card:hover::after { opacity: 1; }
  .skill-card:hover .card-title,
  .skill-card:hover .tech-item { color: var(--bg); transition-delay: 0.08s; }
  .skill-card:hover .card-num { color: var(--bg); }
  .skill-card:hover .card-num .roll-track { transform: translateY(-50%); }
}

/* ============================================================
   WORKS — 03  MADE SOME / BROKE SOME
   ============================================================ */
.section-works {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: clamp(110px, 15vh, 190px) var(--pad);
}
.works-inner { max-width: 1440px; margin: 0 auto; }



/* big statement */





/* ---- case block ---- */
.case { margin-top: clamp(64px, 9vw, 140px); }
.case-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: start;
}

/* desktop pin: the case block is a full-viewport stage so the
   media (with its copy) locks vertically CENTERED, never clipped */
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .case {
    display: flex;
    align-items: center;
    height: 100svh;
    margin-top: 0; /* no gap — pin starts exactly when [top top] */
  }
  .case-grid {
    flex: 1;
    align-items: center;
    min-height: 0;
  }
  .case-media .case-stack {
    aspect-ratio: auto;
    height: min(84vh, 1100px); /* پین: ۸۴٪ ارتفاع ویوپورت (تا سقف ۱۱۰۰px) */
  }
  .case-status { margin-top: 16px; }
}
.case-copy { position: sticky; top: calc(var(--header-h) + 24px); }
.case-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  will-change: transform, opacity;
}
.case-tag {
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 3px 8px;
}
.case-h3 {
  margin-top: clamp(22px, 3vw, 40px);
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 5rem);
  line-height: 0.94;
  text-transform: uppercase;
}
.case-cta {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-top: clamp(26px, 3.4vw, 48px);
  padding-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
}
.cta-label { display: inline-block; transition: color 0.3s ease; }
.cta-arrow {
  display: inline-block;
  overflow: hidden;
  height: 1.1em;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.cta-arrow .roll-track {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.cta-arrow .roll-line { display: block; line-height: 1.1; color: var(--accent); }
.case-cta::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (hover: hover) and (pointer: fine) {
  .case-cta:hover::after {
    transform: scaleX(1);
    transform-origin: left center;
  }
  .case-cta:hover .cta-label { color: var(--accent); }
  .case-cta:hover .cta-arrow {
    transform: translate(6px, -6px);
  }
  .case-cta:hover .cta-arrow .roll-track { transform: translateY(-50%); }
}

/* case media */
.case-media { position: relative; }
.case-status {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.case-counter span { color: var(--accent); }
.case-bar {
  position: relative;
  flex: 1;
  height: 1px;
  background: var(--line);
}
.case-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
}

.case-stack {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--img-radius, 12px);
}
.case-slide {
  position: absolute;
  inset: 0;
  will-change: clip-path;
}
.case-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--img-radius, 12px);
  will-change: transform;
}

/* <1024px: images stack vertically */
@media (max-width: 1023px) {
  .case-grid { grid-template-columns: 1fr; }
  .case-copy { position: static; }
  .case-stack { aspect-ratio: auto; }
  .case-slide {
    position: static;
    aspect-ratio: 4 / 3;
    border-radius: var(--img-radius, 12px);
  }
  .case-slide + .case-slide { margin-top: clamp(14px, 4vw, 28px); }
}

/* ---- work list (accordion) ---- */
.work-list {
  margin-top: clamp(72px, 10vw, 150px);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: start;
}
.wl-h2 {
  margin-top: clamp(18px, 2.6vw, 36px);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.4vw, 6rem);
  line-height: 0.94;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.wl-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: clamp(28px, 4vh, 56px);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
}
@media (min-width: 1024px) {
  .wl-left { position: sticky; top: calc(var(--header-h) + 24px); }
}

.wl-media {
  position: relative;
  margin-top: clamp(28px, 4vh, 56px);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-2);
  border-radius: var(--img-radius, 12px);
}
.wl-media img,
.wl-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wl-right { display: flex; flex-direction: column; min-height: 100%; }
.wl-right .wl-foot { margin-top: auto; padding-top: clamp(28px, 4vh, 56px); }

.wl-items { position: relative; }
.wl-item {
  border-bottom: 1px solid var(--line);
}
.wl-head-btn {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(14px, 2.4vw, 36px);
  align-items: baseline;
  padding: clamp(20px, 3.2vh, 34px) 0;
  text-align: left;
  --wl-border-scale: 0;
  will-change: transform;
}
.wl-head-btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(var(--wl-border-scale, 0));
  transform-origin: left center;
}
.wl-num { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; color: var(--accent); will-change: transform, opacity; }
.wl-name {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3.6rem);
  line-height: 1;
  text-transform: uppercase;
  color: var(--fg);
  transition: color 0.3s ease, opacity 0.3s ease;
  will-change: transform, opacity;
}
.wl-meta {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 0.3s ease;
  will-change: transform, opacity;
}
.wl-item.is-active .wl-meta { opacity: 1; }
.wl-item.is-active .wl-name { color: var(--accent); }

@media (hover: hover) and (pointer: fine) {
  .wl-head-btn { transition: color 0.3s ease; }
  .wl-head-btn:hover { transform: translateX(12px); transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
  .wl-head-btn:hover .wl-name { color: var(--accent); }
  .wl-items:not(:has(.wl-item:hover)) .wl-item .wl-head-btn,
  .wl-items:not(:has(.wl-item:hover)) .wl-item.is-active .wl-name { color: var(--fg); }
  .wl-items:not(:has(.wl-item:hover)) .wl-item.is-active .wl-name { color: var(--accent); }
}

@media (max-width: 1023px) {
  .work-list { grid-template-columns: 1fr; }
  .wl-head { position: static; }
}

@media (hover: none) {
  .wl-head-btn:hover { transform: none; }
}

@media (max-width: 767px) {
  .case-status { flex-wrap: wrap; }
  .wl-head-btn { grid-template-columns: auto 1fr; align-items: baseline; }
  .wl-meta { grid-column: 2; justify-self: end; white-space: normal; text-align: right; max-width: 55%; }
  .wl-name { font-size: clamp(1.5rem, 7.4vw, 2.2rem); }
  .wl-foot { flex-direction: column; gap: 4px; }
}


/* ============================================================
   CONTACT — 05
   ============================================================ */
.section-contact {
  position: relative;
  z-index: 2;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.contact-inner {
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: calc(var(--header-h) + 60px) var(--pad) 24px;
  display: flex;
  flex-direction: column;
}

.contact-h2 {
  margin-top: clamp(20px, 3vw, 44px);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 6.6rem);
  line-height: 0.96;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 12px;
  border-radius: 50%;
  background: var(--accent);
  animation: status-pulse 2s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes status-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.78); }
}

/* ---- email button ---- */
.email-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: block;
  width: min(720px, 100%);
  margin-top: clamp(48px, 7vh, 96px);
  padding: clamp(22px, 3.4vh, 42px) clamp(22px, 3vw, 44px);
  border: 1px solid var(--line);
  background: transparent;
  text-align: left;
  clip-path: inset(0 100% 0 0);
  will-change: transform;
}
.email-btn-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--accent);
  clip-path: circle(0% at var(--ex, 0%) var(--ey, 50%));
  transition: clip-path 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.email-btn-content { position: relative; z-index: 2; }
.email-btn-label,
.email-btn-address,
.email-btn-tag { transition: color 0.3s ease 0.14s; }
.email-btn-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--muted);
}
.email-btn-address {
  display: block;
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.email-btn-address .char { display: inline-block; }
.email-btn-tag {
  display: inline-block;
  overflow: hidden;
  height: 1.4em;
  margin-top: 14px;
  border: 1px solid var(--line);
  padding: 2px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.email-tag-track {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
}
.email-tag-line { display: block; line-height: 1.4; }

@media (hover: hover) and (pointer: fine) {
  .email-btn:hover .email-btn-bg { clip-path: circle(140% at var(--ex, 0%) var(--ey, 50%)); }
  .email-btn:hover .email-btn-label,
  .email-btn:hover .email-btn-address { color: var(--bg); }
  .email-btn:hover .email-btn-tag { color: var(--bg); border-color: var(--bg); }
}
.email-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.to-top {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 14px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--muted);
  transition: color 0.3s ease;
}
.to-top-arrow {
  display: inline-block;
  color: var(--accent);
}
@media (hover: hover) and (pointer: fine) {
  .to-top:hover { color: var(--accent); }
  .to-top:hover .to-top-arrow { animation: arrow-nudge 0.9s ease-in-out infinite; }
}
@keyframes arrow-nudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.site-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(36px, 6vh, 72px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.foot-meta { color: var(--muted); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 767px) {
  .email-btn-address { font-size: clamp(1.1rem, 6.2vw, 1.6rem); }
  .site-foot { flex-direction: column; gap: 6px; }
}/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1199px) {
  .hero-portrait { width: clamp(240px, 36vw, 360px); }
  .hero-line--solid { padding-left: calc(var(--pad) + 2vw); }
  .hero-line--outline { padding-right: calc(var(--pad) + 2vw); }
  .stats { grid-template-columns: 1fr; }
  .stat-divider { display: none; }
  .stat-card { padding-left: 0; padding-right: 0; }
  .stat-card + .stat-card { border-top: 1px solid var(--line); }
  .skills-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  :root { --header-h: 72px; }
  .site-header { padding: 16px 20px; }
  .nav-desktop { display: none; }
  .menu-btn { display: inline-flex; }
  .brand-caption { letter-spacing: 0.16em; }

  .hero-h1 { top: 40%; }
  .hero-line--solid { text-align: left; }
  .hero-line--outline { text-align: right; }
  .hero-portrait {
    width: clamp(220px, 62vw, 320px);
    left: 50%;
    transform: translateX(-50%);
  }
  .scribble--1 { top: 38%; left: 50%; transform: translate(-50%, 0) rotate(-4deg); }
  .scribble--2 { bottom: calc(var(--pad) + 150px); right: 8%; }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot { animation: none; }
  .to-top:hover .to-top-arrow { animation: none; }
  .email-btn-bg { transition: none; }
  .noise-overlay { animation: none; }
  .nav-roll-track,
  .nav-desktop a::after,
  .nav-num,
  .menu-box,
  .card-num .roll-track,
  .stat-number,
  .stat-sub,
  .skill-card::before,
  .skill-card::after,
  .card-title,
  .tech-item,
  .skill-card,
  .kicker-text {
    transition: none !important;
  }
}
