/* Shared phone layout. Desktop sizing and typography stay in each page. */
.site-menu-toggle { display:none; }

@media (max-width:760px) {
  .site-header {
    box-sizing:border-box; display:grid; grid-template-columns:minmax(0,1fr) auto;
    align-items:center; gap:0 12px; margin:0 20px; padding:16px 0 !important;
    border-bottom:1px solid var(--rule); text-align:left !important;
  }
  .site-header > a { justify-self:start; font-size:23px !important; letter-spacing:.12em !important; }
  .site-nav-ready .site-menu-toggle {
    display:inline-flex; align-items:center; justify-content:center; gap:9px;
    min-width:82px; min-height:44px; padding:0 10px; box-sizing:border-box;
    font:400 11px/1 'IBM Plex Mono',monospace; letter-spacing:.04em;
    color:var(--ink); background:rgba(244,241,236,.035); border:1px solid var(--rule);
    border-radius:6px; cursor:pointer; -webkit-tap-highlight-color:transparent;
  }
  .site-menu-toggle svg { width:19px; height:19px; flex-shrink:0; }
  .site-menu-toggle .menu-line { transform-origin:12px 12px; transition:transform .18s ease; }
  .site-menu-toggle[aria-expanded="true"] .menu-line:first-child { transform:translateY(4px) rotate(45deg); transform-origin:12px 8px; }
  .site-menu-toggle[aria-expanded="true"] .menu-line:last-child { transform:translateY(-4px) rotate(-45deg); transform-origin:12px 16px; }
  .site-header nav {
    grid-column:1/-1; display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px !important; width:100%; margin:14px 0 0 !important; padding:0 !important;
    border:0 !important; text-align:left;
  }
  .site-nav-ready .site-header:not([data-menu-open="true"]) nav { display:none !important; }
  .site-header nav a {
    display:flex; align-items:center; box-sizing:border-box; min-width:0; min-height:46px;
    padding:12px !important; font-size:11px !important; line-height:1.45;
    letter-spacing:.06em !important; border:1px solid transparent !important; border-radius:5px;
    color:var(--body) !important; white-space:normal;
  }
  .site-header nav a[aria-current="page"] { color:var(--acc) !important; background:rgba(229,117,31,.09); border-color:rgba(229,117,31,.25) !important; }
  .site-menu-toggle:focus-visible, .site-header nav a:focus-visible { outline:2px solid var(--acc); outline-offset:3px; }

  main[data-screen-label="About"], main[data-screen-label="Projects"],
  main[data-screen-label="Research Gallery"], main[data-screen-label="Photography"] { padding:38px 20px 0 !important; }
  main[data-screen-label] > h1 { font-size:clamp(34px,7.5vw,40px) !important; line-height:1.12; text-wrap:balance; }
  main[data-screen-label] > p { margin-bottom:32px !important; line-height:1.7 !important; }
  html .pv-project-intro { margin-bottom:28px; font-size:14.5px; }

  .home-hero { padding:54px 20px 38px !important; }
  .home-eyebrow { gap:10px !important; margin-bottom:22px !important; }
  .home-eyebrow > div:first-child, .home-eyebrow > div:last-child { width:18px !important; flex:0 0 18px; }
  .home-eyebrow > div:nth-child(2) { font-size:9px !important; letter-spacing:.12em !important; line-height:1.6; text-wrap:balance; }
  .home-hero h1 { font-size:clamp(42px,11.5vw,52px) !important; line-height:1.08 !important; margin-bottom:20px !important; }
  .home-hero p { font-size:15px !important; line-height:1.75 !important; }
  .home-moon-shell { width:250px !important; height:250px !important; top:95px !important; right:-165px !important; transform:none !important; opacity:.4; }
  main[data-screen-label="Home"] { padding:0 20px !important; }
  .home-slideshow { min-height:0 !important; height:auto !important; aspect-ratio:4/3; }
  .home-caption { font-size:9px !important; letter-spacing:.12em !important; line-height:1.6; margin-top:12px !important; }
  .home-dots { gap:0 !important; margin-top:2px !important; }
  .home-dots button { box-sizing:border-box; width:44px !important; height:44px !important; border:18px solid var(--bg) !important; }

  html .project-card-grid { grid-auto-rows:auto; gap:34px; }
  html .project-card > div:first-child { flex:0 0 auto; height:auto !important; aspect-ratio:1.55; }
  .project-card > div:nth-child(2) { font-size:9.5px !important; line-height:1.6; letter-spacing:.12em !important; margin-top:14px !important; }
  .project-card h3 { font-size:27px !important; line-height:1.12; }
  .project-card p { line-height:1.7 !important; }
  .project-publications { margin-top:0 !important; padding-top:52px !important; }
  .project-publications > div { grid-template-columns:26px minmax(0,1fr) !important; gap:12px !important; }
  .project-publications a { display:inline-block; min-height:28px; }
  html .project-link { min-height:44px; box-sizing:border-box; line-height:1.5; padding-top:8px; padding-bottom:8px; }
  .lunar-header > div, .shadow-header > div, .showcase-header > div { min-width:0; }
  .lunar-header h3, .shadow-header h3, .showcase-header h3 { font-size:26px !important; text-wrap:balance; }
  html .lunar-close, html .shadow-close, html .showcase-close, html .pv-close { min-width:44px; min-height:44px; flex-shrink:0; }
  .pv-lightbox header { padding:8px 12px !important; }

  html .about-intro { gap:30px; }
  html .about-portrait { max-width:300px; margin:0 auto; }
  section[data-screen-label="Experience"], section[data-screen-label="Education"] { padding-top:56px !important; }
  html .about-skills { gap:22px; }
  html .gallery-grid { column-gap:0; }
  html .gallery-item { margin-bottom:28px; }
  html .location-cards { gap:32px; }
  html .gallery-viewer-header { align-items:flex-start; }
  .gallery-viewer-header > div:first-child { min-width:0; }
  html .gallery-viewer-header h2 { font-size:23px; line-height:1.15; }
  .gallery-viewer-actions { flex-shrink:0; }

  .contact-content { padding:48px 20px 0 !important; }
  .contact-content h1 { font-size:44px !important; }
  .contact-content > p { margin-bottom:30px !important; line-height:1.75 !important; }
  .contact-content > a { font-size:clamp(21px,5.8vw,28px) !important; overflow-wrap:anywhere; }
  .contact-links { gap:8px 20px !important; margin-top:36px !important; padding-top:20px !important; }
  .contact-links a { display:inline-flex; align-items:center; min-height:44px; font-size:10px !important; letter-spacing:.12em !important; }
  .contact-content > div:last-child { margin-top:28px !important; font-size:9px !important; letter-spacing:.12em !important; line-height:1.6; }
  .site-footer { margin-top:58px !important; padding:0 20px 24px !important; }
  .site-footer > div { flex-direction:column; align-items:center !important; text-align:center; gap:8px !important; padding-top:20px !important; }
  .site-footer > div > div { font-size:9px !important; letter-spacing:.12em !important; }
  .site-footer a { display:inline-flex; align-items:center; min-height:44px; font-size:10px !important; letter-spacing:.1em !important; }
}

@media (max-width:360px) {
  .site-header { margin:0 16px; gap:8px; }
  .site-header > a { font-size:21px !important; }
  .site-header nav a { font-size:10px !important; padding:10px !important; }
}
@media (prefers-reduced-motion:reduce) { .site-menu-toggle .menu-line { transition:none; } }
