/* ==========================================================
   Germán Solórzano · Sitio biográfico
   Tokens semánticos → componentes. Claro / oscuro / auto.
   ========================================================== */

/* ---------- Tokens ---------- */
:root {
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Claro (paleta tomada de la foto: gris azulado + violeta) */
  --bg: #f6f5fa;
  --surface: #ffffff;
  --surface-alt: #eeecf6;
  --ink: #16161d;
  --ink-muted: #565870;
  --line: #dcdae8;
  --accent: #5b3fa8;
  --accent-strong: #472f8a;
  --accent-soft: #e9e3fa;
  --on-accent: #ffffff;
  --panel-from: #2c1d63;
  --panel-to: #15121f;
  --ring: #5b3fa8;
  --shadow: 0 1px 2px rgb(22 22 29 / .06), 0 8px 24px -8px rgb(60 40 120 / .18);

  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 64px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --t: 220ms;
}

/* Oscuro: tonos desaturados, no invertidos */
:root[data-theme="dark"] {
  --bg: #101018;
  --surface: #181824;
  --surface-alt: #14141e;
  --ink: #ececf4;
  --ink-muted: #a9aac0;
  --line: #2c2c40;
  --accent: #b9a7ff;
  --accent-strong: #d0c3ff;
  --accent-soft: #2a2444;
  --on-accent: #171226;
  --panel-from: #35237a;
  --panel-to: #12101c;
  --ring: #b9a7ff;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px -12px rgb(0 0 0 / .6);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #101018; --surface: #181824; --surface-alt: #14141e; --ink: #ececf4;
    --ink-muted: #a9aac0; --line: #2c2c40; --accent: #b9a7ff; --accent-strong: #d0c3ff;
    --accent-soft: #2a2444; --on-accent: #171226; --panel-from: #35237a; --panel-to: #12101c;
    --ring: #b9a7ff;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px -12px rgb(0 0 0 / .6);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
small { font-size: .8125rem; }

:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 6px; }

.container { width: min(100% - 32px, 1120px); margin-inline: auto; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; border-radius: var(--radius-sm); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.icon-lg { width: 28px; height: 28px; color: var(--accent); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 12px;
  font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow-on-dark { color: #cbbcff; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 600 .9375rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease),
              border-color var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); box-shadow: 0 8px 20px -8px var(--accent); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-light { background: #fff; color: #2c1d63; }
.btn-light:hover { background: #ece6ff; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: var(--accent); color: var(--on-accent);
  font: 700 .9375rem var(--font-display); letter-spacing: .02em;
}
.brand-name { font-family: var(--font-display); font-size: 1.0625rem; }

.nav ul { display: flex; gap: 4px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border-radius: 999px; text-decoration: none; font-size: .9375rem; font-weight: 500; color: var(--ink-muted);
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--accent-soft); }
.nav a.active { color: var(--accent); background: var(--accent-soft); }

.header-actions { display: flex; gap: 8px; }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: border-color var(--t) var(--ease), color var(--t) var(--ease);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn .icon { grid-area: 1 / 1; width: 20px; height: 20px; }

/* Icono de tema: luna en claro, sol en oscuro */
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .icon-sun { display: block; }
  :root[data-theme="auto"] .icon-moon { display: none; }
}

.nav-toggle { display: none; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 96px); overflow-x: clip; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.25rem, 6.2vw, 4rem); font-weight: 600; }
.hero h1 .accent { color: var(--accent); }
.hero-role { margin: 20px 0 0; font-size: clamp(1.125rem, 2.4vw, 1.375rem); font-weight: 500; }
.hero-lead { margin: 12px 0 0; max-width: 56ch; color: var(--ink-muted); font-size: 1.0625rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 40px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px; }
.stats dt { font-size: .8125rem; line-height: 1.35; color: var(--ink-muted); }
.stats dd { margin: 0; font: 600 clamp(1.75rem, 4vw, 2.5rem)/1 var(--font-display); color: var(--accent); font-variant-numeric: tabular-nums; }

.hero-photo { position: relative; margin: 0 auto; width: min(100%, 380px); }
.photo-frame {
  position: relative; aspect-ratio: 1087 / 1446;
  border-radius: 999px 999px var(--radius) var(--radius);
  overflow: hidden; background: var(--surface-alt);
  box-shadow: var(--shadow);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px; z-index: -1;
  border: 2px solid var(--accent); opacity: .35;
  border-radius: 999px 999px var(--radius) var(--radius);
}
.photo-badge {
  position: absolute; left: -12px; bottom: 28px; display: flex; align-items: center; gap: 12px;
  padding: 12px 18px 12px 14px; max-width: calc(100% - 8px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); font-size: .875rem; font-weight: 600; line-height: 1.3;
}
.photo-badge .icon { width: 26px; height: 26px; color: var(--accent); }
.photo-badge small { font-weight: 400; color: var(--ink-muted); }

/* ---------- Secciones ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-alt { background: var(--surface-alt); border-block: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 40px; }
.section-head h2, .about-grid h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 600; }

.about-grid { display: grid; gap: 32px; }
.about-grid .section-head { margin-bottom: 0; }
.about-body p { color: var(--ink-muted); font-size: 1.0625rem; max-width: 68ch; }
.pillars { display: grid; gap: 12px; margin-top: 28px; }
.pillars li {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.pillars .icon { width: 24px; height: 24px; margin-top: 2px; color: var(--accent); }
.pillars strong { display: block; font-family: var(--font-display); font-size: 1.0625rem; }
.pillars span { color: var(--ink-muted); font-size: .9375rem; }

/* Tarjetas de habilidades */
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
.card {
  padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.card h3 { margin: 14px 0 14px; font-size: 1.1875rem; font-weight: 600; }
.card-featured { grid-column: 1 / -1; background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  background: var(--accent-soft); color: var(--ink); border-radius: 999px;
  font-size: .875rem; font-weight: 500;
}
.level { padding-left: 8px; border-left: 1px solid var(--line); font-size: .75rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Línea de tiempo ---------- */
.timeline { position: relative; display: grid; gap: 28px; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-item { position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: -28px; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.tl-date { margin: 0 0 6px; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.tl-body {
  padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.tl-body h3 { font-size: 1.25rem; font-weight: 600; }
.tl-org { margin: 4px 0 0; color: var(--ink-muted); font-size: .9375rem; }
.tl-body ul { margin-top: 14px; display: grid; gap: 8px; }
.tl-body li { position: relative; padding-left: 20px; color: var(--ink-muted); font-size: .9375rem; }
.tl-body li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 2px; background: var(--accent); }

/* ---------- Formación ---------- */
.edu-list { display: grid; gap: 16px; grid-template-columns: 1fr; }
.edu { padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.edu-date { margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.tag { padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .6875rem; letter-spacing: .06em; }
.edu h3 { font-size: 1.1875rem; font-weight: 600; }
.edu p:last-child { margin: 6px 0 0; color: var(--ink-muted); font-size: .9375rem; }

/* ---------- Contacto ---------- */
.contact-panel {
  display: grid; gap: 36px; padding: clamp(28px, 5vw, 56px);
  border-radius: 28px; color: #f3f0ff;
  background: radial-gradient(120% 140% at 0% 0%, var(--panel-from), var(--panel-to));
}
.contact-copy h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 600; color: #fff; }
.contact-copy p { margin: 16px 0 28px; max-width: 46ch; color: #d9d2f5; }
.contact-list { display: grid; gap: 10px; align-content: start; }
.contact-copy .contact-list { margin-top: 8px; }
.contact-copy p { margin-bottom: 20px; }

/* Formulario de contacto */
.contact-form { display: grid; gap: 18px; align-content: start; padding: clamp(20px, 3vw, 32px); background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .16); border-radius: 20px; }
.field label { display: block; margin-bottom: 8px; font-size: .875rem; font-weight: 600; color: #fff; }
.field input, .field textarea {
  display: block; width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 1rem; color: #fff;
  background: rgb(10 8 24 / .35); border: 1.5px solid rgb(255 255 255 / .5); border-radius: var(--radius-sm);
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.field textarea { min-height: 132px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: rgb(255 255 255 / .55); }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid #fff; outline-offset: 2px; border-color: #fff; }
.field [aria-invalid="true"] { border-color: #ffb4b4; }
.field-error { margin: 6px 0 0; font-size: .8125rem; color: #ffc9c9; }
.field-error[hidden] { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn { width: 100%; }
.contact-form .btn[disabled] { opacity: .6; cursor: not-allowed; }
.form-status { min-height: 1.4em; margin: 0; font-size: .9375rem; font-weight: 500; }
.form-status.ok { color: #b9f2cd; }
.form-status.err { color: #ffc9c9; }
.contact-list a, .contact-list .static {
  display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 14px 18px;
  border: 1px solid rgb(255 255 255 / .16); border-radius: var(--radius);
  background: rgb(255 255 255 / .06); text-decoration: none; color: #fff; font-weight: 500; overflow-wrap: anywhere;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.contact-list a:hover { background: rgb(255 255 255 / .14); border-color: rgb(255 255 255 / .4); }
.contact-list .icon { width: 22px; height: 22px; color: #cbbcff; }
.contact-list small { display: block; margin-bottom: 2px; font-weight: 400; color: #cbbfef; }
.contact-panel :focus-visible { outline-color: #fff; }

/* ---------- Pie ---------- */
.site-footer { padding: 28px 0 40px; color: var(--ink-muted); font-size: .875rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.footer-inner p { margin: 0; }
.footer-inner a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--accent); font-weight: 600; }
.footer-inner a:hover { text-decoration: underline; }

/* ---------- Animación de entrada ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive (mobile-first) ---------- */
@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .edu-list { grid-template-columns: repeat(2, 1fr); }
  .edu:first-child { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 72px; }
  .hero-photo { width: min(100%, 420px); margin-inline: 0 auto; justify-self: end; }
  .about-grid { grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: start; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .contact-panel { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }

  .timeline { padding-left: 0; gap: 0; }
  .timeline::before { left: 200px; }
  .tl-item { display: grid; grid-template-columns: 180px 1fr; column-gap: 40px; padding-bottom: 28px; }
  .tl-item:last-child { padding-bottom: 0; }
  .tl-item::before { left: 194px; top: 4px; }
  .tl-date { text-align: right; padding-top: 2px; }
}

@media (max-width: 819px) {
  .nav-toggle { display: grid; }
  .nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 8px 16px 16px; display: none;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 2px; }
  .nav a { width: 100%; min-height: 48px; border-radius: var(--radius-sm); }
}

@media (max-width: 479px) {
  .stats { gap: 10px; }
  .photo-badge { left: 8px; bottom: 16px; }
  .cta-row .btn { flex: 1 1 100%; }
  .brand-name { font-size: 1rem; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .card:hover { transform: none; }
}

/* ==========================================================
   Germán Solórzano · Versión 3
   Se carga DESPUÉS de styles.css y lo sobrescribe:
   paleta acero / azul marino + cobre, formas más angulares,
   marco de foto biselado y animaciones discretas.
   ========================================================== */

:root {
  --font-display: "Archivo", "Inter", system-ui, sans-serif;

  --bg: #f1f3f6;
  --surface: #ffffff;
  --surface-alt: #e6eaf0;
  --ink: #0f1a2b;
  --ink-muted: #4a5568;
  --line: #d3d9e2;
  --accent: #1f4e79;
  --accent-strong: #163a5b;
  --accent-soft: #dde7f2;
  --copper: #b45f1c;
  --on-accent: #ffffff;
  --panel-from: #17324f;
  --panel-to: #0a121c;
  --ring: #1f4e79;
  --shadow: 0 1px 2px rgb(15 26 43 / .08), 0 10px 26px -10px rgb(15 26 43 / .25);
  --radius: 10px;
  --radius-sm: 6px;
}

:root[data-theme="dark"] {
  --bg: #0a111c;
  --surface: #111b2b;
  --surface-alt: #0d1622;
  --ink: #e8edf5;
  --ink-muted: #a1adbf;
  --line: #24344a;
  --accent: #6fb0e8;
  --accent-strong: #9cc8f0;
  --accent-soft: #14263b;
  --copper: #e39a4d;
  --on-accent: #08121e;
  --panel-from: #1a3a5c;
  --panel-to: #0a1019;
  --ring: #6fb0e8;
  --shadow: 0 1px 2px rgb(0 0 0 / .5), 0 14px 34px -12px rgb(0 0 0 / .7);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0a111c; --surface: #111b2b; --surface-alt: #0d1622; --ink: #e8edf5;
    --ink-muted: #a1adbf; --line: #24344a; --accent: #6fb0e8; --accent-strong: #9cc8f0;
    --accent-soft: #14263b; --copper: #e39a4d; --on-accent: #08121e;
    --panel-from: #1a3a5c; --panel-to: #0a1019; --ring: #6fb0e8;
    --shadow: 0 1px 2px rgb(0 0 0 / .5), 0 14px 34px -12px rgb(0 0 0 / .7);
  }
}

/* ---------- Formas más angulares ---------- */
h1, h2, h3 { letter-spacing: -.02em; }
h1, h2 { font-weight: 800; }
.btn, .nav a { border-radius: 8px; }
.icon-btn { border-radius: 10px; }
.brand-mark { border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-strong)); }
:root[data-theme="dark"] .brand-mark { color: #08121e; }
.chips li { border-radius: 6px; }
.tag { border-radius: 4px; }
.contact-panel { border-radius: 14px; }
.contact-form { border-radius: 10px; }
.field input, .field textarea { border-radius: 6px; }
.eyebrow { color: var(--accent); }
.section-head .eyebrow::before, .about-grid .eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--copper); }
.btn-primary { box-shadow: inset 0 -2px 0 rgb(0 0 0 / .18); }
.btn-primary:hover { box-shadow: 0 8px 22px -8px var(--accent); }

/* ---------- Fondo tipo plano técnico en el hero ---------- */
.hero { position: relative; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(80% 90% at 70% 40%, #000 20%, transparent 75%);
          mask-image: radial-gradient(80% 90% at 70% 40%, #000 20%, transparent 75%);
  opacity: .7;
}
.hero h1 .accent { color: var(--accent); }
.hero-role { font-family: var(--font-display); font-weight: 700; }
.rotator { display: inline-block; color: var(--copper); transition: opacity 200ms var(--ease), translate 200ms var(--ease); }
.rotator.out { opacity: 0; translate: 0 -8px; }

.stats dd { color: var(--copper); }

/* ---------- Marco de foto biselado ---------- */
.hero-photo { --cut: 56px; width: min(100%, 400px); }
.photo-frame {
  border-radius: 0; box-shadow: none; background: var(--surface-alt);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}
.photo-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 65%, rgb(10 17 28 / .35)); pointer-events: none; }
.hero-photo::before {
  inset: 18px -18px -18px 18px; border: 0; border-radius: 0; opacity: 1; z-index: -1;
  background: linear-gradient(135deg, var(--accent), var(--copper));
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}
.hero-photo::after {
  content: ""; position: absolute; left: -12px; top: -12px; width: 54px; height: 54px; z-index: 2; pointer-events: none;
  border-top: 4px solid var(--copper); border-left: 4px solid var(--copper);
}
.photo-badge { left: -14px; border-radius: 6px; border-left: 4px solid var(--copper); }
.photo-badge .icon { color: var(--copper); }

/* ---------- Tarjetas: foco de luz que sigue al cursor ---------- */
.card { position: relative; overflow: hidden; border-radius: var(--radius); }
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--accent) 18%, transparent), transparent 65%);
  transition: opacity var(--t) var(--ease);
}
.card:hover::before { opacity: 1; }
.card .icon-lg { color: var(--copper); }
.card-featured { background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); border-color: var(--accent); }
.level { color: var(--copper); }
.card.pop { animation: pop 380ms var(--ease) both; }
@keyframes pop { from { opacity: 0; translate: 0 14px; } }

/* Filtros de habilidades */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 28px; }
.filter {
  min-height: 44px; padding: 0 18px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 .875rem var(--font-body);
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease);
}
.filter:hover { border-color: var(--accent); }
.filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.card[hidden] { display: none; }

/* ---------- Línea de tiempo que se completa al hacer scroll ---------- */
.timeline::after {
  content: ""; position: absolute; left: 6px; top: 8px; width: 2px;
  height: calc((100% - 16px) * var(--p, 0));
  background: linear-gradient(var(--accent), var(--copper));
}
.tl-item::before { border-color: var(--copper); }
.tl-date { color: var(--copper); }
.tl-body { border-radius: var(--radius); transition: transform var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.tl-body:hover { transform: translateX(4px); border-color: var(--accent); box-shadow: var(--shadow); }
.tl-body li::before { background: var(--copper); }
@media (min-width: 900px) { .timeline::after { left: 200px; } }

.edu { border-radius: var(--radius); border-left: 4px solid var(--copper); transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.edu:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.edu-date { color: var(--copper); }
.pillars li { border-radius: var(--radius-sm); border-left: 4px solid var(--accent); }
.pillars .icon { color: var(--copper); }

/* ---------- Contacto ---------- */
.eyebrow-on-dark { color: #9cc8f0; }
.contact-copy p { color: #cdd8e6; }
.contact-list a, .contact-list .static { border-radius: 8px; }
.contact-list .icon { color: #e3a869; }
.btn-light { color: #10263d; }

/* ---------- Progreso de lectura y volver arriba ---------- */
.progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 70; transform-origin: 0 50%; transform: scaleX(var(--sp, 0)); background: linear-gradient(90deg, var(--accent), var(--copper)); pointer-events: none; }
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 10px; text-decoration: none;
  background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; translate: 0 10px;
  transition: opacity var(--t) var(--ease), translate var(--t) var(--ease), background-color var(--t) var(--ease);
}
.to-top .icon { rotate: -90deg; }
.to-top.show { opacity: 1; pointer-events: auto; translate: 0 0; }
.to-top:hover { background: var(--accent-strong); }

/* ---------- Entrada del hero (solo CSS, no depende de JS) ---------- */
.hero-copy > * { animation: rise 700ms var(--ease) both; }
.hero-copy > :nth-child(1) { animation-delay: 60ms; }
.hero-copy > :nth-child(2) { animation-delay: 140ms; }
.hero-copy > :nth-child(3) { animation-delay: 220ms; }
.hero-copy > :nth-child(4) { animation-delay: 300ms; }
.hero-copy > :nth-child(5) { animation-delay: 380ms; }
.hero-copy > :nth-child(6) { animation-delay: 460ms; }
.hero-photo { animation: slide-in 900ms var(--ease) 120ms both; transform: perspective(900px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); transition: transform 240ms var(--ease); }
@keyframes rise { from { opacity: 0; translate: 0 22px; } }
@keyframes slide-in { from { opacity: 0; translate: 32px 0; } }

@media (prefers-reduced-motion: reduce) {
  .hero-photo { transform: none; }
  .card.pop { animation: none; }
  .tl-body:hover, .edu:hover { transform: none; }
}
