:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #dbe2ea;
  --primary: #0f4c81;
  --primary-dark: #0a3559;
  --accent: #eaf3fb;
  --code-bg: #0f172a;
  --code-text: #e5e7eb;
  --card-bg: #fafcfe;
  --table-head: #eef3f8;
  --table-alt: #fafbfc;
  --inline-code-bg: #eef2f7;
  --note-bg: #fffbea;
  --note-border: #f2df91;
  --shadow: rgba(0, 0, 0, 0.05);
  --max-width: 980px;
  --radius: 12px;
}

html[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #293548;
  --primary: #79b8ff;
  --primary-dark: #a8d0ff;
  --accent: #16263a;
  --code-bg: #020617;
  --code-text: #e5e7eb;
  --card-bg: #141d2c;
  --table-head: #182334;
  --table-alt: #121a27;
  --inline-code-bg: #1d2939;
  --note-bg: #2a2516;
  --note-border: #6f5d22;
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  font-size: 17px;
  line-height: 1.7;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

main {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 40px auto;
  padding: 48px 56px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 24px var(--shadow);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.site-toolbar {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 24px auto -18px;
  display: flex;
  justify-content: flex-end;
}

#theme-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 9px 13px;
  border-radius: 9px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 10px var(--shadow);
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.1s ease;
}

#theme-toggle:hover {
  border-color: var(--primary);
}

#theme-toggle:active {
  transform: translateY(1px);
}

h1,
h2,
h3 {
  line-height: 1.25;
  color: var(--text);
}

h1 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
}

h2 {
  margin-top: 48px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
  margin-top: 34px;
  margin-bottom: 12px;
  font-size: 1.3rem;
}

p {
  margin: 0 0 18px;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-dark);
}

ul,
ol {
  margin: 0 0 24px;
  padding-left: 28px;
}

li {
  margin-bottom: 8px;
}

strong {
  color: var(--text);
}

pre {
  overflow-x: auto;
  margin: 22px 0;
  padding: 18px 20px;
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 10px;
  line-height: 1.55;
}

code {
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;
}

p code,
li code,
td code {
  padding: 2px 6px;
  background: var(--inline-code-bg);
  color: var(--text);
  border-radius: 5px;
  font-size: 0.92em;
}

table {
  width: 100%;
  margin: 28px 0;
  border-collapse: collapse;
  background: var(--surface);
}

th,
td {
  padding: 12px 14px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--table-head);
  color: var(--text);
}

tr:nth-child(even) td {
  background: var(--table-alt);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 28px auto;
  border-radius: 10px;
}

figure {
  margin: 32px 0;
}

figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  background: var(--accent);
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
}

.course-model {
  margin: 28px 0;
  padding: 20px;
  background: var(--accent);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
  font-weight: 700;
  font-size: 1.08rem;
}

.navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin: 36px 0 8px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.navigation a {
  display: inline-block;
  padding: 10px 14px;
  background: var(--table-head);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.navigation a:hover {
  background: var(--accent);
}

.course-card {
  margin: 18px 0;
  padding: 20px 22px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.course-card h3 {
  margin-top: 0;
}

.note {
  margin: 24px 0;
  padding: 18px 20px;
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  border-radius: 10px;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --bg: #0b1220;
    --surface: #111827;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #293548;
    --primary: #79b8ff;
    --primary-dark: #a8d0ff;
    --accent: #16263a;
    --code-bg: #020617;
    --code-text: #e5e7eb;
    --card-bg: #141d2c;
    --table-head: #182334;
    --table-alt: #121a27;
    --inline-code-bg: #1d2939;
    --note-bg: #2a2516;
    --note-border: #6f5d22;
    --shadow: rgba(0, 0, 0, 0.35);
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  main {
    width: min(calc(100% - 20px), var(--max-width));
    margin: 18px auto;
    padding: 28px 22px;
  }

  .site-toolbar {
    width: min(calc(100% - 20px), var(--max-width));
    margin: 14px auto -4px;
  }

  h2 {
    margin-top: 38px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .navigation {
    flex-direction: column;
  }
}

/* Tema nocturno — estilo gris neutro inspirado en interfaces modernas */
html[data-theme="dark"] {
  --bg: #212121;
  --surface: #2f2f2f;
  --text: #ececec;
  --muted: #b4b4b4;
  --border: #424242;

  --primary: #d6d6d6;
  --primary-dark: #ffffff;

  --accent: #353535;

  --code-bg: #1f1f1f;
  --code-text: #ececec;

  --card-bg: #2b2b2b;

  --table-head: #333333;
  --table-alt: #292929;

  --inline-code-bg: #3a3a3a;

  --note-bg: #343127;
  --note-border: #665f43;

  --shadow: rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] body {
  background: #212121;
}

html[data-theme="dark"] main {
  background: #2f2f2f;
}

html[data-theme="dark"] .course-card {
  background: #2b2b2b;
}

html[data-theme="dark"] #theme-toggle {
  background: #2f2f2f;
  border-color: #4a4a4a;
  color: #ececec;
}

html[data-theme="dark"] #theme-toggle:hover {
  background: #383838;
  border-color: #606060;
}

html[data-theme="dark"] a {
  color: #e0e0e0;
}

html[data-theme="dark"] a:hover {
  color: #ffffff;
}


/* =========================================================
   Tema nocturno v2
   Gris neutro + contraste + acentos azules
   ========================================================= */

html[data-theme="dark"] {
  --bg: #212121;
  --surface: #2b2b2b;
  --text: #f2f2f2;
  --muted: #b8b8b8;

  --border: #505050;

  --primary: #6fb7ff;
  --primary-dark: #a8d4ff;

  --accent: #26384a;

  --code-bg: #171717;
  --code-text: #f1f1f1;

  --card-bg: #333333;

  --table-head: #383838;
  --table-alt: #303030;

  --inline-code-bg: #414141;

  --note-bg: #38331f;
  --note-border: #8c7a38;

  --shadow: rgba(0, 0, 0, 0.38);
}

html[data-theme="dark"] body {
  background: #212121;
  color: #f2f2f2;
}

html[data-theme="dark"] main {
  background: #2b2b2b;
  border-color: #484848;
}

html[data-theme="dark"] h1 {
  color: #ffffff;
}

html[data-theme="dark"] h2 {
  color: #ffffff;
  border-bottom-color: #4d4d4d;
}

html[data-theme="dark"] h3 {
  color: #f5f5f5;
}

html[data-theme="dark"] p,
html[data-theme="dark"] li {
  color: #e6e6e6;
}

html[data-theme="dark"] .course-card {
  background: #333333;
  border-color: #505050;
}

html[data-theme="dark"] .course-card:hover {
  background: #383838;
  border-color: #646464;
}

html[data-theme="dark"] a {
  color: #6fb7ff;
}

html[data-theme="dark"] a:hover {
  color: #a8d4ff;
}

html[data-theme="dark"] .course-card a {
  color: #78bdff;
}

html[data-theme="dark"] .course-card a:hover {
  color: #b5dcff;
}

html[data-theme="dark"] #theme-toggle {
  background: #303030;
  color: #f4f4f4;
  border: 1px solid #6a6a6a;
}

html[data-theme="dark"] #theme-toggle:hover {
  background: #3a3a3a;
  border-color: #6fb7ff;
}

html[data-theme="dark"] pre {
  background: #171717;
  border: 1px solid #3f3f3f;
}

html[data-theme="dark"] p code,
html[data-theme="dark"] li code,
html[data-theme="dark"] td code {
  background: #414141;
  color: #ffffff;
}

html[data-theme="dark"] table {
  background: #2b2b2b;
}

html[data-theme="dark"] th {
  background: #3b3b3b;
  color: #ffffff;
}

html[data-theme="dark"] td {
  border-color: #505050;
}

html[data-theme="dark"] tr:nth-child(even) td {
  background: #303030;
}

html[data-theme="dark"] .navigation a {
  background: #373737;
  color: #78bdff;
  border: 1px solid #505050;
}

html[data-theme="dark"] .navigation a:hover {
  background: #404040;
  border-color: #6fb7ff;
}

html[data-theme="dark"] .course-model {
  background: #26384a;
  border-color: #3f6282;
  color: #f2f7fc;
}


/* =========================================================
   Bloques copiables: Terminal y filtros Wireshark
   ========================================================= */

.command-wrapper {
  position: relative;
  margin: 22px 0;
}

.command-wrapper pre {
  margin: 0;
  padding-right: 95px;
}

.copy-command {
  position: absolute;
  top: 10px;
  right: 10px;

  appearance: none;
  border: 1px solid #475569;
  background: #1e293b;
  color: #e5e7eb;

  padding: 6px 10px;
  border-radius: 7px;

  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;

  cursor: pointer;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.copy-command:hover {
  background: #334155;
  border-color: #64748b;
  color: #ffffff;
}

.copy-command.copied {
  background: #173b2d;
  border-color: #2d7657;
  color: #b7f7d5;
}

pre.terminal-command::before,
pre.wireshark-filter::before {
  display: block;
  margin-bottom: 10px;
  color: #94a3b8;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

pre.terminal-command::before {
  content: "Terminal";
}

pre.wireshark-filter::before {
  content: "Wireshark filter";
}

html[data-theme="dark"] .copy-command {
  background: #383838;
  border-color: #5b5b5b;
  color: #eeeeee;
}

html[data-theme="dark"] .copy-command:hover {
  background: #454545;
  border-color: #6fb7ff;
}

html[data-theme="dark"] .copy-command.copied {
  background: #214435;
  border-color: #438363;
  color: #c3f4db;
}

html[data-theme="dark"] pre.terminal-command::before,
html[data-theme="dark"] pre.wireshark-filter::before {
  color: #a8a8a8;
}

@media (max-width: 720px) {
  .command-wrapper pre {
    padding-right: 82px;
  }

  .copy-command {
    top: 8px;
    right: 8px;
    padding: 5px 8px;
    font-size: 0.72rem;
  }
}


/* Course model: stack each item on its own line */
.course-model {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-align: center;
}

.course-model > * {
  display: block;
  width: 100%;
}

.course-model > span {
  width: auto;
  font-weight: 700;
}

/* =========================================================
   Course model layouts
   Horizontal by default; vertical only when the model
   explicitly represents levels with a downward arrow.
   ========================================================= */

.course-model {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  text-align: center;
}

.course-model > * {
  display: block;
  width: auto;
}

.course-model > span {
  width: auto;
  flex: 0 0 auto;
  font-weight: 700;
}

/* Models representing different levels */
.course-model.course-model--vertical {
  flex-direction: column;
}

.course-model.course-model--vertical > * {
  width: 100%;
}

.course-model.course-model--vertical > span {
  width: auto;
}

/* Course navigation */
.course-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.course-navigation a {
  display: inline-block;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .course-navigation {
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
  }

  .course-navigation a {
    text-align: center;
  }
}

/* =========================================================
   Header + breadcrumb
   ========================================================= */

.site-header {
  border-bottom: 1px solid var(--border-color, #444);
}

.site-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
  font-size: 0.95rem;
}

.breadcrumb a {
  text-decoration: none;
  white-space: nowrap;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  opacity: 0.55;
}

.breadcrumb-current {
  opacity: 0.85;
}

#theme-toggle {
  flex: 0 0 auto;
  margin-left: auto;
}

@media (max-width: 700px) {
  .site-toolbar {
    align-items: flex-start;
    gap: 1rem;
  }

  .breadcrumb {
    font-size: 0.88rem;
  }

  #theme-toggle {
    white-space: nowrap;
  }
}

/* Remove header separator line */
.site-header {
  border-bottom: none;
}

/* Add horizontal breathing room to the header */
.site-header {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (max-width: 700px) {
  .site-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* =========================================================
   Floating page navigation
   ========================================================= */

.page-float-nav {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 1000;
}

.page-float-nav button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-color, #505050);
  cursor: pointer;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.88;
}

.page-float-nav button:hover {
  opacity: 1;
}

@media (max-width: 700px) {
  .page-float-nav {
    right: 1rem;
    bottom: 1rem;
  }

  .page-float-nav button {
    width: 40px;
    height: 40px;
  }
}

/* DNS Under the Microscope — Course index */
.course-index-page section h2 {
  border-bottom: none;
}

.course-index-page .course-objective {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid currentColor;
}

.course-index-page .course-index-section {
  border-bottom: 1px solid currentColor;
}

/* Ajustes finales — índice DNS Under the Microscope */
.course-index-page .course-objective {
  margin-top: 2rem;
  padding-top: 0.75rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}

.course-index-page .course-objective h2 {
  margin-top: 0;
}

.course-index-page .course-index-section:first-of-type {
  padding-top: 1.5rem;
}

/* Tarjetas — índice DNS Under the Microscope */
.course-index-page .course-index-section {
  margin: 1.5rem 0;
  padding: 1.5rem 1.75rem;
  border: 1px solid rgba(127, 127, 127, 0.35);
  border-radius: 14px;
  background: rgba(127, 127, 127, 0.06);
}

.course-index-page .course-index-section:first-of-type {
  padding-top: 1.5rem;
}

.course-index-page .course-index-section h2 {
  margin-top: 0;
  margin-bottom: 0.8rem;
  padding: 0;
  border: none;
}

.course-index-page .course-index-section p {
  margin-top: 0.75rem;
}

.course-index-page .course-index-links {
  margin-top: 1rem;
  margin-bottom: 0;
}

/* Objetivo permanece fuera de las tarjetas */
.course-index-page .course-objective {
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding-top: 0.75rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
}


/* ===== Image Lightbox ===== */

/* Las imágenes de contenido indican visualmente que pueden ampliarse */
main img:not(.no-lightbox) {
  cursor: zoom-in;
}

/* Capa que cubre la página */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 2rem;

  background: rgba(0, 0, 0, 0.88);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

/* Lightbox abierto */
.image-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

/* Imagen ampliada */
.image-lightbox__image {
  display: block;

  max-width: min(96vw, 1600px);
  max-height: 90vh;

  width: auto;
  height: auto;

  object-fit: contain;

  border-radius: 8px;

  cursor: zoom-out;
}

/* Botón cerrar */
.image-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;

  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;

  font-size: 2rem;
  line-height: 1;

  cursor: pointer;
}

.image-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.image-lightbox__close:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* Evita que la página se mueva mientras observamos la imagen */
body.lightbox-open {
  overflow: hidden;
}

/* Móviles */
@media (max-width: 700px) {
  .image-lightbox {
    padding: 1rem;
  }

  .image-lightbox__image {
    max-width: 96vw;
    max-height: 86vh;
  }

  .image-lightbox__close {
    top: 0.75rem;
    right: 0.75rem;
  }
}

/* Respeta preferencias de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .image-lightbox {
    transition: none;
  }
}



/* ==========================================================
   HOME — Personal Technical Hub
   ========================================================== */

.home-page .home-main {
  width: min(1100px, calc(100% - 3rem));
  margin: 0 auto;
}


/* ---------- Header ---------- */

.home-page .home-toolbar {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.home-page .home-brand {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.home-page .home-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.home-page .home-nav a {
  color: inherit;
  text-decoration: none;
  opacity: 0.78;
  transition: opacity 0.15s ease;
}

.home-page .home-nav a:hover {
  opacity: 1;
}


/* ---------- Hero ---------- */

.home-page .home-hero {
  min-height: 580px;

  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 6rem 0;
}

.home-page .home-eyebrow,
.home-page .home-section-label {
  margin: 0 0 1.25rem;

  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;

  opacity: 0.62;
}

.home-page .home-hero h1 {
  max-width: 850px;

  margin: 0;

  font-size: clamp(3rem, 7vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.home-page .home-intro {
  max-width: 680px;

  margin: 2rem 0 0;

  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.65;

  opacity: 0.78;
}

.home-page .home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;

  margin-top: 2.25rem;
}

.home-page .home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 46px;
  padding: 0.7rem 1.2rem;

  border: 1px solid currentColor;
  border-radius: 9px;

  text-decoration: none;
  font-weight: 650;
}

.home-page .home-button-primary {
  background: currentColor;
}

/*
 * currentColor también afectaría al texto del botón.
 * Usamos una pequeña inversión para conservar contraste
 * automáticamente en modo claro y oscuro.
 */
.home-page .home-button-primary {
  filter: invert(0);
}

.home-page .home-button-secondary {
  background: transparent;
}


/* ---------- Secciones ---------- */

.home-page .home-section {
  padding: 5rem 0;

  border-top: 1px solid rgba(127, 127, 127, 0.28);
}


/* ---------- Featured course ---------- */

.home-page .home-featured-card {
  padding: clamp(1.5rem, 4vw, 3rem);

  border: 1px solid rgba(127, 127, 127, 0.32);
  border-radius: 18px;

  background: rgba(127, 127, 127, 0.055);
}

.home-page .home-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  margin-bottom: 1.25rem;
}

.home-page .home-content-type {
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.home-page .home-status,
.home-page .home-coming-soon {
  font-size: 0.76rem;
  opacity: 0.6;
}

.home-page .home-featured-card h2 {
  margin: 0;

  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.035em;

  border: none;
  padding: 0;
}

.home-page .home-featured-tagline {
  margin: 0.75rem 0 1.5rem;

  font-size: 1.25rem;
  font-weight: 600;

  opacity: 0.7;
}

.home-page .home-featured-card > p:not(.home-featured-tagline):not(.home-card-link) {
  max-width: 760px;
  line-height: 1.7;
}

.home-page .home-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;

  margin-top: 1.75rem;
}

.home-page .home-tags span {
  padding: 0.35rem 0.65rem;

  border: 1px solid rgba(127, 127, 127, 0.35);
  border-radius: 999px;

  font-size: 0.78rem;
  opacity: 0.78;
}

.home-page .home-card-link {
  margin: 2rem 0 0;
}

.home-page .home-card-link a {
  font-weight: 700;
  text-decoration: none;
}


/* ---------- Explore grid ---------- */

.home-page .home-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.home-page .home-content-card {
  min-height: 260px;

  padding: 1.6rem;

  border: 1px solid rgba(127, 127, 127, 0.3);
  border-radius: 14px;

  background: rgba(127, 127, 127, 0.035);
}

.home-page .home-content-card h3 {
  margin: 0.4rem 0 0.65rem;

  font-size: 1.45rem;
  letter-spacing: -0.025em;
}

.home-page .home-card-subtitle {
  margin-top: -0.25rem;

  font-size: 0.9rem;
  font-weight: 600;

  opacity: 0.6;
}

.home-page .home-content-card p:last-child {
  line-height: 1.65;
}


/* ---------- How I approach technology ---------- */

.home-page .home-approach {
  text-align: center;
}

.home-page .home-approach .home-section-label {
  text-align: left;
}

.home-page .home-approach-flow {
  width: min(500px, 100%);

  margin: 2.5rem auto;

  display: flex;
  flex-direction: column;
  align-items: center;

  font-weight: 750;
  letter-spacing: 0.08em;
}

.home-page .home-approach-flow > span:not(.home-flow-arrow) {
  width: min(330px, 90%);

  padding: 0.8rem 1rem;

  border: 1px solid rgba(127, 127, 127, 0.32);
  border-radius: 9px;

  background: rgba(127, 127, 127, 0.04);
}

.home-page .home-flow-arrow {
  padding: 0.45rem 0;

  font-size: 1.2rem;
  opacity: 0.45;
}

.home-page .home-approach-message {
  margin-top: 2.75rem;

  font-size: 1.2rem;
  line-height: 1.6;
}

.home-page .home-approach-message p {
  margin: 0.35rem 0;
}


/* ---------- About ---------- */

.home-page .home-about {
  max-width: 760px;
}

.home-page .home-about h2 {
  margin-top: 0;

  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.035em;

  border: none;
  padding: 0;
}

.home-page .home-about p {
  font-size: 1.08rem;
  line-height: 1.75;
}


/* ---------- Footer ---------- */

.home-page .home-footer {
  width: min(1100px, calc(100% - 3rem));

  margin: 2rem auto 0;
  padding: 2rem 0 3rem;

  display: flex;
  justify-content: space-between;
  gap: 2rem;

  border-top: 1px solid rgba(127, 127, 127, 0.28);

  font-size: 0.88rem;
  opacity: 0.65;
}


/* ---------- Responsive ---------- */

@media (max-width: 760px) {

  .home-page .home-main {
    width: min(100% - 2rem, 1100px);
  }

  .home-page .home-toolbar {
    align-items: flex-start;
  }

  .home-page .home-nav {
    gap: 0.75rem;
  }

  .home-page .home-nav > a {
    display: none;
  }

  .home-page .home-hero {
    min-height: auto;
    padding: 5rem 0;
  }

  .home-page .home-hero h1 {
    font-size: clamp(2.8rem, 14vw, 4.4rem);
  }

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

  .home-page .home-content-card {
    min-height: auto;
  }

  .home-page .home-section {
    padding: 4rem 0;
  }

  .home-page .home-footer {
    width: min(100% - 2rem, 1100px);

    flex-direction: column;
    gap: 0.5rem;
  }
}
cat >> public/css/style.css <<'EOF'

/* ==========================================================
   HOME — Ajuste de escala tipográfica
   ========================================================== */

.home-page .home-hero h1 {
  font-size: clamp(2.7rem, 5.5vw, 4.7rem);
  line-height: 1.02;
}

.home-page .home-featured-card h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.8rem);
}

.home-page .home-about h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
}

@media (max-width: 760px) {
  .home-page .home-hero h1 {
    font-size: clamp(2.4rem, 11vw, 3.7rem);
  }
}
EOF
/* HOME — Escala tipográfica definitiva */

.home-page .home-hero h1 {
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.home-page .home-featured-card h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
}

.home-page .home-about h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
}

@media (max-width: 760px) {
  .home-page .home-hero h1 {
    font-size: clamp(2.15rem, 9vw, 3rem);
  }
}


/* ==========================================================
   Automatic Page Contents + Deep Links
   ========================================================== */

.page-toc {
  margin: 2rem 0 3rem;
  padding: 1.4rem 1.6rem;

  border: 1px solid rgba(127, 127, 127, 0.3);
  border-radius: 12px;

  background: rgba(127, 127, 127, 0.045);
}

.page-toc-title {
  margin-bottom: 0.9rem;

  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;

  opacity: 0.65;
}

.page-toc-list {
  margin: 0;
  padding-left: 1.4rem;

  columns: 2;
  column-gap: 3rem;
}

.page-toc-list li {
  margin: 0 0 0.55rem;
  break-inside: avoid;
}

.page-toc-list a {
  color: inherit;
  text-decoration: none;

  opacity: 0.78;
}

.page-toc-list a:hover {
  opacity: 1;
  text-decoration: underline;
}


/* ---------- Deep links ---------- */

.deep-link-heading {
  scroll-margin-top: 5rem;
}

.heading-anchor {
  margin-left: 0.55rem;

  font-size: 0.75em;
  font-weight: 500;

  color: inherit;
  text-decoration: none;

  opacity: 0;
  transition: opacity 0.15s ease;
}

.deep-link-heading:hover .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 0.4;
}

.heading-anchor:hover {
  opacity: 1 !important;
}


/* ---------- Responsive ---------- */

@media (max-width: 700px) {

  .page-toc {
    padding: 1.2rem;
  }

  .page-toc-list {
    columns: 1;
  }

  /*
   * En pantallas táctiles no dependemos de hover.
   */
  .heading-anchor {
    opacity: 0.35;
  }
}

/* TOC — La numeración ya forma parte del título de cada sección */
.page-toc-list {
  list-style: none;
  padding-left: 0;
}


/* ==========================================================
   Reading Progress Bar
   ========================================================== */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;
  height: 3px;

  z-index: 11000;

  pointer-events: none;

  background: transparent;
}

.reading-progress__bar {
  width: 0;
  height: 100%;

  background: currentColor;

  opacity: 0.55;

  transition: width 0.08s linear;
}

@media (prefers-reduced-motion: reduce) {
  .reading-progress__bar {
    transition: none;
  }
}


/* ==========================================================
   Course 2 — From DNS to Visibility Enforcement
   ========================================================== */

body.course-2 {
  --course-accent: #8b5cf6;
}

/* Identidad visual del curso */
body.course-2 a,
body.course-2 .heading-anchor {
  color: var(--course-accent);
}

body.course-2 a:hover {
  filter: brightness(1.15);
}

/* Modelos conceptuales */
body.course-2 .course-model,
html[data-theme="dark"] body.course-2 .course-model {
  background: rgba(124, 58, 237, 0.18);
  border-color: var(--course-accent);
}

/* Barra de progreso */
body.course-2 .reading-progress__bar {
  background: var(--course-accent);
}

/*
 * En modo nocturno, el TOC utiliza texto claro para mantener
 * contraste. El púrpura aparece al pasar el cursor.
 */
html[data-theme="dark"] body.course-2 .page-toc a {
  color: #e5e7eb;
}

html[data-theme="dark"] body.course-2 .page-toc a:hover {
  color: #a78bfa;
}
