/* Anferdi Hub — colores principales en :root. Edita aquí el aspecto visual. */
:root {
  --ink: #202226;
  --muted: #626970;
  --blue: #0c70bd;
  --soft: #eaf4fb;
  --soft2: #f6f9fb;
  --line: #e0e5e9;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Arial,Helvetica,sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

a: focus-visible,button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.skip {
  position: absolute;
  top: -80px;
  left: 20px;
  z-index: 40;
  background: #fff;
  padding: 10px;
}

.skip:focus {
  top: 12px;
}

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

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #ffffffed;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid #eef0f2;
}

.header-inner {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.logo {
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -.09em;
  white-space: nowrap;
}

.logo span {
  color: var(--blue);
}

.nav {
  display: flex;
  align-items: center;
  gap: 35px;
}

.nav a {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

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

.nav-contact {
  background: var(--blue);
  color: #fff!important;
  padding: 12px 20px;
  border-radius: 99px;
}

.nav-contact:hover {
  background: #095995;
}

.menu-button {
  display: none;
  background: none;
  border: 0;
  font-size: 26px;
  cursor: pointer;
}

.hero {
  min-height: 690px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 4%;
  padding: 80px 0 95px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .13em;
  color: var(--blue);
}

.kicker:before {
  content: '';
  width: 27px;
  height: 2px;
  background: var(--blue);
}

h1,h2,h3,p {
  margin-top: 0;
}

.hero h1 {
  font-size: clamp(3.5rem,6.7vw,6.9rem);
  line-height: .99;
  letter-spacing: -.078em;
  margin: 27px 0 25px;
  font-weight: 900;
}

.hero h1 em {
  color: var(--blue);
  font-style: normal;
}

.hero-text {
  font-size: 20px;
  color: #4f5b63;
  max-width: 565px;
  line-height: 1.57;
  margin-bottom: 34px;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px solid var(--blue);
  border-radius: 100px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 800;
  transition: .2s;
}

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

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: #095995;
}

.btn-outline {
  color: var(--ink);
  border-color: #c8d3da;
}

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

.hero-art {
  height: 500px;
  position: relative;
  display: grid;
  place-items: center;
}

.hero-circle {
  width: min(430px,82%);
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  background: #c9e3f4;
  overflow: hidden;
}

.hero-circle:after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid #b5d3e6;
  pointer-events: none;
}

.hero-circle img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* El fondo azul tiñe cualquier foto, también después de sustituirla. */
  mix-blend-mode: luminosity;
  filter: grayscale(1) contrast(1.08);
}

/* Solo la captura original del CV necesita este recorte especial. */
.hero-circle img.original-cv-sheet {
  max-width: none;
  width: auto;
  height: 505%;
  left: 50%;
  top: -3%;
  transform: translateX(-74%);
}

.orbit {
  position: absolute;
  width: min(510px,98%);
  aspect-ratio: 1;
  border: 1px dashed #abcfe4;
  border-radius: 50%;
  animation: orbit-rotation 22s linear infinite;
  pointer-events: none;
}

.orbit:before,.orbit:after {
  content: '';
  position: absolute;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue);
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px #a8cfe7;
}

.orbit:before {
  /* 14.645 % es el punto de la circunferencia situado a 45°. */
  top: 14.645%;
  left: 14.645%;
  transform: translate(-50%,-50%);
}

.orbit:after {
  bottom: 14.645%;
  right: 14.645%;
  transform: translate(50%,50%);
  width: 25px;
  height: 25px;
  border-width: 3px;
}

@keyframes orbit-rotation {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-side {
  position: absolute;
  right: -8px;
  top: 10%;
  writing-mode: vertical-rl;
  letter-spacing: .18em;
  font-size: 10px;
  font-weight: 800;
  color: #83929b;
}

.section {
  padding: 105px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 50px;
}

.pill {
  display: inline-block;
  border: 1px solid #b5d3e6;
  color: var(--blue);
  border-radius: 99px;
  padding: 7px 23px;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: 11px;
  font-weight: 800;
}

.section-head h2 {
  font-size: clamp(2.5rem,5vw,4rem);
  line-height: 1.08;
  letter-spacing: -.06em;
  margin: 17px 0 0;
}

.section-head p {
  margin: 15px auto 0;
  color: var(--muted);
  max-width: 620px;
}

.resume {
  background: #f9fbfc;
  scroll-margin-top: 78px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  background: #eaf4fb;
  border-radius: 999px;
  padding: 5px;
  margin: 0 auto 56px;
  max-width: 900px;
  gap: 3px;
}

.tab {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #2c3e4a;
  padding: 16px 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  white-space: nowrap;
}

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

.tab[aria-selected="true"] {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 15px #0c70bd2a;
}

.tab-icon {
  font-size: 19px;
  line-height: 1;
}

.tab-panel {
  min-height: 375px;
}

.tab-panel[hidden] {
  display: none;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9%;
  align-items: start;
}

.profile-grid h3 {
  font-size: clamp(1.8rem,3.3vw,2.6rem);
  line-height: 1.2;
  letter-spacing: -.05em;
  margin: 0 0 18px;
}

.profile-grid p {
  font-size: 18px;
  color: #586269;
  margin-bottom: 20px;
}

.fact-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 26px;
  margin: 0;
}

.fact-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
  font-size: 14px;
}

.fact-list dt {
  color: #6d7981;
}

.fact-list dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.resume-highlight {
  margin-top: 20px;
  border-left: 3px solid var(--blue);
  background: #eaf4fb;
  padding: 17px 21px;
  font-size: 15px;
}

.timeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.timeline-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 28px;
  box-shadow: 0 10px 30px #1c2b3408;
}

.year {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.timeline-card h3 {
  font-size: 22px;
  letter-spacing: -.04em;
  margin: 12px 0 9px;
}

.timeline-card p {
  color: #5e6870;
  margin: 0;
}

.timeline-note {
  grid-column: 1/-1;
  color: #637078;
  font-size: 14px;
  margin: 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 16px;
}

.skill-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 25px 28px;
  border-radius: 16px;
}

.skill-card .skill-num {
  color: var(--blue);
  font-weight: 900;
  font-size: 13px;
}

.skill-card h3 {
  font-size: 21px;
  letter-spacing: -.04em;
  margin: 9px 0;
}

.skill-card p {
  color: #59656e;
  margin: 0;
}

.statement {
  background: var(--blue);
  color: #fff;
  padding: 76px 0;
}

.statement-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: end;
  gap: 9%;
}

.statement h2 {
  font-size: clamp(2.4rem,5vw,5.1rem);
  line-height: 1.07;
  letter-spacing: -.06em;
  margin: 0;
}

.statement p {
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
}

.certifications {
  scroll-margin-top: 78px;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 15px;
}

.cert {
  min-height: 208px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  /* Mantiene títulos y descripciones alineados aunque tengan distinta longitud. */
  justify-content: flex-start;
  transition: .2s;
}

.cert:hover {
  transform: translateY(-4px);
  border-color: #95c5e2;
  box-shadow: 0 12px 30px #0c70bd11;
}

.cert-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.cert-top span:last-child {
  font-size: 20px;
}

.cert h3 {
  font-size: 25px;
  letter-spacing: -.05em;
  line-height: 1.12;
  margin: 22px 0 0;
}

.cert p {
  font-size: 14px;
  color: var(--muted);
  margin: 7px 0 0;
}

.cert-wide {
  background: #f2f8fc;
}

.path {
  background: #f9fbfc;
  scroll-margin-top: 78px;
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 17px;
}

.path-card {
  padding: 30px;
  border-top: 3px solid var(--blue);
  background: #fff;
  min-height: 230px;
}

.path-card small {
  color: var(--blue);
  font-weight: 900;
  letter-spacing: .13em;
}

.path-card h3 {
  font-size: 23px;
  letter-spacing: -.05em;
  line-height: 1.15;
  margin: 20px 0 11px;
}

.path-card p {
  margin: 0;
  color: #637078;
}

.contact {
  background: #192126;
  color: #fff;
  scroll-margin-top: 78px;
}

.contact .section-head h2 {
  font-size: clamp(3rem,7vw,6rem);
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}

.contact .section-head h2 span {
  color: #70b6e4;
}

.contact .section-head p {
  color: #b4c0c8;
}

.contact .pill {
  color: #a9d6f1;
  border-color: #557d96;
}

.contact-action {
  text-align: center;
}

.contact-action .btn-primary {
  background: #fff;
  color: #182126;
  border-color: #fff;
}

.contact-action .btn-primary:hover {
  background: #eaf4fb;
}

.links {
  display: flex;
  justify-content: center;
  gap: 35px;
  flex-wrap: wrap;
  margin-top: 38px;
}

.links a {
  color: #c7d2d8;
  font-size: 14px;
}

.footer {
  padding: 28px 0;
  background: #11191e;
  color: #afbdc6;
  font-size: 12px;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer a:hover {
  color: #fff;
}

/* Pie en segundo plano: el contenido se desplaza y descubre el contacto. */
.footer-reveal {
  background: #11191e;
}

body.footer-reveal-active {
  padding-bottom: var(--footer-reveal-height);
}

.footer-reveal-active main {
  position: relative;
  z-index: 1;
  background: #fff;
  box-shadow: 0 18px 38px #11191e22;
}

.footer-reveal-active .footer-reveal {
  position: fixed;
  inset: auto 0 0;
  z-index: 0;
}

/* En pantallas bajas el contacto mantiene el desplazamiento normal y accesible. */

.fade {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease,transform .55s ease;
}

.fade.show {
  opacity: 1;
  transform: none;
}

@media(max-width:900px) {
  .hero-grid {
    gap: 0;
  }

  .hero-art {
    height: 380px;
  }

  .hero h1 {
    font-size: clamp(3.4rem,7vw,5.5rem);
  }

  .hero-text {
    font-size: 18px;
  }

  .nav {
    gap: 15px;
  }

  .nav a {
    font-size: 11px;
  }

  .profile-grid {
    gap: 5%;
  }

}

@media(max-width:720px) {
  .container {
    width: min(100% - 32px,540px);
  }

  .header-inner {
    height: 66px;
  }

  .menu-button {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 18px 25px 25px;
    box-shadow: 0 12px 20px #20222612;
    flex-direction: column;
    align-items: stretch;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    font-size: 13px;
  }

  .nav-contact {
    text-align: center;
  }

  .hero {
    min-height: 0;
  }

  .hero-grid {
    display: flex;
    flex-direction: column-reverse;
    padding: 38px 0 67px;
    gap: 20px;
  }

  .hero-art {
    height: min(78vw,370px);
    width: min(78vw,370px);
    margin: auto;
  }

  .hero-side {
    display: none;
  }

  .hero h1 {
    font-size: clamp(3.35rem,11vw,5rem);
    margin: 18px 0;
  }

  .hero-text {
    font-size: 17px;
  }

  .section {
    padding: 75px 0;
  }

  .section-head {
    margin-bottom: 32px;
  }

  .tabs {
    display: flex;
    overflow-x: auto;
    border-radius: 20px;
    padding: 5px;
    margin-bottom: 33px;
  }

  .tab {
    min-width: 130px;
    font-size: 13px;
    padding: 13px 9px;
  }

  .profile-grid,.timeline,.skills-grid,.statement-grid,.cert-grid,.path-grid {
    grid-template-columns: 1fr;
  }

  .tab-panel {
    min-height: 0;
  }

  .fact-list {
    grid-template-columns: 1fr;
  }

  .fact-list div {
    padding: 10px 0;
  }

  .statement {
    padding: 60px 0;
  }

  .statement p {
    margin-top: 24px;
  }

  .cert {
    min-height: 155px;
  }

  .path-card {
    min-height: 0;
  }

  .footer .container {
    flex-direction: column;
    gap: 6px;
  }

}

@media(max-width:400px) {
  .hero h1 {
    font-size: 12vw;
  }

  .buttons {
    gap: 8px;
  }

  .btn {
    padding: 12px 16px;
    font-size: 12px;
  }

  .hero-text {
    font-size: 16px;
  }

}

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

  .fade {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,.cert {
    transition: none;
  }

  .orbit {
    animation: none;
  }

}

@media print {
  body.footer-reveal-active {
    padding-bottom: 0!important;
  }

  .header,.hero-art,.buttons,.tabs,.statement,.path,.contact,.footer {
    display: none!important;
  }

  .hero {
    min-height: 0;
  }

  .hero-grid {
    display: block;
    padding: 0;
  }

  .hero h1 {
    font-size: 36px;
    margin: 10px 0;
  }

  .hero-text {
    font-size: 12px;
    margin: 0;
  }

  .section {
    padding: 16px 0;
  }

  .section-head {
    text-align: left;
    margin: 0 0 12px;
  }

  .section-head h2 {
    font-size: 22px;
    margin: 5px 0;
  }

  .section-head p {
    display: none;
  }

  .tab-panel[hidden] {
    display: block;
  }

  .tab-panel {
    min-height: 0;
    margin-bottom: 16px;
  }

  .profile-grid,.timeline,.skills-grid,.cert-grid {
    gap: 8px;
  }

  .profile-grid p,.timeline-card p,.skill-card p {
    font-size: 10px;
  }

  .profile-grid h3,.timeline-card h3,.skill-card h3 {
    font-size: 14px;
  }

  .fact-list div {
    font-size: 10px;
    padding: 5px;
  }

  .timeline-card,.skill-card,.cert {
    padding: 10px;
    min-height: 0;
    break-inside: avoid;
  }

  .cert h3 {
    font-size: 15px;
    margin: 9px 0 0;
  }

  .cert p {
    font-size: 10px;
  }

  .cert-grid {
    grid-template-columns: repeat(3,1fr);
  }

  .resume-highlight {
    font-size: 10px;
    padding: 7px;
  }

  .fade {
    opacity: 1;
    transform: none;
  }

  @page {
    size: A4;
    margin: 13mm;
  }

}
