:root {
  color-scheme: light;
  --background: #fff;
  --foreground: #111;
  --muted: #626262;
  --line: #dedede;
  --header-height: 104px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--background);
  color: var(--foreground);
  font-synthesis: none;
}
:root[data-theme="dark"] { color-scheme:dark; --background:#000; --foreground:#fff; --muted:#aaa; --line:#303030; }
@media (prefers-color-scheme:dark) {
  :root:not([data-theme]) { color-scheme:dark; --background:#000; --foreground:#fff; --muted:#aaa; --line:#303030; }
}
* { box-sizing:border-box; }
body { margin:0; min-width:280px; }
button, a { -webkit-tap-highlight-color:transparent; }
button { font:inherit; cursor:pointer; }
a { color:inherit; text-decoration:none; }
button { color:inherit; }
svg { display:block; }
[hidden] { display:none !important; }
a:focus-visible, button:focus-visible { outline:2px solid currentColor; outline-offset:6px; }
section:focus { outline:none; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link { position:fixed; top:12px; left:12px; padding:12px 18px; z-index:100; background:#fff; color:#000; transform:translateY(-180%); }
.skip-link:focus { transform:translateY(0); }
.site-header { position:fixed; inset:0 0 auto; height:var(--header-height); z-index:20; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; padding:0 48px; color:#fff; }
:root:not([data-view]) .site-header { position:absolute; }
:root[data-view="projects"] .site-header { color:var(--foreground); background:var(--background); border-bottom:1px solid var(--line); }
.brand { width:66px; display:block; }
.brand-mark { width:100%; height:auto; }
.site-nav { display:flex; align-items:center; gap:44px; height:100%; font-size:14px; letter-spacing:.12em; }
.site-nav a { position:relative; display:flex; align-items:center; height:100%; opacity:.66; transition:opacity .2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { opacity:1; }
.site-nav a::after { content:""; position:absolute; bottom:26px; height:1px; left:0; width:100%; background:currentColor; transform:scaleX(0); transition:transform .2s; }
.site-nav a[aria-current="page"]::after { transform:scaleX(1); }
.header-actions { justify-self:end; display:flex; gap:10px; }
.icon-button { display:grid; place-items:center; width:44px; height:44px; padding:10px; border:1px solid transparent; border-radius:50%; background:transparent; transition:background .2s; }
.icon-button:hover { background:rgb(128 128 128 / 18%); }
.icon-button svg { width:22px; height:22px; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.icon-sun { display:none; }
:root[data-theme="dark"] .icon-sun { display:block; }
:root[data-theme="dark"] .icon-moon { display:none; }
.menu-toggle { display:none; }
.home-view { position:relative; display:grid; place-items:center; height:100svh; min-height:360px; overflow:hidden; background:#101718; color:#fff; }
.hero-media, .hero-shade { position:absolute; inset:0; }
.hero-media { background:url('./assets/hero-poster-1080p.webp') center/cover no-repeat; }
.hero-media video { display:block; width:100%; height:100%; object-fit:cover; object-position:50% 50%; }
.hero-media video[data-failed="true"] { visibility:hidden; }
.hero-shade { pointer-events:none; background:linear-gradient(180deg,rgb(0 0 0 / 42%) 0%,rgb(0 0 0 / 9%) 30%,rgb(0 0 0 / 10%) 66%,rgb(0 0 0 / 38%) 100%); }
.hero-title { position:relative; margin:0; width:clamp(270px,32vw,440px); filter:drop-shadow(0 2px 14px rgb(0 0 0 / 12%)); }
.hero-wordmark { width:100%; height:auto; }
.hero-bottom { position:absolute; bottom:max(32px,env(safe-area-inset-bottom)); left:48px; right:48px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.hero-domain { font-family:"Trebuchet MS",sans-serif; font-size:11px; letter-spacing:.22em; }
.playback-toggle { border:1px solid rgb(255 255 255 / 45%); background:rgb(0 0 0 / 14%); border-radius:30px; display:flex; align-items:center; gap:9px; padding:11px 17px; font-size:12px; letter-spacing:.08em; }
.playback-toggle:hover { background:rgb(0 0 0 / 32%); }
.playback-toggle svg { width:16px; height:16px; }
.icon-pause { display:none; }
.playback-toggle[data-playing="true"] .icon-pause { display:block; }
.playback-toggle[data-playing="true"] .icon-play { display:none; }
.projects-view { min-height:100svh; padding:calc(var(--header-height) + 64px) 48px 0; background:var(--background); color:var(--foreground); }
:root[data-view="home"] .projects-view, :root[data-view="projects"] .home-view { display:none; }
.projects-inner { max-width:1248px; margin:auto; }
.section-heading { display:flex; justify-content:space-between; align-items:end; gap:24px; margin-bottom:48px; }
.section-heading h2 { margin:0; font-size:36px; font-weight:500; letter-spacing:.04em; }
.domain-connection { display:flex; align-items:center; gap:12px; padding-bottom:6px; color:var(--muted); font:12px "Trebuchet MS",sans-serif; }
.connection-line { position:relative; width:42px; height:1px; background:var(--line); }
.connection-line::after { content:""; position:absolute; right:0; top:-2px; width:5px; height:5px; background:var(--foreground); border-radius:50%; }
.project { display:grid; grid-template-columns:1.4fr 1fr; align-items:center; gap:clamp(36px,5vw,80px); }
/* 分站沿用同一展示结构，以分隔线和留白区分各项目。 */
.project + .project { margin-top:64px; padding-top:64px; border-top:1px solid var(--line); }
.project-preview { position:relative; display:block; overflow:hidden; background:#f5f3e9; }
.project-preview img { display:block; width:100%; height:auto; }
.preview-visit { position:absolute; bottom:18px; right:18px; width:44px; height:44px; display:grid; place-items:center; color:#111; background:#fff; border-radius:50%; box-shadow:0 2px 12px #0001; transition:transform .2s; }
.preview-visit svg { width:20px; height:20px; stroke:currentColor; stroke-width:1.5; }
.project-preview:hover .preview-visit { transform:translate(2px,-2px); }
.project-copy { padding:20px 0; }
.project-category { color:var(--muted); font-size:12px; letter-spacing:.12em; margin:0 0 22px; }
.project-copy h3 { font-size:clamp(25px,2.4vw,34px); font-weight:500; letter-spacing:.01em; line-height:1.45; margin:0 0 20px; }
.project-description { margin:0; max-width:21em; color:var(--muted); font-size:15px; line-height:1.9; }
.visit-link { display:inline-flex; align-items:center; gap:38px; margin-top:40px; padding:0 0 11px; border-bottom:1px solid var(--foreground); font-size:14px; }
.visit-link svg { width:22px; height:22px; stroke:currentColor; stroke-width:1.4; transition:transform .2s; }
.visit-link:hover svg { transform:translateX(4px); }
.project-domain { display:block; color:var(--muted); font:12px "Trebuchet MS",sans-serif; margin-top:24px; }
.site-footer { display:flex; justify-content:space-between; gap:24px; color:var(--muted); border-top:1px solid var(--line); margin-top:72px; padding:25px 0 30px; font-size:12px; }
.site-footer a:hover { color:var(--foreground); }
@media (max-width:900px) {
  .site-header { padding:0 28px; }
  .hero-bottom { left:28px; right:28px; }
  .projects-view { padding-left:28px; padding-right:28px; }
  .section-heading { align-items:start; flex-direction:column; }
  .project { gap:32px; grid-template-columns:1.2fr 1fr; }
}
@media (max-width:760px) {
  :root { --header-height:80px; }
  .site-header { grid-template-columns:1fr auto; padding:0 20px; }
  .brand { width:57px; }
  .site-nav { position:absolute; top:var(--header-height); left:0; right:0; height:auto; padding:12px 24px 24px; display:flex; flex-direction:column; align-items:stretch; gap:0; background:#000; color:#fff; border-bottom:1px solid #ffffff30; }
  :root[data-view] .site-nav { display:none; }
  :root[data-view="projects"] .site-nav { background:var(--background); color:var(--foreground); border-color:var(--line); }
  .site-header[data-menu-open="true"] { background:#000; }
  :root[data-view="projects"] .site-header[data-menu-open="true"] { background:var(--background); }
  :root[data-view] .site-header[data-menu-open="true"] .site-nav { display:flex; }
  .site-nav a { min-height:54px; opacity:.7; }
  .site-nav a::after { display:none; }
  .site-nav a[aria-current="page"] { opacity:1; }
  .site-nav a[aria-current="page"]::before { content:""; width:5px; height:5px; margin-right:12px; background:currentColor; border-radius:50%; }
  .menu-toggle { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; }
  .menu-toggle span { width:20px; height:1px; background:currentColor; transition:transform .2s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform:translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform:translateY(-3.5px) rotate(-45deg); }
  .header-actions { gap:4px; }
  .hero-title { width:76%; max-width:360px; }
  .hero-bottom { left:24px; right:24px; bottom:max(28px,env(safe-area-inset-bottom)); }
  .hero-domain { font-size:10px; letter-spacing:.16em; }
  .playback-toggle { font-size:11px; padding:10px 13px; }
  .projects-view { padding:calc(var(--header-height) + 36px) 20px 0; }
  .section-heading { gap:20px; margin-bottom:32px; }
  .section-heading h2 { font-size:28px; }
  .domain-connection { font-size:11px; gap:10px; }
  .connection-line { width:30px; }
  .project { grid-template-columns:1fr; gap:30px; }
  .project + .project { margin-top:40px; padding-top:40px; }
  .project-copy { padding:0 2px; }
  .project-category { margin-bottom:14px; }
  .project-copy h3 { font-size:27px; margin-bottom:14px; }
  .project-description { font-size:14px; max-width:none; }
  .visit-link { margin-top:28px; }
  .site-footer { margin-top:46px; }
}
@media (max-height:500px) and (min-width:761px) {
  :root { --header-height:76px; }
  .hero-title { width:300px; }
  .hero-bottom { bottom:20px; }
  .site-nav a::after { bottom:17px; }
}
@media (max-width:760px) and (orientation:portrait) {
  .hero-media { background-position:80% 50%; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { transition:none !important; scroll-behavior:auto !important; }
}

/* 首页文字、按钮、图标和两个标识使用同一主题色，视频保留原色。 */
:root { --logo-color: #000; }
:root[data-theme="dark"] { --logo-color: #fff; }
.site-header, .home-view { color: var(--logo-color); }
:root[data-view="projects"] .site-header { color: var(--logo-color); }
.hero-title { filter: none; }
.brand-mark, .hero-wordmark { color: var(--logo-color); }
.brand-mark path, .hero-wordmark path { fill: currentColor; }
/* 字标仅填充原图轮廓，不添加描边或模糊阴影。 */
.hero-wordmark path { stroke: none; }
.playback-toggle { border-color: currentColor; background: transparent; }
:root[data-theme="light"] .playback-toggle:hover { background: rgb(255 255 255 / 22%); }
:root[data-theme="light"] .hero-shade { background: linear-gradient(180deg,rgb(0 0 0 / 42%) 0%,rgb(0 0 0 / 9%) 30%,rgb(0 0 0 / 10%) 66%,rgb(0 0 0 / 38%) 100%); }
@media (prefers-color-scheme:dark) { :root:not([data-theme]) { --logo-color:#fff; } }
@media (max-width:760px) {
  .site-nav, .site-header[data-menu-open="true"], :root[data-view="projects"] .site-nav, :root[data-view="projects"] .site-header[data-menu-open="true"] { background: var(--background); color: var(--logo-color); }
  .site-nav { border-color: var(--line); }
}

/* 手机视频以真实比例的固定尺寸铺满容器，避开部分内置浏览器的 object-fit 裁切闪烁。 */
@media (max-width:760px) {
  .hero-media { overflow:hidden; }
  .hero-media video { position:absolute; object-fit:fill; }
}
