/* Layout: one continuous scroll (intro → portfolio → resume → about → contact)
   under a sticky header whose nav tracks the section in view. Light, monochrome,
   lots of whitespace, mono labels; black is the only "accent" for state. */
:root {
  --bg: #f4f5f7;          /* page ground, cool off-white */
  --surface: #ffffff;     /* cards */
  --ink: #0d0e11;         /* text, active state, primary buttons */
  --muted: #5a5f6b;       /* secondary text */
  --line: #e1e3e8;        /* hairlines */
  --tint: #eceef2;        /* chip / alt section fill */
  --blue: #2a55e5;        /* links and data highlights, used sparingly */
  --on-ink: #ffffff;

  --font-display: "Geist", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Geist", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  --step-4: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --header-h: 68px;
  --safe-top: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; text-wrap: balance; letter-spacing: -0.02em; line-height: 1.12; }
h1 { font-size: var(--step-4); font-weight: 600; letter-spacing: -0.035em; }
h2 { font-size: var(--step-3); font-weight: 600; }
h3 { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
.mono { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 0.9375rem/1 var(--font-body);
  padding: 11px 18px; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn-lg { padding: 14px 22px; font-size: 1rem; }
.btn-dark { background: var(--ink); color: var(--on-ink); }
.btn-dark:hover { background: #2a2c33; }
.btn-light { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-light:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-inv { background: var(--on-ink); color: var(--ink); }
.btn-inv:hover { background: #dfe1e6; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: var(--safe-top); z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; flex-shrink: 0; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--ink); color: var(--on-ink); font: 600 0.8125rem/1 var(--font-mono); letter-spacing: 0.02em;
}
.brand-name { font-size: 1rem; letter-spacing: -0.01em; }

.d-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px;
  border-radius: 999px; border: 0; background: transparent; color: var(--muted);
  font: 500 0.9375rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background .18s, color .18s;
}
.pill:hover { color: var(--ink); background: var(--tint); }
.pill.is-active, .pill-group.is-active .pill { background: var(--ink); color: var(--on-ink); }
.pill-group { display: inline-flex; border-radius: 999px; transition: background .18s; }
.pill-group .pill:first-child { padding-right: 10px; border-radius: 999px 0 0 999px; }
.pill-toggle { padding: 0 12px 0 8px; border-radius: 0 999px 999px 0; }
.pill-group.is-active .pill-toggle { box-shadow: inset 1px 0 0 rgba(255,255,255,.22); }
.pill-group:not(.is-active) .pill-toggle { box-shadow: inset 1px 0 0 var(--line); }
.pill-toggle svg { transition: transform .2s; }
.pill-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.pill-toggle[aria-expanded="true"] { background: var(--tint); color: var(--ink); }
.pill-group.is-active .pill-toggle[aria-expanded="true"] { background: #2a2c33; color: var(--on-ink); }
.d-filter-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--blue); color: #fff; font: 600 0.6875rem/18px var(--font-mono); text-align: center;
}
.d-cta { flex-shrink: 0; }

.m-current, .m-menu-btn { display: none; }

/* Desktop filter panel: drops down from the header */
.filter-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 48px -24px rgba(13,14,17,.25);
  animation: drop .22s ease-out;
}
@keyframes drop { from { transform: translateY(-8px); opacity: .6; } to { transform: none; opacity: 1; } }
.filter-panel .wrap { padding-block: 24px 22px; display: grid; gap: 20px; }
.filter-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.filter-panel-summary { color: var(--muted); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.filter-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px 32px; }
.filter-group h4 { font: 500 0.8125rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.filter-options { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-toggle {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: 500 0.875rem/1 var(--font-body); cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.chip-toggle:hover { border-color: var(--ink); }
.chip-toggle .n { font: 400 0.75rem/1 var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.chip-toggle[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.chip-toggle[aria-pressed="true"] .n { color: rgba(255,255,255,.7); }
.chip-toggle:disabled { opacity: .4; cursor: default; }
.chip-toggle:disabled:hover { border-color: var(--line); }
.filter-panel-foot { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }

/* ---------- Mobile header + menu ---------- */
@media (max-width: 880px) {
  :root { --header-h: 60px; }
  .d-nav, .d-cta, .filter-panel { display: none !important; }
  .bar { gap: 12px; }
  .brand-name { display: none; }
  .m-current { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
  .m-current-label { font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-filter-count { font: 500 0.75rem/1 var(--font-mono); padding: 4px 8px; border-radius: 999px; background: var(--ink); color: var(--on-ink); white-space: nowrap; }
  .m-menu-btn {
    display: grid; place-content: center; gap: 6px; width: 42px; height: 42px; flex-shrink: 0;
    border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer;
  }
  .m-menu-btn span { display: block; width: 18px; height: 1.6px; background: var(--ink); border-radius: 2px; transition: transform .2s; }
  .m-menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.8px) rotate(45deg); }
  .m-menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.8px) rotate(-45deg); }
}

.m-menu {
  position: absolute; left: 0; right: 0; top: 100%;
  max-height: calc(100dvh - var(--header-h) - var(--safe-top)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 48px -24px rgba(13,14,17,.3);
  padding-block: 8px 16px;
}
.m-list { list-style: none; margin: 0; padding: 0 clamp(16px, 4vw, 40px); }
.m-item { border-bottom: 1px solid var(--line); }
.m-item:last-child { border-bottom: 0; }
.m-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.m-row > a {
  flex: 1; padding: 16px 12px; margin-inline: -12px; border-radius: 12px; text-decoration: none;
  font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em;
}
.m-row > a.is-active { background: var(--ink); color: var(--on-ink); padding-inline: 14px; margin-inline: -2px; }
.m-expand {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 0.875rem/1 var(--font-body); cursor: pointer;
}
.m-expand svg { transition: transform .2s; }
.m-expand[aria-expanded="true"] svg { transform: rotate(180deg); }
.m-badge { min-width: 18px; height: 18px; border-radius: 999px; background: var(--blue); color: #fff; font: 600 0.6875rem/18px var(--font-mono); text-align: center; padding: 0 5px; }
.m-filters { padding: 4px 0 16px; }
.m-group { border: 1px solid var(--line); border-radius: var(--r-md); margin-top: 8px; overflow: hidden; }
.m-group > button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 13px 14px;
  background: var(--bg); border: 0; font: 500 0.9375rem/1 var(--font-body); color: var(--ink); cursor: pointer;
}
.m-group > button .sel { font: 400 0.75rem/1 var(--font-mono); color: var(--muted); }
.m-group > button svg { transition: transform .2s; margin-left: 8px; }
.m-group > button[aria-expanded="true"] svg { transform: rotate(180deg); }
.m-opts { list-style: none; margin: 0; padding: 4px 6px 8px; }
.m-opts label { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; cursor: pointer; font-size: 0.9375rem; }
.m-opts label:hover { background: var(--bg); }
.m-opts input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.m-opts .n { margin-left: auto; font: 400 0.75rem/1 var(--font-mono); color: var(--muted); }
.m-opts label.is-disabled { opacity: .45; }
.m-filters-foot { display: flex; gap: 10px; margin-top: 14px; }
.m-filters-foot .btn-dark { flex: 1; }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(48px, 8vw, 96px) clamp(48px, 7vw, 88px);
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 13%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -11px -11px;
  border-bottom: 1px solid var(--line);
  -webkit-mask-image: none;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 22px; }
.hero-copy h1 { max-width: 16ch; }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 52ch; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.stat-board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 1px 0 var(--line), 0 30px 60px -40px rgba(13,14,17,.35); overflow: hidden; }
.stat-board-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 0.8125rem; color: var(--muted); }
.stat-board-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.status { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--tint); color: var(--ink); font-size: 0.75rem; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #1f9d55; }
.stats { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.stats > div { padding: 22px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 6px; min-width: 0; }
.stats > div:nth-child(2n) { border-right: 0; }
.stats > div:nth-last-child(-n+2) { border-bottom: 0; }
/* Odd number of stats: the last one spans the full row */
.stats > div:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.stats > div:nth-child(even):nth-last-child(2) { border-bottom: 1px solid var(--line); }
.stats dt { font-size: 0.8125rem; color: var(--muted); order: 2; }
.stats dd { margin: 0; font: 600 clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem)/1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; order: 1; }
.stats dd small { font: 400 0.8125rem/1 var(--font-mono); color: var(--muted); letter-spacing: 0; margin-left: 4px; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 12px; margin-bottom: clamp(28px, 4vw, 44px); max-width: 720px; }
.section-sub { color: var(--muted); font-size: var(--step-1); line-height: 1.5; }
.mini-head { font: 500 0.8125rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* ---------- Portfolio ---------- */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 24px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.active-filters .mono { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-remove { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border-radius: 999px; border: 0; background: var(--ink); color: var(--on-ink); font: 500 0.8125rem/1 var(--font-body); cursor: pointer; }
.chip-remove span { opacity: .7; font-size: 1rem; line-height: .8; }
.active-filters .link-btn { margin-left: auto; font-size: 0.875rem; }

.featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.more-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: clamp(48px, 6vw, 72px) 0 18px; flex-wrap: wrap; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.is-filtering .featured-grid, .is-filtering .clients, .is-filtering .more-head h3 { display: none; }
.is-filtering .more-head { margin-top: 0; display: none; }

.card {
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; transition: border-color .18s, transform .18s, box-shadow .18s;
}
.card:hover { border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); box-shadow: 0 18px 40px -28px rgba(13,14,17,.35); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 400 0.75rem/1.3 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.card h3 { font-size: 1.1875rem; }
.card-meta { font-size: 0.875rem; color: var(--muted); }
.card-summary { color: var(--ink); font-size: 0.9375rem; line-height: 1.55; }
.card-metric { display: flex; align-items: baseline; gap: 10px; padding: 14px 0; border-block: 1px dashed var(--line); }
.card-metric strong { font: 600 1.75rem/1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.card-metric span { font-size: 0.8125rem; color: var(--muted); }
.card-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.card .open-case { align-self: flex-start; }

.card-featured { padding: 0; overflow: hidden; }
.card-featured .feat-body { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px 22px; flex: 1; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font: 400 0.75rem/1 var(--font-mono); padding: 6px 9px; border-radius: 6px; background: var(--tint); color: var(--ink); }
.tag[data-group="sector"] { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.tag[data-group="role"] { display: none; }

.empty { padding: 40px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-lg); }

/* Placeholder text waiting for real content */
.ph { background: color-mix(in srgb, var(--blue) 9%, transparent); color: inherit; border-bottom: 1px dashed color-mix(in srgb, var(--blue) 55%, transparent); border-radius: 3px; padding: 0 2px; }
.contact .ph { background: rgba(255,255,255,.1); border-bottom-color: rgba(255,255,255,.4); }

/* Client row with logo slot */
.client { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.logo-ph { border-style: dashed; background: var(--bg); font: 500 0.625rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.client-text { display: grid; gap: 2px; min-width: 0; }
.client-name { font-weight: 600; font-size: 0.9375rem; }
.client-desc { font-size: 0.8125rem; color: var(--muted); }

/* Clients logo wall */
.clients { margin-top: clamp(48px, 6vw, 72px); padding-block: 28px 0; border-top: 1px solid var(--line); display: grid; gap: 22px; }
.clients-label { font-size: var(--step--1); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: center; }
/* Flex + 1px gaps over a line-colored ground draws the hairlines; a short last row stretches to fill. */
.logo-wall { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--line); }
.logo-tile { flex: 1 1 calc(20% - 1px); display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 104px; padding: 20px; background: var(--surface); min-width: 0; text-align: center; }
.logo-tile img { max-width: 140px; max-height: 40px; width: auto; height: auto; filter: grayscale(1) contrast(1.1); opacity: .75; transition: filter .2s, opacity .2s; }
.logo-tile.is-linked { position: relative; }
.logo-tile.is-linked:hover img, .logo-tile.is-linked:focus-within img { filter: none; opacity: 1; }
.logo-link { position: absolute; inset: 0; z-index: 1; }
.logo-link:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; border-radius: 4px; }
.logo-tile-square img { max-height: 56px; }
.logo-tile-stacked { padding: 14px; }
.logo-tile-stacked img { max-width: min(100%, 190px); max-height: 72px; }
.logo-tile-mark { gap: 12px; }
.logo-tile-mark img { max-height: 52px; max-width: 52px; }
.logo-tile-mark span { font: 600 0.9375rem/1.2 var(--font-display); letter-spacing: -0.01em; color: var(--muted); text-align: left; transition: color .2s; }
.logo-tile-mark.is-linked:hover span { color: var(--ink); }
.logo-tile-ph { color: var(--muted); font: 500 0.875rem/1.2 var(--font-mono); }
.logo-tile-name span { font: 600 1.0625rem/1.2 var(--font-display); letter-spacing: -0.015em; color: var(--muted); transition: color .2s; }
.logo-tile-name.is-linked:hover span { color: var(--ink); }
.logo-initials { font: 600 0.8125rem/1 var(--font-display); letter-spacing: .02em; color: var(--ink); background: var(--tint); }

/* Photos and photo placeholders */
.photo { margin: 0; overflow: hidden; background: var(--tint); position: relative; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Diagrams and other images that must not be cropped: the frame takes the image's own shape. */
.photo.photo-whole { aspect-ratio: auto; }
.photo.photo-whole img { height: auto; }
.photo-ph { display: grid; place-items: center; color: var(--muted);
  --ph-a: #dfe3ea; --ph-b: #c9d0dc;
  background:
    radial-gradient(circle at 78% 22%, rgba(255,255,255,.65), transparent 42%),
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.18) 14px 15px),
    linear-gradient(140deg, var(--ph-a), var(--ph-b)); }
.photo-ph[data-sector="retail"] { --ph-a: #e6e1d8; --ph-b: #cfc6b6; }
.photo-ph[data-sector="finance"] { --ph-a: #dbe2ee; --ph-b: #bccadf; }
.photo-ph[data-sector="public"] { --ph-a: #dde7e2; --ph-b: #bfd2c8; }
.photo-ph[data-sector="defense"] { --ph-a: #dfe2e0; --ph-b: #c3c9c4; }
.photo-ph[data-sector="technology"] { --ph-a: #e2def0; --ph-b: #c8c1e0; }
.photo-cover { display: grid; place-items: center; --ph-a: #2a2f3a; --ph-b: #11141a;
  background:
    radial-gradient(circle at 80% 18%, rgba(255,255,255,.14), transparent 45%),
    radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(140deg, var(--ph-a), var(--ph-b)); }
.photo-cover[data-sector="retail"] { --ph-a: #5a4a36; --ph-b: #241d15; }
.photo-cover[data-sector="finance"] { --ph-a: #23395d; --ph-b: #0f1a2c; }
.photo-cover[data-sector="public"] { --ph-a: #24483d; --ph-b: #0f201b; }
.photo-cover[data-sector="defense"] { --ph-a: #3a4236; --ph-b: #171b15; }
.photo-cover[data-sector="technology"] { --ph-a: #3b2f63; --ph-b: #17122a; }
.photo-cover[data-sector="restaurant"] { --ph-a: #6a2e24; --ph-b: #2a120e; }
.photo-cover[data-sector="life-sciences"] { --ph-a: #1d4d5a; --ph-b: #0b2027; }
.cover-chip { display: grid; place-items: center; min-width: 120px; max-width: 62%; padding: 18px 24px; border-radius: var(--r-md); background: #fff; box-shadow: 0 18px 40px -18px rgba(0,0,0,.55); }
.cover-chip img { display: block; width: 180px; height: auto; max-width: 100%; max-height: 64px; object-fit: contain; }
.cover-name { font: 600 1rem/1.25 var(--font-display); letter-spacing: -0.01em; color: var(--ink); text-align: center; }
.photo-feat .cover-chip { margin-bottom: 56px; }
.photo-hero .cover-chip { padding: 26px 36px; }
.photo-hero .cover-chip img { width: 260px; max-height: 96px; }
.photo-more .cover-chip { min-width: 0; max-width: 78%; padding: 10px 14px; }
.photo-more .cover-chip img { width: 120px; max-height: 40px; }
.photo-ph-inner { display: grid; justify-items: center; gap: 8px; padding: 16px 20px; max-width: 30ch; text-align: center; color: #3d424c; }
.photo-ph-text { font: 400 0.75rem/1.4 var(--font-mono); }
.photo-ph .ph { background: rgba(255,255,255,.55); }
.photo-card { aspect-ratio: 16 / 9; margin: -22px -22px 0; border-radius: var(--r-lg) var(--r-lg) 0 0; max-width: none; }
.photo-feat { aspect-ratio: 4 / 3; max-width: 100%; }

.feat-media { position: relative; }
.feat-metric { position: absolute; left: 14px; bottom: 14px; right: 14px; display: flex; align-items: baseline; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: rgba(13,14,17,.86); color: var(--on-ink); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.feat-metric strong { font: 600 1.625rem/1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.feat-metric span { font: 400 0.75rem/1.3 var(--font-mono); color: rgba(255,255,255,.75); }
.photo-feat .photo-ph-inner { margin-bottom: 56px; }

/* ---------- Case study page ---------- */
a.card { text-decoration: none; color: inherit; }
a.card:hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.card-cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 0.9375rem; }
.card-cta span { transition: transform .18s; }
a:hover .card-cta span { transform: translateX(3px); }
.m-back { display: none; }

.cs-hero { display: grid; gap: 18px; justify-items: start; padding-block: clamp(32px, 5vw, 56px) clamp(28px, 4vw, 40px); }
.cs-hero h1 { max-width: 22ch; }
.cs-hero .lede { max-width: 60ch; }
.cs-back { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9375rem; color: var(--muted); text-decoration: none; margin-bottom: 8px; }
.cs-back:hover { color: var(--ink); }
.photo-hero { aspect-ratio: 21 / 9; border-radius: var(--r-lg); border: 1px solid var(--line); max-width: 100%; }
.photo-hero .photo-ph-text { font-size: 0.875rem; }

.cs-body { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.6fr); gap: clamp(32px, 6vw, 88px); align-items: start; padding-block: clamp(40px, 6vw, 72px) clamp(56px, 8vw, 96px); }
.cs-side { position: sticky; top: calc(var(--header-h) + var(--safe-top) + 24px); display: grid; gap: 22px; }
.cs-metric { display: grid; gap: 8px; padding: 22px; border-radius: var(--r-lg); background: var(--ink); color: var(--on-ink);
  background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 16px 16px; }
.cs-metric strong { font: 600 clamp(2.25rem, 1.8rem + 1.6vw, 3rem)/1 var(--font-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.cs-metric span { font: 400 0.8125rem/1.35 var(--font-mono); color: rgba(255,255,255,.72); }
.cs-facts { margin: 0; display: grid; }
.cs-facts > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.cs-facts dt { font: 400 0.75rem/1.6 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.cs-facts dd { margin: 0; font-size: 0.9375rem; font-weight: 500; }
.cs-side-block { display: grid; gap: 10px; }
.cs-side .tag[data-group="role"] { display: inline-block; }

.cs-content { display: grid; gap: 36px; min-width: 0; }
.cs-content section { display: grid; gap: 12px; }
.cs-content h2 { font-size: var(--step-2); }
.cs-content p { font-size: 1.0625rem; line-height: 1.7; max-width: 66ch; }
.cs-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; max-width: 66ch; }
.cs-list li { position: relative; padding: 12px 0 12px 28px; border-top: 1px solid var(--line); font-size: 1.0625rem; line-height: 1.6; }
.cs-list li::before { content: ""; position: absolute; left: 4px; top: 22px; width: 10px; height: 1.5px; background: var(--ink); }
.cs-list li:last-child { border-bottom: 1px solid var(--line); }
.case-quote { margin: 0; padding: 20px 22px; border-left: 3px solid var(--ink); background: var(--bg); border-radius: 0 var(--r-md) var(--r-md) 0; display: grid; gap: 10px; }
.case-quote p { font-size: var(--step-1); line-height: 1.45; letter-spacing: -0.01em; }
.case-quote footer { font-size: 0.875rem; color: var(--muted); }

.cs-missing { display: grid; gap: 18px; justify-items: start; padding-block: clamp(64px, 10vw, 128px); }

.cs-more { display: grid; gap: 18px; padding-block: 0 clamp(64px, 9vw, 104px); }
.cs-more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.more-card { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr); text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: border-color .18s, box-shadow .18s; }
.more-card:hover { border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); box-shadow: 0 18px 40px -28px rgba(13,14,17,.35); }
.photo-more { min-height: 150px; height: 100%; }
.photo-more .photo-ph-text { display: none; }
.more-text { display: grid; gap: 8px; align-content: center; padding: 20px; }
.more-kicker { font: 400 0.75rem/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.more-title { font-weight: 600; font-size: 1.125rem; line-height: 1.25; letter-spacing: -0.01em; }
.cs-contact { padding-top: clamp(56px, 8vw, 96px); }
.cs-contact h2 { font-size: var(--step-3); }

@media (max-width: 880px) {
  .page-case .m-back { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 500; font-size: 0.9375rem; flex-shrink: 0; }
  .cs-body { grid-template-columns: minmax(0, 1fr); }
  .cs-side { position: static; }
  .photo-hero { aspect-ratio: 4 / 3; }
  .cs-more-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .more-card { grid-template-columns: 112px minmax(0, 1fr); }
  .photo-more { min-height: 112px; }
}

/* ---------- Resume ---------- */
.resume-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.resume-side { position: sticky; top: calc(var(--header-h) + var(--safe-top) + 32px); display: grid; gap: 16px; justify-items: start; }
.side-block { display: grid; gap: 12px; margin-top: 12px; width: 100%; }
.cred-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.cred-list li { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.cred-list strong { font-weight: 500; font-size: 0.9375rem; }
.cred-list span { font-size: 0.8125rem; color: var(--muted); }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.job { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.job:first-child { border-top: 0; padding-top: 0; }
.job-years { font: 400 0.8125rem/1.6 var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.job-body { display: grid; gap: 10px; min-width: 0; }
.job-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.job-head h3 { font-size: var(--step-2); }
.job-head .where { color: var(--muted); font-size: 0.9375rem; }
.job-title { font-weight: 500; }
.job-summary { color: var(--muted); }
.job ul { margin: 4px 0 0; padding-left: 1.1em; display: grid; gap: 8px; }
.job li::marker { color: var(--muted); }
.job-projects { font-size: 0.875rem; color: var(--muted); }
.job-projects a { color: var(--ink); }

.competencies { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); display: grid; gap: 18px; }
.comp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; }
.comp { display: grid; gap: 10px; align-content: start; }
.comp h4 { font-size: 0.9375rem; font-weight: 600; letter-spacing: 0; }
.comp .tags .tag { background: var(--bg); border: 1px solid var(--line); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.portrait {
  position: relative; aspect-ratio: 4 / 5; max-width: 100%; border-radius: var(--r-lg);
  background: var(--tint); border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 14%, transparent) 1px, transparent 1px); background-size: 18px 18px;
}
.portrait > span:first-child { font: 600 clamp(3rem, 2rem + 4vw, 5rem)/1 var(--font-display); letter-spacing: -0.04em; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait-note { position: absolute; bottom: 14px; left: 14px; font-size: 0.75rem; color: var(--muted); }
.about-copy { display: grid; gap: 16px; }
.about-copy h2 { max-width: 20ch; }
.prose { display: grid; gap: 16px; max-width: 64ch; font-size: 1.0625rem; line-height: 1.65; }

/* ---------- Doug's photos ---------- */
.photo-band { position: relative; margin: 0; height: clamp(240px, 38vw, 520px); overflow: hidden; background: var(--ink); }
.photo-band img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-credit { position: absolute; right: clamp(16px, 4vw, 40px); bottom: 14px; font-size: 0.6875rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.82); text-shadow: 0 1px 8px rgba(0,0,0,.5); }

.about-gallery { display: grid; grid-template-columns: 0.75fr 1fr 1fr; grid-template-rows: auto; gap: 10px; margin-top: 18px; }
.g-item { position: relative; margin: 0; border-radius: var(--r-md); overflow: hidden; background: var(--tint); aspect-ratio: 3 / 4; min-width: 0; }
.g-item:not(.g-0) { aspect-ratio: auto; }
.g-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.g-open:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.g-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.g-item figcaption { pointer-events: none; position: absolute; left: 10px; bottom: 10px; padding: 4px 8px; border-radius: 6px; background: rgba(13,14,17,.62); color: #fff; font: 400 0.6875rem/1.2 var(--font-mono); backdrop-filter: blur(4px); }
.g-item figcaption .ph { background: rgba(255,255,255,.18); border-bottom-color: rgba(255,255,255,.5); }

/* ---------- Contact ---------- */
.contact { position: relative; isolation: isolate; overflow: hidden; background: var(--ink); color: var(--on-ink); padding-bottom: 0; }
.contact-bg { position: absolute; inset: 0; z-index: -1; background-size: cover; opacity: 0; }
.contact.has-photo .contact-bg { opacity: 1; }
.contact.has-photo .contact-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,14,17,.55) 0%, rgba(13,14,17,.78) 55%, rgba(13,14,17,.94) 100%); }
.contact.has-photo .contact-card { background: rgba(13,14,17,.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.contact-inner { display: grid; gap: 16px; }
.eyebrow-inv { color: rgba(255,255,255,.6); }
.contact h2 { font-size: var(--step-4); max-width: 16ch; letter-spacing: -0.035em; }
.contact-sub { color: rgba(255,255,255,.7); font-size: var(--step-1); }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 12px; margin-top: 24px; }
.contact-card { display: grid; gap: 10px; align-content: start; justify-items: start; padding: 20px; border: 1px solid rgba(255,255,255,.16); border-radius: var(--r-lg); min-width: 0; }
.contact-card .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.6); }
.contact-value { font-size: 1.125rem; font-weight: 500; text-decoration: none; overflow-wrap: anywhere; user-select: all; }
a.contact-value:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-card .btn { margin-top: 4px; padding: 9px 14px; font-size: 0.875rem; }
.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 28px; margin-top: clamp(56px, 8vw, 96px); border-top: 1px solid rgba(255,255,255,.14); font-size: 0.875rem; color: rgba(255,255,255,.6); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--on-ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .featured-grid { grid-template-columns: minmax(0, 1fr); }
  .card-featured { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); }
  .card-featured .feat-media, .card-featured .photo-feat { height: 100%; }
  .card-featured .photo-feat { aspect-ratio: auto; min-height: 260px; }
  .logo-tile { flex-basis: calc(50% - 1px); }
}
@media (max-width: 880px) {
  .hero-grid, .resume-grid, .about-grid { grid-template-columns: minmax(0, 1fr); }
  .resume-side { position: static; }
  .about-grid .portrait { max-width: 280px; }
  .contact-cards { grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; }
}
@media (max-width: 620px) {
  .about-gallery { grid-template-columns: 1fr 1fr; }
  .g-item.g-0 { grid-row: span 2; aspect-ratio: auto; }
  .g-item:not(.g-0) { aspect-ratio: 4 / 3; }
  .card-featured { display: flex; }
  .card-featured .photo-feat { aspect-ratio: 4 / 3; min-height: 0; }
  .logo-tile { min-height: 84px; padding: 14px; }
  .job { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .comp-grid { grid-template-columns: minmax(0, 1fr); }
  .active-filters .link-btn { margin-left: 0; }
}

/* ---------- Lightbox ---------- */
body.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: max(56px, var(--safe-top)) 16px 32px; background: rgba(8, 9, 12, .92); }
.lb-figure { margin: 0; display: grid; justify-items: center; gap: 12px; min-width: 0; height: 100%; align-content: center; }
.lb-figure img { max-width: 100%; max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); width: auto; height: auto; border-radius: var(--r-md); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-caption { color: rgba(255,255,255,.75); font-size: 0.75rem; letter-spacing: .04em; text-align: center; }
.lb-caption .ph { background: rgba(255,255,255,.14); border-bottom-color: rgba(255,255,255,.5); color: #fff; }
.lb-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.lb-btn:hover { background: rgba(255,255,255,.18); }
.lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb-close { position: absolute; top: max(12px, var(--safe-top)); right: 16px; }
@media (max-width: 620px) {
  .lightbox { grid-template-columns: minmax(0, 1fr); padding-inline: 12px; }
  .lb-prev, .lb-next { position: absolute; bottom: 24px; }
  .lb-prev { left: calc(50% - 56px); } .lb-next { right: calc(50% - 56px); }
  .lb-figure img { max-height: calc(100dvh - 190px); }
}
