/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Legacy variables mapped to phosphor tokens.
     --text-dim is intentionally NOT re-aliased here — it's already defined
     in tokens.css with the same name. A self-alias would create a CSS
     custom property cycle. */
  --bg:        var(--bg-deep);
  --bg-2:      var(--bg-elevated);
  --bg-card:   var(--bg-surface);
  --border:    var(--border-phosphor);
  --accent:    var(--accent-phosphor);
  --accent-2:  var(--accent-phosphor);
  --text:      var(--text-primary);
  --radius:    var(--radius-lg); /* preserve original 12px until Task 15 reviews */
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;   /* anchor jumps land below the fixed nav */
  background: var(--bg);
}

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Container ──────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Nav ────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2.5rem;
  background: rgba(5, 8, 7, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-phosphor);
  font-family: var(--font-mono);
}

.nav-logo {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  text-decoration: none;
}
.nav-logo span { color: var(--accent-phosphor); }
.nav-logo::before { content: '▌ '; color: var(--accent-phosphor); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}
.nav-links a,
.nav-contact-toggle {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color var(--transition);
}
.nav-links a:hover,
.nav-contact-toggle:hover,
.nav-contact-toggle[aria-expanded="true"] { color: var(--accent-phosphor); }
.nav-links a::before,
.nav-contact-toggle::before { content: '// '; opacity: 0.6; }
/* Project pages have a "← Portfolio" back link — opt out of the // prefix */
.nav-links a.nav-back::before { content: ''; }

/* ── Contact dropdown: button unrolls a LinkedIn / Email panel ── */
.nav-contact { position: relative; }
.nav-contact-toggle {
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}
.nav-contact-toggle::after {
  content: '▾';
  display: inline-block;
  margin-left: 0.4em;
  transition: transform 0.3s var(--transition-snap);
}
.nav-contact-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }

.contact-menu {
  position: absolute;
  top: calc(100% + 1.4rem);
  right: 0;
  min-width: 15rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.4rem;
  background: var(--bg-elevated); /* must be opaque: hero buttons sit right underneath */
  border: 1px solid var(--border-phosphor-strong);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 0 24px rgba(74, 222, 128, 0.08);
  /* Closed: clipped to zero height from the top, so opening unrolls downward.
     The negative insets leave room for the shadow once open. */
  clip-path: inset(-40px -40px 100% -40px);
  opacity: 0;
  visibility: hidden;
  transition:
    clip-path 0.35s var(--transition-snap),
    opacity 0.2s ease,
    visibility 0s linear 0.35s;
}
.contact-menu.is-open {
  clip-path: inset(-40px -40px -40px -40px);
  opacity: 1;
  visibility: visible;
  transition:
    clip-path 0.35s var(--transition-snap),
    opacity 0.2s ease,
    visibility 0s;
}
.nav-links .contact-option {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0.85rem;
  border-radius: 6px;
  text-transform: none;
  letter-spacing: normal;
  transition: background var(--transition);
}
.nav-links .contact-option::before { content: none; }
.nav-links .contact-option:hover,
.nav-links .contact-option:focus-visible { background: rgba(74, 222, 128, 0.08); }
.contact-option-label {
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-phosphor);
}
.contact-option-detail {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}
@media (prefers-reduced-motion: reduce) {
  .contact-menu, .contact-menu.is-open, .nav-contact-toggle::after { transition: none; }
}

.nav-status {
  font-size: 0.66rem;
  color: var(--accent-phosphor);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-status::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--accent-phosphor);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.7);
}

/* Nav stays one row at every width: items never wrap, and lower-value
   items drop out as space runs short. In-page (#) links are the first to
   go on project pages — scrolling covers them on small screens. */
.nav-logo, .nav-links a, .nav-contact-toggle, .nav-status { white-space: nowrap; }

/* Wombulator nav carries an extra Report link, so it sheds items earlier */
@media (max-width: 1520px) {
  .nav:has(.nav-report) .nav-links li:has(> .nav-status) { display: none; }
}
@media (max-width: 1440px) {
  .nav-links { gap: 1.4rem; }
  .nav:has(.nav-back) .nav-links li:has(> .nav-status) { display: none; }
}
@media (max-width: 1340px) {
  .nav:has(.nav-report) .nav-links li:has(> a[href^="#"]) { display: none; }
}
@media (max-width: 1280px) {
  .nav-links li:has(> .nav-status) { display: none; }
}
@media (max-width: 1240px) {
  .nav:has(.nav-back) .nav-links li:has(> a[href^="#"]) { display: none; }
}
@media (max-width: 900px) {
  .nav-logo span { display: none; }
}
@media (max-width: 680px) {
  .nav-links li:has(> a[href^="#"]),
  .nav-links li:has(> .nav-report) { display: none; }
  .nav-links a::before,
  .nav-contact-toggle::before { content: ''; }
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: 8rem 0 3.5rem;
  text-align: left;
  position: relative;
  overflow: hidden;
}

/* Gradient glow background */
.hero::before {
  content: '';
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.07) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  pointer-events: none;
}

.hero-tag {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
  border: 1px solid var(--border-phosphor-strong);
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 50px;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.4rem;
  color: var(--text);
}
.hero-title span {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  max-width: 560px;
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  background: var(--accent-phosphor);
  color: #050807;
  text-decoration: none;
  border: 1px solid var(--accent-phosphor);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.25);
}
.btn-primary:hover {
  background: #6dee9d;
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(74, 222, 128, 0.55);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  background: transparent;
  color: var(--accent-phosphor);
  text-decoration: none;
  border: 1px solid var(--border-phosphor-strong);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background var(--transition), border-color var(--transition);
}
.btn-outline:hover {
  border-color: var(--accent-phosphor);
  background: rgba(74, 222, 128, 0.08);
}

/* ── Sections ───────────────────────────────────────────────── */
.section {
  padding: 6rem 0;
}

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.12;          /* headings were inheriting the body's 1.65 */
  text-wrap: balance;
  margin-bottom: 2rem;
}

/* ── Overview ───────────────────────────────────────────────── */
.overview {
  background: transparent;
  border-top: 1px solid var(--border-phosphor);
}

.overview-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: start;
}

.overview-text p {
  color: var(--text-body);
  margin-bottom: 1.05rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.overview-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* content can't widen the table past its box */
  gap: 1px;
  background: var(--border-phosphor);
  border: 1px solid var(--border-phosphor);
  border-radius: var(--radius);
  overflow: hidden;
}

.spec-item {
  background: var(--bg-elevated);
  padding: 1rem 1.2rem;
  font-family: var(--font-mono);
}
.spec-item--wide { grid-column: 1 / -1; }
/* One person per line */
.spec-names span { display: block; }
/* Keeps a phrase (a name, a course) on one line when it fits */
.nobr { display: inline-block; }

.spec-label {
  font-size: 0.66rem;
  color: var(--accent-phosphor);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.spec-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

/* ── Gallery ────────────────────────────────────────────────── */
.gallery-section {
  background: transparent;
  border-top: 1px solid var(--border-phosphor);
}

/* Equal tiles. Every image is shown whole (no cropping) and every caption
   is always visible, so nothing depends on hover. */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.gallery-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.gallery-item {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border-phosphor);
  cursor: pointer;
  background: var(--bg-elevated);
  transition: border-color var(--transition);
}
.gallery-item:hover { border-color: var(--border-phosphor-strong); }
.gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  flex: 1 1 auto;
  min-height: 0;
  object-fit: contain;
  background: #070a09;
  transition: filter 0.3s ease;
  filter: brightness(0.94);
}
.gallery-item.large img { aspect-ratio: auto; }   /* fills its 2 x 2 cell */
.gallery-item:hover img { filter: brightness(1.04); }

.gallery-caption {
  padding: 0.55rem 0.85rem 0.65rem;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-phosphor);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.45;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ── Highlights ─────────────────────────────────────────────── */
.highlights-section {
  background: transparent;
  border-top: 1px solid var(--border-phosphor);
}

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

.highlight-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-phosphor);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.highlight-card:hover {
  border-color: var(--border-phosphor-strong);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 0 24px rgba(74, 222, 128, 0.08);
}

.highlight-icon {
  font-size: 1.4rem;
  color: var(--accent-phosphor);
  margin-bottom: 1rem;
}

.highlight-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.highlight-card p {
  font-size: 0.92rem;
  color: var(--text-body);
  line-height: 1.65;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-phosphor);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 2rem;
}
.footer-links a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent-phosphor); }

/* ── Lightbox ───────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox.active { display: flex; }

.lightbox-content {
  max-width: 88vw;
  max-height: 88vh;
  cursor: default;
  text-align: center;
}
.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius);
  border: 1px solid var(--border-phosphor);
  display: block;
  margin: 0 auto;
}
.lightbox-caption {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}
.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 2rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
  transition: color var(--transition);
}
.lightbox-close:hover { color: var(--text); }

/* ── Responsive ─────────────────────────────────────────────── */
/* Below ~1024px the spec table beside the overview text gets too narrow */
@media (max-width: 1024px) {
  .overview-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 900px) {
  .highlights-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid, .gallery-grid--4 { grid-template-columns: 1fr 1fr; }
  .gallery-item.large { grid-column: span 2; grid-row: span 1; }
  .gallery-item.large img { aspect-ratio: 4 / 3; }
}

@media (max-width: 600px) {
  .nav { padding: 1rem 1.2rem; }
  .nav-links { gap: 1.2rem; }
  .highlights-grid { grid-template-columns: 1fr; }
  .gallery-grid, .gallery-grid--2, .gallery-grid--4 { grid-template-columns: 1fr; }
  .gallery-item.large { grid-column: auto; }
  .overview-specs { grid-template-columns: 1fr; }
}

/* ── Skills Applied (project pages) ─────────────────────────── */
.skills-applied {
  position: relative;
  padding: 4rem 0;
  border-top: 1px solid var(--border-phosphor);
}
.skills-applied .section-label {
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: var(--accent-phosphor);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.skills-applied h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.8rem;
}
.skills-applied .skill-group { margin-bottom: 1.5rem; }
.skills-applied .skill-group:last-child { margin-bottom: 0; }
.skills-applied .skill-group-label {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--accent-phosphor);
  letter-spacing: 0.16em;
  margin-bottom: 0.65rem;
}
.skills-applied .skill-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.skills-applied .skill-tag {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  transition: opacity var(--transition);
}
.skills-applied .skill-tag.used {
  color: #d4f0d8;
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid var(--border-phosphor-strong);
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.18);
  font-weight: 500;
}
.skills-applied .skill-tag.unused {
  color: var(--text-tag-unused);
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-phosphor-dim);
  opacity: 0.55;
}

/* ── Section divider trace (Task 17) ───────────────────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--accent-phosphor) 50%,
    transparent 100%
  );
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--transition-snap);
  margin: 0 auto;
  max-width: 1180px;
  filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.5));
}
.section-divider.in-view { transform: scaleX(1); }

/* ── Used skill tag idle pulse (Task 19) ───────────────────── */
@keyframes skill-pulse {
  0%, 100% { box-shadow: 0 0 14px rgba(74, 222, 128, 0.18); }
  50%      { box-shadow: 0 0 20px rgba(74, 222, 128, 0.32); }
}
.skills-applied .skill-tag.used {
  animation: skill-pulse 3s ease-in-out infinite;
}
.skills-applied .skill-tag.used:nth-child(2n)   { animation-delay: 0.5s; }
.skills-applied .skill-tag.used:nth-child(3n)   { animation-delay: 1.0s; }
.skills-applied .skill-tag.used:nth-child(5n+1) { animation-delay: 1.5s; }

/* ── Nav status indicator pulse (Task 20) ──────────────────── */
@keyframes nav-status-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(74, 222, 128, 0.5); }
  50%      { box-shadow: 0 0 14px rgba(74, 222, 128, 0.95); }
}
.nav-status::before {
  animation: nav-status-pulse 2s ease-in-out infinite;
}

/* ── Boot sequence (Task 21) ───────────────────────────────── */
.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg-deep);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--accent-phosphor);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
}
.boot-overlay.boot-fade-out {
  animation: boot-fade 0.6s ease forwards;
}
@keyframes boot-fade {
  0%   { opacity: 1; }
  60%  { opacity: 1; }
  100% { opacity: 0; }
}
.boot-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--scanlines);
  opacity: 0.4;
}
.boot-overlay.boot-flash::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(74, 222, 128, 0.12);
  animation: boot-flash 0.18s ease;
}
@keyframes boot-flash {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}


/* ── Project hero: what it is on the left, the thing itself on the right ──
   Scoped under .hero so the home page (.landing-hero) is untouched, and so
   these win over the bare .hero-* rules in landing.css. */
.hero > .hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
}
.hero > .hero-split > * { min-width: 0; }   /* long words can never widen the page */
.hero .hero-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  margin-bottom: 1.1rem;
}
.hero .hero-title {
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 1.1rem;
}
.hero .hero-mission {
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 34rem;
  margin: 0 0 1.3rem;
}
.hero-facts {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.8;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-phosphor);
  margin: 0 0 1.5rem;
}
.hero-facts span { white-space: nowrap; }
.hero-facts span:not(:last-child)::after { content: '·'; margin: 0 0.6em; color: var(--text-dim); }
.hero .hero-cta-row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  gap: 0.8rem;
}
.hero-media {
  margin: 0;
  border: 1px solid var(--border-phosphor);
  border-radius: var(--radius);
  overflow: hidden;
  background: #070a09;
}
.hero-media img,
.hero-media video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 66vh;
  object-fit: contain;
}
.hero-media img { cursor: zoom-in; }
.hero-media figcaption {
  padding: 0.6rem 0.9rem 0.7rem;
  border-top: 1px solid var(--border-phosphor);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.5;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}
/* Portrait phone video: sized by screen height so the whole clip fits */
.hero-media--portrait {
  justify-self: center;
  width: min(100%, 320px, calc(62vh * 0.52));
}
.hero-media--portrait video { max-height: none; }
@media (max-width: 900px) {
  .hero { padding: 6.5rem 0 2.5rem; }
  .hero > .hero-split { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── Page ending: next project + how to get in touch ────────── */
.next-band {
  position: relative;
  z-index: 1;
  padding: 3rem 0;
  border-top: 1px solid var(--border-phosphor);
}
.next-band .container {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}
.next-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 1.4rem;
  align-items: center;
  border: 1px solid var(--border-phosphor);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-surface);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.next-card:hover {
  border-color: var(--border-phosphor-strong);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 24px rgba(74, 222, 128, 0.08);
}
.next-card img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.next-card-text { padding: 1rem 1.2rem 1rem 0; }
.next-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-phosphor);
  margin-bottom: 0.4rem;
}
.next-title {
  display: block;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-primary);
}
.next-card:hover .next-title { color: var(--accent-phosphor); }
.next-contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
}
.next-contact .btn-primary,
.next-contact .btn-outline { justify-content: center; }
.next-contact .btn-outline { text-transform: none; }
@media (max-width: 800px) {
  .next-band .container { grid-template-columns: 1fr; }
  .next-card { grid-template-columns: 120px minmax(0, 1fr); gap: 1rem; }
}

/* ── Phones: finger-sized targets, Resume always in reach ───── */
.nav-m { display: none; }
@media (max-width: 680px) {
  .nav { padding: 0.3rem 1.2rem; }
  .nav-logo,
  .nav-links > li > a,
  .nav-contact-toggle { display: inline-block; padding: 0.9rem 0.3rem; }
  .nav-m { display: block; }
  .nav-links a.nav-back { font-size: 0.72rem !important; }
  .contact-menu { top: calc(100% + 0.5rem); }
  .footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .footer-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 0.5rem;
    border: 1px solid var(--border-phosphor);
    border-radius: 6px;
  }
}
