:root {
  --bg: #0B1026;
  --cyan: #BF5FFF;
  --orange: #FF6F00;
  --silver: #E9E8EE;
  --silver-dim: rgba(233,232,238,0.55);
  --card-bg: rgba(255,255,255,0.03);
  --card-border: rgba(191,95,255,0.12);
  --glow-cyan: 0 0 18px rgba(191,95,255,0.55), 0 0 40px rgba(191,95,255,0.2);
  --glow-orange: 0 0 18px rgba(255,111,0,0.65), 0 0 40px rgba(255,111,0,0.25);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--silver);
  font-family: 'Space Grotesk', sans-serif;
  overflow-x: hidden;
  cursor: none;
}

/* ── CUSTOM CURSOR ── */
#cursor {
  position: fixed; width: 12px; height: 12px;
  border: 2px solid var(--cyan); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: transform 0.08s, width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: screen;
}
#cursor.hovering { width: 28px; height: 28px; background: rgba(191,95,255,0.12); }
#cursor-trail {
  position: fixed; width: 5px; height: 5px;
  background: var(--orange); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%,-50%);
  transition: left 0.18s ease, top 0.18s ease;
  opacity: 0.7;
}

/* ── SCROLL PROGRESS ── */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  width: 0%; z-index: 1000;
  box-shadow: var(--glow-cyan);
  transition: width 0.1s linear;
}
#progress-bar::after {
  content: ''; position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange);
  box-shadow: var(--glow-orange);
}

/* ── CANVAS BACKGROUND ── */
#starfield { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ── BLUEPRINT GRID ── */
.blueprint-overlay {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(rgba(191,95,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191,95,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0;
  transition: opacity 0.6s;
}

/* ── NAV ── */
nav {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 500;
  background: rgba(11,16,38,0.7);
  backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: 50px;
  padding: 10px 28px;
  display: flex; gap: 32px; align-items: center;
}
nav a {
  color: var(--silver-dim); text-decoration: none;
  font-family: 'Space Mono', monospace; font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: color 0.25s, text-shadow 0.25s;
}
nav a:hover { color: var(--cyan); text-shadow: var(--glow-cyan); }

/* ── SECTIONS WRAPPER ── */
section { position: relative; z-index: 10; }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 120px 40px 80px;
  position: relative; overflow: hidden;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; max-width: 1100px; width: 100%; align-items: center;
}
.hero-text { }
.hero-eyebrow {
  font-family: 'Space Mono', monospace; font-size: 0.75rem;
  color: var(--cyan); letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.hero-eyebrow::before {
  content: ''; display: block; width: 32px; height: 1px; background: var(--cyan);
}
.hero-name {
  font-family: 'Space Mono', monospace;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700; line-height: 1.08;
  color: var(--silver);
  margin-bottom: 16px;
}
.hero-name span { color: var(--cyan); }
.hero-tagline {
  font-size: 1.05rem; color: var(--silver-dim);
  line-height: 1.65; margin-bottom: 36px; max-width: 460px;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-primary {
  background: var(--orange); color: #fff;
  font-family: 'Space Mono', monospace; font-size: 0.78rem;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  border: none; border-radius: 8px; padding: 14px 28px;
  cursor: none; text-decoration: none;
  transition: box-shadow 0.25s, transform 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { box-shadow: var(--glow-orange); transform: translateY(-2px); }
.btn-secondary {
  background: transparent; color: var(--cyan);
  font-family: 'Space Mono', monospace; font-size: 0.78rem;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--cyan); border-radius: 8px; padding: 14px 28px;
  cursor: none; text-decoration: none;
  transition: box-shadow 0.25s, transform 0.2s, background 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-secondary:hover { box-shadow: var(--glow-cyan); background: rgba(191,95,255,0.06); transform: translateY(-2px); }

.hero-visual {
  position: relative; display: flex; justify-content: center;
}
.hero-photo-frame {
  position: relative; width: 380px; height: 450px;
  border-radius: 300px; overflow: hidden; display:flex; align-items:flex-start; justify-content:center;
  border: 1px solid var(--card-border);
  box-shadow: 0 0 60px rgba(191,95,255,0.1);
}
.hero-photo-frame img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-photo-placeholder {
  width: 100%; height: 100%;
  background: transparent;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
}
.hero-photo-placeholder svg { opacity: 0.5; }
.hero-photo-placeholder span {
  font-family: 'Space Mono', monospace; font-size: 0.65rem;
  color: var(--silver-dim); letter-spacing: 0.15em; text-transform: uppercase;
}
.glitch-lines {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(
    transparent, transparent 2px,
    rgba(191,95,255,0.15) 2px, rgba(191,95,255,0.15) 3px
  );
  animation: scanlines 6s linear infinite;
}
@keyframes scanlines { from { background-position: 0 0; } to { background-position: 0 200px; } }

.orbit-ring {
  position: absolute; width: 520px; height: 540px;
  border: 1px solid rgba(191,95,255,0.06);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: orbit-rotate 20s linear infinite;
}
.orbit-ring::after {
  content: ''; position: absolute; top: -8px; left: 50%;
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 32% 32%, #ffffff, #dbe7ff 45%, #8d99b8 100%);
  box-shadow: 0 0 18px rgba(255,255,255,0.35), inset 0 0 8px rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.35);
}
@keyframes orbit-rotate { from { transform: translate(-50%,-50%) rotate(0deg); } to { transform: translate(-50%,-50%) rotate(360deg); } }


/* ── ABOUT / TERMINAL ── */
#about {
  padding: 100px 40px;
  display: flex; justify-content: center;
}
.terminal-window {
  max-width: 800px; width: 100%;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--card-border);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 0 40px rgba(191,95,255,0.07);
}
.terminal-bar {
  background: rgba(255,255,255,0.04);
  padding: 12px 18px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--card-border);
}
.terminal-dot { width: 12px; height: 12px; border-radius: 50%; }
.t-red { background: #FF5F57; }
.t-yellow { background: #FFBD2E; }
.t-green { background: #28CA41; }
.terminal-title {
  font-family: 'Space Mono', monospace; font-size: 0.7rem;
  color: var(--silver-dim); margin-left: auto; margin-right: auto;
  letter-spacing: 0.1em;
}
.terminal-body { padding: 28px 32px; }
.t-line {
  font-family: 'Space Mono', monospace; font-size: 0.82rem;
  line-height: 2; display: flex; gap: 12px; flex-wrap: wrap;
  align-items: baseline;
}
.t-prompt { color: var(--cyan); }
.t-key { color: var(--orange); }
.t-val { color: var(--silver); }
.t-comment { color: rgba(233,232,238,0.35); }
.t-bio {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid rgba(191,95,255,0.08);
  font-size: 0.95rem; color: var(--silver-dim);
  line-height: 1.8; font-family: 'Space Grotesk', sans-serif;
}
.cursor-blink {
  display: inline-block; width: 8px; height: 13px;
  background: var(--cyan); vertical-align: bottom;
  margin-left: -5px; position: relative; top: 2px;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ── SECTION HEADER ── */
.section-header {
  text-align: center; margin-bottom: 64px;
}
.section-tag {
  font-family: 'Space Mono', monospace; font-size: 0.7rem;
  color: var(--cyan); letter-spacing: 0.25em; text-transform: uppercase;
  display: block; margin-bottom: 12px;
}
.section-title {
  font-family: 'Space Mono', monospace;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--silver); font-weight: 700; line-height: 1.2;
}
.section-title span { color: var(--cyan); }

/* ── PROJECTS / LAB ── */
#lab { padding: 100px 40px; }
.lab-inner { max-width: 1100px; margin: 0 auto; }
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto;
  gap: 16px;
}
.bento-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px; overflow: hidden;
  position: relative; cursor: none;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.bento-card:hover {
  border-color: rgba(191,95,255,0.4);
  box-shadow: 0 0 30px rgba(191,95,255,0.1);
  transform: translateY(-4px);
}
.bento-card:hover .card-overlay { opacity: 1; }
.bento-card:hover .card-img { transform: scale(1.04); filter: brightness(0.6); }

.card-yt  { grid-column: span 12; min-height: 340px; }
.card-gh  { grid-column: span 6;  min-height: 300px; }
.card-pat { grid-column: span 6;  min-height: 300px; }

.card-img-wrap { position: absolute; inset: 0; overflow: hidden; }
.card-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s, filter 0.4s;
  filter: brightness(0.5);
}
.card-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.5s, filter 0.4s;
  filter: brightness(0.85);
}
.grad-1 { background: linear-gradient(135deg, #0B1026, #0d2340, rgba(191,95,255,0.08)); }
.grad-2 { background: linear-gradient(135deg, #0B1026, #1a0d00, rgba(255,111,0,0.12)); }
.grad-3 { background: linear-gradient(135deg, #0B1026, #0a1a1a, rgba(191,95,255,0.15)); }
.grad-4 { background: linear-gradient(135deg, #0B1026, #1a1000, rgba(255,180,0,0.08)); }
.grad-5 { background: linear-gradient(135deg, #0B1026, #1a0d2d, rgba(191,95,255,0.15)); }
.grad-6 { background: linear-gradient(135deg, #0B1026, #0d1a34, rgba(191,95,255,0.12)); }
.grad-7 { background: linear-gradient(135deg, #0B1026, #1a0f00, rgba(255,111,0,0.1)); }
.grad-8 { background: linear-gradient(135deg, #0B1026, #0a1820, rgba(191,95,255,0.08)); }

/* ── CAROUSEL ── */
#carousel {
  padding: 100px 40px;
  display: flex;
  justify-content: center;
}
.carousel-inner {
  max-width: 1100px;
  width: 100%;
}
.carousel-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;
  background: transparent;
  border: none;
  border-radius: 20px;
  box-shadow: none;
  padding: 48px 0;
}

.carousel-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32%;
  height: calc(100% - 72px);
  transform: translate(-50%, -50%) scale(0.84);
  border-radius: 18px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s, filter 0.5s;
  border: 1px solid rgba(191, 95, 255, 0.14);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  background: var(--card-bg);
}

.carousel-slide.active {
  left: 50%;
  width: 42%;
  transform: translate(-50%, -50%) scale(1.08);
  opacity: 1;
  z-index: 60;
  pointer-events: auto;
  filter: saturate(1) brightness(1);
}

.carousel-slide.prev,
.carousel-slide.next {
  width: 32%;
  opacity: 0.8;
  z-index: 45;
  filter: saturate(0.8) brightness(0.94);
  pointer-events: none;
}

.carousel-slide.prev {
  left: 20%;
  transform: translate(-50%, -50%) scale(0.92);
}

.carousel-slide.next {
  left: 80%;
  transform: translate(-50%, -50%) scale(0.92);
}

.carousel-slide.behind {
  opacity: 0;
  z-index: 20;
}

.slide-image-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
}

.slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s ease;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.carousel-slide.active .slide-image:hover {
  transform: scale(1.05);
}

.carousel-footer {
  margin: 0;
  text-align: left;
  color: #a3b6d6;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  background: #070b1e;
  border: 1px solid rgba(66, 144, 255, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  flex: 1;
  max-width: 500px;
  box-shadow: inset 0 0 0 1px rgba(0, 255, 255, 0.1);
  display: flex;
  align-items: center;
}

.carousel-description {
  margin: 0;
  color: #ffffff;
  font-size: 0.72rem;
  line-height: 1.35;
  position: relative;
  min-height: 1.35em;
}

.carousel-description.typing::after {
  content: '|';
  animation: blink-cursor 0.7s infinite;
  color: #ffffff;
}

@keyframes blink-cursor {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}


/* Navigation Controls */
.carousel-desc-nav-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.carousel-dots-wrap {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.carousel-nav {
  background: rgba(191,95,255,0.12);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  color: var(--cyan);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  padding: 0;
  flex-shrink: 0;
}

.carousel-nav:hover {
  background: rgba(191,95,255,0.2);
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
  transform: scale(1.05);
}

/* Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex: 1;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(191,95,255,0.2);
  border: 1px solid rgba(191,95,255,0.4);
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
  display: block;
}

.dot:hover {
  background: rgba(191,95,255,0.4);
  border-color: var(--cyan);
}

.dot.active {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
  width: 24px;
  border-radius: 4px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .carousel-container {
    max-width: 100%;
    padding: 0 16px;
  }

  .carousel-nav {
    width: 40px;
    height: 40px;
  }
}

.card-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 24px;
  background: linear-gradient(transparent, rgba(11,16,38,0.95));
  z-index: 2;
}
.card-tag {
  font-family: 'Space Mono', monospace; font-size: 0.6rem;
  color: var(--cyan); letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 6px;
}
.card-title {
  font-family: 'Space Mono', monospace; font-size: 1rem;
  color: var(--silver); font-weight: 700; margin-bottom: 8px;
}
.card-desc { font-size: 0.82rem; color: var(--silver-dim); line-height: 1.55; }

.card-overlay {
  position: absolute; inset: 0; z-index: 3;
  background: rgba(191,95,255,0.04);
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: flex-start;
  padding: 22px; opacity: 0; transition: opacity 0.35s;
}
.tech-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-chip {
  background: rgba(191,95,255,0.1); border: 1px solid rgba(191,95,255,0.3);
  color: var(--cyan); font-family: 'Space Mono', monospace;
  font-size: 0.58rem; padding: 4px 10px; border-radius: 20px;
  letter-spacing: 0.1em; text-transform: uppercase;
}

/* Blueprint SVG decorations in cards */
.blueprint-deco {
  position: absolute; top: 0; right: 0;
  width: 180px; height: 180px; opacity: 0.07; pointer-events: none; z-index: 1;
}

/* ── VIDEO TILE (card-4 variant) ── */
.video-tile-inner {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; z-index: 2;
}
.play-btn {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,111,0,0.9);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--glow-orange);
  transition: transform 0.2s, box-shadow 0.2s;
}
.bento-card:hover .play-btn { transform: scale(1.15); }

/* ── LINKS HUB ── */
#links { padding: 100px 40px; }
.links-inner { max-width: 700px; margin: 0 auto; }
.link-btn-wrap { display: flex; flex-direction: column; gap: 14px; }
.link-btn {
  display: flex; align-items: center; gap: 20px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 16px; padding: 20px 28px;
  text-decoration: none; color: var(--silver);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.25s, background 0.3s;
  cursor: none;
}
.link-btn:hover {
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
  transform: translateX(6px);
  background: rgba(191,95,255,0.04);
}
.link-btn.orange:hover {
  border-color: var(--orange);
  box-shadow: var(--glow-orange);
  background: rgba(255,111,0,0.04);
}
.link-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(191,95,255,0.06); border: 1px solid rgba(191,95,255,0.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.3s;
}
.link-btn.orange .link-icon {
  background: rgba(255,111,0,0.06); border-color: rgba(255,111,0,0.15);
}
.link-text { flex: 1; }
.link-name {
  font-family: 'Space Mono', monospace; font-size: 0.9rem; font-weight: 700;
  color: var(--silver); display: block;
}
.link-sub { font-size: 0.75rem; color: var(--silver-dim); margin-top: 2px; }
.link-arrow { color: var(--silver-dim); transition: transform 0.25s, color 0.25s; }
.link-btn:hover .link-arrow { transform: translateX(4px); color: var(--cyan); }
.link-btn.orange:hover .link-arrow { color: var(--orange); }

/* ── CONSTELLATION LINE ── */
.constellation-line {
  display: flex; align-items: center; gap: 0;
  margin: 4px 0;
}
.c-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); flex-shrink: 0; }
.c-seg { height: 1px; flex: 1; background: linear-gradient(90deg, var(--cyan), transparent); }

/* ── FOOTER ── */
footer {
  position: relative; z-index: 10;
  padding: 40px;
  border-top: 1px solid var(--card-border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 20px;
  flex-direction: column;
}
.footer-copy {
  font-family: 'Space Mono', monospace; font-size: 0.7rem;
  color: var(--silver-dim); letter-spacing: 0.08em;
}
.serial-plate {
  background: rgba(255,255,255,0.03); border: 1px solid var(--card-border);
  border-radius: 8px; padding: 10px 18px;
  font-family: 'Space Mono', monospace; font-size: 0.62rem;
  color: var(--silver-dim); letter-spacing: 0.12em; text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
}
.serial-plate::before {
  content: ''; display: block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--cyan);
  box-shadow: var(--glow-cyan); animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes yt-spin { to { transform: rotate(360deg); } }

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── MOBILE ── */
@media (max-width: 768px) {
  nav { display: none; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .hero-ctas { justify-content: center; }
  .hero-eyebrow { justify-content: center; }
  .hero-tagline { margin: 0 auto 36px; }
  .hero-text { order: 2; }
  .hero-visual {
    display: flex; order: 1;
    justify-content: center; align-items: center;
  }
  .hero-photo-frame { width: 190px; height: 270px; border-radius: 30px; }
  .orbit-ring { width: 380px; height: 380px; }
  .bento-grid { grid-template-columns: 1fr; }
  .card-yt, .card-gh, .card-pat { grid-column: span 1; min-height: 260px; }
  footer { flex-direction: column; text-align: center; align-items: center; }
  .terminal-body { padding: 18px 16px; }
  /* Carousel responsive */
  #carousel { padding: 60px 20px; }
  .carousel-container { padding: 0 44px; }
  .carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; }
  .carousel-prev { left: 0 !important; }
  .carousel-next { right: 0 !important; left: auto !important; }
  .carousel-nav svg { width: 16px; height: 16px; }
  .slide-image-wrap { height: 240px; }
  .slide-info { padding: 20px 16px; }
  .slide-desc { font-size: 0.7rem; }
  .carousel-dots { margin-top: 20px; gap: 8px; }
}

/* Force single slide on narrow portrait phones */
@media (max-width: 430px) {
  .carousel-track {
    height: auto;
    padding: 12px 0;
  }
  .carousel-container { padding: 0 12px; }
  .carousel-slide {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: auto;
    opacity: 1;
    pointer-events: auto;
    margin: 0 0 16px 0;
    transition: none;
  }
  .carousel-slide.active {
    left: 0;
    width: 100%;
    transform: none;
    z-index: 40;
  }
  .carousel-slide.prev,
  .carousel-slide.next,
  .carousel-slide.behind {
    display: none;
  }
  /* Use a responsive height so images scale nicely on various phones */
  .slide-image-wrap { height: min(60vh, 430px); }
  .slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .carousel-nav { display: none; }
}