:root {
  --bg: #040914;
  --bg-deep: #02050d;
  --panel: rgba(10, 18, 31, 0.88);
  --panel-soft: rgba(15, 25, 41, 0.72);
  --line: rgba(160, 177, 207, 0.16);
  --line-strong: rgba(181, 195, 218, 0.24);
  --text: #f4f7fc;
  --soft: #d7dfec;
  --muted: #92a0b5;
  --purple: #a978ff;
  --purple-deep: #7152f5;
  --blue: #5a9cff;
  --green: #28d4a0;
  --green-strong: #12bfa4;
  --green-deep: #10a796;
  --green-bright: #34e7c2;
  --gray: #687589;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.5;
  background:
    radial-gradient(circle at 12% 2%, rgba(126, 84, 235, 0.16), transparent 25%),
    radial-gradient(circle at 90% 12%, rgba(58, 126, 235, 0.1), transparent 24%),
    linear-gradient(145deg, var(--bg-deep), #07111e 52%, var(--bg-deep));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 88%);
}

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

button {
  font: inherit;
}

a {
  color: inherit;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.035);
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--blue), var(--green));
}

.page-shell {
  width: min(1460px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 28px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.024), rgba(255, 255, 255, 0.004)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(520px, 1.06fr);
  gap: 16px;
}

.identity-card,
.progress-card {
  min-height: 292px;
  padding: 28px;
}

.identity-card {
  display: flex;
  flex-direction: column;
  border-color: rgba(169, 120, 255, 0.28);
}

.identity-topline,
.progress-card-head,
.section-heading,
.route-switch,
.route-progress-copy,
.global-copy,
.footer-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.program-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--soft);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.program-mark img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  padding: 6px;
  border: 1px solid rgba(169, 120, 255, 0.22);
  border-radius: 10px;
  background: rgba(169, 120, 255, 0.08);
}

.back-home {
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-home:hover {
  color: var(--text);
}

.identity-copy {
  margin: auto 0;
  padding: 28px 0 24px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--purple);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.identity-copy h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2.45rem, 4.2vw, 4.45rem);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.identity-description {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--soft);
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  font-weight: 400;
  line-height: 1.65;
}

.learning-paths,
.profile-links,
.filters,
.route-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.learning-paths {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.82rem;
}

.learning-paths span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.path-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.path-dot-purple {
  background: var(--purple);
  box-shadow: 0 0 10px rgba(169, 120, 255, 0.55);
}

.path-dot-blue {
  background: var(--blue);
  box-shadow: 0 0 10px rgba(90, 156, 255, 0.5);
}

.profile-links a,
.secondary-link,
.show-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.profile-links a:hover,
.secondary-link:hover,
.show-more:hover {
  color: #fff;
  border-color: rgba(169, 120, 255, 0.5);
  background: rgba(169, 120, 255, 0.08);
  transform: translateY(-1px);
}

.progress-card-head {
  align-items: flex-start;
}

.progress-card h2,
.route-switch h2,
.section-heading h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.last-update {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: var(--muted);
  font-size: 0.75rem;
}

.last-update strong {
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 600;
}

.global-progress {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(40, 212, 160, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(40, 212, 160, 0.035);
}

.global-copy {
  align-items: flex-end;
}

.global-copy > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.progress-label {
  color: var(--soft);
  font-size: 0.84rem;
  font-weight: 600;
}

.global-copy strong {
  color: var(--green);
  font-size: 2.15rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.04em;
}

.global-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(156, 171, 196, 0.13);
}

.progress-track-global {
  height: 10px;
  margin-top: 14px;
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-fill-green {
  background: linear-gradient(90deg, var(--green-deep), var(--green), var(--green-bright));
}

.progress-fill-purple {
  background: linear-gradient(90deg, var(--purple-deep), var(--purple));
}

.progress-fill-blue {
  background: linear-gradient(90deg, #447ce9, var(--blue));
}

.route-progress-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.route-progress {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.018);
}

.route-progress-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(169, 120, 255, 0.22);
  border-radius: 11px;
  background: rgba(169, 120, 255, 0.06);
}

.route-progress-icon-usal {
  border-color: rgba(90, 156, 255, 0.22);
  background: rgba(90, 156, 255, 0.06);
}

.route-progress-icon img {
  width: 25px;
  height: 25px;
  object-fit: contain;
}

.route-progress-copy {
  margin-bottom: 9px;
}

.route-progress-copy > div {
  display: grid;
  gap: 2px;
}

.route-progress-copy strong {
  font-size: 0.88rem;
  font-weight: 620;
}

.route-progress-copy span {
  color: var(--muted);
  font-size: 0.73rem;
}

.route-progress-copy b {
  color: var(--soft);
  font-size: 1.15rem;
  font-weight: 620;
}

.route-switch {
  margin: 16px 0;
  padding: 18px 20px;
}

.route-switch h2 {
  font-size: 1.12rem;
}

.route-tabs {
  flex-wrap: nowrap;
}

.route-tab,
.filter {
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.84rem;
  font-weight: 580;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.route-tab:hover,
.filter:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.route-tab.active,
.filter.active {
  color: #fff;
  border-color: rgba(169, 120, 255, 0.48);
  background: rgba(169, 120, 255, 0.13);
}

.content-grid {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr) 370px;
  gap: 16px;
  align-items: start;
}

.project-index,
.projects-panel,
.usal-panel {
  padding: 22px;
}

.project-index {
  position: sticky;
  top: 18px;
}

.section-heading {
  align-items: flex-start;
  margin-bottom: 20px;
}

.section-heading-compact {
  align-items: center;
  margin-bottom: 14px;
}

.section-description {
  max-width: 600px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.count-chip {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.76rem;
  font-weight: 620;
}

.section-logo {
  flex: 0 0 auto;
  object-fit: contain;
  opacity: 0.82;
}

.section-logo-42 {
  width: 58px;
  height: 58px;
}

.section-logo-usal {
  width: 48px;
  height: 48px;
  padding: 7px;
  border: 1px solid rgba(90, 156, 255, 0.16);
  border-radius: 12px;
  background: rgba(90, 156, 255, 0.04);
}

.sidebar-list {
  display: grid;
  gap: 3px;
  max-height: 690px;
  margin: 0 0 18px;
  padding: 0 5px 0 0;
  overflow: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(169, 120, 255, 0.35) transparent;
}

.sidebar-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 10px;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 8px 9px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.77rem;
}

.sidebar-item:hover {
  color: var(--soft);
  background: rgba(255, 255, 255, 0.025);
}

.sidebar-index {
  color: #69768a;
  font-variant-numeric: tabular-nums;
}

.sidebar-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray);
}

.sidebar-item.done .state-dot {
  background: var(--green);
}

.sidebar-item.doing .state-dot {
  background: var(--blue);
}

.secondary-link,
.show-more {
  width: 100%;
}

.filters {
  margin-bottom: 22px;
}

.project-groups,
.usal-groups {
  display: grid;
  gap: 24px;
}

.group,
.usal-group {
  display: grid;
  gap: 11px;
}

.group-title,
.usal-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.group.done .group-title,
.usal-group.done h3 {
  color: var(--green);
}

.group.doing .group-title,
.usal-group.doing h3 {
  color: var(--blue);
}

.group.todo .group-title,
.usal-group.todo h3 {
  color: #b9c2d0;
}

.cards {
  display: grid;
  gap: 10px;
}

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

.card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 84px;
  padding: 14px;
  border: 1px solid rgba(160, 177, 207, 0.12);
  border-radius: var(--radius-md);
  background: rgba(9, 17, 29, 0.68);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-1px);
  border-color: rgba(181, 195, 218, 0.23);
  background: rgba(13, 23, 38, 0.78);
}

.card.done {
  border-color: rgba(40, 212, 160, 0.3);
  background: linear-gradient(90deg, rgba(40, 212, 160, 0.075), rgba(9, 17, 29, 0.7));
}

.card.done:hover,
.card.done[open] {
  border-color: rgba(40, 212, 160, 0.48);
  box-shadow: 0 14px 34px rgba(14, 38, 24, 0.2);
}

.card.doing {
  border-color: rgba(90, 156, 255, 0.32);
  background: linear-gradient(90deg, rgba(90, 156, 255, 0.075), rgba(9, 17, 29, 0.7));
}

.card.doing:hover {
  border-color: rgba(90, 156, 255, 0.46);
}

.card.todo {
  grid-template-columns: 44px minmax(0, 1fr);
  min-height: 80px;
  padding: 13px;
}

.expandable-card {
  display: block;
  padding: 0;
  overflow: clip;
}

.card-summary {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 82px;
  padding: 14px;
  list-style: none;
  cursor: pointer;
  border-radius: inherit;
}

.card-summary::-webkit-details-marker {
  display: none;
}

.card-summary::marker {
  content: "";
}

.card-summary:focus-visible {
  outline: 2px solid rgba(40, 212, 160, 0.85);
  outline-offset: -3px;
}

.icon-box {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.card.todo .icon-box {
  width: 42px;
  height: 42px;
}

.card.done .icon-box {
  color: var(--green);
  border-color: rgba(40, 212, 160, 0.28);
  background: rgba(40, 212, 160, 0.065);
  box-shadow: inset 0 0 20px rgba(40, 212, 160, 0.025);
}

.card.done:hover .icon-box,
.card.done[open] .icon-box {
  border-color: rgba(40, 212, 160, 0.42);
  background: rgba(40, 212, 160, 0.09);
}

.card.doing .icon-box {
  color: var(--blue);
  border-color: rgba(90, 156, 255, 0.28);
  background: rgba(90, 156, 255, 0.06);
}

.project-svg {
  width: 30px;
  height: 30px;
}

.card.todo .project-svg {
  width: 25px;
  height: 25px;
}

.card h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.meta-row {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 650;
}

.badge.done {
  color: #dcfff5;
  border: 1px solid rgba(40, 212, 160, 0.28);
  background: rgba(40, 212, 160, 0.12);
}

.badge.doing {
  color: #e1edff;
  border: 1px solid rgba(90, 156, 255, 0.28);
  background: rgba(90, 156, 255, 0.12);
}

.detail-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--soft);
  font-size: 0.76rem;
  font-weight: 560;
  white-space: nowrap;
}

.detail-close-label {
  display: none;
}

.detail-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--green);
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.expandable-card[open] .detail-open-label {
  display: none;
}

.expandable-card[open] .detail-close-label {
  display: inline;
}

.expandable-card[open] .detail-chevron {
  transform: rotate(180deg);
}

.project-detail {
  border-top: 1px solid rgba(40, 212, 160, 0.13);
}

.project-detail-inner {
  display: grid;
  gap: 13px;
  margin-left: 78px;
  padding: 17px 14px 18px 0;
}

.card .project-detail-copy {
  max-width: 760px;
  color: #b8c3d3;
  font-size: 0.84rem;
  line-height: 1.65;
}

.concepts-label {
  color: var(--soft);
  font-size: 0.73rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.concept-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.concept-chip {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 5px 9px;
  border: 1px solid rgba(40, 212, 160, 0.16);
  border-radius: 999px;
  color: #ccefe6;
  background: rgba(40, 212, 160, 0.055);
  font-size: 0.72rem;
  font-weight: 540;
}

.project-detail-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(40, 212, 160, 0.22);
  border-radius: 9px;
  color: #e2fff6;
  background: rgba(40, 212, 160, 0.08);
  font-size: 0.77rem;
  font-weight: 620;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.project-detail-link:hover,
.project-detail-link:focus-visible {
  border-color: rgba(40, 212, 160, 0.44);
  background: rgba(40, 212, 160, 0.13);
  transform: translateY(-1px);
}

.show-more {
  margin-top: 14px;
  min-height: 42px;
  color: var(--muted);
}

.usal-heading h2 {
  max-width: 280px;
  font-size: 1.18rem;
  line-height: 1.2;
}

.usal-list {
  display: grid;
  gap: 8px;
}

.usal-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 47px;
  padding: 11px 12px;
  border: 1px solid rgba(160, 177, 207, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.usal-item.done {
  border-color: rgba(40, 212, 160, 0.17);
  background: rgba(40, 212, 160, 0.038);
}

.usal-item.doing {
  border-color: rgba(90, 156, 255, 0.19);
  background: rgba(90, 156, 255, 0.04);
}

.usal-item strong {
  font-size: 0.8rem;
  font-weight: 580;
  line-height: 1.35;
}

.usal-item span {
  color: var(--muted);
  font-size: 0.7rem;
  white-space: nowrap;
}

.usal-panel .secondary-link {
  margin-top: 22px;
}

.footer-line {
  margin-top: 18px;
  padding: 18px 4px 0;
  border-top: 1px solid rgba(169, 120, 255, 0.3);
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-line a {
  color: var(--soft);
  text-decoration: none;
}

.footer-line a:hover {
  color: #fff;
}

.mobile-home-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid rgba(169, 120, 255, 0.35);
  border-radius: 12px;
  color: #fff;
  background: rgba(11, 17, 30, 0.9);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(12px);
}

.reveal-item {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 1081px) {
  .route-tabs {
    display: none;
  }
}

@media (max-width: 1260px) {
  .overview-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(500px, 1.1fr);
  }

  .content-grid {
    grid-template-columns: 220px minmax(0, 1fr) 330px;
  }

  .group.todo .cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .page-shell {
    width: min(900px, calc(100% - 30px));
  }

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

  .identity-card,
  .progress-card {
    min-height: auto;
  }

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

  .project-index {
    display: none;
  }

  .route-panel {
    display: none;
  }

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

  .route-switch {
    position: sticky;
    top: 8px;
    z-index: 20;
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.42);
  }

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

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 650px);
    padding-top: 10px;
  }

  .panel {
    border-radius: 17px;
  }

  .identity-card,
  .progress-card,
  .projects-panel,
  .usal-panel {
    padding: 19px;
  }

  .identity-copy {
    padding: 24px 0 21px;
  }

  .identity-copy h1 {
    font-size: clamp(2.35rem, 13vw, 3.5rem);
    line-height: 1;
  }

  .identity-description {
    font-size: 0.94rem;
  }

  .learning-paths {
    display: grid;
  }

  .progress-card-head,
  .global-copy,
  .section-heading,
  .footer-line {
    align-items: flex-start;
  }

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

  .route-switch {
    align-items: flex-end;
    padding: 15px;
  }

  .route-switch > div:first-child {
    display: none;
  }

  .route-tabs {
    width: 100%;
  }

  .route-tab {
    flex: 1;
  }

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

  .filter {
    width: 100%;
    padding: 8px 9px;
  }

  .group.todo .cards {
    grid-template-columns: 1fr;
  }

  .card,
  .card.todo {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    min-height: 82px;
    padding: 12px;
  }

  .expandable-card {
    padding: 0;
  }

  .card-summary {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    min-height: 82px;
    padding: 12px;
  }

  .project-detail-inner {
    margin-left: 56px;
    padding: 15px 12px 16px 0;
  }

  .card .project-detail-copy {
    font-size: 0.79rem;
    line-height: 1.6;
  }

  .detail-action {
    font-size: 0.73rem;
  }

  .concept-list {
    gap: 6px;
  }

  .concept-chip {
    min-height: 25px;
    padding: 4px 8px;
    font-size: 0.69rem;
  }

  .icon-box,
  .card.todo .icon-box {
    width: 42px;
    height: 42px;
  }

  .project-svg,
  .card.todo .project-svg {
    width: 25px;
    height: 25px;
  }

  .meta-row {
    grid-column: 2;
    display: flex;
    justify-items: initial;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .card h3 {
    font-size: 0.94rem;
  }

  .card p {
    font-size: 0.77rem;
  }

  .usal-heading h2 {
    max-width: 230px;
    font-size: 1.08rem;
  }

  .section-logo-42 {
    width: 48px;
    height: 48px;
  }

  .section-logo-usal {
    width: 42px;
    height: 42px;
  }

  .usal-item {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .usal-item span {
    white-space: normal;
  }

  .footer-line {
    display: grid;
    gap: 6px;
  }

  .mobile-home-button.is-visible {
    display: inline-flex;
  }
}

@media (max-width: 420px) {
  .identity-topline {
    align-items: flex-start;
  }

  .program-mark span {
    display: none;
  }

  .global-copy {
    display: grid;
    gap: 8px;
  }

  .global-copy p {
    text-align: left;
  }

  .route-progress-copy b {
    font-size: 1rem;
  }

  .project-detail-inner {
    margin-left: 12px;
    padding-right: 12px;
  }

  .detail-action {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-item {
    opacity: 1;
    transform: none;
  }
}


/* ===== V7: identidad, progreso y enlaces de proyectos ===== */
.roadmap-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  transition: transform .2s ease, opacity .2s ease;
}
.roadmap-brand:hover,
.roadmap-brand:focus-visible {
  transform: translateY(-1px);
  opacity: 0.96;
}
.roadmap-brand-mark {
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.05em;
}
.roadmap-brand-mark span,
.roadmap-brand-name strong {
  color: var(--green);
}
.roadmap-brand-name {
  font-size: 0.95rem;
  font-weight: 550;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.progress-card {
  border-color: rgba(40, 212, 160, 0.18);
}

.global-progress {
  margin-top: 22px;
  padding: 20px 20px 18px;
  border: 1px solid rgba(40, 212, 160, 0.18);
  border-radius: calc(var(--radius-lg) + 2px);
  background: linear-gradient(180deg, rgba(40, 212, 160, 0.06), rgba(40, 212, 160, 0.03));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}
.global-copy {
  align-items: flex-start;
}
.global-copy > div {
  gap: 10px;
}
.global-copy strong {
  font-size: 2.45rem;
}
.global-copy p {
  margin: 0;
}
.progress-extra {
  margin-top: 4px !important;
  color: var(--soft) !important;
  font-size: 0.78rem !important;
  opacity: .92;
}
.progress-track {
  height: 9px;
  background: rgba(156, 171, 196, 0.15);
}
.progress-track-global {
  height: 12px;
  margin-top: 16px;
}
.route-progress-list {
  gap: 14px;
  margin-top: 16px;
}
.route-progress {
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 14px;
  padding: 15px;
  border-color: rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.022);
}
.route-progress-icon {
  width: 50px;
  height: 50px;
  border-radius: 13px;
}
.route-progress-icon img {
  width: 30px;
  height: 30px;
}
.route-progress-icon-usal {
  border-color: rgba(90, 156, 255, 0.20);
  background: rgba(255,255,255,0.9);
}
.route-progress-icon-usal img,
.section-logo-usal {
  object-fit: contain;
}
.route-progress-copy {
  margin-bottom: 10px;
}
.route-progress-copy strong {
  font-size: 0.92rem;
}
.route-progress-copy span {
  font-size: 0.77rem;
}
.route-progress-copy b {
  font-size: 1.22rem;
}
.section-logo-usal {
  width: 58px;
  height: 58px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
}

.project-meta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.summary-repo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(40, 212, 160, 0.2);
  border-radius: 8px;
  color: #ddfff5;
  background: rgba(40, 212, 160, 0.08);
  font-size: 0.74rem;
  font-weight: 620;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.summary-repo-link:hover,
.summary-repo-link:focus-visible {
  border-color: rgba(40, 212, 160, 0.42);
  background: rgba(40, 212, 160, 0.14);
  transform: translateY(-1px);
}
.detail-action {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
}
.project-detail {
  border-top: 1px solid rgba(40, 212, 160, 0.11);
  background: linear-gradient(180deg, rgba(40,212,160,0.03), rgba(40,212,160,0));
}

@media (max-width: 720px) {
  .roadmap-brand-name {
    display: none;
  }
  .roadmap-brand-mark {
    font-size: 2rem;
  }
  .global-copy strong {
    font-size: 2.15rem;
  }
  .route-progress {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }
  .route-progress-icon {
    width: 46px;
    height: 46px;
  }
  .route-progress-icon img {
    width: 28px;
    height: 28px;
  }
  .section-logo-usal {
    width: 46px;
    height: 46px;
    padding: 5px;
  }
  .project-meta-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .roadmap-brand-mark {
    font-size: 1.86rem;
  }
  .roadmap-brand {
    gap: 6px;
  }
  .global-progress {
    padding: 18px 16px 16px;
  }
}


/* ===== V8: encabezado simplificado y tarjetas completadas ===== */
.program-mark {
  gap: 10px;
}
.program-brand-mark {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-size: 1.82rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
}
.program-brand-mark span {
  color: var(--green);
}

/* La marca personal ya no se muestra como enlace separado. */
.roadmap-brand {
  display: none !important;
}

.card-summary {
  cursor: pointer;
}
.project-meta-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.summary-repo-link {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #bff3b4;
  background: transparent;
  font-size: 0.74rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease, transform .2s ease;
}
.summary-repo-link:hover,
.summary-repo-link:focus-visible {
  color: #e6ffe1;
  border-color: transparent;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  transform: none;
}
.collapse-action {
  display: none;
  color: var(--soft);
  font-size: 0.74rem;
  font-weight: 560;
  white-space: nowrap;
}
.expandable-card[open] .collapse-action {
  display: inline-flex;
}

/* Retira la acción anterior de ver/ocultar detalle si quedara en el DOM. */
.detail-action,
.detail-open-label,
.detail-close-label,
.detail-chevron {
  display: none !important;
}

@media (max-width: 720px) {
  .program-brand-mark {
    font-size: 1.68rem;
  }
  .project-meta-actions {
    justify-content: flex-start;
    gap: 7px 11px;
  }
}

@media (max-width: 420px) {
  .program-mark {
    gap: 8px;
  }
  .program-brand-mark {
    font-size: 1.58rem;
  }
}


/* ===== V9: contenido, jerarquía y accesibilidad ===== */
:root {
  --muted: #a3afc1;
  --section-space: 26px;
}

.project-groups,
.usal-groups {
  gap: var(--section-space);
}

.global-copy {
  align-items: flex-start;
}
.global-main,
.global-status {
  display: grid;
  gap: 4px;
}
.global-main strong {
  color: var(--green);
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 660;
  line-height: 1;
  letter-spacing: -0.045em;
}
.global-status {
  justify-items: end;
  text-align: right;
}
.global-status b {
  color: var(--soft);
  font-size: 1.15rem;
  font-weight: 620;
}
.progress-extra {
  color: var(--muted) !important;
}
.progress-track[role="progressbar"]:focus-visible {
  outline: 2px solid rgba(40, 212, 160, 0.7);
  outline-offset: 3px;
}

/* Los pendientes quedan visualmente subordinados a completados y en curso. */
.card.todo {
  min-height: 66px;
  padding: 10px 11px;
  opacity: 0.82;
  background: rgba(8, 15, 26, 0.5);
  border-color: rgba(160, 177, 207, 0.085);
}
.card.todo:hover {
  opacity: 1;
  transform: none;
  background: rgba(11, 20, 33, 0.62);
}
.card.todo .icon-box {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}
.card.todo .project-svg {
  width: 22px;
  height: 22px;
}
.card.todo h3 {
  margin-bottom: 2px;
  font-size: 0.9rem;
}
.card.todo p {
  overflow: hidden;
  color: #8f9caf;
  font-size: 0.73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.show-more {
  min-height: 38px;
  margin-top: 12px;
  font-size: 0.78rem;
}

/* Acordeones con una interacción más clara y una apertura suave. */
.expandable-card,
.usal-expandable {
  cursor: pointer;
}
.expandable-card .project-detail,
.usal-expandable .usal-detail {
  animation: detail-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes detail-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
.collapse-action,
.usal-collapse {
  font-size: 0.68rem;
  opacity: 0.82;
}
.project-meta-actions {
  align-items: center;
}

/* Materias completadas ampliables. */
.usal-expandable {
  display: block;
  padding: 0;
  overflow: clip;
}
.usal-item-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 11px 12px;
  list-style: none;
  cursor: pointer;
}
.usal-item-summary::-webkit-details-marker {
  display: none;
}
.usal-item-summary::marker {
  content: "";
}
.usal-item-summary:focus-visible {
  outline: 2px solid rgba(40, 212, 160, 0.75);
  outline-offset: -3px;
}
.usal-item-title {
  display: grid;
  gap: 3px;
}
.usal-item-title .usal-state {
  color: #bceeb4;
  font-size: 0.7rem;
}
.usal-collapse {
  display: none;
  color: var(--soft);
  white-space: nowrap;
}
.usal-expandable[open] .usal-collapse {
  display: inline-flex;
}
.usal-detail {
  display: grid;
  gap: 12px;
  padding: 15px 12px 16px;
  border-top: 1px solid rgba(40, 212, 160, 0.12);
  background: linear-gradient(180deg, rgba(40, 212, 160, 0.025), transparent);
}
.usal-detail-copy {
  margin: 0;
  color: #bbc6d6;
  font-size: 0.78rem;
  line-height: 1.62;
}
.usal-concepts {
  gap: 6px;
}
.concept-chip-usal {
  color: #d3e4ff;
  border-color: rgba(90, 156, 255, 0.18);
  background: rgba(90, 156, 255, 0.055);
}

/* El escudo mantiene contraste y proporción en todos los tamaños. */
.route-progress-icon-usal,
.section-logo-usal {
  background: #f7f4eb;
  box-shadow: inset 0 0 0 1px rgba(20, 31, 48, 0.08);
}
.route-progress-icon-usal img,
.section-logo-usal {
  object-fit: contain;
}

/* Estados de foco consistentes. */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid rgba(169, 120, 255, 0.82);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .global-copy {
    align-items: end;
  }
  .global-status {
    justify-items: end;
  }
  .card.todo {
    min-height: 64px;
    padding: 10px;
  }
  .card.todo .icon-box {
    width: 36px;
    height: 36px;
  }
  .project-meta-actions {
    align-items: center;
  }
  .usal-item-summary {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .usal-collapse {
    justify-self: start;
  }
}

@media (max-width: 420px) {
  .global-copy {
    grid-template-columns: 1fr auto;
  }
  .global-status {
    align-self: end;
  }
  .global-status b {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .expandable-card .project-detail,
  .usal-expandable .usal-detail {
    animation: none;
  }
}

/* Ajuste de especificidad para el resumen general. */
.global-copy > .global-main,
.global-copy > .global-status {
  display: grid;
  align-items: initial;
  gap: 4px;
}


/* ===== V10: pulido profesional y responsive ===== */
.overview-grid {
  grid-template-columns: minmax(0, 0.92fr) minmax(500px, 1.08fr);
  align-items: stretch;
}

.identity-card,
.progress-card {
  min-height: 268px;
  padding: 24px 26px;
}

.identity-copy {
  padding: 22px 0 18px;
}

.identity-copy h1 {
  font-size: clamp(2.35rem, 3.7vw, 4.05rem);
}

.identity-description {
  margin-top: 14px;
  line-height: 1.58;
}

.learning-paths {
  margin-bottom: 14px;
}

.progress-card-head {
  gap: 14px;
}

.last-update {
  min-width: max-content;
}

.global-progress {
  margin-top: 18px;
  padding: 17px 18px 16px;
}

.global-main strong {
  font-size: 2.15rem;
}

.global-status b {
  font-size: 1rem;
  opacity: 0.92;
}

.route-progress-list {
  margin-top: 12px;
  gap: 10px;
}

.route-progress {
  padding: 12px 13px;
}

.route-progress-icon {
  width: 46px;
  height: 46px;
}

.route-progress-icon img {
  width: 28px;
  height: 28px;
}

.progress-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  color: #aab6c8;
  font-size: 0.72rem;
}

.progress-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-done {
  background: var(--green);
  box-shadow: 0 0 8px rgba(40, 212, 160, 0.38);
}

.legend-doing {
  background: var(--blue);
  box-shadow: 0 0 8px rgba(90, 156, 255, 0.35);
}

.legend-todo {
  background: #66758a;
}

.expandable-card,
.usal-expandable {
  cursor: pointer;
}

.expandable-card:hover,
.expandable-card:focus-within {
  border-color: rgba(40, 212, 160, 0.44);
  background: rgba(40, 212, 160, 0.035);
  transform: translateY(-1px);
}

.card-summary,
.usal-item-summary {
  transition: background 0.2s ease;
}

.card-summary:hover,
.usal-item-summary:hover {
  background: rgba(255, 255, 255, 0.018);
}

.collapse-action,
.usal-collapse {
  font-size: 0.69rem;
  opacity: 0.76;
}

.project-meta-actions {
  column-gap: 10px;
  row-gap: 5px;
}

.summary-repo-link {
  color: #d8f7ef;
  text-underline-offset: 3px;
}

.group.todo {
  opacity: 0.9;
}

.group.todo .card {
  min-height: 72px;
  padding-top: 10px;
  padding-bottom: 10px;
  border-color: rgba(160, 177, 207, 0.11);
  background: rgba(255, 255, 255, 0.012);
}

.group.todo .card p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group.todo .icon-box {
  opacity: 0.82;
}

.usal-item.done {
  border-color: rgba(90, 156, 255, 0.24);
  background: rgba(90, 156, 255, 0.035);
}

.usal-item.doing {
  border-color: rgba(90, 156, 255, 0.28);
  background: rgba(90, 156, 255, 0.055);
}

.usal-group.todo {
  opacity: 0.88;
}

.usal-group.todo .usal-item {
  min-height: 58px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.usal-source-note {
  display: block;
  color: #8391a7;
  font-size: 0.67rem;
  line-height: 1.45;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid rgba(123, 184, 255, 0.92);
  outline-offset: 3px;
}

.card p,
.section-description,
.identity-description,
.usal-detail-copy {
  color: #aeb9ca;
}

@media (max-width: 1080px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .route-panel[hidden] {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 16px, 650px);
  }

  .identity-card,
  .progress-card,
  .projects-panel,
  .usal-panel {
    padding: 17px;
  }

  .identity-copy {
    padding: 20px 0 18px;
  }

  .identity-copy h1 {
    font-size: clamp(2.2rem, 12vw, 3.25rem);
  }

  .progress-card-head {
    align-items: flex-start;
  }

  .last-update {
    font-size: 0.69rem;
  }

  .route-switch {
    top: 5px;
    padding: 11px;
    border-radius: 14px;
  }

  .route-tab {
    min-height: 42px;
  }

  .filters {
    gap: 7px;
  }

  .filter {
    min-height: 42px;
  }

  .card-summary {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .meta-row {
    width: 100%;
  }

  .project-meta-actions {
    width: 100%;
    align-items: center;
    justify-content: space-between;
  }

  .summary-repo-link {
    font-size: 0.72rem;
  }

  .collapse-action {
    margin-left: auto;
  }

  .usal-item-summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
  }

  .section-logo-usal {
    width: 44px;
    height: 44px;
    padding: 4px;
  }
}

@media (max-width: 390px) {
  .page-shell {
    width: calc(100% - 12px);
  }

  .identity-card,
  .progress-card,
  .projects-panel,
  .usal-panel {
    padding: 15px;
  }

  .program-brand-mark {
    font-size: 1.45rem;
  }

  .program-mark {
    gap: 8px;
  }

  .global-copy {
    gap: 5px;
  }

  .global-main strong {
    font-size: 1.9rem;
  }

  .route-progress {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
  }

  .route-progress-icon {
    width: 42px;
    height: 42px;
  }

  .progress-legend {
    gap: 10px;
  }

  .project-meta-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .collapse-action {
    margin-left: 0;
  }

  .group.todo .card p {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .program-mark > span,
  .program-brand-mark span {
    display: inline-flex !important;
  }
}


/* ===== V11: paleta verde unificada con la portada ===== */
.progress-fill-green {
  box-shadow: 0 0 16px rgba(40, 212, 160, 0.18);
}
.global-progress {
  border-color: rgba(40, 212, 160, 0.2);
  background: linear-gradient(180deg, rgba(40, 212, 160, 0.065), rgba(40, 212, 160, 0.025));
}
.card.done,
.usal-item.done {
  --completed-accent: var(--green);
}
.legend-done,
.path-dot-green {
  background: var(--green);
}
.summary-repo-link,
.project-detail-link {
  color: #dcfff5;
}


/* ===== V12: selector de ruta solo para tablet y mobile ===== */
.route-switch {
  display: none;
}

@media (max-width: 1080px) {
  .route-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
    padding: 12px;
    position: sticky;
    top: 8px;
    z-index: 20;
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.42);
  }

  .route-switch > div:first-child {
    display: none;
  }

  .route-tabs {
    width: 100%;
  }

  .route-tab {
    flex: 1;
  }
}

@media (max-width: 720px) {
  .route-switch {
    top: 5px;
    margin: 12px 0;
    padding: 10px;
    border-radius: 14px;
  }
}


/* ===== V13: separación de bloques y fondo uniforme en iPhone ===== */
html {
  min-height: 100%;
  background-color: #02050d;
}

body {
  min-height: 100dvh;
  background-color: #02050d;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

/* Al ocultarse el selector en escritorio, recupera el espacio entre cabecera y contenido. */
@media (min-width: 1081px) {
  .content-grid {
    margin-top: 16px;
  }
}

@media (max-width: 1080px) {
  .page-shell {
    max-width: 100%;
  }
}
