:root {
  color-scheme: dark;
  --bg: #131411;
  --panel: #1b1d17;
  --text: #f8f5e9;
  --muted: #b9b9ab;
  --lime: #e1f699;
  --line: #34372b;
  --max: 1160px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 5px; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
h1, h2, h3, p, figure { margin: 0; }
.wrap { width: min(var(--max), calc(100% - 72px)); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 5; padding: 14px; background: var(--lime); color: #15170f; }
.topbar { border-bottom: 1px solid var(--line); background: #131411; }
.header-inner { height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand, .top-link, nav { display: flex; align-items: center; gap: 10px; }
.brand { font-size: 15px; font-weight: 800; width: max-content; }
.brand-mark { width: 17px; height: 17px; display: inline-block; background: var(--lime); clip-path: polygon(0 0,50% 0,50% 50%,100% 50%,100% 100%,50% 100%,50% 50%,0 50%); }
nav { gap: clamp(15px, 3.6vw, 38px); font-size: 14px; color: var(--muted); }
nav a:hover, .top-link:hover, .footer a:hover { color: var(--lime); }
.top-link { justify-self: end; font-size: 14px; color: var(--muted); }
.hero { width: min(1440px, calc(100% - 72px)); display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.6fr); align-items: center; gap: clamp(28px, 3vw, 48px); padding-block: 65px 68px; }
.hero h1 { font-size: clamp(38px, 4.2vw, 66px); }
@media (min-width: 596px) and (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; gap: 30px; }
  .hero-copy { max-width: 680px; }
}
.eyebrow { color: var(--lime); font-size: 12px; font-weight: 720; line-height: 1.4; letter-spacing: .15em; }
.hero .eyebrow { display: flex; align-items: center; gap: 10px; }
.hero .eyebrow > span:first-child, .video-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.hero .eyebrow-divider { width: 14px; height: 1px; background: #71765c; }
h1 { font-size: clamp(42px, 5.5vw, 79px); font-weight: 850; letter-spacing: -.065em; line-height: 1.14; margin-block: 20px 24px; }
h1 em { font-style: normal; color: var(--lime); }
.period { font-size: .67em; }
.hero-intro { max-width: 430px; color: var(--muted); line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 12px; border-radius: 8px; border: 1px solid transparent; min-height: 46px; padding: 0 16px; font-size: 14px; font-weight: 750; white-space: nowrap; transition: background .2s, border-color .2s; }
.primary { background: var(--lime); color: #1a1d12; }
.primary:hover { background: #efffbb; }
.ghost { background: transparent; border-color: #44483a; color: var(--text); }
.ghost:hover { border-color: var(--lime); }
.hero-visual { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #0b0c0a; border: 1px solid #4f5839; border-radius: 16px; }
.hero-visual video { display: block; width: 100%; height: 100%; object-fit: contain; }
.round-arrow { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #eff8d090; font-size: 21px; }
.section { border-top: 1px solid var(--line); padding-block: 58px 65px; scroll-margin-top: 20px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
h2 { margin-top: 8px; font-size: clamp(32px, 4.3vw, 53px); letter-spacing: -.055em; line-height: 1.16; }
.section-heading > p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.project { --accent: #e1f699; --wash: #323c24; display: flex; flex-direction: column; align-items: start; min-height: 245px; padding: 23px 25px; border: 1px solid var(--line); border-radius: 13px; background: radial-gradient(ellipse at 92% 0%, var(--wash), transparent 64%), var(--panel); }
.project.live { --accent: #e5c6ff; --wash: #2e253b; }
.project.english { --accent: #f9d6a9; --wash: #3a2d20; }
.project.library { --accent: #b7eddd; --wash: #1e362e; }
.project-top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.project-icon { display: grid; place-items: center; border-radius: 8px; background: var(--wash); color: var(--accent); width: 39px; height: 39px; font-size: 24px; line-height: 1; }
.project-icon.letter { font-family: Georgia, serif; font-size: 21px; }
.category { color: var(--accent); font-size: 12px; }
.project h3 { font-size: clamp(19px, 2.2vw, 25px); letter-spacing: -.028em; }
.project p { margin-block: 8px 13px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chips span { color: #d1d2c6; border: 1px solid #424538; padding: 4px 8px; border-radius: 5px; font-size: 11px; }
.project-actions { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; width: 100%; }
.text-button { margin-top: auto; padding: 3px 0; border: 0; background: transparent; color: var(--accent); font-size: 13px; font-weight: 720; cursor: pointer; }
.project-actions .text-button { margin-top: 0; }
.text-button.secondary { color: var(--muted); font-weight: 560; }
.text-button.secondary:hover { color: var(--text); }
.text-button span { margin-left: 5px; }
.text-button:hover, .case-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.case-options { min-inline-size: 0; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 14px; border: none; }
.case-options label { position: relative; cursor: pointer; }
.case-options input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.case-options span { display: block; padding: 9px 13px; border: 1px solid #494d3d; border-radius: 7px; color: var(--muted); font-size: 13px; }
.case-options input:checked + span { border-color: var(--lime); color: var(--lime); background: #28301b; }
.case-options input:focus-visible + span { outline: 2px solid var(--lime); outline-offset: 3px; }
.viewer { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: 27px; padding: 27px; border: 1px solid var(--line); border-radius: 15px; background: #1b1d17; }
.viewer h3 { font-size: clamp(27px, 3vw, 39px); margin-block: 7px 10px; }
#case-description, .about p:not(.eyebrow) { color: var(--muted); line-height: 1.85; }
.player-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.audio-control { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.audio-control select { background: #24271e; color: var(--text); border: 1px solid #535641; padding: 5px; border-radius: 5px; }
.timeline { display: flex; align-items: center; gap: 9px; margin-block: 12px 4px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.timeline input { min-width: 0; flex: 1; accent-color: var(--lime); }
.player-status { color: #f8c195; font-size: 13px; line-height: 1.55; }
.player-status:empty { display: none; }
.case-link { color: var(--lime); display: inline-block; margin-top: 12px; font-size: 13px; }
.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.video-grid figure { min-width: 0; border: 1px solid #34392c; border-radius: 9px; overflow: hidden; background: #10110f; }
figcaption { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; padding: 9px 10px; background: #25281e; }
.video-dot { background: #c5c3b8; }
.video-dot.new { background: var(--lime); }
.video-grid video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #0d0e0b; }
.video-grid video.has-played { object-fit: contain; }
.about { display: grid; grid-template-columns: .7fr 1.3fr; gap: 28px; }
.about .button { margin-top: 16px; }
.footer { border-top: 1px solid var(--line); color: var(--muted); display: flex; justify-content: space-between; gap: 16px; padding-block: 22px; font-size: 13px; }
dialog { width: min(550px, calc(100% - 28px)); max-height: calc(100% - 28px); color: var(--text); background: #24271e; border: 1px solid #5b6249; border-radius: 15px; padding: 0; }
dialog::backdrop { background: #0c0d0bc9; }
.dialog-panel { position: relative; padding: 28px; }
.dialog-close { position: absolute; right: 12px; top: 12px; color: var(--text); background: #353a2c; border: 0; border-radius: 7px; width: 36px; height: 36px; font-size: 24px; line-height: 1; }
.dialog-panel h2 { font-size: clamp(23px, 5vw, 34px); padding-right: 26px; margin-block: 12px; }
.dialog-panel p:not(.eyebrow), .dialog-panel li { color: var(--muted); line-height: 1.75; }
.dialog-panel ul { padding-inline-start: 1.4em; }
.dialog-panel li + li { margin-top: 6px; }
.project-entry { margin-top: 18px; padding-top: 16px; border-top: 1px solid #3d4234; }
.entry-title { color: var(--lime); font-size: 12px; font-weight: 720; letter-spacing: .12em; }
.entry-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.entry-actions .button { min-height: 40px; }
.entry-path { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; padding: 9px 10px; border: 1px solid #4a4f3e; border-radius: 7px; background: #1b1d17; color: #d7d8cb; font-size: 12px; }
.entry-note { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.entry-status { margin-top: 6px; font-size: 13px; line-height: 1.55; }
.entry-status[data-state="on"] { color: var(--lime); }
.entry-status[data-state="off"] { color: #f8c195; }
.entry-status[data-state="unknown"] { color: var(--muted); }
.entry-more { display: inline-block; margin-top: 12px; color: var(--lime); font-size: 13px; }
.entry-more:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 850px) {
  .wrap { width: calc(100% - 44px); }
  .hero { gap: 22px; padding-block: 54px; }
  h1 { font-size: clamp(34px, 6.2vw, 55px); }
  .viewer { grid-template-columns: 1fr; }
  .video-grid { max-width: 550px; }
}
@media (max-width: 595px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { height: 58px; gap: 10px; }
  .brand, nav, .top-link { font-size: 12px; }
  nav { gap: 12px; }
  .hero { grid-template-columns: 1fr; padding-block: 40px 39px; gap: 29px; }
  h1 { font-size: clamp(35px, 10vw, 53px); margin-block: 14px 16px; }
  .hero-intro { font-size: 14px; }
  .hero-actions { margin-top: 18px; }
  .section { padding-block: 35px 43px; }
  .section-heading { flex-direction: column; align-items: start; gap: 10px; margin-bottom: 19px; }
  .projects-grid, .about, .video-grid { grid-template-columns: 1fr; }
  .project { padding: 17px 18px; min-height: 0; }
  .viewer { padding: 14px; gap: 17px; }
  .video-grid { width: 100%; max-width: 330px; margin-inline: auto; }
  .about { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
.full-clips { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.full-clips a:hover { color: var(--lime); text-decoration: underline; }

.project-preview { display: block; width: 100%; max-height: 240px; object-fit: contain; margin-top: 16px; border-radius: 8px; background: #171a14; }
.project-preview[hidden] { display: none; }

.project-thumb { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; object-position: top left; border-radius: 8px; margin-bottom: 16px; }

.project-thumb, .project-preview { cursor: zoom-in; }
.image-dialog { width: min(1400px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); background: #171a14; border-radius: 12px; }
.image-dialog img { display: block; width: 100%; max-height: calc(100vh - 60px); object-fit: contain; }
.image-close { position: absolute; z-index: 1; right: 12px; top: 12px; border: 0; border-radius: 6px; background: #222b; color: white; font-size: 28px; width: 40px; height: 40px; cursor: pointer; }

.personal-video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.personal-video-grid figure { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.personal-video-grid video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #090b09; }
.personal-video-grid figcaption { padding: 15px 18px; font-size: 17px; font-weight: 700; }
@media (max-width: 850px) { .personal-video-grid { grid-template-columns: 1fr; } }
