/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg:        #FAFAF8;
  --bg-alt:    #F1F0ED;
  --text:      #111111;
  --muted:     #666666;
  --accent:    #E84029;
  --accent-dk: #C4301B;
  --border:    #E2E1DE;
  --nav-h:     64px;
  --max:       1100px;
  --pad:       clamp(1.25rem, 4vw, 2.5rem);
  --sans:      'Space Grotesk', sans-serif;
  --body:      'Inter', sans-serif;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Base ───────────────────────────────────────────────── */
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ── Navigation ─────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.nav-logo {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.nav-logo em { font-style: normal; color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

.nav-links .nav-cta {
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 1.2rem;
  border-radius: 5px;
  transition: background 0.2s;
}
.nav-links .nav-cta:hover { background: var(--accent); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all 0.25s;
}

/* ── Layout helpers ──────────────────────────────────────── */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

section { padding: 6rem 0; }

.section-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
}

h2 {
  font-family: var(--sans);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

/* ── Hero ────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: flex;
  align-items: center;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem var(--pad) 4rem;
}

.hero-eyebrow {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.hero-heading {
  font-family: var(--sans);
  font-size: clamp(3.75rem, 9.5vw, 8rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.035em;
  margin-bottom: 1.75rem;
}
.hero-heading .red { color: var(--accent); }

/* Anagram reveal — "Lamb, nor ham." morphs to "bram Lohman." and back on first visit */
.hero-heading.anagram { position: relative; }
.hero-heading.anagram .anagram-line { display: inline; }
.hero-heading.anagram .anagram-letter {
  display: inline-block;
  will-change: transform, opacity;
}
.hero-heading.anagram .anagram-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  pointer-events: none;
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .hero-heading.anagram .anagram-overlay { display: none; }
}

.hero-tagline {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: 0.6rem;
  color: #333;
}

.hero-note {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 2.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.85rem 1.75rem;
  border-radius: 5px;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-dark  { background: var(--text); color: var(--bg); }
.btn-dark:hover { background: var(--accent); }
.btn-ghost { border: 1.5px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dk); }

/* ── About ──────────────────────────────────────────────── */
#about { background: var(--bg-alt); }

.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 5rem;
  align-items: start;
  margin-top: 3rem;
}

.about-photo {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}
.about-photo img {
  width: 100%;
  border-radius: 6px;
}

.about-text p {
  color: #3a3a3a;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  font-size: 1.025rem;
}
.about-text p:last-of-type { margin-bottom: 0; }

.about-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  border: 1.5px solid var(--border);
  padding: 0.45rem 1rem;
  border-radius: 4px;
  transition: all 0.2s;
}
.social-link:hover { color: var(--text); border-color: var(--text); }
.social-link svg { width: 16px; height: 16px; }
.ci-icon svg { width: 18px; height: 18px; }

/* ── Client logos ───────────────────────────────────────── */
.logo-bar {
  padding: 3rem 0;
  background: var(--text);
}
.logo-bar-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem 1.75rem;
}
.logo-bar-track img {
  height: 46px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}
.logo-bar-track img.is-square { height: 62px; }
@media (max-width: 640px) {
  .logo-bar { padding: 2.5rem 0; }
  .logo-bar-track {
    gap: 1.5rem 2.5rem;
    justify-content: center;
  }
  .logo-bar-track img {
    height: 28px;
    max-width: 95px;
  }
  .logo-bar-track img.is-square { height: 40px; }
}

/* ── Services ───────────────────────────────────────────── */
.services-intro {
  max-width: 580px;
  color: var(--muted);
  margin-top: 0.75rem;
  font-size: 1rem;
  line-height: 1.7;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.service-card {
  padding: 2rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s, transform 0.2s;
}
.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.service-icon {
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  display: block;
}
.service-card h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.service-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Stats ──────────────────────────────────────────────── */
#stats {
  background: var(--text);
  padding: 4rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-number {
  font-family: var(--sans);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-desc {
  font-size: 0.85rem;
  color: rgba(250, 250, 248, 0.6);
  line-height: 1.45;
}
.stat-desc strong {
  display: block;
  color: rgba(250, 250, 248, 0.9);
  font-weight: 500;
  font-family: var(--sans);
}

/* ── Portfolio ──────────────────────────────────────────── */
#work { background: var(--bg-alt); }

.work-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}
.work-header p {
  max-width: 420px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.show-more {
  display: none;
  margin: 2rem auto 0;
  padding: 0.85rem 1.5rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
}
.show-more:hover { border-color: var(--text); }

.p-card {
  background: var(--bg);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
  display: block;
}
.p-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}

.p-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-alt);
}
.p-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.p-card:hover .p-card-img img { transform: scale(1.05); }

.p-card-body { padding: 1.4rem; }

.p-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}
.p-tag {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  background: var(--bg-alt);
  border-radius: 3px;
  color: var(--muted);
}

.p-card-body h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.p-card-body p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 1rem;
}
.p-link {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.2s;
}
.p-link:hover { gap: 0.55rem; }

/* ── Experience ─────────────────────────────────────────── */
.exp-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 5rem;
  margin-top: 3rem;
}

.exp-item {
  padding-bottom: 2.25rem;
  margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--border);
}
.exp-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.2rem;
}
.exp-company {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
}
.exp-period {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 0.15rem;
  font-weight: 500;
}
.exp-company-desc {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.55;
  margin: 0.3rem 0 0.5rem;
}
.exp-role {
  font-size: 0.825rem;
  color: var(--accent);
  font-weight: 600;
  font-family: var(--sans);
  margin-bottom: 0.65rem;
}
.exp-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

.sidebar-section { margin-bottom: 3rem; }
.sidebar-section:last-child { margin-bottom: 0; }

.sidebar-section h3 {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.cert-item { margin-bottom: 1.25rem; }
.cert-item:last-child { margin-bottom: 0; }
.cert-item h4 {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.cert-item .cert-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.skill-groups { display: flex; flex-direction: column; gap: 1.25rem; }
.skill-group-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
}

/* ── Contact ────────────────────────────────────────────── */
#contact { background: var(--bg-alt); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  margin-top: 3rem;
  align-items: start;
}

.contact-blurb {
  font-size: 1.05rem;
  color: #3a3a3a;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-items { display: flex; flex-direction: column; gap: 1rem; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.925rem;
}
.ci-icon {
  width: 38px;
  height: 38px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.05rem;
  color: var(--accent);
}
.ci-label { font-weight: 500; font-family: var(--sans); }
.ci-value { color: var(--muted); font-size: 0.875rem; }

.contact-cta {
  padding: 2.5rem;
  background: var(--text);
  border-radius: 8px;
  color: var(--bg);
}
.contact-cta h3 {
  font-family: var(--sans);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}
.contact-cta p {
  font-size: 0.9rem;
  color: rgba(250,250,248,0.7);
  margin-bottom: 1.75rem;
  line-height: 1.65;
}

/* ── Footer ────────────────────────────────────────────── */
footer {
  background: #0D0D0D;
  color: rgba(250,250,248,0.5);
  padding: 1.75rem var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  font-family: var(--sans);
}
footer a { color: rgba(250,250,248,0.5); transition: color 0.2s; }
footer a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 1.5rem; }

/* ═══════════════════════════════════════════════════════════ */
/* ── Detail page styles ─────────────────────────────────── */
/* ═══════════════════════════════════════════════════════════ */

.detail-page main { padding-top: var(--nav-h); }

.detail-breadcrumb {
  padding: 2rem 0 0.5rem;
  font-family: var(--sans);
  font-size: 0.825rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.detail-breadcrumb a {
  color: var(--muted);
  transition: color 0.2s;
}
.detail-breadcrumb a:hover { color: var(--accent); }
.detail-breadcrumb .sep { opacity: 0.5; }
.detail-breadcrumb .current { color: var(--text); font-weight: 500; }

.detail-header {
  padding: 2rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.detail-title {
  font-family: var(--sans);
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.detail-client-logos {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}
.detail-client-logos img {
  height: 64px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}
@media (max-width: 640px) {
  .detail-title-row { gap: 1rem; }
  .detail-client-logos img { height: 44px; max-width: 100px; }
}

.detail-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  line-height: 1.5;
  max-width: 720px;
  margin-bottom: 1.5rem;
}
.detail-client-desc {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.6;
  max-width: 680px;
  margin-bottom: 1.1rem;
  padding-left: 0.85rem;
  border-left: 2px solid var(--accent);
}

.detail-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.detail-tags .p-tag {
  background: var(--bg);
  border: 1px solid var(--border);
}

/* Project content layout */
.detail-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: start;
  margin-bottom: 4rem;
}

.detail-prose p {
  color: #333;
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}
.detail-prose p:last-child { margin-bottom: 0; }
.detail-prose h2 {
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: -0.015em;
}

/* Info sidebar */
.detail-info {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
  padding: 1.75rem;
  background: var(--bg-alt);
  border-radius: 8px;
}
.detail-info-row {
  margin-bottom: 1.25rem;
}
.detail-info-row:last-child { margin-bottom: 0; }
.detail-info-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.detail-info-value {
  font-family: var(--sans);
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text);
}
.detail-info-value a {
  color: var(--accent);
  word-break: break-word;
  transition: color 0.2s;
}
.detail-info-value a:hover { color: var(--accent-dk); text-decoration: underline; }
.detail-info-value a + a { display: block; margin-top: 0.25rem; }

/* Carousel */
.detail-carousel {
  position: relative;
  max-width: 560px;
  margin: 0 auto 4rem;
}

.carousel-viewport {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  position: relative;
}

.carousel-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.carousel-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  z-index: 2;
}

.detail-carousel:hover .carousel-arrow,
.carousel-arrow:focus-visible {
  opacity: 1;
}

.carousel-arrow:hover { background: var(--bg); }
.carousel-arrow.prev { left: 0.6rem; }
.carousel-arrow.next { right: 0.6rem; }

.carousel-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot:hover { background: var(--muted); }
.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.4);
}

/* Next-project footer */
.detail-nav {
  padding: 3rem 0 5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.detail-nav-link {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.2s, color 0.2s;
}
.detail-nav-link:hover {
  color: var(--accent);
  gap: 0.7rem;
}
.detail-nav-link.next { color: var(--accent); }
.detail-nav-link .label {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.15rem;
}
.detail-nav-next { text-align: right; }

/* ── Cookie banner ──────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}
.cookie-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.cookie-btn {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.55rem 1.1rem;
  border-radius: 5px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.cookie-btn-dark {
  background: var(--bg);
  color: var(--text);
}
.cookie-btn-dark:hover { background: var(--accent); color: #fff; }
.cookie-btn-ghost {
  background: transparent;
  color: var(--bg);
  border-color: rgba(255, 255, 255, 0.4);
}
.cookie-btn-ghost:hover { border-color: var(--bg); }

@media (max-width: 640px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
    padding: 1rem;
  }
  .cookie-banner-actions { justify-content: flex-end; }
  .cookie-btn { padding: 0.55rem 1rem; }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-photo { position: static; max-width: 240px; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .exp-grid { grid-template-columns: 1fr; gap: 3rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .work-header { flex-direction: column; align-items: flex-start; }

  .detail-body { grid-template-columns: 1fr; gap: 2.5rem; }
  .detail-info { position: static; }
}

@media (max-width: 640px) {
  section { padding: 4rem 0; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .hero-heading { letter-spacing: -0.025em; }
  #hero { min-height: auto; }
  .hero-inner { padding: 1.5rem var(--pad) 2rem; }
  .hero-eyebrow { margin-bottom: 1.25rem; }
  .hero-heading { margin-bottom: 1.25rem; }
  .hero-note { margin-bottom: 1.75rem; }
  .detail-carousel { max-width: 100%; }
  .carousel-arrow { opacity: 1; }

  /* Work: reveal cards in batches of 3 */
  .portfolio-grid[data-visible="3"] .p-card:nth-child(n+4) { display: none; }
  .portfolio-grid[data-visible="6"] .p-card:nth-child(n+7) { display: none; }
  .show-more { display: inline-flex; align-items: center; justify-content: center; }

  /* Experience: accordion */
  .exp-item {
    position: relative;
    padding-right: 1.75rem;
    cursor: pointer;
    outline-offset: 4px;
  }
  .exp-item::after {
    content: '';
    position: absolute;
    top: 0.2rem;
    right: 0.25rem;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
  }
  .exp-item.is-collapsed::after { transform: rotate(-45deg); }
  .exp-item.is-collapsed .exp-desc,
  .exp-item.is-collapsed .exp-company-desc { display: none; }
  .exp-item.is-collapsed {
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
  }
  .exp-item.is-collapsed .exp-role { margin-bottom: 0; }
}

/* Mobile nav open state */
.nav.is-open .nav-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: absolute;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem var(--pad) 2rem;
  gap: 1.25rem;
}
.nav.is-open .nav-links .nav-cta {
  align-self: flex-start;
}
