/* =========================================================
   alrayen — portfolio of Gaied Rayen
   Art direction: "Signal" — cinematic ink, Sidi Bou Said blue, acid lime,
   editorial type (Syne × Instrument Serif × JetBrains Mono)
   ========================================================= */

@property --bg { syntax: '<color>'; inherits: true; initial-value: #0B0B0D; }
@property --fg { syntax: '<color>'; inherits: true; initial-value: #EDEEF1; }
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root {
  --ink: #0B0B0D;
  --ink-2: #141417;
  --paper: #EDEEF1;
  --accent: #4D6BFF;
  --lime: #D7FF3A;
  --f-display: 'Syne', system-ui, sans-serif;
  --f-serif: 'Instrument Serif', Georgia, serif;
  --f-body: 'Inter Tight', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 64px);
  --nav-h: 76px;
  --radius: 28px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  --bg: var(--ink);
  --fg: var(--paper);
  --muted: color-mix(in srgb, var(--fg) 58%, transparent);
  --line: color-mix(in srgb, var(--fg) 15%, transparent);
  --soft: color-mix(in srgb, var(--fg) 5%, transparent);
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: --bg .9s var(--ease), --fg .9s var(--ease);
}
body[data-theme="light"] { --bg: var(--paper); --fg: var(--ink); }
body[data-theme="accent"] { --bg: var(--accent); --fg: var(--ink); }
body[data-theme="lime"] { --bg: var(--lime); --fg: var(--ink); }
body.is-loading { overflow: hidden; }

img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }

/* grain */
body::after {
  content: '';
  position: fixed;
  inset: -50%;
  z-index: 9990;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); }
}

/* ---------- utilities ---------- */
.label {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
}
.display {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .9;
}
.display em, .sec-title em, .work-title em, .outro-link em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.02em;
  color: var(--accent);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 2000;
  padding: 10px 16px; border-radius: 99px; background: var(--accent); color: var(--ink);
  font-weight: 600; transition: top .3s;
}
.skip:focus { top: 16px; }

/* split-text helpers */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .06em .14em; margin: 0 -.06em -.14em; }
.wi { display: inline-block; will-change: transform; }
.sw { transition: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: .2; } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lime) 60%, transparent); }
  70% { box-shadow: 0 0 0 14px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---------- loader ---------- */
.loader, .loader-accent { position: fixed; inset: 0; clip-path: inset(0 0 0 0); }
.loader {
  z-index: 1000;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px var(--gutter);
}
.loader-accent { z-index: 999; background: var(--accent); }
html:not(.js) .loader, html:not(.js) .loader-accent,
html.no-anim .loader, html.no-anim .loader-accent { display: none; }
.loader-meta { display: flex; justify-content: space-between; color: rgba(237, 238, 241, .55); }
.loader-word {
  display: flex;
  justify-content: center;
  overflow: hidden;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(56px, 12.5vw, 250px);
  letter-spacing: -.05em;
  line-height: .95;
  padding-bottom: .04em;
}
.loader-word span { display: inline-block; }
.loader-word span:nth-child(3) { color: var(--accent); }
.loader-foot { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 28px; }
.loader-count {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(48px, 7vw, 110px);
  line-height: .8;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.loader-count sup { font-size: .3em; vertical-align: top; margin-left: 4px; }
.loader-bar { height: 2px; background: rgba(237, 238, 241, .14); position: relative; align-self: center; }
.loader-bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.loader-foot p { margin: 0; color: rgba(237, 238, 241, .55); }

/* ---------- cursor ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 10000; pointer-events: none; mix-blend-mode: difference; display: none; transition: opacity .3s; }
html.has-cursor .cursor { display: block; }
html.has-cursor, html.has-cursor * { cursor: none !important; }
.cursor-dot { position: fixed; left: 0; top: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; transition: opacity .3s; }
.cursor-ring { position: fixed; left: 0; top: 0; width: 0; height: 0; }
.cursor-ring-inner {
  position: absolute; left: 0; top: 0;
  width: 42px; height: 42px;
  transform: translate(-50%, -50%);
  border: 1px solid #fff; border-radius: 50%;
  display: grid; place-items: center;
  transition: width .5s var(--ease), height .5s var(--ease), background .3s, border-color .3s;
}
.cursor.is-link .cursor-ring-inner { width: 64px; height: 64px; }
.cursor.is-label .cursor-ring-inner { width: 96px; height: 96px; background: #fff; }
.cursor.is-down .cursor-ring-inner { width: 30px; height: 30px; }
.cursor-label { font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #000; opacity: 0; transition: opacity .25s; white-space: nowrap; }
.cursor.is-label .cursor-label { opacity: 1; }
.cursor.is-label .cursor-dot { opacity: 0; }
.cursor.is-hidden { opacity: 0; }

/* ---------- progress + toast ---------- */
.progress { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 101; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 1001;
  transform: translate(-50%, 160%);
  padding: 12px 22px; border-radius: 99px;
  background: var(--paper); color: var(--ink);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  transition: transform .6s var(--ease);
  pointer-events: none; white-space: nowrap;
}
.toast:empty { display: none; }
.toast { opacity: 0; }
.toast.show { transform: translate(-50%, 0); opacity: 1; transition: transform .6s var(--ease), opacity .2s; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter);
  color: #fff;
  mix-blend-mode: difference;
  transition: transform .7s var(--ease);
}
.nav--hidden { transform: translateY(-110%); }
.nav .label { color: #fff; }
.nav-logo { font-family: var(--f-display); font-weight: 800; font-size: 23px; letter-spacing: -.05em; display: inline-block; }
.nav-logo sup { font-size: .5em; display: inline-block; margin-left: 1px; animation: spin 7s linear infinite; }
.nav-links { display: flex; gap: clamp(16px, 2.2vw, 32px); }
.nav-links a { font-size: 14px; font-weight: 500; display: inline-flex; gap: 6px; align-items: baseline; position: relative; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: #fff; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav-links a:hover::after, .nav-links a.is-current::after { transform: scaleX(1); transform-origin: left; }
.nav-links i { font-family: var(--f-mono); font-style: normal; font-size: 10px; opacity: .55; }
.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-section { min-width: 70px; text-align: right; opacity: .6; }
.nav-clock { display: inline-flex; align-items: center; gap: 8px; }
.nav-clock .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 2s infinite; }
.nav-cta { padding: 10px 18px; border: 1px solid #fff; border-radius: 99px; font-size: 14px; font-weight: 500; transition: background .3s, color .3s; display: inline-block; }
.nav-cta:hover { background: #fff; color: #000; }
.sound { display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 28px; height: 28px; padding: 6px 3px; }
.sound span { width: 3px; height: 25%; background: #fff; border-radius: 1px; transition: height .3s; }
.sound[aria-pressed="true"] span { animation: eq .8s ease-in-out infinite alternate; }
.sound[aria-pressed="true"] span:nth-child(2) { animation-delay: -.3s; animation-duration: .6s; }
.sound[aria-pressed="true"] span:nth-child(3) { animation-delay: -.5s; animation-duration: .9s; }
.sound[aria-pressed="true"] span:nth-child(4) { animation-delay: -.1s; animation-duration: .7s; }
@keyframes eq { from { height: 20%; } to { height: 100%; } }
.nav-burger { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; align-items: center; gap: 7px; }
.nav-burger span { width: 26px; height: 2px; background: #fff; transition: transform .5s var(--ease); }
body.menu-open .nav-burger span:first-child { transform: translateY(4.5px) rotate(45deg); }
body.menu-open .nav-burger span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--gutter) 32px;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .9s var(--ease-io), visibility 0s .9s;
}
body.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .9s var(--ease-io), visibility 0s 0s; }
.menu-links { display: flex; flex-direction: column; }
.menu-links a { display: flex; align-items: baseline; gap: 14px; font-family: var(--f-display); font-weight: 700; font-size: clamp(44px, 12vw, 84px); letter-spacing: -.045em; line-height: 1.04; padding: 4px 0; border-bottom: 1px solid rgba(237, 238, 241, .12); }
.menu-links i { font-family: var(--f-mono); font-style: normal; font-size: 12px; letter-spacing: 0; color: var(--accent); }
.menu-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; color: rgba(237, 238, 241, .6); }

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ''; position: absolute; inset: auto -20% -40% -20%; height: 70%; z-index: -1;
  background: radial-gradient(ellipse at 30% 100%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%);
  pointer-events: none;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-top {
  position: absolute; z-index: 2;
  top: calc(var(--nav-h) + 14px); left: var(--gutter); right: var(--gutter);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  pointer-events: none;
}
.hero-intro { display: flex; flex-direction: column; gap: 8px; margin: 0; font-size: 15px; line-height: 1.35; }
.hero-geo { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin: 0; }
.hero-bottom {
  position: absolute; z-index: 2;
  left: var(--gutter); right: var(--gutter); bottom: clamp(24px, 5vh, 56px);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px;
  pointer-events: none;
}
.hero-bottom a { pointer-events: auto; }
.hero-title {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(30px, 4.1vw, 70px);
  line-height: .98; letter-spacing: -.04em;
  max-width: 15ch; margin: 0;
}
.hero-title em { font-family: var(--f-serif); font-weight: 400; font-style: italic; color: var(--accent); letter-spacing: -.015em; }
.hero-side { display: flex; align-items: flex-end; gap: 28px; }
.hero-caption { display: flex; flex-direction: column; gap: 10px; width: 230px; padding-bottom: 8px; }
.hero-caption b { font-weight: 500; color: var(--fg); }
.hc-text { font-family: var(--f-serif); font-style: italic; font-size: 27px; line-height: 1.05; min-height: 1.05em; }
.hc-bar { height: 1px; background: var(--line); position: relative; overflow: hidden; }
.hc-bar i { position: absolute; inset: 0; background: var(--fg); transform-origin: left; transform: scaleX(0); }
.hc-bar.run i { animation: hcfill 3.6s linear forwards; }
@keyframes hcfill { to { transform: scaleX(1); } }
.hero-badge { position: relative; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.hero-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 18s linear infinite; fill: var(--fg); font-family: var(--f-mono); font-size: 9.5px; font-weight: 500; overflow: visible; }
.hero-badge-arrow {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: var(--ink);
  display: grid; place-items: center; font-size: 22px;
  transition: transform .6s var(--ease);
}
.hero-badge:hover .hero-badge-arrow { transform: scale(1.18); }
.hero-hint { position: absolute; z-index: 2; left: 50%; bottom: clamp(28px, 5.5vh, 60px); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; margin: 0; white-space: nowrap; }
.mouse { width: 16px; height: 25px; border: 1px solid var(--muted); border-radius: 10px; position: relative; }
.mouse::after { content: ''; position: absolute; left: 50%; top: 5px; width: 2px; height: 5px; border-radius: 2px; background: var(--fg); transform: translateX(-50%); animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translate(-50%, 0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 9px); } }

/* ---------- sections ---------- */
.sec { position: relative; padding: clamp(96px, 15vh, 190px) var(--gutter); }
.sec-head {
  display: flex; justify-content: space-between; gap: 16px;
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
  margin-bottom: clamp(40px, 7vh, 90px);
}
.sec-title { font-size: clamp(46px, 8.6vw, 156px); margin: 0 0 clamp(44px, 8vh, 100px); max-width: 13ch; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 110px); align-items: start; }
.about-text { font-family: var(--f-display); font-weight: 500; font-size: clamp(26px, 3.3vw, 56px); line-height: 1.1; letter-spacing: -.035em; margin: 0; }
.about-text em { font-family: var(--f-serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -.01em; }
.portrait {
  position: relative; margin: 0;
  aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: #121215; border: 1px solid var(--line);
  transform: rotate(2deg);
  transition: transform .8s var(--ease);
}
.portrait:hover { transform: rotate(0deg) scale(1.02); }
.portrait canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.portrait figcaption { position: absolute; left: 18px; right: 18px; bottom: 14px; display: flex; justify-content: space-between; color: rgba(237, 238, 241, .6); }
.stats { list-style: none; margin: clamp(64px, 11vh, 130px) 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stats li { padding: 28px 20px 4px 0; display: flex; flex-direction: column; gap: 10px; }
.stats li + li { padding-left: clamp(16px, 2vw, 32px); border-left: 1px solid var(--line); }
.stats b { font-family: var(--f-display); font-weight: 700; font-size: clamp(56px, 7.4vw, 128px); line-height: .9; letter-spacing: -.055em; }
.stats sup { font-size: .32em; vertical-align: top; position: relative; top: .25em; letter-spacing: 0; margin-left: .06em; }
.now { margin-top: clamp(56px, 9vh, 100px); display: flex; gap: 18px; align-items: flex-start; max-width: 760px; font-size: clamp(19px, 1.6vw, 25px); line-height: 1.35; }
.now p { margin: 0; }
.now .label { display: block; margin-bottom: 6px; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--lime); animation: pulse 2s infinite; flex-shrink: 0; margin-top: .5em; }

/* ---------- marquees ---------- */
.marquees { position: relative; padding: clamp(60px, 10vh, 120px) 0; overflow: hidden; }
.marquee { white-space: nowrap; overflow: hidden; padding: .22em 0 .26em; font-family: var(--f-display); font-weight: 700; font-size: clamp(34px, 6vw, 100px); letter-spacing: -.045em; line-height: 1; }
.marquee--a { background: var(--accent); color: var(--ink); transform: rotate(-3deg) scale(1.1); position: relative; z-index: 2; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.marquee--b { background: var(--lime); color: var(--ink); transform: rotate(2.4deg) scale(1.1); margin-top: 0; }
.marquee-inner { display: inline-flex; align-items: center; will-change: transform; }
.marquee-inner span { padding: 0 .3em; }
.marquee-inner i { font-style: normal; font-size: .55em; padding: 0 .25em; }
.marquee--b em { font-family: var(--f-serif); font-weight: 400; font-style: italic; letter-spacing: -.02em; font-size: 1.12em; }

/* ---------- work ---------- */
.work { position: relative; overflow: hidden; }
.work-track {
  display: flex; align-items: center; gap: clamp(24px, 3vw, 48px);
  height: 100vh; height: 100svh;
  padding: calc(var(--nav-h) + 16px) var(--gutter) 64px;
  width: max-content; will-change: transform;
}
.work-intro { width: min(34vw, 540px); flex-shrink: 0; display: flex; flex-direction: column; gap: 28px; padding-right: 2vw; }
.work-title { font-size: clamp(48px, 6vw, 108px); margin: 0; }
.work-lede { color: var(--muted); font-size: 18px; max-width: 34ch; margin: 0; }
.work-hint { display: flex; align-items: center; gap: 12px; margin: 0; }
.work-hint .arrow { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); color: var(--fg); animation: nudge 1.6s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateX(8px); } }

.card {
  position: relative; flex-shrink: 0;
  width: min(74vw, 1180px); height: min(72vh, 700px);
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  background: var(--c-bg); color: var(--c-fg);
  border-radius: var(--radius); overflow: hidden; isolation: isolate;
  cursor: pointer;
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .6);
}
.card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 1px solid color-mix(in srgb, var(--c-fg) 10%, transparent); pointer-events: none; }
.card-visual { position: relative; overflow: hidden; }
.card-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 1.2s var(--ease); }
.card:hover .card-visual canvas { transform: scale(1.04); }
.card-info {
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  padding: clamp(22px, 2.6vw, 44px);
  border-left: 1px solid color-mix(in srgb, var(--c-fg) 12%, transparent);
}
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-top .label { color: color-mix(in srgb, var(--c-fg) 60%, transparent); }
.card-index { font-family: var(--f-mono); font-size: 13px; padding: 6px 12px; border: 1px solid color-mix(in srgb, var(--c-fg) 25%, transparent); border-radius: 99px; }
.card-title { font-family: var(--f-display); font-weight: 700; font-size: clamp(34px, 3.3vw, 62px); line-height: .92; letter-spacing: -.045em; margin: 0 0 12px; }
.card-kicker { font-family: var(--f-serif); font-style: italic; font-size: clamp(20px, 1.7vw, 28px); color: var(--c-kick, var(--c-accent)); margin: 0 0 18px; line-height: 1.1; }
.card-desc { font-size: 15px; line-height: 1.55; color: color-mix(in srgb, var(--c-fg) 74%, transparent); margin: 0; max-width: 44ch; }
.card-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; max-width: 70%; }
.tags li { font-family: var(--f-mono); font-size: 11px; padding: 5px 10px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--c-fg) 22%, transparent); white-space: nowrap; }
.card-open { font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; display: inline-flex; gap: 10px; align-items: center; white-space: nowrap; }
.card-open b { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--c-accent); color: var(--c-bg); font-size: 16px; transition: transform .6s var(--ease); }
.card:hover .card-open b, .card:focus-visible .card-open b { transform: rotate(45deg) scale(1.12); }
.work-outro { flex-shrink: 0; width: min(46vw, 660px); display: flex; flex-direction: column; gap: 18px; padding: 0 4vw 0 2vw; }
.work-outro p { margin: 0; }
.outro-link { font-family: var(--f-display); font-weight: 700; font-size: clamp(40px, 4.6vw, 86px); letter-spacing: -.045em; line-height: .95; transition: color .3s; }
.outro-link:hover { color: var(--accent); }
.work-progress { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 30px; height: 2px; background: var(--line); }
.work-progress i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* ---------- skills ---------- */
.disc { display: flex; gap: 12px; height: clamp(440px, 64vh, 580px); }
.disc-item {
  position: relative; flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  padding: clamp(22px, 2vw, 32px);
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--soft);
  overflow: hidden;
  transition: flex .9s var(--ease), background .6s var(--ease), color .6s var(--ease), border-color .6s;
}
.disc-item.is-open { flex: 2.3; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.disc-item.is-open .label { color: rgba(237, 238, 241, .55); }
.disc-icon { width: 76px; height: 76px; margin: 26px 0 auto; }
.disc-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.disc-item h3 { font-family: var(--f-display); font-weight: 700; font-size: clamp(24px, 2.2vw, 40px); letter-spacing: -.035em; line-height: 1; margin: 24px 0 0; }
.disc-body { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .9s var(--ease), opacity .5s; }
.disc-item.is-open .disc-body { max-height: 280px; opacity: 1; transition-delay: .15s; }
.disc-body p { margin: 16px 0 18px; max-width: 38ch; color: rgba(237, 238, 241, .72); font-size: 16px; }
.disc-body ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.disc-body li { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 6px 11px; border-radius: 99px; border: 1px solid rgba(237, 238, 241, .22); white-space: nowrap; }

/* icon motion */
.ic-ai circle { fill: currentColor; stroke: none; }
.ic-ai .hot { fill: var(--accent); transform-origin: 66px 40px; animation: node 1.8s var(--ease) infinite; }
.ic-ai .edges line { stroke-dasharray: 4 5; }
.is-open .ic-ai .edges line { animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -18; } }
@keyframes node { 50% { transform: scale(1.35); } }
.ic-game rect { fill: currentColor; stroke: none; }
.ic-game circle { fill: currentColor; stroke: none; }
.is-open .ic-game .b1 { fill: var(--accent); animation: blink .9s steps(1) infinite; }
.is-open .ic-game .b4 { fill: var(--lime); animation: blink 1.3s steps(1) infinite .4s; }
.ic-app .lines rect { fill: currentColor; stroke: none; opacity: .8; }
.ic-app .phone { stroke-width: 2.4; }
.ic-app .lines { clip-path: inset(0 0 0 0); }
.is-open .ic-app .lines { animation: feed 2.4s linear infinite; }
@keyframes feed { from { transform: translateY(0); } to { transform: translateY(-16px); } }
.ic-av .clip { fill: currentColor; stroke: none; opacity: .85; }
.ic-av .c2 { fill: var(--accent); opacity: 1; }
.ic-av .wave rect { fill: currentColor; stroke: none; transform-origin: center 62px; transform-box: fill-box; }
.is-open .ic-av .wave rect { animation: eqv .7s ease-in-out infinite alternate; }
.is-open .ic-av .wave rect:nth-child(2n) { animation-delay: -.35s; }
.is-open .ic-av .wave rect:nth-child(3n) { animation-delay: -.2s; animation-duration: .5s; }
.ic-av .head { stroke: var(--accent); stroke-width: 2; }
.is-open .ic-av .head { animation: playhead 3s linear infinite; }
@keyframes eqv { from { transform: scaleY(.4); } to { transform: scaleY(1.2); } }
@keyframes playhead { from { transform: translateX(-24px); } to { transform: translateX(44px); } }

.toolbox {
  position: relative;
  margin-top: clamp(56px, 9vh, 110px);
  height: clamp(400px, 58vh, 540px);
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--soft);
  overflow: hidden;
}
.toolbox-bg { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); margin: 0; font-size: clamp(90px, 18vw, 320px); color: color-mix(in srgb, var(--fg) 7%, transparent); pointer-events: none; white-space: nowrap; }
.toolbox-bg em { color: color-mix(in srgb, var(--accent) 30%, transparent); }
.toolbox-hint { position: absolute; top: 20px; left: 24px; margin: 0; }
.tool {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 99px;
  border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink);
  font-family: var(--f-display); font-weight: 600; font-size: clamp(15px, 1.4vw, 22px); letter-spacing: -.02em; line-height: 1;
  user-select: none; -webkit-user-select: none; white-space: nowrap;
}
.tool--accent { background: var(--accent); border-color: var(--accent); }
.tool--dark { background: var(--ink); color: var(--paper); }
.tool--lime { background: var(--lime); border-color: var(--ink); }
.tool--round { width: 68px; height: 68px; padding: 0; border-radius: 50%; font-size: 22px; }
.toolbox:not(.is-physics) { display: flex; flex-wrap: wrap; gap: 10px; align-content: center; justify-content: center; padding: 70px 24px 40px; height: auto; min-height: 320px; }
.toolbox.is-physics .tool { position: absolute; left: 0; top: 0; will-change: transform; visibility: hidden; }
.toolbox.is-physics.is-live .tool { visibility: visible; }

/* ---------- journey ---------- */
.tl { position: relative; max-width: 1180px; margin: 0 auto; }
.tl-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--line); transform: translateX(-50%); }
.tl-line i { position: absolute; inset: 0; background: linear-gradient(var(--accent), var(--lime)); transform-origin: top; transform: scaleY(0); }
.tl-list { list-style: none; }
.tl-item { position: relative; width: 50%; padding: 0 56px clamp(36px, 6vh, 64px) 0; }
.tl-item:nth-child(even) { margin-left: 50%; padding: 0 0 clamp(36px, 6vh, 64px) 56px; }
.tl-dot { position: absolute; top: 30px; right: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 2px solid color-mix(in srgb, var(--fg) 30%, transparent); transition: background .5s, border-color .5s, box-shadow .5s; z-index: 1; }
.tl-item:nth-child(even) .tl-dot { right: auto; left: -9px; }
.tl-item.is-active .tl-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 22%, transparent); }
.tl-card { padding: clamp(22px, 2.2vw, 32px); border-radius: 24px; border: 1px solid var(--line); background: var(--soft); transition: border-color .5s, transform .6s var(--ease); }
.tl-card:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); transform: translateY(-4px); }
.tl-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.tl-meta .label { color: var(--fg); }
.tl-tag { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 5px 11px; border-radius: 99px; background: color-mix(in srgb, var(--fg) 10%, transparent); }
.tl-tag--exp { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.tl-tag--win { background: color-mix(in srgb, var(--lime) 16%, transparent); color: var(--lime); }
.tl-tag--next { background: var(--lime); color: var(--ink); }
.tl-card h3 { font-family: var(--f-display); font-weight: 700; font-size: clamp(22px, 2vw, 31px); line-height: 1.04; letter-spacing: -.035em; margin: 0 0 8px; }
.tl-org { font-family: var(--f-serif); font-style: italic; font-size: 21px; line-height: 1.2; color: var(--accent); margin: 0 0 14px; }
.tl-card p:last-child { color: var(--muted); margin: 0; }
.tl-item--next .tl-card { border: 1.5px dashed color-mix(in srgb, var(--lime) 70%, transparent); background: color-mix(in srgb, var(--lime) 5%, transparent); }
.tl-item--next .tl-org { color: var(--lime); }
.tl-item--next .tl-dot { background: var(--lime); border-color: var(--lime); animation: pulse 2s infinite; }
.inline-link { color: var(--fg); border-bottom: 1px solid var(--accent); }

/* ---------- play (arcade) ---------- */
.play-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); gap: clamp(32px, 5vw, 90px); align-items: center; }
.play .sec-title { font-size: clamp(44px, 6.2vw, 112px); margin-bottom: 30px; }
.play-copy p { font-size: 18px; line-height: 1.5; max-width: 38ch; margin: 0 0 28px; }
.play-keys { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 0 0 30px; font-family: var(--f-mono); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
kbd { display: inline-block; min-width: 30px; padding: 4px 8px; margin-right: 6px; border: 1.5px solid currentColor; border-bottom-width: 3px; border-radius: 7px; font-family: var(--f-mono); font-size: 12px; text-align: center; text-transform: none; letter-spacing: 0; }
.play-best { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--fg); }
.play-best b { font-family: 'Press Start 2P', monospace; font-weight: 400; font-size: 15px; letter-spacing: 0; padding: 8px 12px; border-radius: 8px; background: var(--ink); color: var(--lime); }
.cabinet {
  position: relative;
  padding: clamp(14px, 1.6vw, 22px);
  border-radius: 30px;
  background: var(--ink); color: var(--paper);
  box-shadow: 0 60px 120px -50px rgba(11, 11, 13, .75), inset 0 0 0 1px rgba(255, 255, 255, .06);
  transform: rotate(-1.4deg);
  transition: transform .9s var(--ease);
}
.cabinet:hover, .cabinet:focus-within { transform: rotate(0deg) scale(1.01); }
.cabinet-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 8px 14px; }
.cabinet-top b { font-family: 'Press Start 2P', monospace; font-weight: 400; font-size: 12px; color: var(--lime); letter-spacing: .04em; }
.cabinet .label { color: rgba(237, 238, 241, .55); }
.screen { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #04060F; box-shadow: inset 0 0 50px rgba(77, 107, 255, .3); }
.screen:focus-within { outline: 3px solid var(--accent); outline-offset: 4px; }
.screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: manipulation; outline: none; cursor: pointer; }
.cabinet-bottom { display: flex; justify-content: space-between; align-items: center; padding: 16px 8px 4px; }
.coin { animation: blink 1.4s steps(1) infinite; }
.cab-buttons { display: flex; gap: 12px; }
.cab-buttons span { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); box-shadow: 0 4px 0 #2A3CA8; }
.cab-buttons span + span { background: var(--lime); box-shadow: 0 4px 0 #8FAE12; }
.cabinet:active .cab-buttons span:first-child { transform: translateY(3px); box-shadow: 0 1px 0 #2A3CA8; }

/* ---------- beyond ---------- */
.slot { font-size: clamp(42px, 7.6vw, 132px); margin: 0 0 clamp(60px, 10vh, 120px); line-height: 1.02; white-space: nowrap; }
.slot-window { display: inline-block; height: 1.1em; overflow: hidden; vertical-align: bottom; color: var(--accent); font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; position: relative; }
.slot-window::after { content: ''; position: absolute; left: 0; right: 0; bottom: .06em; height: 3px; background: var(--accent); transform-origin: left; }
.slot-reel { display: flex; flex-direction: column; }
.slot-reel span { display: block; height: 1.1em; line-height: 1.1em; white-space: nowrap; padding-right: .08em; }
.beyond-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 90px); align-items: stretch; }
.langs h3 { margin: 0; }
.langs ul { list-style: none; margin-top: 18px; border-top: 1px solid var(--line); }
.lang, .langs-scale { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 2fr) 76px; align-items: center; gap: clamp(14px, 2vw, 28px); }
.lang { padding: 22px 0; border-bottom: 1px solid var(--line); }
.lang-name { font-family: var(--f-display); font-weight: 600; font-size: clamp(24px, 2.7vw, 44px); letter-spacing: -.035em; line-height: 1; }
.lang-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.lang-bar i { height: 16px; border-radius: 4px; background: var(--line); transform: scaleY(.6); transition: background .5s, transform .5s var(--ease); }
.lang-bar i.on { background: var(--accent); transform: scaleY(1); }
.lang:first-child .lang-bar i.on { background: var(--lime); }
.lang-lvl { text-align: right; color: var(--fg); }
.langs-scale { margin: 12px 0 0; }
.scale-cells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; text-align: center; }

.award { position: relative; border-radius: var(--radius); padding: 2px; background: conic-gradient(from var(--ang), var(--accent), var(--lime), #B794FF, var(--accent)); animation: angle 5s linear infinite; }
@keyframes angle { to { --ang: 360deg; } }
.award-inner { position: relative; height: 100%; min-height: 360px; border-radius: calc(var(--radius) - 2px); background: var(--ink-2); padding: clamp(28px, 3vw, 48px); display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; overflow: hidden; }
.award-inner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 10%, color-mix(in srgb, var(--lime) 20%, transparent), transparent 55%); }
.trophy { position: absolute; top: clamp(24px, 3vw, 40px); right: clamp(24px, 3vw, 40px); width: 70px; height: 70px; fill: var(--lime); stroke: var(--lime); stroke-width: 3; stroke-linejoin: round; animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-4deg); } }
.award-rank { position: relative; font-size: clamp(110px, 12vw, 200px); margin: 0; line-height: .82; background: linear-gradient(120deg, var(--paper) 30%, var(--lime) 50%, var(--paper) 70%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 4s linear infinite; }
.award-rank sup { font-size: .3em; vertical-align: top; position: relative; top: .3em; color: var(--lime); -webkit-text-fill-color: var(--lime); }
@keyframes shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.award-title { position: relative; font-family: var(--f-serif); font-style: italic; font-size: clamp(24px, 2.2vw, 32px); margin: 8px 0 0; line-height: 1.1; color: var(--paper); }
.award .label { position: relative; color: rgba(237, 238, 241, .55); margin: 0; }
.spark { position: absolute; width: 14px; height: 14px; background: var(--lime); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); animation: twinkle 2.4s ease-in-out infinite; }
.s1 { top: 18%; left: 12%; }
.s2 { top: 42%; right: 30%; animation-delay: .8s; width: 10px; height: 10px; background: var(--accent); }
.s3 { top: 12%; left: 52%; animation-delay: 1.5s; width: 8px; height: 8px; background: var(--paper); }
@keyframes twinkle { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1) rotate(90deg); opacity: 1; } }
.softs { list-style: none; margin: clamp(56px, 9vh, 110px) 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.softs li { font-family: var(--f-display); font-weight: 600; font-size: clamp(18px, 1.9vw, 30px); letter-spacing: -.03em; padding: 12px 26px; border: 1px solid var(--line); border-radius: 99px; transition: background .4s, color .4s, border-color .4s, transform .6s var(--ease); }
.softs li:hover { background: var(--accent); color: var(--ink); border-color: var(--accent); transform: rotate(-4deg) scale(1.04); }

/* ---------- contact ---------- */
.contact {
  --fg: var(--ink);
  --muted: color-mix(in srgb, var(--ink) 62%, transparent);
  --line: color-mix(in srgb, var(--ink) 18%, transparent);
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--accent); color: var(--ink);
}
.contact .label { color: color-mix(in srgb, var(--ink) 70%, transparent); }
.contact-pre { font-family: var(--f-serif); font-style: italic; font-size: clamp(26px, 2.8vw, 44px); margin: 0; line-height: 1.1; }
.contact-title { font-size: clamp(88px, 20vw, 360px); margin: .04em 0 .12em; line-height: .84; letter-spacing: -.065em; }
.contact-title em { color: var(--paper); padding-right: .04em; }
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: clamp(32px, 5vw, 80px); margin-top: auto; flex-wrap: wrap; }
.hello {
  position: relative; flex-shrink: 0;
  width: clamp(170px, 17vw, 250px); aspect-ratio: 1; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center; overflow: hidden;
  font-family: var(--f-display); font-weight: 700; font-size: clamp(20px, 1.8vw, 28px); letter-spacing: -.03em;
  transition: color .5s var(--ease);
}
.hello-fill { position: absolute; inset: 0; background: var(--lime); border-radius: 50%; transform: translateY(130%) scale(1.2); transition: transform .7s var(--ease); }
.hello:hover { color: var(--ink); }
.hello:hover .hello-fill { transform: translateY(0) scale(1.2); }
.hello-text { position: relative; display: inline-flex; gap: 8px; align-items: center; }
.hello-text b { color: var(--lime); transition: color .5s; }
.hello:hover .hello-text b { color: var(--accent); }
.contact-links { list-style: none; flex: 1; max-width: 680px; border-top: 1px solid var(--line); }
.contact-links li { border-bottom: 1px solid var(--line); }
.contact-links a, .contact-links button {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  width: 100%; padding: 18px 0; text-align: left;
  font-family: var(--f-display); font-weight: 600; font-size: clamp(20px, 2.3vw, 36px); letter-spacing: -.035em; line-height: 1.1;
  transition: padding .6s var(--ease);
  overflow-wrap: anywhere;
}
.contact-links a:hover, .contact-links button:hover { padding-left: 18px; }
.copy span:first-child { font-family: var(--f-body); font-weight: 600; letter-spacing: -.03em; }

/* ---------- footer ---------- */
.footer {
  --fg: var(--paper);
  --muted: color-mix(in srgb, var(--paper) 58%, transparent);
  --line: color-mix(in srgb, var(--paper) 15%, transparent);
  position: relative; padding: clamp(70px, 11vh, 130px) var(--gutter) 28px; overflow: hidden;
  background: var(--ink); color: var(--paper);
}
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.footer-top p { margin: 0; }
.totop { display: inline-block; padding: 12px 20px; border: 1px solid var(--line); border-radius: 99px; font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; transition: background .3s, color .3s; }
.totop:hover { background: var(--fg); color: var(--bg); }
.footer-word { display: flex; justify-content: center; margin: .1em 0 .08em; font-family: var(--f-display); font-weight: 800; font-size: 12vw; line-height: .8; letter-spacing: -.06em; overflow: hidden; padding-bottom: .04em; white-space: nowrap; }
.footer-word span { display: inline-block; transition: transform .7s var(--ease), color .4s; }
.footer-word span:hover { transform: translateY(-10%) rotate(-4deg); color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }

/* ---------- case study ---------- */
.case {
  --case-bg: #0B0B0D; --case-fg: #EDEEF1; --case-accent: #4D6BFF;
  position: fixed; inset: 0; z-index: 900;
  background: var(--case-bg); color: var(--case-fg);
  visibility: hidden;
  clip-path: circle(0% at 50% 50%);
}
.case.is-open { visibility: visible; }
.case-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: clamp(90px, 13vh, 130px) var(--gutter) 60px; }
.case .label { color: color-mix(in srgb, var(--case-fg) 60%, transparent); }
.case-close {
  position: fixed; top: 18px; right: var(--gutter); z-index: 3;
  display: inline-flex; gap: 10px; align-items: center;
  padding: 12px 18px; border-radius: 99px;
  background: var(--case-fg); color: var(--case-bg);
  font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  transition: transform .5s var(--ease);
}
.case-close:hover { transform: scale(1.06) rotate(-2deg); }
.case-head .label { margin: 0; }
.case-title { font-size: clamp(56px, 10.5vw, 190px); margin: .12em 0 .1em; }
.case-kicker { font-family: var(--f-serif); font-style: italic; font-size: clamp(24px, 2.6vw, 42px); color: var(--case-kick, var(--case-accent)); margin: 0; line-height: 1.1; }
.case-visual { position: relative; margin: clamp(32px, 6vh, 64px) 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 8; border: 1px solid color-mix(in srgb, var(--case-fg) 12%, transparent); }
.case-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.case-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(32px, 5vw, 90px); }
.case-meta { margin: 0; align-self: start; border-top: 1px solid color-mix(in srgb, var(--case-fg) 14%, transparent); }
.case-meta div { display: flex; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid color-mix(in srgb, var(--case-fg) 14%, transparent); }
.case-meta dt { font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .6; }
.case-meta dd { margin: 0; text-align: right; font-weight: 500; }
.case-body h3 { margin: 0 0 14px; }
.case-overview { font-size: clamp(20px, 1.9vw, 30px); line-height: 1.35; letter-spacing: -.015em; margin: 0 0 48px; }
.case-highlights { list-style: none; margin: 0 0 48px; border-top: 1px solid color-mix(in srgb, var(--case-fg) 14%, transparent); }
.case-highlights li { position: relative; padding: 16px 0 16px 34px; border-bottom: 1px solid color-mix(in srgb, var(--case-fg) 14%, transparent); font-size: 17px; }
.case-highlights li::before { content: '✺'; position: absolute; left: 0; top: 16px; color: var(--case-kick, var(--case-accent)); }
.case-outcome { font-size: 17px; margin: 0 0 24px; color: color-mix(in srgb, var(--case-fg) 78%, transparent); }
.case-link a { display: inline-flex; gap: 10px; align-items: center; padding: 14px 22px; border-radius: 99px; background: var(--case-fg); color: var(--case-bg); font-weight: 600; transition: transform .5s var(--ease); }
.case-link a:hover { transform: translateY(-3px); }
.case-next { display: block; width: 100%; text-align: left; margin-top: clamp(70px, 11vh, 130px); padding-top: 28px; border-top: 1px solid color-mix(in srgb, var(--case-fg) 14%, transparent); }
.case-next-title { display: block; font-size: clamp(48px, 8vw, 140px); margin-top: 10px; transition: transform .8s var(--ease), color .4s; }
.case-next:hover .case-next-title { transform: translateX(24px); color: var(--case-accent); }

.scr { opacity: .5; }
.tba { display: inline-block; margin-right: 6px; padding: 2px 9px; border-radius: 99px; border: 1px dashed currentColor; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; vertical-align: 2px; }
.case { transition: background-color .6s var(--ease), color .6s var(--ease); }
.slot-reel { align-items: flex-start; }

/* ---------- fallbacks ---------- */
html.no-anim .hc-bar i { transform: scaleX(1); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .nav-section, .nav-clock { display: none; }
}
@media (max-width: 1000px) {
  .hero-hint { display: none; }
}
@media (max-width: 899px) {
  :root { --nav-h: 64px; --radius: 22px; }
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav-right { gap: 6px; }

  .hero-bottom { flex-direction: column; align-items: stretch; gap: 22px; }
  .hero-side { justify-content: space-between; }
  .hero-caption { width: auto; flex: 1; }
  .hero-badge { width: 104px; height: 104px; }
  .hero-badge svg { font-size: 11px; }
  .hero-badge-arrow { width: 46px; height: 46px; }
  .hc-text { font-size: 23px; }

  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 440px; width: 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats li:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 8px; }

  .work-track { flex-direction: column; align-items: stretch; height: auto; width: auto; padding: clamp(70px, 12vh, 120px) var(--gutter); gap: 22px; }
  .work-intro { width: auto; padding: 0 0 20px; }
  .work-hint { display: none; }
  .card { width: 100%; height: auto; grid-template-columns: 1fr; }
  .card-visual { aspect-ratio: 4 / 3; }
  .card-info { border-left: 0; border-top: 1px solid color-mix(in srgb, var(--c-fg) 12%, transparent); }
  .tags { max-width: 100%; }
  .work-outro { width: auto; padding: 36px 0 0; }
  .work-progress { display: none; }

  .disc { flex-direction: column; height: auto; }
  .disc-item { flex: none; }
  .disc-item.is-open { flex: none; }
  .disc-icon { width: 56px; height: 56px; margin: 14px 0 0; position: absolute; right: 22px; top: 8px; }

  .tl-line { left: 8px; }
  .tl-item, .tl-item:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 28px 40px; }
  .tl-dot, .tl-item:nth-child(even) .tl-dot { left: 0; right: auto; }

  .slot { white-space: normal; }
  .slot-window { display: block; }
  .beyond-grid { grid-template-columns: 1fr; }
  .award-inner { min-height: 300px; }

  .play-grid { grid-template-columns: 1fr; }
  .cabinet { transform: none; }
  .screen { aspect-ratio: 4 / 3; }

  .contact-row { flex-direction: column; align-items: stretch; }
  .hello { align-self: flex-start; }
  .contact-links { max-width: none; }

  .case-grid { grid-template-columns: 1fr; }
  .case-visual { aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
  .hero-geo { display: none; }
  .hero-intro { font-size: 14px; }
  .sec-head > .label:last-child { display: none; }
  .loader-foot { grid-template-columns: 1fr; gap: 16px; }
  .loader-foot p { display: none; }
  .lang, .langs-scale { grid-template-columns: 84px minmax(0, 1fr) 52px; gap: 12px; }
  .lang-bar i { height: 12px; }
  .footer-top .label { display: none; }
  .tool { padding: 11px 18px; }
  .tool--round { width: 54px; height: 54px; padding: 0; }
  .case-meta div { flex-direction: column; gap: 4px; }
  .case-meta dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  body::after { display: none; }
}
