:root {
  --bg: #071426;
  --surface: #0f1d33;
  --text: #eef2f7;
  --text-soft: #bcc5d1;
  --text-faint: #7f8998;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --accent: #dbe6f7;
  --ascii-accent: #3fffc2;
  --underline: rgba(255, 255, 255, 0.18);
  --underline-strong: rgba(255, 255, 255, 0.4);
  --hover-surface: rgba(255, 255, 255, 0.02);
  --dot: rgba(118, 169, 255, 0.08);
  --dot-size: 22px;
  --max-shell: 980px;
  --transition: 180ms ease;
  --badge-beginner-bg: rgba(143, 212, 165, 0.12);
  --badge-beginner-text: #a8dcb8;
  --badge-intermediate-bg: rgba(229, 197, 135, 0.12);
  --badge-intermediate-text: #e5c587;
  --callout-bg: rgba(255, 255, 255, 0.025);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: var(--dot-size) var(--dot-size);
  background-position: 0 0;
  background-attachment: fixed;
  color: var(--text-soft);
  font-family: "Manrope", sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition:
    background-color var(--transition),
    color var(--transition);
}

body[data-theme="light"] {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #0f1419;
  --text-soft: #2a3340;
  --text-faint: #566070;
  --line: rgba(15, 20, 25, 0.1);
  --line-strong: rgba(15, 20, 25, 0.16);
  --accent: #0f1419;
  --ascii-accent: #1a8f74;
  --underline: rgba(15, 20, 25, 0.22);
  --underline-strong: rgba(15, 20, 25, 0.45);
  --hover-surface: rgba(15, 20, 25, 0.05);
  --dot: rgba(24, 70, 128, 0.06);
  --badge-beginner-bg: rgba(34, 130, 68, 0.12);
  --badge-beginner-text: #1f6b3f;
  --badge-intermediate-bg: rgba(150, 100, 24, 0.12);
  --badge-intermediate-text: #7a5318;
  --callout-bg: rgba(15, 20, 25, 0.04);
  color: var(--text-soft);
}

body[data-theme="light"] .lead {
  color: var(--text);
  font-weight: 500;
}

body[data-theme="light"] .hero-text,
body[data-theme="light"] .section-lead,
body[data-theme="light"] .project-card__hook,
body[data-theme="light"] .role-block p,
body[data-theme="light"] .contact-line {
  color: var(--text-soft);
}

body[data-theme="light"] .side-link {
  color: var(--text-faint);
}

body[data-theme="light"] .side-link:hover,
body[data-theme="light"] .side-link.active {
  color: var(--text);
}

body[data-theme="light"] .nav-resume {
  color: var(--text);
  border-color: color-mix(in srgb, var(--text) 22%, var(--line));
}


body[data-theme="light"] .social-link {
  background: #ffffff;
  border-color: color-mix(in srgb, var(--text) 18%, var(--line));
}

body[data-theme="light"] .section-heading-wrap h2,
body[data-theme="light"] .experience-card__head h3,
body[data-theme="light"] .project-card__title-row h3,
body[data-theme="light"] .roadmap-hero h1,
body[data-theme="light"] .phase-title {
  color: var(--text);
}

body[data-theme="light"] .section-label,
body[data-theme="light"] .phase-eyebrow {
  color: var(--text-faint);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.page-shell {
  width: min(calc(100% - 48px), var(--max-shell));
  margin: 0 auto;
  padding: 0 0 52px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Keeps hash links (#about, etc.) from pinning section tops flush to the viewport */
#about,
#work,
#projects {
  scroll-margin-top: 84px;
}

.side-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.side-nav__track {
  position: relative;
  flex: 1;
  min-width: 0;
}

.side-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.side-link {
  color: var(--text-faint);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--transition);
}

.side-link:hover,
.side-link.active {
  color: var(--text);
}


@media (min-width: 901px) {
  .side-nav__track {
    display: block;
  }
}

.nav-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    border-color var(--transition),
    background var(--transition),
    transform var(--transition);
}

.nav-menu-toggle:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.nav-menu-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.nav-menu-toggle__bar {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 0 auto;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform var(--transition),
    opacity var(--transition);
}

.side-nav.is-open .nav-menu-toggle__bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.side-nav.is-open .nav-menu-toggle__bar:nth-child(2) {
  opacity: 0;
}

.side-nav.is-open .nav-menu-toggle__bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

body.nav-open {
  overflow: hidden;
}

.side-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-resume {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    border-color var(--transition),
    background var(--transition),
    color var(--transition),
    transform var(--transition);
}

.nav-resume:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  transform: translateY(-1px);
}

.nav-resume:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.nav-resume .arrow {
  transition: transform var(--transition);
}

.nav-resume:hover .arrow {
  transform: translateX(2px);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition);
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.theme-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon-sun {
  display: none;
}

body[data-theme="light"] .theme-icon-sun {
  display: block;
}

body[data-theme="light"] .theme-icon-moon {
  display: none;
}

.content-column {
  min-width: 0;
  min-height: calc(100vh - 160px);
  padding-top: 8px;
}

.content-view[hidden] {
  display: none !important;
}

.hero {
  padding: 10px 0 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: clamp(28px, 6vw, 82px);
  align-items: start;
}


.lead,
.hero-text,
.contact-line {
  max-width: 54ch;
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: clamp(0.92rem, 1.05vw, 0.96rem);
  font-weight: 400;
  line-height: 1.72;
}

.lead {
  color: var(--text-soft);
}

.hero-copy > .lead,
.hero-copy > .hero-text {
  margin-bottom: 16px;
}

.contact-line a {
  color: var(--text-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--underline);
}

.contact-line a:hover {
  color: var(--text);
  text-decoration-color: var(--underline-strong);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  text-decoration: none;
  transition:
    color var(--transition),
    border-color var(--transition),
    background var(--transition),
    transform var(--transition);
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social-link:hover {
  color: var(--text);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.social-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.hero-media {
  max-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portrait-card {
  width: 100%;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 14px 36px -22px rgba(2, 8, 20, 0.55);
}


body[data-theme="light"] .portrait-card {
  box-shadow: 0 14px 32px -22px rgba(15, 20, 25, 0.14);
}

.portrait-card--ascii {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

/* No backdrop on the light site — the ASCII art sits straight on the page
   and stays readable because the canvas inks itself in the light-theme
   accent (see readAccent in index.html). */
body[data-theme="light"] .portrait-card--ascii {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.portrait-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  margin: 0;
  background: transparent;
  /* Allow vertical page scrolling when a touch starts on the portrait,
     while still receiving horizontal pointer moves for the wobble. */
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section {
  padding: 0 0 44px;
}

.section-heading-wrap {
  margin-bottom: 12px;
}

.section-heading-wrap h2 {
  color: var(--text);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.section-label {
  margin-bottom: 8px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.section-lead {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
  max-width: 52ch;
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

.experience-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color var(--transition);
}

.experience-card:hover {
  border-color: var(--line-strong);
}

.experience-card__head {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.experience-card__head h3 {
  margin-bottom: 4px;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.role-block--highlight {
  border-left-width: 2px;
  border-left-color: var(--accent);
}

.role-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 2px 9px;
  margin-bottom: 4px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--badge-beginner-bg);
  color: var(--badge-beginner-text);
}

.role-badge--lead {
  background: var(--badge-intermediate-bg);
  color: var(--badge-intermediate-text);
}

.role-badge--ops,
.role-badge--industry {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text-soft);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-list .skill-tag {
  font-size: 11px;
  padding: 3px 10px;
}

.card-actions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.project-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition:
    border-color var(--transition),
    transform var(--transition);
}

.project-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.project-card--featured {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
}

.project-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-card__title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.project-card__title-row h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.project-card__stat {
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 500;
}

.project-card__hook {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
  max-width: 62ch;
}

.project-metrics {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.project-metrics li + li {
  margin-top: 4px;
}

.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.role-block p {
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
}

.experience-summary {
  margin-bottom: 0;
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1.6;
}

.role-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.role-block {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.role-block + .role-block {
  padding-top: 10px;
}

.role-heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 6px;
}


.role-heading h4 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.role-subtitle,
.role-date {
  margin-bottom: 0;
  color: var(--text-faint);
  font-size: 13px;
  line-height: 1.5;
}


@media (max-width: 900px) {
  #about,
  #work,
  #projects {
    scroll-margin-top: 72px;
  }

  .page-shell {
    width: min(calc(100% - 28px), var(--max-shell));
    gap: 18px;
  }

  .side-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: max(10px, env(safe-area-inset-top, 0px)) 0 10px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }

  .nav-menu-toggle {
    display: inline-flex;
    order: 1;
    width: 38px;
    height: 38px;
  }

  .side-tools {
    order: 2;
    margin-left: auto;
  }

  .side-nav__track {
    order: 3;
    flex: 1 1 100%;
  }

  .side-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-width: 0;
    padding: 8px 0 4px;
    border-top: 1px solid var(--line);
    margin-top: 2px;
  }

  .side-nav.is-open .side-links {
    display: flex;
  }

  .side-link {
    width: 100%;
    flex-shrink: 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    white-space: normal;
  }

  .side-link.active {
    background: var(--surface);
    border-color: var(--line-strong);
    box-shadow: 0 1px 2px rgba(2, 8, 20, 0.06);
  }

  body[data-theme="light"] .side-nav {
    background: color-mix(in srgb, var(--bg) 94%, transparent);
  }

  body[data-theme="light"] .side-link.active {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 20, 25, 0.08);
  }

  .nav-resume {
    padding: 7px 12px;
    font-size: 12px;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }

  .nav-menu-toggle {
    width: 36px;
    height: 36px;
  }

  .hero {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .hero-media {
    width: min(280px, 82vw);
    max-width: none;
    margin: 28px auto 0;
    align-items: center;
    text-align: center;
  }

  /* Hero photo sits below copy on mobile — show immediately */
  .has-js .hero-media[data-reveal] {
    opacity: 1;
    transform: none;
  }


  .experience-card,
  .project-card {
    padding: 16px 18px;
  }

  .project-card__actions {
    gap: 6px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--max-shell));
    padding-bottom: 40px;
  }

  .side-nav {
    padding-bottom: 8px;
  }

  .side-link {
    padding: 8px 12px;
    font-size: 12px;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
  }

  .hero {
    padding-top: 0;
    padding-bottom: 28px;
    gap: 20px;
  }

  .hero-media {
    width: min(260px, 88vw);
    margin-top: 24px;
  }

  .lead,
  .hero-text,
  .contact-line {
    font-size: 0.9rem;
  }



  .role-heading h4 {
    font-size: 0.95rem;
  }

  .experience-card,
  .project-card {
    padding: 14px 16px;
  }

  .project-card__actions .course-action {
    width: 100%;
    justify-content: center;
  }
}

/* ===== Scroll cue ===== */

.scroll-cue {
  position: fixed;
  inset: auto 0 0;
  z-index: 8;
  display: flex;
  justify-content: center;
  padding-bottom: max(18px, env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  opacity: 1;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.scroll-cue.is-hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.scroll-cue__fade {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--bg) 96%, transparent) 0%,
    transparent 100%
  );
  pointer-events: none;
}

.scroll-cue__btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 14px 2px;
  border: none;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text-faint);
  cursor: pointer;
  pointer-events: auto;
  transition:
    color var(--transition),
    transform var(--transition);
}

.scroll-cue__btn:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.scroll-cue__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.scroll-cue__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-cue__icon {
  width: 18px;
  height: 18px;
  animation: scroll-cue-bob 2.2s ease-in-out infinite;
}

@keyframes scroll-cue-bob {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }

  50% {
    transform: translateY(5px);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue__icon {
    animation: none;
  }
}

/* ===== ML Roadmap page ===== */

.roadmap-hero {
  padding: 0 0 28px;
}

.roadmap-hero h1 {
  color: var(--text);
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.035em;
  margin-bottom: 0;
}

.roadmap-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: 14px;
}

.phase {
  padding: 8px 0 28px;
}

.phase + .phase {
  margin-top: 10px;
}

.phase-header {
  margin-bottom: 16px;
}

.phase-eyebrow {
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.phase-title {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin-bottom: 4px;
}

.phase-subtitle {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 58ch;
}

.phase-accent {
  width: 56px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 12px;
  opacity: 0.55;
}

.course-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.course-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition:
    border-color var(--transition),
    background var(--transition),
    transform var(--transition);
}

.course-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.course-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.course-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.course-title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.course-provider {
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.5;
}

.course-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  white-space: nowrap;
}

.course-badge.is-beginner {
  background: var(--badge-beginner-bg);
  color: var(--badge-beginner-text);
}

.course-badge.is-intermediate {
  background: var(--badge-intermediate-bg);
  color: var(--badge-intermediate-text);
}

.course-why {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
  font-style: italic;
  max-width: 62ch;
}

.course-time {
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.5;
}

.course-action {
  align-self: center;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition);
}

.course-action:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  transform: translateY(-1px);
}

.course-action .arrow {
  transition: transform var(--transition);
}

.course-action:hover .arrow {
  transform: translateX(2px);
}

.callout {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 10px;
  background: var(--callout-bg);
}

.callout-label {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.callout-text {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0;
}

.track-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 14px;
}

.track-tab {
  flex: 1 1 200px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text-faint);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
  transition:
    color var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.track-tab:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--hover-surface);
}

.track-tab.active {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface);
}

.track-tab-label {
  display: block;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.track-tab.active .track-tab-label {
  color: var(--text-soft);
}

.track-tab-title {
  font-weight: 600;
}

.track-panel {
  display: none;
}

.track-panel.active {
  display: block;
}

.roadmap-footer {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.65;
}

.roadmap-footer p {
  margin: 0;
}

.roadmap-footer a {
  color: var(--text-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--underline);
  transition:
    color var(--transition),
    text-decoration-color var(--transition);
}

.roadmap-footer a:hover {
  color: var(--text);
  text-decoration-color: var(--underline-strong);
}

.share-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.roadmap-footer .share-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition);
}

.roadmap-footer .share-button:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  text-decoration: none;
  transform: translateY(-1px);
}

.roadmap-footer .share-button svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 13px;
}

@media (max-width: 640px) {
  .course-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .course-action {
    justify-self: stretch;
    justify-content: center;
  }

  .course-title-row {
    gap: 6px 8px;
  }

  .roadmap-hero h1 {
    font-size: 1.55rem;
  }

  .phase-title {
    font-size: 1.08rem;
  }

  .track-tab {
    flex-basis: 100%;
  }
}

/* Agentic AI skill page */
.skill-lead {
  margin-top: 14px;
  max-width: 64ch;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.skill-cta {
  margin-top: 20px;
}

.skill-step {
  grid-template-columns: 1fr;
}

.skill-flow {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.skill-flow-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
  transition:
    border-color var(--transition),
    transform var(--transition);
}

.skill-flow-item:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.skill-flow-q {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 4px;
}

.skill-flow-a {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.skill-tree,
.skill-snippet {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-soft);
  font-family: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 12.5px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}

.skill-tree code,
.skill-snippet code {
  font-family: inherit;
  color: inherit;
}

@media (max-width: 640px) {
  .skill-tree,
  .skill-snippet {
    font-size: 11.5px;
    padding: 14px;
  }
}

/* Scroll reveal (progressive enhancement; only active when JS sets .has-js) */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 600ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.has-js [data-reveal].in-view {
  opacity: 1;
  transform: none;
}

/* Subtle stagger for grouped items */
.has-js .course-list > [data-reveal]:nth-child(2),
.has-js .skill-flow > [data-reveal]:nth-child(2) {
  transition-delay: 70ms;
}

.has-js .course-list > [data-reveal]:nth-child(3),
.has-js .skill-flow > [data-reveal]:nth-child(3) {
  transition-delay: 140ms;
}

.has-js .course-list > [data-reveal]:nth-child(4),
.has-js .skill-flow > [data-reveal]:nth-child(4) {
  transition-delay: 210ms;
}

.has-js .course-list > [data-reveal]:nth-child(5),
.has-js .skill-flow > [data-reveal]:nth-child(5) {
  transition-delay: 280ms;
}

.has-js .course-list > [data-reveal]:nth-child(6),
.has-js .skill-flow > [data-reveal]:nth-child(6) {
  transition-delay: 350ms;
}

@media (prefers-reduced-motion: reduce) {
  .has-js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   Page transitions — a soft fade/slide in on load and a quick
   fade out when navigating to another page, so there's no harsh
   flash between pages. Progressive enhancement: only with JS.
   ============================================================ */
.has-js .content-column {
  animation: page-enter 560ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Set just before navigating away (see the page-transition script). */
.has-js.is-leaving .content-column {
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 240ms ease,
    transform 240ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .has-js .content-column {
    animation: none;
  }
  .has-js.is-leaving .content-column {
    transition: none;
  }
}

/* ============================================================
   Blog — index cards + article pages.
   Built entirely from the existing tokens (surface, line, accent,
   ascii-accent, badges, dot grid). No new palette, no new fonts.
   ============================================================ */

.blog-hero {
  padding: 0 0 24px;
}

.blog-hero h1 {
  color: var(--text);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin: 0 0 10px;
}

.blog-hero__subtitle {
  color: var(--text-soft);
  font-size: 0.96rem;
  line-height: 1.6;
  max-width: 56ch;
}

/* Designed feature-image — also the empty state.
   A soft accent gradient + the page's dot texture + a faint monogram,
   so a post with no image still looks intentional. A real <img> simply
   layers on top and covers it. */
.feature-media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--surface);
  background-image:
    radial-gradient(var(--dot) 1px, transparent 1px),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--ascii-accent) 26%, var(--surface)),
      color-mix(in srgb, var(--accent) 13%, var(--surface)) 55%,
      var(--surface)
    );
  background-size:
    14px 14px,
    cover;
  background-position: center;
}

.feature-media__monogram {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(2.4rem, 9vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: color-mix(in srgb, var(--accent) 24%, transparent);
  user-select: none;
  -webkit-user-select: none;
}

.feature-media__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Index grid */
.blog-grid {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  transition:
    border-color var(--transition),
    transform var(--transition);
}

.post-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.post-card__media {
  display: block;
}

.post-card__media:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.post-card .feature-media {
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}

.post-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
}

.post-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-card__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.post-card__title a {
  color: var(--text);
  text-decoration: none;
}

.post-card__title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-underline-offset: 3px;
}

.post-card__excerpt {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 500;
}

.post-meta__sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

/* "Read →" — same outlined pill as the site's other "Label →" buttons */
.read-link {
  align-self: flex-start;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition);
}

.read-link:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  transform: translateY(-1px);
}

.read-link .arrow {
  transition: transform var(--transition);
}

.read-link:hover .arrow {
  transform: translateX(2px);
}

/* Featured post — large, media beside copy on wider screens */
.post-card--featured {
  grid-column: 1 / -1;
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
}

.post-card__featured-label {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (min-width: 720px) {
  .post-card--featured {
    flex-direction: row;
    align-items: stretch;
  }

  .post-card--featured .post-card__media {
    flex: 1 1 54%;
    min-width: 0;
  }

  .post-card--featured .feature-media {
    height: 100%;
    width: 100%;
    /* Fill the column; don't let 16:9 derive a width from the tall height
       (that overflow was covering the post text). */
    aspect-ratio: auto;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .post-card--featured .post-card__body {
    flex: 1 1 46%;
    justify-content: center;
    gap: 12px;
    padding: 26px 28px;
  }

  .post-card--featured .post-card__title {
    font-size: 1.45rem;
  }
}

.blog-status {
  margin-top: 18px;
  color: var(--text-faint);
  font-size: 14px;
}

/* ---- Article page ---- */
.post-banner {
  margin: 2px 0 22px;
}

.post-banner .feature-media {
  border-radius: 14px;
  border: 1px solid var(--line);
}

.post-header {
  margin-bottom: 24px;
}

.post-header h1 {
  color: var(--text);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.035em;
  margin: 12px 0 14px;
}

.post-header .post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.post-header .post-meta {
  font-size: 13px;
}

.post-body {
  max-width: 70ch;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.8;
}

.post-body > :first-child {
  margin-top: 0;
}

.post-body p {
  margin-top: 1.1em;
}

.post-body h2 {
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin-top: 1.9em;
}

.post-body h3 {
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin-top: 1.5em;
}

.post-body a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-underline-offset: 3px;
}

.post-body a:hover {
  text-decoration-color: var(--underline-strong);
}

.post-body ul,
.post-body ol {
  margin-top: 1.1em;
  padding-left: 1.4em;
}

.post-body li + li {
  margin-top: 0.4em;
}

.post-body blockquote {
  margin: 1.5em 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 10px;
  background: var(--callout-bg);
  color: var(--text-soft);
  font-style: italic;
}

.post-body blockquote p {
  margin: 0;
}

.post-body :not(pre) > code {
  font-family: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.875em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--hover-surface);
  border: 1px solid var(--line);
}

.post-body pre {
  margin: 1.5em 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
}

.post-body pre code {
  font-family: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
  color: var(--text);
}

.post-footer {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

@media (prefers-reduced-motion: reduce) {
  .post-card,
  .post-card:hover,
  .read-link,
  .read-link:hover,
  .read-link .arrow,
  .read-link:hover .arrow {
    transition: none;
    transform: none;
  }
}

