/* Mobile refinements are isolated from the desktop composition. */
.menu-toggle { display: none; }
@media (max-width: 1000px) {
 .project { min-width: 0; flex: 0 0 100%; grid-template-columns: minmax(0, 1fr); }
 .project-copy, .closing-details, .about-heading, .about-stories { min-width: 0; }
 .project-track { align-items: flex-start; }
}
@media (max-width: 760px) {
 :root { --header-height: 58px; }
 .site-header { position: relative; height: var(--header-height); width: 90%; justify-content: flex-start; z-index: 30; }
 .has-menu .menu-toggle { display: inline-flex; align-items: center; gap: 10px; min-width: 88px; min-height: 44px; padding: 10px 0; border: 0; background: transparent; font: 700 13px var(--mono); }
 .menu-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
 .has-menu #main-navigation { display: none; position: absolute; left: 0; right: 0; top: calc(100% - 1px); padding: 10px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 0 0 8px 8px; box-shadow: 0 16px 28px #17201626; }
 .has-menu.is-menu-open #main-navigation { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
 #main-navigation a { padding: 14px 4px; min-height: 46px; font-size: 16px; border-bottom: 1px solid var(--line); }
 #main-navigation a:last-child { border: 0; }
 .hero { min-height: 0; }
 .hero-description { max-width: 34ch; }
 .hero-controls { gap: 12px; }
 #mission-expand, #mission-return { min-height: 44px; }
 
 /* Section base paddings */
 .work, .about, .offscreen, .site-footer { min-height: 0; }
 .work, .about, .offscreen { padding: clamp(24px, 4svh, 44px) 5%; }
 
 /* Work section */
 .section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 0; margin-bottom: 20px; }
 .section-heading h2 { font-size: clamp(28px, 7vw, 42px); margin: 0; }
 .project-controls { position: static; gap: 8px; }
 .project-controls span { margin-right: 4px; font-size: 11px; }
 .project-controls button { width: 40px; height: 40px; }
 .project-track { gap: 20px; padding: 0 0 8px; scroll-padding-inline: 0; }
 .project { width: 100%; gap: 18px; align-items: stretch; }
 
 /* Project visual cards */
 .project-visual { min-height: 0; padding: 14px; border-radius: 6px; display: flex; flex-direction: column; justify-content: space-between; }
 .visual-top, .visual-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 10px; }
 .visual-top { padding-bottom: 10px; }
 .visual-bottom { padding-top: 10px; }
 .visual-bottom b { font: 500 15px var(--body); }
 .visual-bottom button { min-height: 38px; padding: 6px 12px; font: 11px monospace; }
 
 /* CodeX visual card */
 .project-visual.codex .terminal { margin: 10px 0; box-shadow: 4px 4px 0 #b4b8a7; border-radius: 4px; overflow: hidden; }
 .terminal-bar { padding: 8px 10px; font-size: 11px; }
 .terminal pre { font-size: clamp(10px, 2.7vw, 11.5px); line-height: 1.5; padding: 9px 12px; margin: 0; overflow: auto; }
 .accepted { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 12px; font-size: 9.5px; }
 
 /* SentinelRoute visual card */
 .project-visual.route svg { margin: 8px 0; max-height: 220px; }
 
 /* Project copy */
 .project-copy { display: flex; flex-direction: column; gap: 6px; }
 .project-index { font-size: 11px; }
 .project-copy h3 { font-size: clamp(26px, 7vw, 36px); margin: 4px 0; overflow-wrap: anywhere; }
 .project-copy > p { font-size: 15px; line-height: 1.5; margin: 0; }
 .project-copy p.detail { font-size: 13.5px; line-height: 1.45; color: var(--muted); margin: 4px 0; }
 .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
 .tags span { font-size: 11px; padding: 5px 8px; }
 .metrics { display: flex; flex-wrap: wrap; gap: 16px 24px; margin: 12px 0; }
 .metrics dt { font-size: 26px; }
 .metrics dd { max-width: 140px; line-height: 1.35; font-size: 12px; margin-top: 2px; }
 .project-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 6px; }
 .project-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 10px 14px; font-size: 13px; }
 .project-note { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 4px; }

 html { scroll-padding-top: 0; }

 /* About section */
 .about {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4svh, 48px) 6%;
  box-sizing: border-box;
 }
 .about-heading {
  margin-bottom: clamp(14px, 2svh, 20px);
 }
 .about-heading .eyebrow {
  display: block;
  font: 11.5px/1.4 var(--mono);
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
 }
 .about-heading h2 {
  font-size: clamp(30px, 7.5vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin: 0 0 10px 0;
 }
 .about-heading h2 em {
  color: var(--accent);
 }
 .about-intro {
  max-width: 48ch;
  font-size: clamp(14px, 3.6vw, 16px);
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 12px 0;
 }
 .about-heading .text-link {
  display: inline-block;
  font-size: 13.5px;
  margin: 0;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
 }
 .about-stories {
  display: flex;
  flex-direction: column;
  padding-top: 0;
  border-top: 1px solid var(--line);
 }
 .about-stories article {
  padding: clamp(10px, 1.6svh, 14px) 0;
  border-bottom: 1px solid var(--line);
 }
 .about-stories h3 {
  font-size: clamp(16px, 4.2vw, 19px);
  letter-spacing: -0.3px;
  line-height: 1.25;
  margin: 0 0 5px 0;
 }
 .about-stories p {
  font-size: clamp(13px, 3.3vw, 14.5px);
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
 }

 /* Weekend cabinet */
 .cabinet-heading { gap: 10px; margin-bottom: 20px; }
 .cabinet-heading h2 { font-size: clamp(32px, 8vw, 42px); }
 .cabinet-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
 .cabinet { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, auto); grid-auto-rows: auto; padding: 10px; gap: 9px; }
 .cabinet-object { aspect-ratio: 1; min-height: 64px; padding: 8px; display: grid; grid-template-rows: 1fr; gap: 0; }
 .object-number { display: none; }
 .object-name { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
 .object-art { height: auto; aspect-ratio: 1; filter: none; }
 .object-art svg, .object-2 .object-art svg { width: 100%; height: auto; max-width: 90px; }
 .cabinet-story { padding: 20px 0 0; min-height: 0; }
 .story-preview { width: 50px; height: 50px; top: 16px; }
 .story-interest { margin: 20px 0 12px; }
 .cabinet-story h3 { font-size: 30px; }
 .story-description { max-width: none; font-size: 16px; }
 .cabinet-instruction { margin-top: 16px; }

 /* Footer */
 .site-footer { padding: 40px 6% 0; }
 .closing-main { grid-template-columns: minmax(0, 1fr); gap: 30px; padding: 0 0 28px; }
 .closing-main h2 { font-size: clamp(54px, 13vw, 80px); }
 .contact-letter { margin: 0 5px; padding: 22px; }
 .closing-bottom { flex-wrap: wrap; gap: 16px; }
 .closing-socials { width: 100%; flex-wrap: wrap; gap: 20px; }
 .closing-socials a, .back-to-top, .closing-email button { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (max-width: 360px) {
 .hero-statement { font-size: 23px; }
 .cabinet { gap: 7px; padding: 8px; }
 .cabinet-object { padding: 6px; }
 .closing-credit { font-size: 11px; }
}

.hero-bottom { justify-content: flex-end; }
.hero-bottom .hero-controls { width: auto; }
