@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --color-bg-dark: #14161A;   /* hero, headers */
  --color-bg-light: #F7F7F4;  /* body sections */
  --color-text-dark: #14161A;
  --color-text-light: #F7F7F4;
  --color-accent: #3E63DD;    /* CTA, links, primary accent */
  --color-accent-secondary: #D99A5B; /* tags/badges only, sparse use */
  --color-accent-secondary-on-light: #B45309; /* darkened for AA contrast on light backgrounds */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* supporting tokens (derived, not new colors) */
  --border-light: rgba(20, 22, 26, 0.1);
  --border-dark: rgba(247, 247, 244, 0.12);
  --card-bg-on-dark: rgba(247, 247, 244, 0.04);
  --card-bg-on-light: #FFFFFF;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --container-width: 1160px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text-dark);
  background: var(--color-bg-light);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.15;
}

p { margin: 0; line-height: 1.6; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(62, 99, 221, 0.14), rgba(217, 154, 91, 0.10)), var(--card-bg-on-light);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 3px rgba(20, 22, 26, 0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--color-text-dark);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-dark);
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.is-active {
  opacity: 1;
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-dark);
  margin: 4px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-6) 0;
}

.section-dark {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
}

.section-light {
  background: var(--color-bg-light);
  color: var(--color-text-dark);
}

.section-head {
  margin-bottom: var(--space-4);
  max-width: 640px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

.section-title {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 600;
}

.section-subtitle {
  margin-top: var(--space-2);
  font-size: 1.05rem;
  opacity: 0.75;
  max-width: 560px;
}

/* ---------- Hero ---------- */
.hero {
  padding: var(--space-6) 0 var(--space-5);
}

.hero-greeting {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-accent-secondary);
  margin-bottom: var(--space-2);
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  max-width: 900px;
  letter-spacing: -0.02em;
}

.hero-title .accent { color: var(--color-accent); }

.hero-subtitle {
  margin-top: var(--space-3);
  font-size: 1.15rem;
  max-width: 620px;
  opacity: 0.78;
}

.hero-actions {
  margin-top: var(--space-4);
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ---------- Hero (Home only, scoped to #home) ---------- */
#home.hero-premium {
  padding: var(--space-6) 0 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 55% at 88% 12%, rgba(62, 99, 221, 0.22), transparent 60%),
    radial-gradient(ellipse 65% 55% at 8% 95%, rgba(217, 154, 91, 0.18), transparent 60%),
    #EEEFF5;
}

#home .hero-greeting {
  color: var(--color-accent-secondary-on-light);
}

#home .hero-premium-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-5);
  align-items: center;
}

#home .hero-premium-content {
  max-width: 560px;
  padding-bottom: var(--space-6);
}

#home .hero-contact-links {
  margin-top: var(--space-3);
  display: flex;
  gap: var(--space-4);
}

#home .hero-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-dark);
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
}

#home .hero-contact-link:hover {
  opacity: 1;
  color: var(--color-accent);
}

#home .hero-contact-link svg {
  width: 16px;
  height: 16px;
}

#home .hero-premium-portrait {
  display: flex;
  justify-content: flex-end;
  align-self: end;
  min-width: 0;
  height: min(560px, 74vh);
}

#home .portrait-cutout-frame {
  height: 100%;
  max-width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

#home .portrait-cutout-img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom;
}

#home .portrait-fallback-icon {
  display: none;
  width: 96px;
  height: 96px;
  color: var(--color-text-dark);
  opacity: 0.4;
}

#home .portrait-cutout-frame.portrait-fallback {
  align-items: center;
  justify-content: center;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(62, 99, 221, 0.25), rgba(217, 154, 91, 0.2));
  border: 1px solid var(--border-light);
}

#home .portrait-cutout-frame.portrait-fallback .portrait-fallback-icon {
  display: block;
}

@media (max-width: 768px) {
  #home .hero-premium-inner {
    grid-template-columns: 1fr;
    gap: calc(var(--space-5) / 2);
    text-align: center;
  }

  #home .hero-premium-content {
    max-width: 100%;
    padding-bottom: var(--space-4);
  }

  #home .hero-premium-portrait {
    justify-content: center;
    align-self: center;
    height: min(360px, 46vh);
  }

  #home .portrait-cutout-frame {
    justify-content: center;
  }

  #home .hero-actions,
  #home .hero-contact-links {
    justify-content: center;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--color-accent);
  color: var(--color-text-light);
}

.btn-primary:hover { opacity: 0.92; }

.btn-outline {
  border-color: var(--border-dark);
  color: var(--color-text-light);
}

.section-light .btn-outline {
  border-color: var(--border-light);
  color: var(--color-text-dark);
}

/* ---------- Compact overview sections (Industries / Skills / Toolkit) ---------- */
.section-compact {
  padding: var(--space-5) 0;
}

.section-compact .section-head {
  margin-bottom: var(--space-3);
}

/* Shared card component */
.info-card {
  background: var(--card-bg-on-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 22px;
  height: 100%;
}

.info-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-2);
}

.info-card-icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(62, 99, 221, 0.1);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-card-icon svg {
  width: 18px;
  height: 18px;
}

.info-card-title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-dark);
}

.muted-inline {
  font-size: 0.82em;
  color: rgba(20, 22, 26, 0.5);
}

/* Section A — Industries, Platforms & Products */
.cards-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  align-items: stretch;
}

.dot-list li {
  position: relative;
  padding-left: 16px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: rgba(20, 22, 26, 0.72);
  margin-bottom: 7px;
}

.dot-list li:last-child { margin-bottom: 0; }

.dot-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* Section B — Core Capabilities */
.cards-row-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  align-items: stretch;
}

.plain-list li {
  font-size: 0.85rem;
  line-height: 1.4;
  color: rgba(20, 22, 26, 0.72);
  margin-bottom: 7px;
}

.plain-list li:last-child { margin-bottom: 0; }

/* Section C — Tools I Work With */
.tool-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tool-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: var(--space-2);
  align-items: start;
}

.tool-row-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(20, 22, 26, 0.5);
  padding-top: 7px;
}

.tool-row-label--accent {
  color: var(--color-accent);
}

.tool-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-chip {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: rgba(20, 22, 26, 0.75);
  background: var(--card-bg-on-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
}

.tool-chip--accent {
  background: rgba(62, 99, 221, 0.08);
  border-color: rgba(62, 99, 221, 0.35);
  color: var(--color-accent);
}

/* ---------- Placeholder / skeleton sections ---------- */
.placeholder-section {
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-3);
  text-align: center;
  color: var(--color-text-dark);
  opacity: 0.55;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.section-dark .placeholder-section {
  border-color: var(--border-dark);
  color: var(--color-text-light);
}

/* ---------- Portfolio ---------- */
.portfolio-subsection + .portfolio-subsection {
  margin-top: var(--space-6);
}

.portfolio-subsection-head {
  margin-bottom: var(--space-3);
  max-width: 640px;
}

.portfolio-subsection-title {
  font-size: 1.3rem;
  font-weight: 600;
}

.portfolio-subsection-subtitle {
  margin-top: 8px;
  font-size: 0.95rem;
  line-height: 1.55;
  opacity: 0.7;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  align-items: stretch;
}

.project-card {
  background: var(--card-bg-on-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(20, 22, 26, 0.08);
}

.project-card-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(62, 99, 221, 0.10), rgba(217, 154, 91, 0.08));
  color: rgba(20, 22, 26, 0.25);
  overflow: hidden;
}

.project-card-img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-thumb.has-image .project-card-img {
  display: block;
}

.project-card-thumb.has-image .project-card-thumb-fallback {
  display: none;
}

.project-card-thumb svg {
  width: 32px;
  height: 32px;
}

.project-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.project-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.project-card-desc {
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(20, 22, 26, 0.65);
}

.project-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(20, 22, 26, 0.68);
}

.project-meta-row svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: rgba(20, 22, 26, 0.4);
}

.project-meta-row--accent {
  color: var(--color-accent);
  font-weight: 500;
}

.project-meta-row--accent svg {
  color: var(--color-accent);
}

.project-card-link {
  margin-top: auto;
  padding-top: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-accent);
}

.project-card-link:hover {
  text-decoration: underline;
}

.project-card-link.is-disabled {
  color: rgba(20, 22, 26, 0.4);
  font-weight: 500;
  cursor: default;
}

.project-card--placeholder .project-card-thumb {
  background: var(--color-bg-light);
  color: rgba(20, 22, 26, 0.3);
}

.project-card--placeholder .project-card-thumb svg {
  width: 40px;
  height: 40px;
}

.project-card--placeholder .project-card-desc {
  opacity: 0.7;
}

@media (max-width: 860px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Project detail pages ---------- */
.project-back-link {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.project-back-link:hover {
  text-decoration: underline;
}

.project-hero-meta {
  margin-top: 10px;
  font-size: 1rem;
  opacity: 0.7;
}

.project-tags {
  margin-top: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Project detail: meta bar ---------- */
.project-meta-bar {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-light);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-3) var(--space-2);
}

.project-meta-bar-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(20, 22, 26, 0.5);
  margin-bottom: 4px;
}

.project-meta-bar-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-dark);
  line-height: 1.4;
}

@media (max-width: 860px) {
  .project-meta-bar {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .project-meta-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Project detail: prose ---------- */
.prose {
  max-width: 65ch;
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(20, 22, 26, 0.78);
}

.prose p + p {
  margin-top: var(--space-2);
}

.prose + .checklist {
  margin-top: var(--space-3);
}

/* ---------- Project detail: checklist ---------- */
.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 640px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.98rem;
  line-height: 1.6;
  color: rgba(20, 22, 26, 0.82);
}

.checklist-item svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  margin-top: 2px;
}

/* ---------- Project detail: stepper ---------- */
.stepper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-2);
}

.stepper::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-light);
}

.stepper-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.stepper-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--card-bg-on-light);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.stepper-icon svg {
  width: 20px;
  height: 20px;
}

.stepper-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
}

.stepper-caption {
  font-size: 0.78rem;
  line-height: 1.4;
  opacity: 0.65;
  max-width: 130px;
}

@media (max-width: 860px) {
  .stepper {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .stepper::before {
    display: none;
  }

  .stepper-step {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
  }

  .stepper-caption {
    max-width: none;
  }
}

/* ---------- Project detail: challenges ---------- */
.challenge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.challenge-card {
  background: var(--card-bg-on-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
}

.challenge-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(62, 99, 221, 0.1);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.challenge-icon svg {
  width: 18px;
  height: 18px;
}

.challenge-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.challenge-text {
  font-size: 0.9rem;
  line-height: 1.55;
  opacity: 0.7;
}

.challenge-divider {
  height: 1px;
  background: var(--border-light);
  margin: 16px 0;
}

.challenge-solution {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--color-text-dark);
}

.challenge-solution .arrow {
  color: var(--color-accent);
  font-weight: 600;
  margin-right: 4px;
}

.challenge-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 560px) {
  .challenge-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Project detail: feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.feature-card {
  background: var(--card-bg-on-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(62, 99, 221, 0.1);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 18px;
  height: 18px;
}

.feature-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
}

.feature-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  opacity: 0.68;
}

@media (max-width: 860px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Project detail: visuals ---------- */
.visuals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.visual-card {
  background: var(--card-bg-on-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
}

.visual-card svg {
  width: 100%;
  height: auto;
  display: block;
}

.visual-caption {
  margin-top: 10px;
  font-size: 0.85rem;
  text-align: center;
  opacity: 0.65;
}

.visuals-note {
  margin-top: var(--space-3);
  font-size: 0.88rem;
  font-style: italic;
  opacity: 0.6;
  max-width: 75ch;
}

@media (max-width: 860px) {
  .visuals-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Project detail: closing ---------- */
.closing-quote {
  border-left: 3px solid var(--color-accent);
  padding: 4px 0 4px var(--space-3);
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 70ch;
  color: var(--color-text-dark);
}

.next-project-banner {
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(62, 99, 221, 0.08), rgba(217, 154, 91, 0.06));
  border: 1px solid var(--border-light);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.next-project-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(20, 22, 26, 0.08);
}

.next-project-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 6px;
}

.next-project-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.next-project-arrow {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.next-project-banner:hover .next-project-arrow {
  transform: translateX(4px);
}

.next-project-arrow svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 560px) {
  .next-project-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
}

/* ---------- Project detail: hero banner image ---------- */
.project-hero-banner {
  margin-top: var(--space-4);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.project-hero-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Project detail: screens gallery ---------- */
.screens-group + .screens-group {
  margin-top: var(--space-4);
}

.screens-group-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

.screens-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.screens-gallery--3 {
  grid-template-columns: repeat(3, 1fr);
}

.screens-gallery-item {
  display: block;
}

.screens-gallery-frame {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--card-bg-on-light);
  box-shadow: 0 4px 12px rgba(20, 22, 26, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.screens-gallery-item:hover .screens-gallery-frame {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(20, 22, 26, 0.1);
}

.screens-gallery-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.screens-gallery-caption {
  margin-top: 8px;
  font-size: 0.85rem;
  text-align: center;
  opacity: 0.65;
}

.screens-links {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.screens-links-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(20, 22, 26, 0.6);
}

.screens-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-dark);
  background: var(--card-bg-on-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.screens-link-chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.screens-link-chip svg {
  width: 14px;
  height: 14px;
}

.screens-note {
  margin-left: auto;
  font-size: 0.85rem;
  font-style: italic;
  opacity: 0.6;
}

@media (max-width: 560px) {
  .screens-gallery {
    grid-template-columns: 1fr;
  }

  .screens-note {
    margin-left: 0;
  }
}

/* ---------- Section divider ---------- */
.section-divider {
  height: 1px;
  max-width: 220px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, rgba(62, 99, 221, 0.4), rgba(217, 154, 91, 0.35), transparent);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
  padding: var(--space-4) 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.footer-links {
  display: flex;
  gap: var(--space-3);
}

.footer-links a {
  opacity: 0.7;
  font-size: 0.9rem;
  transition: opacity 0.2s ease;
}

.footer-links a:hover { opacity: 1; color: var(--color-accent); }

.footer-copy {
  font-size: 0.82rem;
  opacity: 0.5;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .cards-row-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(62, 99, 221, 0.10), rgba(217, 154, 91, 0.07)), var(--card-bg-on-light);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(20, 22, 26, 0.06);
  }

  .nav-links.is-open { max-height: 300px; }

  .nav-links .nav-link {
    width: 100%;
    padding: 16px var(--space-3);
    border-top: 1px solid var(--border-light);
  }

  .nav-toggle { display: block; }
}

@media (max-width: 560px) {
  .section { padding: var(--space-5) 0; }
  .section-compact { padding: var(--space-4) 0; }
  .hero { padding: var(--space-5) 0 var(--space-4); }
  .footer-inner { flex-direction: column; align-items: flex-start; }

  .cards-row-3,
  .cards-row-4 {
    grid-template-columns: 1fr;
  }

  .tool-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tool-row-label {
    padding-top: 0;
  }
}

/* ==========================================================================
   Project page v2 — text-over-banner hero, floating meta card, two-col overview
   ========================================================================== */

/* ---------- Hero v2: banner + overlay ---------- */
.project-hero-banner-v2 {
  position: relative;
  margin-top: var(--space-3);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.project-hero-banner-v2 picture {
  display: block;
}

.project-hero-media-img {
  display: block;
  width: 100%;
  height: auto;
}

/* Scrim is opt-in only (add .project-hero-scrim in HTML + this modifier)
   for banners whose left zone is busy/dark and needs it for contrast.
   Default treatment below assumes a light-enough left zone and uses dark,
   brand-navy text directly on the photo instead of darkening it.
   .project-hero-banner-v2--on-dark switches the overlay to light text —
   pair it with .project-hero-scrim (opt-in on photo banners) or with
   .project-hero-banner-v2--gradient (bannerless projects), which both
   put light text on a dark background. */
.project-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 15, 30, 0.55) 0%, rgba(10, 15, 30, 0.55) 15%, transparent 55%);
  pointer-events: none;
}

.project-hero-banner-v2--scrim-strong .project-hero-scrim {
  background: linear-gradient(90deg, rgba(10, 15, 30, 0.72) 0%, rgba(10, 15, 30, 0.6) 25%, transparent 62%);
}

/* Page-specific: PTV's banner has a bright, variegated sunset sky behind
   the text, which left the eyebrow color under AA even with --scrim-strong.
   Deepened for this page only — the shared --scrim/--scrim-strong above
   are untouched. */
.project-hero-banner-v2--scrim-ptv .project-hero-scrim {
  background: linear-gradient(90deg, rgba(10, 15, 30, 0.85) 0%, rgba(10, 15, 30, 0.7) 28%, transparent 58%);
}

.project-hero-banner-v2--gradient {
  aspect-ratio: 1692 / 930;
  background: linear-gradient(135deg, #0d1226 0%, #182456 50%, #3651c4 100%);
}

@media (max-width: 767px) {
  .project-hero-banner-v2--gradient {
    aspect-ratio: auto;
    min-height: 380px;
  }
}

/* Gradient panels have no image, so they stay on-dark (white text) at
   every breakpoint — there's no "below the photo" mobile state for them. */
.project-hero-banner-v2--gradient .project-hero-overlay-v2 .eyebrow {
  color: var(--color-accent-secondary);
}

.project-hero-banner-v2--gradient .project-hero-overlay-v2 .hero-title {
  color: var(--color-text-light);
}

.project-hero-banner-v2--gradient .project-hero-tagline {
  color: rgba(247, 247, 244, 0.9);
}

.project-hero-banner-v2--gradient .hero-link-chip {
  color: var(--color-text-light);
  background: transparent;
  border-color: rgba(247, 247, 244, 0.5);
}

.project-hero-banner-v2--gradient .hero-link-chip:hover {
  border-color: var(--color-text-light);
  background: rgba(247, 247, 244, 0.12);
}

/* --on-dark is for a photo banner + scrim: white text only while the
   overlay actually sits on top of the photo (desktop/tablet). On mobile
   the same banner drops to the below-image layout on the page's light
   background, so text reverts to the default dark-navy treatment. */
@media (min-width: 768px) {
  .project-hero-banner-v2--on-dark .project-hero-overlay-v2 .eyebrow {
    color: var(--color-accent-secondary);
  }

  .project-hero-banner-v2--on-dark .project-hero-overlay-v2 .hero-title {
    color: var(--color-text-light);
  }

  .project-hero-banner-v2--on-dark .project-hero-tagline {
    color: rgba(247, 247, 244, 0.9);
  }

  .project-hero-banner-v2--on-dark .hero-link-chip {
    color: var(--color-text-light);
    background: transparent;
    border-color: rgba(247, 247, 244, 0.5);
  }

  .project-hero-banner-v2--on-dark .hero-link-chip:hover {
    border-color: var(--color-text-light);
    background: rgba(247, 247, 244, 0.12);
  }
}

.project-hero-overlay-v2 {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 480px;
  padding: var(--space-4);
}

.project-hero-overlay-v2 .eyebrow {
  color: var(--color-accent-secondary-on-light);
}

/* Page-specific: for banners bright enough that the default on-light
   eyebrow color lands right at the AA line (verified by sampling actual
   rendered pixels), deepen it a bit further. Opt-in only. */
.project-hero-banner-v2--eyebrow-deep .project-hero-overlay-v2 .eyebrow {
  color: #9A4B0F;
}

.project-hero-overlay-v2 .hero-title {
  color: var(--color-text-dark);
}

.project-hero-tagline {
  margin-top: var(--space-2);
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(20, 22, 26, 0.78);
  max-width: 420px;
}

.project-hero-links-v2 {
  margin-top: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-dark);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(20, 22, 26, 0.15);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.hero-link-chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(255, 255, 255, 0.85);
}

.hero-link-chip svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 767px) {
  .project-hero-banner-v2:not(.project-hero-banner-v2--gradient) .project-hero-overlay-v2 {
    position: static;
    max-width: none;
    padding: var(--space-3) 0 0;
  }

  .project-hero-banner-v2:not(.project-hero-banner-v2--gradient) .project-hero-tagline {
    max-width: none;
  }

  .project-hero-banner-v2:not(.project-hero-banner-v2--gradient) .project-hero-scrim {
    display: none;
  }

  .project-hero-banner-v2--gradient .project-hero-overlay-v2 {
    padding: var(--space-3);
  }
}

/* ---------- Floating meta card ---------- */
.project-meta-card {
  position: relative;
  z-index: 2;
  margin: -64px 0 0;
  background: var(--card-bg-on-light);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 48px rgba(20, 22, 26, 0.14);
  padding: var(--space-3) var(--space-4);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-3);
}

.project-meta-card-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.project-meta-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(62, 99, 221, 0.1);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-meta-card-icon svg {
  width: 16px;
  height: 16px;
}

.project-meta-card-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(20, 22, 26, 0.5);
}

.project-meta-card-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-dark);
  line-height: 1.4;
}

@media (max-width: 860px) {
  .project-meta-card {
    grid-template-columns: repeat(3, 1fr);
    margin-top: -48px;
  }
}

@media (max-width: 560px) {
  .project-meta-card {
    grid-template-columns: repeat(2, 1fr);
    margin-top: -32px;
    padding: var(--space-3);
    gap: var(--space-3) var(--space-2);
  }
}

/* ---------- Two-column overview ---------- */
.overview-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-4);
  align-items: start;
}

.overview-thesis {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  max-width: 34ch;
  margin-bottom: var(--space-2);
}

.overview-features-card {
  background: var(--card-bg-on-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.mini-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.mini-feature {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(62, 99, 221, 0.1);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-feature-icon svg {
  width: 16px;
  height: 16px;
}

.mini-feature-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
}

.mini-feature-desc {
  font-size: 0.82rem;
  line-height: 1.5;
  opacity: 0.68;
}

@media (max-width: 860px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .mini-feature-grid {
    grid-template-columns: 1fr;
  }
}
