/* Palette: cool white, navy ink, two soft blues. */
:root { --gutter: clamp(20px, 4vw, 56px);
  --bg: #f7faff;
  --ink: #14233f;
  --muted: #5a6882;
  --line: #d6e1f2;
  --tint: #e1ecfc;
  --accent: #b9d0f4;
  --mid: #7fa5e6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --nav: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.hl { text-decoration: none; background: linear-gradient(transparent 62%, var(--accent) 62%); font-weight: 600; transition: background 0.2s; }
.hl:hover { background: linear-gradient(transparent 0, var(--accent) 0); }

/* ---------- Entrance animation (replays each time a view is shown) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.view:not([hidden]) [style*="--i"] { animation: rise 0.75s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 60ms); }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; height: var(--nav); display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 4vw, 56px); z-index: 50; background: var(--bg); }
.brand { font: 800 1.05rem var(--sans); letter-spacing: -0.02em; text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); font-size: 0.92rem; font-weight: 600; }
.nav-links a { text-decoration: none; padding: 2px 0; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 40% no-repeat; transition: background-size 0.25s var(--ease); }
.nav-links a:hover, .nav-links a.on { background-size: 100% 40%; }
.ask { background: var(--ink); color: #fff; padding: 9px 18px; border-radius: 999px; font-size: 0.86rem; font-weight: 600; transition: background 0.2s, color 0.2s, transform 0.2s var(--ease); }
.ask:hover { background: var(--accent); color: var(--ink); transform: translateY(-2px); }

/* ---------- Views ---------- */
.views { padding-top: var(--nav); }
.view[hidden] { display: none !important; }
.view { position: relative; padding: clamp(16px, 3vh, 32px) clamp(20px, 4vw, 56px) 48px; overflow: hidden; }
.page-head h2 { font: 800 clamp(2.4rem, 8vh, 5rem)/1 var(--sans); letter-spacing: -0.04em; }
.page-head p { margin-top: 8px; color: var(--muted); font: italic 400 1.1rem var(--serif); }

@media (min-width: 900px) and (min-height: 600px) {
  body { height: 100vh; overflow: hidden; }
  .views { height: 100vh; }
  .view { height: calc(100vh - var(--nav)); padding-bottom: clamp(16px, 3vh, 32px); }
}

/* ---------- Home ---------- */
#v-home { padding: 0; display: flex; flex-direction: column; }
.hero { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 0 clamp(32px, 6vw, 96px); padding: 0 clamp(20px, 4vw, 56px); }
.intro { align-self: center; }
.eyebrow { font: 600 0.8rem var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
h1 { margin: 14px 0 18px; font: 800 clamp(2.8rem, 9vh, 5.5rem)/0.95 var(--sans); letter-spacing: -0.05em; }
.tag { max-width: 24em; font: italic 400 clamp(1.1rem, 2.6vh, 1.5rem)/1.35 var(--serif); }
.social { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: clamp(16px, 3.4vh, 28px); font-size: 0.88rem; }
.social a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-weight: 600; }
.social a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.social svg { width: 16px; height: 16px; fill: currentColor; }
.home-work { align-self: center; }
.home-work .worklist { margin-top: 0; }

/* ---------- Work ---------- */
#v-work { display: flex; flex-direction: column; }
.worklist { list-style: none; margin-top: clamp(14px, 3vh, 28px); flex: 1; min-height: 0; display: grid; grid-template-rows: repeat(4, 1fr); border-bottom: 2px solid var(--ink); }
.worklist li { border-top: 2px solid var(--ink); min-height: 0; }
.worklist a { position: relative; display: grid; grid-template-columns: 2.6rem 1fr auto 4.5rem; align-items: center; gap: 0 12px; height: 100%; padding: 8px 4px; text-decoration: none; overflow: hidden; }
.worklist a::before { content: ""; position: absolute; inset: 0; transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--ease); z-index: 0; }
.worklist .c0 a::before { background: var(--tint); }
.worklist .c1 a::before { background: var(--accent); }
.worklist a:hover::before, .worklist a:focus-visible::before { transform: scaleX(1); }
.worklist a > * { position: relative; z-index: 1; }
.num { font: italic 400 1.3rem var(--serif); }
.t { display: flex; flex-direction: column; transition: transform 0.4s var(--ease); }
.worklist a:hover .t { transform: translateX(14px); }
.t b { font: 800 clamp(1.4rem, 4vh, 2.1rem)/1 var(--sans); letter-spacing: -0.04em; }
.t em { margin-top: 6px; font: italic 400 clamp(0.9rem, 2vh, 1.1rem) var(--serif); color: var(--muted); }
.worklist a:hover .t em { color: var(--ink); }
.d { font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.go { justify-self: end; font-weight: 700; font-size: 0.9rem; opacity: 0.35; transition: opacity 0.2s, transform 0.3s var(--ease); }
.go::after { content: " \2192"; }
.worklist a:hover .go { opacity: 1; transform: translateX(6px); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 clamp(28px, 5vw, 80px); margin-top: clamp(24px, 6vh, 64px); }
.about h3 { font: 700 0.78rem var(--sans); letter-spacing: 0.16em; text-transform: uppercase; display: inline-block; background: linear-gradient(transparent 55%, var(--accent) 55%); margin-bottom: 16px; }
.about .r { font-size: 1.1rem; line-height: 1.4; }
.about .r b { font: 800 1.5rem/1.15 var(--sans); letter-spacing: -0.03em; }
.about .r span { color: var(--muted); font-size: 0.88rem; }
.about .n { margin-top: 12px; color: var(--muted); font-size: 0.95rem; max-width: 26em; }
.skills { display: grid; gap: 14px; }
.skills dt { font: 600 0.74rem var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.skills dd { font: 400 1.05rem/1.4 var(--serif); }
#v-about { display: flex; flex-direction: column; padding-bottom: 0; }
.about { flex: 1; align-content: center; margin-top: clamp(16px, 3.5vh, 48px); padding-bottom: clamp(20px, 3vh, 40px); gap: 0 clamp(28px, 4vw, 72px); }
.band { margin: 0 calc(-1 * clamp(20px, 4vw, 56px)); padding: clamp(18px, 4vh, 36px) clamp(20px, 4vw, 56px); background: var(--accent); border-top: 3px solid var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.band p { font: 800 clamp(1.8rem, 6vh, 3.4rem)/1 var(--sans); letter-spacing: -0.04em; }
.band .social { margin-top: 0; font-size: 0.95rem; }

/* ---------- Project pages ---------- */
.view[id^="v-work-"] { padding: 0; }
.proj { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); height: 100%; }
.p-left { padding: clamp(16px, 3vh, 32px) clamp(20px, 4vw, 56px) clamp(16px, 3vh, 32px); display: flex; flex-direction: column; min-height: 0; }
.back { font-size: 0.85rem; font-weight: 700; text-decoration: none; align-self: flex-start; }
.back::before { content: "\2190  "; }
.back:hover { text-decoration: underline; text-underline-offset: 4px; }
.d-title { margin-top: clamp(10px, 2vh, 20px); font: 800 clamp(2.4rem, 8vh, 5rem)/0.95 var(--sans); letter-spacing: -0.045em; outline: none; }
.d-meta { margin-top: 14px; font: 700 0.75rem var(--sans); letter-spacing: 0.14em; text-transform: uppercase; display: inline-block; align-self: flex-start; background: linear-gradient(transparent 55%, var(--accent) 55%); }
.d-lede { margin-top: clamp(16px, 3vh, 26px); font: italic 400 clamp(1.05rem, 2.4vh, 1.3rem)/1.4 var(--serif); max-width: 28em; }
.figs { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 2.6vh, 28px) 32px; margin-top: clamp(20px, 4vh, 36px); }
.fig b { display: block; font: 800 clamp(1.7rem, 5vh, 3rem)/1 var(--sans); letter-spacing: -0.04em; }
.fig span { display: block; margin-top: 6px; font-size: 0.8rem; color: var(--muted); }
.d-over { margin-bottom: 0; padding-top: clamp(12px, 2vh, 20px); text-wrap: pretty; font-size: clamp(0.95rem, 1.8vh, 1.2rem); max-width: 38em; }
.d-built { margin-top: 10px; font-size: 0.8rem; color: var(--muted); }
.d-built b { color: var(--ink); margin-right: 4px; }

.p-right { position: relative; background: var(--accent); padding: clamp(24px, 5vh, 56px) var(--gutter) clamp(32px, 5vh, 56px); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
#v-work-zumai .p-right, #v-work-ev-charging .p-right { background: var(--tint); }
.stories { list-style: none; position: relative; flex: 1; min-height: 0; }
.story { display: none; }
.story.on { display: block; animation: storyIn 0.55s var(--ease) both; }
@keyframes storyIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
.sn { display: block; font: italic 400 clamp(3rem, 9vh, 6rem)/1 var(--serif); color: transparent; -webkit-text-stroke: 2px var(--ink); }
.story h3 { margin-top: 10px; font: 800 clamp(1.5rem, 4vh, 2.4rem)/1.05 var(--sans); letter-spacing: -0.035em; }
.story p { margin-top: 14px; font-size: clamp(0.95rem, 2vh, 1.1rem); line-height: 1.6; max-width: 32em; }
.ctl { display: flex; align-items: center; gap: 18px; flex: none; padding-top: 16px; border-top: 2px solid var(--ink); font-weight: 700; font-size: 0.9rem; }
.ctl button { padding: 8px 4px; }
.ctl button:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.dots { display: inline-flex; gap: 7px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ink); transition: background 0.2s, transform 0.2s var(--ease); }
.dots i.on { background: var(--ink); transform: scale(1.25); }
.nextp { margin-left: auto; text-decoration: none; }
.nextp::after { content: " \2192"; }
.nextp:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* ---------- Small screens: normal flowing page ---------- */
@media (max-width: 899px), (max-height: 599px) {
  .view { overflow: visible; }
  #v-home { min-height: calc(100vh - var(--nav)); }
  .s1 { width: 60vmin; height: 60vmin; right: -14vmin; top: 2vh; }
  .s2 { right: 8vw; top: 46vh; }
  .s3 { display: none; }
  h1 { font-size: clamp(3.2rem, 18vw, 6rem); }
  .worklist { display: block; }
  .worklist li { min-height: 110px; }
  .worklist a { grid-template-columns: 2.6rem 1fr; padding: 18px 4px; }
  .d, .go { display: none; }
  .about { grid-template-columns: 1fr; gap: 32px; }
  .proj { grid-template-columns: 1fr; height: auto; }
  .d-over { margin-top: 18px; }
  .p-right { min-height: 420px; }
  .nextp { margin-left: 0; width: 100%; }
  .ctl { flex-wrap: wrap; }
}

/* ---------- Toast ---------- */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 999px; font-size: 0.85rem; opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; z-index: 300; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Chat ---------- */
#chat-panel {
  position: fixed; right: 20px; bottom: 20px;
  width: min(400px, calc(100vw - 24px));
  height: min(580px, calc(100dvh - 40px));
  display: flex; flex-direction: column;
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 18px;
  box-shadow: 8px 8px 0 var(--tint);
  overflow: hidden;
  z-index: 200;
  opacity: 0; transform: translateY(16px) scale(0.98); pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease);
}
body.chat-open #chat-panel { opacity: 1; transform: none; pointer-events: auto; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; background: var(--accent); border-bottom: 2px solid var(--ink); flex: none; }
.chat-head .name { font: 800 1.05rem var(--sans); letter-spacing: -0.02em; }
#chat-check { display: flex; justify-content: center; flex: none; }
#chat-check:empty { display: none; }
#chat-close { font-size: 0.8rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
#chat-log { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { font-size: 0.92rem; line-height: 1.5; white-space: pre-line; max-width: 92%; }
.msg.bot { align-self: flex-start; }
.msg.user { align-self: flex-end; text-align: right; background: linear-gradient(transparent 55%, var(--accent) 55%); font-weight: 600; }
.msg.bot b { background: linear-gradient(transparent 60%, var(--accent) 60%); }
.typing { display: inline-flex; gap: 4px; }
.typing span { width: 7px; height: 7px; background: var(--ink); border-radius: 50%; opacity: 0.5; animation: bounce 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 30% { transform: translateY(-5px); opacity: 1; } }
.chips { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0 18px 10px; flex: none; }
.chips button { font-size: 0.8rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.chips button:hover { background: var(--tint); }
.chat-input { display: flex; gap: 10px; padding: 10px 18px 14px; border-top: 2px solid var(--ink); flex: none; }
.chat-input input { flex: 1; border: 0; border-bottom: 2px solid var(--ink); background: transparent; color: var(--ink); padding: 6px 0; font: inherit; font-size: 0.92rem; outline: none; }
.chat-input input:focus { border-color: var(--accent); }
.chat-input button { font-weight: 800; font-size: 0.88rem; }

/* ---------- Print ---------- */
@media print {
  body { height: auto !important; overflow: visible !important; font-size: 11px; background: #fff; }
  .nav, .ask, #chat-panel, #toast, .marquee, .shape { display: none !important; }
  .view { display: block !important; height: auto !important; page-break-after: always; }
  .view[hidden] { display: block !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .view:not([hidden]) [style*="--i"] { opacity: 1; }
}

@media (max-width: 899px) { .hero { display: block; padding: 28px var(--gutter); } .home-work { margin-top: 28px; } .worklist { grid-template-rows: none; } .worklist a { grid-template-columns: 2rem 1fr; padding: 16px 4px; } .worklist .d, .worklist .go { display: none; } }
.home-work .worklist { display: block; flex: none; border-bottom: 1px solid var(--line); }
.home-work .worklist li { border-top: 1px solid var(--line); }
.home-work .worklist a { height: auto; padding: clamp(10px, 2.2vh, 18px) 8px; grid-template-columns: 2.2rem 1fr auto; }
.home-work .worklist .go { display: none; }
.home-work .worklist .t em { margin-top: 3px; font-size: 0.95rem; }
@media (max-width: 899px) { .home-work .worklist a { padding: 16px 4px; } }
.ver { position: fixed; right: var(--gutter); bottom: 6px; z-index: 40; font: 600 0.72rem var(--sans); letter-spacing: 0.08em; color: var(--muted); pointer-events: none; }
@media print { .ver { display: none; } }
.me { display: block; width: clamp(84px, 14vh, 128px); height: clamp(84px, 14vh, 128px); border-radius: 50%; object-fit: cover; object-position: 50% 30%; margin-bottom: clamp(14px, 2.6vh, 24px); }
.about h3.sub { margin-top: 20px; }
.backbtn { display: inline-block; text-decoration: none; font-weight: 700; padding: 10px 22px; border: 2px solid var(--ink); border-radius: 999px; transition: background 0.2s, color 0.2s; }
.backbtn::before { content: "\2190  "; }
.backbtn:hover { background: var(--ink); color: #fff; }
.eyebrow { line-height: 1.7; }
.stack { margin-top: clamp(20px, 3vh, 28px); padding-top: clamp(16px, 3vh, 28px); border-top: 1px solid var(--line); }
.stack-h { font: 700 0.78rem var(--sans); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 12px; }
.stack > div { display: grid; grid-template-columns: 11.5em 1fr; gap: 0 20px; padding: clamp(6px, 1.2vh, 11px) 0; border-top: 1px solid var(--line); font-size: 0.88rem; }
.stack > div dt { font: 600 0.72rem var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.stack > div dd { font: 400 0.95rem var(--serif); }
@media (min-width: 900px) and (max-height: 820px) { .d-over { display: none; } }
.gh { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: 16px; font-size: 0.85rem; font-weight: 700; text-decoration: none; padding: 6px 14px; border: 2px solid var(--ink); border-radius: 999px; transition: background 0.2s, color 0.2s; }
.gh svg { width: 16px; height: 16px; fill: currentColor; }
.gh:hover { background: var(--ink); color: #fff; }
.p-left { overflow-y: auto; }
@media (min-width: 900px) and (max-height: 980px) { .d-over { display: none; } }
@media (min-width: 900px) and (max-width: 1100px) { .d-over { display: none; } }

/* ---------- Spacing consolidation ---------- */
.figs { margin-bottom: clamp(16px, 2.6vh, 28px); row-gap: 0; }
.fig { display: grid; grid-template-rows: subgrid; grid-row: span 2; padding-bottom: clamp(14px, 2.6vh, 28px); min-width: 0; }
.fig b { font-size: clamp(1.7rem, min(5vh, 3.4vw), 3rem); text-wrap: balance; }
.fig span { font-size: clamp(0.8rem, 1.5vh, 1rem); text-wrap: balance; max-width: 18em; }
@media (min-width: 900px) and (max-height: 820px) {
  .figs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(12px, 1.6vw, 28px); }
  .fig { padding-bottom: 0; }
  .fig b { font-size: clamp(1.2rem, 1.9vw, 1.6rem); }
  .fig span { font-size: 0.74rem; }
}
.stack > div { display: grid; grid-template-columns: clamp(8.75rem, 14vh, 11.5rem) minmax(0, 1fr); gap: 0 16px; align-items: baseline; }
.stack > div dt { padding-top: 0; margin: 0; font-size: clamp(0.72rem, 1.3vh, 0.9rem); }
.stack > div dd { margin: 0; line-height: 1.35; font-size: clamp(0.95rem, 1.8vh, 1.2rem); text-wrap: pretty; }
@media (min-width: 900px) and (max-height: 820px) { .stack > div { padding: 7px 0; } }
@media (max-width: 520px) { .stack > div { grid-template-columns: 1fr; gap: 2px 0; } }
.d-title { font-size: clamp(2.4rem, min(8vh, 5.6vw), 5rem); overflow-wrap: break-word; text-wrap: balance; padding-bottom: 0.04em; }
.d-meta { margin-top: clamp(10px, 1.8vh, 18px); }
.gh { margin-top: clamp(12px, 2vh, 20px); }
.d-lede { margin-top: clamp(14px, 2.6vh, 26px); font-size: clamp(1.05rem, 2.4vh, 1.6rem); text-wrap: pretty; }
@media (min-width: 900px) and (min-height: 600px) {
  .d-lede { margin-bottom: clamp(16px, 2.6vh, 28px); }
  .figs { margin-top: auto; }
  .stack { margin-top: auto; }
  .band { padding-bottom: calc(clamp(18px, 4vh, 36px) + 10px); }
}
.stories { display: flex; flex-direction: column; }
.story.on { margin-block: auto; width: 100%; }
.story h3 { font-size: clamp(1.5rem, 4.4vh, 3.2rem); }
.story p { font-size: clamp(0.95rem, 2.1vh, 1.35rem); max-width: 36em; text-wrap: pretty; }
.ctl { flex-wrap: wrap; row-gap: 4px; }
.ctl button { padding: 8px 0; }
.nextp { white-space: nowrap; }
.about h3 { margin-bottom: clamp(10px, 1.6vh, 16px); }
.about .r { text-wrap: balance; }
.about .r b { font-size: clamp(1.5rem, 3vh, 2.2rem); }
.skills { gap: clamp(12px, 1.9vh, 22px); }
.skills dt { margin-bottom: 3px; }
.skills dd { font-size: clamp(1.05rem, 2vh, 1.3rem); line-height: 1.4; }
.about .n { margin-top: clamp(10px, 1.5vh, 16px); }
#v-about .page-head p { margin-top: clamp(8px, 1.5vh, 14px); }
@media (min-width: 900px) {
  .band { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
  .band .social { justify-self: end; }
  .hero { gap: 0 clamp(32px, 4vw, 80px); }
}
.hero { align-content: center; align-items: start; }
.intro, .home-work { align-self: start; }
.eyebrow { line-height: 1.55; text-wrap: balance; }
h1 { font-size: clamp(2.8rem, 9vh, 7rem); }
.tag { font-size: clamp(1.1rem, 2.6vh, 1.8rem); }
.t b { font-size: clamp(1.4rem, 4vh, 2.8rem); }
.t em { text-wrap: balance; }
.home-work .worklist a { padding-block: clamp(10px, 2.6vh, 30px); }
@media (max-width: 899px) { h1 { font-size: clamp(3.2rem, 18vw, 6rem); } .home-work .worklist a { padding-block: 16px; } }
@media (max-width: 899px), (max-height: 599px) {
  .ver { position: static; display: block; text-align: right; padding: 12px var(--gutter) 16px; }
  .d-over { margin-top: 24px; }
  .stack { margin-top: 24px; padding-top: 20px; }
  .about { gap: 36px; margin-top: clamp(24px, 4vh, 40px); padding-bottom: 36px; }
  .about h3.sub { margin-top: 36px; }
  .about > div > :last-child { margin-bottom: 0; }
  .band { margin-top: 0; }
}
/* final fit guards: the overview paragraph duplicates the lede, so drop it unless there is plenty of height */
@media (min-width: 900px) and (max-height: 1199px) { .d-over { display: none; } }
@media (min-width: 900px) and (max-width: 1100px) { .stack > div { padding: 6px 0; } .stack > div dd { font-size: 0.95rem; line-height: 1.3; } .figs { margin-bottom: 8px; } .d-lede { font-size: 1.05rem; } .stack { padding-top: 14px; margin-top: 14px; } }
@media (min-width: 900px) and (max-height: 900px) { .stack > div { padding: 5px 0; } }
.backbtn { flex: none; align-self: center; width: auto; }
@media (max-width: 899px) { .ctl { margin-top: 24px; } .p-right { padding-bottom: clamp(32px, 6vh, 48px); } }
.band .backbtn { justify-self: start; }

.stories { flex: none; }
.shots { position: relative; flex: 1 1 0; min-height: 0; margin: clamp(16px, 3vh, 28px) 0; }
.shots img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; opacity: 0; transition: opacity 0.4s var(--ease); }
.shots img.on { opacity: 1; }
#v-work-pidash .shots img { object-fit: contain; }
@media (max-width: 899px) { .shots { flex: none; height: 260px; } }
@media (min-width: 900px) and (max-height: 700px) { .shots { display: none; } }
#v-work-sarraficars .shots img, #v-work-zumai .shots img, #v-work-schoolcenter .shots img { object-fit: contain; object-position: 50% 0; border-radius: 12px; }
.shots img { cursor: zoom-in; }
#lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(20, 35, 63, 0.88); display: flex; align-items: center; justify-content: center; padding: clamp(16px, 4vw, 48px); cursor: zoom-out; }
#lightbox[hidden] { display: none; }
#lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; background: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4); }
.p-right.noshot .shots { display: none; }
.p-right.noshot .stories { flex: 1 1 0; display: flex; flex-direction: column; }
.p-right.noshot .story.on { margin-block: auto; }
.credits { flex: none; margin: 0 0 10px; font-size: 0.68rem; line-height: 1.4; color: var(--muted); }
.credits a { color: inherit; text-underline-offset: 2px; }
@media (max-height: 760px) { .credits { display: none; } }
