  :root {
    /* light (default) */
    --paper: #EEF0EA;
    --paper-2: #E4E8DF;
    --card: #F6F7F2;
    --ink: #12211E;
    --ink-soft: #33433D;
    --muted: #6E7A72;
    --line: #D3D8CD;
    --accent: #147A68;
    --accent-2: #1F9E86;
    --accent-wash: #DDEAE2;
    --shadow: 20px 30px 60px -30px rgba(18,33,30,.28);

    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: ui-monospace, "Cascadia Code", "SF Mono", "Segoe UI Mono", Menlo, Consolas, monospace;

    --maxw: 1120px;
    --step--1: clamp(.78rem, .74rem + .2vw, .86rem);
    --step-0: clamp(1rem, .96rem + .2vw, 1.08rem);
    --step-1: clamp(1.2rem, 1.1rem + .5vw, 1.45rem);
    --step-2: clamp(1.55rem, 1.3rem + 1.2vw, 2.1rem);
    --step-3: clamp(2.1rem, 1.6rem + 2.5vw, 3.4rem);
    --step-4: clamp(2.8rem, 1.9rem + 4.6vw, 5.6rem);
  }
  /* Tema CLARO por defecto. El oscuro solo se activa con el toggle (data-theme="dark"),
     no se sigue la preferencia del sistema operativo. */
  :root[data-theme="dark"] {
    --paper: #0D1714; --paper-2: #0A120F; --card: #14211D;
    --ink: #E7ECE5; --ink-soft: #B4C0B8; --muted: #7E8C83; --line: #223029;
    --accent: #34C0A0; --accent-2: #46D6B4; --accent-wash: #16302A;
    --shadow: 20px 30px 60px -30px rgba(0,0,0,.6);
  }
  :root[data-theme="light"] {
    --paper: #EEF0EA; --paper-2: #E4E8DF; --card: #F6F7F2;
    --ink: #12211E; --ink-soft: #33433D; --muted: #6E7A72; --line: #D3D8CD;
    --accent: #147A68; --accent-2: #1F9E86; --accent-wash: #DDEAE2;
    --shadow: 20px 30px 60px -30px rgba(18,33,30,.28);
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0; background: var(--paper); color: var(--ink);
    font-family: var(--sans); font-size: var(--step-0); line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

  .wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); }

  h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.05; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
  a { color: inherit; }
  .eyebrow {
    font-family: var(--mono); font-size: var(--step--1); letter-spacing: .18em;
    text-transform: uppercase; color: var(--accent); margin: 0 0 .9rem;
    display: flex; align-items: center; gap: .7rem;
  }
  .eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); opacity: .6; }

  /* ---------- top bar ---------- */
  header {
    position: sticky; top: 0; z-index: 20;
    backdrop-filter: saturate(1.1) blur(8px);
    background: color-mix(in srgb, var(--paper) 82%, transparent);
    border-bottom: 1px solid var(--line);
  }
  .bar { display: flex; align-items: center; gap: 1.4rem; height: 70px; }
  .brand { display: flex; align-items: center; gap: .7rem; font-family: var(--serif); font-size: 1.15rem; letter-spacing: -.01em; text-decoration: none; }
  .brand svg { display: block; }
  .brand .full { color: var(--ink); }
  nav.links { display: flex; gap: 1.5rem; margin-left: auto; }
  nav.links a { text-decoration: none; color: var(--ink-soft); font-size: var(--step--1); letter-spacing: .01em; position: relative; padding: .2rem 0; }
  nav.links a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1.5px; background: var(--accent); transition: width .25s ease; }
  nav.links a:hover { color: var(--ink); }
  nav.links a:hover::after { width: 100%; }
  nav.links ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
  nav.links li { list-style: none; margin: 0; padding: 0; }
  nav.links li::marker { content: ""; }

  .lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; font-family: var(--mono); font-size: .72rem; }
  .lang button { border: 0; background: transparent; color: var(--muted); padding: .32rem .6rem; cursor: pointer; letter-spacing: .06em; }
  .lang button[aria-pressed="true"] { background: var(--accent); color: #fff; }
  .iconbtn { border: 1px solid var(--line); background: var(--card); color: var(--ink); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; font-size: 1rem; }
  .cta {
    display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
    background: var(--accent); color: #fff; padding: .62rem 1.1rem; border-radius: 999px;
    font-size: var(--step--1); font-weight: 600; letter-spacing: .01em;
    transition: transform .2s ease, background .2s ease;
  }
  .cta:hover { background: var(--accent-2); transform: translateY(-1px); }
  .cta.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
  .cta.ghost:hover { border-color: var(--accent); color: var(--accent); }

  /* El menú móvil se define en el bloque responsive de más abajo. */

  /* ---------- hero ---------- */
  .hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: clamp(580px, 88vh, 820px); background: radial-gradient(110% 90% at 72% 30%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 56%); }
  .hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 32%; z-index: 1; pointer-events: none; background: linear-gradient(180deg, transparent, var(--paper) 92%); }
  .hero-stage { position: absolute; inset: 0; z-index: 0; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent 2%, #000 38%); mask-image: linear-gradient(90deg, transparent 2%, #000 38%); }
  .hero-glow { position: absolute; top: 50%; right: 2%; width: 56vw; max-width: 780px; aspect-ratio: 1; transform: translateY(-50%); background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 60%); filter: blur(26px); opacity: .5; }
  #cell { position: absolute; top: 50%; right: -3%; width: 60%; height: 128%; transform: translateY(-50%); }
  .hero-label { position: absolute; z-index: 2; right: clamp(20px,5vw,48px); bottom: 20px; display: flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .hero-label .hv-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
  .hero-inner { position: relative; z-index: 2; width: 100%; max-width: none; margin-inline: 0; padding-block: clamp(48px, 6vw, 80px); padding-inline: clamp(20px, 5vw, 72px); }
  .hero-copy { max-width: 680px; display: flex; flex-direction: column; align-items: flex-start; }
  .badge { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .05em; color: var(--ink-soft); background: color-mix(in srgb, var(--card) 70%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .85rem; margin-bottom: 1.9rem; }
  .badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); animation: pulse 2.4s infinite; }
  @keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-2) 65%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
  @media (prefers-reduced-motion: reduce){ .badge .dot { animation: none; } }
  .hero-tag { font-family: var(--mono); font-size: var(--step--1); color: var(--accent); letter-spacing: .04em; margin-bottom: 1.2rem; }
  .hero h1 { font-size: clamp(2.7rem, 1.3rem + 4vw, 4.7rem); max-width: 14ch; line-height: 1.0; letter-spacing: -.015em; }
  .hero h1 em { font-style: italic; color: var(--accent); }
  .hero .lede { max-width: 48ch; margin-top: 1.8rem; font-size: var(--step-1); color: var(--ink-soft); line-height: 1.45; font-family: var(--serif); font-weight: 400; }
  .hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.4rem; }
  .hero-stats { list-style: none; display: flex; flex-wrap: wrap; margin: clamp(42px,6vw,72px) 0 0; padding-top: 2rem; border-top: 1px solid var(--line); width: 100%; }
  .hero-stats li { flex: 1 1 0; min-width: 130px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; padding: .2rem 14px; border-left: 1px solid var(--line); opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
  .hero-stats li:first-child { border-left: 0; }
  .hero-stats.stats-in li { opacity: 1; transform: none; }
  .hero-stats.stats-in li:nth-child(1){ transition-delay: .05s; }
  .hero-stats.stats-in li:nth-child(2){ transition-delay: .17s; }
  .hero-stats.stats-in li:nth-child(3){ transition-delay: .29s; }
  .hero-stats.stats-in li:nth-child(4){ transition-delay: .41s; }
  .hero-stats b { font-family: var(--serif); font-size: clamp(2rem, 1.4rem + 1.5vw, 2.9rem); font-weight: 600; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
  .hero-stats span { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.3; }
  @media (prefers-reduced-motion: reduce){ .hero-stats li { opacity: 1; transform: none; transition: none; } }
  @media (max-width: 560px){ .hero-stats li { flex: 1 1 42%; border-left: 0; } .hero-stats li:nth-child(n+3){ margin-top: 1.4rem; } }
  @media (max-width: 900px){
    .hero-stage { opacity: .32; -webkit-mask-image: none; mask-image: none; }
    #cell { right: -25%; width: 115%; }
    .hero-glow { opacity: .3; }
    .hero-copy { max-width: 100%; }
  }

  /* ---------- metrics ---------- */
  .metrics { border-bottom: 1px solid var(--line); background: var(--paper-2); }
  .metrics .grid { display: grid; grid-template-columns: repeat(4, 1fr); }
  .metric { padding: clamp(22px, 3vw, 38px) clamp(16px,2vw,26px); border-left: 1px solid var(--line); }
  .metric:first-child { border-left: 0; }
  .metric .n { font-family: var(--serif); font-size: var(--step-3); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
  .metric .n small { font-size: .5em; color: var(--accent); vertical-align: super; margin-left: 2px; }
  .metric .l { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: .7rem; }
  @media (max-width: 760px) { .metrics .grid { grid-template-columns: repeat(2, 1fr); } .metric:nth-child(-n+2){ border-top:0;} .metric:nth-child(3),.metric:nth-child(4){border-top:1px solid var(--line);} .metric:nth-child(odd){border-left:0;} }

  /* ---------- generic section ---------- */
  section.block { padding-block: clamp(64px, 9vw, 120px); }
  .divider { display: flex; align-items: center; gap: 0; height: 1px; }

  .about { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
  @media (max-width: 820px) { .about { grid-template-columns: 1fr; } }
  .portrait {
    position: relative; aspect-ratio: 4/5; border-radius: 6px; overflow: hidden;
    background: linear-gradient(135deg, var(--accent-wash), var(--paper-2));
    border: 1px solid var(--line); box-shadow: var(--shadow);
    display: grid; place-items: center; text-align: center;
  }
  .portrait .ph { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); z-index: 2; padding: .4rem .8rem; border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--paper) 60%, transparent); }
  .portrait canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
  .portrait.has-photo { padding: 7%; overflow: visible; background: radial-gradient(120% 120% at 50% 30%, var(--accent-wash), var(--paper-2) 72%); }
  .portrait .portrait-img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 18px 30px color-mix(in srgb, var(--ink) 18%, transparent)); }
  .byline .avatar-img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--accent-wash); flex: none; }
  .page-photo { width: 190px; margin: 0 auto 2rem; }
  .page-photo .portrait-img { width: 100%; height: auto; display: block; }

  .about h2 { font-size: var(--step-3); max-width: 18ch; }
  .about p { color: var(--ink-soft); margin: 1.1rem 0 0; max-width: 60ch; }
  .timeline { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 0; }
  .timeline li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--line); align-items: baseline; }
  .timeline .yr { font-family: var(--mono); font-size: .8rem; color: var(--accent); letter-spacing: .04em; }
  .timeline .ev strong { font-weight: 600; }
  .timeline .ev span { color: var(--muted); }

  /* ---------- research ---------- */
  .research h2 { font-size: var(--step-3); max-width: 20ch; margin-bottom: 2.4rem; }
  .rlist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
  @media (max-width: 720px){ .rlist { grid-template-columns: 1fr; } }
  .ritem { background: var(--card); padding: clamp(22px,3vw,34px); position: relative; transition: background .25s ease; }
  .ritem:hover { background: var(--accent-wash); }
  .ritem .idx { font-family: var(--mono); font-size: .72rem; color: var(--accent); letter-spacing: .1em; }
  .ritem h3 { font-size: var(--step-1); margin-top: .8rem; }
  .ritem p { color: var(--ink-soft); margin: .7rem 0 0; font-size: .96rem; }
  .ritem .tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.1rem; }
  .tag { font-family: var(--mono); font-size: .68rem; letter-spacing: .05em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .6rem; }

  /* ---------- publications ---------- */
  .pubs .head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.2rem; }
  .pubs h2 { font-size: var(--step-3); max-width: 16ch; }
  .pub {
    display: grid; grid-template-columns: auto 1fr auto; gap: 1.4rem; align-items: baseline;
    padding: 1.4rem 0; border-top: 1px solid var(--line); text-decoration: none;
    transition: padding-left .25s ease;
  }
  .pub:hover { padding-left: .6rem; }
  .pub:last-child { border-bottom: 1px solid var(--line); }
  .pub .yr { font-family: var(--mono); font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
  .pub .body h3 { font-size: var(--step-1); font-weight: 600; line-height: 1.2; }
  .pub .body .meta { color: var(--muted); font-size: .88rem; margin-top: .45rem; font-family: var(--mono); letter-spacing: .01em; }
  .pub .body .meta em { color: var(--ink-soft); font-style: italic; font-family: var(--serif); }
  .q1 { align-self: center; font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .06em; color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: .2rem .5rem; white-space: nowrap; }
  .pub .arrow { align-self: center; color: var(--accent); opacity: 0; transform: translateX(-6px); transition: all .25s ease; font-family: var(--mono); }
  .pub:hover .arrow { opacity: 1; transform: translateX(0); }
  .note { font-family: var(--mono); font-size: .74rem; color: var(--muted); margin-top: 1.4rem; letter-spacing: .02em; }
  @media (max-width: 640px){ .pub { grid-template-columns: 1fr; gap: .4rem; } .pub .q1 { justify-self: start; } .pub .arrow { display:none; } }

  /* ---------- contact ---------- */
  .contact { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .contact .inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(30px,5vw,64px); align-items: center; }
  @media (max-width: 820px){ .contact .inner { grid-template-columns: 1fr; } }
  .contact h2 { font-size: var(--step-3); max-width: 16ch; }
  .contact p { color: var(--ink-soft); margin-top: 1rem; max-width: 46ch; }
  .socials { display: grid; gap: 0; }
  .socials a { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: color .2s ease; }
  .socials a:last-child { border-bottom: 1px solid var(--line); }
  .socials a:hover { color: var(--accent); }
  .socials a .h { font-weight: 600; }
  .socials a .u { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
  .socials a:hover .u { color: var(--accent); }
  .contact-facts .fact { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
  .contact-facts .fact:last-child { border-bottom: 1px solid var(--line); }
  .contact-facts .fact .h { font-weight: 600; }
  .contact-facts .fact .u { font-family: var(--mono); font-size: .76rem; color: var(--muted); text-align: right; }
  .contact-facts a.fact { transition: color .2s ease; }
  .contact-facts a.fact:hover, .contact-facts a.fact:hover .u { color: var(--accent); }

  /* ---------- Trayectoria (timeline) ---------- */
  .tline { list-style: none; margin: 0; padding: 0; max-width: 780px; }
  .tline li { position: relative; padding: 0 0 1.9rem 1.9rem; border-left: 1px solid var(--line); }
  .tline li:last-child { padding-bottom: 0; border-left-color: transparent; }
  .tline li::before { content: ""; position: absolute; left: -6px; top: 3px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--paper); }
  .tline .ty { display: block; font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; color: var(--accent); margin-bottom: .3rem; }
  .tline .tc h3 { font-size: var(--step-1); line-height: 1.25; }
  .tline .tc p { margin-top: .4rem; color: var(--ink-soft); max-width: 60ch; }

  /* ---------- Enfoque (pull-quote) ---------- */
  .manifesto { padding-block: clamp(56px, 9vw, 104px); border-block: 1px solid var(--line); }
  .manifesto .eyebrow { justify-content: center; margin-bottom: 1.4rem; }
  .manifesto blockquote { margin: 0 auto; max-width: 880px; text-align: center; }
  .manifesto blockquote p { font-family: var(--serif); font-style: italic; font-size: clamp(1.5rem, 1rem + 2.3vw, 2.5rem); line-height: 1.32; color: var(--ink); text-wrap: balance; }

  /* ---------- Colaboraciones ---------- */
  .collab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(26px, 5vw, 60px); }
  .collab-col h3 { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .9rem; }
  .collab-col ul { list-style: none; margin: 0; padding: 0; }
  .collab-col li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .9rem 0; border-top: 1px solid var(--line); font-family: var(--serif); font-size: 1.12rem; color: var(--ink); }
  .collab-col li:last-child { border-bottom: 1px solid var(--line); }
  .collab-col li span { font-family: var(--mono); font-size: .72rem; color: var(--muted); text-align: right; white-space: nowrap; }
  @media (max-width: 640px) {
    .collab-grid { grid-template-columns: 1fr; gap: 2rem; }
    .collab-col li span { white-space: normal; }
  }

  /* ---------- footer ---------- */
  footer { padding-block: 40px; }
  .foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem 1.6rem; color: var(--muted); font-family: var(--mono); font-size: .74rem; letter-spacing: .03em; }
  .foot a { color: var(--accent); text-decoration: none; }
  .foot-legal { display: flex; gap: 1.2rem; flex-wrap: wrap; }
  .foot-legal a { color: var(--muted); text-decoration: none; }
  .foot-legal a:hover { color: var(--accent); }
  .foot-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem 1.6rem; padding-bottom: 1.4rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
  .foot-top .foot-name { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
  .foot-social { display: flex; gap: 1.4rem; flex-wrap: wrap; font-family: var(--mono); font-size: .78rem; }
  .foot-social a { color: var(--ink-soft); text-decoration: none; position: relative; }
  .foot-social a:hover { color: var(--accent); }
  .not-found { text-align: center; padding-block: clamp(70px, 12vw, 150px); }
  .not-found .eyebrow { justify-content: center; }
  .not-found h1 { font-size: var(--step-3); max-width: 20ch; margin: 0 auto 1rem; }
  .not-found p { color: var(--ink-soft); max-width: 48ch; margin: 0 auto 2rem; }

  /* ---------- articles / blog ---------- */
  .art-head { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(20px,4vw,60px); align-items: end; margin-bottom: 2.6rem; }
  .art-head h2 { font-size: var(--step-3); max-width: 16ch; }
  .art-intro { color: var(--ink-soft); align-self: end; }
  .art-intro a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
  @media (max-width: 760px){ .art-head { grid-template-columns: 1fr; } }

  .art-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
  @media (max-width: 720px){ .art-grid { grid-template-columns: 1fr; } }
  .card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
  .card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
  .card.feat { grid-column: 1 / -1; flex-direction: row; }
  .card.feat .thumb { flex: 1 1 46%; min-height: 240px; aspect-ratio: auto; }
  .card.feat .card-body { flex: 1 1 54%; }
  @media (max-width: 720px){ .card.feat { flex-direction: column; } .card.feat .thumb { min-height: 200px; } }
  .card .thumb { position: relative; aspect-ratio: 16/10; background: linear-gradient(135deg, var(--accent-wash), var(--paper-2)); overflow: hidden; }
  .card .thumb canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .6; }
  .card .cat, .rel .cat, .article .cat { position: absolute; top: 12px; left: 12px; font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; background: var(--paper); color: var(--accent); padding: .25rem .55rem; border-radius: 999px; border: 1px solid var(--line); }
  .card-body { padding: clamp(18px,2.4vw,28px); display: flex; flex-direction: column; gap: .55rem; flex: 1; }
  .card-body .meta { font-family: var(--mono); font-size: .72rem; color: var(--muted); display: flex; gap: .5rem; }
  .card-body h3 { font-size: var(--step-1); }
  .card.feat .card-body h3 { font-size: var(--step-2); }
  .card-body .excerpt { color: var(--ink-soft); font-size: .95rem; }
  .readlink { margin-top: auto; align-self: flex-start; background: none; border: 0; color: var(--accent); font-family: var(--mono); font-size: .8rem; cursor: pointer; padding: .3rem 0; letter-spacing: .02em; }
  .readlink:hover { text-decoration: underline; text-underline-offset: 3px; }
  .art-more { text-align: center; margin-top: 2.4rem; }

  .card .src { font-family: var(--mono); font-size: .72rem; color: var(--accent); letter-spacing: .01em; margin: .1rem 0 0; }
  .card .src em { font-style: normal; }

  /* ---------- single article ---------- */
  .article { max-width: 720px; margin-inline: auto; padding: clamp(40px,6vw,72px) clamp(20px,5vw,24px) 90px; }
  .article .kicker { font-family: var(--mono); font-size: .76rem; color: var(--muted); letter-spacing: .04em; }
  .article .cat { position: static; display: inline-block; }
  .article h1 { font-size: var(--step-3); margin: 1rem 0 1.4rem; }
  .byline { display: flex; align-items: center; gap: .8rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
  .byline .avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-wash); color: var(--accent); font-family: var(--serif); font-weight: 600; border: 1px solid var(--line); flex: none; }
  .byline .muted-in { color: var(--muted); font-size: .84rem; }
  .hero-img { aspect-ratio: 16/9; border-radius: 8px; margin: 1.8rem 0; overflow: hidden; position: relative; background: linear-gradient(135deg, var(--accent-wash), var(--paper-2)); border: 1px solid var(--line); }
  .hero-img canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .6; }

  .prose { font-size: 1.12rem; line-height: 1.75; color: var(--ink-soft); }
  .prose p { margin: 0 0 1.3rem; }
  .prose strong { color: var(--ink); }
  .prose em { font-style: italic; color: var(--ink); }
  .prose h2 { font-size: var(--step-2); color: var(--ink); margin: 2.4rem 0 1rem; }
  .prose blockquote { margin: 2rem 0; padding: .3rem 0 .3rem 1.6rem; border-left: 3px solid var(--accent); font-family: var(--serif); font-size: 1.3rem; font-style: italic; color: var(--ink); line-height: 1.4; }

  .paper-cite { margin: 2.8rem 0 0; padding: clamp(20px,3vw,28px); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 12px; background: var(--card); }
  .paper-cite .pc-label { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 0 0 .7rem; }
  .paper-cite .pc-ref { color: var(--ink-soft); font-size: .95rem; line-height: 1.6; margin: 0 0 1.2rem; }
  .paper-cite .pc-ref strong { color: var(--ink); }
  .paper-cite .pc-doi { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
  .paper-cite .q1 { display: inline-block; }

  .share-row { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; margin: 3rem 0 0; padding-top: 1.6rem; border-top: 1px solid var(--line); }
  .share-row .lbl { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-right: .4rem; }

  .newsletter-box { margin: 2.4rem 0; padding: clamp(22px,3vw,32px); background: var(--accent-wash); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 12px; display: flex; justify-content: space-between; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
  .newsletter-box h3 { font-size: var(--step-1); color: var(--ink); }
  .newsletter-box p { color: var(--ink-soft); font-size: .9rem; margin-top: .3rem; }
  .nl-form { display: flex; gap: .5rem; flex-wrap: wrap; }
  .nl-form input { font-family: var(--sans); font-size: .95rem; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); min-width: 220px; }
  /* formulario de comentarios */
  .c-form { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; margin-top: 1.6rem; }
  .c-form p { margin: 0; }
  .c-form .comment-form-comment, .c-form .comment-form-cookies-consent, .c-form .form-submit { grid-column: 1 / -1; }
  .c-form label { display: block; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .4rem; }
  .c-form input[type="text"], .c-form input[type="email"], .c-form textarea { width: 100%; box-sizing: border-box; font-family: var(--sans); font-size: .98rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); transition: border-color .2s ease; }
  .c-form input:focus, .c-form textarea:focus { border-color: var(--accent); outline: none; }
  .c-form textarea { min-height: 130px; resize: vertical; }
  .c-form .comment-form-cookies-consent { display: flex; align-items: flex-start; gap: .55rem; }
  .c-form .comment-form-cookies-consent input { width: auto; margin-top: .2rem; accent-color: var(--accent); }
  .c-form .comment-form-cookies-consent label { display: inline; text-transform: none; letter-spacing: 0; font-size: .78rem; color: var(--muted); margin: 0; line-height: 1.4; }
  .c-form .form-submit { margin: 0; }
  @media (max-width: 560px){ .c-form { grid-template-columns: 1fr; } }

  .comments { margin: 3rem 0 0; padding-top: 2rem; border-top: 1px solid var(--line); }
  .comments h3 { font-size: var(--step-1); margin-bottom: 1.4rem; }
  .comments h3 span { color: var(--muted); font-family: var(--mono); font-size: .8rem; }
  .comment { display: grid; grid-template-columns: auto 1fr; gap: .9rem; margin-bottom: 1.4rem; }
  .comment.reply { margin-left: 2.4rem; }
  .c-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--muted); font-family: var(--mono); font-size: .72rem; border: 1px solid var(--line); flex: none; }
  .c-av.accent { background: var(--accent-wash); color: var(--accent); }
  .comment .c-date { color: var(--muted); font-family: var(--mono); font-size: .7rem; margin-left: .5rem; }
  .comment p { margin: .3rem 0 0; color: var(--ink-soft); }

  .related { margin: 3.4rem 0 0; padding-top: 2rem; border-top: 1px solid var(--line); }
  .rel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  @media (max-width: 640px){ .rel-grid { grid-template-columns: 1fr; } .comment.reply { margin-left: 1rem; } }
  .rel { position: relative; padding: 1.2rem; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; background: var(--card); transition: background .2s ease; }
  .rel:hover { background: var(--accent-wash); }
  .rel .cat { position: static; display: inline-block; margin-bottom: .6rem; }
  .rel h4 { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; color: var(--ink); line-height: 1.25; margin: 0; }

  /* ---------- newsletter band (hero-style) ---------- */
  .nl-hero { position: relative; overflow: hidden; border-block: 1px solid var(--line); background: var(--paper-2); }
  .nl-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
  .nl-hero-inner { position: relative; z-index: 2; padding-block: clamp(64px, 9vw, 116px); text-align: center; display: flex; flex-direction: column; align-items: center; }
  .nl-hero .eyebrow { justify-content: center; }
  .nl-hero h2 { font-size: var(--step-3); max-width: 18ch; }
  .nl-hero h2 em { font-style: italic; color: var(--accent); }
  .nl-hero .nl-lede { max-width: 50ch; margin-top: 1.2rem; color: var(--ink-soft); font-size: var(--step-1); font-family: var(--serif); font-weight: 400; line-height: 1.4; }
  .nl-hero-form { margin: 2.1rem auto 0; width: 100%; max-width: 560px; }
  form.nl-hero-form { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
  .nl-hero-form input { flex: 1 1 260px; font-family: var(--sans); font-size: 1rem; padding: .9rem 1.2rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); }
  .nl-hero-form input:focus-visible { border-color: var(--accent); outline: none; }
  .nl-hero-form .cta { padding: .9rem 1.6rem; }
  .nl-mini { margin-top: 1.1rem; font-family: var(--mono); font-size: .74rem; color: var(--muted); letter-spacing: .04em; }

  /* ---------- MailPoet: adaptar el formulario al diseño ---------- */
  .mailpoet_form { margin: 0 auto; }
  .mailpoet_form form { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; gap: .5rem; }
  .mailpoet_form .mailpoet_paragraph { margin: 0; flex-basis: 100%; }
  .mailpoet_form .mailpoet_paragraph:has(.mailpoet_text) { flex: 1 1 220px; }
  .mailpoet_form .mailpoet_paragraph:has(.mailpoet_submit) { flex: 0 0 auto; }
  /* estilo base de campo y botón (caja de artículo y genérico) */
  .mailpoet_form input.mailpoet_text { width: 100%; box-sizing: border-box; height: 52px; font-family: var(--sans); font-size: 1rem; padding: 0 1.2rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); }
  .mailpoet_form input.mailpoet_text:focus { border-color: var(--accent); outline: none; }
  .mailpoet_form input.mailpoet_submit { height: 52px; font-family: var(--sans); font-weight: 600; font-size: 1rem; padding: 0 1.7rem; border: 0; border-radius: 999px; background: var(--accent); color: #fff; cursor: pointer; transition: background .2s ease; white-space: nowrap; text-transform: none; box-shadow: none; }
  .mailpoet_form input.mailpoet_submit:hover { background: var(--accent-2); }
  /* franja de boletín: input + botón fundidos en una sola píldora */
  .nl-hero-form .mailpoet_form { max-width: none; width: 100%; margin: 0; }
  .nl-hero-form .mailpoet_form form { max-width: 540px; margin: 0 auto; gap: 0; border-radius: 999px; box-shadow: 22px 28px 55px -32px color-mix(in srgb, var(--ink) 34%, transparent); transition: box-shadow .25s ease; }
  .nl-hero-form .mailpoet_form form:focus-within { box-shadow: 22px 28px 55px -30px color-mix(in srgb, var(--accent) 45%, transparent); }
  .nl-hero-form input.mailpoet_text { height: 60px; border-right: 0; border-radius: 999px 0 0 999px; padding: 0 1.5rem; }
  .nl-hero-form input.mailpoet_submit { height: 60px; border-radius: 0 999px 999px 0; padding: 0 1.9rem; }
  @media (max-width: 460px) {
    .nl-hero-form .mailpoet_form form { box-shadow: none; }
    .nl-hero-form input.mailpoet_text { border-right: 1px solid var(--line); border-radius: 999px; }
    .nl-hero-form input.mailpoet_submit { width: 100%; border-radius: 999px; margin-top: .5rem; }
    .nl-hero-form .mailpoet_paragraph:has(.mailpoet_submit) { flex-basis: 100%; }
  }
  /* mensajes */
  .mailpoet_form .mailpoet_message, .mailpoet_form .mailpoet_validate_success, .mailpoet_form .mailpoet_validate_error { flex-basis: 100%; text-align: center; font-family: var(--mono); font-size: .82rem; margin-top: .6rem; }
  .mailpoet_form .mailpoet_validate_success { color: var(--accent); }
  .mailpoet_form .mailpoet_validate_error { color: #c0392b; }
  /* nota de privacidad (párrafo de texto sin campo) */
  .mailpoet_form .mailpoet_paragraph:not(:has(input)) { flex-basis: 100%; margin-top: .9rem; font-family: var(--mono); font-size: .74rem; color: var(--muted); text-align: center; line-height: 1.5; }
  .mailpoet_form .mailpoet_paragraph:not(:has(input)) a { color: var(--accent); }
  /* dentro de la caja de artículo, el formulario va más compacto */
  .newsletter-box .mailpoet_form { margin: 0; max-width: none; flex: 1 1 260px; }
  .newsletter-box .mailpoet_form form { justify-content: flex-start; }

  /* ---------- wp adjustments ---------- */
  .lang ul { display: flex; list-style: none; margin: 0; padding: 0; }
  .lang li { list-style: none; margin: 0; padding: 0; display: flex; }
  .lang li::marker { content: ""; }
  .lang a { display: block; padding: .32rem .62rem; font-family: var(--mono); font-size: .72rem; color: var(--muted); text-decoration: none; text-transform: uppercase; letter-spacing: .06em; line-height: 1.3; }
  .lang .current-lang a { color: #fff; background: var(--accent); }
  .lang a:hover { color: var(--accent); }
  .lang .current-lang a:hover { color: #fff; }
  .wp-caption, figure.wp-block-image { margin: 1.8rem 0; }
  .article .wp-block-image img { border-radius: 8px; width: 100%; height: auto; }
  .screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
  .skip-link { position: absolute; left: -9999px; }
  .skip-link:focus { left: 12px; top: 12px; z-index: 100; background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
  .nav-toggle { display: none; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); width: 42px; height: 42px; cursor: pointer; font-size: 1.1rem; place-items: center; }
  @media (max-width: 900px) {
    header .cta { display: none; }
    .nav-toggle { display: inline-grid; }
    #theme { margin-left: auto; }
    .brand { font-size: 1.05rem; }
    .brand .full { white-space: nowrap; }
    .bar { gap: .7rem; }
    nav.links {
      position: fixed; inset: 78px 12px auto 12px;
      flex-direction: column; align-items: stretch; gap: .15rem;
      background: var(--card); border: 1px solid var(--line);
      border-radius: 18px; box-shadow: var(--shadow);
      padding: .6rem; margin: 0; display: none;
    }
    nav.links.open { display: flex; animation: menuIn .28s cubic-bezier(.2,.7,.2,1); }
    @keyframes menuIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
    nav.links li { width: 100%; list-style: none; }
    nav.links a {
      font-family: var(--serif); font-size: 1.35rem; color: var(--ink);
      display: flex; align-items: center; gap: .75rem;
      padding: .85rem 1rem; border-radius: 12px; border: 0;
    }
    nav.links a::before {
      content: ""; width: 7px; height: 7px; border-radius: 50%;
      background: var(--accent); opacity: .55; flex: none;
      transition: transform .2s ease, opacity .2s ease;
    }
    nav.links a::after { display: none; }
    nav.links a:hover, nav.links a:focus-visible { background: var(--accent-wash); color: var(--accent); }
    nav.links a:hover::before { opacity: 1; transform: scale(1.4); }
    nav.links li:last-child a { background: var(--accent); color: #fff; margin-top: .35rem; }
    nav.links li:last-child a::before { background: #fff; opacity: .85; }
    nav.links li:last-child a:hover { background: var(--accent-2); color: #fff; }
  }
  .pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 3rem; flex-wrap: wrap; }
  .pagination .page-numbers { font-family: var(--mono); font-size: .84rem; padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); }
  .pagination .page-numbers.current { background: var(--accent); color: #fff; border-color: var(--accent); }
  .archive-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.4rem; }
  .archive-filters a { font-family: var(--mono); font-size: .74rem; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink-soft); }
  .archive-filters a.active, .archive-filters a:hover { border-color: var(--accent); color: var(--accent); }

  :focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 3px; }
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
  .reveal.in { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
