/* =========================================================
   刘华琛 · 个人网站
   Design language: ink / paper / acid lime, editorial grid,
   oversized grotesque type + serif italic accents + mono labels
   ========================================================= */

/* ---------- tokens ---------- */
:root,
[data-theme="ink"] {
  --bg: #0b0b0c;
  --bg-soft: #0f0f11;
  --surface: #141416;
  --surface-2: #1a1a1d;
  --text: #f2efe6;
  --text-dim: #b9b5ab;
  --muted: #85817a;
  --line: rgba(242, 239, 230, 0.14);
  --line-soft: rgba(242, 239, 230, 0.08);
  --accent: #cdf94f;
  --accent-ink: #0b0b0c;
  --accent-soft: rgba(205, 249, 79, 0.14);
  --danger: #ff6a4d;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
  --grain-opacity: 0.055;
  --nav-bg: rgba(11, 11, 12, 0.72);
  --radius: 18px;
  --font-sans: "Space Grotesk", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-serif: "Instrument Serif", "Songti SC", "Noto Serif SC", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1240px;
}

[data-theme="paper"] {
  --bg: #f2efe6;
  --bg-soft: #ece8dd;
  --surface: #faf8f1;
  --surface-2: #e7e3d7;
  --text: #0d0d0c;
  --text-dim: #3c3a35;
  --muted: #6d6a62;
  --line: rgba(13, 13, 12, 0.16);
  --line-soft: rgba(13, 13, 12, 0.09);
  --accent: #b9ec2f;
  --accent-ink: #14150e;
  --accent-soft: rgba(185, 236, 47, 0.24);
  --danger: #c43a1e;
  --shadow: 0 24px 50px -34px rgba(40, 36, 20, 0.45);
  --grain-opacity: 0.08;
  --nav-bg: rgba(242, 239, 230, 0.78);
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.45s var(--ease), color 0.45s var(--ease);
}

body.is-locked { overflow: hidden; }

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, dl, dd, ol, ul { margin: 0; }
ul, ol { padding: 0; list-style: none; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  transform: translateY(-160%);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  transition: transform 0.3s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- texture / progress ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 150;
  background: transparent;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}

/* ---------- type helpers ---------- */
.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.01em;
  padding-right: 0.06em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow__index {
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  letter-spacing: 0;
  font-size: 10px;
}
.eyebrow__sep { color: var(--line); }
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ---------- buttons ---------- */
.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background-color 0.3s var(--ease),
    color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.35s var(--ease);
}
.btn svg { width: 17px; height: 17px; flex: none; transition: transform 0.35s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg:last-child { transform: translateX(3px); }
.btn:active { transform: translateY(0) scale(0.99); }

.btn--accent {
  --btn-bg: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px -18px var(--accent);
}
.btn--accent:hover { box-shadow: 0 16px 36px -16px var(--accent); }

.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); background: var(--surface); }

.btn--line { border-color: var(--line); color: var(--text); }
.btn--line:hover { border-color: var(--accent); color: var(--accent); }

.btn--sm { padding: 10px 18px; font-size: 13px; gap: 8px; }
.btn--sm svg { width: 15px; height: 15px; }

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.icon-btn:hover { border-color: var(--text); background: var(--surface); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn svg path, .icon-btn svg circle { stroke-width: 1.5; }

[data-theme="ink"] .icon-sun { display: none; }
[data-theme="paper"] .icon-moon { display: none; }

.link-btn {
  border: 0;
  padding: 0;
  background: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}
.link-btn:hover { color: var(--text); border-color: var(--text); }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid transparent;
  transition: padding 0.4s var(--ease), background-color 0.4s var(--ease),
    border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.nav.is-stuck {
  padding-top: 12px;
  padding-bottom: 12px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line-soft);
}

.nav__brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.04em;
  transition: transform 0.5s var(--ease), background-color 0.4s;
}
.brand-mark span { color: var(--accent); margin-left: -1px; }
.nav__brand:hover .brand-mark { transform: rotate(-8deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text b { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; }
.brand-text i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links a {
  position: relative;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--text-dim);
  transition: color 0.3s, background-color 0.3s;
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
}
.nav__links sup {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.nav__links a:hover { color: var(--text); background: var(--surface); }
.nav__links a[aria-current="true"] { color: var(--text); }
.nav__links a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
}

.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__burger { display: none; }
.nav__burger span {
  display: block;
  width: 15px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.3s;
}
.nav__burger span + span { margin-top: 5px; }
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(3.2px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-3.2px) rotate(-45deg); }

/* ---------- mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 92px clamp(20px, 7vw, 40px) 40px;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: clamp(24px, 7vw, 34px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.mobile-menu a sup { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.mobile-menu .btn { margin-top: 22px; }
.mobile-menu__meta {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-top: 150px;
  overflow: hidden;
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(120% 85% at 62% 18%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 85% at 62% 18%, #000 20%, transparent 78%);
  opacity: 0.9;
  pointer-events: none;
}
.hero__grid::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -20%;
  width: 62vw;
  height: 62vw;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-soft), transparent 62%);
  filter: blur(10px);
}

.hero__inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px) clamp(48px, 7vw, 84px);
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.hero__title {
  font-size: clamp(2.6rem, 6.1vw, 5.15rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 600;
  margin-bottom: 26px;
  text-wrap: balance;
}
.hero__title .serif-italic { color: var(--accent); letter-spacing: -0.01em; }

.hero__lede {
  max-width: 46ch;
  color: var(--text-dim);
  font-size: clamp(14.5px, 1.15vw, 16.5px);
  line-height: 1.85;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 34px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.hero__meta div { display: flex; flex-direction: column; gap: 4px; }
.hero__meta dt {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}
.hero__meta dd { margin: 0; font-size: 13px; display: flex; align-items: center; gap: 7px; }
.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

/* hero stage */
.hero__stage {
  position: relative;
  min-height: clamp(340px, 42vw, 500px);
  perspective: 1200px;
}
.stage__card {
  position: absolute;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.7s var(--ease), box-shadow 0.5s;
  will-change: transform;
}
.stage__card--a {
  width: 62%;
  top: 2%;
  left: 0;
  transform: rotate(-6.5deg);
  z-index: 1;
}
.stage__card--b {
  width: 56%;
  top: 28%;
  right: 0;
  transform: rotate(4.5deg);
  z-index: 3;
}
.stage__card--c {
  width: 40%;
  bottom: 0;
  left: 12%;
  transform: rotate(-2deg);
  z-index: 2;
}
.hero__stage:hover .stage__card--a { transform: rotate(-8deg) translateY(-6px); }
.hero__stage:hover .stage__card--b { transform: rotate(6deg) translateY(-4px); }
.hero__stage:hover .stage__card--c { transform: rotate(-3deg) translateY(4px); }

.stage__bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-soft);
}
.stage__bar i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.5;
}
.stage__bar i:first-child { background: var(--accent); opacity: 1; }
.stage__bar span {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.stage__art {
  position: relative;
  aspect-ratio: 16 / 11;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  overflow: hidden;
}
.stage__art b {
  font-size: clamp(16px, 2.4vw, 30px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 600;
}
.stage__art span {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.72;
}
.stage__art--a { background: linear-gradient(150deg, #3b2a72, #7a5cff 52%, #f0b6ff); color: #fff; }
.stage__art--a::after {
  content: "";
  position: absolute;
  width: 66%;
  aspect-ratio: 1;
  right: -16%;
  top: 14%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 0 60px rgba(255, 255, 255, 0.22);
}
.stage__art--b { background: linear-gradient(160deg, #071b2a, #0d3b52 60%, #79e6d0); color: #eafffb; }
.stage__art--b b { font-size: clamp(14px, 2vw, 24px); }
.art-panel { display: flex; gap: 5px; margin-bottom: auto; }
.art-panel span {
  height: 14px;
  flex: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  opacity: 1;
}
.art-panel span:nth-child(2) { flex: 2.4; background: rgba(255, 255, 255, 0.22); }
.stage__art--c { background: linear-gradient(165deg, #e7ddc6, #c8b48a 72%, #8f7c52); color: #231e14; }
.stage__art--c b { font-size: clamp(22px, 3vw, 38px); line-height: 0.92; }

.stage__badge {
  position: absolute;
  right: 4%;
  top: -2%;
  width: clamp(78px, 9vw, 106px);
  aspect-ratio: 1;
  z-index: 4;
  display: grid;
  place-items: center;
  color: var(--text);
}
.stage__badge svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 22s linear infinite;
  stroke: none;
}
.stage__badge text {
  fill: currentColor;
  font-family: var(--font-mono);
  font-size: 9.2px;
  letter-spacing: 0.2em;
}
.stage__badge-core {
  width: 40%;
  height: 40%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  transform: translateY(-1px);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* marquee */
.marquee {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 0;
  background: var(--bg-soft);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee__track span {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.marquee__track i { color: var(--accent); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 128px) clamp(20px, 4vw, 48px) 0;
  scroll-margin-top: 84px;
}
.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: end;
  padding-bottom: clamp(32px, 4vw, 52px);
}
.section__title {
  font-size: clamp(2.1rem, 4.6vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 600;
}
.section__title .serif-italic { color: var(--text-dim); }
.section__desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
  max-width: 44ch;
  padding-bottom: 6px;
}

/* ---------- works panel ---------- */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  overflow: hidden;
}
.panel__top {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(16px, 2.4vw, 26px);
  border-bottom: 1px solid var(--line-soft);
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 12.5px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.28s var(--ease);
}
.chip span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--muted);
}
.chip:hover { border-color: var(--text-dim); color: var(--text); }
.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
}
.chip.is-active span { color: var(--accent-ink); opacity: 0.65; }

.panel__tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  transition: border-color 0.3s var(--ease), background-color 0.3s;
}
.search:focus-within { border-color: var(--accent); }
.search svg { width: 14px; height: 14px; color: var(--muted); flex: none; }
.search input {
  width: 148px;
  border: 0;
  background: none;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 12.5px;
  outline: none;
}
.search input::placeholder { color: var(--muted); }

.panel__count {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px clamp(16px, 2.4vw, 26px);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--line-soft);
}
.panel__hint { text-transform: none; letter-spacing: 0.02em; }

.works__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
  padding: clamp(16px, 2.4vw, 26px);
}
.works__grid:empty { display: none; }

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.4s var(--ease), box-shadow 0.5s var(--ease);
}
.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.work-card.is-featured { grid-column: span 2; }

.work-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-soft);
}
.work-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), filter 0.5s;
}
.work-card:hover .work-cover img { transform: scale(1.035); }
.work-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.35));
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.work-card:hover .work-cover::after { opacity: 1; }

.work-cover__fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, var(--surface-2), var(--bg-soft)),
    repeating-linear-gradient(45deg, transparent 0 10px, var(--line-soft) 10px 11px);
  color: var(--text-dim);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: 0.06em;
}

.work-index {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(11, 11, 12, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #f2efe6;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  z-index: 2;
}
.work-flag {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.work-tools {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.work-card:hover .work-tools,
.work-card:focus-within .work-tools { opacity: 1; transform: none; }
.work-tool {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 11, 12, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #f2efe6;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, transform 0.25s;
}
.work-tool svg { width: 14px; height: 14px; }
.work-tool:hover { background: var(--accent); color: var(--accent-ink); transform: scale(1.08); }
.work-tool--danger:hover { background: var(--danger); color: #fff; }

.work-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
  flex: 1;
}
.work-title-row { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; }
.work-title {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
}
.work-title a { background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 0.4s var(--ease); }
.work-title a:hover { background-size: 100% 1px; }
.work-year { font-family: var(--font-mono); font-size: 10px; color: var(--muted); flex: none; }
.work-desc {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.work-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.work-tag {
  padding: 3px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.work-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.work-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s, gap 0.25s;
  max-width: 62%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.work-link:hover { color: var(--accent); border-color: var(--accent); gap: 8px; }
.work-link svg { width: 11px; height: 11px; flex: none; }
.work-link--none { color: var(--muted); cursor: default; }
.work-link--none:hover { color: var(--muted); border-color: transparent; }

.works__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: clamp(48px, 8vw, 88px) 24px;
  text-align: center;
}
.works__empty .serif-italic { font-size: clamp(22px, 3vw, 30px); }
.works__empty > span { color: var(--muted); font-size: 13px; }
.works__empty .btn { margin-top: 10px; }

/* ---------- about ---------- */
.about { padding-top: clamp(80px, 11vw, 140px); }
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}
.about__portrait { position: sticky; top: 100px; }
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, var(--surface-2), var(--bg-soft));
  overflow: hidden;
  display: grid;
  place-items: center;
}
.portrait__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 34px 34px;
}
.portrait::before {
  content: "";
  position: absolute;
  width: 68%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, var(--accent), transparent 68%);
  filter: blur(24px);
  opacity: 0.5;
  top: 12%;
  right: -12%;
}
.portrait__initials {
  position: relative;
  font-size: clamp(64px, 9vw, 118px);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--text);
  mix-blend-mode: difference;
}
.portrait__tag {
  position: absolute;
  left: 16px;
  top: 16px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.portrait__note {
  position: absolute;
  left: 16px;
  bottom: 16px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.about__quote {
  margin-top: 22px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
}
.about__sign {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.about__body { display: flex; flex-direction: column; gap: clamp(30px, 4vw, 46px); }
.about__intro p {
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.85;
  color: var(--text-dim);
}
.about__intro p + p { margin-top: 16px; }
.about__intro abbr { text-decoration: none; border-bottom: 1px dotted var(--muted); cursor: help; }

.block-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.block-title span { color: var(--text); }
.block-title i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-left: auto;
}

.expertise__list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  transition: padding-left 0.4s var(--ease), background-color 0.4s;
}
.expertise__list li:hover { padding-left: 8px; }
.expertise__list .num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  padding-top: 4px;
  letter-spacing: 0.06em;
}
.expertise__list h4 { font-size: 16px; font-weight: 600; margin-bottom: 5px; letter-spacing: -0.01em; }
.expertise__list p { font-size: 13px; line-height: 1.75; color: var(--muted); max-width: 52ch; }

.about__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.chips li {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  transition: all 0.25s var(--ease);
}
.chips li:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.timeline { margin-top: 16px; }
.timeline li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.timeline li:last-child { border-bottom: 0; }
.timeline span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.timeline b { font-size: 13px; font-weight: 500; color: var(--text-dim); }

/* ---------- contact ---------- */
.contact { padding-top: clamp(88px, 12vw, 156px); }
.contact__top { padding-bottom: clamp(40px, 6vw, 68px); border-bottom: 1px solid var(--line); }
.contact__lede {
  font-size: clamp(2rem, 5.4vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 600;
  margin-bottom: 30px;
}
.contact__mail {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.05rem, 2.4vw, 1.9rem);
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  transition: color 0.3s, border-color 0.3s, gap 0.35s var(--ease);
}
.contact__mail svg { width: 22px; height: 22px; color: var(--accent); }
.contact__mail:hover { color: var(--accent); border-color: var(--accent); gap: 18px; }

.contact__meta {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.contact__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.contact__socials a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-dim);
  transition: all 0.3s var(--ease);
}
.contact__socials a span { color: var(--muted); transition: color 0.3s, transform 0.3s var(--ease); }
.contact__socials a:hover { border-color: var(--text); color: var(--text); }
.contact__socials a:hover span { color: var(--accent); transform: translate(2px, -2px); }

.colophon {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 40px);
  padding: 34px 0 44px;
  border-bottom: 1px solid var(--line-soft);
}
.colophon h4 {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.colophon p { font-size: 12px; line-height: 1.8; color: var(--text-dim); }
.swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: 0;
  border: 1px solid var(--line);
}
.swatch--ink { background: #0b0b0c; }
.swatch--paper { background: #f2efe6; }
.swatch--acid { background: #cdf94f; }

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0 34px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.footer__mid { opacity: 0.7; }
.footer a { border-bottom: 1px solid transparent; transition: color 0.25s, border-color 0.25s; }
.footer a:hover { color: var(--text); border-color: var(--text); }

/* ---------- drawer ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: rgba(5, 5, 6, 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.scrim.is-visible { opacity: 1; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 190;
  width: min(520px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--bg-soft);
  border-left: 1px solid var(--line);
  transform: translateX(102%);
  visibility: hidden;
  transition: transform 0.55s var(--ease), visibility 0.55s;
  box-shadow: -30px 0 80px -40px rgba(0, 0, 0, 0.9);
}
.drawer.is-open { transform: none; visibility: visible; }

.drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 3vw, 28px) 16px;
  border-bottom: 1px solid var(--line-soft);
}
.drawer__head .eyebrow { margin-bottom: 10px; }
.drawer__title { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; }

.drawer__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px clamp(18px, 3vw, 28px) 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-row { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 0.8fr); gap: 12px; }
.label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.label i { color: var(--accent); font-style: normal; }

.field input[type="text"],
.field input[type="url"],
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.55;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}
.field textarea { resize: vertical; min-height: 82px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 0.8; }
.field input:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field__hint { font-size: 10.5px; color: var(--muted); line-height: 1.5; }

.dropzone {
  position: relative;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--surface);
  min-height: 148px;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); }
.dropzone.is-drag { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); }
.dropzone__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px;
  text-align: center;
}
.dropzone__empty svg { width: 24px; height: 24px; color: var(--accent); margin-bottom: 4px; }
.dropzone__empty b { font-size: 13px; font-weight: 500; }
.dropzone__empty span { font-size: 10.5px; color: var(--muted); }
.dropzone__preview { width: 100%; height: 100%; max-height: 260px; object-fit: cover; }
.dropzone__remove {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(11, 11, 12, 0.72);
  color: #f2efe6;
  font-size: 11px;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.dropzone__remove:hover { background: var(--danger); }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-dim);
  cursor: pointer;
}
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box {
  width: 17px;
  height: 17px;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: grid;
  place-items: center;
  flex: none;
  transition: background-color 0.25s, border-color 0.25s;
}
.check__box::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 1.6px solid var(--accent-ink);
  border-bottom: 1.6px solid var(--accent-ink);
  transform: rotate(-45deg) translateY(-1px) scale(0.4);
  opacity: 0;
  transition: opacity 0.2s, transform 0.25s var(--ease);
}
.check input:checked + .check__box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .check__box::after { opacity: 1; transform: rotate(-45deg) translateY(-1px) scale(1); }
.check input:focus-visible + .check__box { outline: 2px solid var(--accent); outline-offset: 3px; }

.form-error {
  padding: 10px 12px;
  border: 1px solid var(--danger);
  border-radius: 8px;
  font-size: 12px;
  color: var(--danger);
  background: transparent;
}

.drawer__actions { display: flex; gap: 10px; margin-top: 2px; }
.drawer__actions .btn--accent { flex: 1; }
.drawer__utils {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px solid var(--line-soft);
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 260;
  transform: translate(-50%, 18px);
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--text);
  color: var(--bg);
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  max-width: min(88vw, 420px);
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--danger); color: #fff; border-color: transparent; }

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__stage { min-height: 430px; max-width: 620px; width: 100%; margin-top: 16px; }
  .stage__card--a { width: 56%; }
  .stage__card--b { width: 52%; top: 26%; }
  .stage__card--c { width: 38%; left: 8%; }
  .section__head { grid-template-columns: 1fr; align-items: start; gap: 18px; }
  .section__desc { max-width: 60ch; }
  .about__grid { grid-template-columns: 1fr; }
  .about__portrait { position: static; max-width: 420px; }
  .work-card.is-featured { grid-column: span 1; }
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__burger { display: grid; }
  .nav__upload { display: none; }
  .works__grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
  .colophon { grid-template-columns: 1fr; gap: 20px; }
  .about__cols { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 620px) {
  .nav { padding: 14px 18px; gap: 12px; }
  .nav.is-stuck { padding-top: 10px; padding-bottom: 10px; }
  .brand-text i { display: none; }
  .brand-text b { font-size: 13px; }
  .hero { padding-top: 108px; }
  .hero__title { font-size: clamp(2.15rem, 9.4vw, 3rem); }
  .hero__lede { font-size: 14px; }
  .hero__meta { gap: 14px 22px; margin-top: 32px; }
  .hero__stage { min-height: 330px; }
  .stage__card--a { width: 60%; }
  .stage__card--b { width: 54%; top: 30%; }
  .stage__card--c { width: 40%; }
  .stage__badge { top: -4%; right: 0; }
  .panel__top { flex-direction: column; align-items: stretch; }
  .panel__tools { justify-content: space-between; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .panel__count { font-size: 9.5px; }
  .panel__hint { display: none; }
  .works__grid { grid-template-columns: 1fr; }
  .section { padding-top: 72px; }
  .work-tools { opacity: 1; transform: none; }
  .drawer { width: 100%; }
  .field-row { grid-template-columns: 1fr; }
  .footer { font-size: 9px; gap: 8px; }
  .footer__mid { order: 3; width: 100%; }
  .contact__socials { gap: 8px; }
  .contact__socials a { padding: 8px 13px; font-size: 12px; }
}

@media (max-width: 400px) {
  .filters { gap: 6px; }
  .chip { padding: 6px 11px; font-size: 12px; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
}
