:root {
  --paper: #f8f6f2;
  --surface: #fffdf9;
  --ink: #221b1a;
  --muted: #615551;
  --rule: #e3dad3;
  --red: #a52338;
  --red-dark: #7e172b;
  --accent-soft: #f3e3e3;
  --body: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --display: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --mono: 'IBM Plex Mono', Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.65 var(--body); font-synthesis-weight: none; }
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
.shell { width: min(100% - 96px, 1220px); margin-inline: auto; }
.skip { position: absolute; z-index: 10; inset: -120px auto auto 12px; background: white; padding: 12px; }
.skip:focus { top: 12px; }
.site-header {
  position: sticky; top: 0; z-index: 5;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  transition: background var(--motion-base) var(--ease-soft), box-shadow var(--motion-base) var(--ease-soft);
}
.site-header.is-scrolled {
  background: rgba(248, 246, 242, .87);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px #35161b0a;
}
.header-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; white-space: nowrap; }
.wordmark small { display: none; }
.mark {
  display: inline-grid; place-items: center; min-width: 36px; height: 36px;
  border-radius: 12px; color: #fff; background: var(--red); font: 600 19px/1 var(--body);
}
.mark span { margin-left: -3px; }
.header-inner nav { display: flex; align-items: center; gap: 6px; }
.header-inner nav a, .header-contact {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 15px;
  border-radius: 999px; color: var(--muted); font-size: 14px; white-space: nowrap;
  transition: color var(--motion-base), background var(--motion-base);
}
.header-inner nav a:hover, .header-inner nav a[aria-current] { background: var(--accent-soft); color: var(--red-dark); }
.header-contact { border: 1px solid var(--rule); color: var(--ink); }
.header-contact:hover { background: var(--ink); color: white; }
.hero {
  min-height: min(690px, calc(100svh - 70px)); display: grid; align-items: center;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: clamp(34px, 5vw, 76px); padding-block: clamp(48px, 6vw, 96px);
}
.eyebrow { color: var(--red-dark); font: 600 11px/1.5 var(--mono); letter-spacing: .14em; }
.hero h1 {
  margin: 15px 0 8px; color: var(--red);
  font: 600 clamp(65px, 8.7vw, 131px)/1.1 var(--display);
  letter-spacing: -.075em; white-space: nowrap;
}
.hero h1 span { padding-inline-start: .04em; }
.intro-role { font-size: clamp(16px, 1.6vw, 23px); font-weight: 600; }
.lead { max-width: 34ch; margin-top: 12px; color: var(--muted); font-size: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 46px; padding: 10px 17px; border: 1px solid transparent;
  border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background var(--motion-base) var(--ease-soft), color var(--motion-base) var(--ease-soft), transform var(--motion-fast) var(--ease-soft);
}
.button:active { transform: scale(.98); }
.button-primary { background: var(--red); color: white; }
.button-primary:hover { background: var(--red-dark); }
.button-secondary { border-color: var(--rule); background: var(--surface); }
.button-secondary:hover { border-color: var(--red); color: var(--red); }
.identity { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }
.identity-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; }
.identity-links a { display: inline-flex; align-items: center; min-height: 32px; overflow-wrap: anywhere; color: var(--red-dark); }
.identity-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-visual { min-width: 0; }
.canvas-stage {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 390px; aspect-ratio: 1.12; border-radius: 27px;
  color: #fff2e9;
  background: radial-gradient(ellipse at 52% 47%, #a93145 0%, #751d30 55%, #451321 100%);
}
.canvas-stage::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: .26;
  background: repeating-linear-gradient(0deg, transparent 0 33px, #f4d6cd33 34px 35px), repeating-linear-gradient(90deg, transparent 0 33px, #f4d6cd33 34px 35px);
}
.canvas-stage::after {
  content: ''; position: absolute; z-index: -1; width: 72%; aspect-ratio: 1;
  inset: 50% auto auto 50%; transform: translate(-50%, -50%); border: 1px solid #f6d5cf48; border-radius: 50%;
}
#hero-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#hero-canvas:active { cursor: grabbing; }
#hero-canvas[data-mode="2d"] { cursor: default; touch-action: pan-y; }
.canvas-stage :focus-visible { outline-color: #fff1e8; }
#hero-canvas:focus-visible { outline-offset: -5px; }
.stage-title, .replay, .visual-foot { position: absolute; z-index: 1; }
.stage-title { inset: 24px auto auto 23px; font-size: 13px; }
.replay {
  top: 12px; right: 14px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid #f7e1d966; background: #53162a9e; color: inherit; cursor: pointer; font-size: 20px;
}
.replay:hover { background: #390d1ed0; }
.visual-foot { inset: auto 16px 15px; display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; }
#visual-caption { font-size: 12px; }
.mode { display: flex; padding: 3px; gap: 3px; border: 1px solid #f7e1d966; background: #491322d9; border-radius: 999px; pointer-events: auto; }
.mode button { min-width: 47px; min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: #fff2e9; cursor: pointer; font: 600 13px/1 var(--mono); }
.mode button[aria-pressed="true"] { color: #53152a; background: #fce9de; }
.section { border-top: 1px solid var(--rule); padding-block: clamp(49px, 6vw, 90px); }
.section-heading { margin-bottom: 26px; }
h2 { margin-top: 7px; font: 600 clamp(38px, 5vw, 66px)/1.17 var(--display); letter-spacing: -.05em; }
h3 { font-size: clamp(20px, 2.3vw, 29px); line-height: 1.35; }
h4 { font-size: 18px; line-height: 1.45; }
.resume-grid { display: grid; grid-template-columns: 1.18fr .82fr; gap: 14px; }
.resume-block, .lab-card, .drama-card { border: 1px solid var(--rule); border-radius: 22px; background: var(--surface); }
.resume-block { padding: clamp(20px, 3vw, 34px); }
.resume-block h3 { padding-bottom: 13px; }
.resume-entry { padding-top: 16px; border-top: 1px solid var(--rule); }
.resume-entry + .resume-entry { margin-top: 18px; }
.resume-entry time { display: block; color: var(--red-dark); font: 600 12px/1.5 var(--mono); margin-bottom: 7px; }
.resume-entry p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.resume-entry .role { color: var(--ink); font-weight: 600; }
details { margin-top: 12px; }
summary, .text-link { color: var(--red-dark); font-size: 14px; font-weight: 600; cursor: pointer; }
.text-link { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; }
summary:hover, .text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.skills { grid-column: 1 / -1; }
.skill-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.skill-grid div { border-top: 1px solid var(--rule); padding-top: 14px; }
.skill-grid dt { font-weight: 600; margin-bottom: 4px; }
.skill-grid dd { color: var(--muted); font-size: 14px; }
.skill-grid dd + dd { margin-top: 5px; }
.drama-card { display: block; max-width: 820px; overflow: hidden; transition: border-color var(--motion-base) var(--ease-soft), box-shadow var(--motion-base) var(--ease-soft); }
.drama-card:hover { border-color: #bc7886; box-shadow: 0 10px 24px #761e3012; }
.drama-cover {
  position: relative; isolation: isolate; display: grid; place-items: center; overflow: hidden;
  min-height: 240px; aspect-ratio: 2.5; padding: 24px; color: #fce4dc;
  background: radial-gradient(ellipse at 55% 60%, #881c34, #34111b 75%, #261218);
}
.drama-cover::before, .drama-cover::after {
  position: absolute; content: ''; z-index: -1; width: 58%; aspect-ratio: 1; border: 1px solid #ec8a9270;
  border-radius: 50%; transform: rotate(-30deg) scaleY(.52);
  transition: transform var(--motion-slow) var(--ease-soft);
}
.drama-cover::after { width: 75%; }
.drama-card:hover .drama-cover::before, .drama-card:hover .drama-cover::after { transform: rotate(-34deg) scaleY(.63); }
.cover-label { position: absolute; inset: 20px auto auto 22px; font: 600 11px var(--mono); letter-spacing: .13em; }
.cover-title { font: 600 clamp(62px, 10vw, 112px)/1 var(--display); letter-spacing: .08em; }
.cover-play { position: absolute; inset: auto 20px 16px auto; width: 45px; height: 45px; display: grid; place-items: center; border: 1px solid #f6e5dc88; border-radius: 50%; font-size: 12px; }
.card-body { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 22px; }
.card-body p { margin-top: 5px; color: var(--muted); font-size: 14px; }
.lab-card { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(26px, 7vw, 100px); padding: clamp(23px, 4vw, 44px); }
.lab-controls label { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.lab-controls output { color: var(--red-dark); white-space: nowrap; }
.lab-controls input { width: 100%; min-height: 44px; margin: 8px 0 0; accent-color: var(--red); }
.lab-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.lab-result p { color: var(--muted); margin-top: 6px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.steps article { padding-top: 14px; border-top: 1px solid var(--rule); }
.steps h3 { font-size: 17px; }
.steps p { margin-top: 5px; color: var(--muted); font-size: 14px; }
.contact { padding-block: 46px; background: #34151f; color: #fcefe7; }
.contact .eyebrow { color: #f4b7b7; }
.contact-inner { display: flex; justify-content: space-between; gap: 24px; align-items: end; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; }
.contact-links a, .back-top { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; text-underline-offset: 5px; text-decoration: underline; }
.player-page { padding-block: 35px 72px; max-width: 1050px; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--red-dark); font-size: 14px; }
.player-heading { margin-block: 24px; }
.player-heading h1 { margin-block: 8px; font: 600 clamp(33px, 6vw, 64px)/1.2 var(--display); letter-spacing: -.045em; }
.video-wrap { overflow: hidden; background: black; border-radius: 19px; aspect-ratio: 16/9; }
.video-wrap video { display: block; width: 100%; height: 100%; object-fit: contain; }
.player-note, .player-description, .player-heading > p:last-child { margin-top: 8px; color: var(--muted); font-size: 14px; }
.player-description { margin-top: 20px; }
.episode-picker { margin-top: 24px; }
.episode-heading { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.episode-heading h2 { margin: 0; font-size: 18px; }
.episode-heading > span { color: var(--muted); font-size: 13px; }
.episode-list { display: flex; flex-wrap: wrap; gap: 10px; }
.episode-list button {
  min-height: 48px; min-width: 88px; padding: 10px 20px;
  border: 1px solid var(--rule); border-radius: 12px;
  background: var(--paper); color: var(--ink); font: inherit; cursor: pointer;
  transition: background-color var(--motion-base), border-color var(--motion-base);
}
.episode-list button:hover { border-color: var(--ink); }
.episode-list button[aria-pressed="true"] { background: var(--lime); border-color: transparent; font-weight: 600; }
@media (max-width: 870px) {
  .shell { width: calc(100% - 48px); }
  .hero { gap: 25px; }
  .canvas-stage { min-height: 330px; }
  .skill-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 670px) {
  html { scroll-padding-top: 69px; }
  .shell { width: calc(100% - 32px); }
  .header-inner { min-height: 59px; gap: 7px; }
  .wordmark { gap: 6px; font-size: 13px; }
  .mark { min-width: 30px; height: 30px; border-radius: 9px; font-size: 16px; }
  .header-inner nav { gap: 0; }
  .header-inner nav a, .header-contact { padding-inline: 9px; font-size: 13px; }
  .hero { min-height: auto; display: block; padding-block: 33px 37px; }
  .hero h1 { font-size: clamp(60px, 17.5vw, 90px); margin-block: 9px 7px; }
  .lead { font-size: 14px; line-height: 1.68; margin-top: 9px; }
  .hero-actions { margin-top: 16px; }
  .identity { margin-top: 16px; padding-top: 10px; font-size: 12px; }
  .hero-visual { margin-top: 19px; }
  .canvas-stage { min-height: 245px; max-height: 345px; aspect-ratio: 1.19; border-radius: 20px; }
  .stage-title { top: 17px; left: 15px; font-size: 12px; }
  .replay { top: 6px; right: 8px; }
  .visual-foot { inset: auto 10px 10px; }
  .section { padding-block: 36px; }
  .section-heading { margin-bottom: 18px; }
  h2 { font-size: 38px; }
  .resume-grid, .lab-card, .steps { grid-template-columns: 1fr; }
  .resume-block { padding: 17px; }
  .resume-entry p, .skill-grid dd { font-size: 13px; }
  .skill-grid { gap: 11px; }
  .resume-block, .lab-card, .drama-card { border-radius: 17px; }
  .drama-cover { min-height: 175px; aspect-ratio: 1.85; }
  .card-body { padding: 16px; gap: 10px; }
  .card-body h3 { font-size: 19px; }
  .card-body .button { gap: 5px; font-size: 12px; padding-inline: 12px; }
  .lab-card { gap: 20px; padding: 18px; }
  .steps { gap: 12px; }
  .contact-inner { display: block; }
  .contact-links { margin-top: 12px; }
}
@media (max-width: 350px) {
  .shell { width: calc(100% - 24px); }
  .header-inner nav a, .header-contact { padding-inline: 7px; }
  .card-body { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0ms !important; }
}
