/* ============================================================
   WES CAMPBELL — wesccreative.com
   Split layout: fixed profile rail (left) + scrolling pane (right)
   Carbon / Bone / Signal — dark cinematic editorial
   ============================================================ */

:root {
  --carbon: #0b0b0c;
  --graphite: #151517;
  --line: rgba(237, 234, 228, 0.12);
  --bone: #edeae4;
  --steel: #8a8a93;
  --signal: #ff3d00;
  --rail-w: clamp(300px, 30vw, 420px);
  --pad: clamp(22px, 3.6vw, 56px);
  --display: "Archivo", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

/* light theme */
:root {
  --bar-bg: rgba(11, 11, 12, 0.86);
}
:root[data-theme="light"] {
  --bar-bg: rgba(243, 241, 236, 0.88);
  --carbon: #f3f1ec;
  --graphite: #ffffff;
  --line: rgba(11, 11, 12, 0.14);
  --bone: #141416;
  --steel: #63636b;
  /* signal stays #ff3d00 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--carbon);
  color: var(--bone);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--signal); color: var(--carbon); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- type --- */
h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 118%;
  font-weight: 640;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.98;
}
h2 { font-size: clamp(1.8rem, 3.4vw, 3rem); }
h3 { font-size: 1rem; letter-spacing: 0.02em; line-height: 1.3; }
.micro {
  font-family: var(--display);
  font-stretch: 105%;
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--steel);
}

/* --- reveal --- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s cubic-bezier(0.2,0.6,0.2,1), transform 0.9s cubic-bezier(0.2,0.6,0.2,1); }
.reveal.d1 { transition-delay: 0.1s; }
.reveal.d2 { transition-delay: 0.2s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* --- buttons --- */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-stretch: 110%;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 1em 1.9em;
  border: 1px solid var(--bone);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
  text-align: center;
  cursor: pointer;
}
.btn-solid { background: var(--bone); color: var(--carbon); }
.btn-ghost { background: transparent; color: var(--bone); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--signal); color: var(--signal); }
.btn-solid:hover { background: var(--signal); border-color: var(--signal); color: var(--bone); }

/* ============================================================ SHELL */
.shell { display: block; }

/* ============================================================ LEFT RAIL */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(24px, 3vw, 44px);
  border-right: 1px solid var(--line);
  background: var(--carbon);
  overflow-y: auto;
  z-index: 10;
}
.rail-top-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.theme-toggle.mobile-only { display: none; }
.avail { display: inline-flex; align-items: center; gap: 9px; color: var(--bone); }
.avail .dot { width: 7px; height: 7px; border-radius: 50%; background: #4fd07a; box-shadow: 0 0 0 0 rgba(79,208,122,0.5); animation: ping 2.2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(79,208,122,0); } 100% { box-shadow: 0 0 0 0 rgba(79,208,122,0); } }

.rail-portrait { margin-top: 22px; overflow: hidden; }
.rail-portrait img {
  width: 100%;
  aspect-ratio: 4 / 3.4;
  object-fit: cover;
  object-position: center 20%;
  filter: grayscale(1) contrast(1.06) brightness(0.94);
}
.rail-name {
  margin-top: 20px;
  font-size: clamp(2rem, 2.9vw, 2.9rem);
}
.rail-role { margin-top: 10px; color: var(--signal); }
.rail-bio { margin-top: 14px; color: var(--steel); font-size: 0.9rem; max-width: 34ch; }

.rail-nav { display: grid; gap: 2px; }
.rail-link {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--display);
  font-stretch: 115%;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--steel);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s, padding-left 0.25s;
}
.rail-link .num { color: inherit; }
.rail-link:hover { color: var(--bone); }
.rail-link.active { color: var(--bone); padding-left: 10px; }
.rail-link.active .num { color: var(--signal); }

.rail-foot { display: grid; gap: 18px; }
.rail-foot .btn { width: 100%; }
.rail-social { display: flex; gap: 22px; }
.rail-social a:hover { color: var(--bone); }
.copyright { opacity: 0.6; }

/* mobile bar hidden on desktop */
.mobile-bar { display: none; }

/* ============================================================ RIGHT PANE */
.pane { margin-left: var(--rail-w); }

/* HERO BAND */
.hero-band { position: relative; height: min(62vh, 640px); overflow: hidden; }
.hero-band img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 60%;
  filter: brightness(0.7);
}
.hero-band::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,11,12,0.35), rgba(11,11,12,0.05) 45%, rgba(11,11,12,0.88));
}
/* hero copy stays light in both themes — it sits on the photograph */
.hero-band-copy { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 0 var(--pad) 34px; }
.hero-band-copy .micro { color: rgba(237, 234, 228, 0.75); }
.hero-band-copy h2 { margin-top: 0.5em; font-size: clamp(1.7rem, 3vw, 2.7rem); color: #edeae4; }

/* BLOCKS */
.block { padding: clamp(70px, 9vw, 120px) var(--pad); border-bottom: 1px solid var(--line); }
.section-label { margin-bottom: 1.6em; }
.block-title { margin-bottom: 1.2em; max-width: 15em; }
.block-sub { color: var(--steel); max-width: 52ch; margin: -1.6em 0 2.8em; font-size: 0.98rem; }
.lede { font-size: clamp(1.2rem, 1.9vw, 1.55rem); line-height: 1.45; max-width: 46ch; }

/* stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: clamp(36px, 5vw, 56px);
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.stat strong {
  font-family: var(--display);
  font-stretch: 120%;
  font-weight: 650;
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  line-height: 1;
  display: block;
}
.stat span { color: var(--steel); font-size: 0.82rem; }

/* clients */
.clients { margin-top: clamp(48px, 6vw, 72px); }
.clients .micro { margin-bottom: 26px; display: block; }
.logo-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logo-track {
  display: flex;
  align-items: center;
  gap: clamp(48px, 5vw, 84px);
  width: max-content;
  animation: marquee 46s linear infinite;
  padding: 0 20px;
}
.logo-marquee:hover .logo-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.logo-track img {
  height: 28px;
  width: auto;
  filter: invert(1) brightness(1.4) grayscale(1);
  mix-blend-mode: screen;
  opacity: 0.55;
  transition: opacity 0.25s;
}
:root[data-theme="light"] .logo-track img {
  filter: grayscale(1) contrast(1.05);
  mix-blend-mode: multiply;
  opacity: 0.6;
}
.logo-track img:hover { opacity: 1; }
.logo-track img[src*="gumball"] { height: 48px; }
.logo-track img[src*="porsche"] { height: 42px; }
.logo-track img[src*="aman"] { height: 22px; }
.logo-track img[src*="louis-vuitton"], .logo-track img[src*="subaru"] { height: 18px; }

/* services */
.service-list { display: grid; }
.service {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  align-items: start;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  transition: border-color 0.3s;
}
.service:hover { border-top-color: var(--signal); }
.service .num { color: var(--signal); padding-top: 3px; }
.service h3 { margin-bottom: 0.5em; }
.service p { color: var(--steel); font-size: 0.92rem; max-width: 60ch; }

/* ============================================================ WORK TABS */
.tabs-wrap { position: relative; }
.tabs-hint { display: none; }
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.tab {
  font-family: var(--display);
  font-stretch: 110%;
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--steel);
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.7em 1.3em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.tab:hover { color: var(--bone); border-color: rgba(237,234,228,0.4); }
.tab.active { color: var(--carbon); background: var(--bone); border-color: var(--bone); }

.work-empty {
  border: 1px dashed var(--line);
  padding: clamp(36px, 5vw, 64px);
  margin-bottom: clamp(14px, 2vw, 26px);
}
.work-empty .micro { color: var(--signal); display: block; margin-bottom: 14px; }
.work-empty p:not(.micro) { color: var(--steel); max-width: 52ch; }
.work-empty a { color: var(--bone); border-bottom: 1px solid var(--signal); }

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 2vw, 26px);
}
.work-item { transition: opacity 0.45s, transform 0.45s; }
.work-item.wide { grid-column: span 2; }
.work-item.hide { display: none; }
.work-item.fading { opacity: 0; transform: translateY(10px); }
.work-media { overflow: hidden; background: var(--graphite); }
.work-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2,0.6,0.2,1), filter 0.8s;
  filter: brightness(0.92);
}
.work-item.wide .work-media img { aspect-ratio: 16 / 8.5; }
.work-item:hover .work-media img { transform: scale(1.035); filter: brightness(1); }
.work-item figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 11px; }
.work-item .cat { color: var(--signal); }

/* press-hold scrub (scrub.js): jog through a project's frames on its thumbnail */
.work-media { position: relative; }
.work-link {
  touch-action: pan-y; /* vertical scroll stays native; horizontal belongs to the scrub */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.work-item.scrubbing .work-media img {
  transform: scale(1.02);
  filter: brightness(1);
  transition: none;
}
.scrub-ui {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 34px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.work-item.scrubbing .scrub-ui { opacity: 1; }
.scrub-count { color: #fff; min-width: 54px; }
.scrub-bar {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.28);
  position: relative;
}
.scrub-bar i {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--signal);
}

.show-more-wrap { display: flex; justify-content: center; margin-top: clamp(28px, 4vw, 44px); }
.show-more-wrap[hidden] { display: none; }
/* ghosted teaser row behind the button */
.work-item.peek {
  pointer-events: none;
  opacity: 0.45;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.35) 55%, transparent 88%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.35) 55%, transparent 88%);
}
.show-more-wrap.over-peek {
  position: relative;
  z-index: 5;
  margin-top: calc(-1 * clamp(90px, 12vw, 170px));
}
.show-more-wrap .btn { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

/* ============================================================ THE KIT — compact slider */
#kit { padding-bottom: clamp(48px, 6vw, 80px); }
/* kit intro stays on one line (it wraps naturally on narrow screens) */
#kit .block-sub { max-width: none; margin-bottom: 2em; }
.gear-grid {
  display: flex;
  gap: clamp(10px, 1.2vw, 16px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin-inline: calc(-1 * var(--pad));
  padding-inline: var(--pad);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
.gear-grid::-webkit-scrollbar { display: none; }
.gear-card {
  flex: 0 0 auto;
  width: clamp(132px, 13vw, 168px);
  scroll-snap-align: start;
  border: 1px solid var(--line);
  background: var(--graphite);
  transition: border-color 0.3s;
}
.gear-card:hover { border-color: rgba(237, 234, 228, 0.35); }
.gear-media {
  background: #fff;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 12%;
  overflow: hidden;
}
.gear-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.gear-card:hover .gear-media img { transform: scale(1.07); }
.gear-card figcaption { display: grid; gap: 2px; padding: 10px 11px 12px; }
.gear-name {
  font-family: var(--display);
  font-stretch: 110%;
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.35;
}
.gear-name em { font-style: italic; text-transform: none; }
.gear-card .micro { font-size: 0.62rem; }
.gear-note { margin-top: clamp(16px, 2vw, 22px); }

/* ============================================================ CONTACT */
#contact { background: var(--graphite); }
.contact-sub { color: var(--steel); margin-bottom: clamp(30px, 4vw, 46px); }
form { display: grid; gap: 22px; max-width: 780px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
label {
  display: grid;
  gap: 9px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--steel);
}
input, select, textarea {
  background: var(--carbon);
  border: 1px solid var(--line);
  color: var(--bone);
  font-family: var(--body);
  font-size: 1rem;
  padding: 0.9em 1em;
  border-radius: 0;
  transition: border-color 0.2s;
  width: 100%;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--steel) 50%), linear-gradient(135deg, var(--steel) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--signal); }

/* choice pills (looking for / budget) */
.choice-group { border: 0; display: grid; gap: 14px; }
.choice-group legend {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--steel);
  margin-bottom: 4px;
}
.choice-group .req { color: var(--signal); }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { display: inline-flex; }
.pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.pill span {
  font-family: var(--display);
  font-stretch: 108%;
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--steel);
  border: 1px solid var(--line);
  background: var(--carbon);
  padding: 0.75em 1.3em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  user-select: none;
}
.pill:hover span { color: var(--bone); border-color: rgba(237,234,228,0.4); }
.pill input:checked + span { background: var(--bone); border-color: var(--bone); color: var(--carbon); }
.pill input:focus-visible + span { border-color: var(--signal); }
textarea { resize: vertical; }
form .btn { justify-self: start; }
.form-status { min-height: 1.2em; }
.form-status.ok { color: #6fdb8f; }
.form-status.err { color: var(--signal); }

/* ============================================================ WORK LINKS (homepage grid) */
.work-link { display: block; position: relative; }
.work-link .view-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  font-family: var(--display);
  font-stretch: 108%;
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--carbon);
  background: var(--bone);
  padding: 0.55em 1em;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.work-link:hover .view-tag { opacity: 1; transform: none; }

/* ============================================================ GALLERY PAGE */
.gallery-page { opacity: 0; transition: opacity 0.5s ease; }
.gallery-page.g-ready { opacity: 1; }

.g-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px var(--pad);
  background: var(--bar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.g-brand {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}
.g-brand span { color: var(--steel); font-weight: 500; }
.g-back, .g-cta { color: var(--steel); transition: color 0.2s; }
.g-back:hover, .g-cta:hover { color: var(--bone); }
.g-back .arrow { color: var(--signal); margin-right: 4px; }

.g-loading { padding: 40vh var(--pad); text-align: center; }

/* subtle header — the gallery is the star */
.g-head {
  padding: calc(64px + clamp(28px, 4vw, 52px)) var(--pad) clamp(24px, 3vw, 36px);
  max-width: 1500px;
}
.g-crumb { color: var(--signal); }
.g-title {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  margin: 0.55em 0 0.6em;
}
.g-desc {
  color: var(--steel);
  font-size: 0.95rem;
  max-width: 62ch;
  margin-bottom: 1.3em;
}
.g-meta-row { display: flex; flex-wrap: wrap; gap: 10px 0; align-items: baseline; }
.g-meta-row em {
  font-style: normal;
  color: rgba(138, 138, 147, 0.6);
  margin-right: 8px;
}
.g-meta-row span:not(.sep) { color: var(--steel); }
.g-meta-row .sep { width: 1px; height: 10px; background: var(--line); margin: 0 18px; align-self: center; }

.g-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(10px, 1.4vw, 18px);
  padding: 0 var(--pad) clamp(48px, 6vw, 84px);
  max-width: 1500px;
}
.g-item { overflow: hidden; background: var(--graphite); cursor: zoom-in; grid-column: span 1; }
.g-item.wide { grid-column: span 2; }
.g-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2,0.6,0.2,1), filter 0.8s;
  filter: brightness(0.94);
}
.g-item.wide img { aspect-ratio: 16 / 8.5; }
.g-item.portrait img { aspect-ratio: 2 / 3; }
.g-item:hover img { transform: scale(1.03); filter: brightness(1); }

/* next project — quiet row */
.g-next {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin: 0 var(--pad) clamp(48px, 6vw, 80px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  max-width: calc(1500px - 2 * var(--pad));
  transition: color 0.25s;
}
.g-next .micro { transition: color 0.25s; }
.g-next-title {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--steel);
  transition: color 0.25s;
}
.g-next-arrow { color: var(--signal); margin-left: auto; transition: transform 0.25s; }
.g-next:hover .g-next-title, .g-next:hover .micro { color: var(--bone); }
.g-next:hover .g-next-arrow { transform: translateX(5px); }

.g-notfound { padding: 26vh var(--pad); }
.g-notfound h1 { font-size: clamp(2rem, 5vw, 4rem); margin: 0.5em 0 0.8em; }

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(11, 11, 12, 0.96);
  color: #edeae4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox .micro { color: #8a8a93; }
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(92vw, 1600px);
  max-height: 86vh;
  object-fit: contain;
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: none;
  border: 1px solid rgba(237, 234, 228, 0.22);
  color: #edeae4;
  font-size: 1.3rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  display: grid;
  place-items: center;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { border-color: var(--signal); color: var(--signal); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 22px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); }

@media (max-width: 860px) {
  .g-meta-row { flex-direction: column; gap: 8px; }
  .g-meta-row .sep { display: none; }
  .g-grid { grid-template-columns: 1fr; }
  .g-item.wide { grid-column: span 1; }
  .g-item.wide img, .g-item img { aspect-ratio: 3 / 2; }
  .g-next { grid-template-columns: 1fr auto; }
  .g-next-thumb { display: none; }
  .g-cta { display: none; }
  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
}

/* footer */
.pane-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px var(--pad);
}
.pane-foot a:hover { color: var(--bone); }
.foot-links { display: inline-flex; gap: 22px; flex-wrap: wrap; }

/* ============================================================ THEME TOGGLE */
/* pill switch: track + sliding knob */
.theme-toggle {
  position: relative;
  width: 46px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--graphite);
  border: 1px solid var(--line);
  padding: 0;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
}
.theme-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bone); /* white knob on dark, black knob on light */
  transition: transform 0.3s cubic-bezier(0.2, 0.6, 0.2, 1);
}
:root[data-theme="light"] .theme-toggle::after { transform: translateX(22px); }
.theme-toggle:hover { border-color: rgba(138, 138, 147, 0.55); }

/* floating desktop placement */
.theme-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
:root[data-theme="light"] .theme-float { box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14); }
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 1.6em;
}
.section-row .section-label { margin-bottom: 0; }

/* ============================================================ RESPONSIVE */
@media (max-width: 1060px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  /* rail becomes a static profile card above the content */
  .rail {
    position: static;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
    gap: 22px;
  }
  .rail-portrait img { aspect-ratio: 16 / 10; object-position: center 22%; }
  .rail-nav { display: none; }
  /* on mobile the toggle lives beside the availability badge */
  .theme-toggle.mobile-only { display: block; }
  .theme-float { display: none; }
  .gallery-page .theme-float { display: block; }
  .pane { margin-left: 0; }

  .mobile-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 14px var(--pad);
    background: var(--bar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .mb-name {
    font-family: var(--display);
    font-stretch: 125%;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
  }
  .mb-name span { color: var(--steel); font-weight: 500; }

  .hero-band { height: 56vh; }

  .work-grid { grid-template-columns: 1fr; }
  .work-item.wide { grid-column: span 1; }
  .work-item.wide .work-media img { aspect-ratio: 3 / 2; }
  .form-row { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; margin-inline: calc(-1 * var(--pad)); padding-inline: var(--pad); }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; flex: 0 0 auto; }
  /* scroll hint over the tabs */
  .tabs-hint {
    display: grid;
    place-items: center;
    position: absolute;
    top: 0;
    bottom: 0;
    right: calc(-1 * var(--pad));
    width: calc(var(--pad) + 34px);
    pointer-events: none;
    color: var(--signal);
    font-size: 1.05rem;
    background: linear-gradient(90deg, transparent, var(--carbon) 62%);
    animation: nudge 1.5s ease-in-out infinite;
    transition: opacity 0.4s;
  }
  .tabs-wrap.scrolled .tabs-hint { opacity: 0; animation: none; }
  @keyframes nudge { 50% { transform: translateX(5px); } }
  /* stacked footer */
  .pane-foot { flex-direction: column-reverse; align-items: flex-start; gap: 14px; }
  .foot-links { gap: 18px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
.g-top-actions { display: inline-flex; align-items: center; gap: 18px; }

/* section headers inside a gallery (multi-folder projects) */
.g-sec-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  padding: clamp(30px, 4vw, 48px) var(--pad) 18px;
  max-width: 1500px;
}
.g-sec-count { color: var(--signal); }
.g-grid + .g-sec-title { border-top: 1px solid var(--line); margin-top: clamp(24px, 3vw, 40px); }
