:root {
  --ink: #090a0c;
  --panel: #111318;
  --panel-2: #191c22;
  --paper: #f3f1ec;
  --muted: #a7acb6;
  --line: #30343c;
  --red: #ef4c4f;
  --cyan: #70d7e8;
  --focus: #ffcf5a;
  color-scheme: dark;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body { margin: 0; background: var(--ink); color: var(--paper); line-height: 1.6; }
body.is-modal-open { overflow: hidden; }
button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 10px 14px; background: var(--paper); color: var(--ink); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.site-header {
  position: fixed; z-index: 40; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  height: 74px; padding: 0 4vw; border-bottom: 1px solid transparent;
  background: rgba(9, 10, 12, .18); backdrop-filter: blur(12px);
  transition: background .25s ease, border-color .25s ease;
}
.site-header.is-scrolled { background: rgba(9, 10, 12, .94); border-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 700; }
.brand b { display: block; color: var(--muted); font-size: 10px; font-weight: 600; }
.brand-mark { display: grid; place-items: center; width: 36px; aspect-ratio: 1; border: 1px solid rgba(243, 241, 236, .7); font-size: 10px; }
nav { display: flex; gap: 28px; }
nav a { color: #e5e6e8; font-size: 14px; text-decoration: none; }
nav a:hover { color: var(--cyan); }

.hero { position: relative; min-height: 86svh; overflow: hidden; display: flex; align-items: flex-end; padding: 110px 7vw 8vh; background: #120608; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-shade { position: absolute; inset: 0; background: rgba(4, 5, 7, .48); }
.hero-content { position: relative; z-index: 2; width: min(740px, 100%); }
.eyebrow { margin: 0 0 14px; color: var(--cyan); font-size: 12px; font-weight: 700; }
.hero h1 { margin: 0; font-size: 86px; line-height: .98; letter-spacing: 0; }
.hero-role { margin: 12px 0 0; color: #fff; font-size: 27px; font-weight: 700; }
.hero-summary { max-width: 650px; margin: 22px 0 0; color: #d5d8dd; font-size: 17px; }
.hero-actions, .resume-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 11px 19px; border: 1px solid transparent; border-radius: 2px; text-decoration: none; font-size: 14px; font-weight: 700; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--red); color: #fff; }
.button-primary:hover { background: #ff6264; }
.button-quiet { background: rgba(9, 10, 12, .6); border-color: rgba(255, 255, 255, .4); }
.button-outline { border-color: #626873; }
.hero-note { position: absolute; z-index: 2; right: 7vw; bottom: 8vh; margin: 0; color: #c9ccd1; font-size: 12px; }
.sound-toggle { position: absolute; z-index: 3; right: 4vw; top: 98px; min-width: 58px; height: 36px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 2px; background: rgba(0, 0, 0, .5); cursor: pointer; font-size: 12px; }
.sound-toggle:hover { background: rgba(0, 0, 0, .8); }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.facts div { min-height: 132px; display: flex; flex-direction: column; justify-content: center; padding: 26px 3vw; border-right: 1px solid var(--line); }
.facts div:last-child { border-right: 0; }
.facts strong { font-size: 24px; line-height: 1.2; }
.facts span { margin-top: 6px; color: var(--muted); font-size: 13px; }

.section { padding: 110px 6vw; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 42px; }
.section h2, .profile-band h2, footer h2 { margin: 0; font-size: 46px; line-height: 1.15; letter-spacing: 0; }
.filter { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); padding: 4px; }
.filter button { min-height: 36px; padding: 6px 14px; border: 0; border-radius: 2px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.filter button.is-active { background: var(--paper); color: var(--ink); }

.featured-work { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, .8fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.work-media { position: relative; overflow: hidden; padding: 0; border: 0; background: #050506; cursor: pointer; }
.work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease, opacity .3s ease; }
.work-media:hover img { transform: scale(1.02); opacity: .78; }
.featured-work .work-media { min-height: 490px; }
.play-button { position: absolute; display: grid; place-items: center; left: 24px; bottom: 24px; width: 56px; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; background: rgba(9,10,12,.72); color: #fff; font-size: 18px; padding-left: 3px; transition: background .2s ease, transform .2s ease; }
.work-media:hover .play-button { background: var(--red); transform: scale(1.05); }
.featured-copy { display: flex; flex-direction: column; justify-content: space-between; padding: 42px; }
.work-index, .work-copy span { color: var(--cyan); font-size: 11px; font-weight: 700; }
.featured-copy h3 { margin: 7px 0 0; font-size: 30px; line-height: 1.25; }
.featured-copy > p { color: #c8cbd2; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.tags li { padding: 5px 9px; border: 1px solid var(--line); color: #c8cbd2; font-size: 12px; }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 36px; background: var(--line); border: 1px solid var(--line); }
.work-card { min-width: 0; background: var(--ink); }
.work-card .work-media { width: 100%; aspect-ratio: 16 / 9; }
.work-copy { min-height: 180px; padding: 26px; }
.work-copy h3 { margin: 6px 0 8px; font-size: 24px; }
.work-copy p { margin: 0; color: var(--muted); font-size: 14px; }
.work-item[hidden] { display: none; }
.empty-state { padding: 36px; border: 1px solid var(--line); color: var(--muted); text-align: center; }

.profile-band { display: grid; grid-template-columns: minmax(0, .85fr) minmax(420px, 1.15fr); gap: 8vw; padding: 110px 6vw; background: var(--paper); color: #15171a; }
.profile-intro { align-self: start; position: sticky; top: 110px; }
.profile-intro .eyebrow { color: #b52e35; }
.profile-intro > p:not(.eyebrow) { max-width: 620px; color: #555b64; font-size: 17px; }
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.skill-list span { padding: 7px 10px; border: 1px solid #b9bdc4; font-size: 12px; }
.timeline article { position: relative; padding: 0 0 44px 32px; border-left: 1px solid #aeb3ba; }
.timeline article:last-child { padding-bottom: 0; }
.timeline article::before { content: ""; position: absolute; left: -5px; top: 7px; width: 9px; height: 9px; background: #b52e35; border-radius: 50%; }
.timeline time { color: #b52e35; font-size: 12px; font-weight: 700; }
.timeline h3 { margin: 6px 0 0; font-size: 21px; line-height: 1.3; }
.timeline .role { margin: 5px 0 10px; color: #34383e; font-weight: 700; }
.timeline p:last-child { margin: 0; color: #5e646c; font-size: 14px; }

.resume-band { display: flex; align-items: center; justify-content: space-between; gap: 40px; background: var(--panel); border-bottom: 1px solid var(--line); }
.resume-band > div:first-child { max-width: 720px; }
.resume-band p:not(.eyebrow) { color: var(--muted); }
.resume-actions { flex: 0 0 auto; margin-top: 0; }

footer { display: grid; grid-template-columns: 1fr auto; gap: 50px; padding: 100px 6vw 38px; background: #070809; }
.contact-links { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 8px; }
.contact-links a { font-size: 20px; text-decoration: none; border-bottom: 1px solid #4d5158; }
.contact-links a:hover { color: var(--cyan); border-color: var(--cyan); }
.copyright { grid-column: 1 / -1; margin: 52px 0 0; padding-top: 22px; border-top: 1px solid var(--line); color: #777d86; font-size: 12px; }

.video-dialog { width: min(1180px, calc(100vw - 36px)); max-height: calc(100svh - 36px); padding: 0; border: 1px solid #4a4f58; border-radius: 4px; background: #050607; color: var(--paper); }
.video-dialog::backdrop { background: rgba(0, 0, 0, .88); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; min-height: 60px; padding: 10px 14px 10px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 16px; }
.dialog-close { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 2px; background: transparent; cursor: pointer; font-size: 25px; line-height: 1; }
.dialog-close:hover { background: var(--paper); color: var(--ink); }
.video-dialog video { width: 100%; max-height: calc(100svh - 98px); background: #000; }

@media (max-width: 920px) {
  .hero { min-height: 84svh; padding-left: 5vw; padding-right: 5vw; }
  .hero h1 { font-size: 68px; }
  .hero-note { display: none; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts div:nth-child(2) { border-right: 0; }
  .facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .featured-work { grid-template-columns: 1fr; }
  .featured-work .work-media { min-height: 0; aspect-ratio: 16 / 9; }
  .profile-band { grid-template-columns: 1fr; }
  .profile-intro { position: static; }
}

@media (max-width: 680px) {
  .site-header { height: 62px; padding: 0 18px; }
  .brand > span:last-child { font-size: 13px; }
  nav { gap: 14px; }
  nav a { font-size: 12px; }
  nav a:nth-child(2) { display: none; }
  .hero { min-height: 82svh; padding: 96px 20px 52px; }
  .hero-video { object-position: 58% center; }
  .hero-shade { background: rgba(4, 5, 7, .58); }
  .hero h1 { font-size: 54px; }
  .hero-role { font-size: 22px; }
  .hero-summary { font-size: 15px; }
  .sound-toggle { top: 78px; right: 18px; }
  .facts strong { font-size: 19px; }
  .facts div { min-height: 104px; padding: 20px; }
  .section, .profile-band { padding: 78px 20px; }
  .section-heading { align-items: flex-start; flex-direction: column; margin-bottom: 28px; }
  .section h2, .profile-band h2, footer h2 { font-size: 35px; }
  .filter { width: 100%; }
  .filter button { flex: 1; min-width: 0; padding-left: 8px; padding-right: 8px; }
  .featured-copy { padding: 26px 22px; gap: 20px; }
  .featured-copy h3 { font-size: 24px; }
  .work-grid { grid-template-columns: 1fr; }
  .work-copy { min-height: 150px; padding: 22px; }
  .play-button { left: 16px; bottom: 16px; width: 48px; }
  .profile-band { gap: 60px; }
  .timeline article { padding-left: 24px; }
  .resume-band { align-items: flex-start; flex-direction: column; }
  .resume-actions { width: 100%; }
  .resume-actions .button { flex: 1; }
  footer { grid-template-columns: 1fr; gap: 34px; padding: 76px 20px 30px; }
  .contact-links { align-items: flex-start; }
  .contact-links a { max-width: 100%; font-size: 18px; overflow-wrap: anywhere; }
  .copyright { grid-column: 1; margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .hero-video { display: none; }
  .hero { background: #120608 url("assets/poster/endfield-pv.jpg") center / cover no-repeat; }
}
