/* =============================================================================
 * lab.css — Suzuki Lab (lab.keisukesuzuki.org)
 * Modernist grid: flat warm ground, zero radius, strong 2px rules, one green
 * accent. Deliberately unlike the personal site (white, rounded, blue).
 * ========================================================================== */

:root {
  --bg: #f3f2ef;
  --surface: #e7e6e2;
  --ink: #1c1b19;
  --muted: #5c5953;
  --hair: rgba(28, 27, 25, .2);
  --accent: #17864a;
  --accent-ink: #0d5c32;
  --accent-tint: #d6e9dc;
  --maxw: 1200px;
  --gutter: clamp(18px, 4vw, 48px);
  --font: "Archivo", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
}

/* Dark mode (header toggle, saved as lab-theme). The footer stays dark. */
:root[data-theme="dark"] {
  --bg: #141413;
  --surface: #201f1d;
  --ink: #ecebe7;
  --muted: #a5a29b;
  --hair: rgba(236, 235, 231, .18);
  --accent: #3dbb7a;
  --accent-ink: #7dd8a8;
  --accent-tint: #1c3a2a;
}
:root[data-theme="dark"] #site-footer { background: #0b0b0a; color: var(--ink); border-top: 2px solid var(--ink); }
:root[data-theme="dark"] #site-footer a { color: var(--ink); }
:root[data-theme="dark"] .deck-play { color: #0b0b0a; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html[lang="ja"] body { line-height: 1.85; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-tint); }
img { display: block; max-width: 100%; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.kicker, .sec-num, .card-people, .card-more, .news-tag, .pub-type, .person-role,
.hero-meta dt, .meta-line span, .back, .more, .footer-label, .brand-sub {
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}

/* ---- header -------------------------------------------------------------- */
#site-header { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 2px solid var(--ink); }
.header-inner { position: relative; display: flex; align-items: stretch; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; padding-right: 24px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 20px; height: 20px; flex: none; background: var(--accent); }
.brand-name { display: block; font-size: 20px; font-weight: 800; line-height: 1; letter-spacing: .01em; text-transform: uppercase; }
.brand-sub { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); }
.nav { margin-left: auto; display: flex; align-items: stretch; }
.nav > a {
  display: flex; align-items: center; padding: 0 16px; border-left: 1px solid var(--hair);
  color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.nav > a:hover { background: var(--surface); color: var(--ink); }
.nav > a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.lang { display: flex; align-items: center; padding-left: 16px; border-left: 1px solid var(--hair); }
.lang button {
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .08em; padding: 5px 9px; cursor: pointer;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
}
.lang button + button { border-left: 0; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.lang button:not([aria-pressed="true"]):hover { background: var(--surface); }
.prefs { display: flex; align-items: center; gap: 8px; margin-left: 10px; }
.theme-toggle, .design-toggle {
  padding: 5px 10px; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
}
.theme-toggle { padding: 4px 9px; font-size: 14px; line-height: 1.2; letter-spacing: 0; }
.theme-toggle:hover, .design-toggle:hover { background: var(--surface); }
.nav-toggle {
  display: none; align-self: center; margin-left: auto; padding: 8px 12px; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
}

/* ---- hero ---------------------------------------------------------------- */
.hero { padding: clamp(40px, 7vw, 92px) 0 clamp(44px, 6vw, 76px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 48px; align-items: end; }
.kicker { margin-bottom: 18px; font-size: 12.5px; color: var(--accent-ink); }
.hero-title { font-size: clamp(60px, 10.5vw, 136px); font-weight: 800; line-height: .9; letter-spacing: -.04em; }
html[lang="ja"] .hero-title { font-size: clamp(46px, 7.6vw, 98px); font-weight: 700; line-height: 1.05; letter-spacing: -.01em; }
.hero-lead { margin-top: 34px; max-width: 38em; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; }
html[lang="ja"] .hero-lead { line-height: 1.95; }
.hero-meta { margin: 0; border-top: 2px solid var(--ink); }
.hero-meta > div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.hero-meta dt { padding-top: 2px; font-size: 11px; color: var(--muted); }
.hero-meta dd { margin: 0; overflow-wrap: anywhere; }

/* ---- sections ------------------------------------------------------------ */
.section { border-top: 2px solid var(--ink); padding: 26px 0 64px; }
.sec-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 24px 48px; }
.sec-label { position: sticky; top: 94px; align-self: start; }
.sec-num { display: block; margin-bottom: 8px; font-size: 12.5px; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.sec-title { font-size: clamp(24px, 2.5vw, 32px); font-weight: 800; line-height: 1.12; letter-spacing: -.015em; }
html[lang="ja"] .sec-title { font-weight: 700; letter-spacing: 0; line-height: 1.35; }
.more { margin-top: 22px; font-size: 13px; }
.more a { text-decoration: none; }
.more a:hover { text-decoration: underline; }

.page-head { padding: clamp(36px, 6vw, 76px) 0 clamp(30px, 4vw, 52px); }
.page-title { font-size: clamp(44px, 7vw, 92px); font-weight: 800; line-height: .95; letter-spacing: -.035em; }
html[lang="ja"] .page-title { font-size: clamp(36px, 5.4vw, 66px); font-weight: 700; line-height: 1.2; letter-spacing: 0; }
.project-head .page-title { font-size: clamp(34px, 4.8vw, 64px); line-height: 1.02; letter-spacing: -.025em; max-width: 18em; }
html[lang="ja"] .project-head .page-title { font-size: clamp(30px, 4vw, 52px); line-height: 1.3; letter-spacing: 0; }
.page-lead { margin-top: 24px; max-width: 40em; font-size: clamp(16px, 1.5vw, 19px); }
.back { margin-bottom: 26px; font-size: 13px; }
.back a { text-decoration: none; }
.back a:hover { text-decoration: underline; }
.page-body { padding-bottom: 64px; }

/* ---- project cards ------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.card {
  display: flex; flex-direction: column; gap: 10px; padding: 22px 32px 30px 0;
  border-bottom: 1px solid var(--hair); color: var(--ink); text-decoration: none;
}
.card:nth-child(even) { padding: 22px 0 30px 32px; border-left: 1px solid var(--hair); }
.card:hover { color: var(--ink); }
.card:hover .card-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.card-num { font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.card-title { font-size: 22px; font-weight: 800; line-height: 1.18; letter-spacing: -.01em; }
html[lang="ja"] .card-title { font-weight: 700; line-height: 1.5; letter-spacing: 0; }
.card-people { font-size: 11.5px; color: var(--muted); }
.card-lead { font-size: 15px; }
.card-more { margin-top: auto; padding-top: 8px; font-size: 12px; color: var(--accent-ink); }

/* ---- news ---------------------------------------------------------------- */
.news { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.news li {
  display: grid; grid-template-columns: 9.5rem 7.5rem minmax(0, 1fr); gap: 4px 20px;
  padding: 14px 0; border-bottom: 1px solid var(--hair); align-items: baseline;
}
.news-date { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.news-tag { font-size: 11px; color: var(--accent-ink); }
.news-text { font-size: 15px; }
.news-text > a[target] { text-decoration: none; font-weight: 700; }

/* ---- year-grouped lists (news, publications) ----------------------------- */
.year-block { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 16px 48px; }
.year-block + .year-block { margin-top: 8px; }
.year-block:last-child { padding-bottom: 72px; }
.year { position: sticky; top: 94px; align-self: start; padding-top: 18px; border-top: 2px solid var(--ink); font-size: clamp(28px, 3vw, 40px); font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

html[lang="ja"] .year { font-weight: 700; letter-spacing: 0; }

/* ---- media --------------------------------------------------------------- */
.media-list { border-top: 2px solid var(--ink); }
.media-card {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 18px 0;
  border-bottom: 1px solid var(--hair); color: var(--ink); text-decoration: none;
}
.media-card:hover { color: var(--ink); }
.media-card:hover .media-title { text-decoration: underline; }
.media-thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--hair); background: var(--surface); }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.media-outlet { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.media-title { display: block; font-size: 19px; font-weight: 700; line-height: 1.35; }
.media-about { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); }

/* ---- publications -------------------------------------------------------- */
.pubs { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.pubs li { padding: 15px 0; border-bottom: 1px solid var(--hair); font-size: 17px; line-height: 1.55; }
.pubs strong { font-weight: 700; }
.pubs a[target] { text-decoration: none; font-weight: 700; }
.pub-type { display: block; margin-bottom: 4px; font-size: 11.5px; color: var(--accent-ink); }

/* ---- people -------------------------------------------------------------- */
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
.people--compact { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 20px; }
.person-photo { position: relative; aspect-ratio: 4 / 5; margin-bottom: 14px; overflow: hidden; background: var(--surface); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: grayscale(1) contrast(1.06); }
.person-photo.is-mono::before { content: ""; position: absolute; top: 14px; left: 14px; width: 14px; height: 14px; background: var(--accent); }
.mono { position: absolute; left: 14px; bottom: 10px; font-size: clamp(36px, 4.4vw, 64px); font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.people--compact .mono { font-size: clamp(30px, 3vw, 42px); }
.person-role { margin-bottom: 4px; font-size: 11px; color: var(--accent-ink); }
.person-name { font-size: 19px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.people--compact .person-name { font-size: 16px; }
html[lang="ja"] .person-name { font-size: 17px; font-weight: 700; letter-spacing: 0; }
html[lang="ja"] .people--compact .person-name { font-size: 15px; }
.person-name a { color: inherit; text-decoration: none; }
.person-name a:hover { text-decoration: underline; }
.person-fields { margin-top: 8px; font-size: 14px; color: var(--muted); }
.person-credit { margin-top: 6px; font-size: 11px; color: var(--muted); }

/* ---- project page -------------------------------------------------------- */
.meta-line { margin-bottom: 26px; padding-bottom: 14px; border-bottom: 1px solid var(--hair); font-size: 15px; }
.meta-line span { margin-right: 14px; font-size: 11px; color: var(--muted); }
.prose { max-width: 42em; }
.prose p { margin-bottom: 1.15em; font-size: 17px; }
html[lang="ja"] .prose p { font-size: 16px; }
.project-figure { max-width: 420px; margin: 0 0 30px; border: 2px solid var(--ink); background: #fff; }
.project-figure img { width: 100%; height: auto; }
.deck-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border: 2px solid var(--ink); }
.deck-frame img { width: 100%; height: 100%; object-fit: cover; }
.deck-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.deck-play {
  position: absolute; left: 24px; bottom: 24px; padding: 14px 22px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  border: 0; background: var(--accent); color: #fff;
}
.deck-play:hover { background: var(--accent-ink); }
.deck-note { margin-top: 12px; font-size: 13.5px; color: var(--muted); }

/* ---- footer -------------------------------------------------------------- */
#site-footer { background: var(--ink); color: var(--bg); }
#site-footer a { color: var(--bg); }
#site-footer a:hover { color: #8fd3aa; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); gap: 32px; padding-top: 44px; padding-bottom: 32px; font-size: 14px; }
.footer-name { margin-bottom: 10px; font-size: 22px; font-weight: 800; text-transform: uppercase; }
.footer-label { margin-bottom: 8px; font-size: 11px; color: #a9a6a0; }
.footer-bottom { padding-top: 16px; padding-bottom: 28px; border-top: 1px solid rgba(243, 242, 239, .2); font-size: 12px; color: #a9a6a0; }

/* ---- responsive ---------------------------------------------------------- */
/* The header collapses into the menu earlier than the page layout changes,
   so the brand never wraps once the design toggle is in the bar. */
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    background: var(--bg); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  }
  .nav.open { display: flex; }
  .nav > a { padding: 14px var(--gutter); border-left: 0; border-top: 1px solid var(--hair); }
  .nav > a:first-child { border-top: 0; }
  .lang { padding: 12px var(--gutter); border-left: 0; border-top: 1px solid var(--hair); }
  .prefs { margin: 0; padding: 0 var(--gutter) 14px; }
}
@media (max-width: 960px) {
  .hero-grid, .sec-grid, .year-block { grid-template-columns: minmax(0, 1fr); }
  .sec-label, .year { position: static; }
  .people--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card, .card:nth-child(even) { padding: 22px 0 28px; border-left: 0; }
  .news li { grid-template-columns: auto minmax(0, 1fr); }
  .news-text { grid-column: 1 / -1; }
  .people, .people--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .brand-sub { display: none; }
  .deck-play { left: 12px; bottom: 12px; padding: 10px 14px; font-size: 12px; }
  .media-card { grid-template-columns: minmax(0, 1fr); }
}
