:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #f3f5f9;
  --text: #172033;
  --muted: #667085;
  --accent: #2f3192;
  --accent-soft: #eef0ff;
  --border: rgba(16, 24, 40, 0.1);
  --shadow: 0 16px 40px rgba(16, 24, 40, 0.06);
  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --compass-heading-font: "Manrope", Inter, ui-sans-serif, system-ui, sans-serif;
  --compass-body-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body.compass-page {
  min-height: 100vh;
  font-family: var(--compass-body-font);
  color: var(--text);
  background:
    radial-gradient(circle at 72% 0%, rgba(47, 49, 146, 0.08), transparent 32%),
    linear-gradient(180deg, #fbfbfd 0%, var(--bg) 100%);
}

.compass-page button,
.compass-page input,
.compass-page select,
.compass-page textarea {
  font: inherit;
}

.compass-page button {
  cursor: pointer;
}

.compass-page button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.compass-page p,
.compass-page span,
.compass-page button,
.compass-page input,
.compass-page textarea,
.compass-page select,
.compass-page label {
  font-family: var(--compass-body-font);
}

.compass-page h1,
.compass-page h2,
.compass-page h3,
.dashboard-greeting,
.projects-hero h1,
.workspace-hero h1,
.portfolio-redesign-header h1,
.readiness-hero h1,
.page-hero h1,
.project-card h3,
.workspace-panel-heading h2,
.readiness-panel-heading h2,
.portfolio-redesign-panel h2 {
  font-family: var(--compass-heading-font);
  font-weight: 700;
  letter-spacing: -0.045em;
}

.dashboard-greeting,
.projects-hero h1,
.workspace-hero h1,
.portfolio-redesign-header h1,
.readiness-hero h1,
.page-hero h1 {
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

/* Layout */

.compass-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.compass-main {
  min-width: 0;
  padding: 12px 48px 72px;
  overflow-x: hidden;
}

#interests-view,
#projects-view,
#portfolio-view,
#college-readiness-view,
#workspace-view {
  width: min(100%, 1180px);
  margin-left: auto;
  margin-right: auto;
}

.projects-page,
.portfolio-redesign-page,
.readiness-page,
.workspace-page {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

#interests-view .page-hero,
.projects-hero,
.portfolio-redesign-header,
.readiness-hero,
.workspace-hero {
  margin-left: auto;
  margin-right: auto;
}

/* Sidebar */

.compass-sidebar {
  position: sticky;
  top: 0;
  isolation: isolate;
  height: 100vh;
  overflow-y: auto;
  padding: 28px 16px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 34px;
  background:
    radial-gradient(circle at 30% 12%, rgba(255, 255, 255, 0.08), transparent 26%),
    radial-gradient(circle at 80% 78%, rgba(47, 49, 146, 0.22), transparent 34%),
    linear-gradient(180deg, #08182f 0%, #061225 48%, #071b33 100%);
}

.compass-sidebar::-webkit-scrollbar {
  width: 0;
}

.compass-sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.22;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
}

.compass-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
  padding: 0 8px 24px;
}

.compass-brand::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(214, 172, 90, 0.7), transparent);
}

.compass-brand img {
  width: 48px;
  height: 48px;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.compass-brand strong,
.compass-brand em {
  display: block;
  font-style: normal;
  line-height: 1.15;
}

.compass-brand strong {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.compass-brand em {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 650;
}

.compass-nav {
  display: grid;
  gap: 12px;
}

.nav-item {
  position: relative;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 18px;
  padding: 0 16px 0 44px;
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  text-align: left;
  font-size: 15px;
  font-weight: 850;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.nav-item::before {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.52);
  font-size: 15px;
  font-weight: 900;
}

.nav-item[data-view="dashboard"]::before { content: "▣"; }
.nav-item[data-view="interests"]::before { content: "♡"; }
.nav-item[data-view="projects"]::before { content: "□"; }
.nav-item[data-view="portfolio"]::before { content: "▤"; }
.nav-item[data-view="readiness"]::before,
.nav-item[data-view="college-readiness"]::before { content: "◎"; }

.nav-item:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  transform: translateX(2px);
}

.nav-item.active {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(87, 112, 255, 0.42), rgba(42, 63, 151, 0.34));
  color: #ffffff;
  box-shadow:
    0 12px 32px rgba(47, 49, 146, 0.28),
    0 0 28px rgba(70, 90, 255, 0.18),
    inset 0 1px rgba(255, 255, 255, 0.18);
  transform: translateX(4px);
}

.nav-item.active::before {
  color: #f5d38a;
}

.nav-item[data-view="college-readiness"],
.nav-item[data-view="readiness"] {
  margin-top: 10px;
}

.nav-item[data-view="college-readiness"]::after,
.nav-item[data-view="readiness"]::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: -11px;
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
}

.nav-item-locked,
.nav-item-dev {
  opacity: 0.58;
}

.nav-item-locked span,
.nav-item-dev span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.38);
}

.sidebar-note,
.sidebar-demo-note {
  padding: 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(214, 172, 90, 0.16), transparent 38%),
    rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03),
    0 18px 42px rgba(0, 0, 0, 0.22);
}

.sidebar-note {
  margin-top: auto;
}

.sidebar-note span,
.sidebar-demo-note span {
  display: block;
  margin-bottom: 8px;
  color: rgba(245, 211, 138, 0.9);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar-note p,
.sidebar-demo-note p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 650;
}

.sidebar-demo-note a {
  display: inline-flex;
  margin-top: 12px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

body.is-logged-in .sidebar-demo-note {
  display: none;
}

/* Topbar */

.compass-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 42px;
  margin-bottom: 28px;
  padding-top: 4px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: nowrap;
}

.demo-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  color: #be123c;
  border: 1px solid rgba(190, 18, 60, 0.14);
  box-shadow: 0 10px 24px rgba(190, 18, 60, 0.08);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.topbar-secondary-link,
.topbar-primary-link,
.compass-primary-btn,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.topbar-secondary-link,
.topbar-primary-link {
  height: 48px;
  min-width: 124px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}

.topbar-secondary-link,
.ghost-button {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
}

.topbar-secondary-link {
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.055);
}

.topbar-primary-link,
.compass-primary-btn {
  border: 0;
  background: linear-gradient(180deg, #5759ee 0%, #3d40c8 52%, #2f3192 100%);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(47, 49, 146, 0.28);
}

.topbar-secondary-link:hover,
.topbar-primary-link:hover {
  transform: translateY(-1px);
}

#student-select {
  height: 48px;
  min-width: 280px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 18px;
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.055);
}

.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(16, 24, 40, 0.1);
  border-radius: 999px;
  background: #ffffff;
  color: #344054;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* Shared page headers */

.page-hero,
.project-header {
  max-width: 900px;
  margin-bottom: 30px;
}

.page-kicker,
.project-eyebrow,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 0 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(47, 49, 146, 0.08);
  color: var(--accent);
  border: 1px solid rgba(47, 49, 146, 0.1);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-hero h1,
.project-header h1,
.project-header-copy h1 {
  max-width: 720px;
  margin: 0 0 12px;
  color: var(--text);
  font-size: clamp(42px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.page-hero p,
.project-header p,
.project-header-copy p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

/* Category icon assets */

.interest-card-visual,
.project-thumb,
.premium-portfolio-icon,
.portfolio-redesign-list .premium-portfolio-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.interest-card-visual img,
.project-thumb-icon,
.premium-portfolio-icon-img,
.portfolio-redesign-list .premium-portfolio-icon-img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 0;
}

.demo-student-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(16, 24, 40, 0.08);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.05);
  margin-bottom: 18px;
}

.demo-student-pill span {
  font-size: 22px;
}

.demo-student-pill strong {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.demo-student-pill small {
  margin-left: auto;
  color: #667085;
  font-size: 14px;
  font-weight: 600;
}

/* Premium modal */

.premium-feature-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 22px;
}

.premium-feature-modal.active {
  display: grid;
}

.premium-feature-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(86, 89, 214, 0.18), transparent 34%),
    rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.premium-feature-card {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  overflow: hidden;
  padding: 34px;
  border: 1px solid rgba(47, 49, 146, 0.14);
  border-radius: 36px;
  background:
    radial-gradient(circle at 100% 0%, rgba(86, 89, 214, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 255, 0.96));
  box-shadow:
    0 34px 100px rgba(15, 23, 42, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  text-align: center;
}

.premium-feature-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #667085;
  font-size: 22px;
  cursor: pointer;
}

.premium-feature-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 0 auto 20px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.95), transparent 42%),
    linear-gradient(180deg, #f0f2ff, #e6e8ff);
  color: #2f3192;
  font-size: 32px;
  font-weight: 900;
  box-shadow:
    0 18px 44px rgba(47, 49, 146, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.premium-feature-kicker {
  margin: 0 0 12px;
  color: #2f3192;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.premium-feature-card h2 {
  max-width: 420px;
  margin: 0 auto;
  color: #101828;
  font-family: var(--compass-heading-font);
  font-size: clamp(34px, 5vw, 48px);
  line-height: 0.96;
  letter-spacing: -0.065em;
  font-weight: 800;
}

.premium-feature-copy {
  max-width: 430px;
  margin: 18px auto 0;
  color: #667085;
  font-size: 16px;
  line-height: 1.58;
  font-weight: 500;
}

.premium-feature-list {
  display: grid;
  gap: 10px;
  margin: 24px 0;
  text-align: left;
}

.premium-feature-list span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: #344054;
  font-size: 14px;
  font-weight: 750;
}

.premium-feature-list span::before {
  content: "✓";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #eef0ff;
  color: #2f3192;
  font-size: 12px;
  font-weight: 900;
}

.premium-feature-primary,
.premium-feature-secondary {
  display: inline-flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
}

.premium-feature-primary {
  background: linear-gradient(180deg, #5759ee 0%, #2f3192 100%);
  color: #ffffff;
  box-shadow: 0 20px 42px rgba(47, 49, 146, 0.28);
}

.premium-feature-secondary {
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: #667085;
  cursor: pointer;
}

.compass-mobile-nav {
  display: none;
}

/* Responsive */

@media (max-width: 980px) {
  .compass-shell {
    grid-template-columns: 1fr;
  }

  .dashboard-stat-row,
  .dashboard-lower-grid,
  .workspace-hero,
  .workspace-focus-grid,
  .workspace-reflection-area,
  .interest-grid,
  .project-detail-grid {
    grid-template-columns: 1fr;
  }

  .premium-interest-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  #interest-continue-btn {
    width: 100%;
  }
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  body.compass-page {
    padding-bottom: 96px;
  }

  .compass-shell {
    display: block;
    min-height: 100vh;
  }

  .compass-sidebar {
    display: none;
  }

  .compass-main {
    width: 100%;
    padding: 22px 18px 120px;
    overflow-x: hidden;
  }

  .compass-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    margin: -22px -18px 26px;
    padding: 14px 18px;
    background: rgba(247, 248, 251, 0.82);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-bottom: 1px solid rgba(16, 24, 40, 0.08);
  }

  .demo-pill {
    min-height: 42px;
    padding: 0 18px;
    font-size: 12px;
    white-space: nowrap;
  }

  .topbar-actions {
    display: contents;
  }

  .topbar-secondary-link {
    display: none;
  }

  .topbar-primary-link {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    min-height: 42px;
    height: 42px;
    padding: 0 18px;
    font-size: 14px;
    white-space: nowrap;
  }

  #student-select {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    height: 48px;
    font-size: 15px;
  }

  #logout-btn,
  #sign-out-button,
  .sign-out-button,
  [data-sign-out] {
    display: none;
  }

  .page-hero h1,
  .projects-hero h1,
  .portfolio-redesign-header h1,
  .workspace-hero h1,
  .readiness-hero h1 {
    font-size: clamp(36px, 12vw, 48px);
    letter-spacing: -0.05em;
  }

  .project-detail-panel * {
    min-width: 0;
    max-width: 100%;
  }

  .project-detail-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 18px;
  }

  .project-detail-section {
    width: 100%;
  }

  .project-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .workspace-launch-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  .compass-mobile-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 14px;
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px;
    border-radius: 28px;
    background: rgba(7, 18, 37, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
      0 18px 48px rgba(7, 18, 37, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
  }

  .mobile-nav-item {
    min-width: 0;
    min-height: 58px;
    border: 0;
    border-radius: 22px;
    background: transparent;
    color: rgba(255, 255, 255, 0.62);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: -0.01em;
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 7px 2px;
  }

  .mobile-nav-item span {
    display: grid;
    place-items: center;
    width: 26px;
    height: 24px;
    font-size: 18px;
    line-height: 1;
  }

  .mobile-nav-item.active {
    background:
      radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 42%),
      linear-gradient(180deg, rgba(83, 103, 255, 0.7), rgba(47, 49, 146, 0.82));
    color: #ffffff;
    box-shadow:
      0 10px 26px rgba(47, 49, 146, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }

  .mobile-nav-item.active span {
    color: #f5d38a;
  }

  .premium-feature-card {
    padding: 28px 22px;
    border-radius: 30px;
  }
}
