:root {
  color-scheme: light;
  --bg: #f8fbf7;
  --surface: #ffffff;
  --surface-soft: #f1f7f0;
  --surface-warm: #fff3e8;
  --text: #1c241f;
  --muted: #69746d;
  --muted-strong: #4f5d55;
  --line: #dfe8df;
  --brand: #2f7d5c;
  --brand-strong: #236346;
  --brand-soft: #dff2e7;
  --accent: #f59e72;
  --accent-soft: #ffe4d1;
  --sky: #8ac9df;
  --lavender: #b8a5ef;
  --warning: #d87844;
  --shadow: 0 24px 60px rgba(46, 64, 52, 0.12);
  --shadow-soft: 0 12px 28px rgba(46, 64, 52, 0.08);
  --radius: 8px;
  --sidebar-width: 252px;
  --sidebar-collapsed-width: 82px;
  --topbar-height: 80px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111711;
  --surface: #182018;
  --surface-soft: #202b20;
  --surface-warm: #2b231d;
  --text: #f2f6ef;
  --muted: #a4afa5;
  --muted-strong: #c1cbc1;
  --line: #303c31;
  --brand: #8bd8a8;
  --brand-strong: #a9e7bf;
  --brand-soft: #213b2a;
  --accent: #f5ad83;
  --accent-soft: #453124;
  --sky: #86c2d4;
  --lavender: #b7a9e9;
  --warning: #f0a56e;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 228, 209, 0.55), transparent 34rem),
    linear-gradient(135deg, var(--bg) 0%, #eef7f0 100%);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 8% 8%, rgba(69, 49, 36, 0.42), transparent 34rem),
    linear-gradient(135deg, var(--bg) 0%, #131c17 100%);
}

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--brand-soft);
  color: var(--text);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 68%, white);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 20;
  transform: translateY(calc(-100% - 32px));
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease;
}

.skip-link:focus {
  z-index: 100;
  transform: translateY(0);
}

.portfolio-back-link {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-bottom: 1px solid transparent;
  color: var(--muted-strong);
  padding-block: 0.35rem;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: border-color 200ms ease, color 200ms ease, transform 200ms ease;
}

.portfolio-back-link--fixed {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 80;
}

.portfolio-back-link:hover,
.portfolio-back-link:focus-visible {
  color: var(--text);
  border-bottom-color: currentColor;
  transform: translateY(-1px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 1.05fr) minmax(420px, 0.95fr);
}

.login-shell > *,
.login-card,
.dashboard-grid > *,
.paths-grid > *,
.course-workspace > *,
.panel,
.hero-card {
  min-width: 0;
}

.login-art {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(28px, 5vw, 72px);
}

.art-card {
  display: grid;
  width: min(100%, 680px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent-soft) 64%, var(--line));
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 243, 232, 0.86)),
    var(--surface-warm);
  box-shadow: var(--shadow);
  overflow: hidden;
}

:root[data-theme="dark"] .art-card {
  background:
    linear-gradient(145deg, rgba(24, 32, 24, 0.88), rgba(43, 35, 29, 0.86)),
    var(--surface-warm);
}

.art-card img {
  width: min(88%, 620px);
  height: auto;
}

.login-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(28px, 5vw, 72px);
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}

.login-card {
  width: min(100%, 430px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 10px 18px color-mix(in srgb, var(--brand) 24%, transparent);
}

:root[data-theme="dark"] .brand-mark {
  color: #122017;
}

.login-brand {
  margin-bottom: clamp(44px, 8vh, 76px);
}

.login-copy {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-copy h1,
.intro-row h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2.35rem, 6vw, 4.7rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.login-copy p:last-child,
.intro-row p {
  max-width: 34rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label:not(.check-field) {
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 700;
}

.login-form input[type="email"],
.login-form input[type="password"],
.search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.login-form input[type="email"],
.login-form input[type="password"] {
  height: 50px;
  padding: 0 14px;
}

.login-form input::placeholder,
.search input::placeholder {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}

.login-form input:hover,
.search input:hover {
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
}

.login-form input:focus,
.search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
  outline: none;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 6px;
}

.check-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 0.9rem;
}

.check-field input {
  width: 17px;
  height: 17px;
  accent-color: var(--brand);
}

.text-link {
  border-radius: 6px;
  color: var(--brand-strong);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.form-error {
  min-height: 22px;
  margin: 0;
  color: #b2412f;
  font-size: 0.88rem;
  font-weight: 700;
}

:root[data-theme="dark"] .form-error {
  color: #ffb5a7;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 18px;
  font-weight: 780;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.button:active,
.icon-button:active,
.avatar-button:active,
.bookmark-button:active,
.choice-button:active,
.check-option:active,
.sidebar-toggle:active {
  transform: translateY(0) scale(0.98);
}

.button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.button-primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 12px 24px color-mix(in srgb, var(--brand) 24%, transparent);
}

:root[data-theme="dark"] .button-primary {
  color: #112016;
}

.button-primary:hover {
  background: var(--brand-strong);
  transform: translateY(-1px);
}

.button-secondary,
.button-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.button-secondary:hover,
.button-ghost:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  transition: grid-template-columns 220ms ease;
}

.app-shell.is-entering {
  animation: app-enter 420ms ease both;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  overflow: hidden;
}

.sidebar-inner {
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 32px;
  padding: 24px 18px;
  transition:
    align-items 180ms ease,
    padding 220ms ease;
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-item {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  border-radius: var(--radius);
  color: var(--muted-strong);
  font-size: 0.94rem;
  font-weight: 720;
  padding: 0 12px;
  text-decoration: none;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.nav-item span,
.brand span:last-child,
.sidebar-toggle span,
.nav-progress {
  transition:
    opacity 160ms ease,
    transform 180ms ease;
}

.nav-progress {
  margin-left: auto;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-soft) 76%, var(--surface));
  color: var(--brand-strong);
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1;
  padding: 4px 6px;
}

.nav-item svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  opacity: 0.86;
}

.nav-item:hover {
  background: var(--surface-soft);
  color: var(--text);
  transform: translateX(2px);
}

.nav-item.active {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.sidebar-toggle {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 760;
  padding: 0 12px;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.sidebar-toggle:hover {
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
  color: var(--text);
  transform: translateY(-1px);
}

.sidebar-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 220ms ease;
}

.app-shell.sidebar-collapsed .sidebar-inner {
  align-items: center;
  padding-inline: 14px;
}

.app-shell.sidebar-collapsed .sidebar .brand span:last-child,
.app-shell.sidebar-collapsed .nav-item span,
.app-shell.sidebar-collapsed .sidebar-toggle span,
.app-shell.sidebar-collapsed .nav-progress {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-4px);
}

.app-shell.sidebar-collapsed .nav-item,
.app-shell.sidebar-collapsed .sidebar-toggle {
  justify-content: center;
  width: 48px;
  padding: 0;
}

.app-shell.sidebar-collapsed .nav-item:hover {
  transform: translateY(-1px);
}

.app-shell.sidebar-collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

.dashboard-shell {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  min-height: var(--topbar-height);
  grid-template-columns: minmax(240px, 640px) auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  padding: 16px clamp(20px, 4vw, 48px);
}

.search {
  position: relative;
  width: min(100%, 620px);
}

.search svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 19px;
  height: 19px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.search input {
  height: 46px;
  padding: 0 16px 0 44px;
}

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

.icon-button,
.avatar-button {
  display: inline-grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted-strong);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.icon-button {
  position: relative;
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-button:hover,
.avatar-button:hover {
  border-color: color-mix(in srgb, var(--brand) 44%, var(--line));
  color: var(--text);
  transform: translateY(-1px);
}

.notification-dot {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--accent);
  animation: badge-pulse 2.8s ease-in-out infinite;
}

.theme-toggle {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  width: 64px;
  height: 36px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-soft) 72%, var(--surface));
  color: var(--muted);
  padding: 3px;
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 58%, transparent);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.theme-toggle:hover {
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
  background: color-mix(in srgb, var(--brand-soft) 38%, var(--surface));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, white 62%, transparent),
    0 8px 18px color-mix(in srgb, var(--brand) 10%, transparent);
}

.theme-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow:
    0 1px 2px rgba(30, 43, 34, 0.12),
    0 6px 14px color-mix(in srgb, var(--brand) 16%, transparent);
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.theme-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  transition:
    color 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.theme-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.theme-icon-moon svg {
  fill: currentColor;
  stroke: none;
}

.theme-icon-sun {
  color: var(--warning);
}

.theme-icon-moon {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

:root[data-theme="dark"] .theme-toggle {
  background: color-mix(in srgb, var(--surface-soft) 82%, black);
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 10%, transparent);
}

:root[data-theme="dark"] .theme-thumb {
  transform: translateX(28px);
  background: color-mix(in srgb, var(--brand) 18%, var(--surface));
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.24),
    0 6px 14px color-mix(in srgb, black 24%, transparent);
}

:root[data-theme="dark"] .theme-icon-sun {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

:root[data-theme="dark"] .theme-icon-moon {
  color: var(--brand-strong);
}

.avatar-button {
  background: var(--accent-soft);
  color: var(--warning);
  font-size: 0.82rem;
  font-weight: 850;
}

.mobile-menu {
  display: none;
}

.dashboard-main {
  padding: 36px clamp(20px, 4vw, 48px) 48px;
}

.dashboard-main:focus {
  outline: none;
}

.intro-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.intro-row h1 {
  max-width: 760px;
  font-size: clamp(2.4rem, 5.2vw, 4.8rem);
}

.intro-row p {
  max-width: 25rem;
  text-align: right;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.75fr);
  grid-template-areas:
    "hero course"
    "timeline achievement"
    "skills achievement";
  gap: 18px;
}

.panel,
.hero-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.hero-card {
  position: relative;
  grid-area: hero;
  min-height: 360px;
  overflow: hidden;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-soft) 86%, white), var(--surface)),
    var(--surface);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 360px;
  max-width: 640px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 4vw, 42px);
}

.hero-ring {
  margin: 6px 0 16px;
}

.progress-ring {
  --size: 112px;
  --track: color-mix(in srgb, var(--brand) 14%, transparent);
  --fill: var(--brand);
  display: grid;
  width: var(--size);
  height: var(--size);
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, var(--surface) 75%, transparent 76% 100%),
    conic-gradient(var(--fill) calc(var(--progress) * 1%), var(--track) 0);
}

.progress-ring span {
  color: var(--text);
  font-size: 1.62rem;
  font-weight: 850;
}

.hero-card h2,
.course-card h2,
.timeline-card h2,
.skills-panel h2,
.achievement-card h2 {
  margin: 0;
  color: var(--text);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-card h2 {
  font-size: clamp(2.1rem, 4vw, 4rem);
}

.hero-card p:not(.eyebrow) {
  max-width: 34rem;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-orbit {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-orbit span {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--brand) 26%, transparent);
  border-radius: 50%;
  opacity: 0.72;
}

.hero-orbit span:nth-child(1) {
  right: -100px;
  bottom: -180px;
  width: 420px;
  height: 420px;
  background: color-mix(in srgb, var(--accent-soft) 58%, transparent);
}

.hero-orbit span:nth-child(2) {
  right: 76px;
  bottom: 84px;
  width: 108px;
  height: 108px;
  background: color-mix(in srgb, var(--sky) 28%, transparent);
}

.hero-orbit span:nth-child(3) {
  right: 220px;
  top: 46px;
  width: 56px;
  height: 56px;
  background: color-mix(in srgb, var(--lavender) 32%, transparent);
}

.course-card {
  grid-area: course;
  padding: 24px;
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.quiet-pill {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 9px;
}

.course-card h2 {
  max-width: 18rem;
  font-size: 1.55rem;
}

.course-card > p {
  margin: 10px 0 26px;
  color: var(--muted);
}

.linear-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.linear-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transform-origin: left;
  animation: fill-bar 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.timeline-card {
  grid-area: timeline;
  padding: 24px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  min-height: 126px;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
}

.timeline li::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 3px solid var(--surface);
  border-radius: 999px;
  background: var(--line);
  box-shadow: 0 0 0 1px var(--line);
}

.timeline li.done::before {
  background: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.timeline li.active {
  border-color: color-mix(in srgb, var(--brand) 48%, var(--line));
  background: var(--brand-soft);
}

.timeline li.active::before {
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.timeline span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.timeline strong {
  color: var(--text);
  font-size: 1rem;
}

.timeline small {
  min-height: 34px;
  color: var(--muted);
  font-size: 0.82rem;
}

.skills-panel {
  grid-area: skills;
  padding: 24px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.skill-card {
  display: grid;
  min-height: 154px;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 16px;
}

.mini-ring {
  --size: 38px;
  width: var(--size);
  height: var(--size);
  border-radius: 999px;
  background:
    radial-gradient(circle closest-side, var(--surface-soft) 62%, transparent 64%),
    conic-gradient(var(--brand) calc(var(--progress) * 1%), color-mix(in srgb, var(--brand) 14%, transparent) 0);
}

.skill-card h3 {
  margin: 18px 0 6px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.18;
  overflow-wrap: normal;
}

.skill-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.achievement-card {
  display: flex;
  grid-area: achievement;
  flex-direction: column;
  padding: 24px;
}

.achievement-mark {
  display: inline-grid;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--warning);
  margin-bottom: 24px;
}

.achievement-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.achievement-card h2 {
  max-width: 18rem;
  font-size: 1.7rem;
}

.achievement-card dl {
  display: grid;
  gap: 18px;
  margin: auto 0 0;
  padding-top: 42px;
}

.achievement-card div {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.achievement-card dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.achievement-card dd {
  margin: 5px 0 0;
  color: var(--text);
  font-weight: 760;
}

.app-view {
  transform-origin: top center;
}

.app-view.active {
  animation: view-enter 280ms ease both;
}

.workspace-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.workspace-heading h1 {
  max-width: 780px;
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.85rem);
  line-height: 1;
  letter-spacing: 0;
}

.workspace-heading p:last-child {
  max-width: 28rem;
  margin: 0;
  color: var(--muted);
  text-align: right;
}

.paths-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.path-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.path-card:hover {
  border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.path-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.path-ring {
  --size: 82px;
}

.path-ring span,
.course-progress-ring span {
  font-size: 1.12rem;
}

.path-card h2,
.lesson-sidebar h2,
.lesson-main h1,
.objective-block h2,
.interactive-block h2,
.reflection-panel h2,
.knowledge-check h2,
.sidebar-detail h2 {
  margin: 0;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: 0;
}

.path-card h2 {
  max-width: 18rem;
  font-size: 1.55rem;
}

.path-card > p,
.lesson-summary,
.interactive-block p,
.choice-feedback,
.check-feedback,
.empty-state,
.reflection-preview {
  margin: 0;
  color: var(--muted);
}

.path-meta,
.progress-stats {
  display: grid;
  gap: 12px;
  margin: 0;
}

.path-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
}

.path-meta div,
.progress-stats div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.path-meta dt,
.progress-stats dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.path-meta dd,
.progress-stats dd {
  margin: 4px 0 0;
  color: var(--text);
  font-weight: 750;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 9px;
}

.path-card .button {
  justify-self: start;
}

.course-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(420px, 1.5fr) minmax(238px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.lesson-sidebar,
.progress-sidebar {
  position: sticky;
  top: calc(var(--topbar-height) + 20px);
  padding: 20px;
}

.lesson-sidebar {
  max-height: calc(100vh - var(--topbar-height) - 40px);
  overflow: auto;
  transition:
    padding 200ms ease,
    width 200ms ease;
}

.lesson-sidebar-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.lesson-sidebar h2 {
  font-size: 1.05rem;
}

.lesson-collapse {
  width: 36px;
  height: 36px;
}

.lesson-collapse svg {
  transition: transform 200ms ease;
}

.lesson-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.lesson-item {
  display: grid;
  width: 100%;
  min-height: 64px;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-areas:
    "num title"
    "num meta";
  align-items: center;
  column-gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted-strong);
  padding: 10px;
  text-align: left;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.lesson-item:hover:not(:disabled) {
  background: var(--surface-soft);
  color: var(--text);
  transform: translateX(2px);
}

.lesson-item span {
  display: grid;
  grid-area: num;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 850;
}

.lesson-item strong {
  grid-area: title;
  overflow: hidden;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-item small {
  grid-area: meta;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.lesson-item.done span {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.lesson-item.active {
  border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.lesson-item.locked {
  cursor: not-allowed;
  opacity: 0.55;
}

.course-workspace.outline-collapsed {
  grid-template-columns: 64px minmax(420px, 1.5fr) minmax(238px, 0.7fr);
}

.course-workspace.outline-collapsed .lesson-sidebar {
  padding: 14px 12px;
}

.course-workspace.outline-collapsed .lesson-sidebar-head {
  justify-content: center;
  margin-bottom: 0;
}

.course-workspace.outline-collapsed .lesson-sidebar-head > div,
.course-workspace.outline-collapsed .lesson-list {
  display: none;
}

.course-workspace.outline-collapsed .lesson-collapse svg {
  transform: rotate(180deg);
}

.lesson-main {
  padding: clamp(24px, 4vw, 42px);
}

.lesson-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.bookmark-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted-strong);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.bookmark-button:hover {
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
  color: var(--text);
  transform: translateY(-1px);
}

.bookmark-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 2;
}

.bookmark-button.is-bookmarked {
  background: var(--brand-soft);
  color: var(--brand-strong);
  animation: bookmark-pop 260ms ease;
}

.bookmark-button.is-bookmarked svg {
  fill: currentColor;
}

.lesson-main h1 {
  max-width: 12ch;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.lesson-summary {
  max-width: 48rem;
  margin-top: 18px;
  font-size: 1.04rem;
}

.objective-block,
.interactive-block,
.reflection-panel,
.knowledge-check {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 20px;
}

.objective-block h2 {
  max-width: 44rem;
  font-size: 1.35rem;
}

.interactive-block {
  display: grid;
  gap: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-soft) 72%, var(--surface)), var(--surface)),
    var(--surface);
}

.interactive-block h2,
.reflection-panel h2,
.knowledge-check h2 {
  font-size: 1.35rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 10px;
}

.choice-button {
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted-strong);
  font-weight: 780;
  padding: 12px;
  text-align: left;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.choice-button:hover {
  border-color: color-mix(in srgb, var(--brand) 36%, var(--line));
  color: var(--text);
  transform: translateY(-1px);
}

.choice-button.active {
  border-color: color-mix(in srgb, var(--brand) 48%, var(--line));
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.choice-feedback {
  border-left: 3px solid var(--brand);
  padding-left: 12px;
  font-weight: 700;
}

.reflection-panel {
  background: var(--surface);
}

.reflection-panel textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
  padding: 14px;
  font: inherit;
  line-height: 1.55;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.reflection-panel textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.reflection-panel textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
  outline: none;
}

.save-status {
  align-self: start;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.25;
  max-width: 100%;
  min-width: 0;
  padding: 5px 9px;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.save-status.is-saving {
  background: var(--accent-soft);
  color: var(--warning);
}

.knowledge-check {
  display: grid;
  gap: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-warm) 46%, var(--surface)), var(--surface)),
    var(--surface);
}

.check-options {
  display: grid;
  gap: 10px;
}

.check-option {
  display: grid;
  min-height: 74px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 12px;
  text-align: left;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.check-option:hover {
  border-color: color-mix(in srgb, var(--brand) 36%, var(--line));
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.check-option span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 850;
}

.check-option strong {
  font-size: 0.92rem;
  line-height: 1.35;
}

.check-option.active {
  border-color: color-mix(in srgb, var(--brand) 44%, var(--line));
  background: var(--brand-soft);
}

.check-option.active span,
.check-option.correct span {
  background: var(--brand);
  color: #ffffff;
}

.check-option.correct {
  border-color: color-mix(in srgb, var(--brand) 52%, var(--line));
}

.check-option.incorrect {
  border-color: color-mix(in srgb, var(--warning) 58%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 44%, var(--surface));
}

.check-feedback {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  font-weight: 720;
}

.lesson-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.progress-sidebar {
  display: grid;
  gap: 18px;
}

.course-progress-ring {
  --size: 118px;
}

.progress-stats {
  gap: 16px;
}

.sidebar-detail {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.sidebar-detail h2 {
  font-size: 0.98rem;
}

.bookmark-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bookmark-list button {
  display: grid;
  width: 100%;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 10px;
  text-align: left;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.bookmark-list button:hover {
  border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.bookmark-list strong {
  overflow: hidden;
  font-size: 0.86rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bookmark-list small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
}

.empty-state,
.reflection-preview {
  border: 1px dashed color-mix(in srgb, var(--line) 84%, var(--muted));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-soft) 70%, var(--surface));
  padding: 12px;
  font-size: 0.88rem;
}

.reflection-preview {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted-strong);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.command-palette {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: start center;
  padding: min(12vh, 96px) 18px 18px;
}

.command-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 64%, rgba(19, 28, 23, 0.22));
}

.command-dialog {
  position: relative;
  width: min(100%, 620px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: command-enter 160ms ease both;
}

.command-search {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.command-search svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.command-search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: none;
}

.command-search input::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.command-search kbd {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 850;
  padding: 3px 6px;
}

.command-list {
  display: grid;
  gap: 4px;
  max-height: min(54vh, 440px);
  overflow: auto;
  padding: 8px;
}

.command-item {
  display: grid;
  width: 100%;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  padding: 10px;
  text-align: left;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.command-item:hover,
.command-item:focus-visible {
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.command-item span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 850;
}

.command-item strong {
  display: block;
  font-size: 0.94rem;
}

.command-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.command-empty {
  margin: 0;
  padding: 28px 14px 32px;
  color: var(--muted);
  text-align: center;
}

@keyframes app-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes view-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fill-bar {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes badge-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 28%, transparent);
  }
  45% {
    transform: scale(1.08);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 0%, transparent);
  }
}

@keyframes bookmark-pop {
  0% {
    transform: scale(0.96);
  }
  70% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes command-enter {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1180px) {
  .login-shell {
    grid-template-columns: 0.92fr 1.08fr;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
    grid-template-areas:
      "hero hero"
      "course achievement"
      "timeline timeline"
      "skills skills";
  }

  .achievement-card dl {
    padding-top: 28px;
  }

  .course-workspace {
    grid-template-columns: minmax(238px, 0.72fr) minmax(0, 1fr);
  }

  .progress-sidebar {
    position: static;
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .progress-stats {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sidebar-detail {
    grid-column: 1 / -1;
  }

  .course-workspace.outline-collapsed {
    grid-template-columns: 64px minmax(0, 1fr);
  }
}

@media (min-width: 1440px) {
  .skills-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 940px) {
  :root {
    --sidebar-width: 82px;
    --topbar-height: 76px;
  }

  .login-shell {
    min-height: 100vh;
    grid-template-columns: 1fr;
  }

  .login-art {
    min-height: auto;
    padding: 22px 22px 0;
  }

  .art-card {
    width: min(100%, 760px);
    max-height: 34vh;
    aspect-ratio: 16 / 7;
  }

  .art-card img {
    width: min(62%, 430px);
  }

  .login-panel {
    min-height: auto;
    align-items: start;
    padding-top: 34px;
  }

  .login-brand {
    margin-bottom: 34px;
  }

  .sidebar-inner {
    align-items: center;
    padding: 20px 12px;
  }

  .sidebar .brand span:last-child,
  .nav-item span,
  .sidebar-toggle span,
  .nav-progress {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
  }

  .nav-item {
    justify-content: center;
    width: 48px;
    padding: 0;
  }

  .sidebar-toggle {
    justify-content: center;
    width: 48px;
    padding: 0;
  }

  .nav-item:hover {
    transform: translateY(-1px);
  }

  .topbar {
    grid-template-columns: minmax(160px, 1fr) auto;
    padding-inline: 20px;
  }

  .intro-row {
    align-items: start;
    flex-direction: column;
  }

  .workspace-heading {
    align-items: start;
    flex-direction: column;
  }

  .intro-row p,
  .workspace-heading p:last-child {
    max-width: 38rem;
    margin-top: 8px;
    text-align: left;
  }

  .workspace-heading h1 {
    font-size: clamp(2rem, 7vw, 3.2rem);
  }

  .paths-grid {
    grid-template-columns: 1fr;
  }

  .path-meta {
    grid-template-columns: 1fr;
  }

  .course-workspace,
  .course-workspace.outline-collapsed {
    grid-template-columns: 1fr;
  }

  .lesson-sidebar,
  .progress-sidebar {
    position: static;
    max-height: none;
  }

  .course-workspace.outline-collapsed .lesson-sidebar {
    padding: 14px;
  }

  .course-workspace.outline-collapsed .lesson-sidebar-head {
    justify-content: space-between;
  }

  .course-workspace.outline-collapsed .lesson-sidebar-head > div {
    display: block;
  }

  .progress-sidebar {
    grid-template-columns: 1fr;
  }

  .progress-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline {
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
  }

  .timeline li {
    scroll-snap-align: start;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    --sidebar-width: 0px;
    --topbar-height: auto;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: auto 0 0;
    z-index: 12;
    height: 74px;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .sidebar-inner {
    display: block;
    height: 100%;
    padding: 10px 10px 12px;
  }

  .sidebar .brand {
    display: none;
  }

  .sidebar-toggle {
    display: none;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    height: 100%;
  }

  .nav-item {
    width: auto;
    min-height: 48px;
  }

  .nav-item svg {
    width: 20px;
    height: 20px;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .mobile-menu {
    display: none;
  }

  .topbar-actions {
    position: absolute;
    top: 16px;
    right: 16px;
  }

  .search {
    width: calc(100% - 168px);
    min-width: 0;
  }

  .search input {
    text-overflow: ellipsis;
  }

  .dashboard-main {
    padding: 20px 16px 100px;
  }

  .intro-row {
    margin-bottom: 20px;
    padding-top: 4px;
  }

  .intro-row h1 {
    max-width: 14ch;
    font-size: clamp(2.4rem, 14vw, 4rem);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "course"
      "timeline"
      "skills"
      "achievement";
  }

  .workspace-heading {
    margin-bottom: 20px;
  }

  .workspace-heading h1 {
    max-width: 13ch;
    font-size: clamp(2.2rem, 12vw, 3.65rem);
  }

  .path-card,
  .lesson-main,
  .lesson-sidebar,
  .progress-sidebar {
    padding: 20px;
  }

  .lesson-main h1 {
    max-width: 11ch;
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .reflection-panel .section-heading {
    display: grid;
    gap: 10px;
  }

  .reflection-panel .save-status {
    justify-self: start;
  }

  .hero-card {
    min-height: auto;
  }

  .hero-copy {
    min-height: 420px;
    padding: 24px;
  }

  .hero-actions {
    display: grid;
  }

  .hero-orbit span:nth-child(1) {
    right: -180px;
    bottom: -230px;
  }

  .hero-orbit span:nth-child(2) {
    right: 28px;
    bottom: 44px;
  }

  .course-card,
  .timeline-card,
  .skills-panel,
  .achievement-card {
    padding: 20px;
  }

  .timeline {
    grid-template-columns: repeat(5, minmax(118px, 1fr));
  }

  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }

  .skill-card {
    min-height: 140px;
  }
}

@media (max-width: 520px) {
  .portfolio-back-link--fixed {
    top: 12px;
    left: 12px;
  }

  .portfolio-back-link {
    font-size: 0.78rem;
  }

  .login-art {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    padding: 28px 20px;
  }

  .login-copy h1 {
    font-size: clamp(2.65rem, 17vw, 4.2rem);
  }

  .form-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .search {
    width: 100%;
    padding-right: 168px;
  }

  .search input {
    padding-left: 40px;
  }

  .search input::placeholder {
    color: transparent;
  }

  .topbar-actions {
    gap: 6px;
  }

  .icon-button,
  .avatar-button {
    width: 40px;
    height: 40px;
  }

  .theme-toggle {
    width: 60px;
    height: 34px;
  }

  .theme-thumb {
    width: 26px;
    height: 26px;
  }

  .theme-icon {
    width: 26px;
    height: 26px;
  }

  :root[data-theme="dark"] .theme-thumb {
    transform: translateX(26px);
  }

  .hero-copy {
    min-height: 400px;
  }

  .progress-ring {
    --size: 98px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .nav-list {
    grid-template-columns: repeat(7, 1fr);
  }

  .lesson-actions {
    display: grid;
  }

  .progress-stats {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
