:root {
  --ink: #18202a;
  --muted: #5c6875;
  --line: #dfe5eb;
  --paper: #fbfaf7;
  --white: #ffffff;
  --blue: #1f5f8b;
  --green: #2f7d68;
  --red: #a84b3d;
  --gold: #b8862f;
  --violet: #6b5ea8;
  --shadow: 0 18px 45px rgba(24, 32, 42, .12);
  --radius: 8px;
}

[data-theme="dark"] {
  --ink: #eaf6ff;
  --muted: #a9b8c8;
  --line: rgba(103, 232, 249, .18);
  --paper: #07111f;
  --white: #101c2e;
  --blue: #67e8f9;
  --green: #64d59b;
  --red: #ff8a7a;
  --gold: #f6c453;
  --violet: #a78bfa;
  --shadow: 0 18px 45px rgba(0, 0, 0, .34);
}

[data-theme="light"] {
  --ink: #172033;
  --muted: #4f6075;
  --line: #d9e4ec;
  --paper: #f7fafc;
  --white: #ffffff;
  --blue: #1f5f8b;
  --green: #2f7d68;
  --red: #a84b3d;
  --gold: #b8862f;
  --violet: #6b5ea8;
  --shadow: 0 18px 45px rgba(23, 32, 51, .1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

[data-theme="dark"] body {
  background:
    radial-gradient(circle at 15% 0%, rgba(103, 232, 249, .12), transparent 28%),
    linear-gradient(180deg, #07111f, #0c1626 58%, #07111f);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(251, 250, 247, .92);
  border-bottom: 1px solid rgba(24, 32, 42, .1);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-size: .78rem;
}

.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;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link,
.nav-parent {
  padding: 9px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-size: .91rem;
  font-weight: 650;
}

.nav-parent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-parent span {
  font-size: .72rem;
}

.nav-link:hover,
.nav-parent:hover,
.nav-group:focus-within .nav-parent,
.nav-group.is-active .nav-parent {
  color: var(--ink);
  background: rgba(31, 95, 139, .08);
}

.nav-group {
  position: relative;
}

.nav-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 70;
  display: grid;
  width: 318px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .98);
  box-shadow: var(--shadow);
  display: none;
  transform: translateY(-6px);
  transition: transform .16s ease;
}

.nav-menu-wide {
  width: 360px;
}

.nav-group:last-of-type .nav-menu {
  right: 0;
  left: auto;
}

.nav-group:hover .nav-menu,
.nav-group:focus-within .nav-menu,
.nav-group.is-active .nav-menu {
  display: grid;
  transform: translateY(0);
}

.nav-menu a,
.nav-menu-section {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: 7px;
}

.nav-menu a:hover,
.nav-menu-section:hover {
  background: rgba(31, 95, 139, .08);
}

.nav-menu strong,
.nav-menu-section > strong {
  color: var(--ink);
  font-size: .95rem;
  line-height: 1.2;
}

.nav-menu span,
.nav-menu-section > span {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.35;
}

.nav-sublinks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.nav-sublinks a {
  display: inline-flex;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--blue);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
}

.nav-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: clamp(620px, calc(100svh - 138px), 820px);
  display: grid;
  align-items: end;
  padding: clamp(92px, 14vw, 168px) clamp(18px, 5vw, 72px) 44px;
  overflow: hidden;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(14, 21, 30, .86), rgba(14, 21, 30, .56) 48%, rgba(14, 21, 30, .2)),
    linear-gradient(0deg, rgba(14, 21, 30, .78), rgba(14, 21, 30, 0) 42%);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("../imgs/hero-retrofuturo-trabajo-social.webp");
  background-size: cover;
  background-position: center 38%;
  transform: scale(1.02);
}

.hero-content {
  max-width: 820px;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero h1,
.section h2,
.license-band h2 {
  margin: 0;
  font-family: Lora, Georgia, serif;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(3rem, 8vw, 6.9rem);
}

.hero-copy {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, .88);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 7px;
  font-weight: 800;
}

.button.primary {
  background: var(--gold);
  color: #111820;
}

.button.secondary {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .36);
  background: rgba(255, 255, 255, .08);
}

.hero-panel {
  position: absolute;
  right: clamp(18px, 5vw, 72px);
  bottom: 36px;
  width: min(300px, calc(100% - 36px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .11);
  color: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
}

.hero-panel strong,
.hero-panel span {
  display: block;
}

.hero-panel strong {
  color: var(--white);
  margin-bottom: 4px;
}

.quick-access {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.quick-access a {
  min-height: 132px;
  padding: 24px clamp(18px, 3vw, 34px);
  background: var(--white);
}

.quick-access span {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-weight: 800;
}

.quick-access strong {
  display: block;
  max-width: 360px;
  font-size: clamp(1.05rem, 1.5vw, 1.32rem);
  line-height: 1.28;
}

.section,
.license-band,
.site-footer {
  padding-inline: clamp(18px, 5vw, 72px);
}

.section {
  padding-top: clamp(68px, 8vw, 112px);
  padding-bottom: clamp(68px, 8vw, 112px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section h2,
.license-band h2 {
  font-size: clamp(2rem, 4vw, 4rem);
}

.section-heading > p:last-child,
.license-band > p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.resource-card {
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 1px 0 rgba(24, 32, 42, .04);
}

.resource-card.featured {
  grid-column: span 1;
}

.resource-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.resource-visual {
  position: relative;
  width: 100%;
  min-height: 220px;
  overflow: hidden;
  border-bottom: 1px solid var(--rf-border, var(--line));
  background:
    linear-gradient(rgba(103, 232, 249, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, .08) 1px, transparent 1px),
    radial-gradient(circle at 24% 22%, rgba(103, 232, 249, .22), transparent 26%),
    linear-gradient(135deg, rgba(16, 28, 46, .96), rgba(7, 17, 31, .96));
  background-size: 26px 26px, 26px 26px, auto, auto;
}

.resource-visual::before,
.resource-visual::after,
.resource-visual span {
  content: "";
  position: absolute;
  display: block;
}

.resource-visual::before {
  inset: 20px;
  border: 1px solid rgba(103, 232, 249, .24);
  border-radius: 10px;
  box-shadow: inset 0 0 28px rgba(103, 232, 249, .08);
}

.resource-visual::after {
  left: 28px;
  right: 28px;
  bottom: 28px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, .72), transparent);
}

.resource-visual span:nth-child(1) {
  width: 74px;
  height: 74px;
  left: 38px;
  top: 38px;
  border: 1px solid rgba(103, 232, 249, .5);
  border-radius: 8px;
  background: rgba(103, 232, 249, .1);
}

.resource-visual span:nth-child(2) {
  width: 46%;
  height: 10px;
  right: 38px;
  top: 54px;
  border-radius: 999px;
  background: rgba(237, 246, 255, .22);
  box-shadow: 0 28px 0 rgba(237, 246, 255, .14), 0 56px 0 rgba(237, 246, 255, .08);
}

.resource-visual span:nth-child(3) {
  width: 136px;
  height: 52px;
  right: 38px;
  bottom: 44px;
  border: 1px solid rgba(246, 196, 83, .45);
  border-radius: 8px;
  background: rgba(246, 196, 83, .1);
}

.visual-oposiciones span:nth-child(1) {
  border-radius: 50%;
  box-shadow: 0 0 0 14px rgba(91, 140, 255, .08), 0 0 28px rgba(103, 232, 249, .18);
}

.visual-oposiciones span:nth-child(3)::before {
  content: "A2";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--rf-amber, #f6c453);
  font-weight: 900;
  letter-spacing: .08em;
}

.visual-normativa {
  background:
    linear-gradient(rgba(246, 196, 83, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 196, 83, .08) 1px, transparent 1px),
    radial-gradient(circle at 72% 28%, rgba(246, 196, 83, .18), transparent 28%),
    linear-gradient(135deg, rgba(31, 25, 25, .96), rgba(7, 17, 31, .96));
  background-size: 26px 26px, 26px 26px, auto, auto;
}

.visual-normativa span:nth-child(1) {
  border-color: rgba(246, 196, 83, .52);
  background: rgba(246, 196, 83, .1);
  transform: rotate(-4deg);
}

.visual-normativa span:nth-child(1)::before,
.visual-normativa span:nth-child(1)::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  height: 2px;
  background: rgba(246, 196, 83, .7);
}

.visual-normativa span:nth-child(1)::before { top: 24px; }
.visual-normativa span:nth-child(1)::after { top: 42px; }

.visual-housing span:nth-child(1) {
  border-color: rgba(100, 213, 155, .5);
  background: rgba(100, 213, 155, .1);
  clip-path: polygon(50% 0, 100% 38%, 100% 100%, 0 100%, 0 38%);
}

.visual-housing span:nth-child(3) {
  border-color: rgba(100, 213, 155, .45);
  background: rgba(100, 213, 155, .1);
}

.visual-rrdd {
  background:
    linear-gradient(rgba(167, 139, 250, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, .08) 1px, transparent 1px),
    radial-gradient(circle at 24% 70%, rgba(167, 139, 250, .22), transparent 25%),
    linear-gradient(135deg, rgba(30, 18, 45, .96), rgba(7, 17, 31, .96));
  background-size: 26px 26px, 26px 26px, auto, auto;
}

.visual-rrdd span:nth-child(1) {
  border-radius: 50%;
  border-color: rgba(167, 139, 250, .52);
  background: conic-gradient(from 90deg, rgba(167, 139, 250, .28), rgba(103, 232, 249, .08), rgba(167, 139, 250, .28));
}

.visual-fondos span:nth-child(1) {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border-color: rgba(91, 140, 255, .52);
}

.visual-fondos span:nth-child(1)::before {
  content: "€";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--rf-cyan, #67e8f9);
  font-size: 2rem;
  font-weight: 900;
}

.visual-ia span:nth-child(1) {
  border-radius: 18px;
  border-color: rgba(103, 232, 249, .52);
  background:
    radial-gradient(circle at 28% 28%, rgba(103, 232, 249, .85) 0 4px, transparent 5px),
    radial-gradient(circle at 72% 28%, rgba(103, 232, 249, .85) 0 4px, transparent 5px),
    radial-gradient(circle at 50% 68%, rgba(103, 232, 249, .65) 0 4px, transparent 5px),
    rgba(103, 232, 249, .1);
}

.resource-card div {
  padding: 18px;
}

.tag {
  width: fit-content;
  margin: 0 0 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(31, 95, 139, .1);
  color: var(--blue);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tag.law { color: var(--red); background: rgba(168, 75, 61, .1); }
.tag.housing { color: var(--green); background: rgba(47, 125, 104, .11); }
.tag.harm { color: #7b5a18; background: rgba(184, 134, 47, .16); }
.tag.funds { color: #795187; background: rgba(107, 94, 168, .12); }
.tag.ai { color: #245a74; background: rgba(43, 126, 161, .12); }

.resource-card h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
}

.resource-card p:not(.tag) {
  margin: 12px 0 18px;
  color: var(--muted);
}

.resource-card a {
  font-weight: 850;
  color: var(--ink);
  border-bottom: 2px solid var(--gold);
}

.split {
  display: grid;
  grid-template-columns: minmax(240px, .85fr) 1.15fr;
  gap: clamp(30px, 6vw, 88px);
  background: #eef3f1;
  border-block: 1px solid #d8e3df;
}

.method-list {
  display: grid;
  gap: 18px;
}

.method-list div {
  display: grid;
  grid-template-columns: 58px 1fr;
  column-gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid #cddbd6;
}

.method-list span {
  color: var(--green);
  font-weight: 900;
}

.method-list h3 {
  margin: 0 0 6px;
  font-size: 1.12rem;
}

.method-list p {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
}

.license-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 7vw, 92px);
  padding-top: clamp(58px, 7vw, 88px);
  padding-bottom: clamp(58px, 7vw, 88px);
  background: var(--ink);
  color: var(--white);
}

.license-band > p {
  color: rgba(255, 255, 255, .78);
  align-self: end;
}

.project-philosophy {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: clamp(24px, 4vw, 48px);
  padding-top: clamp(58px, 7vw, 92px);
  padding-bottom: clamp(58px, 7vw, 92px);
  background:
    radial-gradient(circle at 12% 18%, rgba(103, 232, 249, .12), transparent 28%),
    linear-gradient(180deg, rgba(7, 17, 31, .88), rgba(11, 20, 35, .96));
  border-block: 1px solid var(--rf-border);
}

.philosophy-copy,
.philosophy-license {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, .2);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 28, 46, .88), rgba(8, 16, 30, .92));
  box-shadow: 0 18px 44px rgba(0, 0, 0, .24);
}

.philosophy-copy {
  padding: clamp(24px, 4vw, 44px);
}

.philosophy-copy::before,
.philosophy-license::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--rf-cyan), var(--rf-blue), transparent);
}

.philosophy-copy h2 {
  max-width: 780px;
  margin: 0 0 22px;
  color: var(--rf-text);
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: .98;
  letter-spacing: -.035em;
}

.philosophy-copy p:not(.eyebrow) {
  max-width: 74ch;
  margin: 0 0 18px;
  color: #b6c5d7;
  font-size: 1rem;
  line-height: 1.78;
}

.philosophy-copy p:last-child {
  margin-bottom: 0;
  color: var(--rf-text);
  font-weight: 750;
}

.philosophy-license {
  align-self: start;
  padding: clamp(22px, 3vw, 34px);
  text-align: center;
}

.license-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.license-icons span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid rgba(237, 246, 255, .9);
  border-radius: 50%;
  color: var(--rf-text);
  font-size: .86rem;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(103, 232, 249, .1);
}

.philosophy-license h3 {
  margin: 0 0 14px;
  color: var(--rf-text);
  font-size: 1.22rem;
}

.philosophy-license p {
  margin: 0 0 16px;
  color: var(--rf-muted);
  line-height: 1.65;
}

.license-chip {
  display: grid;
  gap: 7px;
  margin: 22px 0;
  padding: 18px;
  border: 1px solid rgba(246, 196, 83, .28);
  border-radius: 8px;
  background: rgba(246, 196, 83, .08);
  color: #d8e5f4;
}

.license-chip strong {
  color: var(--rf-amber);
}

.license-chip span {
  color: #b6c5d7;
  font-size: .92rem;
}

.license-author {
  color: var(--rf-text) !important;
  font-weight: 850;
}

.philosophy-license a {
  color: var(--rf-cyan);
  font-weight: 850;
  border-bottom: 2px solid var(--rf-amber);
}

.site-footer {
  display: grid;
  gap: 28px;
  padding-top: 28px;
  padding-bottom: 34px;
  background: #111820;
  color: rgba(255, 255, 255, .72);
}

.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.site-footer strong {
  color: var(--white);
}

.site-footer p {
  margin: 5px 0 0;
}

.footer-main nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer a,
.footer-main a {
  color: rgba(255, 255, 255, .86);
}

.legal-panel {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 18px 26px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.legal-panel h2 {
  grid-row: span 3;
  margin: 0;
  color: var(--white);
  font-size: 1rem;
}

.legal-item {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .045);
}

.legal-item summary {
  position: relative;
  padding: 15px 44px 15px 16px;
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.legal-item summary::-webkit-details-marker {
  display: none;
}

.legal-item summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 1.2rem;
  line-height: 1;
}

.legal-item[open] summary::after {
  content: "-";
}

.legal-content {
  padding: 0 16px 18px;
  color: rgba(255, 255, 255, .78);
  max-width: 920px;
}

.legal-content h3 {
  margin: 18px 0 6px;
  color: var(--white);
  font-size: .95rem;
}

.legal-content h3:first-child {
  margin-top: 4px;
}

.legal-content p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, .76);
}

.legal-content strong {
  color: rgba(255, 255, 255, .94);
}

@media (max-width: 1060px) {
  .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-panel { position: static; margin-top: 30px; }
}

@media (max-width: 820px) {
  .site-header { min-height: 64px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    padding: 10px 18px 18px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .site-nav a { background: var(--white); border: 1px solid var(--line); }
  .nav-group {
    display: grid;
    gap: 8px;
  }
  .nav-parent {
    justify-content: space-between;
    width: 100%;
    background: var(--white);
    border: 1px solid var(--line);
  }
  .nav-menu,
  .nav-menu-wide {
    position: static;
    width: 100%;
    padding: 6px;
    box-shadow: none;
    display: grid;
    transform: none;
    background: rgba(255, 255, 255, .62);
  }
  .nav-menu a,
  .nav-menu-section {
    border: 0;
    background: var(--white);
  }
  .hero { min-height: clamp(600px, calc(100svh - 110px), 760px); padding-top: 88px; }
  .quick-access,
  .split,
  .project-philosophy,
  .license-band,
  .legal-panel {
    grid-template-columns: 1fr;
  }
  .footer-main { display: grid; }
  .legal-panel h2 { grid-row: auto; }
}

@media (max-width: 620px) {
  .hero::after {
    background:
      linear-gradient(90deg, rgba(14, 21, 30, .9), rgba(14, 21, 30, .55)),
      linear-gradient(0deg, rgba(14, 21, 30, .84), rgba(14, 21, 30, 0) 46%);
  }
  .hero {
    min-height: clamp(540px, calc(100svh - 150px), 680px);
    padding-bottom: 30px;
  }
  .hero h1 {
    font-size: clamp(2.45rem, 13vw, 3.35rem);
  }
  .hero-panel {
    display: none;
  }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-card.featured { grid-column: span 1; }
  .quick-access { grid-template-columns: 1fr; }
  .site-nav.is-open { grid-template-columns: 1fr; }
  .method-list div { grid-template-columns: 44px 1fr; }
}

/* ===================================
   STUDYOS RETRO-FUTURE VISUAL LAYER
   =================================== */

:root {
  --rf-bg: #07111f;
  --rf-surface: rgba(16, 28, 46, .86);
  --rf-surface-2: rgba(24, 40, 64, .82);
  --rf-border: rgba(112, 144, 178, .32);
  --rf-text: #edf6ff;
  --rf-muted: #96a8bd;
  --rf-cyan: #67e8f9;
  --rf-blue: #5b8cff;
  --rf-violet: #a78bfa;
  --rf-amber: #f6c453;
  --rf-green: #64d59b;
  --rf-red: #ff7b7b;
  --rf-radius: 8px;
  --rf-glow: 0 0 24px rgba(103, 232, 249, .16);
}

body {
  color: var(--rf-text);
  background:
    radial-gradient(circle at 18% 10%, rgba(91, 140, 255, .14), transparent 28%),
    radial-gradient(circle at 82% 2%, rgba(167, 139, 250, .12), transparent 24%),
    linear-gradient(180deg, #08111f 0%, #0b1423 44%, #08111f 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -10;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(103, 232, 249, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, .055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), rgba(0, 0, 0, .18));
}

.site-header {
  background: rgba(7, 17, 31, .86);
  border-bottom: 1px solid var(--rf-border);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .3);
}

.brand,
.nav-link,
.nav-parent {
  color: var(--rf-text);
}

.brand-mark {
  border: 1px solid rgba(103, 232, 249, .5);
  background: linear-gradient(135deg, rgba(91, 140, 255, .34), rgba(103, 232, 249, .18));
  box-shadow: var(--rf-glow);
}

.nav-link,
.nav-parent {
  border: 1px solid transparent;
  color: var(--rf-muted);
}

.nav-link:hover,
.nav-parent:hover,
.nav-group:focus-within .nav-parent,
.nav-group.is-active .nav-parent {
  color: var(--rf-text);
  border-color: rgba(103, 232, 249, .26);
  background: rgba(103, 232, 249, .08);
}

.nav-menu {
  border-color: var(--rf-border);
  background: rgba(11, 20, 35, .96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .42), var(--rf-glow);
}

.nav-menu strong,
.nav-menu-section > strong {
  color: var(--rf-text);
}

.nav-menu span,
.nav-menu-section > span {
  color: var(--rf-muted);
}

.nav-menu a:hover,
.nav-menu-section:hover {
  background: rgba(103, 232, 249, .08);
}

.nav-sublinks a {
  border-color: rgba(103, 232, 249, .24);
  background: rgba(103, 232, 249, .08);
  color: var(--rf-cyan);
}

.nav-toggle {
  background: rgba(16, 28, 46, .9);
  border-color: var(--rf-border);
}

.nav-toggle span {
  background: var(--rf-text);
}

.hero {
  min-height: clamp(640px, calc(100svh - 104px), 820px);
  border-bottom: 1px solid var(--rf-border);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(103, 232, 249, .16), transparent 26%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.055) 0 1px, transparent 1px 5px);
  opacity: .28;
  mix-blend-mode: screen;
}

.hero::after {
  background:
    linear-gradient(90deg, rgba(7, 17, 31, .96), rgba(7, 17, 31, .78) 48%, rgba(7, 17, 31, .42)),
    linear-gradient(0deg, rgba(7, 17, 31, .94), rgba(7, 17, 31, .08) 52%);
}

.hero-media {
  filter: saturate(.8) contrast(1.06) brightness(.76);
}

.eyebrow {
  color: var(--rf-cyan);
  font-family: "Inter", system-ui, sans-serif;
  letter-spacing: .12em;
}

.hero h1,
.section h2,
.license-band h2 {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 850;
  letter-spacing: -.035em;
}

.hero h1 {
  max-width: 900px;
  font-size: clamp(3.2rem, 7.6vw, 6.4rem);
  text-shadow: 0 0 34px rgba(103, 232, 249, .14);
}

.hero-copy {
  color: #c8d7e7;
}

.button {
  border: 1px solid rgba(103, 232, 249, .28);
  border-radius: var(--rf-radius);
}

.button.primary {
  background: linear-gradient(135deg, var(--rf-cyan), var(--rf-blue));
  color: #06101d;
  box-shadow: 0 0 28px rgba(103, 232, 249, .22);
}

.button.secondary {
  color: var(--rf-text);
  background: rgba(16, 28, 46, .72);
}

.hero-panel {
  border-color: rgba(103, 232, 249, .34);
  background: rgba(11, 20, 35, .7);
  box-shadow: var(--rf-glow);
}

.hero-panel::before {
  content: "STATUS / OPEN LIBRARY";
  display: block;
  margin-bottom: 10px;
  color: var(--rf-cyan);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .11em;
}

.quick-access {
  background: var(--rf-border);
  border-bottom-color: var(--rf-border);
}

.quick-access a,
.resource-card,
.legal-item {
  background: linear-gradient(180deg, rgba(16, 28, 46, .92), rgba(12, 22, 38, .92));
  border-color: var(--rf-border);
}

.quick-access span,
.resource-card a {
  color: var(--rf-cyan);
}

.quick-access strong,
.resource-card h3,
.section h2,
.method-list h3 {
  color: var(--rf-text);
}

.section {
  background: transparent;
}

.section-heading > p:last-child,
.resource-card p:not(.tag),
.method-list p {
  color: var(--rf-muted);
}

.resource-card {
  box-shadow: 0 14px 38px rgba(0, 0, 0, .22);
}

.resource-card img {
  filter: saturate(.72) contrast(1.08);
}

.tag {
  background: rgba(103, 232, 249, .12);
  color: var(--rf-cyan);
}

.tag.law { color: var(--rf-amber); background: rgba(246, 196, 83, .12); }
.tag.housing { color: var(--rf-green); background: rgba(100, 213, 155, .12); }
.tag.harm { color: #f0a6ff; background: rgba(167, 139, 250, .15); }
.tag.funds { color: #a8c5ff; background: rgba(91, 140, 255, .14); }
.tag.ai { color: var(--rf-cyan); background: rgba(103, 232, 249, .12); }

.split {
  background: rgba(11, 20, 35, .62);
  border-block-color: var(--rf-border);
}

.method-list div {
  border-bottom-color: var(--rf-border);
}

.method-list span {
  color: var(--rf-cyan);
}

.license-band,
.site-footer {
  background: #07111f;
  border-top: 1px solid var(--rf-border);
}

.license-band > p,
.legal-content p,
.site-footer p {
  color: var(--rf-muted);
}

.site-footer {
  box-shadow: inset 0 1px 0 rgba(103, 232, 249, .08);
}

.legal-item summary::after {
  color: var(--rf-cyan);
}

@media (max-width: 820px) {
  .site-nav {
    background: rgba(7, 17, 31, .98);
    border-bottom-color: var(--rf-border);
  }
  .site-nav a,
  .nav-parent,
  .nav-menu a,
  .nav-menu-section {
    background: rgba(16, 28, 46, .88);
    border-color: var(--rf-border);
  }
  .nav-menu,
  .nav-menu-wide {
    background: rgba(7, 17, 31, .72);
  }
}

/* StudyOS-style global navigation */
.site-header {
  gap: 1rem;
}

.site-nav {
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(112, 144, 178, .28);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(12, 22, 38, .94), rgba(8, 16, 30, .94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 26px rgba(103, 232, 249, .08);
}

.nav-link,
.nav-parent {
  min-height: 42px;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 8px;
  color: #c4d2e1;
  font-size: .9rem;
  font-weight: 800;
}

.nav-link::before,
.nav-parent::before {
  content: "";
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(103, 232, 249, .36);
  border-radius: 7px;
  background: rgba(103, 232, 249, .08);
  color: var(--rf-cyan);
  font-size: .62rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 12px rgba(103, 232, 249, .08), 0 0 16px rgba(103, 232, 249, .08);
}

.nav-home::before { content: "IN"; border-color: rgba(167, 139, 250, .58); color: var(--rf-violet); }
.nav-oposiciones::before { content: "OP"; border-color: rgba(103, 232, 249, .5); color: var(--rf-cyan); }
.nav-courses::before { content: "CU"; border-color: rgba(246, 196, 83, .58); color: var(--rf-amber); }
.nav-author::before { content: "AU"; border-color: rgba(100, 213, 155, .58); color: var(--rf-green); }

.nav-parent > span {
  width: 10px;
  overflow: hidden;
  color: transparent !important;
}

.theme-toggle.nav-theme-toggle {
  position: relative;
  z-index: 1;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(246, 196, 83, .46);
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 30%, rgba(246, 196, 83, .22), transparent 32%),
    rgba(246, 196, 83, .08);
  color: var(--rf-amber);
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 0 14px rgba(246, 196, 83, .08), 0 0 16px rgba(246, 196, 83, .08);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.theme-toggle.nav-theme-toggle::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .7;
}

.theme-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  line-height: 1;
  transition: transform .24s ease, opacity .24s ease;
}

.theme-icon-moon {
  opacity: 0;
  transform: translateY(16px) rotate(-30deg);
}

[data-theme="dark"] .theme-icon-sun {
  opacity: 0;
  transform: translateY(-16px) rotate(30deg);
}

[data-theme="dark"] .theme-icon-moon {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

.theme-toggle.nav-theme-toggle:hover {
  border-color: rgba(246, 196, 83, .72);
  background:
    radial-gradient(circle at 50% 50%, rgba(246, 196, 83, .32), transparent 38%),
    rgba(246, 196, 83, .13);
  transform: translateY(-1px);
  box-shadow: inset 0 0 16px rgba(246, 196, 83, .14), 0 0 24px rgba(246, 196, 83, .2);
}

.nav-parent > span::after {
  content: "v";
  color: #8fa2b8;
  font-size: .75rem;
}

.nav-link:hover,
.nav-parent:hover,
.nav-group:focus-within .nav-parent,
.nav-group.is-active .nav-parent {
  color: var(--rf-text);
  border-color: rgba(103, 232, 249, .34);
  background: rgba(103, 232, 249, .08);
  box-shadow: 0 0 18px rgba(103, 232, 249, .08);
}

.nav-home {
  color: var(--rf-text);
  background: linear-gradient(135deg, rgba(103, 232, 249, .18), rgba(91, 140, 255, .2));
  border-color: rgba(103, 232, 249, .34);
}

@media (max-width: 820px) {
  .site-nav {
    align-items: stretch;
    border-radius: 0;
    padding: 12px;
  }

  .nav-link,
  .nav-parent {
    justify-content: flex-start;
    width: 100%;
  }
}

/* Retrofuture resource cards v2 */
.resource-card {
  position: relative;
  border-color: rgba(103, 232, 249, .2);
  background:
    linear-gradient(180deg, rgba(16, 28, 46, .94), rgba(9, 18, 32, .96));
}

.resource-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(103, 232, 249, .08), transparent 42%);
  opacity: 0;
  transition: opacity .25s ease;
}

.resource-card:hover::before {
  opacity: 1;
}

.resource-card > div:not(.resource-visual) {
  position: relative;
  z-index: 2;
}

.resource-visual {
  min-height: 188px;
  padding: 0 !important;
  isolation: isolate;
  border-bottom-color: rgba(103, 232, 249, .18);
  background:
    radial-gradient(circle at 18% 24%, rgba(103, 232, 249, .22), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(91, 140, 255, .16), transparent 24%),
    linear-gradient(rgba(103, 232, 249, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, .08) 1px, transparent 1px),
    linear-gradient(135deg, rgba(12, 27, 47, .98), rgba(5, 12, 24, .98));
  background-size: auto, auto, 24px 24px, 24px 24px, auto;
}

.resource-visual::before {
  inset: 16px;
  border-radius: 8px;
  border-color: rgba(103, 232, 249, .28);
  background:
    linear-gradient(90deg, rgba(103, 232, 249, .08), transparent 45%, rgba(246, 196, 83, .07)),
    repeating-linear-gradient(0deg, transparent 0 10px, rgba(255,255,255,.035) 10px 11px);
  box-shadow:
    inset 0 0 34px rgba(103, 232, 249, .1),
    0 0 30px rgba(103, 232, 249, .06);
}

.resource-visual::after {
  left: 11%;
  right: 11%;
  bottom: 22px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(103, 232, 249, .2), transparent 68%);
  filter: blur(3px);
}

.resource-visual span:nth-child(1) {
  z-index: 2;
  left: 34px;
  top: 34px;
  width: 82px;
  height: 82px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(103, 232, 249, .22), rgba(91, 140, 255, .06));
  box-shadow:
    0 0 0 12px rgba(103, 232, 249, .045),
    0 0 28px rgba(103, 232, 249, .18);
}

.resource-visual span:nth-child(2) {
  z-index: 2;
  right: 38px;
  top: 42px;
  width: 42%;
  height: 8px;
  background: rgba(237, 246, 255, .32);
  box-shadow:
    0 24px 0 rgba(237, 246, 255, .2),
    0 48px 0 rgba(103, 232, 249, .16);
}

.resource-visual span:nth-child(2)::before {
  content: "";
  position: absolute;
  right: 15%;
  top: 78px;
  width: 92%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, .64), transparent);
  box-shadow: 0 14px 0 rgba(246, 196, 83, .28), 0 -14px 0 rgba(91, 140, 255, .28);
}

.resource-visual span:nth-child(3) {
  z-index: 3;
  right: 36px;
  bottom: 34px;
  width: 128px;
  height: 48px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(246, 196, 83, .13), rgba(103, 232, 249, .04));
  box-shadow: 0 0 24px rgba(246, 196, 83, .08);
}

.visual-oposiciones span:nth-child(1) {
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(103, 232, 249, .28), transparent 58%),
    conic-gradient(from 120deg, rgba(103, 232, 249, .72), rgba(91, 140, 255, .16), rgba(246, 196, 83, .48), rgba(103, 232, 249, .72));
}

.visual-oposiciones span:nth-child(1)::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(7, 17, 31, .72);
  border-radius: inherit;
  background: rgba(7, 17, 31, .68);
}

.visual-oposiciones span:nth-child(3)::before {
  content: "A2";
  letter-spacing: 0;
}

.visual-normativa {
  background:
    radial-gradient(circle at 72% 24%, rgba(246, 196, 83, .2), transparent 26%),
    linear-gradient(rgba(246, 196, 83, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 196, 83, .08) 1px, transparent 1px),
    linear-gradient(135deg, rgba(34, 27, 22, .98), rgba(5, 12, 24, .98));
  background-size: auto, 24px 24px, 24px 24px, auto;
}

.visual-normativa span:nth-child(1) {
  width: 74px;
  height: 88px;
  border-radius: 8px;
  border-color: rgba(246, 196, 83, .58);
  background:
    linear-gradient(180deg, rgba(246, 196, 83, .2), rgba(246, 196, 83, .06));
  transform: rotate(-5deg);
}

.visual-normativa span:nth-child(1)::before,
.visual-normativa span:nth-child(1)::after {
  left: 16px;
  right: 16px;
  height: 2px;
  background: rgba(246, 196, 83, .78);
  box-shadow: 0 14px 0 rgba(246, 196, 83, .45);
}

.visual-housing {
  background:
    radial-gradient(circle at 28% 24%, rgba(100, 213, 155, .18), transparent 26%),
    linear-gradient(rgba(100, 213, 155, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, .07) 1px, transparent 1px),
    linear-gradient(135deg, rgba(11, 35, 38, .98), rgba(5, 12, 24, .98));
  background-size: auto, 24px 24px, 24px 24px, auto;
}

.visual-housing span:nth-child(1) {
  width: 88px;
  height: 86px;
  border-color: rgba(100, 213, 155, .58);
  background:
    linear-gradient(180deg, rgba(100, 213, 155, .22), rgba(103, 232, 249, .07));
  clip-path: polygon(50% 0, 100% 36%, 100% 100%, 0 100%, 0 36%);
}

.visual-housing span:nth-child(1)::before {
  content: "";
  position: absolute;
  left: 34px;
  bottom: 0;
  width: 20px;
  height: 34px;
  border: 1px solid rgba(100, 213, 155, .52);
  background: rgba(7, 17, 31, .45);
}

.visual-rrdd span:nth-child(1) {
  background:
    radial-gradient(circle at 50% 50%, rgba(167, 139, 250, .34), transparent 55%),
    conic-gradient(from 90deg, rgba(167, 139, 250, .5), rgba(103, 232, 249, .12), rgba(246, 196, 83, .24), rgba(167, 139, 250, .5));
}

.visual-rrdd span:nth-child(2)::after {
  content: "";
  position: absolute;
  left: -120px;
  top: 32px;
  width: 170px;
  height: 42px;
  border-bottom: 2px solid rgba(167, 139, 250, .62);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.visual-fondos span:nth-child(1) {
  border-color: rgba(91, 140, 255, .58);
  background:
    radial-gradient(circle, rgba(91, 140, 255, .26), transparent 58%),
    rgba(91, 140, 255, .08);
}

.visual-fondos span:nth-child(1)::before {
  content: "EUR";
  font-size: .92rem;
  letter-spacing: 0;
}

.visual-fondos span:nth-child(3)::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-top: 2px solid rgba(246, 196, 83, .54);
  border-bottom: 2px solid rgba(103, 232, 249, .44);
}

.visual-ia span:nth-child(1) {
  border-radius: 18px;
  border-color: rgba(103, 232, 249, .6);
  background:
    radial-gradient(circle at 28% 28%, rgba(103, 232, 249, .95) 0 4px, transparent 5px),
    radial-gradient(circle at 72% 28%, rgba(103, 232, 249, .95) 0 4px, transparent 5px),
    radial-gradient(circle at 50% 68%, rgba(246, 196, 83, .82) 0 4px, transparent 5px),
    linear-gradient(135deg, rgba(103, 232, 249, .2), rgba(91, 140, 255, .08));
}

.visual-ia span:nth-child(1)::before {
  content: "";
  position: absolute;
  inset: -16px;
  background:
    linear-gradient(90deg, transparent 0 18px, rgba(103, 232, 249, .5) 18px 20px, transparent 20px 100%),
    linear-gradient(0deg, transparent 0 18px, rgba(103, 232, 249, .42) 18px 20px, transparent 20px 100%);
  background-size: 34px 34px;
  opacity: .55;
  z-index: -1;
}

/* Interactive retrofuturistic navigation layer */
.nav-main,
.site-nav {
  position: relative;
  overflow: visible;
  isolation: isolate;
}

.nav-main::before,
.nav-main::after,
.site-nav::before,
.site-nav::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
}

.nav-main::before,
.site-nav::before {
  inset: 0;
  padding: 1px;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, .72), rgba(246, 196, 83, .5), transparent);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: .42;
  animation: nav-border-scan 5.4s linear infinite;
}

.nav-main::after,
.site-nav::after {
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, .75), transparent);
  opacity: .55;
  transform-origin: center;
  animation: nav-data-line 3.8s ease-in-out infinite;
}

@keyframes nav-border-scan {
  0% { filter: hue-rotate(0deg); opacity: .28; }
  50% { filter: hue-rotate(36deg); opacity: .62; }
  100% { filter: hue-rotate(0deg); opacity: .28; }
}

@keyframes nav-data-line {
  0%, 100% { transform: scaleX(.18); opacity: .18; }
  50% { transform: scaleX(1); opacity: .72; }
}

.nav-link,
.nav-parent {
  position: relative;
  z-index: 1;
  overflow: hidden;
  transform: translateZ(0);
  transition: transform .22s ease, color .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}

.nav-link::after,
.nav-parent::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255,255,255,.13) 42%, transparent 62%),
    radial-gradient(circle at var(--nav-x, 50%) var(--nav-y, 50%), rgba(103, 232, 249, .24), transparent 36%);
  opacity: 0;
  transform: translateX(-45%);
  transition: opacity .22s ease, transform .38s ease;
  pointer-events: none;
}

.nav-link::before,
.nav-parent::before {
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.nav-link:hover,
.nav-parent:hover,
.nav-link.active,
.nav-group.is-active .nav-parent,
.nav-group.is-current-section .nav-parent,
.nav-group:focus-within .nav-parent {
  transform: translateY(-1px);
}

.nav-link:hover::before,
.nav-parent:hover::before,
.nav-link.active::before,
.nav-group.is-active .nav-parent::before,
.nav-group.is-current-section .nav-parent::before {
  transform: translateY(-1px) scale(1.06);
  box-shadow: inset 0 0 14px rgba(103, 232, 249, .14), 0 0 24px rgba(103, 232, 249, .22);
}

.nav-link:hover::after,
.nav-parent:hover::after,
.nav-link.active::after,
.nav-group.is-active .nav-parent::after,
.nav-group.is-current-section .nav-parent::after {
  opacity: 1;
  transform: translateX(18%);
}

.nav-link.active::after {
  display: block;
}

.nav-menu,
.nav-menu-wide {
  overflow: hidden;
  border-color: rgba(103, 232, 249, .26);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .42), 0 0 36px rgba(103, 232, 249, .1);
  transform-origin: top center;
  transform: translateY(8px) scale(.98);
  transition: opacity .18s ease, visibility .18s ease, transform .22s ease;
}

.nav-menu::before,
.nav-menu-wide::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--rf-cyan), var(--rf-amber), transparent);
  opacity: .85;
}

.nav-group:hover .nav-menu,
.nav-group:focus-within .nav-menu,
.nav-group.is-active .nav-menu {
  transform: translateY(0) scale(1);
}

.nav-menu a,
.nav-menu-section {
  position: relative;
  border-left: 2px solid transparent;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.nav-menu a:hover,
.nav-menu-section:hover {
  transform: translateX(3px);
  border-left-color: var(--rf-cyan);
}

@media (prefers-reduced-motion: reduce) {
  .nav-main::before,
  .nav-main::after,
.site-nav::after {
    animation: none;
  }

  .nav-link,
  .nav-parent,
  .nav-link::after,
  .nav-parent::after,
  .nav-menu,
  .nav-menu-wide,
  .nav-menu a,
  .nav-menu-section {
    transition: none;
  }
}

@media (max-width: 820px) {
  .site-nav {
    position: fixed !important;
    top: 72px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: calc(100vh - 72px) !important;
    overflow-y: auto !important;
    align-items: stretch !important;
    border-radius: 0 !important;
    padding: 12px !important;
  }

  .site-nav .nav-theme-toggle {
    order: -1;
    width: 100% !important;
    flex: 0 0 44px !important;
    min-height: 44px !important;
    justify-content: center !important;
    align-self: stretch !important;
  }
}

/* Final polish: professional library tone and mobile containment */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.site-header {
  box-shadow: 0 8px 28px rgba(0, 0, 0, .24);
}

.site-nav {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 10px 26px rgba(0, 0, 0, .18);
}

.site-nav::before,
.site-nav::after {
  opacity: .24;
}

.nav-link::before,
.nav-parent::before {
  box-shadow: none;
}

.nav-link:hover,
.nav-parent:hover,
.nav-group:focus-within .nav-parent,
.nav-group.is-active .nav-parent {
  box-shadow: 0 0 14px rgba(103, 232, 249, .06);
}

.hero::before {
  opacity: .16;
}

@media (max-width: 820px) {
  .site-header {
    width: 100%;
    overflow: hidden;
  }

  .site-nav {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box;
  }

  .site-nav::before,
  .site-nav::after {
    left: 12px;
    right: 12px;
    width: auto;
  }

  .nav-menu,
  .nav-menu-wide {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Starter paths and accessibility refinements */
.starter-paths {
  display: grid;
  grid-template-columns: minmax(240px, .62fr) minmax(0, 1.38fr);
  gap: clamp(22px, 5vw, 64px);
  padding: clamp(48px, 6vw, 76px) clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.starter-heading h2 {
  margin: 0;
  max-width: 520px;
  color: var(--ink);
  font-size: clamp(1.75rem, 3vw, 3rem);
  line-height: 1.04;
}

.starter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.starter-grid a {
  display: grid;
  align-content: start;
  min-height: 190px;
  padding: 20px;
  border: 1px solid rgba(103, 232, 249, .2);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), transparent),
    rgba(16, 28, 46, .94);
  color: var(--rf-text, #edf6ff);
}

.starter-grid a:hover {
  border-color: rgba(103, 232, 249, .42);
  transform: translateY(-1px);
}

.starter-grid span {
  width: fit-content;
  margin-bottom: 18px;
  padding: 3px 8px;
  border: 1px solid rgba(103, 232, 249, .34);
  border-radius: 999px;
  color: var(--rf-cyan, #67e8f9);
  font-size: .74rem;
  font-weight: 900;
}

.starter-grid strong {
  color: var(--rf-text, #edf6ff);
  font-size: 1.08rem;
  line-height: 1.25;
}

.starter-grid p {
  margin: 10px 0 0;
  color: var(--rf-muted, #b9c7d7);
  font-size: .94rem;
  line-height: 1.55;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--rf-amber, #f6c453);
  outline-offset: 3px;
}

@media (max-width: 1060px) {
  .starter-paths {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .starter-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .starter-grid a {
    min-height: auto;
  }
}
