/* ---------- Base ---------- */
  :root {
    --text: #111;
    --muted: #6b6b6b;
    --line: #e4e4e4;
    --bg: #fff;
    --soft: #f4f4f2;
    --max: 1100px;
    --gutter: 32px;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; scroll-padding-top: 80px; }
  body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
  }
  a { color: inherit; }
  img { max-width: 100%; display: block; }
  section { padding: 96px var(--gutter); }
  .wrap { max-width: var(--max); margin: 0 auto; }
  h2 {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 48px;
    color: var(--muted);
  }

  /* Inner pages (Project, About, Shop) */
  .page { padding-top: 64px; min-height: calc(100vh - 72px - 110px); }

  /* ---------- Header ---------- */
  header {
    position: sticky; top: 0; z-index: 10;
    background: rgba(255,255,255,0.96);
    border-bottom: 1px solid var(--line);
  }
  .header-inner {
    max-width: var(--max); margin: 0 auto;
    height: 72px; padding: 0 var(--gutter);
    display: flex; align-items: center; justify-content: space-between;
  }
  /* Menu-bar logo = the icon (links home) */
  .logo { display: block; line-height: 0; text-decoration: none; }
  .logo-icon { height: 46px; width: auto; }
  nav ul { display: flex; gap: 32px; list-style: none; }
  nav a {
    font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
    text-decoration: none; color: var(--muted);
    padding-bottom: 4px; border-bottom: 1px solid transparent;
    transition: color .2s, border-color .2s;
  }
  nav a:hover, nav a.active { color: var(--text); border-bottom-color: var(--text); }
  #nav-toggle, .nav-button { display: none; }

  /* ---------- Home ---------- */
  #home { padding-top: 56px; min-height: calc(100vh - 72px); }
  .hero-title { line-height: 0; margin-bottom: 20px; }
  .hero-title .logo-text { height: clamp(48px, 9vw, 110px); width: auto; max-width: 100%; }
  .hero-sub {
    font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 48px;
  }
  /* MAIN VISUAL — replace the .main-visual div with:
     <img src="images/main-visual.jpg" alt="Risa Ueno, main visual" class="main-visual"> */
  .main-visual {
    width: 100%; aspect-ratio: 16 / 8;
    background:
      repeating-linear-gradient(45deg, rgba(0,0,0,0.035) 0 2px, transparent 2px 14px),
      repeating-linear-gradient(-45deg, rgba(0,0,0,0.035) 0 2px, transparent 2px 14px),
      var(--soft);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
    object-fit: cover;
  }
  /* Full-bleed main visual: edge to edge of the screen */
  #home { overflow-x: clip; padding-bottom: 0; }
  img.main-visual {
    display: block; width: 100vw; max-width: none; height: 88vh; min-height: 420px;
    margin: 0 0 0 calc(50% - 50vw); aspect-ratio: auto; background: none;
    object-fit: cover; object-position: 50% 28%;
  }
  /* ---------- Project ---------- */
  #project { background: var(--soft); }
  .grid {
    display: grid; gap: 40px 24px;
    grid-template-columns: repeat(3, 1fr);
  }
  .card { text-decoration: none; display: block; }
  /* PROJECT IMAGES — replace each .thumb div with:
     <img class="thumb" src="images/project-name.jpg" alt="Project title"> */
  .thumb {
    width: 100%; aspect-ratio: 4 / 3; background: #e7e7e4;
    margin-bottom: 14px; object-fit: cover;
    transition: opacity .25s;
  }
  .card:hover .thumb { opacity: 0.8; }
  .card h3 { font-size: 15px; font-weight: 400; letter-spacing: 0.02em; line-height: 1.4; }
  .card span {
    display: block; font-size: 12px; color: var(--muted);
    letter-spacing: 0.1em; margin-top: 4px;
  }

  /* ---------- Project detail ---------- */
  .back {
    display: inline-block; margin-bottom: 40px; text-decoration: none;
    font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  }
  .back:hover { color: var(--text); }
  .project-title { font-size: clamp(28px, 4.4vw, 52px); font-weight: 700; line-height: 1.15; margin-bottom: 40px; }
  .project-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--soft); }
  .project-block { margin-top: 80px; }
  .project-block h2 { margin-bottom: 28px; }
  .prose { max-width: 720px; }
  .prose p { margin-bottom: 1.3em; }
  .prose p:last-child { margin-bottom: 0; }
  .prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #bbb; }
  .prose a:hover { text-decoration-color: var(--text); }
  .video { position: relative; width: 100%; aspect-ratio: 16 / 9; margin-top: 36px; background: #000; }
  .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
  .gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
  .gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--soft); }

  /* ---------- Photos you can click: strip + lightbox ---------- */
  .shot { margin: 0; min-width: 0; }
  .shot-open {
    display: block; width: 100%; padding: 0; border: 0; background: none;
    font: inherit; color: inherit; cursor: zoom-in;
  }
  .shot-open img { transition: opacity .2s; }
  .shot-open:hover img { opacity: 0.85; }
  .photostrip { display: flex; gap: 16px; margin-top: 36px; }
  .photostrip .shot-open img { width: 100%; height: auto; display: block; background: var(--soft); }
  .gallery { margin-top: 16px; }

  .lightbox {
    position: fixed; inset: 0; z-index: 100; display: none;
    flex-direction: column; align-items: center; overflow: auto;
    padding: 0 24px 40px; background: #fff;
  }
  .lightbox.open { display: flex; }
  .lb-bar {
    position: sticky; top: 0; width: 100%; max-width: var(--max);
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0; background: #fff;
  }
  .lb-nav { display: flex; align-items: center; gap: 8px; }
  .lb-btn {
    font: inherit; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
    background: none; border: 0; padding: 10px 12px; cursor: pointer; color: var(--text);
  }
  .lb-btn:hover { text-decoration: underline; text-underline-offset: 4px; }
  .lb-count { font-size: 12px; letter-spacing: 0.1em; color: var(--muted); margin-left: 8px; }
  .lb-img { max-width: 100%; max-height: 72vh; width: auto; height: auto; object-fit: contain; margin-top: 8px; }
  .lb-text { width: 100%; max-width: 720px; margin-top: 22px; font-size: 14px; line-height: 1.7; }
  .lb-text p { margin-bottom: 0.7em; }
  .lb-text .t { font-weight: 700; }
  .lb-text a { text-decoration: underline; text-underline-offset: 3px; }
  .lb-credit { font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }
  body.no-scroll { overflow: hidden; }

  /* ---------- About ---------- */
  .about-grid {
    display: grid; grid-template-columns: 1fr 1.6fr; gap: 64px; align-items: start;
  }
  /* PORTRAIT — replace .portrait div with <img class="portrait" src="images/risa-ueno.jpg" alt="Risa Ueno"> */
  .portrait { width: 100%; aspect-ratio: 3 / 4; background: var(--soft); object-fit: cover; }
  .about-video { margin-top: 0; }
  .about-text { max-width: none; margin-top: 56px; }
  .about-text p { margin-bottom: 1.4em; font-size: 16px; text-align: justify; text-justify: inter-word; }
  .cv { margin-top: 72px; }
  .cv-section { margin-top: 56px; }
  .cv-section:first-child { margin-top: 0; }
  .cv h3 { font-size: 13px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
  .cv-list { list-style: none; border-top: 1px solid var(--line); }
  .cv-list li { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.6; }
  .cv-year { color: var(--muted); font-size: 13px; letter-spacing: 0.06em; padding-top: 2px; }
  .cv-note { margin-top: 48px; font-size: 12px; letter-spacing: 0.04em; color: var(--muted); }
  .cv-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: #bbb; }
  .cv-note a:hover { color: var(--text); text-decoration-color: var(--text); }
  .more { margin-top: 32px; }
  .more-link { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
  .more-link:hover { color: var(--text); }
  .about-text p:last-child { margin-bottom: 0; }

  /* ---------- News ---------- */
  #news { background: var(--soft); }
  .year-block {
    display: grid; grid-template-columns: 110px 1fr; gap: 24px;
    padding: 32px 0; border-top: 1px solid var(--line);
  }
  .year-block:last-child { border-bottom: 1px solid var(--line); }
  .year { font-size: 13px; color: var(--muted); letter-spacing: 0.1em; padding-top: 2px; }
  .year-block ul { list-style: none; }
  .year-block li { margin-bottom: 18px; }
  .year-block li:last-child { margin-bottom: 0; }
  .year-block a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #bbb; }
  .year-block a:hover { text-decoration-color: var(--text); }

  /* ---------- Shop ---------- */
  .shop-visual {
    width: 100%; aspect-ratio: 16 / 6; background: var(--soft);
    display: flex; align-items: center; justify-content: center;
    text-align: center;
  }
  .coming-soon {
    font-size: clamp(20px, 3.4vw, 36px); letter-spacing: 0.28em;
    text-transform: uppercase; font-weight: 400;
  }

  /* ---------- Contact ---------- */
  #contact { background: var(--bg); border-top: 1px solid var(--line); }
  #contact h2 { margin-bottom: 12px; }
  .contact-sub { font-size: 13px; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 40px; }
  .contact-list { list-style: none; }
  .contact-list li {
    display: grid; grid-template-columns: 140px 1fr; gap: 24px;
    padding: 20px 0; border-bottom: 1px solid var(--line);
  }
  .contact-list li:first-child { border-top: 1px solid var(--line); }
  .contact-list .label {
    font-size: 13px; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase;
  }
  .contact-list a { text-decoration: none; border-bottom: 1px solid #bbb; }
  .contact-list a:hover { border-bottom-color: var(--text); }

  /* ---------- Footer ---------- */
  footer {
    padding: 40px var(--gutter); text-align: center;
    font-size: 12px; color: var(--muted); letter-spacing: 0.1em;
  }

  /* ---------- Responsive ---------- */
  @media (max-width: 860px) {
    :root { --gutter: 22px; }
    section { padding: 64px var(--gutter); }
    .grid, .gallery { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; gap: 32px; }
    .portrait { max-width: 320px; }
    .nav-button {
      display: block; cursor: pointer; font-size: 12px;
      letter-spacing: 0.16em; text-transform: uppercase;
    }
    nav ul {
      display: none; position: absolute; top: 72px; left: 0; right: 0;
      flex-direction: column; gap: 0; background: #fff;
      border-bottom: 1px solid var(--line);
    }
    nav li a { display: block; padding: 16px var(--gutter); border: 0; }
    #nav-toggle:checked ~ ul { display: flex; }
    .header-inner { position: relative; }
  }
  @media (max-width: 540px) {
    .grid, .gallery { grid-template-columns: 1fr; }
    .photostrip { flex-direction: column; }
    .photostrip .shot { flex: none !important; }
    .lightbox { padding: 0 16px 32px; }
    .year-block, .contact-list li, .cv-list li { grid-template-columns: 1fr; gap: 4px; }
    .shop-visual { aspect-ratio: 4 / 3; }
  }

  /* ---------- Eating DNA page ---------- */
  .caption { font-size: 12px; letter-spacing: 0.04em; line-height: 1.5; color: var(--muted); margin-top: 8px; }
  /* Main visuals and videos: one per row, stacked in a single column */
  .visuals { display: flex; flex-direction: column; align-items: center; gap: 56px; }
  .visual { margin: 0; width: fit-content; max-width: 100%; }
  .visual img { display: block; width: auto; height: auto; max-width: 100%; max-height: 88vh; background: var(--soft); }
  .visual .caption { width: 0; min-width: 100%; }  /* caption wraps to the photo's width */
  .visual-row { display: flex; gap: 16px; align-items: flex-start; width: 100%; max-width: 820px; }
  .visual-row .visual { width: auto; min-width: 0; }
  .visual-row .visual img { width: 100%; max-height: none; }
  .visual-link { display: block; line-height: 0; }
  .visual-link img { transition: opacity .2s; }
  .visual-link:hover img { opacity: 0.85; }
  .pair-block { width: 100%; }
  .pair-block .visual-row { max-width: none; }
  .caption a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: #bbb; }
  .caption a:hover { color: var(--text); text-decoration-color: var(--text); }
  .videos { display: flex; flex-direction: column; gap: 40px; margin-top: 72px; }
  .videos .video { width: 100%; max-width: 960px; margin: 0 auto; }
  .research-item {
    margin-top: 56px;
  }
  .project-block h2 + .research-item { margin-top: 0; }
  .research-item .prose { margin-top: 24px; max-width: none; color: var(--muted); text-align: justify; hyphens: auto; }
  .rfigs { display: flex; gap: 16px; align-items: flex-start; }
  .rfig { margin: 0; min-width: 0; }
  .rfig img { width: 100%; height: auto; display: block; background: var(--soft); }
  .microscope { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 64px; }
  .microscope figure { margin: 0; min-width: 0; }
  .microscope img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--soft); }
  .prose.wach-text, .prose.wide-text { max-width: none; }
  .wide-text p { text-align: justify; }
  .vol-title { margin-top: 80px; margin-bottom: 28px; }
  .vol-title:first-of-type { margin-top: 0; }
  .vol-title + .visuals { margin-top: 0; }
  .sub-visuals { margin-top: 56px; }
  .sub-label { font-size: 13px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 40px 0 16px; }
  .video.first-video { margin-top: 0; }
  .main-after-video { margin-top: 56px; }
  .video-short { aspect-ratio: 9 / 16; width: 100%; max-width: 380px; margin: 56px auto 0; }
  .project-block .video-short { margin-top: 0; margin-left: 0; }
  .split { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: start; }
  .split-image { margin: 0; }
  .split-image img { display: block; width: 100%; height: auto; background: var(--soft); }
  .split-text p { margin-bottom: 1.4em; }
  .split-text p:last-child { margin-bottom: 0; }
  .split-text .split-title { font-weight: 700; }
  .split-text .just { text-align: justify; }
  .split-text .url { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #bbb; word-break: break-all; font-size: 14px; }
  .split-text .url:hover { color: var(--text); text-decoration-color: var(--text); }
  @media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } .split-image { max-width: 420px; } }
  .small-group { width: 100%; max-width: 700px; display: flex; flex-direction: column; gap: 16px; }
  .small-group .visual-row { max-width: none; }
  .small-group .caption { margin-top: 0; }
  .wach-text p { margin-bottom: 1.4em; text-align: justify; }
  .wach-text p:last-child { margin-bottom: 0; }
  .research-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .research-grid .rfig img { aspect-ratio: 1 / 1; object-fit: cover; }
  .pub-block { margin-top: 80px; }
  .end-caption { margin-top: 56px; }
  @media (max-width: 860px) {
  }
  @media (max-width: 540px) {
    .research-grid { grid-template-columns: 1fr; }
    .visual-row { flex-direction: column; }
    .visual-row .visual { flex: none !important; width: 100%; }
    .microscope { grid-template-columns: 1fr; }
  }
