:root {
  --paper: #fbfaff;
  --surface: #ffffff;
  --surface-soft: #f4f2fa;
  --ink: #242424;
  --muted: #616161;
  --line: #e2e1ee;
  --line-strong: #c8c6dc;
  --accent: #5b5fc7;
  --accent-dark: #464775;
  --accent-soft: #e8e8fa;
  --warm: #5b5fc7;
  --violet: #5b5fc7;
  --violet-dark: #464775;
  --violet-soft: #e8e8fa;
  --header-height: 64px;
  --page: 1160px;
  --pad: clamp(20px, 4vw, 48px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 20px); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Noto Sans Thai", "Leelawadee UI", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid #5b5fc7;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  color: white;
  background: var(--accent-dark);
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

.container { width: min(var(--page), calc(100% - var(--pad) * 2)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  border-bottom: 1px solid rgba(70, 71, 117, .14);
  background: rgba(248, 248, 255, .96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 28px;
}

.identity { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.identity-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}
.identity-copy { display: grid; line-height: 1.12; }
.identity-copy strong { font-size: 14px; }
.identity-copy small { margin-top: 3px; color: var(--muted); font-size: 11px; }

.header-nav { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 34px); margin-left: auto; }
.header-nav > a { min-height: 44px; display: inline-flex; align-items: center; color: #494949; font-size: 13px; font-weight: 650; text-decoration: none; }
.header-nav > a:hover { color: var(--accent); }

.language-links {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.language-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 36px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}
.language-links a[aria-current="page"] { color: white; background: var(--accent-dark); }

.header-resume {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--accent-dark);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
}
.menu-toggle span:not(.sr-only) { display: block; width: 18px; height: 1px; margin: 3px auto; background: currentColor; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.section { padding: clamp(48px, 6vw, 80px) 0; }
.section-compact { padding: clamp(34px, 4vw, 52px) 0; }
.section-soft { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff7ff, var(--surface-soft)); }
.section-soft::after {
  position: absolute;
  top: 22px;
  right: max(18px, calc((100vw - var(--page)) / 2 - 56px));
  width: clamp(150px, 17vw, 230px);
  aspect-ratio: 18 / 11;
  background: url("/v2/assets/v2-20260827/artwork-purple.20260827-r2.svg") center / contain no-repeat;
  content: "";
  opacity: .13;
  pointer-events: none;
  transform: rotate(4deg);
}
.section-soft > .container { position: relative; z-index: 1; }

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

html[lang="th"] .eyebrow { letter-spacing: .03em; text-transform: none; }

.section-head { display: grid; grid-template-columns: minmax(0, .9fr) minmax(280px, .55fr); gap: clamp(28px, 5vw, 72px); align-items: end; margin-bottom: 34px; }
.section-head h2 { margin: 0; max-width: 720px; font-size: clamp(32px, 4.1vw, 48px); line-height: 1.08; letter-spacing: -.04em; }
.section-head > p { margin: 0; color: var(--muted); }
html[lang="th"] .section-head h2 { line-height: 1.22; letter-spacing: -.025em; }

.hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(38px, 5vw, 64px) 0 42px; background: radial-gradient(circle at 82% 14%, rgba(255,255,255,.9), transparent 25%), linear-gradient(118deg, #eef0ff 0%, #f4f1ff 54%, #e8ebfa 100%); }
.hero::after {
  position: absolute;
  z-index: -1;
  top: 24px;
  right: max(10px, calc((100vw - var(--page)) / 2 - 68px));
  width: clamp(170px, 20vw, 270px);
  aspect-ratio: 18 / 11;
  background: url("/v2/assets/v2-20260827/artwork-purple.20260827-r2.svg") center / contain no-repeat;
  content: "";
  opacity: .62;
  pointer-events: none;
  transform: rotate(5deg);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(310px, .66fr); gap: clamp(36px, 6vw, 72px); align-items: center; }
.hero h1 { margin: 0; font-size: clamp(42px, 5.6vw, 68px); line-height: 1; letter-spacing: -.055em; }
.hero-role { margin: 18px 0 0; color: var(--accent); font-size: clamp(19px, 1.9vw, 24px); font-weight: 760; letter-spacing: -.02em; }
.hero-lead { max-width: 720px; margin: 20px 0 0; font-size: clamp(21px, 2.35vw, 30px); line-height: 1.28; letter-spacing: -.025em; }
.hero-summary { max-width: 690px; margin: 16px 0 0; color: var(--muted); font-size: 16px; }
html[lang="th"] .hero h1 { line-height: 1.04; }
html[lang="th"] .hero-role { letter-spacing: 0; }
html[lang="th"] .hero-lead { line-height: 1.5; letter-spacing: -.02em; }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--accent-dark);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}
.button-primary { color: white; border-color: var(--accent); background: var(--accent); box-shadow: 0 4px 12px rgba(91, 95, 199, .22); }
.button-secondary { color: var(--accent-dark); border-color: var(--line-strong); background: white; }
.button:hover { border-color: var(--accent-dark); transform: translateY(-1px); }

.portrait { width: 100%; max-width: 360px; justify-self: end; margin: 0; }
.portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 24%; border-radius: 16px; filter: saturate(.84); box-shadow: 0 18px 48px rgba(70, 71, 117, .18); }
.portrait figcaption { display: flex; justify-content: space-between; gap: 18px; padding-top: 13px; color: var(--muted); font-size: 12px; }
.portrait figcaption strong { color: var(--ink); font-weight: 700; }

.proof-bar { border-block: 1px solid var(--line); background: var(--surface); }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.proof-item { min-height: 90px; padding: 19px 22px; border-right: 1px solid var(--line); }
.proof-item:last-child { border-right: 0; }
.proof-item small { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.proof-item strong { font-size: 17px; line-height: 1.3; }

.principle {
  max-width: 980px;
  margin: 0 0 34px;
  padding-left: 22px;
  border-left: 4px solid var(--accent);
  font-size: clamp(22px, 2.7vw, 32px);
  line-height: 1.25;
  letter-spacing: -.035em;
}
html[lang="th"] .principle { line-height: 1.55; letter-spacing: -.015em; }

.approach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.approach-card { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: inset 0 3px var(--violet-soft), 0 3px 12px rgba(70, 71, 117, .05); }
.approach-card span { color: var(--violet); font-size: 12px; font-weight: 800; }
.approach-card h3 { margin: 22px 0 9px; font-size: 21px; letter-spacing: -.02em; }
.approach-card p { margin: 0; color: var(--muted); }

.workflow { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; box-shadow: 0 3px 12px rgba(70, 71, 117, .04); }
.workflow div { position: relative; min-height: 108px; padding: 18px; border-right: 1px solid var(--line); }
.workflow div:last-child { border-right: 0; }
.workflow small { display: block; color: var(--violet); font-weight: 800; }
.workflow strong { display: block; margin-top: 14px; font-size: 14px; line-height: 1.4; }

.projects { display: grid; gap: 20px; }
.managed-projects-loading, .managed-projects-unavailable { grid-column: 1 / -1; margin: 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: var(--surface); }
.project-card { position: relative; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; box-shadow: 0 5px 18px rgba(70, 71, 117, .07); transition: border-color .18s ease, box-shadow .18s ease; }
.project-card:hover, .project-card:focus-within { border-color: #b9baf0; box-shadow: 0 8px 24px rgba(70, 71, 117, .11); }
.project-body { display: grid; grid-template-columns: minmax(0, .8fr) minmax(380px, 1.2fr); gap: clamp(32px, 5vw, 62px); padding: clamp(28px, 4vw, 46px); }
.project-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 19px; color: var(--muted); font-size: 11px; font-weight: 720; letter-spacing: .04em; text-transform: uppercase; }
html[lang="th"] .project-meta { letter-spacing: 0; text-transform: none; }
.project-title { margin: 0; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.1; letter-spacing: -.04em; }
.managed-detail-link { color: inherit; text-decoration: none; }
.managed-detail-link::after { position: absolute; z-index: 1; inset: 0; content: ""; }
.managed-detail-link:focus-visible { outline: 3px solid rgba(91, 95, 199, .34); outline-offset: 5px; }
.managed-external-link { position: relative; z-index: 2; }
html[lang="th"] .project-title { line-height: 1.3; letter-spacing: -.02em; }
.project-intro { margin: 16px 0 0; color: var(--muted); font-size: 16px; }
.project-links { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 22px; }
.text-link { min-height: 36px; display: inline-flex; align-items: center; color: var(--accent-dark); font-size: 13px; font-weight: 780; text-underline-offset: 4px; }

.project-points { margin: 0; padding: 0; list-style: none; }
.project-points li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.project-points li:first-child { padding-top: 0; }
.project-points li:last-child { padding-bottom: 0; border-bottom: 0; }
.project-points strong { display: block; margin-bottom: 5px; font-size: 15px; }
.project-points span { display: block; color: var(--muted); font-size: 14px; }

.project-media { display: grid; background: #efeff7; }
.project-media-pair { grid-template-columns: 1.2fr .8fr; gap: 1px; background: var(--line); }
.project-media figure { position: relative; margin: 0; overflow: hidden; background: #f6f5fb; }
.project-media img { width: 100%; height: 100%; min-height: 270px; object-fit: cover; }
.project-media-pair figure:first-child img { object-position: center; }
.project-media-pair figure:last-child img { object-position: center top; }
.project-media figcaption { position: absolute; left: 16px; bottom: 16px; padding: 7px 11px; border-radius: 999px; color: white; background: rgba(70, 71, 117, .92); font-size: 10px; font-weight: 750; }
.project-media-single img { max-height: 570px; object-position: center; }
.project-media-single .placeholder-note { position: absolute; right: 16px; bottom: 16px; padding: 7px 11px; border-radius: 999px; color: #3f3f4b; background: rgba(255, 255, 255, .94); font-size: 10px; font-weight: 700; }

.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.product-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; box-shadow: 0 4px 16px rgba(70, 71, 117, .06); transition: border-color .18s ease, box-shadow .18s ease; }
.product-card:hover, .product-card:focus-within { border-color: #b9baf0; box-shadow: 0 7px 22px rgba(70, 71, 117, .1); }
.product-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; border-bottom: 1px solid var(--line); }
.product-content { display: flex; flex: 1; flex-direction: column; padding: 23px; }
.product-content small { color: var(--accent); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.product-content h3 { margin: 14px 0 8px; font-size: 24px; letter-spacing: -.03em; }
.product-content p { margin: 0; color: var(--muted); }
.product-content .text-link { margin-top: auto; padding-top: 18px; }

.timeline { border-top: 1px solid var(--line-strong); }
.timeline-item { display: grid; grid-template-columns: 140px minmax(220px, .75fr) 1.25fr; gap: 26px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.timeline-date { color: var(--muted); font-size: 12px; font-weight: 720; }
.timeline-role strong { display: block; font-size: 17px; }
.timeline-role span { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
.timeline-copy { margin: 0; color: var(--muted); font-size: 14px; }

.archive-callout { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; padding: clamp(30px, 4vw, 44px); border-radius: 18px; color: white; background: linear-gradient(120deg, #5b5fc7, #464775); box-shadow: 0 12px 30px rgba(70, 71, 117, .18); }
.archive-callout::after { position: absolute; z-index: -1; right: -34px; bottom: -74px; width: 220px; height: 220px; border: 28px solid rgba(255,255,255,.09); border-radius: 50%; content: ""; }
.archive-callout h2 { margin: 0; font-size: clamp(29px, 3.8vw, 44px); line-height: 1.12; letter-spacing: -.035em; }
.archive-callout p { max-width: 720px; margin: 12px 0 0; color: #eeedff; }
.archive-callout .button { color: var(--violet-dark); border-color: white; background: white; white-space: nowrap; }
.archive-callout .button:focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px #242424; }

.contact-grid { display: grid; grid-template-columns: 1fr .85fr; gap: clamp(40px, 7vw, 90px); }
.contact-grid h2 { margin: 0; font-size: clamp(31px, 4vw, 46px); line-height: 1.1; letter-spacing: -.04em; }
.contact-grid > div > p { color: var(--muted); }
.contact-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.contact-list a { display: grid; grid-template-columns: 1fr auto; gap: 16px; min-height: 66px; align-items: center; border-bottom: 1px solid var(--line); font-weight: 720; text-decoration: none; }
.contact-list a span:last-child { color: var(--muted); font-size: 12px; font-weight: 500; }

.site-footer { padding: 28px 0 38px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { min-height: 36px; display: inline-flex; align-items: center; }

/* Root language chooser */
.chooser-page { position: relative; isolation: isolate; overflow-x: hidden; overflow-y: auto; min-height: 100vh; display: grid; place-items: center; padding: 28px; background: linear-gradient(145deg, #f1f2ff, #fff7ff); }
.chooser-page::before { position: absolute; z-index: -1; bottom: clamp(16px, 3vw, 28px); left: -24px; width: clamp(190px, 28vw, 350px); aspect-ratio: 18 / 11; background: url("/v2/assets/v2-20260827/artwork-purple.20260827-r2.svg") center / contain no-repeat; content: ""; opacity: .56; pointer-events: none; transform: rotate(-8deg); }
.chooser-shell { width: min(780px, 100%); padding: clamp(32px, 5vw, 56px); border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: 0 22px 65px rgba(70, 71, 117, .14); }
.chooser-brand { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.chooser-brand p { margin: 0; color: var(--muted); font-size: 12px; text-align: right; }
.chooser-copy { margin: 32px 0 25px; text-align: center; }
.chooser-copy h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.2; letter-spacing: -.03em; }
.chooser-copy p { margin: 13px 0 0; color: var(--muted); }
.language-choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.language-choice {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 20px;
  align-items: center;
  min-height: 110px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: white;
  text-decoration: none;
}
.language-choice:hover { border-color: var(--violet); background: #f3f2ff; box-shadow: 0 5px 16px rgba(91, 95, 199, .09); }
.language-choice img { width: 76px; height: 51px; object-fit: cover; border: 1px solid rgba(0,0,0,.12); }
.language-choice strong { display: block; font-size: 21px; }
.language-choice small { display: block; margin-top: 5px; color: var(--muted); }
.chooser-note { margin: 24px 0 0; color: var(--muted); font-size: 12px; text-align: center; }

/* Archive */
.archive-hero { position: relative; overflow: hidden; padding: 50px 0 34px; border-bottom: 1px solid var(--line); }
.archive-hero::after { position: absolute; top: 8px; right: max(10px, calc((100vw - var(--page)) / 2)); width: clamp(130px, 16vw, 210px); aspect-ratio: 18 / 11; background: url("/v2/assets/v2-20260827/artwork-purple.20260827-r2.svg") center / contain no-repeat; content: ""; opacity: .18; pointer-events: none; transform: rotate(5deg); }
.archive-hero > .container { position: relative; z-index: 1; }
.archive-hero h1 { max-width: 850px; margin: 0; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -.045em; }
.archive-hero p { max-width: 760px; margin: 16px 0 0; color: var(--muted); font-size: 16px; }
.archive-tools { position: sticky; top: var(--header-height); z-index: 30; padding: 13px 0; border-bottom: 1px solid var(--line); background: rgba(251, 250, 255, .97); }
.archive-controls { display: grid; grid-template-columns: 1fr minmax(190px, .3fr) auto; gap: 10px; }
.field { display: grid; gap: 6px; }
.field label { color: var(--muted); font-size: 11px; font-weight: 720; }
.field input, .field select { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink); background: var(--surface); }
.clear-button { align-self: end; min-height: 48px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--accent-dark); background: white; font-weight: 700; }
.archive-status { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 23px 0 16px; }
.archive-status p { margin: 0; color: var(--muted); }
.archive-status a { font-size: 12px; }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 85px; }
.work-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; box-shadow: 0 4px 14px rgba(70, 71, 117, .06); }
.work-card[hidden] { display: none; }
.work-card > a { color: inherit; text-decoration: none; }
.work-card > a:hover .work-copy h2 { color: var(--accent-dark); }
.work-card > a:hover .work-thumb img { transform: scale(1.018); }
.work-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #ececf4; }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .18s ease; }
.work-thumb span { position: absolute; right: 11px; bottom: 11px; padding: 5px 8px; border-radius: 999px; color: white; background: rgba(70, 71, 117, .92); font-size: 10px; }
.work-copy { padding: 21px; }
.work-copy small { color: var(--accent); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.work-copy h2 { margin: 13px 0 9px; font-size: 20px; line-height: 1.28; letter-spacing: -.025em; }
.work-copy p { margin: 0; color: var(--muted); font-size: 13px; }
.work-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 17px; }
.work-tags span { padding: 4px 8px; border-radius: 999px; color: var(--accent-dark); background: var(--accent-soft); font-size: 9px; font-weight: 700; }
.no-results { padding: 50px 20px 70px; text-align: center; }
.no-results[hidden] { display: none; }
.no-results h2 { margin: 0; }
.no-results p { color: var(--muted); }

/* Archive detail — media-first structure inspired by game-store product pages. */
.archive-detail-page { background: linear-gradient(180deg, #efeffb 0, var(--paper) 440px); }
.detail-main { min-height: calc(100vh - var(--header-height)); padding: 28px 0 78px; }
.detail-back { min-height: 38px; display: inline-flex; align-items: center; color: var(--accent-dark); font-size: 12px; font-weight: 760; text-decoration: none; }
.detail-back:hover { text-decoration: underline; text-underline-offset: 4px; }
.detail-loading { min-height: 54vh; display: grid; place-items: center; color: var(--muted); }
.detail-loading[hidden] { display: none; }
.detail-heading { padding: 18px 0 23px; }
.detail-heading h1 { max-width: 980px; margin: 0; font-size: clamp(34px, 4.5vw, 54px); line-height: 1.06; letter-spacing: -.045em; }
.detail-heading > p:last-child { margin: 12px 0 0; color: var(--muted); font-size: 13px; font-weight: 680; }
.detail-store-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .72fr); gap: 18px; align-items: start; }
.detail-gallery { min-width: 0; overflow: hidden; border: 1px solid #303147; border-radius: 16px; color: white; background: #171827; box-shadow: 0 18px 45px rgba(36,36,54,.2); }
.detail-stage { aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; background: #0f101a; }
.detail-stage iframe, .detail-stage > img { width: 100%; height: 100%; border: 0; object-fit: contain; }
.detail-media-empty { margin: 0; color: #c9cad9; font-size: 13px; }
.detail-carousel-bar { min-height: 42px; display: flex; align-items: center; justify-content: flex-end; gap: 13px; padding: 5px 9px; border-top: 1px solid #303147; color: #c9cad9; background: #1e1f30; font-size: 10px; }
.detail-carousel-bar button { width: 32px; height: 30px; display: grid; place-items: center; padding: 0; border: 1px solid #41435d; border-radius: 7px; color: white; background: #292b42; }
.detail-carousel-bar button:hover { border-color: #8c8fe4; background: #343654; }
.detail-carousel-bar button[hidden] { display: none; }
.detail-thumbnails { display: flex; gap: 8px; overflow-x: auto; padding: 10px; border-top: 1px solid #303147; scrollbar-color: #575a83 #1e1f30; }
.detail-thumbnails[hidden] { display: none; }
.detail-thumbnail { position: relative; width: 126px; aspect-ratio: 16 / 9; flex: 0 0 auto; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 7px; background: #292b42; opacity: .7; }
.detail-thumbnail:hover, .detail-thumbnail.active { border-color: #8f92e8; opacity: 1; }
.detail-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.detail-play-mark { position: absolute; inset: 0; display: grid; place-items: center; color: white; background: rgba(15,16,26,.36); font-size: 22px; text-shadow: 0 2px 9px #000; }
.detail-summary-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.96); box-shadow: 0 12px 35px rgba(70,71,117,.1); }
.detail-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-soft); }
.detail-summary-panel > p { margin: 0; padding: 20px 20px 15px; color: #45454d; font-size: 13px; line-height: 1.62; }
.detail-meta { margin: 0; padding: 0 20px 15px; }
.detail-meta div { display: grid; grid-template-columns: 88px 1fr; gap: 9px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 10px; }
.detail-meta dt { color: var(--muted); }
.detail-meta dd { margin: 0; color: var(--ink); font-weight: 680; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px 18px; }
.detail-tags span { padding: 5px 8px; border-radius: 6px; color: var(--accent-dark); background: var(--accent-soft); font-size: 9px; font-weight: 720; }
.detail-source-links { display: grid; gap: 8px; margin: 0 20px 20px; }
.detail-source-links:empty { display: none; }
.detail-source-button { min-height: 48px; display: flex; align-items: center; justify-content: center; margin: 0; padding: 8px 14px; border-radius: 9px; color: white; background: var(--accent); font-size: 12px; font-weight: 780; text-align: center; text-decoration: none; }
.detail-source-button:hover { background: var(--accent-dark); }
.detail-about { max-width: 860px; margin-top: 28px; padding: clamp(24px, 4vw, 38px); border: 1px solid var(--line); border-radius: 16px; background: white; }
.detail-about h2 { margin: 0 0 15px; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.035em; }
.detail-rich-text { color: var(--muted); font-size: 14px; line-height: 1.75; }
.detail-rich-text > :first-child { margin-top: 0; }
.detail-rich-text > :last-child { margin-bottom: 0; }
.detail-rich-text p { margin: 0 0 14px; }
.detail-rich-text .rich-text-plain { white-space: pre-line; }
.detail-rich-text h2 { margin: 29px 0 11px; color: var(--ink); font-size: clamp(21px, 2.4vw, 27px); letter-spacing: -.025em; }
.detail-rich-text h3 { margin: 23px 0 9px; color: var(--ink); font-size: 18px; letter-spacing: -.015em; }
.detail-rich-text ul, .detail-rich-text ol { margin: 0 0 16px; padding-left: 25px; }
.detail-rich-text li + li { margin-top: 5px; }
.detail-rich-text blockquote { margin: 19px 0; padding: 13px 16px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; color: #535579; background: var(--accent-soft); }
.detail-rich-text a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.detail-rich-text figure { margin: 23px 0; }
.detail-rich-text figure img, .detail-rich-text > img { display: block; width: auto; max-width: 100%; max-height: 720px; margin: 0 auto; border-radius: 11px; box-shadow: 0 9px 28px rgba(36,36,54,.12); }
.detail-rich-text figcaption { margin-top: 8px; color: var(--muted); font-size: 11px; text-align: center; }
.detail-expandable-image { cursor: zoom-in; }
.detail-expandable-image:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.detail-lightbox { width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 54px 28px 24px; overflow: hidden; border: 0; color: white; background: rgba(11,11,19,.96); overscroll-behavior: contain; }
.detail-lightbox[open] { display: grid; place-items: center; }
.detail-lightbox::backdrop { background: rgba(11,11,19,.78); backdrop-filter: blur(7px); }
.detail-lightbox-close { position: fixed; z-index: 2; top: 14px; right: 17px; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; color: white; background: rgba(34,34,49,.84); font-size: 27px; font-weight: 300; line-height: 1; }
.detail-lightbox-close:hover { border-color: rgba(255,255,255,.62); background: #34364f; }
.detail-lightbox-figure { min-width: 0; max-width: 100%; max-height: 100%; display: grid; place-items: center; gap: 10px; margin: 0; }
.detail-lightbox-figure img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100dvh - 105px); object-fit: contain; }
.detail-lightbox-caption { max-width: min(900px, 90vw); margin: 0; color: #d6d7e5; font-size: 11px; line-height: 1.5; text-align: center; }
.detail-lightbox-caption[hidden] { display: none; }
.detail-notes { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 24px; }
.detail-notes article { padding: 18px; border-radius: 12px; background: var(--surface-soft); }
.detail-notes article[hidden] { display: none; }
.detail-notes h3 { margin: 0 0 8px; font-size: 15px; }
.detail-notes p { margin: 0; color: var(--muted); font-size: 12px; }
.detail-error { min-height: 58vh; display: grid; place-items: center; align-content: center; text-align: center; }
.detail-error[hidden] { display: none; }
.detail-error h1 { margin: 0; font-size: clamp(31px, 5vw, 48px); }
.detail-error p { color: var(--muted); }
.detail-error .button { margin-top: 12px; }

@media (max-width: 980px) {
  .header-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 18px var(--pad) 28px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }
  .header-nav.is-open { display: flex; }
  .header-nav > a { border-bottom: 1px solid var(--line); }
  .language-links { width: max-content; margin-top: 18px; }
  .header-resume { margin-top: 12px; width: max-content; }
  .menu-toggle { display: grid; }
  .hero-grid { grid-template-columns: 1fr .58fr; gap: 36px; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .proof-item:nth-child(2) { border-right: 0; }
  .proof-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section-head { grid-template-columns: 1fr; gap: 20px; }
  .workflow { grid-template-columns: repeat(3, 1fr); }
  .workflow div:nth-child(3) { border-right: 0; }
  .workflow div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .project-body { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 120px 1fr; }
  .timeline-copy { grid-column: 2; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-store-grid { grid-template-columns: 1fr; }
  .detail-summary-panel { display: grid; grid-template-columns: minmax(230px, .7fr) 1.3fr; }
  .detail-cover { height: 100%; min-height: 250px; aspect-ratio: auto; grid-row: span 4; }
}

@media (max-width: 720px) {
  :root { --header-height: 62px; --pad: 20px; }
  .identity-copy { display: none; }
  .hero { padding-top: 34px; }
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 360px; justify-self: start; }
  .portrait img { height: auto; aspect-ratio: 4 / 4.7; }
  .hero::after { top: 76px; right: -34px; width: 150px; opacity: .25; }
  .approach-grid, .product-grid { grid-template-columns: 1fr; }
  .workflow { grid-template-columns: 1fr; }
  .workflow div { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow div:nth-child(3) { border-right: 0; }
  .workflow div:last-child { border-bottom: 0; }
  .project-media-pair { grid-template-columns: 1fr; }
  .project-media img { min-height: 200px; }
  .project-media-pair figure:last-child img { max-height: 300px; }
  .timeline-item { grid-template-columns: 1fr; gap: 9px; }
  .timeline-copy { grid-column: auto; }
  .archive-callout { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .language-choice-grid { grid-template-columns: 1fr; }
  .chooser-brand { align-items: flex-start; }
  .chooser-brand p { text-align: left; }
  .archive-controls { grid-template-columns: 1fr; }
  .clear-button { width: 100%; }
  .archive-tools { position: static; }
  .work-grid { grid-template-columns: 1fr; }
  .detail-main { padding-top: 16px; }
  .detail-heading { padding-top: 10px; }
  .detail-heading h1 { font-size: clamp(30px, 9vw, 42px); }
  .detail-summary-panel { display: block; }
  .detail-cover { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
  .detail-thumbnail { width: 104px; }
  .detail-notes { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .proof-grid { grid-template-columns: 1fr; }
  .proof-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .proof-item:last-child { border-bottom: 0; }
  .button-row { display: grid; }
  .button { width: 100%; }
  .chooser-page { padding: 14px; }
  .chooser-shell { padding: 27px 20px; }
  .chooser-brand { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

.v2-current-link { width: min(var(--page), calc(100% - var(--pad) * 2)); margin: 8px auto 0; color: var(--muted); font-size: 12px; }
