:root {
  color-scheme: light;

  --bg: #fff;
  --soft: #f5f7fb;
  --text: #111827;
  --muted: #64748b;

  --accent: #2563eb;
  --accent-readable: var(--accent);

  --border: #e4e8f0;
  --card: #fff;
  --header: rgba(255, 255, 255, 0.94);

  --contact-bg: var(--text);
  --contact-text: var(--bg);
  --contact-muted: #cbd5e1;
  --contact-accent: #93c5fd;
  --contact-border: #68788c;

  --portrait-start: #c2d7fb;
  --portrait-end: #4678d9;

  --shadow: 0 24px 65px rgba(20, 35, 75, 0.1);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0b1220;
  --soft: #111d30;
  --text: #ecf2fc;
  --muted: #a5b3c7;

  --accent-readable: #93c5fd;

  --border: #29364a;
  --card: #182338;
  --header: rgba(11, 18, 32, 0.94);

  --contact-muted: #475569;
  --contact-accent: #1d4ed8;

  --shadow: 0 24px 65px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.65 system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.container {
  max-width: 1180px;
  margin: auto;
  padding: 0 28px;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--accent);
  color: white;
  padding: 10px;
  z-index: 10;
}
.skip-link:focus {
  top: 10px;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--header);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-right: auto;
}
.brand span,
.accent {
  color: var(--accent-readable);
}
nav {
  display: flex;
  gap: 25px;
}
nav a {
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}
nav a:hover {
  color: var(--accent-readable);
}
.theme-toggle,
.menu-toggle {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 12px;
  width: 39px;
  height: 39px;
  color: var(--text);
  cursor: pointer;
}
.menu-toggle {
  display: none;
}
.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 65px;
  padding-top: 65px;
  padding-bottom: 90px;
}
.eyebrow {
  font-weight: 800;
  color: var(--accent-readable);
  font-size: 11px;
  letter-spacing: 2.4px;
  margin: 0 0 16px;
}
h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}
h1 {
  font-size: clamp(48px, 6.1vw, 78px);
  letter-spacing: -4px;
  line-height: 1.06;
  margin: 0 0 16px;
}
h2 {
  font-size: clamp(34px, 4vw, 49px);
  letter-spacing: -2px;
  line-height: 1.15;
  margin: 0;
}
h3 {
  font-size: 19px;
  line-height: 1.35;
  margin: 0;
}
.hero-role {
  font-size: 22px;
  font-weight: 750;
  margin: 0 0 18px;
}
.hero-intro {
  max-width: 520px;
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 30px;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 21px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 750;
  min-height: 48px;
}
.primary {
  background: var(--accent);
  color: #fff;
}
.primary:hover {
  filter: brightness(0.9);
}
.secondary {
  border: 1px solid var(--border);
  background: var(--card);
}
.secondary:hover {
  border-color: var(--accent-readable);
}
.location {
  font-size: 13px;
  color: var(--muted);
  margin-top: 26px;
}
.hero-art {
  position: relative;
  min-width: 0;
}
.portrait-placeholder {
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 28px 130px 28px 28px;
  background: linear-gradient(
    145deg,
    var(--portrait-start),
    var(--portrait-end)
  );
  box-shadow: var(--shadow);
}
.portrait-placeholder span {
  font-size: 115px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.7);
}
.portrait-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% center;
}
.floating-note {
  position: absolute;
  bottom: 28px;
  left: -40px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 18px 24px;
  border-radius: 14px;
  line-height: 1.4;
  box-shadow: var(--shadow);
  font-size: 13px;
}
.floating-note strong {
  font-size: 16px;
}
.section {
  padding: 102px 0;
}
.section-soft {
  background: var(--soft);
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 60px;
}
.lead {
  font-size: 21px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 28px;
  margin-bottom: 38px;
}
.section-head > p {
  max-width: 280px;
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.timeline {
  display: grid;
  gap: 0;
}
.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--border);
}
.timeline-item:last-child {
  border-bottom: 1px solid var(--border);
}
.period,
.meta {
  color: var(--muted);
  font-size: 13px;
}
.timeline-item p {
  color: var(--muted);
  margin: 7px 0 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.cards.projects {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  min-width: 0;
}
.card small {
  display: block;
  color: var(--accent-readable);
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 19px;
}
.card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 0;
}
.card a {
  color: var(--accent-readable);
  font-weight: 750;
  font-size: 13px;
  display: inline-block;
  margin-top: 14px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.chip {
  padding: 11px 17px;
  border-radius: 40px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 14px;
  font-weight: 650;
}
.contact-section {
  background: var(--contact-bg);
  color: var(--contact-text);
}
.contact-section .eyebrow,
.contact-section .accent {
  color: var(--contact-accent);
}
.contact-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
}
.contact-wrap p:not(.eyebrow) {
  color: var(--contact-muted);
  max-width: 500px;
}
.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 220px;
}
.contact-actions a {
  padding: 13px 18px;
  border: 1px solid var(--contact-border);
  border-radius: 9px;
  font-weight: 700;
  font-size: 14px;
}
.contact-actions a:hover {
  background: var(--accent);
  border-color: var(--accent-readable);
  color: white;
}
.site-footer {
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-size: 12px;
}
.error-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #b91c1c;
  color: #fff;
  padding: 16px;
  text-align: center;
  z-index: 9;
}
[hidden] {
  display: none !important;
}
@media (max-width: 900px) {
  .hero {
    gap: 30px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .portrait-placeholder {
    height: 380px;
  }
  .floating-note {
    left: -12px;
  }
  nav {
    gap: 12px;
  }
  nav a {
    font-size: 12px;
  }
}
@media (max-width: 680px) {
  .container {
    padding: 0 20px;
  }
  .nav-wrap {
    height: 66px;
  }
  .menu-toggle {
    display: block;
    order: 2;
  }
  .theme-toggle {
    order: 1;
  }
  nav {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    padding: 18px 22px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 18px;
  }
  nav.open {
    display: flex;
  }
  nav a {
    font-size: 15px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 64px;
    padding-bottom: 70px;
    gap: 35px;
    min-height: 0;
  }
  h1 {
    letter-spacing: -2.8px;
  }
  .hero-intro {
    font-size: 16px;
  }
  .hero-art {
    max-width: 440px;
    width: 100%;
    margin: auto;
  }
  .portrait-placeholder {
    height: 335px;
    border-top-right-radius: 90px;
  }
  .floating-note {
    left: 10px;
    bottom: 15px;
  }
  .section {
    padding: 70px 0;
  }
  .two-col {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .lead {
    font-size: 17px;
  }
  .section-head {
    display: block;
  }
  .section-head > p {
    margin-top: 15px;
  }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .cards,
  .cards.projects {
    grid-template-columns: 1fr;
  }
  .contact-wrap {
    display: block;
  }
  .contact-actions {
    margin-top: 30px;
  }
  .footer-inner {
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
/* Portfolio: tarjetas con imagen */

.project-card {
  overflow: hidden;
  padding: 0 0 26px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.project-card:not(:has(.project-image)) {
  padding-top: 26px;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.project-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-bottom: 24px;
}

.project-card > small,
.project-card > h3,
.project-card > p,
.project-card > a {
  margin-left: 26px;
  margin-right: 26px;
}

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

  .project-card:hover {
    transform: none;
  }
}
/* Fotografía profesional */

.portrait-placeholder {
  position: relative;
}

.portrait-placeholder img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

@media (max-width: 680px) {
  .portrait-placeholder {
    height: 340px;
  }
}

/* Accesibilidad: contraste del foco en contacto */
.contact-section a:focus-visible {
  outline-color: var(--contact-accent);
} /* Aviso y créditos comerciales */

.footer-demo {
  text-align: center;
  padding-top: 8px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.footer-demo p {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px;
}

.footer-demo a {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-readable);
}

.footer-demo a:hover {
  text-decoration: underline;
}
/* Servicios profesionales */

.service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.service-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--soft);
  color: var(--accent-readable);
  flex-shrink: 0;
}

.service-icon {
  display: block;
  width: 28px;
  height: 28px;
}

.service-card h3 {
  margin: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.service-card p {
  margin: 0;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

@media (hover: hover) and (pointer: fine) {
  .service-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-readable);
    box-shadow: var(--shadow);
  }
}

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

  .service-card:hover {
    transform: none;
  }
}
