/* ── Layout: Scroll Sections, Sidebar, Mobile Nav, Content ───────────────── */

:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  --color-bg-base: #0c0c0c;
  --color-surface-card: #141414;
  --color-surface-elevated: #1a1a1a;
  --color-border-subtle: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.18);
  --color-brand-red: #e53935;
  --color-brand-red-glow: rgba(229, 57, 53, 0.3);
  --color-brand-gold: #f5a623;
  --color-text-primary: #ffffff;
  --color-text-secondary: #9ca3af;
  --color-text-muted: #6b7280;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;
}

/* ── Container Layout ─────────────────────────────────────────────────────── */
.scroll-sections-container {
  background-color: var(--color-bg-base);
  position: relative;
  padding: 0 48px;
  width: 100%;
}

.scroll-sections-container > .container-fluid {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  padding: 0;
}

/* ── Pinned Desktop Sidebar ───────────────────────────────────────────────── */
.pinned-sidebar {
  width: 250px;
  height: calc(100vh - 120px);
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 36px;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 36px;
  position: relative;
}

.sidebar-line {
  position: absolute;
  left: -22px;
  transform: translateX(-50%);
  width: 2px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  pointer-events: none;
}

/* Subtle upward fade ray above the first star */
.sidebar-line::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 100%;
  height: 48px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.25), transparent);
  pointer-events: none;
}

.sidebar-line-progress {
  position: absolute;
  left: -22px;
  transform: translateX(-50%);
  width: 2px;
  background: #ffffff;
  height: 0;
  z-index: 2;
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.4);
  pointer-events: none;
  transition: height 0.08s linear;
}

.sidebar-line-progress::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 100%;
  height: 48px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.5), transparent);
  pointer-events: none;
}

.sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.45);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: color 0.2s ease;
  position: relative;
  user-select: none;
}

.sidebar-nav .nav-item:hover {
  color: rgba(255, 255, 255, 0.85);
}

.sidebar-nav .nav-item.active {
  color: #ffffff;
  font-weight: 600;
}

.sidebar-nav .nav-item.completed {
  color: rgba(255, 255, 255, 0.75);
}

.star-icon {
  position: absolute;
  left: -22px;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.28);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.25s ease,
              filter 0.25s ease;
  z-index: 3;
  pointer-events: none;
  background: transparent;
  box-shadow: none;
}

.star-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.sidebar-nav .nav-item:hover .star-icon {
  color: rgba(255, 255, 255, 0.7);
}

.sidebar-nav .nav-item.active .star-icon {
  color: #ffffff;
  transform: translate(-50%, -50%) scale(1.2);
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.55));
}

.sidebar-nav .nav-item.completed .star-icon {
  color: rgba(255, 255, 255, 0.85);
  transform: translate(-50%, -50%) scale(1.05);
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}

.sidebar-nav .nav-text {
  padding-left: 2px;
}

.sidebar-nav .nav-item.active .nav-text {
  text-shadow: none;
}

/* ── Scrollable Content Area ──────────────────────────────────────────────── */
.scroll-content {
  flex: 1;
  min-width: 0;
  padding-left: 56px;
  padding-right: 20px;
  position: relative;
  max-width: 1100px;
}

.content-section {
  min-height: auto;
  padding: var(--space-16) 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  opacity: 1;
  transform: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.content-section:last-of-type {
  border-bottom: none;
}

/* ── Core Typography Hierarchy ────────────────────────────────────────────── */
.section-title {
  font-family: "Switzer", sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: var(--space-3);
}

.section-desc {
  color: var(--color-text-secondary);
  font-family: "Inter", sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
  max-width: 720px;
  margin-top: 0;
  margin-bottom: var(--space-8);
}

.subsection-title {
  font-family: "Switzer", sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.015em;
  margin-top: 0;
  margin-bottom: var(--space-2);
}

.subsection-desc {
  font-family: "Inter", sans-serif;
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin: 0;
  max-width: 640px;
}

/* Unified Eyebrow Pill Badge */
.section-eyebrow,
.about-badge-pill,
.curriculum-badge-pill,
.projects-badge-pill,
.comparison-badge-pill,
.career-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border-subtle);
  color: #d1d5db;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.section-eyebrow.highlight,
.about-badge-pill.highlight,
.curriculum-badge-pill.highlight,
.projects-badge-pill.highlight,
.comparison-badge-pill.highlight,
.career-badge-pill.highlight {
  background: rgba(245, 166, 35, 0.08);
  border-color: rgba(245, 166, 35, 0.25);
  color: var(--color-brand-gold);
}

/* ── Mobile Top Sticky Navigation Bar ────────────────────────────────────── */
.mobile-top-nav {
  display: none;
}

@media (max-width: 1024px) {
  .scroll-sections-container {
    padding: 0 24px;
  }
  .scroll-content {
    padding-left: 32px;
    padding-right: 0;
  }
}

@media (max-width: 992px) {
  .scroll-sections-container {
    padding: 0 16px;
    margin-bottom: 60px;
  }

  .scroll-sections-container > .container-fluid {
    flex-direction: column !important;
  }

  .pinned-sidebar {
    display: none !important;
  }

  .scroll-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100%;
  }

  .content-section {
    padding: var(--space-12) 0 !important;
  }

  .section-title {
    font-size: 1.75rem !important;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-2) !important;
  }

  .section-desc {
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
    margin-bottom: var(--space-6) !important;
  }

  .mobile-top-nav {
    display: block;
    position: sticky;
    top: 110px;
    z-index: 1020;
    background: rgba(12, 12, 12, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 0 8px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    transition: top 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
  }

  .mobile-nav-track {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    width: max-content;
    padding: 0 calc(50vw - 46px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    user-select: none;
    touch-action: pan-x;
  }

  /* Bottom Progress Rail & Fluid Indicator */
  .mobile-nav-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    z-index: 5;
    overflow: hidden;
  }

  .mobile-nav-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 16.66%;
    background: linear-gradient(90deg, #eb1c24 0%, #ff4d4f 100%);
    box-shadow: 0 0 8px rgba(235, 28, 36, 0.8);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-pill);
    padding: 5px 12px;
    color: var(--color-text-secondary);
    font-size: 0.74rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
  }

  .mobile-nav-item.active {
    background: rgba(229, 57, 53, 0.16);
    border-color: rgba(229, 57, 53, 0.45);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 0 12px rgba(229, 57, 53, 0.2);
    transform: scale(1.02);
  }

  .mobile-nav-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.2s ease, filter 0.2s ease, transform 0.2s ease;
  }

  .mobile-nav-star img {
    width: 10px;
    height: 10px;
    display: block;
  }

  .mobile-nav-item.active .mobile-nav-star {
    opacity: 1;
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px rgba(229, 57, 53, 0.9));
  }

  .mobile-nav-label {
    font-size: 0.74rem;
    line-height: 1;
    letter-spacing: 0.01em;
  }
}

@media (max-width: 768px) {
  .content-section {
    padding: var(--space-6) 0 !important;
  }
  .section-title {
    font-size: 1.35rem !important;
    margin-bottom: 6px !important;
  }
  .section-desc {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    margin-bottom: var(--space-4) !important;
  }
}

@media (max-width: 576px) {
  .mobile-top-nav {
    padding: 5px 0 7px;
  }
  .mobile-nav-track {
    gap: 5px;
    padding: 0 calc(50vw - 40px);
  }
  .mobile-nav-item {
    padding: 4px 10px;
    font-size: 0.70rem;
    gap: 4px;
  }
  .mobile-nav-star img {
    width: 9px;
    height: 9px;
  }
  .mobile-nav-label {
    font-size: 0.70rem;
  }
  .section-title {
    font-size: 1.25rem !important;
    margin-bottom: 5px !important;
  }
  .section-desc {
    font-size: 0.80rem !important;
    line-height: 1.45 !important;
    margin-bottom: var(--space-3) !important;
  }
  .content-section {
    padding: 20px 0 !important;
  }
}
