/* =========================================================================
   Josh MacDonald
   Plain gallery-white system. The photographs are the design.
   One sans typeface, black on white, quiet text links, metadata captions.
   No accent colour, no ornament, no copy.
   ========================================================================= */

:root {
  --bg:     #ffffff;
  --ink:    #111110;
  --muted:  #7c7a74;
  --line:   rgba(0, 0, 0, 0.12);
  --sans:   "Helvetica Neue", Helvetica, Arial, -apple-system, system-ui, sans-serif;
  --gutter: clamp(1.15rem, 5vw, 4.5rem);
  --head:   58px;
  /* --tabs-h: height of the Motion page's Cinematography/Aerials bar when it
     becomes a fixed bar pinned to the bottom of the screen — mobile only
     (see the max-width: 720px block below). Zero on desktop, where the bar
     lives in the header's normal flow and reserves no extra space. */
  --tabs-h: 0px;
  /* Max width of the full-bleed Motion viewer. Below this the video scales
     with the window (flush, no borders); above it the video is capped and
     centred with page-coloured borders left/right. 1600px = full-bleed on
     13"/14" MacBook Pro, a slight frame on 16", contained on big monitors. */
  --viewer-max: 1600px;
}

* { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--bg); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* caption — the only text near the work */
.cap {
  display: flex; gap: 1.2rem; justify-content: space-between; flex-wrap: wrap;
  font-size: 0.78rem; letter-spacing: 0.01em; color: var(--muted);
  padding-top: 0.7rem;
}
.cap .t { color: var(--ink); }

/* =========================================================================
   Header — name left, three disciplines, About/Contact quiet at the side
   ========================================================================= */

.site-head {
  position: sticky; top: 0; z-index: 50;
  min-height: var(--head);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 2rem;
  padding: 0 var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.wordmark { font-size: 1.2rem; font-weight: 700; letter-spacing: 0.01em; }
/* pages without a centred subnav: push the nav group to the right edge */
.site-head > .nav-main:first-of-type { margin-left: auto; }

/* Motion sub-tabs (Cinematography / Aerials) sit in the top bar, centred
   between the wordmark on the left and the discipline nav on the right.
   Below 720px this switches to a fixed bottom bar instead — see the mobile
   override further down, which also brings --tabs-h to life. */
.subnav {
  margin: 0 auto;                       /* centre in the space between the two ends */
  display: flex; gap: 1.6rem; align-items: center;
}
.subnav button {
  font-family: var(--sans); font-size: 0.95rem; color: var(--muted);
  background: none; border: 0; padding: 0 0 3px; cursor: pointer;
  border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.subnav button:hover { color: var(--ink); }
.subnav button.active { color: var(--ink); border-color: var(--ink); }

.nav-main { display: flex; gap: clamp(1rem, 3vw, 2.2rem); flex-wrap: nowrap; }
.nav-main a {
  font-size: 0.95rem; color: var(--ink); white-space: nowrap;
  padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav-main a:hover, .nav-main a[aria-current="page"] { border-color: var(--ink); }

.nav-aux {
  display: flex; gap: 1rem; padding-left: 1.4rem; border-left: 1px solid var(--line);
  white-space: nowrap;
}
.nav-aux a { font-size: 0.8rem; color: var(--muted); transition: color .2s; }
.nav-aux a:hover, .nav-aux a[aria-current="page"] { color: var(--ink); }

/* -------------------------------------------------------------------------
   Responsive priority as the header narrows: text never wraps mid-item —
   whole groups drop out instead, least important first.
     1. About/Contact (lowest priority) leave the header entirely — every
        page's .foot footer already carries those same links, so this just
        lets the footer serve as their "bottom of the page" home.
     2. Motion/Stills/Art & Installation stay beside the wordmark all the way
        down to phone widths (sized down, not stacked) — a custom two-row
        mobile header, not just a shrunk desktop one.
   ------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .nav-aux { display: none; }
}
@media (max-width: 720px) {
  .site-head { padding: 0.6rem var(--gutter); gap: 0.4rem 1rem; }
  /* Motion categories drop out of the header and lock to a fixed bar at the
     very bottom of the screen: the page (and the focused viewer) scroll
     behind it, it never moves, and it stays visible even with a clip open.
     --tabs-h (script.js measures it live, same as --head) lets the wall,
     the viewer, and its video sizing all clear it correctly. */
  .subnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    margin: 0;
    justify-content: center;
    padding: 0.9rem var(--gutter);
    background: var(--bg); border-top: 1px solid var(--line);
  }
  :root { --tabs-h: 58px; } /* fallback before script.js measures the real height */
}
@media (max-width: 480px) {
  .site-head { padding: 0.55rem 0.85rem; }
  .wordmark { font-size: 0.88rem; }
  .nav-main { gap: clamp(0.4rem, 2.4vw, 0.7rem); font-size: 0.72rem; }
  /* the bottom Motion-categories bar tightens up a little on phones too */
  .subnav { gap: 1.1rem; padding: 0.75rem var(--gutter); }
  .subnav button { font-size: 0.88rem; }
}

/* =========================================================================
   Splash — three disciplines over a background that wakes on hover
   The categories are the whole page. Hovering one fades a full-screen
   background to 25%: a random still (Stills / Art) or a self-shot reel
   from a random point (Motion). A tall, oversized "|" divides the words.
   ========================================================================= */

.splash-page { overflow: hidden; }

.splash-bg { position: fixed; inset: 0; z-index: 0; background: var(--bg); }
.splash-video, .splash-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .7s ease;
}
.splash-bg.show-video .splash-video,
.splash-bg.show-img   .splash-img { opacity: 0.25; }
/* a few stills carry a baked-in white border — oversize to crop it away */
.splash-bg.zoom .splash-img { transform: scale(1.08); }

.splash-top {
  position: fixed; z-index: 2; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--head); padding: 0 var(--gutter);
}
.splash-aux { display: flex; gap: 1rem; }
.splash-aux a { font-size: 0.8rem; color: var(--muted); transition: color .2s; }
.splash-aux a:hover { color: var(--ink); }

.splash {
  position: relative; z-index: 1;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: var(--head) var(--gutter);
}
.splash-nav {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(0.3rem, 1.5vw, 1.1rem);
}
.splash-nav a {
  font-size: clamp(1.5rem, 4.5vw, 2.9rem);
  font-weight: 400; letter-spacing: 0.005em; line-height: 1;
  transition: opacity .3s ease;
  /* enlarge the hover target so the background triggers as easily as the
     word-dimming does (which fires over the whole nav row) */
  display: inline-block; padding: 0.5em 0.7em;
}
/* focus the hovered word; quiet the others */
.splash-nav:hover a { opacity: 0.4; }
.splash-nav a:hover, .splash-nav a:focus-visible { opacity: 1; }

.bar {
  flex: 0 0 auto;
  width: 1px; height: clamp(3rem, 8vw, 5rem);
  background: var(--ink); opacity: 0.28;
}

@media (max-width: 760px) {
  .splash-nav { flex-direction: column; gap: clamp(1rem, 4vw, 1.8rem); }
  .bar { width: clamp(2.5rem, 30vw, 4rem); height: 1px; }
}

/* =========================================================================
   Page scaffolding
   ========================================================================= */

.page { padding: clamp(2rem, 5vw, 4rem) var(--gutter) clamp(3rem, 6vw, 5rem); }
.page > h1 {
  font-size: 1.05rem; font-weight: 500; margin: 0 0 2.5rem; letter-spacing: 0.01em;
}
.sub-label {
  font-size: 0.8rem; color: var(--muted); margin: clamp(2.5rem,6vw,4rem) 0 1.2rem;
  padding-bottom: 0.7rem; border-bottom: 1px solid var(--line);
}
.sub-label:first-of-type { margin-top: 0; }

/* =========================================================================
   Motion — pure grid per panel; a clicked tile opens the focused viewer
   ========================================================================= */

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* embedded reel (YouTube), 16:9, sized to fit on screen and centred */
.reel {
  width: 100%;
  /* cap width from the available height so the 16:9 box never exceeds the viewport */
  max-width: calc((100svh - var(--head) - 8rem) * 16 / 9);
  margin: clamp(1rem, 3vw, 2rem) auto 0;
  padding: 0 var(--gutter);
  background: transparent;
}
.reel { margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.reel .frame16 { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.reel iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reel .frame16 > img,
.reel .frame16 > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-play {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 2.4rem; opacity: 0.9; pointer-events: none;
}
.reel figcaption {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-top: 0.7rem; font-size: 0.78rem; color: var(--muted);
}
.reel figcaption .t { color: var(--ink); }

/* -------------------------------------------------------------------------
   Motion viewer box — shared by the aerial reel hero and the focused overlay.
   Width caps to whichever is smaller: the aesthetic max, or the width that
   keeps the clip's height within the available viewport. --ar is the clip's
   aspect ratio as a number (set inline + refined by JS on loadedmetadata).
   ------------------------------------------------------------------------- */
.viewer {
  position: relative;
  width: 100%;
  max-width: min(var(--viewer-max), calc((100svh - var(--head)) * 0.86 * var(--ar, 1.7778)));
  margin-inline: auto;
  background: #000;
  line-height: 0;
}
.viewer-video, .reel-video {
  display: block;
  width: 100%;
  aspect-ratio: var(--ar, 1.7778);
  object-fit: cover;
  background: #000;
  cursor: pointer;
}

/* Aerial reel hero — a full-size clip that plays at the top of the grid */
.reel-hero { margin: 40px 0; }

/* small custom mute toggle, bottom-right of the reel — hidden until the
   pointer moves, fades out again once it goes still (same rhythm as the
   focused viewer's chrome) */
.reel-mute {
  position: absolute; right: clamp(0.6rem, 2vw, 1.1rem); bottom: clamp(0.6rem, 2vw, 1.1rem);
  z-index: 2; width: 2.4rem; height: 2.4rem; padding: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(0,0,0,0.4); border: 0; border-radius: 50%;
  cursor: pointer; backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity .6s ease, background .2s;
}
.reel-hero.chrome .reel-mute { opacity: 1; pointer-events: auto; }
.reel-mute:hover { background: rgba(0,0,0,0.6); }
.reel-mute svg { width: 1.2rem; height: 1.2rem; }
.reel-mute .icon-off { display: none; }
.reel-mute.muted .icon-on  { display: none; }
.reel-mute.muted .icon-off { display: block; }
@media (prefers-reduced-motion: reduce) { .reel-mute { opacity: 1; pointer-events: auto; } }
/* no hover to reveal it with — just leave it up on touch */
@media (hover: none) { .reel-mute { opacity: 1; pointer-events: auto; } }

/* -------------------------------------------------------------------------
   Focused viewer overlay. Pinned under the header; the grid stays put behind
   it (so the reader's scroll position is preserved for the return). A clicked
   tile grows into .viewer while the white curtain fades in over the grid.
   ------------------------------------------------------------------------- */
.viewer-stage {
  /* stop above the fixed Cinematography/Aerials bar (rather than running the
     full height and just padding its content) so nothing can end up
     scrolled-to-the-bottom-yet-still-hidden underneath it */
  position: fixed; left: 0; right: 0; top: var(--head); bottom: var(--tabs-h); z-index: 40;
  overflow-y: auto;
}
.viewer-stage[hidden] { display: none; }
/* freeze the grid behind the overlay so the reader returns to the same place */
body.viewer-open { overflow: hidden; }

/* white curtain that fades in over the sliding grid */
.viewer-curtain {
  position: fixed; left: 0; right: 0; top: var(--head); bottom: var(--tabs-h); z-index: -1;
  background: var(--bg); opacity: 0; transition: opacity .5s ease;
}
.viewer-stage.open .viewer-curtain { opacity: 1; }

.viewer-shell {
  min-height: 100%;
  display: flex; flex-direction: column; align-items: center;
  padding-top: clamp(1rem, 3vw, 2rem);      /* small breathing gap under the header */
  /* .viewer-stage itself already stops above the fixed bar (see below), so
     this is just normal breathing room, not bar clearance */
  padding-bottom: clamp(2rem, 6vw, 4rem);
}
/* touch: the video sits right near the top of a tall phone screen, so give
   it generous breathing room above (the back control lives at the BOTTOM
   here instead — see .viewer-back's touch override below) */
@media (hover: none) {
  .viewer-shell { padding-top: clamp(4rem, 18vw, 5.5rem); }
}
/* both the video box and the caption below share this width formula (--ar is
   set on .viewer-shell by JS) so the caption's right edge lines up with the
   video's right edge instead of the page's */
.viewer-stage .viewer, .viewer-info {
  max-width: min(var(--viewer-max), calc((100svh - var(--head) - var(--tabs-h)) * 0.828 * var(--ar, 1.7778)));
}
.viewer-stage .viewer {
  transform-origin: top left;
  will-change: transform;
}
/* while entering/leaving, the viewer FLIPs between the tile rect and its
   resting place; JS sets the transform and toggles this transition */
.viewer-stage.animating .viewer { transition: transform .5s cubic-bezier(.4,0,.2,1); }

/* title + description sit bottom-right, close under the video, with a small
   inset from its right edge so the text isn't flush against it */
.viewer-info {
  width: 100%;
  padding: clamp(0.5rem, 1.5vw, 0.9rem) clamp(0.6rem, 2vw, 1.2rem) 0 0;
  opacity: 0; transition: opacity .4s ease .1s;
  display: flex; flex-direction: column; align-items: flex-end;
}
/* the caption waits for the FLIP to settle, then just fades in on its own —
   not tied to .open, which applies the moment the FLIP starts */
.viewer-stage.info-in .viewer-info { opacity: 1; }
.viewer-title {
  font-size: 1.05rem; font-weight: 500; letter-spacing: 0.01em; margin: 0 0 0.5rem;
  text-align: right;
}
.viewer-desc {
  font-size: 0.9rem; color: var(--muted); line-height: 1.6;
  max-width: 46rem; white-space: pre-line;   /* keep the line breaks typed in Studio */
  text-align: right;
}
.viewer-desc:empty { display: none; }

/* narrow screens: right-aligned prose gets ragged-left, which reads worse
   for multi-line body copy — switch to plain left-aligned, full width */
@media (max-width: 640px) {
  .viewer-info { align-items: flex-start; padding: clamp(0.5rem, 1.5vw, 0.9rem) clamp(0.6rem, 4vw, 1.2rem) 0; }
  .viewer-title, .viewer-desc { text-align: left; }
}

/* Back control — large chevron, vertically centred on the VIDEO's own height
   (script.js sets `top` to the video box's vertical midpoint in px whenever
   it opens, resizes, or the clip's aspect changes — the value below is just
   the pre-JS fallback). Timing depends on where the pointer is (see
   script.js): over the video it fades after a couple of idle seconds, left
   of the video (its own gutter) it stays up, right of it or below it drops
   at once. */
.viewer-back {
  position: fixed;
  top: calc(var(--head) + (100svh - var(--head)) / 2); transform: translateY(-50%);
  left: clamp(0.8rem, 3vw, 2rem); z-index: 3;
  width: 4rem; height: 4rem; padding: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  background: rgba(255,255,255,0.72); border: 0; border-radius: 50%;
  cursor: pointer; backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .6s ease, background .2s;
}
.viewer-back svg { width: 1.9rem; height: 1.9rem; }
.viewer-stage.chrome .viewer-back { opacity: 1; pointer-events: auto; }
.viewer-back:hover { background: rgba(255,255,255,0.95); }

/* touch: the video always sits near the top of a phone screen, so the
   chevron moves to the very BOTTOM of the screen instead of floating over
   it — fixed, centred, pointing down (collapsing back into the grid). It's
   deliberately independent of .chrome/the native controls' fade cycle here:
   it's the only way back now, so it stays up the whole time the viewer is
   open rather than flickering with them (see .info-in below). */
@media (hover: none) {
  .viewer-back {
    position: fixed; top: auto; bottom: calc(var(--tabs-h) + clamp(0.7rem, 3vw, 1.1rem));
    left: 50%; transform: translateX(-50%);
    width: 2.8rem; height: 2.8rem;
  }
  .viewer-back svg { width: 1.5rem; height: 1.5rem; transform: rotate(-90deg); }
  .viewer-stage.info-in .viewer-back { opacity: 1; pointer-events: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .viewer-back { opacity: 1; pointer-events: auto; }
}

/* =========================================================================
   Motion — gapless thumbnail wall (Sesler); video on hover
   ========================================================================= */

/* clear the fixed bottom Cinematography/Aerials bar so it never covers the
   last row of tiles (or, scrolled further, the page footer) */
body.motion-page main { padding-bottom: var(--tabs-h); }

.wall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
@media (max-width: 900px) { .wall { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .wall { grid-template-columns: 1fr; } }

.wall-tile {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: #ececea; cursor: pointer; border: 0; padding: 0;
}
.wall-tile img, .wall-tile video, .wall-tile iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity .4s;
}
.wall-tile iframe { border: 0; }
/* youtube previews are wider than the frame — scale up to hide letterbox/UI */
.wall-tile iframe { width: 300%; height: 300%; left: -100%; top: -100%; pointer-events: none; }
.wall-tile video { opacity: 0; }
.wall-tile.playing video { opacity: 1; }

/* Opening a tile splits the grid: rows above slide up out of view, rows below
   slide down, and the rest (incl. same-row siblings) fade to white. */
.wall.splitting .wall-tile { transition: transform .55s cubic-bezier(.4,0,.2,1), opacity .5s ease; }
.wall-tile.tile-up   { transform: translateY(-100vh); opacity: 0; }
.wall-tile.tile-down { transform: translateY(100vh);  opacity: 0; }
.wall-tile.tile-fade { opacity: 0; }
.wall-tile .meta {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 0.8rem 0.9rem; text-align: left;
  display: flex; justify-content: space-between; gap: 1rem;
  color: #fff; font-size: 0.76rem;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  opacity: 0; transition: opacity .3s;
}
.wall-tile:hover .meta, .wall-tile:focus-visible .meta { opacity: 1; }
.wall-tile .meta .m { color: rgba(255,255,255,0.75); }
/* no hover to reveal it with — the caption just stays on over the poster */
@media (hover: none) { .wall-tile .meta { opacity: 1; } }

/* =========================================================================
   Stills — one image at a time. Snap carousel; neighbours off-screen until
   you scroll. Left project index hides on scroll, returns at the left edge.
   ========================================================================= */

.stills { position: relative; height: calc(100svh - var(--head)); overflow: hidden; }

.track {
  display: flex; height: 100%;
  overflow: hidden;                 /* no native scroll — movement is JS-driven */
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  transition: opacity .28s ease;    /* crossfade when jumping between series */
}
.track::-webkit-scrollbar { display: none; }
.track.fading { opacity: 0; }

.slide {
  flex: 0 0 100%; height: 100%;
  scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 0; margin: 0;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(2.5rem, 12vw, 12rem);
}
/* bias the image upward: divide the free vertical space 7:13 (top:bottom) so
   the gap above the image is 70% of a centred layout — i.e. 30% less. */
.slide::before { content: ""; flex: 7 0 0; }
.slide::after  { content: ""; flex: 13 0 0; }
.slide img { max-height: 94%; max-width: 100%; width: auto; object-fit: contain; }
.slide .cap { padding-top: 0; justify-content: center; }

/* prev / next click zones in the side whitespace */
.edge {
  position: absolute; top: 0; bottom: 0; width: clamp(56px, 12vw, 180px);
  border: 0; background: transparent; cursor: pointer; z-index: 5;
  display: flex; align-items: center;
  color: var(--muted); font-size: 1.5rem; line-height: 1;
  opacity: 0; transition: opacity .25s, color .2s;
}
.edge.prev { left: 0; justify-content: flex-start; padding-left: 1.4rem; }
.edge.next { right: 0; justify-content: flex-end; padding-right: 1.4rem; }
.stills:hover .edge { opacity: 1; }
.edge:hover { color: var(--ink); }
@media (hover: none) { .edge { opacity: 1; } }

/* left project index */
.stills-index {
  position: absolute; left: var(--gutter); top: clamp(1.5rem, 4vw, 2.5rem);
  z-index: 8; transition: opacity .3s, transform .3s;
}
.stills-index.hidden { opacity: 0; transform: translateX(-8px); pointer-events: none; }
.stills-index ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.stills-index a { font-size: 0.82rem; color: var(--muted); transition: color .2s; }
.stills-index a:hover, .stills-index a.active { color: var(--ink); }

@media (max-width: 760px) {
  /* on small screens fall back to a simple vertical scroll of images */
  .stills { height: auto; overflow: visible; }
  .track { flex-direction: column; overflow: visible; height: auto; }
  .slide { height: auto; padding: 1.5rem var(--gutter); }
  .slide img { max-height: none; width: 100%; }
  .edge { display: none; }
  .stills-index { position: static; margin: 0 0 1.5rem; }
  .stills-index.hidden { opacity: 1; transform: none; pointer-events: auto; }
}

/* =========================================================================
   Art & Installation — permanent left index (never hides), one project shown
   at a time, vertical scroll through a free sequence of image / text blocks.
   ========================================================================= */

.art {
  display: grid;
  grid-template-columns: minmax(150px, 210px) 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding: clamp(2rem, 5vw, 4rem) var(--gutter) clamp(3rem, 6vw, 5rem);
  align-items: start;
}

/* left index — sticky so it stays visible while a project scrolls */
.art-index { position: sticky; top: calc(var(--head) + clamp(1.5rem, 5vw, 4rem)); align-self: start; }
.art-group + .art-group { margin-top: 1.8rem; }
.art-index-head {
  font-size: 0.8rem; color: var(--muted); margin: 0 0 1.1rem;
  padding-bottom: 0.7rem; border-bottom: 1px solid var(--line);
}
.art-index ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.art-index a {
  display: grid; grid-template-columns: 2.9rem 1fr; gap: 0.4rem;
  font-size: 0.85rem; color: var(--muted); transition: color .2s;
}
.art-index a .yr { color: var(--muted); }
.art-index a:hover, .art-index a.active { color: var(--ink); }
.art-index a.active .yr { color: var(--ink); }

/* stage — one project visible at a time */
.art-project { display: none; max-width: 900px; }
.art-project.active { display: block; }
.art-head { margin: 0 0 clamp(1.5rem, 4vw, 2.5rem); }
.art-head h1 { font-size: 1.15rem; font-weight: 500; letter-spacing: 0.01em; margin: 0 0 0.3rem; }
.art-meta { font-size: 0.8rem; color: var(--muted); margin: 0; }

/* blocks — images and text, in whatever order they appear */
.art-block { margin: 0 0 clamp(1.6rem, 4vw, 3rem); }
.art-image img { width: 100%; }
.art-image .cap { padding-top: 0.6rem; }
.art-video video { width: 100%; display: block; background: #000; aspect-ratio: 16 / 9; }
.art-video .cap { padding-top: 0.6rem; }
.art-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.art-duo .cap { grid-column: 1 / -1; }
.art-text { max-width: 46rem; }
.art-text p { margin: 0 0 1rem; }
.art-text p:last-child { margin-bottom: 0; }

@media (max-width: 720px) {
  .art { grid-template-columns: 1fr; gap: 1.5rem; }
  .art-index { position: static; }
  .art-duo { grid-template-columns: 1fr; }
}

/* =========================================================================
   About — minimal facts
   ========================================================================= */

.about { max-width: 46rem; }
.about p { margin: 0 0 1.1rem; }
.cv { list-style: none; margin: 2rem 0 0; padding: 0; }
.cv li {
  display: grid; grid-template-columns: 7rem 1fr; gap: 1.2rem;
  padding: 0.7rem 0; border-top: 1px solid var(--line); font-size: 0.95rem;
}
.cv li .yr { color: var(--muted); font-size: 0.85rem; }
@media (max-width: 480px) { .cv li { grid-template-columns: 1fr; gap: 0.2rem; } }

/* =========================================================================
   Contact — form only
   ========================================================================= */

.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 2rem;
  max-width: 640px; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field.full { grid-column: 1 / -1; }
@media (max-width: 540px) { .contact-form { grid-template-columns: 1fr; } }
.field label { font-size: 0.78rem; color: var(--muted); }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 0.5rem 0; border-radius: 0; appearance: none;
}
.field textarea { resize: vertical; min-height: 5rem; line-height: 1.5; }
.field :focus { outline: none; border-color: var(--ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.submit {
  grid-column: 1 / -1; justify-self: start;
  font-size: 0.9rem; color: var(--bg); background: var(--ink);
  border: 1px solid var(--ink); cursor: pointer; padding: 0.75em 1.6em;
  transition: background .2s, color .2s;
}
.submit:hover { background: var(--bg); color: var(--ink); }

/* =========================================================================
   Footer — links only
   ========================================================================= */

.foot {
  border-top: 1px solid var(--line); margin-top: clamp(3rem, 8vw, 6rem);
  padding: 1.6rem var(--gutter);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem 2rem;
  font-size: 0.78rem; color: var(--muted);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 0.8rem 1.5rem; }
.foot a { color: var(--muted); transition: color .2s; }
.foot a:hover { color: var(--ink); }
