@import url("https://fonts.googleapis.com/css2?family=Aldrich&family=Audiowide&family=Chakra+Petch:wght@400;500;600&family=Exo+2:wght@400;500;600;700&family=Major+Mono+Display&family=Michroma&family=Oxanium:wght@400;500;600;700&family=Orbitron:wght@400;500;700&family=Rajdhani:wght@400;500;600;700&family=Share+Tech+Mono&family=Saira+Semi+Condensed:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  /* Warm beige base; muted terracotta orange accents (was teal / neon orange) */
  --bg: #efe3d1;
  --surface: #f9efdf;
  --surface-muted: #f6ebdc;
  --text: #22170f;
  --text-muted: #5c4638;
  --primary: #b85c28;
  --accent: #de7b34;
  --subaccent: #b9632e;
  --line: #bf6a33;
  --border: #7f583e;
  --shadow-deep: #7a543a;
  --shadow: 6px 6px 0 var(--shadow-deep);
  --ring: #c4703a;
  --hover-surface: #fff4e3;
  --body-font: "Chakra Petch", "Eurostile", "Microgramma D Extended", "Square 721 BT", "Bank Gothic", "Trebuchet MS", sans-serif;
  --headline-font: "Chakra Petch", "Eurostile", "Microgramma D Extended", "Square 721 BT", "Bank Gothic", "Trebuchet MS", sans-serif;
  --radius: 10px;
  --section-space: 70px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html { scroll-padding-top: 91px; }

body {
  margin: 0;
  font-family: var(--body-font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  letter-spacing: -0.01em;
}

* {
  font-family: var(--body-font);
}

/* Apply the custom cursor to the whole page */
html,
body {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 30 30'%3E%3Cpath d='M3 2 L3 24 L9 19 L13 28 L17 26 L13 16 L22 16 Z' fill='%234a3018'/%3E%3Cpath d='M3 2 L22 16' stroke='%23fff8e7' stroke-width='1.4'/%3E%3C/svg%3E") 2 2, auto;
}

/* Force clickable elements to use the SAME cursor instead of the finger */
a, 
button, 
.btn, 
.card, 
.hero-slideshow-dot, 
.resume-toggle,
label,
input,
select {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 30 30'%3E%3Cpath d='M3 2 L3 24 L9 19 L13 28 L17 26 L13 16 L22 16 Z' fill='%234a3018'/%3E%3Cpath d='M3 2 L22 16' stroke='%23fff8e7' stroke-width='1.4'/%3E%3C/svg%3E") 2 2, auto !important;
}

/* --- CHUNKY PRESS (nav / hero slide / controls only — not body text links) --- */
.brand,
.nav-links a,
.hero-slide-link,
button,
.btn,
.card,
.hero-slideshow-dot,
.resume-toggle {
  transition: transform 85ms linear, box-shadow 85ms linear, background 120ms linear !important;
}
.brand:active,
.nav-links a:active,
.hero-slide-link:active,
button:active,
.btn:active,
.card:active,
.hero-slideshow-dot:active,
.resume-toggle:active {
  transform: translate(3px, 3px) !important;
  box-shadow: 3px 3px 0 var(--shadow-deep) !important;
}
/* ------------------------------------------- */

a,
button,
input,
label {
  cursor: pointer;
}

a { color: inherit; text-decoration: none; }
.container { 
  width: min(1200px, 80%); /* Changed from 1320px and 96% */
  margin: 0 auto; 
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-wrap { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  min-height: 90px; 
  gap: 16px; 
}

.brand { 
  font-size: 1.6rem; 
  font-weight: 800; 
  letter-spacing: 0.2px; 
  font-family: var(--headline-font);
  display: flex;
  align-items: center;
  padding: 6px 14px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  transition: all 0.1s ease-in-out;
}

.brand:hover {
  border-color: var(--border);
  background: var(--hover-surface);
  color: var(--primary);
}

.brand::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
  margin-left: 10px;
  background: var(--accent);
  box-shadow: 2px 2px 0 var(--border); 
}

/* --- UPDATED LARGER NAV BAR --- */
.nav-links { 
  display: flex; 
  gap: 30px;                   /* More space between links */
  color: var(--text-muted); 
  font-weight: 700;            /* Bolder for better visibility */
  font-size: 1.2rem;           /* Increased from 0.9rem */
  font-family: var(--headline-font); 
  align-items: center;
}

.nav-links a {
  padding: 6px 12px;           /* More "button-like" padding */
  border: 2px solid transparent; /* Set to 2px to match your new style */
  border-radius: var(--radius);
  transition: all 0.1s ease-in-out;
}

.nav-links a:hover {
  color: var(--primary);
  border-color: var(--border);
  background: var(--hover-surface);
}

.menu-button {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.hero { padding: var(--section-space) 0; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "about featured";
  gap: 32px;
  align-items: stretch;
  direction: ltr;
  unicode-bidi: isolate;
}
.hero-copy.hero-panel {
  grid-area: about;
  overflow: visible;
}

.hero-showcase.hero-panel {
  grid-area: featured;
}
.hero-grid > .hero-panel {
  min-height: 0;
  margin: 0;
  width: 100%;
}
.hero-panel {
  border: 1px solid var(--border);
  padding: 16px 18px;
  background: var(--surface);
  position: relative;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.hero-showcase {
  width: 100%;
}

/* Section labels — subaccent; hero panels share one optical line */
.eyebrow {
  margin: 0 0 10px;
  padding: 0;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
  font-family: var(--headline-font);
}
.hero-panel > .eyebrow:first-child {
  flex-shrink: 0;
}

h1 { margin: 0; font-size: clamp(2rem, 3.8vw, 3.2rem); line-height: 1.16; letter-spacing: -0.01em; font-family: var(--headline-font); }

.hero-peek {
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: min(132px, 34vw);
  aspect-ratio: 1;
  z-index: 5;
  pointer-events: none;
  transition:
    transform 0.45s cubic-bezier(0.33, 1.15, 0.52, 1),
    opacity 0.28s ease;
  transform: translateX(calc(-100% - 18px));
  opacity: 0;
}
.hero-peek.is-out {
  transform: translateX(-6px);
  opacity: 1;
}
.hero-peek img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #c49a72;
  box-shadow: 0 6px 0 rgba(90, 58, 38, 0.18);
  display: block;
}

.hero-name-hit {
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  color: var(--subaccent);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  transition: color 0.15s ease;
}
.hero-name-hit:hover {
  color: #7a4f32;
}
.hero-name-hit:active {
  color: var(--subaccent);
}
.hero-name-hit:focus {
  outline: none;
}
.hero-name-hit:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
  border-radius: 2px;
}

.hero-copy p { max-width: 60ch; margin-top: 18px; color: var(--text-muted); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}

.hero-slideshow {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 12px;
  width: 100%;
}
.hero-slideshow-viewport {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 320px;
  height: clamp(280px, 36vw, 420px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: #ead5bd;
}
.hero-slide-link {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.hero-slide-link:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.hero-slide-media {
  position: relative;
  flex: 1 1 auto;
  min-height: 220px;
  background: linear-gradient(145deg, #f0dcc4 0%, #e2c4a4 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-slide-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(34, 23, 15, 0) 58%, rgba(34, 23, 15, 0.16) 100%);
  pointer-events: none;
}
.hero-slide-placeholder {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #6b4a32;
  text-transform: uppercase;
  font-family: var(--headline-font);
}
.hero-slide-media.has-photo .hero-slide-placeholder {
  display: none;
}
.hero-slide-meta {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.hero-slide-title {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--headline-font);
  color: var(--text);
}
.hero-slide-cta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--subaccent);
}
.hero-slideshow-controls {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}
.hero-slideshow-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--subaccent);
  border-radius: var(--radius);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 600;
  box-shadow: var(--shadow);
  transform: translate(0, 0);
  transition:
    transform 85ms linear,
    box-shadow 85ms linear,
    background 120ms linear,
    color 120ms linear;
  cursor: pointer;
}
.hero-slideshow-btn:hover {
  background: var(--hover-surface);
  color: var(--subaccent);
}
.hero-slideshow-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--shadow-deep);
}
.hero-slideshow-btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.hero-slideshow-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(280px, 100%);
}
.hero-slideshow-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(176, 92, 42, 0.42);
  background: rgba(200, 110, 58, 0.14);
  padding: 0;
  cursor: pointer;
  box-shadow: none;
  flex-shrink: 0;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    transform 120ms ease;
}
.hero-slideshow-dot:hover {
  background: rgba(200, 110, 58, 0.24);
  border-color: rgba(150, 78, 36, 0.55);
}
.hero-slideshow-dot.is-active {
  background: var(--subaccent);
  border-color: #8f4d24;
  box-shadow: none;
}
.hero-slideshow-dot:active {
  transform: scale(0.92);
}
.hero-slideshow-dot:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slideshow-btn,
  .hero-slideshow-dot {
    transition: none;
  }
  .hero-slideshow-btn:active {
    transform: none;
    box-shadow: var(--shadow);
  }
  .hero-slideshow-dot:active {
    transform: none;
  }
  .project-gallery-frame,
  .project-gallery-frame img {
    transition: none;
  }
  .project-gallery-tile:hover .project-gallery-frame {
    transform: none;
  }
  .project-gallery-tile:active .project-gallery-frame {
    transform: none;
  }
  button.project-hero-main:hover {
    transform: none;
  }
}

.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); padding: 11px 18px; font-weight: 600; box-shadow: var(--shadow); }
.btn-primary { background: var(--primary); color: #f0b078; border: 1px solid var(--border); }
.btn-secondary { background: var(--primary); color: #fff9ee; border: 1px solid var(--border); }

.card, .resume-event, .gallery-item {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.archive-grid .card[id],
.photo-album[id] {
  scroll-margin-top: 96px;
}

.photo-album {
  margin-top: 48px;
}
.photo-album:first-of-type {
  margin-top: 28px;
}
.photo-album-cover {
  margin: 0 0 14px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  background: var(--surface);
  max-width: min(100%, 720px);
}
.photo-album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-album-cover.is-empty {
  display: none;
}
.photo-album h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-family: var(--headline-font);
}

/* Film page — match .project-detail back link spacing */
.film-page .film-page-inner > .project-back {
  margin: 0 0 14px;
}
.film-page .film-page-inner > h1 {
  display: inline-block;
  margin: 0 0 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: #f8e3cf;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  font-size: clamp(1.65rem, 2.5vw, 2.2rem);
  font-family: var(--headline-font);
  letter-spacing: -0.02em;
  font-weight: 700;
}
.film-page-lead {
  margin: 0 0 10px;
  max-width: 52ch;
  line-height: 1.45;
}
.photo-album--showcase {
  margin-top: clamp(28px, 4vw, 40px);
}
.photo-album--showcase:first-of-type {
  margin-top: clamp(28px, 4vw, 40px);
}
/* Single roll page: title is the page h1; grid sits close below the lead */
.film-page-inner > .photo-album--showcase:first-of-type {
  margin-top: clamp(4px, 1.2vw, 12px);
}
.film-album-head {
  margin: 0 0 clamp(18px, 3vw, 28px);
}
.film-album-head h2 {
  display: inline-block;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--border);
  background: #f8e3cf;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  font-size: 1.35rem;
  font-family: var(--headline-font);
}
/* Film page gallery: two columns from small screens so vertical frames pair side by side */
.film-page [data-project-lightbox] .film-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 2.5vw, 28px);
  margin: 0;
  padding: 0;
}
@media (min-width: 520px) {
  .film-page [data-project-lightbox] .film-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.film-page [data-project-lightbox] .project-gallery-tile {
  min-height: 0;
  align-self: start;
}
.film-page [data-project-lightbox] .project-gallery-frame {
  box-shadow: var(--shadow);
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  background: #efe6db;
}
.film-page [data-project-lightbox] .project-gallery-frame img {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: min(72vh, 620px);
  object-fit: contain;
}
@supports not (container-type: inline-size) {
  .film-page [data-project-lightbox] .project-gallery-frame img {
    max-width: 100%;
    max-height: min(560px, 65vw);
  }
}
@media (max-width: 600px) {
  .film-page [data-project-lightbox] .project-gallery-frame img {
    max-height: min(440px, 78vw);
  }
}

.film-archive-grid {
  margin-top: 28px;
}
.film-archive-grid .film-archive-card {
  display: block;
  padding: 12px;
}
.film-archive-grid .film-archive-card .card-image {
  height: auto;
  margin-bottom: 10px;
  line-height: 0;
}
.film-archive-grid .film-archive-card .card-image--photo {
  display: block;
}
.film-archive-grid .film-archive-card .card-image--photo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #efe6db;
}
.film-archive-grid .film-archive-card h3 {
  margin: 0;
}
.film-rolls-heading {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-family: var(--headline-font);
}
.film-rolls-lead {
  margin-top: 0;
  max-width: 62ch;
}
.film-rolls-lead code {
  font-size: 0.9em;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f0ebe4;
  border: 1px solid var(--border);
}
/* Film curator trigger: visually identical to footer text (no link affordance) */
button.muni-curator-hit {
  display: inline;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  cursor: inherit;
  text-decoration: none;
}
button.muni-curator-hit:hover,
button.muni-curator-hit:active {
  color: inherit;
}
button.muni-curator-hit:focus {
  outline: none;
}
button.muni-curator-hit:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.film-tile-shell {
  position: relative;
  min-width: 0;
}
.film-grid--edit .film-tile-shell {
  cursor: grab;
}
.film-grid--edit .film-tile-shell.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}
.film-edit-drag-hint {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 0.7rem;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--text-muted);
  pointer-events: none;
  opacity: 0.85;
}
.film-edit-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--subaccent);
}
.film-edit-remove:hover {
  border-color: #9d6f4b;
  background: #fff9f2;
}
.film-edit-mode .film-page [data-project-lightbox] .project-gallery-tile {
  cursor: default;
}

.film-edit-toolbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2500;
  padding: 12px 16px;
  background: #2a221c;
  color: #f5f1eb;
  border-top: 1px solid #4a3d34;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2);
}
.film-edit-toolbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.film-edit-toolbar-title {
  font-family: var(--headline-font);
  font-weight: 700;
  margin-right: 8px;
}
.film-edit-btn {
  padding: 8px 12px;
  border: 1px solid #6b5a4e;
  border-radius: var(--radius);
  background: #3d332c;
  color: #f5f1eb;
  font-size: 0.88rem;
  cursor: pointer;
}
.film-edit-btn:hover {
  background: #4a3f36;
  border-color: #9d6f4b;
}
.film-edit-btn--ghost {
  background: transparent;
}
.film-edit-btn--danger {
  margin-left: auto;
  border-color: #8b4d4d;
  background: #4a2c2c;
}
.film-edit-btn--danger:hover {
  background: #5c3838;
}
body.film-edit-mode {
  padding-bottom: 72px;
}

/* Homepage film rail — real thumbnails, no captions */
.gallery-item.gallery-item--thumb {
  padding: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  min-height: 0;
  height: auto;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 100ms linear, border-color 100ms linear, box-shadow 100ms linear;
}
.gallery-item--thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-item--thumb:hover {
  transform: translate(-2px, -2px);
  border-color: #9d6f4b;
  box-shadow: 4px 4px 0 var(--shadow-deep);
}
.gallery-item--thumb:focus {
  outline: none;
}
.gallery-item--thumb:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

.resume-link-row { margin: 10px 0 0; }
.resume-shell {
  margin-top: 14px;
  padding: 6px 0;
}

.resume-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 0 12px;
}
.resume-timeline::before {
  content: "";
  position: absolute;
  left: calc(50% - 0.5px);
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
  z-index: 0;
}

.resume-year-group {
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
}
.resume-year-group:last-child {
  margin-bottom: 0;
}

.resume-year-header {
  position: relative;
  min-height: 28px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.resume-year-header span {
  position: relative;
  z-index: 2;
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.85px;
  font-weight: 700;
  font-family: var(--headline-font);
  color: var(--text-muted);
  background: var(--bg);
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  white-space: nowrap;
}

.resume-year-events {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 42px;
  align-items: start;
}

.resume-event {
  position: relative;
  width: 100%;
  align-self: start;
  border-radius: var(--radius);
  padding: 12px 38px 12px 14px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  overflow: hidden;
  z-index: 2;
  box-sizing: border-box;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.resume-event:hover {
  border-color: #9d6f4b;
  background: var(--hover-surface);
  box-shadow: 4px 4px 0 var(--shadow-deep);
}
.resume-event:focus {
  outline: none;
}
.resume-event:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.resume-event--expanded {
  cursor: default;
  grid-column: 1 / -1;
  min-height: auto;
  overflow: visible;
  border-color: var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  z-index: 4;
}
.resume-expand-icon {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  color: var(--subaccent);
  background: var(--bg);
  pointer-events: none;
}
.resume-expand-icon::before {
  content: "+";
}
.resume-event--expanded .resume-expand-icon::before {
  content: "\2212";
}
.resume-event-detail {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.resume-event-detail > p {
  margin: 0 0 12px;
  color: var(--text-muted);
  line-height: 1.6;
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}
.resume-detail-list {
  margin: 0 0 12px;
  padding-left: 1.15em;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
.resume-detail-list li {
  margin: 0 0 8px;
}
.resume-detail-list li:last-child {
  margin-bottom: 0;
}
.resume-event-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 6px;
}
.resume-event-photos-hint {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-muted);
  grid-column: 1 / -1;
}
.resume-event-photos-hint code {
  font-size: 0.82rem;
  word-break: break-all;
}
.resume-event-photo {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.resume-event-photo-frame {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  line-height: 0;
  border: 1px solid #a08068;
  border-radius: calc(var(--radius) - 2px);
  box-shadow: none;
  background: #e8e0d4;
  overflow: hidden;
  box-sizing: border-box;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
  text-align: left;
  appearance: none;
  transition:
    transform 220ms cubic-bezier(0.33, 1, 0.68, 1),
    border-color 120ms linear,
    background-color 120ms linear;
}
.resume-event-photo-frame:focus {
  outline: none;
}
.resume-event-photo-frame:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.resume-event-photo:hover .resume-event-photo-frame {
  transform: scale(1.03);
  border-color: #9d6f4b;
  background: #f8f1e6;
}
.resume-event-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(220px, 40vw);
  object-fit: contain;
  border-radius: inherit;
  vertical-align: bottom;
}
.resume-event-photo-cap {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}
.resume-event h3 .text-link {
  font-weight: 750;
}
.resume-event::before {
  content: "";
  position: absolute;
  top: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid var(--bg);
}
.resume-event.side-left {
  grid-column: 1;
}
.resume-event.side-left::before {
  right: -26px;
}
.resume-event.side-right {
  grid-column: 2;
}
.resume-event.side-right::before {
  left: -26px;
}
.resume-date { margin: 0; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1.1px; color: var(--line); font-weight: 700; font-family: var(--headline-font); }
.resume-event h3 { margin: 4px 0 6px; font-size: 1.02rem; }
.resume-event .resume-summary {
  margin: 0;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.resume-event h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.resume-event--expanded h3,
.resume-event--expanded .resume-summary {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}


.resume-toggle {
  margin: 16px auto 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--subaccent);
  border-radius: var(--radius);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  font-weight: 600;
  box-shadow: var(--shadow);
  font-size: 1.4rem;
  line-height: 1;
  transform-origin: center;
  transition: transform 140ms linear, background 120ms linear;
}
.resume-toggle:hover {
  background: var(--hover-surface);
}

.resume-toggle[aria-expanded="true"] {
  transform: rotate(180deg);
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.skill-tags.resume-skills {
  margin-top: 36px;
}
.skill-tags span {
  background: #f5ddc5;
  color: #5f3c25;
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-weight: 600;
  border: 1px solid #ba8a66;
}

.section { padding: var(--section-space) 0; }
/* Project + single film roll pages: tight top padding so the back link lines up under the header */
.section:has(> .container.project-detail),
.section:has(> .container.film-page-inner) {
  padding-top: clamp(14px, 2.2vw, 24px);
}
.section-alt { background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
h2 { margin: 0 0 8px; font-size: 1.9rem; letter-spacing: -0.01em; }
h2 { font-family: var(--headline-font); }
.section-lead { margin: 18px 0 0; color: var(--text-muted); max-width: 65ch; line-height: 1.62; }
.section > .container:not(.project-detail) > h1 + .section-lead {
  margin-top: 24px;
}
.section-lead strong {
  color: var(--text);
  font-weight: 650;
}
.section-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.text-link { color: var(--subaccent); font-weight: 700; }
.text-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.section h2 {
  display: inline-block;
  border: 1px solid var(--border);
  padding: 4px 10px;
  background: #f8e3cf;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.cards { margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.cards.archive-grid {
  margin-top: 32px;
  gap: 22px 20px;
}
.card { position: relative; border-radius: var(--radius); padding: 14px; transition: transform 100ms linear; }
.card:hover { transform: translate(-2px, -2px); border-color: #9d6f4b; box-shadow: 4px 4px 0 var(--shadow-deep); }
a.card.card--project {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  box-sizing: border-box;
}
a.card.card--project:hover {
  color: inherit;
}
a.card.card--project:focus {
  outline: none;
}
a.card.card--project:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}
.card-link-hint {
  color: var(--subaccent);
  font-weight: 700;
}
a.card.card--project:hover .card-link-hint {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.card-image { height: 162px; border-radius: var(--radius); margin-bottom: 12px; }
.card-image--photo {
  overflow: hidden;
  padding: 0;
  background: var(--surface);
  box-sizing: border-box;
}
.card-image--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.placeholder {
  border: 1px dashed #a76c43;
  background: #f8e3cf;
  color: #5e3921;
  font-size: 0.9rem;
  display: grid;
  place-content: center;
}
.card-label { margin: 0 0 6px; text-transform: uppercase; letter-spacing: 1.1px; font-size: 0.73rem; color: var(--text-muted); font-weight: 700; }
.card-label { font-family: var(--headline-font); }
.card h3 { margin: 0 0 8px; }
.card p { margin: 0; color: var(--text-muted); }

.gallery { margin-top: 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gallery-item {
  position: relative;
  min-height: 148px;
  border-radius: var(--radius);
  border: 1px dashed #a76c43;
  background: #f8e3cf;
  color: #5e3921;
  display: grid;
  place-content: center;
}

.preview-rail {
  margin-top: 20px;
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.preview-track {
  margin-top: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-y;
  cursor: grab;
  padding: 2px 2px 10px;
}
.preview-track::-webkit-scrollbar {
  display: none;
}
.preview-track.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.preview-track.cards {
  display: flex;
  gap: 16px;
  scroll-snap-type: x proximity;
  align-items: stretch;
}
.preview-track.cards .card {
  flex: 0 0 calc((100% - 32px) / 3);
  scroll-snap-align: start;
}

.preview-track.gallery {
  display: flex;
  gap: 10px;
  scroll-snap-type: x proximity;
}
.preview-track.gallery .gallery-item {
  flex: 0 0 calc((100% - 30px) / 4);
  scroll-snap-align: start;
}

.preview-nav {
  align-self: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--subaccent);
  border-radius: var(--radius);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 600;
  box-shadow: var(--shadow);
  min-width: 40px;
  flex: 0 0 40px;
}
.preview-nav:hover {
  background: var(--hover-surface);
}
.preview-nav:active {
  transform: none !important;
  box-shadow: var(--shadow) !important;
}
.preview-nav {
  transition: none !important;
}
.preview-prev:disabled,
.preview-next:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.contact-links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 16px; }
.contact-links a { color: var(--subaccent); font-weight: 700; }
.contact-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 18px 0; }
.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 28px;
}
.site-footer-copy { margin: 0; color: var(--text-muted); flex-shrink: 0; }
.site-footer-note {
  margin: 0;
  flex: 0 1 auto;
  max-width: none;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}
.archive-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.archive-gallery { grid-template-columns: repeat(4, 1fr); }

/* Design & Engineering archive + homepage preview rail: same thumbnails, copy, CTA alignment.
   Must beat `a.card.card--project { display: block }` so flex + margin-top:auto on CTA works. */
.archive-grid a.card.card--project,
.preview-track.cards a.card.card--project {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  min-height: 0;
  padding: 11px;
  box-sizing: border-box;
}
.archive-grid a.card.card--project {
  padding: 14px 15px 16px;
}
.archive-grid a.card.card--project .card-image,
.preview-track.cards a.card.card--project .card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  max-height: none;
  margin: 0 0 10px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-sizing: border-box;
}
.archive-grid a.card.card--project .card-image {
  margin: 0 0 14px;
}
.archive-grid a.card.card--project .card-image.placeholder,
.preview-track.cards a.card.card--project .card-image.placeholder {
  display: grid;
  place-content: center;
  padding: 10px;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.25;
  font-weight: 600;
}
.archive-grid a.card.card--project .card-image--photo img,
.preview-track.cards a.card.card--project .card-image--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.archive-grid a.card.card--project .card-body,
.preview-track.cards a.card.card--project .card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}
.archive-grid a.card.card--project .card-label,
.preview-track.cards a.card.card--project .card-label {
  margin: 0 0 5px;
}
.archive-grid a.card.card--project .card-label {
  margin: 0 0 8px;
}
.archive-grid a.card.card--project h3,
.preview-track.cards a.card.card--project h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  line-height: 1.22;
}
.archive-grid a.card.card--project h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  line-height: 1.28;
}
.archive-grid a.card.card--project .card-summary,
.preview-track.cards a.card.card--project .card-summary {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.archive-grid a.card.card--project .card-summary {
  font-size: 0.88rem;
  line-height: 1.45;
}
.archive-grid a.card.card--project .card-cta,
.preview-track.cards a.card.card--project .card-cta {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 10px;
}
.archive-grid a.card.card--project .card-cta {
  padding-top: 12px;
}

.project-detail {
  padding-bottom: clamp(2.25rem, 5vw, 3.75rem);
}
.project-detail h1 {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-family: var(--headline-font);
  letter-spacing: -0.02em;
}
.project-detail .project-back { margin: 0 0 14px; }
.project-meta {
  margin: 0 0 22px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--headline-font);
  color: var(--line);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.project-detail .section-lead {
  margin-top: 28px;
  max-width: 68ch;
}
.project-hero-text-match {
  max-width: 72ch;
  width: 100%;
  min-width: 0;
  margin-top: 32px;
}
.project-hero-main {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
  transition: transform 220ms cubic-bezier(0.33, 1, 0.68, 1), border-color 120ms linear;
}
button.project-hero-main {
  appearance: none;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  display: block;
  cursor: pointer;
  text-align: left;
}
button.project-hero-main:focus {
  outline: none;
}
button.project-hero-main:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}
button.project-hero-main:hover {
  transform: scale(1.02);
  border-color: var(--ring);
}
.project-hero-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.project-hero-main video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

/* Hero slot when no image yet — matches .project-hero-main frame */
.project-hero-placeholder-shell {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
  box-sizing: border-box;
}
.project-hero-placeholder-shell .placeholder {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  border-radius: 0;
  box-sizing: border-box;
}

.project-content-split {
  display: grid;
  grid-template-columns: minmax(0, 72ch) minmax(220px, 1fr);
  grid-template-rows: auto;
  gap: 32px clamp(28px, 4.5vw, 56px);
  align-items: start;
  justify-content: start;
  margin-top: 34px;
}
.project-content-primary {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  max-width: 72ch;
}
.project-content-split .project-hero-text-match {
  margin-top: 0;
}

.project-content-split--single {
  grid-template-columns: 1fr;
}
.project-content-split--single .project-content-primary {
  grid-column: 1;
  max-width: 72ch;
}

.project-gallery-stack {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: start;
}
.project-gallery-head {
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 16px;
  width: max-content;
  max-width: 100%;
  z-index: 1;
  pointer-events: auto;
  flex-shrink: 0;
}
.project-gallery-head h2 {
  margin: 0;
}
.project-gallery-aside {
  min-width: 0;
  position: relative;
  align-self: start;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 14px;
  box-sizing: border-box;
}
.project-gallery-aside--free {
  overflow-y: visible;
  max-height: none !important;
  height: auto !important;
}
.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 10px;
  align-content: start;
  align-items: start;
  justify-items: center;
  justify-content: center;
  width: 100%;
}

/* Dense staggered mosaic: short landscape vs taller square cells, cover fill (Mangrove, etc.) */
.project-gallery-grid--stagger {
  grid-auto-flow: row dense;
  grid-auto-rows: minmax(36px, 2.5vw);
  gap: 6px;
  align-items: stretch;
  justify-items: stretch;
}
.project-gallery-grid--stagger .project-gallery-tile {
  align-self: stretch;
  justify-content: stretch;
  height: 100%;
  min-height: 0;
}
.project-gallery-grid--stagger .project-gallery-tile--land {
  grid-row: span 3;
}
.project-gallery-grid--stagger .project-gallery-tile--sq {
  grid-row: span 4;
}
.project-gallery-grid--stagger .project-gallery-frame {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  min-height: 0;
}
.project-gallery-grid--stagger .project-gallery-frame img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

/* Few images: same dense mosaic language as --stagger (Mangrove / FormaFlow), slightly taller tracks */
.project-gallery-grid--stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row dense;
  grid-auto-rows: minmax(42px, 3.2vw);
  gap: 7px;
  align-items: stretch;
  justify-items: stretch;
}
.project-gallery-grid--stack .project-gallery-tile {
  align-self: stretch;
  justify-content: stretch;
  height: 100%;
  min-height: 0;
  width: 100%;
}
.project-gallery-grid--stack .project-gallery-tile--land {
  grid-row: span 3;
}
.project-gallery-grid--stack .project-gallery-tile--sq {
  grid-row: span 4;
}
.project-gallery-grid--stack .project-gallery-frame {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  min-height: 0;
}
.project-gallery-grid--stack .project-gallery-frame img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.project-gallery-grid--formaflow .project-gallery-tile--land {
  grid-row: span 3;
}
.project-gallery-grid--formaflow .project-gallery-tile--sq {
  grid-row: span 4;
}
.project-gallery-grid--formaflow .project-gallery-tile--full {
  grid-column: 1 / -1;
  grid-row: span 5;
}
.project-gallery-grid--formaflow .project-gallery-tile--vert {
  grid-row: span 5;
}
.project-gallery-grid--formaflow .project-gallery-tile--full .project-gallery-frame {
  height: auto;
  aspect-ratio: 16 / 9;
}
.project-gallery-grid--formaflow .project-gallery-tile--full .project-gallery-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.project-gallery-grid--formaflow .project-gallery-frame video {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  background: #000;
}
.project-gallery-grid--formaflow {
  margin-top: 14px;
}
.project-gallery-grid--formaflow .project-gallery-tile,
.project-gallery-grid--formaflow .project-gallery-media {
  content-visibility: auto;
  contain-intrinsic-size: 360px 240px;
}
.project-gallery-grid--formaflow .project-grid-video {
  pointer-events: none;
}

/* FormaFlow: Vimeo embeds above the photo mosaic (not lightbox tiles) */
.project-formaflow-videos {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: 18px;
}
.project-formaflow-videos .project-vimeo-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid #a08068;
  background: #000;
}
.project-formaflow-videos .project-vimeo-frame--169 {
  aspect-ratio: 16 / 9;
}
.project-formaflow-videos .project-vimeo-frame--916 {
  aspect-ratio: 9 / 16;
}
.project-formaflow-videos .project-vimeo-frame--43 {
  aspect-ratio: 4 / 3;
}
.project-formaflow-videos .project-vimeo-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}
.project-formaflow-videos .project-vimeo-tile {
  cursor: pointer;
}
.project-formaflow-videos .project-vimeo-tile:focus {
  outline: none;
}
.project-formaflow-videos .project-vimeo-tile:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}
.project-formaflow-videos__pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}
@media (max-width: 520px) {
  .project-formaflow-videos__pair {
    grid-template-columns: 1fr;
  }
}

/* CAL Aerospace SAE: full-width GIF row atop staggered photo grid */
.project-gallery-grid--aerosae .project-gallery-tile--banner {
  grid-column: 1 / -1;
  grid-row: span 3;
}
.project-gallery-grid--aerosae .project-gallery-tile--banner .project-gallery-frame {
  background: #1c1c1c;
}
.project-gallery-grid--aerosae .project-gallery-tile--banner .project-gallery-frame img {
  object-fit: contain;
}

.project-gallery-grid:empty {
  min-height: 140px;
  box-sizing: border-box;
}

.project-gallery-tile {
  container-type: inline-size;
  container-name: gallery-cell;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  height: auto;
}
.project-gallery-grid.is-curator .project-gallery-tile {
  position: relative;
  cursor: grab;
}
.project-gallery-grid.is-curator .project-gallery-tile.is-dragging {
  opacity: 0.6;
  cursor: grabbing;
}
/* Inner thumbs sit inside .project-gallery-aside (already has chunky shadow); no second offset shadow on the button */
button.project-gallery-tile:active {
  transform: none !important;
  box-shadow: none !important;
}
.project-gallery-tile:focus {
  outline: none;
}
.project-gallery-tile:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}
.project-gallery-frame {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  line-height: 0;
  border: 1px solid #a08068;
  border-radius: calc(var(--radius) - 2px);
  box-shadow: none;
  background: #e8e0d4;
  overflow: hidden;
  transition:
    transform 220ms cubic-bezier(0.33, 1, 0.68, 1),
    border-color 120ms linear,
    background-color 120ms linear;
  box-sizing: border-box;
  transform-origin: center center;
}
.project-gallery-tile:hover .project-gallery-frame {
  transform: scale(1.06);
  border-color: #9d6f4b;
  background: #f8f1e6;
}
.project-gallery-tile:active .project-gallery-frame {
  transform: scale(1.02);
  border-color: var(--border);
  background: #e8e0d4;
  transition-duration: 80ms;
}
.project-gallery-frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100cqw;
  max-height: min(320px, 75cqw);
  object-fit: contain;
  vertical-align: bottom;
  border-radius: inherit;
}
.project-gallery-frame video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100cqw;
  max-height: min(320px, 75cqw);
  object-fit: contain;
  vertical-align: bottom;
  border-radius: inherit;
  background: #000;
}
.project-gallery-media {
  container-type: inline-size;
  container-name: gallery-cell;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  height: auto;
}
@supports not (container-type: inline-size) {
  .project-gallery-frame img {
    max-width: 100%;
    max-height: min(320px, 42vw);
  }
}

@media (max-width: 900px) {
  .project-content-split {
    grid-template-columns: 1fr;
  }
  .project-content-primary {
    grid-column: 1;
    grid-row: auto;
    max-width: none;
  }
  .project-gallery-stack {
    grid-column: 1;
    grid-row: auto;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
  .project-gallery-head {
    position: static;
    margin-bottom: 16px;
    width: auto;
    max-width: none;
  }
  .project-gallery-aside {
    position: static;
    max-width: none;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin-left: 0;
    margin-right: 0;
    overflow: visible;
  }
  .project-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: minmax(140px, auto);
    height: auto;
    overflow-y: visible;
  }
  .project-gallery-grid--stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(36px, 5vw);
    grid-auto-flow: row dense;
    gap: 6px;
  }
  .project-gallery-grid--stack .project-gallery-tile--land {
    grid-row: span 3;
  }
  .project-gallery-grid--stack .project-gallery-tile--sq {
    grid-row: span 4;
  }
  .project-gallery-aside .project-gallery-tile {
    height: auto;
    min-height: 0;
  }
  .project-gallery-aside .project-gallery-frame {
    max-height: min(200px, 42vw);
  }
  .project-gallery-aside .project-gallery-frame img {
    max-height: min(196px, 40vw);
  }
  .project-gallery-grid--stack .project-gallery-aside .project-gallery-frame,
  .project-gallery-grid--stack .project-gallery-frame {
    max-height: none;
  }
  .project-gallery-grid--stack .project-gallery-aside .project-gallery-frame img,
  .project-gallery-grid--stack .project-gallery-frame img {
    max-height: none;
    object-fit: cover;
  }

  .project-gallery-grid--stagger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(32px, 4.5vw);
    grid-auto-flow: row dense;
    gap: 6px;
  }
  .project-gallery-grid--stagger .project-gallery-tile {
    min-height: 0;
  }
  .project-gallery-grid--stagger .project-gallery-tile--land {
    grid-row: span 3;
  }
  .project-gallery-grid--stagger .project-gallery-tile--sq {
    grid-row: span 4;
  }
.project-gallery-grid--stagger .project-gallery-media--land {
  grid-row: span 3;
}
.project-gallery-grid--stagger .project-gallery-media--sq {
  grid-row: span 4;
}
  .project-gallery-grid--stagger .project-gallery-frame {
    max-height: none;
  }
  .project-gallery-grid--stagger .project-gallery-frame img {
    max-height: none;
  }
}

.project-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 16px 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}
.project-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.project-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 32, 28, 0.82);
  border: none;
  padding: 0;
  cursor: pointer;
}
.project-lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 3002;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--subaccent);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  padding: 0;
}
.project-lightbox-close:hover {
  background: var(--hover-surface);
}
.project-lightbox-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: min(96vw, 1680px);
  pointer-events: none;
}
.project-lightbox-row > * {
  pointer-events: auto;
}
.project-lightbox-stage {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 16px;
  min-width: 0;
  max-height: 88vh;
  /* Let clicks pass through to the backdrop except on the image/caption (row children default to auto). */
  pointer-events: none;
}
.project-lightbox-stage .project-lightbox-img-wrap,
.project-lightbox-stage .project-lightbox-caption-block {
  pointer-events: auto;
}
.project-lightbox-caption-block {
  flex: 0 1 38%;
  max-width: min(40ch, 36vw);
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #f5f1eb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--shadow-deep);
}
.project-lightbox-caption-block.is-empty {
  display: none;
}
.project-lightbox-caption {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.project-lightbox-nav {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--subaccent);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  padding: 0;
}
.project-lightbox-nav:hover {
  background: var(--hover-surface);
}
.project-lightbox-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.project-lightbox-img-wrap {
  flex: 1 1 58%;
  min-width: 0;
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  box-sizing: border-box;
}
.project-lightbox-img {
  max-width: min(96vw, 100%);
  max-height: min(92vh, 100%);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 0;
  box-shadow: none;
}
/* [hidden] must win: our display:block above would otherwise show an empty video box next to the image */
.project-lightbox-img-wrap > .project-lightbox-img[hidden],
.project-lightbox-img-wrap > .project-lightbox-video[hidden] {
  display: none !important;
}
.project-lightbox-video {
  max-width: 100%;
  max-height: calc(88vh - 24px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.project-lightbox-vimeo {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: calc(88vh - 24px);
  margin: 0 auto;
  background: #0a0a0a;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
}
.project-lightbox-vimeo--land {
  aspect-ratio: 16 / 9;
}
.project-lightbox-vimeo--four-three {
  aspect-ratio: 4 / 3;
  max-width: min(96vw, 1200px);
}
.project-lightbox-vimeo--portrait {
  aspect-ratio: 9 / 16;
  max-width: min(42vw, 420px);
  max-height: min(78vh, 880px);
}
.project-lightbox-vimeo iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.project-lightbox-img-wrap > .project-lightbox-vimeo[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .project-lightbox-stage {
    flex-direction: column;
    max-height: 86vh;
    overflow-y: auto;
    align-items: stretch;
  }
  .project-lightbox-caption-block {
    flex: 0 0 auto;
    max-width: none;
  }
  .project-lightbox-caption-block.is-empty {
    display: none;
  }
  .project-lightbox-img-wrap {
    flex: 1 1 auto;
    max-height: min(62vh, 520px);
  }
  .project-lightbox-img {
    max-height: min(58vh, 500px);
  }
  .project-lightbox-video {
    max-height: min(50vh, 440px);
  }
  .project-lightbox-vimeo--portrait {
    max-width: min(72vw, 360px);
    max-height: min(52vh, 560px);
  }
  .project-lightbox-vimeo--four-three {
    max-width: min(96vw, 100%);
  }
}

.project-body {
  margin-top: 38px;
  display: grid;
  gap: 22px;
  max-width: 72ch;
}
.project-content-primary .project-body {
  max-width: none;
}
.project-body > h2 {
  font-family: var(--headline-font);
  font-size: 1.38rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}
.project-body > h3 {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--text);
  margin: 4px 0 0;
  line-height: 1.3;
}
.project-doc-link {
  margin: 0;
  padding-top: 4px;
}
/* Report PDF: left column under hero, same measure as .project-body — not inside gallery */
.project-content-primary > .project-doc-link {
  margin: 26px 0 0;
  padding-top: 0;
  max-width: 72ch;
}
.project-doc-link a {
  font-weight: 600;
}
/* ESP Flight Tracker: first two gallery shots are portrait night photos — contain avoids cover cropping to black */
.project-gallery-grid--esp-flight .project-gallery-tile--sq .project-gallery-frame img {
  object-fit: contain;
  object-position: center;
}
.project-body p { margin: 0; color: var(--text-muted); line-height: 1.72; }
.project-body p strong,
.project-body li strong {
  color: var(--text);
  font-weight: 650;
}
.project-body ul {
  margin: 0;
  padding-left: 1.2em;
  color: var(--text-muted);
  line-height: 1.72;
  display: grid;
  gap: 10px;
}
.project-body .project-spec-list {
  margin: 0;
  padding-left: 1.25em;
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  line-height: 1.55;
}
.project-body .project-spec-list strong {
  color: var(--text);
}
.project-body > p > strong:only-child {
  display: block;
  margin-top: 4px;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text);
}
.project-body .placeholder {
  min-height: 240px;
  border-radius: var(--radius);
}
.card .card-cta { margin-top: 14px; }

.timeline-node {
  position: absolute;
  left: 50%;
  width: 9px;
  height: 9px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid var(--bg);
  z-index: 5;
  box-shadow: none;
}

.timeline-node::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 3px);
  padding: 3px 6px;
  font-size: 0.7rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms linear;
  z-index: 10;
}

.timeline-node:hover::after {
  opacity: 1;
}

.timeline-year {
  position: absolute;
  left: calc(50% + 14px);
  transform: translateY(-50%);
  font-size: 0.68rem;
  letter-spacing: 0.8px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg);
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 3px);
  z-index: 7;
  white-space: nowrap;
}

/* --- TIGHT Y2K PIXEL BURST (SMALLER DIAMETER) --- */
.cursor-click {
  position: fixed;
  width: 4px;
  height: 4px;
  background: var(--accent);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow:
    0 -3px 0 var(--accent),
    0 3px 0 var(--accent),
    -3px 0 0 var(--accent),
    3px 0 0 var(--accent);
  animation: pixelBurst 0.25s steps(3) forwards;
}

@keyframes pixelBurst {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  33% {
    background: transparent;
    box-shadow:
      0 -8px 0 var(--accent),
      0 8px 0 var(--accent),
      -8px 0 0 var(--accent),
      8px 0 0 var(--accent),
      -6px -6px 0 var(--accent),
      6px -6px 0 var(--accent),
      -6px 6px 0 var(--accent),
      6px 6px 0 var(--accent);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    box-shadow:
      0 -12px 0 transparent,
      0 12px 0 transparent,
      -12px 0 0 transparent,
      12px 0 0 transparent,
      -10px -10px 0 transparent,
      10px -10px 0 transparent,
      -10px 10px 0 transparent,
      10px 10px 0 transparent;
    opacity: 0;
  }
}

@media (min-width: 981px) {
  .hero-grid > .hero-panel {
    min-height: 480px;
    align-self: stretch;
  }
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "about";
  }
  .hero-slideshow-viewport {
    height: min(340px, 48vh);
    min-height: 260px;
  }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .archive-gallery { grid-template-columns: repeat(3, 1fr); }
  .preview-track.cards .card {
    flex-basis: calc((100% - 16px) / 2);
  }
  .preview-track.gallery .gallery-item {
    flex-basis: calc((100% - 10px) / 2);
  }
}

@media (max-width: 760px) {
  .hero-peek {
    width: min(100px, 30vw);
    top: 0.15rem;
  }
  .project-hero-text-match {
    max-width: none;
  }
  .project-hero-main {
    aspect-ratio: 4 / 3;
    max-height: min(70vh, 420px);
  }
  .project-hero-main img {
    max-height: min(70vh, 420px);
  }
  .menu-button { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 4%;
    display: none;
    flex-direction: column;
    gap: 12px;
  }
  .nav-links.show { display: flex; }
  .cards, .gallery { grid-template-columns: 1fr; }
  .archive-gallery { grid-template-columns: repeat(2, 1fr); }
  .preview-rail {
    gap: 8px;
  }
  .preview-nav {
    width: 36px;
    height: 36px;
    min-width: 36px;
    flex-basis: 36px;
  }
  .preview-track.cards .card,
  .preview-track.gallery .gallery-item {
    flex-basis: 100%;
  }
  .resume-timeline {
    padding-left: 0;
    padding-right: 0;
  }
  .resume-timeline::before { left: 7px; }
  .resume-year-header {
    justify-content: flex-start;
    min-height: 26px;
  }
  .resume-year-header span {
    position: absolute;
    left: 7px;
    transform: translateX(-50%);
  }
  .resume-year-events {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-left: 24px;
    padding-right: 2px;
    align-items: start;
  }
  .resume-event.side-left,
  .resume-event.side-right {
    grid-column: 1;
  }
  .resume-event::before,
  .resume-event.side-left::before,
  .resume-event.side-right::before {
    left: -20px;
    right: auto;
  }
  .site-footer-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .site-footer-note {
    text-align: left;
    flex: none;
    max-width: none;
    white-space: normal;
  }
}