/* ============================================================
   ASHWA RACING — PROJECTS PAGE  (redesigned)
   System: Barlow Condensed + Barlow · dark motorsport-editorial
   ============================================================ */

/* ─── Tokens ────────────────────────────────────────────────── */
:root {
  --red:        #e8001d;
  --black:      #0a0a0a;
  --charcoal:   #141414;
  --dark-grey:  #1c1c1c;
  --mid-grey:   #222222;
  --white:      #ffffff;

  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;
  --ease-expo:    cubic-bezier(0.16, 1, 0.3, 1);

  /* Programme accents */
  --cv-accent:  #e8001d;
  --ev-accent:  #00c2a8;
  --hyb-accent: #f59e0b;
  --hyp-accent: #7c3aed;
  --dv-accent:  #3b82f6;

  /* Active programme accent — JS updates this */
  --prog-accent: var(--cv-accent);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
}


/* ════════════════════════════════════════════════════════════
   HERO
════════════════════════════════════════════════════════════ */
.proj-hero {
  position: relative;
  min-height: 88vh;
  background: var(--black);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Background image */
.proj-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://ashwaracing.org/cdn-cgi/image/width=1920,format=auto/https://assets.ashwaracing.org/images/prototypes/Prototypes%20Banner.png');
  background-size: cover;
  background-position: center 30%;
  filter: brightness(0.75) saturate(0.9);
  transform: scale(1.04);
  transition: transform 10s var(--ease-expo);
  z-index: 0;
}

.proj-hero:hover .proj-hero-bg {
  transform: scale(1.0);
}

/* Layered gradient — heavier at bottom for text legibility */
.proj-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top,
      rgba(10, 10, 10, 1.00)   0%,
      rgba(10, 10, 10, 0.85)  20%,
      rgba(10, 10, 10, 0.40)  55%,
      rgba(10, 10, 10, 0.10) 100%);
}

/* Subtle technical grid overlay */
.proj-hero-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 72px 72px;
}

/* Right-side accent stripe */
.proj-hero-stripe {
  position: absolute;
  top: 0;
  right: 9%;
  z-index: 3;
  width: 2px;
  height: 100%;
  background: var(--prog-accent, var(--cv-accent));
  transition: background 0.4s ease;
}

/* Bottom hairline rule */
.proj-hero-rule {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  z-index: 4;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255,255,255,0.08) 20%,
    var(--prog-accent, var(--cv-accent)) 50%,
    rgba(255,255,255,0.08) 80%,
    transparent 100%
  );
  transition: background 0.4s ease;
}

/* Hero text content */
.proj-hero-content {
  position: relative;
  z-index: 4;
  padding: 0 7% 52px;
}

.proj-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  margin-bottom: 20px;
}

.eyebrow-dash {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--red);
  flex-shrink: 0;
}

.proj-hero-title {
  font-family: var(--font-display);
  font-size: clamp(6rem, 14vw, 12rem);
  font-weight: 800;
  line-height: 0.84;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 22px;
}

.proj-hero-title em {
  font-style: italic;
  color: var(--red);
  display: block;
}

.proj-hero-desc {
  font-size: clamp(0.82rem, 1.1vw, 0.96rem);
  line-height: 1.75;
  color: rgba(255,255,255,0.42);
  font-weight: 300;
  max-width: 480px;
}

/* ── Telemetry stats bar ──────────────────────────────────── */
.proj-hero-stats {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 18px 7%;
  border-top: 1px solid rgba(255,255,255,0.07);
  background: rgba(10,10,10,0.6);
  backdrop-filter: blur(8px);
  overflow-x: auto;
  scrollbar-width: none;
}

.proj-hero-stats::-webkit-scrollbar { display: none; }

.proj-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
  padding: 0 32px 0 0;
}

.proj-stat:first-child { padding-left: 0; }

.proj-stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--white);
  /* JS-driven count-up handled in script */
}

.proj-stat-label {
  font-family: var(--font-display);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  white-space: nowrap;
}

.proj-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
  margin-right: 32px;
}


/* ════════════════════════════════════════════════════════════
   PROGRAMME INDEX  (replaces the small card grid in the hero)
════════════════════════════════════════════════════════════ */
.prog-index {
  background: var(--charcoal);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.prog-index-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 7% 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.prog-index-label {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
}

.prog-index-count {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.18);
}

.prog-index-list {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.prog-index-list::-webkit-scrollbar { display: none; }

/* Each programme strip */
.prog-index-item {
  flex: 1;
  min-width: 160px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 28px 18px;
  cursor: pointer;
  border-right: 1px solid rgba(255,255,255,0.05);
  transition: background 0.22s ease;
  overflow: hidden;
  user-select: none;
}

.prog-index-item:last-child { border-right: none; }

/* Bottom accent line — slides up on hover/active */
.prog-index-item::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--item-accent, var(--red));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-expo);
}

.prog-index-item:hover,
.prog-index-item.active {
  background: rgba(255,255,255,0.03);
}

.prog-index-item:hover::after,
.prog-index-item.active::after {
  transform: scaleX(1);
}

/* Large background code watermark per strip */
.prog-index-item-bg-code {
  position: absolute;
  right: -8px;
  bottom: -10px;
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(255,255,255,0.025);
  pointer-events: none;
  transition: color 0.25s ease;
}

.prog-index-item:hover .prog-index-item-bg-code,
.prog-index-item.active .prog-index-item-bg-code {
  color: rgba(255,255,255,0.045);
}

.prog-index-item-code {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.35);
  line-height: 1;
  margin-bottom: 4px;
  transition: color 0.2s ease;
}

.prog-index-item:hover .prog-index-item-code,
.prog-index-item.active .prog-index-item-code {
  color: var(--item-accent, var(--red));
}

.prog-index-item-name {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.65);
  line-height: 1.3;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.prog-index-item:hover .prog-index-item-name,
.prog-index-item.active .prog-index-item-name {
  color: var(--white);
}

.prog-index-item-meta {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.22);
}

/* Active indicator dot */
.prog-index-item-dot {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--item-accent, var(--red));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.prog-index-item.active .prog-index-item-dot {
  opacity: 1;
}


/* ════════════════════════════════════════════════════════════
   PROGRAMME VIEWER
════════════════════════════════════════════════════════════ */
.prog-viewer {
  background: var(--charcoal);
  transition: opacity 0.2s ease;
}

/* ── Identity bar ─────────────────────────────────────────── */
.prog-identity {
  position: relative;
  padding: 0 7%;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  min-height: 80px;
}

/* Giant watermark code behind the identity bar */
.prog-code-bg {
  position: absolute;
  left: 3%;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(6rem, 16vw, 14rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.028);
  pointer-events: none;
  white-space: nowrap;
  transition: color 0.4s ease;
  user-select: none;
}

.prog-identity-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  flex-wrap: wrap;
}

.prog-identity-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.prog-code {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--prog-accent, var(--cv-accent));
  transition: color 0.3s ease;
  flex-shrink: 0;
}

/* Vertical separator between code and title */
.prog-identity-left::before {
  content: '';
  display: block;
  width: 2px;
  height: 44px;
  background: var(--prog-accent, var(--cv-accent));
  flex-shrink: 0;
  margin-left: 4px;
  transition: background 0.3s ease;
}

/* Remove the separator from the identity-left directly —
   we'll place it as a pseudo on a wrapper instead */
.prog-identity-left::before { display: none; }
.prog-identity-sep {
  display: block;
  width: 2px;
  height: 44px;
  background: var(--prog-accent, var(--cv-accent));
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.prog-identity-text {
  min-width: 0;
}

.prog-tag {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--prog-accent, var(--cv-accent));
  margin-bottom: 3px;
  transition: color 0.3s ease;
}

.prog-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.8vw, 1.6rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Year selector ──────────────────────────────────────────── */
.prog-years-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  max-width: 380px;
}

.prog-years {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  cursor: grab;
  padding: 2px 0;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto;
}

.prog-years::-webkit-scrollbar { display: none; }
.prog-years.grabbing { cursor: grabbing; }

.year-btn {
  flex: 0 0 auto;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.38);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 2px;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}

.year-btn:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.04);
}

.year-btn.active {
  background: var(--prog-accent, var(--cv-accent));
  border-color: var(--prog-accent, var(--cv-accent));
  color: var(--white);
}

/* Fade edges + arrow buttons — injected by JS */
.years-fade-edge {
  position: absolute;
  top: 0; bottom: 0;
  width: 40px;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease;
}

.years-fade-edge.left  {
  left: 0;
  background: linear-gradient(to right, var(--charcoal) 20%, transparent);
}

.years-fade-edge.right {
  right: 0;
  background: linear-gradient(to left, var(--charcoal) 20%, transparent);
}

.years-fade-edge.hidden { opacity: 0; }

.years-arrow {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 2px;
  cursor: pointer;
  color: rgba(255,255,255,0.45);
  font-size: 15px;
  z-index: 3;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.2s ease;
  user-select: none;
}

.years-arrow:hover {
  background: rgba(255,255,255,0.08);
  color: var(--white);
}

.years-arrow:active { transform: scale(0.95); }
.years-arrow.hidden { opacity: 0; pointer-events: none; }


/* ── Main split: image panel + content panel ─────────────── */
.prog-split {
  display: grid;
  grid-template-columns: 56% 44%;
  height: clamp(520px, 66vh, 760px);
}

/* ── Image panel ───────────────────────────────────────────── */
.prog-image-panel {
  position: relative;
  overflow: hidden;
  height: 100%;
}

/* Programme accent top-border */
.prog-image-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--prog-accent, var(--cv-accent));
  z-index: 3;
  transition: background 0.3s ease;
}

.prog-image-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease-expo), filter 0.4s ease, opacity 0.28s ease;
  filter: saturate(0.8) brightness(0.88);
}

.prog-viewer:hover .prog-image-panel img {
  transform: scale(1.04);
  filter: saturate(1.0) brightness(1.0);
}

/* Gradient fading right edge into content panel */
.prog-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0)    40%,
    rgba(20,20,20,0.5) 75%,
    var(--charcoal)  100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Slideshow counter — bottom-left of image */
.prog-slide-counter {
  position: absolute;
  bottom: 20px;
  left: 22px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.45);
  pointer-events: none;
}

.slide-sep {
  color: rgba(255,255,255,0.2);
  margin: 0 1px;
}

/* Year badge — bottom-right of image */
.prog-year-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 4;
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(255,255,255,0.08);
  padding: 0 16px 4px 0;
  pointer-events: none;
  user-select: none;
  transition: color 0.25s ease;
}

.prog-viewer:hover .prog-year-badge {
  color: rgba(255,255,255,0.13);
}


/* ── Content panel ──────────────────────────────────────────── */
.prog-content {
  padding: 36px 48px 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  justify-content: center;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

/* Sub-section labels */
.prog-section-label {
  font-family: var(--font-display);
  font-size: 0.58rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--prog-accent, var(--cv-accent));
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.3s ease;
}

.prog-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.06);
}

/* Changes list */
.prog-changes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prog-changes li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.52);
  font-weight: 300;
  line-height: 1.55;
}

.prog-changes li::before {
  content: '▸';
  color: var(--prog-accent, var(--cv-accent));
  font-size: 0.65rem;
  flex-shrink: 0;
  margin-top: 3px;
  transition: color 0.3s ease;
}

/* Description — slightly more visual weight than the list */
.prog-desc {
  font-size: 0.86rem;
  line-height: 1.78;
  color: rgba(255,255,255,0.4);
  font-weight: 300;
  border-left: 2px solid rgba(255,255,255,0.07);
  padding-left: 14px;
}

/* Specs strip */
.prog-specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.prog-spec {
  background: rgba(255,255,255,0.035);
  border-top: 2px solid var(--prog-accent, var(--cv-accent));
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.3s ease, background 0.2s ease;
}

.prog-spec:hover {
  background: rgba(255,255,255,0.055);
}

.prog-spec span {
  font-family: var(--font-display);
  font-size: 0.52rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}

.prog-spec strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1;
}

/* Achievement badge */
.prog-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid var(--prog-accent, var(--cv-accent));
  color: var(--prog-accent, var(--cv-accent));
  background: rgba(0,0,0,0.2);
  border-radius: 2px;
  width: fit-content;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.prog-badge::before {
  content: '★';
  font-size: 0.56rem;
}

/* Achievements list */
.prog-achievements {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prog-achievements li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.52);
  font-weight: 400;
  line-height: 1.5;
}

.prog-achievements li::before {
  content: '✓';
  color: var(--prog-accent, var(--cv-accent));
  font-size: 0.7rem;
  flex-shrink: 0;
  margin-top: 2px;
  transition: color 0.3s ease;
}


/* ════════════════════════════════════════════════════════════
   ALL PROGRAMMES — PORTFOLIO GRID
   (appears below the viewer as an alternate-entry point)
════════════════════════════════════════════════════════════ */
.all-progs {
  background: var(--black);
  padding: 64px 7%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.all-progs-header {
  max-width: 520px;
  text-align: center;
  margin: 0 auto 52px;
}

.all-progs-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 0.88;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--white);
}

.all-progs-title em {
  font-style: italic;
  color: var(--red);
  display: block;
}

.all-progs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 340px));
  justify-content: center;
  gap: 2px;
  width: 100%;
}

.prog-card {
  background: var(--dark-grey);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  border-top: 3px solid var(--card-accent, var(--red));
  cursor: pointer;
  transition: background 0.22s ease, transform 0.3s var(--ease-expo);
  position: relative;
  overflow: hidden;
}

.prog-card:hover {
  background: #222;
  transform: translateY(-4px);
}

.prog-card-code {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--card-accent, var(--red));
  line-height: 1;
  letter-spacing: -0.01em;
}

.prog-card-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--white);
  line-height: 1.25;
}

.prog-card-years {
  margin-top: auto;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.9);
  font-weight: 300;
}

.prog-card-arrow {
  position: absolute;
  bottom: 16px;
  right: 16px;
  font-size: 0.72rem;
  color: var(--card-accent, var(--red));
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.prog-card:hover .prog-card-arrow {
  opacity: 1;
  transform: translate(0, 0);
}


/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */
@media (max-width: 1280px) {
  .prog-years-wrapper { max-width: 280px; }
}

@media (max-width: 1200px) {
  .all-progs-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 960px) {
  .all-progs-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .prog-split {
    grid-template-columns: 1fr;
    height: auto;
  }

  .prog-image-panel {
    height: 58vw;
    min-height: 280px;
    max-height: 440px;
  }

  .prog-image-overlay {
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0) 40%,
      var(--charcoal) 100%
    );
  }

  .prog-content {
    padding: 32px 7%;
    overflow-y: visible;
  }

  .prog-title { white-space: normal; }
  .prog-years-wrapper { max-width: 100%; }

  .all-progs { padding: 48px 5%; }
  .all-progs-grid { gap: 0; }
}

@media (max-width: 700px) {
  .prog-index-list {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .prog-index-item {
    min-width: 140px;
    padding: 16px 18px 14px;
  }
}

@media (max-width: 600px) {
  .proj-hero { min-height: 75vh; }

  .proj-hero-content { padding: 0 5% 32px; }

  .proj-hero-stats { padding: 14px 5%; gap: 0; }

  .prog-identity-inner {
    flex-wrap: wrap;
    padding: 14px 0;
    gap: 10px;
  }

  .prog-identity-left { gap: 12px; }

  .prog-code { font-size: 2rem; }

  .prog-years-wrapper { width: 100%; max-width: 100%; }

  .prog-specs { grid-template-columns: repeat(2, 1fr); }

  .prog-content { padding: 26px 5%; gap: 18px; }

  .all-progs { padding: 40px 4%; }
  .all-progs-title { font-size: clamp(1.8rem, 4vw, 2.2rem); }
  .all-progs-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }
}

@media (max-width: 480px) {
  .prog-identity { padding: 0 4%; }

  .prog-code { font-size: 1.7rem; }

  .prog-tag { font-size: 0.68rem; }

  .prog-title { font-size: clamp(0.9rem, 3vw, 1.3rem); white-space: normal; }

  .prog-image-panel {
    height: 52vw;
    min-height: 220px;
    max-height: 360px;
  }

  .prog-content { padding: 22px 4%; gap: 14px; }

  .prog-specs { grid-template-columns: 1fr 1fr; }

  .prog-spec strong { font-size: 0.9rem; }

  .all-progs { padding: 32px 4%; }
  .all-progs-header { margin-bottom: 28px; }
  .all-progs-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 140px;
  }
}

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