:root {
  color-scheme: dark;
  --bg: #101115;
  --panel: #181a20;
  --panel-2: #20232b;
  --text: #f3f1ea;
  --muted: #b9b4a9;
  --soft: #817c73;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #d7ff67;
  --accent-2: #66d9ef;
  --radius: 8px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top left, rgba(215, 255, 103, 0.09), transparent 28rem), var(--bg); color: var(--text); }
button, input { font: inherit; }
button { cursor: pointer; }
.site-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero { min-height: 78vh; display: grid; align-items: end; padding: 48px 0 36px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr); gap: 36px; align-items: end; }
.hero__eyebrow { margin: 0 0 18px; color: var(--accent); font-size: 13px; letter-spacing: 0; text-transform: uppercase; }
h1 { margin: 0; max-width: 780px; font-size: clamp(44px, 7vw, 86px); line-height: 0.98; letter-spacing: 0; }
.hero__copy { max-width: 640px; margin: 24px 0 0; color: var(--muted); font-size: 18px; line-height: 1.8; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 9px 13px; color: var(--text); background: rgba(255,255,255,0.04); font-size: 13px; }
.portfolio-switcher { display: inline-flex; gap: 6px; margin-top: 26px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.04); }
.portfolio-switcher a { min-width: 72px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 700; transition: color 180ms ease, background 180ms ease; }
.portfolio-switcher a:hover { color: var(--text); }
.portfolio-switcher a.is-active { color: #111; background: var(--accent); }
.hero__visual { min-height: 520px; display: grid; grid-template-columns: 0.88fr 1fr; gap: 12px; align-items: end; }
.hero__visual img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); background: #222; }
.hero__visual img:first-child { height: 430px; }
.hero__visual img:last-child { height: 520px; }
.video-hero__visual video { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); background: #222; }
.video-hero__visual video:first-child { height: 430px; }
.video-hero__visual video:last-child { height: 520px; }
.toolbar { position: sticky; top: 0; z-index: 20; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(16, 17, 21, 0.9); backdrop-filter: blur(16px); }
.toolbar__inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; }
.filter-btn { flex: 0 0 auto; border: 1px solid var(--line); color: var(--muted); background: transparent; border-radius: 999px; min-height: 40px; padding: 0 14px; }
.filter-btn[aria-pressed="true"] { color: #111; background: var(--accent); border-color: var(--accent); }
.search { width: min(320px, 34vw); min-height: 40px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.05); color: var(--text); padding: 0 16px; outline: none; }
.search:focus { border-color: var(--accent-2); }
.section { padding: 54px 0 10px; scroll-margin-top: 88px; }
.section__head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 18px; }
.section h2 { margin: 0; font-size: 30px; letter-spacing: 0; }
.section p { max-width: 640px; margin: 0; color: var(--muted); line-height: 1.7; }
.case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.case-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); box-shadow: 0 12px 32px rgba(0,0,0,0.16); }
.case-card[hidden] { display: none; }
.case-card__image { aspect-ratio: 4 / 5; background: var(--panel-2); overflow: hidden; }
.case-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 320ms ease; }
.case-card:hover .case-card__image img { transform: scale(1.035); }
.case-card__body { padding: 16px; }
.case-card h3 { margin: 0; font-size: 18px; line-height: 1.35; letter-spacing: 0; }
.case-card__category { margin: 0 0 8px; color: var(--accent-2); font-size: 12px; font-weight: 800; letter-spacing: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 16px; }
.tag { color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px; font-size: 12px; }
.case-card__actions { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.detail-btn { min-height: 38px; border: 1px solid var(--accent); background: transparent; color: var(--accent); border-radius: 999px; padding: 0 12px; }
.case-index { color: var(--soft); font-size: 13px; }
.case-card__video { position: relative; display: block; width: 100%; padding: 0; border: 0; color: var(--text); overflow: hidden; text-align: left; }
.case-card__video video { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.92) contrast(1.04); transition: transform 320ms ease, filter 320ms ease; }
.case-card__video span { position: absolute; left: 14px; bottom: 14px; padding: 7px 10px; border: 1px solid rgba(255,255,255,0.18); border-radius: 999px; background: rgba(0,0,0,0.46); color: var(--text); font-size: 12px; font-weight: 800; backdrop-filter: blur(12px); }
.video-card:hover .case-card__video video { transform: scale(1.035); filter: saturate(1.05) contrast(1.08); }
.dialog { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(0,0,0,0.72); }
.dialog.is-open { display: flex; }
.dialog__panel { width: min(1040px, 100%); max-height: min(860px, calc(100vh - 48px)); display: grid; grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #14161b; box-shadow: var(--shadow); }
.dialog__image { min-height: 620px; background: var(--panel-2); }
.dialog__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dialog__video video { width: 100%; height: 100%; min-height: 620px; object-fit: contain; display: block; background: #050608; }
.dialog__content { overflow-y: auto; padding: 24px; }
.dialog__top { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.dialog h2 { margin: 0; font-size: 26px; line-height: 1.35; letter-spacing: 0; }
.close-btn { flex: 0 0 38px; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); background: rgba(255,255,255,0.04); font-size: 22px; line-height: 1; }
.detail-block { margin-top: 22px; }
.detail-block h3 { margin: 0 0 8px; color: var(--accent); font-size: 14px; letter-spacing: 0; }
.detail-block p { margin: 0; color: var(--muted); line-height: 1.85; white-space: pre-wrap; }
.footer { padding: 64px 0; color: var(--soft); text-align: center; }
.back-home {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  background: rgba(14, 16, 22, 0.72);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}
.back-home:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(14, 16, 22, 0.88);
}
@media (max-width: 900px) {
  .site-shell { width: min(100% - 28px, 720px); }
  .hero { min-height: auto; padding-top: 34px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { min-height: 0; grid-template-columns: 1fr 1fr; }
  .hero__visual img:first-child, .hero__visual img:last-child { height: 320px; }
  .video-hero__visual video:first-child, .video-hero__visual video:last-child { height: 320px; }
  .toolbar__inner { align-items: stretch; flex-direction: column; gap: 0; padding-bottom: 12px; }
  .search { width: 100%; }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dialog__panel { grid-template-columns: 1fr; overflow-y: auto; }
  .dialog__image { min-height: auto; aspect-ratio: 4 / 3; }
  .dialog__video video { min-height: auto; aspect-ratio: 16 / 10; }
  .dialog__content { overflow: visible; }
}
@media (max-width: 560px) {
  .case-grid { grid-template-columns: 1fr; }
  h1 { font-size: 42px; }
  .hero__copy { font-size: 16px; }
  .hero__visual { grid-template-columns: 1fr; }
  .hero__visual img:first-child, .hero__visual img:last-child { height: auto; aspect-ratio: 4 / 5; }
  .video-hero__visual video:first-child, .video-hero__visual video:last-child { height: auto; aspect-ratio: 4 / 5; }
  .section__head { display: block; }
  .section p { margin-top: 8px; }
  .dialog { padding: 12px; }
}
