/* Víctor Sabido — portfolio. Blue, white, motion. */

/* fonts:start — generado por tools/fetch-fonts.py, no editar a mano.
   Plus Jakarta Sans, SIL Open Font License 1.1. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-latin-ext.38e3b8fd.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-latin.153fc85b.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* fonts:end */

:root {
  --navy: #0b2a5b;
  --blue: #1d4ed8;
  --blue-2: #2563eb;
  --sky: #60a5fa;
  --ice: #e8f1ff;
  --mist: #f5f8ff;
  --white: #ffffff;
  /* alias con papel propio: los tres se redefinen en modo oscuro */
  --surface: #ffffff;
  --deep: #0b2a5b;
  --fill: #1d4ed8;
  --fill-2: #2563eb;
  --ink: #0f2744;
  --muted: #5b6b82;
  --line: rgba(29, 78, 216, 0.14);
  --header-h: 68px;
  --max: 1100px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --spot-x: 50%;
  --spot-y: 50%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  background: var(--deep);
  color: var(--white);
  font-weight: 700;
}

.skip:focus {
  top: 1rem;
  color: var(--white);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--navy);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* el <picture> no debe formar caja: la img se maqueta como antes */
picture {
  display: contents;
}

.wrap {
  width: min(var(--max), calc(100% - 2.4rem));
  margin-inline: auto;
}

.icon {
  width: 1.45rem;
  height: 1.45rem;
  display: block;
}

.icon-xs {
  width: 0.82rem;
  height: 0.82rem;
  display: block;
  flex-shrink: 0;
}

.icon-sm {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
  flex-shrink: 0;
}

.bg-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 45% at 8% -8%, #c9dcff 0%, transparent 55%),
    radial-gradient(ellipse 50% 35% at 100% 8%, #dbe7ff 0%, transparent 50%);
}
main:focus {
  outline: none;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(11, 42, 91, 0.06);
}

.header-bar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 45;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--fill), var(--deep));
  color: var(--white);
  font-size: 0.72rem;
  display: grid;
  place-items: center;
}

.nav-desktop {
  display: none;
  gap: 1.5rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.nav-desktop a {
  color: var(--muted);
}

.nav-desktop a:hover {
  color: var(--blue);
}

.nav-desktop a[aria-current="true"],
.mobile-menu-inner a[aria-current="true"] {
  color: var(--blue);
}

.nav-desktop a[aria-current="true"] {
  position: relative;
}

.nav-desktop a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.45rem;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
}

.burger {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.burger svg {
  width: 24px;
  height: 24px;
}

.burger .icon-close {
  display: none;
}

.site-header.menu-open .icon-open {
  display: none;
}

.site-header.menu-open .icon-close {
  display: block;
}

.nav-panel {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  z-index: 30;
  transition: max-height 0.35s var(--ease), visibility 0.35s var(--ease);
}

.site-header.menu-open .nav-panel {
  max-height: 70vh;
  visibility: visible;
}

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 1.2rem 1.6rem;
}

.mobile-menu-inner a {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  padding: 0.55rem 0;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }

  .burger,
  .nav-panel {
    display: none;
  }
}

/* Hero */
.hero {
  position: relative;
  padding: 3.2rem 0 4.2rem;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.7;
}

.blob-a {
  width: 280px;
  height: 280px;
  background: #93c5fd;
  top: -40px;
  right: 8%;
  animation: float 10s ease-in-out infinite;
}

.blob-b {
  width: 220px;
  height: 220px;
  background: #bfdbfe;
  bottom: 10%;
  left: -40px;
  animation: float 13s ease-in-out infinite reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(18px, -22px);
  }
}

.hero-grid {
  display: grid;
  gap: 2.6rem;
  align-items: center;
  position: relative;
}

.eyebrow {
  margin: 0 0 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue);
}

.hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(2.5rem, 8vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.02;
  color: var(--navy);
}

.hero-role {
  margin: 0 0 1rem;
  color: var(--blue);
  font-weight: 700;
  font-size: 1.15rem;
}

.lede {
  margin: 0 0 1.15rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.12rem;
}

.snapshot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 1.2rem;
  margin: 0 0 1.4rem;
  padding: 0.95rem 1.05rem;
  max-width: 34rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.snapshot div {
  margin: 0;
}

.snapshot dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.snapshot dd {
  margin: 0.12rem 0 0;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:hover {
  transform: none;
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-2px);
  }
}

.btn-primary {
  background: linear-gradient(135deg, var(--fill-2), var(--deep));
  color: var(--white);
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.28);
}

.btn-primary:hover {
  color: var(--white);
}

.btn-ghost {
  background: var(--surface);
  color: var(--navy);
  border-color: var(--line);
}

.btn-ghost:hover {
  color: var(--blue);
}

.btn-light {
  background: var(--surface);
  color: var(--navy);
}

.btn-light:hover {
  color: var(--blue);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-outline:hover {
  color: var(--white);
  border-color: var(--white);
}

.hero-photo {
  margin: 0;
  position: relative;
  justify-self: center;
  width: min(280px, 72vw);
}

.photo-ring {
  position: absolute;
  inset: -10px;
  border-radius: 28px;
  background: conic-gradient(from 180deg, var(--blue), var(--sky), var(--ice), var(--blue));
  animation: spin 42s linear infinite;
  z-index: 0;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

.hero-photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22px;
  border: 5px solid var(--surface);
}

.photo-chip {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  box-shadow: 0 10px 24px rgba(11, 42, 91, 0.1);
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    transform: scale(1.15);
  }
}

@media (min-width: 860px) {
  .hero {
    padding: 4.5rem 0 5.5rem;
  }

  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .hero-photo {
    width: 340px;
    justify-self: end;
  }
}

/* Tech bar — static, no marquee */
.techbar {
  border-block: 1px solid var(--line);
  background: var(--surface);
  padding: 1.15rem 0;
}

.techbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.1rem;
}

.techbar-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.techbar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.techbar-list li {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--ice);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 700;
}

/* Sections */
.section {
  padding: 4.6rem 0;
}

.section-alt {
  background: var(--surface);
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2.2rem;
}

.section-head p.section-lead {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.num {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.section-head h2,
.contact-box h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.55rem);
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--navy);
}

/* Cards */
.highlights {
  display: grid;
  gap: 1rem;
}

.card,
.stack-grid li,
.job {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem 1.3rem 1.5rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.card::after,
.stack-grid li::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    180px circle at var(--spot-x) var(--spot-y),
    rgba(96, 165, 250, 0.22),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.card:hover,
.stack-grid li:hover {
  transform: none;
  box-shadow: none;
}

.card:hover::after,
.stack-grid li:hover::after {
  opacity: 0;
}

@media (hover: hover) {
  .card:hover,
  .stack-grid li:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(11, 42, 91, 0.1);
  }

  .card:hover::after,
  .stack-grid li:hover::after {
    opacity: 1;
  }
}

.icon-badge {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
  color: var(--blue);
  background: var(--ice);
  flex-shrink: 0;
}

.job-top .icon-badge {
  margin-bottom: 0;
}

.kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.card p {
  margin: 0;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

@media (min-width: 760px) {
  .highlights {
    grid-template-columns: 1fr 1fr;
  }
}

/* Timeline */
.exp-path {
  list-style: none;
  margin: 0 0 2.2rem;
  padding: 0;
  display: none;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.exp-path li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  background: var(--mist);
  border: 1px solid var(--line);
  font-weight: 800;
  color: var(--navy);
}

.exp-path li span {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  background: var(--ice);
  color: var(--blue);
}

.exp-path li.is-now {
  background: linear-gradient(135deg, var(--deep), var(--fill));
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(11, 42, 91, 0.18);
}

.exp-path li.is-now span {
  background: var(--surface);
  color: var(--blue);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.35rem;
  position: relative;
}

.timeline > li {
  display: grid;
  gap: 0.75rem;
}

.when-col {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.when-num {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--white);
  background: linear-gradient(145deg, var(--fill-2), var(--deep));
  box-shadow: 0 0 0 6px var(--ice);
  flex-shrink: 0;
}

.when {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--navy);
  line-height: 1.2;
}

.when time {
  color: var(--navy);
}

.when-to {
  font-weight: 700;
  color: var(--muted);
}

.job {
  padding: 1.5rem 1.35rem 1.55rem;
}

.job.is-now {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, var(--blue), var(--sky)) border-box;
  border: 2px solid transparent;
  box-shadow: 0 16px 40px rgba(11, 42, 91, 0.1);
}

.job-top {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.75rem 0.85rem;
  margin-bottom: 0.95rem;
  position: relative;
  z-index: 1;
}

.job-titles {
  min-width: 0;
}

.job-flag {
  grid-column: 2;
  justify-self: start;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.3;
}

.job h3 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.where {
  margin: 0.15rem 0 0;
  font-weight: 700;
}

@media (min-width: 700px) {
  .job-top {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
  }

  .job-titles {
    flex: 1;
    min-width: 0;
  }

  .job-flag {
    grid-column: auto;
    margin-left: auto;
    flex-shrink: 0;
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
    background: var(--fill);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
  }
}

.job > p {
  margin: 0;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.kit {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  position: relative;
  z-index: 1;
}

.kit li {
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem 0.8rem 0.8rem;
  border-radius: 12px;
  background: var(--mist);
  border: 1px solid var(--line);
  color: var(--blue);
}

.kit strong {
  color: var(--navy);
  font-size: 0.92rem;
}

.kit span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

@media (min-width: 640px) {
  .kit {
    grid-template-columns: repeat(3, 1fr);
  }
}

.wins {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  background: var(--mist);
  border-radius: 12px;
  position: relative;
  z-index: 1;
}

.wins li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--ink);
}

.wins li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--blue);
}

.tags {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  position: relative;
  z-index: 1;
}

.tags li {
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--ice);
}

@media (min-width: 700px) {
  .exp-path {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    position: relative;
  }

  .exp-path::before {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    top: 50%;
    height: 2px;
    background: var(--ice);
    z-index: 0;
  }

  .exp-path li {
    justify-content: center;
    position: relative;
    z-index: 1;
  }
}

@media (min-width: 800px) {
  .timeline {
    padding-left: 0.4rem;
  }

  .timeline::before {
    content: "";
    position: absolute;
    left: 1.25rem;
    top: 1.3rem;
    bottom: 1.3rem;
    width: 2px;
    background: linear-gradient(var(--blue), #cfe0ff);
  }

  .timeline > li {
    grid-template-columns: 7.4rem 1fr;
    gap: 1.5rem;
  }

  .when-col {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 1.35rem;
    position: relative;
    z-index: 1;
  }
}

/* Stack */
.stack-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.stack-grid li {
  display: grid;
  justify-items: start;
  gap: 0.35rem;
  padding: 1.1rem 1rem 1.15rem;
  color: var(--blue);
}

.stack-grid strong {
  color: var(--navy);
  font-size: 1rem;
}

.stack-grid span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

@media (min-width: 760px) {
  .stack-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* About */
.about-grid {
  display: grid;
  gap: 1.6rem;
}

.about-copy p {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 40rem;
}

.facts {
  display: grid;
  gap: 1.4rem;
}

.facts h3 {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

@media (min-width: 860px) {
  .about-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .about-grid .section-head {
    grid-column: 1 / -1;
  }
}

.certs {
  padding: 1.15rem 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(160deg, var(--ice), var(--surface) 70%);
}

.certs h3 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.cert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.cert-list li + li {
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}

.cert-list strong {
  display: block;
  font-size: 1.02rem;
  letter-spacing: -0.015em;
  color: var(--navy);
}

.cert-list span {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
}

.cert-list .cert-meta {
  margin-top: 0.3rem;
  font-size: 0.74rem;
  color: var(--blue);
  overflow-wrap: anywhere;
}

/* El ID de la credencial. Sin JS es texto y punto; con JS, main.js le pone
   role="button" y tabindex, y estos estilos lo convierten en algo pulsable. */
.cert-list .cert-id {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: inherit;
  color: inherit;
}

.cert-list .cert-id svg {
  display: none;
}

.js .cert-list .cert-id {
  cursor: pointer;
  padding: 0.12rem 0.4rem;
  margin-left: -0.4rem;
  border-radius: 7px;
  background: var(--ice);
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.js .cert-list .cert-id .cert-ico-copy {
  display: block;
  opacity: 0.75;
}

@media (hover: hover) {
  .js .cert-list .cert-id:hover {
    background: #d6e6ff;
  }
}

.js .cert-list .cert-id.is-copied {
  background: #dcfce7;
  color: #15803d;
}

.js .cert-list .cert-id.is-copied .cert-ico-copy {
  display: none;
}

.js .cert-list .cert-id.is-copied .cert-ico-ok {
  display: block;
}

.about-copy strong {
  color: var(--navy);
}

/* Contact */
.contact-box {
  background: linear-gradient(145deg, var(--deep) 0%, var(--fill) 100%);
  color: var(--white);
  border-radius: 24px;
  padding: 2.3rem 1.5rem 2.5rem;
  box-shadow: 0 24px 60px rgba(11, 42, 91, 0.22);
}

.contact-box .num {
  color: #bfdbfe;
}

.contact-box :focus-visible {
  outline-color: #fff;
}

.contact-box h2 {
  color: var(--white);
  max-width: 18ch;
  margin-bottom: 0.7rem;
}

.contact-lead {
  margin: 0;
  color: #dbe7ff;
  max-width: 32rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.6rem;
}

@media (min-width: 700px) {
  .contact-box {
    padding: 3.2rem 3rem;
  }
}

/* Currículum */
.cv-grid {
  display: grid;
  gap: 1.3rem;
  align-items: start;
}

.cv-preview {
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(11, 42, 91, 0.12);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

@media (hover: hover) {
  .cv-preview:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 60px rgba(11, 42, 91, 0.2);
  }
}

.cv-preview img {
  width: 100%;
}

.cv-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.cv-preview-name {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cv-preview-name svg {
  color: var(--blue);
}

.cv-preview-badge {
  flex-shrink: 0;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: var(--ice);
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.cv-side h3 {
  margin: 0 0 1rem;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.cv-side .cv-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.95rem;
}

.cv-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.cv-list svg {
  color: var(--blue);
  margin-top: 0.35rem;
}

.cv-btn {
  width: 100%;
  position: relative;
  z-index: 1;
}

.cv-side .cv-meta {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  position: relative;
  z-index: 1;
}

@media (min-width: 760px) {
  .cv-grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
  }
}

/* 404 */
.notfound {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.notfound-inner {
  text-align: center;
  max-width: 34rem;
}

.notfound h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.9rem, 6vw, 3rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--navy);
}

.notfound-lead {
  margin: 0 0 2rem;
  color: var(--muted);
}

.notfound-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}

/* Footer */
.site-footer {
  padding: 1.3rem 0 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
}

/* Reveal. Solo se oculta si hay JS para volver a mostrarlo: sin el script
   inline del head, el contenido se ve siempre. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.visible {
  opacity: 1;
  transform: none;
}

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

  .js .reveal,
  .blob,
  .photo-ring,
  .dot {
    animation: none;
    transition: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Modo oscuro. El sitio ya estaba tokenizado, asi que basta con redefinir la
   paleta y los pocos colores que estaban escritos a mano. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --navy: #dbe7ff;
    --blue: #8fb4ff;
    --blue-2: #a8c6ff;
    --sky: #3f6fd0;
    --ice: #1b2740;
    --mist: #0a1220;
    --surface: #131d30;
    --ink: #e8eefb;
    --muted: #a4b5cd;
    --line: rgba(143, 180, 255, 0.18);
    --deep: #10265a;
    --fill: #2a53c4;
    --fill-2: #3565da;
  }

  .bg-glow {
    background:
      radial-gradient(ellipse 70% 45% at 8% -8%, #15294f 0%, transparent 55%),
      radial-gradient(ellipse 50% 35% at 100% 8%, #101e3c 0%, transparent 50%);
  }

  .blob {
    opacity: 0.5;
  }

  .blob-a {
    background: #1e3a72;
  }

  .blob-b {
    background: #16294f;
  }

  /* la llamada a la accion sigue siendo la pieza clara sobre la caja azul */
  .contact-box .btn-light {
    background: #e8eefb;
    color: #10265a;
  }

  .contact-box .btn-light:hover {
    color: #1d4ed8;
  }

  /* la miniatura del CV es papel blanco: se apaga un poco para no deslumbrar */
  .cv-preview img {
    filter: brightness(0.92);
  }

  @media (hover: hover) {
    .js .cert-list .cert-id:hover {
      background: #24344f;
    }
  }

  .js .cert-list .cert-id.is-copied {
    background: #14361f;
    color: #86efac;
  }

  @media (min-width: 700px) {
    .timeline::before {
      background: linear-gradient(var(--blue), transparent);
    }
  }
}

/* Impresion: fuera decoracion, y los enlaces externos con su URL visible. */
@media print {
  .site-header,
  .nav-panel,
  .bg-glow,
  .blob,
  .photo-ring,
  .skip,
  .exp-path {
    display: none !important;
  }

  html,
  body {
    background: #fff;
    color: #000;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .btn {
    background: none !important;
    color: #000 !important;
    border: 1px solid #999 !important;
    box-shadow: none !important;
  }

  .contact-box {
    background: none;
    color: #000;
    box-shadow: none;
    border: 1px solid #999;
  }

  .contact-box h2,
  .contact-box .num,
  .contact-lead {
    color: #000;
  }

  .section {
    padding: 1.2rem 0;
  }

  .job,
  .card,
  .certs,
  .cv-grid {
    break-inside: avoid;
  }

  main a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    font-weight: 400;
    word-break: break-all;
  }
}
