/* ============================================================
   晏文涛 — Portfolio
   Aesthetic: warm graphite terminal × editorial serif
   ============================================================ */

:root {
  --bg: #161411;
  --bg-deep: #100f0d;
  --bg-elev: #1b1814;
  --ink: #ece6d9;
  --ink-strong: #f6f1e6;
  --muted: #9b9486;
  --faint: #8a8376;
  --line: rgba(236, 230, 217, 0.13);
  --line-strong: rgba(236, 230, 217, 0.26);
  --accent: #e58a6b;
  --accent-deep: #d97757;
  --accent-soft: rgba(229, 138, 107, 0.13);
  --sage: #aeb694;
  --paper: #eae3d4;
  --accent-ink: #9c4526;
  --serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", "Times New Roman", serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, "PingFang SC", "Microsoft YaHei", monospace;
  --pad: clamp(20px, 4.5vw, 72px);
  --max: 1320px;
  --nav: 64px;
  --section: clamp(88px, 12vh, 148px);
  --ease: cubic-bezier(0.22, 0.61, 0.24, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav) + 24px);
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 82% -8%, rgba(229, 138, 107, 0.1), transparent 62%),
    radial-gradient(900px 560px at -12% 34%, rgba(174, 182, 148, 0.055), transparent 60%),
    radial-gradient(760px 500px at 70% 100%, rgba(229, 138, 107, 0.045), transparent 65%);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

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

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: #3a332a;
  border: 2px solid var(--bg-deep);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: #4d4438;
}

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

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--bg-deep);
  font-family: var(--mono);
  font-size: 12px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
}

/* ---------- atmosphere ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 95;
  pointer-events: none;
}
.progress-bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-deep), #f0b79e);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.12s linear;
}

/* ---------- topbar ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 70;
  height: var(--nav);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 var(--pad);
  background: rgba(22, 20, 17, 0.66);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.topbar.is-scrolled {
  background: rgba(22, 20, 17, 0.88);
  border-bottom-color: var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  display: inline-block;
  color: var(--accent);
  font-size: 15px;
  line-height: 1;
  animation: spin 18s linear infinite;
}
.brand-name {
  color: var(--ink-strong);
}
.brand-path {
  color: var(--faint);
  font-size: 10.5px;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 34px);
}
.nav a {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 6px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}
.nav a .idx {
  font-size: 9px;
  color: var(--faint);
  letter-spacing: 0.06em;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav a:hover,
.nav a[aria-current="true"] {
  color: var(--ink-strong);
}
.nav a:hover::after,
.nav a[aria-current="true"]::after {
  transform: scaleX(1);
}

.cmdk {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
  padding: 6px 9px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.cmdk:hover {
  color: var(--ink-strong);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
}
.cmdk-keys {
  display: flex;
  gap: 3px;
}
kbd {
  display: inline-block;
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.4;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  width: 100%;
  max-width: var(--max);
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(var(--nav) + clamp(48px, 9vh, 104px)) var(--pad) clamp(44px, 7vh, 84px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(96px, 14vw, 200px);
  align-items: center;
  gap: clamp(20px, 4vw, 64px);
}

.hero-main {
  min-width: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 clamp(26px, 4.5vh, 44px);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow-mark {
  color: var(--accent);
  font-size: 13px;
}

.hero-name {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(78px, 16vw, 208px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: 0.015em;
  color: var(--ink-strong);
}
.hero-name .ch {
  display: inline-block;
  animation: charIn 1.1s var(--ease) both;
}
.hero-name .ch:nth-child(1) {
  animation-delay: 0.08s;
}
.hero-name .ch:nth-child(2) {
  animation-delay: 0.18s;
}
.hero-name .ch:nth-child(3) {
  animation-delay: 0.28s;
}
.hero-name .accent {
  color: var(--accent);
}

.hero-role {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 13px;
  margin: clamp(20px, 3vh, 30px) 0 0;
  font-family: var(--mono);
  font-size: clamp(10px, 1vw, 11.5px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-role .sep {
  color: var(--faint);
}

.hero-line {
  max-width: 19em;
  margin: clamp(28px, 5vh, 46px) 0 0;
  font-size: clamp(24px, 3.4vw, 42px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.hero-line .mark {
  position: relative;
  color: var(--accent);
  white-space: nowrap;
}
.hero-line .mark::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(229, 138, 107, 0));
  opacity: 0.65;
}

/* terminal */

.terminal {
  max-width: 642px;
  margin-top: clamp(36px, 5.5vh, 58px);
  border: 1px solid rgba(236, 230, 217, 0.42);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(18, 16, 13, 0.94), rgba(11, 10, 8, 0.94));
  box-shadow:
    0 34px 90px -36px rgba(0, 0, 0, 0.95),
    0 0 60px -30px rgba(229, 138, 107, 0.16),
    0 0 0 1px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.term-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  color: var(--faint);
  text-transform: uppercase;
}
.term-state {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--sage);
  white-space: nowrap;
}
.term-state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 9px rgba(174, 182, 148, 0.8);
  animation: pulse 2.6s ease-in-out infinite;
}

.term-body {
  padding: 15px 16px 17px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.95;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.term-body p {
  margin: 0;
}
.term-line .prompt,
.out-line .prompt {
  color: var(--accent);
}
.term-line .caret {
  opacity: 1;
}
.term.is-ready .term-line .caret {
  opacity: 0;
}

.out-line {
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.out-line .dim {
  color: var(--faint);
}
.out-line .star {
  color: var(--accent);
  margin-right: 2px;
}
.out-line.out-star {
  color: var(--ink);
}
.out-idle {
  margin-top: 6px !important;
}
.term.is-animating .out-line {
  opacity: 0;
  transform: translateY(4px);
}
.term.is-animating .out-line.is-on {
  opacity: 1;
  transform: none;
}

.caret {
  display: inline-block;
  width: 7px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.16em;
  background: var(--accent);
  animation: blink 1.1s steps(2, start) infinite;
}

.hero-hint {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.hero-side {
  position: relative;
  align-self: stretch;
  min-height: 360px;
}
.hero-star {
  position: absolute;
  top: 0;
  right: 0;
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1;
  color: var(--accent);
  opacity: 0.9;
  animation: spin 30s linear infinite;
  filter: drop-shadow(0 0 30px rgba(229, 138, 107, 0.25));
}
.hero-axis {
  position: absolute;
  top: 26%;
  right: 20px;
  width: 1px;
  height: 54%;
  background: linear-gradient(to bottom, var(--line-strong), transparent);
}
.hero-vertical {
  position: absolute;
  right: 2px;
  bottom: 0;
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.4em;
  color: var(--faint);
  text-transform: uppercase;
}

/* ---------- ticker ---------- */

.ticker {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: marquee 52s linear infinite;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticker:hover .ticker-track {
  animation-play-state: paused;
}
.ticker-group {
  display: flex;
  align-items: center;
}
.ticker-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 13px 22px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}
.ticker-item i {
  font-style: normal;
  font-size: 11px;
  color: var(--accent);
  opacity: 0.7;
}

/* ---------- sections ---------- */

.section {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section) var(--pad);
}

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 300px);
  column-gap: clamp(24px, 4vw, 56px);
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.sec-kicker {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.tool {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.tool-dot {
  color: var(--accent);
  font-size: 11px;
}
.sec-count {
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  white-space: nowrap;
}
.sec-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 7vw, 86px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0.02em;
  color: var(--ink-strong);
}
.sec-en {
  margin-left: clamp(10px, 1.4vw, 20px);
  font-family: var(--mono);
  font-size: clamp(9.5px, 0.9vw, 11.5px);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  vertical-align: middle;
}
.sec-note {
  justify-self: end;
  margin: 0 0 9px;
  max-width: 280px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 2;
  letter-spacing: 0.05em;
  color: var(--faint);
  text-align: right;
}

/* ---------- works ---------- */

.works-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(20px, 4vw, 56px);
  row-gap: 72px;
}
.work:nth-child(1) {
  grid-column: 1 / 8;
}
.work:nth-child(2) {
  grid-column: 8 / 13;
  margin-top: clamp(44px, 9vw, 128px);
}

/* live preview cards */
.work-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.work-link:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 9px;
}
.work-visual--shot {
  background: #0d0b09;
}
.work-visual--shot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10, 9, 7, 0.38), transparent 24%),
    linear-gradient(0deg, rgba(10, 9, 7, 0.52), transparent 28%);
}
.work-shot {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.work-link:hover .work-shot,
.work-link:focus-visible .work-shot {
  transform: scale(1.045);
}
.work-visual--shot .vis-stamp {
  border-style: solid;
  border-color: rgba(229, 138, 107, 0.65);
  background: rgba(18, 15, 12, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #f0a184;
}
.work-open {
  position: absolute;
  z-index: 6;
  right: 15px;
  bottom: 14px;
  padding: 8px 12px;
  border: 1px solid rgba(236, 230, 217, 0.32);
  background: rgba(18, 15, 12, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--ink-strong);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), border-color 0.3s var(--ease);
}
.work-link:hover .work-open,
.work-link:focus-visible .work-open {
  opacity: 1;
  transform: none;
  border-color: rgba(229, 138, 107, 0.65);
}
@media (hover: none) {
  .work-open {
    opacity: 1;
    transform: none;
  }
}

.work-visual {
  position: relative;
  isolation: isolate;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  transition: border-color 0.4s var(--ease);
}
.work:hover .work-visual {
  border-color: rgba(236, 230, 217, 0.38);
}
.work-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.07) 50%, transparent 58%);
  transform: translateX(-130%);
  transition: transform 1.3s var(--ease);
}
.work:hover .work-visual::after {
  transform: translateX(130%);
}

/* crop-mark corners */
.corners i {
  position: absolute;
  z-index: 5;
  width: 11px;
  height: 11px;
  border-color: rgba(236, 230, 217, 0.45);
  border-style: solid;
  border-width: 0;
}
.corners i:nth-child(1) {
  top: 11px;
  left: 11px;
  border-top-width: 1px;
  border-left-width: 1px;
}
.corners i:nth-child(2) {
  top: 11px;
  right: 11px;
  border-top-width: 1px;
  border-right-width: 1px;
}
.corners i:nth-child(3) {
  bottom: 11px;
  left: 11px;
  border-bottom-width: 1px;
  border-left-width: 1px;
}
.corners i:nth-child(4) {
  bottom: 11px;
  right: 11px;
  border-bottom-width: 1px;
  border-right-width: 1px;
}

.vis-label,
.vis-foot,
.vis-stamp {
  position: absolute;
  z-index: 5;
  font-family: var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.vis-label {
  top: 16px;
  left: 19px;
  font-size: 9px;
  color: var(--muted);
}
.vis-stamp {
  top: 13px;
  right: 15px;
  padding: 4px 7px;
  border: 1px dashed rgba(229, 138, 107, 0.55);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.vis-foot {
  bottom: 16px;
  left: 19px;
  font-size: 8.5px;
  color: var(--faint);
}
.work-visual .big-num {
  position: absolute;
  z-index: 1;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1;
  user-select: none;
  transition: transform 1.1s var(--ease), opacity 1.1s var(--ease);
}
.work-visual .disc,
.work-visual .halftone,
.work-visual .sage,
.work-visual .outline-circle,
.work-visual .dot {
  transition: transform 1.2s var(--ease), box-shadow 0.6s var(--ease);
}

/* project 01 — signal */
.art-a {
  background:
    radial-gradient(circle at 62% 45%, rgba(229, 138, 107, 0.24), transparent 43%),
    radial-gradient(circle at 18% 92%, rgba(174, 182, 148, 0.09), transparent 46%),
    #1a1713;
}
.art-a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(236, 230, 217, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 230, 217, 0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 56% 44%, #000 10%, transparent 76%);
  mask-image: radial-gradient(circle at 56% 44%, #000 10%, transparent 76%);
}
.art-a .ring {
  position: absolute;
  left: 62%;
  top: 46%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(229, 138, 107, 0.3);
  z-index: 2;
}
.art-a .r1 {
  width: 24%;
  aspect-ratio: 1;
  border-style: dashed;
  border-color: rgba(229, 138, 107, 0.5);
  animation: spinCentered 44s linear infinite;
}
.art-a .r2 {
  width: 45%;
  aspect-ratio: 1;
  border-color: rgba(236, 230, 217, 0.16);
}
.art-a .r3 {
  width: 66%;
  aspect-ratio: 1;
  border-color: rgba(229, 138, 107, 0.14);
}
.art-a .dot {
  position: absolute;
  left: 62%;
  top: 46%;
  z-index: 3;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(229, 138, 107, 0.9);
}
.art-a .big-num {
  left: 4%;
  bottom: -7%;
  font-size: clamp(130px, 21vw, 250px);
  color: rgba(236, 230, 217, 0.07);
}
.work:hover .art-a .r1 {
  animation-duration: 14s;
}
.work:hover .art-a .dot {
  transform: scale(1.45);
  box-shadow: 0 0 38px rgba(229, 138, 107, 1);
}
.work:hover .art-a .big-num {
  transform: translate(-10px, -8px);
}

/* project 02 — print grid */
.art-b {
  background: var(--paper);
}
.art-b::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(28, 25, 20, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 25, 20, 0.075) 1px, transparent 1px);
  background-size: 40px 40px;
}
.art-b .disc {
  position: absolute;
  top: -15%;
  right: -11%;
  z-index: 1;
  width: 57%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #1c1914;
}
.art-b .sage {
  position: absolute;
  left: 10%;
  bottom: 12%;
  z-index: 1;
  width: 32%;
  height: 36%;
  background: #9aa684;
  mix-blend-mode: multiply;
}
.art-b .halftone {
  position: absolute;
  left: 14%;
  top: 15%;
  z-index: 2;
  width: 36%;
  height: 31%;
  background-image: radial-gradient(#1c1914 1.1px, transparent 1.25px);
  background-size: 8px 8px;
  opacity: 0.52;
}
.art-b .outline-circle {
  position: absolute;
  left: 45%;
  top: 28%;
  z-index: 2;
  width: 46%;
  aspect-ratio: 1;
  border: 1px solid rgba(28, 25, 20, 0.38);
  border-radius: 50%;
}
.art-b .big-num {
  right: -2%;
  bottom: -9%;
  z-index: 1;
  font-size: clamp(130px, 19vw, 230px);
  color: rgba(28, 25, 20, 0.06);
  -webkit-text-stroke: 1px rgba(28, 25, 20, 0.4);
}
.art-b .vis-label {
  color: #6e6454;
}
.art-b .vis-foot {
  color: #7d7362;
}
.art-b .vis-stamp {
  color: var(--accent-ink);
  border-color: rgba(169, 74, 46, 0.5);
}
.art-b .corners i {
  border-color: rgba(28, 25, 20, 0.45);
}
.art-b::after {
  background: linear-gradient(115deg, transparent 42%, rgba(28, 25, 20, 0.06) 50%, transparent 58%);
}
.work:hover .art-b .disc {
  transform: translate(-16px, 14px) scale(1.02);
}
.work:hover .art-b .sage {
  transform: translate(10px, -6px);
}
.work:hover .art-b .halftone {
  transform: translate(8px, 4px);
}
.work:hover .art-b .big-num {
  transform: translate(8px, -6px);
}

/* work meta */
.work-body {
  padding-top: 20px;
}
.work-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.work-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(23px, 2.6vw, 32px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--ink-strong);
  transition: color 0.3s var(--ease);
}
.work:hover .work-title {
  color: var(--accent);
}
.work-title-sub {
  margin-left: 0.2em;
  font-size: 0.62em;
  font-weight: 400;
  color: var(--muted);
}
.work-year {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--faint);
}
.work-desc {
  max-width: 42ch;
  margin: 9px 0 0;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 4px 9px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
}

.works-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: clamp(38px, 5vw, 60px) 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
}
.works-foot .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
  animation: pulse 3s ease-in-out infinite;
}
.works-foot-en {
  margin-left: auto;
  color: var(--faint);
  letter-spacing: 0.2em;
}

/* ---------- about band ---------- */

.about-band {
  position: relative;
  background: transparent;
  color: var(--ink);
  border-top: 1px solid rgba(236, 230, 217, 0.36);
  border-bottom: 1px solid rgba(236, 230, 217, 0.36);
}
.about-inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
}
.about-band .sec-kicker {
  border-top-color: var(--line);
  color: var(--muted);
}
.about-band .tool-dot {
  color: var(--accent);
}
.about-band .sec-count {
  color: var(--faint);
}
.about-band .sec-title {
  color: var(--ink-strong);
}
.about-band .sec-en,
.about-band .sec-note {
  color: var(--faint);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(250px, 4.2fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
}

.portrait-card {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(165deg, #241f19 0%, #17140f 100%);
  border: 1px solid rgba(236, 230, 217, 0.42);
  isolation: isolate;
  box-shadow:
    0 30px 70px -40px rgba(0, 0, 0, 0.95),
    0 0 50px -22px rgba(229, 138, 107, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.portrait-card:hover {
  border-color: rgba(229, 138, 107, 0.55);
  box-shadow:
    0 36px 90px -42px rgba(0, 0, 0, 0.98),
    0 0 60px -18px rgba(229, 138, 107, 0.3),
    0 0 0 1px rgba(229, 138, 107, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
@media (hover: hover) and (pointer: fine) {
  .portrait-card {
    cursor: crosshair;
  }
}
.pc-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(236, 230, 217, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 230, 217, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000, transparent 72%);
  mask-image: radial-gradient(circle at 50% 45%, #000, transparent 72%);
}
.pc-ring {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 84%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(229, 138, 107, 0.26);
  border-radius: 50%;
}
.pc-ring::after {
  content: "";
  position: absolute;
  inset: 11%;
  border: 1px dashed rgba(236, 230, 217, 0.16);
  border-radius: 50%;
  animation: spin 38s linear infinite;
}
.portrait-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -35%;
  height: 35%;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(229, 138, 107, 0.1), transparent);
  animation: cardScan 9s linear infinite;
}
.portrait-card:hover::after {
  animation-duration: 4.5s;
}

.stroke-mono {
  position: absolute;
  left: 50%;
  top: 44%;
  z-index: 2;
  width: 92%;
  height: auto;
  overflow: visible;
  transform: translate(-50%, -50%);
  transition: filter 0.4s var(--ease);
}
.portrait-card:hover .stroke-mono {
  filter: drop-shadow(0 0 14px rgba(229, 138, 107, 0.16));
}

.mono-base,
.mono-trace,
.mono-glow,
.mono-echo,
.mono-spark,
.mono-star-line,
.mono-star-glow {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.mono-base {
  stroke: rgba(236, 230, 217, 0.18);
  stroke-width: 1.1;
}
.mono-trace {
  stroke: url(#monoTraceGrad);
  stroke-width: 1.7;
}
.mono-glow {
  stroke: var(--accent);
  stroke-width: 5;
  opacity: 0.16;
  filter: blur(3px);
}
.mono-echo {
  opacity: 0;
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease);
}
.mono-echo--a {
  stroke: var(--accent);
  stroke-width: 1.4;
}
.mono-echo--b {
  stroke: var(--sage);
  stroke-width: 1.4;
}
.mono-spark {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 7 100;
  opacity: 0;
  filter: drop-shadow(0 0 5px rgba(229, 138, 107, 0.75));
}
.mono-hit,
.mono-star-hit {
  fill: transparent;
  stroke: none;
  pointer-events: all;
}
.mono-letter {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  transition: transform 0.35s var(--ease);
}
.mono-tscan {
  fill: var(--accent);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 5px rgba(229, 138, 107, 0.9));
}

.mono-trace,
.mono-glow,
.mono-star-line,
.mono-star-glow {
  stroke-dasharray: 100;
}
.portrait-card.is-armed .mono-trace,
.portrait-card.is-armed .mono-glow,
.portrait-card.is-armed .mono-star-line,
.portrait-card.is-armed .mono-star-glow {
  stroke-dashoffset: 100;
}
.portrait-card.is-visible .mono-trace {
  animation: monoDraw 1.15s var(--ease) both;
  animation-delay: calc(200ms + var(--i) * 170ms);
}
.portrait-card.is-visible .mono-glow {
  animation: monoDraw 1.15s var(--ease) both;
  animation-delay: calc(260ms + var(--i) * 170ms);
}
.portrait-card.is-visible .mono-star-line {
  animation: monoDraw 0.9s var(--ease) both 1.25s;
}
.portrait-card.is-visible .mono-star-glow {
  animation: monoDraw 0.9s var(--ease) both 1.3s;
}
.portrait-card.is-visible .mono-spark {
  animation: monoSparkIn 0.5s var(--ease) both 2.1s, monoSparkMove var(--spark-dur, 5s) linear infinite 2.4s;
}
.mono-letter[data-letter="Y"] .mono-spark {
  --spark-dur: 7s;
}
.mono-letter[data-letter="W"] .mono-spark {
  --spark-dur: 5.5s;
}
.mono-letter[data-letter="T"] .mono-spark {
  --spark-dur: 4.2s;
}

/* hover: Y echo, W glitch, T charge */
.mono-letter[data-letter="Y"]:hover {
  transform: translateY(-1px) scale(1.035);
}
.mono-letter[data-letter="Y"]:hover .mono-echo {
  opacity: 0.55;
}
.mono-letter[data-letter="Y"]:hover .mono-echo--a {
  transform: translate(2.5px, -1.5px);
}
.mono-letter[data-letter="Y"]:hover .mono-echo--b {
  transform: translate(-2.5px, 1.5px);
}
.mono-letter[data-letter="Y"]:hover .mono-trace {
  stroke: var(--accent);
  stroke-width: 2.4;
}
.mono-letter[data-letter="Y"]:hover .mono-glow {
  opacity: 0.42;
}

.mono-letter[data-letter="W"]:hover {
  animation: monoGlitch 0.34s steps(2, end) infinite;
}
.mono-letter[data-letter="W"]:hover .mono-echo--a {
  opacity: 0.7;
  animation: echoGlitchA 0.3s steps(2, end) infinite;
}
.mono-letter[data-letter="W"]:hover .mono-echo--b {
  opacity: 0.5;
  animation: echoGlitchB 0.26s steps(2, end) infinite;
}
.mono-letter[data-letter="W"]:hover .mono-trace {
  stroke: var(--ink-strong);
  stroke-width: 2.1;
  filter: drop-shadow(0 0 7px rgba(246, 241, 230, 0.35));
}
.mono-letter[data-letter="W"]:hover .mono-base {
  stroke: rgba(229, 138, 107, 0.38);
}

.mono-letter[data-letter="T"]:hover {
  transform: translateY(-1px);
}
.mono-letter[data-letter="T"]:hover .mono-trace {
  stroke: var(--accent);
  stroke-width: 2.6;
  filter: drop-shadow(0 0 8px rgba(229, 138, 107, 0.85));
}
.mono-letter[data-letter="T"]:hover .mono-glow {
  opacity: 0.55;
}
.mono-letter[data-letter="T"]:hover .mono-base {
  stroke: rgba(229, 138, 107, 0.42);
}
.mono-letter[data-letter="T"]:hover .mono-tscan {
  opacity: 0.8;
  animation: monoTScan 0.85s ease-in-out infinite;
}

.mono-star {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: spin 28s linear infinite;
}
.mono-star-line {
  stroke: var(--accent);
  stroke-width: 1.5;
}
.mono-star-glow {
  stroke: var(--accent);
  stroke-width: 3.5;
  opacity: 0.35;
  filter: blur(1.5px);
}
.portrait-card:hover .mono-star {
  animation-duration: 10s;
}
.portrait-card:hover .mono-star:hover {
  animation-duration: 3s;
}
.mono-star:hover .mono-star-line {
  stroke: var(--ink-strong);
}

.mono-burst {
  position: absolute;
  left: 50%;
  top: 44%;
  z-index: 3;
  width: 10px;
  height: 10px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.portrait-card.is-bursting .mono-burst {
  animation: monoBurst 0.9s var(--ease) both;
}
.portrait-card.is-bursting .mono-base {
  stroke: rgba(229, 138, 107, 0.55);
}
.pc-caption {
  position: absolute;
  left: 50%;
  top: 62%;
  z-index: 3;
  padding-left: 0.36em;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.36em;
  color: rgba(236, 230, 217, 0.62);
  white-space: nowrap;
}
.pc-tag {
  position: absolute;
  z-index: 4;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  color: rgba(236, 230, 217, 0.62);
  white-space: nowrap;
}
.pc-tag--tl {
  top: 14px;
  left: 15px;
}
.pc-tag--bl {
  bottom: 14px;
  left: 15px;
}
.pc-tag--br {
  right: 15px;
  bottom: 14px;
}

.facts {
  margin: 24px 0 0;
  border-top: 1px solid var(--line-strong);
}
.facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.facts dd {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
  text-align: right;
}

.about-copy {
  padding-top: 2px;
}
.about-copy .lead {
  margin: 0 0 24px;
  max-width: 21em;
  font-size: clamp(21px, 2.5vw, 29px);
  font-weight: 500;
  line-height: 1.7;
  color: var(--ink-strong);
}
.about-copy p {
  max-width: 60ch;
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 2;
  color: var(--muted);
}
.quote {
  margin: 34px 0 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--accent);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.75;
  color: var(--ink-strong);
}
.about-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}
.now {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
}
.now .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
  animation: pulse 3s ease-in-out infinite;
}
.tags--about li {
  border-color: var(--line);
  color: var(--muted);
}

/* ---------- contact ---------- */

.contact {
  position: relative;
  overflow: clip;
}
.contact-star {
  position: absolute;
  right: -4%;
  bottom: -14%;
  font-size: clamp(240px, 34vw, 460px);
  line-height: 1;
  color: rgba(229, 138, 107, 0.055);
  animation: spin 100s linear infinite;
  pointer-events: none;
  user-select: none;
}
.contact .sec-head {
  position: relative;
  z-index: 1;
}
.contact-title {
  grid-column: 1 / 2;
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: clamp(42px, 7vw, 92px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: 0.01em;
  color: var(--ink-strong);
}
.contact-title .mark {
  position: relative;
  color: var(--accent);
  white-space: nowrap;
}
.contact-title .mark::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.02em;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.6;
}
.contact-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: end;
  margin-top: clamp(44px, 6vw, 72px);
}
.contact-lede {
  max-width: 38ch;
  margin: 0;
  font-size: 15px;
  line-height: 2;
  color: var(--muted);
}
.contact-note {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
}
.contact-list {
  border-top: 1px solid var(--line-strong);
}
.c-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.c-row:hover {
  transform: translateX(5px);
  border-bottom-color: var(--line-strong);
}
.c-row--copy {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.c-row--link {
  text-decoration: none;
  color: inherit;
}
.c-row--link:hover .v {
  color: var(--accent);
}
.c-row--copy:hover {
  border-bottom-color: var(--line-strong);
}
.c-row--copy:hover .v.copy,
.c-row--copy:hover .copy-hint {
  color: var(--accent);
  border-bottom-color: rgba(229, 138, 107, 0.4);
}
.c-row .k {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--faint);
}
.c-row .v {
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.65;
  color: var(--ink);
  text-align: right;
  overflow-wrap: anywhere;
}
.c-row .v.copy {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--serif);
  font-size: clamp(15px, 1.5vw, 19px);
  color: var(--ink);
  transition: color 0.25s var(--ease);
}
.copy-hint {
  min-width: 3.4em;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.c-row--copy.is-copied .copy-hint {
  color: var(--sage);
  border-bottom-color: rgba(174, 182, 148, 0.45);
}
.c-row .v.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--sage);
}
.c-row .v.status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
  animation: pulse 2.6s ease-in-out infinite;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--pad) 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 30px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
}
.footer-mid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.footer-mid .star {
  color: var(--accent);
}
#clock {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- command palette ---------- */

.palette {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 12vh 16px 16px;
}
.palette[hidden] {
  display: none;
}
.palette-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 9, 7, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.palette-panel {
  position: relative;
  width: min(590px, 100%);
  background: #121110;
  border: 1px solid var(--line-strong);
  box-shadow: 0 50px 130px -30px rgba(0, 0, 0, 0.95);
  animation: panelIn 0.28s var(--ease) both;
}
.palette-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.palette-input-row .prompt {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
}
#paletteInput {
  flex: 1;
  min-width: 0;
  padding: 2px 0;
  border: 0;
  outline: none;
  background: none;
  color: var(--ink-strong);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  caret-color: var(--accent);
}
#paletteInput::placeholder {
  color: var(--faint);
}
.palette-esc {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
  border: 1px solid var(--line);
  padding: 3px 5px;
}
.palette-list {
  max-height: 46vh;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  list-style: none;
}
.palette-item {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.palette-item[hidden] {
  display: none;
}
.palette-item .p-idx {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
}
.palette-item .p-label {
  font-size: 14.5px;
  color: var(--ink);
}
.palette-item .p-hint {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--faint);
}
.palette-item[aria-selected="true"] {
  background: var(--accent-soft);
  border-color: rgba(229, 138, 107, 0.3);
}
.palette-item[aria-selected="true"] .p-idx {
  color: var(--accent);
}
.palette-empty {
  margin: 0;
  padding: 22px 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--faint);
}
.palette-empty[hidden] {
  display: none;
}
.palette-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 11px 18px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--faint);
}
.palette-foot kbd {
  margin-right: 3px;
}

/* ---------- reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
  transition-delay: calc(var(--i, 0) * 65ms);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- keyframes ---------- */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes spinCentered {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}
@keyframes charIn {
  from {
    opacity: 0;
    transform: translateY(0.16em);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes monoDraw {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes monoSparkIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.95;
  }
}
@keyframes monoSparkMove {
  to {
    stroke-dashoffset: -107;
  }
}
@keyframes cardScan {
  to {
    transform: translateY(400%);
  }
}
@keyframes monoBurst {
  0% {
    opacity: 0.75;
    transform: translate(-50%, -50%) scale(0.35);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(30);
  }
}
@keyframes monoGlitch {
  0%,
  100% {
    transform: translate(0, 0) skewX(0);
  }
  25% {
    transform: translate(1.2px, -1px) skewX(0.7deg);
  }
  50% {
    transform: translate(-1px, 1px) skewX(-0.5deg);
  }
  75% {
    transform: translate(0.6px, 1.4px) skewX(0.4deg);
  }
}
@keyframes echoGlitchA {
  0%,
  100% {
    transform: translate(3px, 0);
  }
  50% {
    transform: translate(0, 1px);
  }
}
@keyframes echoGlitchB {
  0%,
  100% {
    transform: translate(-3px, 0);
  }
  50% {
    transform: translate(1px, -1px);
  }
}
@keyframes monoTScan {
  0% {
    transform: translateY(26px);
    opacity: 0;
  }
  15%,
  85% {
    opacity: 0.75;
  }
  100% {
    transform: translateY(126px);
    opacity: 0;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    padding-top: calc(var(--nav) + clamp(48px, 8vh, 90px));
    padding-bottom: clamp(48px, 8vh, 90px);
  }
  .hero-side {
    position: absolute;
    top: calc(var(--nav) + 42px);
    right: var(--pad);
    min-height: 0;
    width: 60px;
    height: 60px;
  }
  .hero-star {
    top: 0;
    right: 0;
    font-size: 34px;
  }
  .hero-axis,
  .hero-vertical {
    display: none;
  }
  .works-grid {
    grid-template-columns: 1fr;
    row-gap: clamp(48px, 9vw, 80px);
  }
  .work:nth-child(1),
  .work:nth-child(2) {
    grid-column: auto;
    margin-top: 0;
  }
  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .portrait {
    max-width: 380px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 760px) {
  .topbar {
    gap: 12px;
  }
  .brand-path {
    display: none;
  }
  .nav {
    gap: clamp(12px, 3vw, 22px);
  }
  .nav a .idx {
    display: none;
  }
  .cmdk-label {
    display: none;
  }
  .hero {
    min-height: auto;
    padding-top: calc(var(--nav) + 48px);
  }
  .hero-role {
    gap: 6px 10px;
  }
  .hero-line {
    max-width: 14em;
  }
  .terminal {
    margin-top: 34px;
  }
  .term-body {
    font-size: 11.5px;
    line-height: 1.95;
  }
  .sec-head {
    grid-template-columns: 1fr;
    row-gap: 14px;
  }
  .sec-note {
    justify-self: start;
    text-align: left;
    margin-bottom: 0;
  }
  .sec-title {
    font-size: clamp(42px, 12vw, 64px);
  }
  .contact-title {
    grid-column: 1 / -1;
    font-size: clamp(32px, 10.4vw, 58px);
  }
  .works-foot {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .works-foot-en {
    width: 100%;
    margin-left: 15px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .palette {
    padding-top: 9vh;
  }
}

@media (max-width: 480px) {
  .brand-name {
    display: none;
  }
  .brand::after {
    content: "yw";
    color: var(--ink-strong);
  }
  .hero-name {
    font-size: clamp(72px, 23vw, 104px);
  }
  .hero-hint {
    display: none;
  }
  .vis-label {
    font-size: 8px;
    letter-spacing: 0.12em;
  }
  .vis-foot {
    font-size: 7.5px;
    letter-spacing: 0.12em;
  }
  .about-tags {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
  .term.is-animating .out-line {
    opacity: 1;
    transform: none;
  }
  .ticker-track {
    animation: none;
  }
  .portrait-card::after,
  .mono-spark,
  .mono-echo,
  .mono-tscan,
  .mono-burst {
    display: none;
  }
  .mono-star {
    animation: none !important;
  }
  .portrait-card.is-armed .mono-trace,
  .portrait-card.is-armed .mono-glow,
  .portrait-card.is-armed .mono-star-line,
  .portrait-card.is-armed .mono-star-glow {
    stroke-dashoffset: 0 !important;
  }
  .mono-trace,
  .mono-glow,
  .mono-star-line,
  .mono-star-glow {
    animation-delay: 0s !important;
  }
}
