/* ─────────────────────────────────────────────
   Yuta Nakayama — link-in-bio  (v6 "撮る人")
   The photo speaks; type stays quiet; space does the rest.
   Palette: paper #F5F2F0 · indigo #242E52 · muted #626880 (4.94:1 on paper)
            orange #FF881D appears only as the hover underline / hover border of the one button.
   No pure white, no pure black, no tilt, no stroke, no shadow, no radius, no entrance animation.
   Type: Cormorant Garamond 300 (H1 EN/VI only) / 400 (everything else display)
         Shippori Mincho B1 400 (JA display)
         Inter 400 body · 500 controls (EN/VI) · Zen Kaku Gothic New 400 body · 500 controls (JA)
   Grid: max 1152, side 32 (phone 24), 12 columns, gutter 24.
   Rhythm (8px): sections 96/64 · works 128/80 · photo→caption 8 · heading→body 8 · related 16
                 photo→text 24 · to primary action 32 · section heading→work 48/32
   ───────────────────────────────────────────── */

:root {
  --paper: #f5f2f0;
  --ink: #242e52;
  --ink-muted: #626880;
  --line: rgba(36, 46, 82, 0.18);
  --line-strong: rgba(36, 46, 82, 0.4);
  --accent: #ff881d;

  --serif-lat: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --serif-ja: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans-lat: "Inter", "Helvetica Neue", Arial, sans-serif;
  --sans-ja: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;

  /* type scale — phone values (EN). JA / VI override below, desktop at ≥900 */
  --fs-h1: 40px;
  --fs-h2: 30px;
  --fs-h3: 20px;
  --fs-num: 40px;
  --fs-body: 16px;
  --fs-small: 16px;
  --fs-cap: 14px;
  --lh-h1: 1.12;
  --lh-h2: 1.2;
  --lh-body: 1.6;
  --ls-head: -0.01em;
  --ls-body: 0;

  /* layout */
  --gutter: 24px;
  --wrap: 1152px;
  --gap: 24px;
  --section: 64px;
  --section-works: 80px;
  --measure: 36ch;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t: 240ms;
}
html[data-lang="ja"] {
  --measure: 24em;
  --fs-h1: 32px; --fs-h2: 26px; --fs-h3: 20px;
  --lh-h1: 1.4; --lh-h2: 1.4; --lh-body: 1.75;
  --ls-head: 0.02em; --ls-body: 0.01em;
}
html[data-lang="vi"] {
  --fs-h1: 38px; --fs-h2: 30px;
  --lh-h1: 1.25; --lh-h2: 1.3; --lh-body: 1.7;
  --ls-head: 0; --ls-body: 0;
}

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

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--sans-lat);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background: var(--paper);
}
html[data-lang="ja"] body { font-family: var(--sans-ja); font-feature-settings: "palt"; }

/* ── language switching: only the active language is rendered ── */
body [lang="en"], body [lang="ja"], body [lang="vi"] { display: none; }
html[data-lang="en"] body [lang="en"],
html[data-lang="ja"] body [lang="ja"],
html[data-lang="vi"] body [lang="vi"] { display: inline; }
html[data-lang="en"] body [data-blk] > [lang="en"],
html[data-lang="ja"] body [data-blk] > [lang="ja"],
html[data-lang="vi"] body [data-blk] > [lang="vi"] { display: block; }

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p, h1, h2, h3, dl, dd, dt, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 12px 16px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding: var(--section) 0; }
.section--works { padding: var(--section-works) 0; }
.grid12 { display: grid; grid-template-columns: 1fr; gap: 32px var(--gap); }

/* ═══════════ type ═══════════ */
.h1, .h2, .h3, .face__t, .face__n, .stat dd, .link__name, .topbar__brand, .hero__name-lat {
  font-family: var(--serif-lat);
  font-weight: 400;
  letter-spacing: var(--ls-head);
  color: inherit;
}
.h1 { font-weight: 300; }                       /* 300 is reserved for the big heading */
html[data-lang="ja"] .h1, html[data-lang="ja"] .h2, html[data-lang="ja"] .face__t {
  font-family: var(--serif-ja);
  font-weight: 400;
}
.h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); }
html[data-lang="ja"] .h1 { word-break: keep-all; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
.h3, .face__t { font-size: var(--fs-h3); line-height: 1.3; }

.kicker {
  font-size: var(--fs-cap);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 16px;
}
html[data-lang="ja"] .kicker { text-transform: none; letter-spacing: 0.2em; }

.cap {
  margin-top: 8px;                                 /* photo → caption 8 */
  font-size: var(--fs-cap);
  line-height: 1.5;
  color: var(--ink-muted);
}

/* text link: hairline underline that turns orange on hover. 44px tall hit area. */
.tl {
  display: inline-block;
  padding-block: 10px;                             /* 24px line + 20 = 44 */
  line-height: 24px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 6px;
  font-weight: 500;
  font-size: var(--fs-small);
  transition: text-decoration-color var(--t) var(--ease);
}
.tl:hover, .tl:focus-visible { text-decoration-color: var(--accent); }

/* the one button on the page: paper, hairline indigo frame, square */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--fs-small);
  line-height: 1;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--paper); border-color: var(--accent); }
.btn__handle { font-weight: 400; color: var(--ink-muted); }
.btn:hover .btn__handle, .btn:focus-visible .btn__handle { color: var(--paper); }

.btn:focus-visible, .tl:focus-visible, .link:focus-visible, .lang button:focus-visible, .topbar__brand:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 4px;
}

.avatar { border-radius: 50%; object-fit: cover; flex: none; }
.avatar--lg { width: 64px; height: 64px; }

/* ═══════════ 01 HERO ═══════════ */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: calc(12px + env(safe-area-inset-top));
  padding-bottom: 12px;
}
.topbar__brand {
  display: inline-flex; align-items: center; min-height: 44px;
  text-decoration: none; font-size: 20px; line-height: 1;
}
.lang { display: flex; gap: 8px; }
.lang button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px;
  font-size: var(--fs-cap);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  border-bottom: 1px solid transparent;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 24px;                                   /* photo → name 24 */
  padding-top: 8px;
  padding-bottom: 32px;
}
.hero__photo { padding-inline: var(--gutter); }
.hero__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hero__text { padding-inline: var(--gutter); max-width: 640px; }

.hero__name {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px;
  margin-bottom: 16px;
}
.hero__name-lat { font-size: 20px; line-height: 1.2; }
.hero__name-ja { font-family: var(--serif-ja); font-size: var(--fs-cap); letter-spacing: 0.1em; color: var(--ink-muted); }

.hero__role { margin-top: 8px; font-size: var(--fs-small); color: var(--ink-muted); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 24px; }
.hero__lede { margin-top: 24px; max-width: var(--measure); }

/* ═══════════ 02 WORKS ═══════════ */
.works { border-top: 1px solid var(--line); }
.sechead { display: grid; gap: 16px; margin-bottom: 32px; }      /* section heading → work 32 (phone) */
.sechead__p { color: var(--ink-muted); max-width: var(--measure); }
.works__grid { display: grid; grid-template-columns: 1fr; gap: 32px var(--gap); }
.work img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* ═══════════ 03 FOOD ═══════════ */
.food { border-top: 1px solid var(--line); }
.plates { display: grid; grid-template-columns: 1fr; gap: 32px var(--gap); }
.plate img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.food__more { margin-top: 24px; }

/* ═══════════ 04 FIVE FACES ═══════════ */
.faces { border-top: 1px solid var(--line); }
.faces__list { border-top: 1px solid var(--line); }
.face {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.face__n { font-size: var(--fs-small); color: var(--ink-muted); padding-top: 2px; }
.face__d { margin-top: 8px; color: var(--ink-muted); max-width: var(--measure); }   /* heading → body 8 */
.face--photo { grid-template-columns: 48px 1fr; }
.face__record { grid-column: 2; width: 96px; }
.face__record img { width: 96px; aspect-ratio: 4 / 5; object-fit: cover; }
.faces__home { margin-top: 24px; }
.faces__home img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* ═══════════ 05 CAPICHI — paper continues; numbers are supporting cast ═══════════ */
.capichi { border-top: 1px solid var(--line); }
.capichi__d { margin-top: 16px; color: var(--ink-muted); max-width: var(--measure); }
.rowlinks { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 24px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-content: start; padding-top: 24px; border-top: 1px solid var(--line); }
.stat dd { font-size: var(--fs-num); line-height: 1; letter-spacing: 0; }
html[data-lang="ja"] .stat dd { font-family: "Cormorant Garamond", "Shippori Mincho B1", "Hiragino Mincho ProN", serif; }
.stat dt { margin-top: 8px; font-size: var(--fs-cap); color: var(--ink-muted); }

/* ═══════════ 06 WRITING ═══════════ */
.writing { border-top: 1px solid var(--line); }
.writing__d { margin-top: 16px; margin-bottom: 16px; color: var(--ink-muted); max-width: var(--measure); }
.writing__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* ═══════════ 07 LINKS ═══════════ */
.links { border-top: 1px solid var(--line); }
.links__head { display: flex; align-items: center; gap: 16px; }
.linklist { border-top: 1px solid var(--line); }
.link {
  display: grid;
  grid-template-columns: 1fr auto 20px;
  align-items: baseline;
  gap: 16px;
  min-height: 64px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  position: relative;
}
.link::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 0;
  background: var(--accent);
  transition: width var(--t) var(--ease);
}
.link:hover::after, .link:focus-visible::after { width: 100%; }
.link__name { font-size: 24px; line-height: 1.2; }
.link__meta { font-size: var(--fs-cap); color: var(--ink-muted); text-align: right; }
.arrow {
  width: 18px; height: 18px; align-self: center;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0.6;
}

/* ═══════════ 08 FOOTER ═══════════ */
.footer { border-top: 1px solid var(--line); }
.footer__in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
  padding-top: 24px; padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
.lang--footer { gap: 16px; }
.lang--footer button { letter-spacing: 0.02em; min-width: 0; }
.footer__copy { font-size: var(--fs-cap); color: var(--ink-muted); }

/* ═══════════ motion ═══════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ═══════════ ≥ 640 ═══════════ */
@media (min-width: 640px) {
  .plates { grid-template-columns: repeat(3, 1fr); }
}

/* ═══════════ ≥ 900 (desktop) ═══════════ */
@media (min-width: 900px) {
  :root {
    --fs-h1: 64px;
    --fs-h2: 40px;
    --fs-h3: 22px;
    --fs-num: 48px;
    --gutter: 32px;
    --section: 96px;
    --section-works: 128px;
  }
  html[data-lang="ja"] { --fs-h1: 40px; --fs-h2: 32px; --fs-h3: 22px; }
  html[data-lang="vi"] { --fs-h1: 60px; --fs-h2: 38px; }
  .grid12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

  /* hero: text in columns 1–5, photo from column 7 to the right edge of the viewport */
  .hero__grid {
    grid-template-columns:
      [full-start] minmax(calc(var(--gutter) - var(--gap)), 1fr)
      [wrap-start] repeat(12, [c] minmax(0, calc((min(100%, var(--wrap)) - var(--gutter) * 2 - var(--gap) * 11) / 12)))
      [wrap-end] minmax(calc(var(--gutter) - var(--gap)), 1fr)
      [full-end];
    column-gap: var(--gap);
    row-gap: 0;
    align-items: center;
    padding-top: 16px;
    padding-bottom: 32px;
  }
  .hero__text { grid-column: c 1 / c 6; grid-row: 1; padding-inline: 0; max-width: none; padding-block: 32px; }
  .hero__photo { grid-column: c 7 / full-end; grid-row: 1; padding-inline: 0; }
  .hero__name { margin-bottom: 24px; }
  .hero__role { margin-top: 16px; }
  .hero__actions { margin-top: 32px; gap: 8px 24px; }                  /* to the primary action 32 */
  .hero__lede { margin-top: 32px; }

  /* works entrance: hero text 32 + grid 32 + works top 64 = 128 from hero end; works bottom stays 128 */
  .section--works { padding-top: 64px; }

  .sechead { grid-template-columns: 4fr 8fr; align-items: end; margin-bottom: 48px; }   /* heading → work 48 */
  .works__grid { grid-template-columns: repeat(2, 1fr); gap: 48px var(--gap); }
  .work--lead { grid-column: 1 / -1; }
  .food__more { margin-top: 32px; }

  .faces__h { grid-column: 1 / 5; }
  .faces__list { grid-column: 5 / 13; }
  .face { grid-template-columns: 72px 1fr; padding: 32px 0; }
  .face--photo { grid-template-columns: 72px 1fr 96px; }
  .face__record { grid-column: 3; grid-row: 1; }
  .face__n { padding-top: 4px; }
  .faces__home { grid-column: 5 / 13; margin-top: 24px; }

  .capichi__text { grid-column: 1 / 7; }
  .stats { grid-column: 8 / 13; grid-template-columns: 1fr 1fr; gap: 32px; border-top: 0; padding-top: 8px; align-self: end; }

  .writing__text { grid-column: 1 / 6; align-self: center; }
  .writing__photo { grid-column: 7 / 13; }

  .links__head { grid-column: 1 / 5; align-items: flex-start; flex-direction: column; gap: 24px; }
  .linklist { grid-column: 5 / 13; }
  .link { padding: 20px 0; }
  .link__name { font-size: 28px; }
}
