/* ─── TOKENS ─── */
:root {
  --black: #0a0a0a;
  --white: #f5f4f0;
  --mid: #5e5e5e;
  --line: #d8d6d0;
  --accent: #236860;
  --accent-light: #f0f6f5;
  --mono: 'Courier New', 'Courier', monospace;
  --sans: 'Helvetica Neue', 'Helvetica', Arial, sans-serif;
  --pad: 32px;
  --max: min(calc(100vw - 64px), 1600px);
  --header-h: 52px;
  --string-h: 36px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* ─── SKIP LINK ─── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--pad);
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.04em;
  z-index: 10000;
}
.skip-link:focus { top: 8px; }

/* ─── HEADER / GUITAR STRING ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9000;
  background: var(--white);
  user-select: none;
  transition: background 0.2s;
}

.header-bar {
  height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto auto auto auto;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  gap: 16px;
}

/* Brand */
.brand {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--black);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.brand:hover { opacity: 0.5; }

/* String zone */
.string-zone {
  height: 100%;
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.string-svg {
  width: 100%;
  height: var(--string-h);
  display: block;
}

.string-path {
  stroke: var(--black);
  stroke-width: 1;
  fill: none;
  transition: stroke 0.15s;
}

.string-path.played {
  stroke: var(--accent) !important;
  filter: drop-shadow(0 0 3px rgba(35,104,96,0.5));
}

.string-path.played-muted {
  stroke: #c0392b !important;
  filter: drop-shadow(0 0 3px rgba(192,57,43,0.4));
}

/* Mute button */
.mute-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--black);
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.mute-btn:hover { background: var(--accent-light); border-color: var(--accent); }
.mute-btn.muted { color: #c0392b; border-color: #c0392b; }
.mute-btn svg { width: 14px; height: 14px; }

/* Expand btn */
.expand-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--mid);
  font-size: 0;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.expand-btn:hover { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }
.expand-btn.expanded { background: var(--accent); border-color: var(--accent); color: white; }
.expand-btn .chev { width: 14px; height: 14px; transition: transform 0.2s; }
.expand-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* Main nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.main-nav a {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--mid);
  padding: 6px 12px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--nav-active, var(--accent)); background: rgba(0,0,0,0.03); }
.main-nav a.current { color: var(--nav-active, var(--accent)); }

/* Strings panel */
.strings-panel { display: none; }
.strings-panel.open { display: block; }
.strings-grid {
  max-width: var(--max);
  margin: -8px auto 0;
  padding: 0 var(--pad);
  display: flex;
  flex-direction: column;
  position: relative;
}

.str-row {
  display: flex;
  align-items: center;
  height: var(--string-h);
  cursor: pointer;
}

.str-row svg {
  width: 100%;
  height: 100%;
}

/* Mobile nav */
.mobile-nav { display: none; }
.mobile-menu-btn {
  width: 28px; height: 28px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 2px;
  flex-shrink: 0;
}
.mobile-menu-btn svg { width: 14px; height: 14px; }

.mobile-menu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 8999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.07);
  /* hidden state */
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
}
.mobile-menu.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0s;
}
.mobile-menu a {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--mid);
  padding: 0 var(--pad);
  height: 52px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s, color 0.15s;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover, .mobile-menu a:active { background: var(--accent-light); color: var(--black); }
.mobile-menu a.current { color: var(--accent); }

/* ─── FOOTER ─── */
.site-footer {
  background: var(--black);
  color: rgba(255,255,255,0.5);
  border-top: 1px solid #1a1a1a;
  margin-top: 0;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--pad);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 40px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.footer-links a {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  transition: color 0.15s;
}
.footer-links a:hover { color: rgba(255,255,255,0.9); }

.footer-copy {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.5);
}

/* ─── SHARED TYPOGRAPHY ─── */
.label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  display: block;
}

h1 {
  font-family: var(--sans);
  font-size: clamp(52px, 7vw, 96px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

h2 {
  font-family: var(--sans);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

h3 {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

p { font-size: 14px; line-height: 1.65; color: var(--black); }
p.lede { font-size: 16px; line-height: 1.6; color: var(--black); }

/* Large intro paragraph used at the top of each case study overview */
.overview-p { font-size: 18px; line-height: 1.6; color: var(--black); max-width: 760px; }

/* ─── LAYOUT HELPERS ─── */
.w { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* Full-width border wrapper — constrains inner content but extends border edge-to-edge */
.index-intro { border-bottom: 1px solid var(--line); }

/* ─── HERO (shared) ─── */
.hero { border-bottom: 1px solid var(--line); }

.hero-eyebrow {
  padding: 16px var(--pad);
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
}

.hero-eyebrow-l { font-family: var(--sans); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--mid); }
.hero-eyebrow-r { font-family: var(--mono); font-size: 10px; color: var(--mid); }

.hero-title {
  padding: 48px var(--pad) 0;
  max-width: var(--max);
  margin: 0 auto;
}
.hero-title h1 { max-width: 900px; }

.hero-img {
  margin-top: 40px;
  aspect-ratio: 16 / 9;
  background: #e0ddd6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mid);
  letter-spacing: 0.06em;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}
/* Images filling placeholder containers */
.hero-img img,
.work-img-main img,
.work-img-sm img,
.impact-img-block img {
  width: 100%;
  height: auto;
  display: block;
}

.dark-cta-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Subtle shadow so screenshots separate from page background */
.work-img-main img,
.work-img-sm img {
  box-shadow: 0 1px 4px rgba(0,0,0,0.10), 0 0 0 1px rgba(0,0,0,0.05);
}

/* When a container holds a real image, let it size naturally */
.hero-img:has(img),
.work-img-main:has(img),
.work-img-sm:has(img) {
  aspect-ratio: unset;
  overflow: visible;
  background: transparent;
}

/* Caption below image group — used sparingly for genuine context */
.work-img-caption {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--mid);
  letter-spacing: 0.04em;
  margin-top: 8px;
}
.hero-img small { font-size: 10px; color: #aaa; text-align: center; }

/* ─── META STRIP (shared) ─── */
.meta-strip { border-bottom: 1px solid var(--line); }

.meta-strip-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  align-items: start;
}
.meta-strip-inner--4col { grid-template-columns: repeat(4, 1fr); }
.meta-strip-inner--5col { grid-template-columns: repeat(5, 1fr); }

.meta-cell {
  padding: 20px 24px 20px 0;
}
.meta-cell:not(:first-child) {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.meta-cell .label { margin-bottom: 6px; }
.meta-val { font-size: 12px; color: var(--black); line-height: 1.4; }

/* ─── SECTION ROWS (overview / context) ─── */
.section-row {
  border-bottom: 1px solid var(--line);
}

.section-row-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px var(--pad);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 80px;
  align-items: start;
}

.section-label-col { padding-top: 4px; }

/* ─── WORK ITEMS ─── */
.work-section { border-bottom: 1px solid var(--line); }

.work-section-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
}

.work-item { border-bottom: 1px solid var(--line); }
.work-item:last-child { border-bottom: none; }

.work-item-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 200px 1fr;
}

.work-tag-col {
  padding: 48px 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.work-num { font-family: var(--mono); font-size: 10px; color: var(--mid); letter-spacing: 0.06em; }

.work-tag {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--black);
  line-height: 1.6;
  margin-top: 4px;
  max-width: 120px;
}

.work-content { padding: 48px 0 48px 64px; }
.work-content h3 { margin-bottom: 16px; font-size: 22px; }
.work-content > p { max-width: 600px; margin-bottom: 28px; }

.work-img-main {
  background: #e0ddd6;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mid);
  flex-direction: column;
  gap: 8px;
  letter-spacing: 0.06em;
  margin-bottom: 0;
  overflow: hidden;
}
.work-img-main small { font-size: 10px; color: #aaa; text-align: center; max-width: 260px; }

.work-img-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; align-items: start; }

.work-img-sm {
  background: #e8e5de;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--mid);
  flex-direction: column;
  gap: 6px;
  letter-spacing: 0.06em;
  overflow: hidden;
}
.work-img-sm small { font-size: 9px; color: #aaa; text-align: center; max-width: 200px; }

/* ─── IMPACT ─── */
.impact { border-bottom: 1px solid var(--line); }

.impact-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--pad);
  border-bottom: 1px solid var(--line);
}

.impact-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.impact-cell {
  padding: 40px var(--pad);
  border-right: 1px solid var(--line);
}
.impact-cell:nth-child(3n) { border-right: none; }

.impact-n {
  font-family: var(--mono);
  font-size: clamp(48px, 5vw, 72px);
  font-weight: normal;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 16px;
  color: var(--black);
}

.impact-desc { font-size: 12px; line-height: 1.6; color: var(--mid); max-width: 280px; }

.impact-img { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.impact-img-block {
  background: #e0ddd6;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mid);
  flex-direction: column;
  gap: 8px;
  letter-spacing: 0.06em;
  margin: 40px 0;
  overflow: hidden;
}
.impact-img-block small { font-size: 10px; color: #aaa; }
.impact-img-block:has(img) { aspect-ratio: unset; overflow: visible; background: transparent; }
.impact-img-block:has(img) small { display: block; padding: 8px 0 0; text-align: left; }

/* ─── CLIENTS GRID ─── */
.clients { border-bottom: 1px solid var(--line); }

.clients-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--pad);
  border-bottom: 1px solid var(--line);
}

.clients-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-bottom: 1px solid var(--line);
}

.client-cell {
  border-right: 1px solid var(--line);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.15s;
}
.client-cell:nth-child(5n) { border-right: none; }
.client-cell:nth-child(n+6) { border-top: 1px solid var(--line); }
.client-cell:hover { background: var(--accent-light); }

.client-logo {
  height: 20px; width: auto; max-width: 80px;
  object-fit: contain; object-position: left center;
  filter: grayscale(1); opacity: 0.6;
}

.client-name { font-size: 12px; font-weight: 500; color: var(--black); margin-top: 4px; }
.client-sec { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mid); }

/* ─── DARK CTA BLOCK ─── */
.dark-cta { background: var(--black); color: var(--white); border-bottom: 1px solid #1a1a1a; }

.dark-cta-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px var(--pad);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.dark-cta .label { color: rgba(255,255,255,0.5); margin-bottom: 20px; }
.dark-cta h2 { color: var(--white); margin-top: 12px; margin-bottom: 20px; }
.dark-cta p { color: rgba(255,255,255,0.65); font-size: 15px; line-height: 1.65; max-width: 420px; }

.dark-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 12px 20px;
  margin-top: 32px;
  transition: background 0.15s, border-color 0.15s;
}
.dark-link:hover { background: var(--accent); border-color: var(--accent); }

/* Vertical list of dark-links (used on about page) */
.dark-link-list { display: flex; flex-direction: column; gap: 2px; }
.dark-link-list .dark-link { margin-top: 0; justify-content: space-between; }

.dark-cta-img {
  background: #1a1a1a;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  flex-direction: column;
  gap: 8px;
  letter-spacing: 0.06em;
  overflow: hidden;
}
.dark-cta-img small { font-size: 10px; color: rgba(255,255,255,0.12); text-align:center; max-width:200px; }

/* ─── SPECTRUM CARDS ─── */
.spectrum { margin: 32px 0; border: 1px solid var(--line); }

.spec-card {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0 24px;
  align-items: start;
}
.spec-card:last-child { border-bottom: none; }
.spec-card.owned { background: var(--accent-light); border-left: 2px solid var(--accent); }

.spec-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mid); padding-top: 3px; }
.spec-card h3 { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.spec-desc { font-size: 12px; line-height: 1.55; color: var(--mid); }
.spec-owned { font-family: var(--mono); font-size: 10px; color: var(--mid); margin-top: 8px; display: block; letter-spacing: 0.04em; }

/* ─── STAKES BOX ─── */
.stakes { margin-top: 32px; padding: 24px; border: 1px solid var(--line); }
.stakes p { font-size: 13px; line-height: 1.65; color: var(--mid); }

/* ─── DID GRID ─── */
.did { border-bottom: 1px solid var(--line); }
.did-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 80px;
  align-items: start;
}
.did-label-col { padding: 32px 0; border-right: 1px solid var(--line); }
.did-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid var(--line);
  list-style: none;
}
.did-item {
  font-size: 12px;
  color: var(--black);
  line-height: 1.5;
  padding: 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.did-item:nth-child(4n) { border-right: none; }
.did-item:nth-child(n+5) { border-bottom: none; }

/* ─── HOME PAGE ─── */
.index-hero {
  padding: 80px var(--pad) 0;
  max-width: var(--max);
  margin: 0 auto;
}

.index-hero-label { margin-bottom: 32px; }
.index-hero h1 { margin-bottom: 48px; max-width: 820px; }

.index-tagline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding-bottom: 64px;
  border-top: 1px solid var(--line);
  padding-top: 40px;
  margin-top: 0;
}

.index-tagline p { font-size: 15px; line-height: 1.65; color: var(--mid); max-width: 480px; }

/* Elsewhere section */
.elsewhere { border-bottom: 1px solid var(--line); }
.elsewhere-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--pad);
  border-bottom: 1px solid var(--line);
}
.elsewhere-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.elsewhere-cell {
  border-right: 1px solid var(--line);
  padding: 32px 0 32px 0;
}
.elsewhere-cell:not(:first-child) { padding-left: 40px; }
.elsewhere-cell:last-child { border-right: none; }

.elsewhere-cell .label { margin-bottom: 16px; }
.elsewhere-cell a {
  display: block;
  font-size: 13px;
  color: var(--black);
  padding: 4px 0;
  transition: color 0.15s;
  border-bottom: 1px solid transparent;
}
.elsewhere-cell a:hover { color: var(--accent); }

/* ─── ABOUT PAGE ─── */
.about-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px var(--pad);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  border-bottom: 1px solid var(--line);
}

.about-left .label { margin-bottom: 32px; }
.about-left h1 { font-size: clamp(40px, 5vw, 72px); margin-bottom: 40px; }
.about-left p + p { margin-top: 20px; }
.about-left p { font-size: 15px; line-height: 1.7; color: var(--black); }

.about-right { padding-top: 64px; }

/* Profile photo — replace background with an <img> or background-image when ready */
.about-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #e0ddd6;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--mid);
  overflow: hidden;
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cv-section { margin-bottom: 48px; }
.cv-section:last-child { margin-bottom: 0; }
.cv-section .label { margin-bottom: 20px; }

.cv-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.cv-row:last-child { border-bottom: none; }

.cv-title { font-size: 13px; font-weight: 500; color: var(--black); }
.cv-sub { font-size: 12px; color: var(--mid); margin-top: 2px; }
.cv-date { font-family: var(--mono); font-size: 10px; color: var(--mid); white-space: nowrap; }

.about-interests {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
}
.interest-cell {
  border-right: 1px solid var(--line);
  padding: 32px 24px;
}
.interest-cell:last-child { border-right: none; }
.interest-cell .label { margin-bottom: 16px; }
.interest-cell p { font-size: 13px; line-height: 1.6; color: var(--mid); }

.about-contact {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px var(--pad);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 80px;
  border-bottom: 1px solid var(--line);
}

.contact-links { display: flex; flex-direction: column; gap: 2px; }
.contact-link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.contact-link:last-child { border-bottom: none; }
.contact-link-label { font-family: var(--sans); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--mid); min-width: 60px; }
.contact-link-val { font-size: 13px; color: var(--black); transition: color 0.15s; }
.contact-link:hover .contact-link-val { color: var(--accent); }

/* ─── PROJECT CARDS (index page) ─── */
.project-cards {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-cards-header {
  padding: 24px var(--pad);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.project-cards-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--mid);
  letter-spacing: 0.06em;
}

.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  overflow: hidden;
}
.project-card:hover .project-card-arrow { opacity: 1; transform: translateX(0); }

/* Thumbnail — full width, tall */
.project-card-thumb {
  width: 100%;
  height: 660px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -60px 80px rgba(0,0,0,0.18);
}

/* Placeholder background tones — one per project */
.project-card-thumb--acs { background: #d8d5cc; }
.project-card-thumb--cmu { background: #cfd3ca; }
.project-card-thumb--ciq { background: #1a1a1a; }

/* CIQ thumb gets dark treatment — in-progress, restricted */
.project-card-thumb--ciq .thumb-label {
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.16em;
}
.project-card-thumb--ciq .thumb-hint {
  color: rgba(255,255,255,0.18);
}
.project-card-thumb--ciq::before,
.project-card-thumb--ciq::after {
  background: rgba(255,255,255,0.05);
}

.thumb-nda {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 8px;
}

.nda-tag {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

/* Thumbnail image — replaces placeholder when present */
.thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.project-card-thumb:has(.thumb-img)::before,
.project-card-thumb:has(.thumb-img)::after { display: none; }
.project-card-thumb:has(.thumb-img) .project-card-thumb-inner { display: none; }

/* Placeholder crosshair grid lines */
.project-card-thumb::before,
.project-card-thumb::after {
  content: '';
  position: absolute;
  background: rgba(0,0,0,0.08);
  pointer-events: none;
}
.project-card-thumb::before { /* horizontal rule */
  width: 100%; height: 1px;
  top: 50%; left: 0;
}
.project-card-thumb::after { /* vertical rule */
  width: 1px; height: 100%;
  left: 50%; top: 0;
}

.project-card-thumb-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 1;
}

.thumb-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
}

.thumb-hint {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(0,0,0,0.25);
}

/* Dark overlay — gradient always visible, darkens slightly on hover */
.card-dark-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 30%, rgba(0,0,0,0.62) 100%);
  transition: background 0.3s;
  z-index: 1;
  pointer-events: none;
}
.project-card:hover .card-dark-overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 20%, rgba(0,0,0,0.72) 100%);
}

/* Meta overlay — always visible */
.project-card-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 32px var(--pad) 40px;
  gap: 40px;
  z-index: 2;
}

.project-card-meta-left {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  flex: 1;
  min-width: 0;
}

.project-card-num {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.06em;
  padding-top: 6px;
  flex-shrink: 0;
}

.project-card-body {
  flex: 1;
  min-width: 0;
}

.project-card-title {
  font-size: clamp(24px, 3vw, 48px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 16px;
  color: #fff;
}

.project-card-desc {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin-bottom: 16px;
}

.project-card-arrow {
  font-family: var(--mono);
  font-size: 20px;
  color: rgba(255,255,255,0.85);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
  padding-top: 6px;
}

/* Tag list below project card description */
.project-card-tags { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* Individual tag pill — used in project cards and CIQ NDA tag */
.project-tag {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 3px 8px;
}

@media (max-width: 768px) {
  .project-card-thumb { height: 300px; }
  .project-card-meta { padding: 20px var(--pad) 24px; gap: 20px; }
  .project-card-meta-left { gap: 20px; }
  .project-card-arrow { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
  .project-card-thumb { height: 220px; }
}


.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ─── THEME TOGGLE BUTTON ─── */
.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--black);
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.theme-btn:hover { background: var(--accent-light); border-color: var(--accent); }
.theme-btn svg { width: 14px; height: 14px; }

/* ─── DARK MODE ─── */

/* System preference — applies unless user has explicitly chosen light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --black: #edeae3;
    --white: #141312;
    --mid: #a8a49f;
    --line: #272422;
    --accent: #38b2a5;
    --accent-light: #0d1f1e;
  }
}

/* User explicit dark preference */
[data-theme="dark"] {
  --black: #edeae3;
  --white: #141312;
  --mid: #a8a49f;
  --line: #272422;
  --accent: #38b2a5;
  --accent-light: #0d1f1e;
}

/* Sections that must stay dark regardless of theme.
   .site-footer and .dark-cta use var(--black) as their background,
   which inverts in dark mode — override back to fixed dark values. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .site-footer { background: #0c0b0a; border-top-color: #1e1d1b; }
  html:not([data-theme="light"]) .dark-cta { background: #0c0b0a; border-bottom-color: #1e1d1b; }
  html:not([data-theme="light"]) .dark-cta h2 { color: #edeae3; }
  html:not([data-theme="light"]) .dark-link { color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.2); }
  html:not([data-theme="light"]) .dark-cta-img { background: #111; }

  /* Placeholder image blocks */
  html:not([data-theme="light"]) .hero-img,
  html:not([data-theme="light"]) .work-img-main,
  html:not([data-theme="light"]) .impact-img-block { background: #252422; }
  html:not([data-theme="light"]) .work-img-sm { background: #201f1d; }

  /* Project card thumbnails */
  html:not([data-theme="light"]) .project-card-thumb--acs { background: #2a2825; }
  html:not([data-theme="light"]) .project-card-thumb--cmu { background: #252825; }
  html:not([data-theme="light"]) .project-card-thumb::before,
  html:not([data-theme="light"]) .project-card-thumb::after { background: rgba(255,255,255,0.05); }
  html:not([data-theme="light"]) .project-card-thumb--ciq::before,
  html:not([data-theme="light"]) .project-card-thumb--ciq::after { background: rgba(255,255,255,0.03); }
  html:not([data-theme="light"]) .thumb-hint { color: rgba(255,255,255,0.2); }
}

/* Same overrides for user explicit dark preference */
html[data-theme="dark"] .site-footer { background: #0c0b0a; border-top-color: #1e1d1b; }
html[data-theme="dark"] .dark-cta { background: #0c0b0a; border-bottom-color: #1e1d1b; }
html[data-theme="dark"] .dark-cta h2 { color: #edeae3; }
html[data-theme="dark"] .dark-link { color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.2); }
html[data-theme="dark"] .dark-cta-img { background: #111; }

html[data-theme="dark"] .hero-img,
html[data-theme="dark"] .work-img-main,
html[data-theme="dark"] .impact-img-block { background: #252422; }
html[data-theme="dark"] .work-img-sm { background: #201f1d; }

html[data-theme="dark"] .project-card-thumb--acs { background: #2a2825; }
html[data-theme="dark"] .project-card-thumb--cmu { background: #252825; }
html[data-theme="dark"] .project-card-thumb::before,
html[data-theme="dark"] .project-card-thumb::after { background: rgba(255,255,255,0.05); }
html[data-theme="dark"] .project-card-thumb--ciq::before,
html[data-theme="dark"] .project-card-thumb--ciq::after { background: rgba(255,255,255,0.03); }
html[data-theme="dark"] .thumb-hint { color: rgba(255,255,255,0.2); }

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  :root { --pad: 32px; }
}

@media (max-width: 768px) {
  /* Tighten gutters so content uses more of the screen */
  :root { --pad: 20px; --max: calc(100vw - 40px); }

  /* Header: 6 cols — brand | string | mute | expand | theme | hamburger (all can be visible at once) */
  .header-bar { grid-template-columns: auto 1fr auto auto auto auto; gap: 8px; }
  .main-nav { display: none; }
  .mobile-nav { display: block; }

  /* Hero */
  .hero-title { padding-top: 32px; }
  .index-hero { padding-top: 40px; }

  /* Meta strip → 2 cols */
  .meta-strip-inner { grid-template-columns: 1fr 1fr; }
  .meta-cell:nth-child(2n) { border-right: none; padding-right: 0; }
  .meta-cell:nth-child(2n+1):not(:first-child) { border-left: none; padding-left: 0; }
  .meta-cell:nth-child(n+3) { border-top: 1px solid var(--line); padding-top: 20px; }

  /* Section layout */
  .section-row-inner { grid-template-columns: 1fr; gap: 32px; padding: 40px var(--pad); }
  .did-inner { grid-template-columns: 1fr; gap: 0; }
  .did-label-col { border-right: none; border-bottom: 1px solid var(--line); }
  .did-grid { grid-template-columns: repeat(2, 1fr); }

  /* Work items */
  .work-item-inner { grid-template-columns: 1fr; }
  .work-tag-col { border-right: none; border-bottom: 1px solid var(--line); padding: 24px 0; flex-direction: row; gap: 16px; align-items: center; }
  .work-content { padding: 32px 0; }

  /* Impact */
  .impact-grid { grid-template-columns: 1fr 1fr; }
  .impact-cell { padding: 28px var(--pad); }
  .impact-cell:nth-child(3n) { border-right: 1px solid var(--line); }
  .impact-cell:nth-child(2n) { border-right: none; }

  /* Clients */
  .clients-grid { grid-template-columns: repeat(2, 1fr); }
  .client-cell { padding: 20px 16px; }
  .client-cell:nth-child(5n) { border-right: 1px solid var(--line); }
  .client-cell:nth-child(2n) { border-right: none; }

  /* CTA / tagline */
  .dark-cta-inner { grid-template-columns: 1fr; gap: 40px; padding: 48px var(--pad); }
  .index-tagline { grid-template-columns: 1fr; gap: 24px; }

  /* Elsewhere */
  .elsewhere-inner { grid-template-columns: 1fr; }
  .elsewhere-cell { border-right: none; border-bottom: 1px solid var(--line); padding: 28px 0; }
  .elsewhere-cell:not(:first-child) { padding-left: 0; }
  .elsewhere-cell:last-child { border-bottom: none; }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 48px; padding: 48px var(--pad); }
  .about-right { padding-top: 0; }
  .about-interests { grid-template-columns: 1fr 1fr; }
  .about-contact { grid-template-columns: 1fr; gap: 32px; padding: 40px var(--pad); }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  /* Meta strip → 1 col on very small screens */
  .meta-strip-inner { grid-template-columns: 1fr; }
  .meta-cell:nth-child(2n) { border-right: none; }
  .meta-cell:nth-child(n+2) { border-top: 1px solid var(--line); }

  .about-interests { grid-template-columns: 1fr; }
  .interest-cell { border-right: none; border-bottom: 1px solid var(--line); }
  .interest-cell:last-child { border-bottom: none; }
  .work-img-row { grid-template-columns: 1fr; }
}

/* ── Lightbox ── */
#img-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  cursor: zoom-out;
}
#img-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}
#img-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  display: block;
  cursor: zoom-out;
  box-shadow: 0 8px 48px rgba(0,0,0,0.5);
}

/* Zoom cursor on clickable images */
.work-img-main img,
.work-img-sm img,
.impact-img-block img,
.context-img img,
.dark-cta-img img {
  cursor: zoom-in;
}
.hero-img img { cursor: default; }
