/* Daniel Pérez — Portafolio (edición premium) */
:root {
  --bg: #07090d;
  --bg2: #0c1018;
  --elev: #111822;
  --surface: #161d28;
  --text: #eef2f8;
  --muted: #8f9bb3;
  --accent: #4ae8d6;
  --accent2: #c9a227;
  --accent-soft: rgba(74, 232, 214, 0.14);
  --border: rgba(255, 255, 255, 0.07);
  --radius: 16px;
  --font-sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --shadow-lg: 0 28px 90px rgba(0, 0, 0, 0.55);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

body.nav-open .site-header {
  z-index: 250;
}

a {
  color: var(--accent);
}

a:hover {
  text-decoration: underline;
}

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

strong {
  font-weight: 600;
  color: var(--text);
}

.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #041018;
  font-weight: 700;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.wrap {
  width: min(1140px, 92vw);
  margin-inline: auto;
}

/* Textura sutil */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.35s var(--ease-out), border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(7, 9, 13, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  font-style: italic;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  color: var(--text);
}

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

.nav--desktop {
  display: flex;
  gap: 1.65rem;
  align-items: center;
}

.nav--desktop a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
}

.nav--desktop a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav--desktop a.is-active {
  color: var(--text);
}

.nav--desktop a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.9;
}

.nav-cta {
  padding: 0.45rem 1rem !important;
  border-radius: 999px;
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  border: 1px solid rgba(74, 232, 214, 0.35);
}

.nav-cta:hover {
  background: rgba(74, 232, 214, 0.2) !important;
}

.nav-cta.is-active::after {
  display: none;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(17, 24, 34, 0.85);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  transition: background 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover {
  border-color: rgba(74, 232, 214, 0.35);
  background: rgba(74, 232, 214, 0.08);
}

.nav-toggle[aria-expanded="true"] {
  border-color: rgba(74, 232, 214, 0.45);
  background: rgba(74, 232, 214, 0.12);
}

.nav-toggle-bar {
  display: block;
  width: 21px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.32s var(--ease-out), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Mobile: pantalla completa + panel lateral */
.nav-panel {
  display: none;
}

.nav-backdrop {
  display: none;
}

.nav-sheet {
  display: none;
}

@media (max-width: 880px) {
  .nav--desktop {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-panel {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 200;
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.28s var(--ease-out), visibility 0.28s;
  }

  .nav-panel.is-open {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
  }

  .nav-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: rgba(2, 5, 10, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 0;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-sheet {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    width: min(320px, 92vw);
    max-width: 100%;
    height: 100%;
    background: linear-gradient(165deg, #12171f 0%, #0a0d12 55%, #07090d 100%);
    border-left: 1px solid var(--border);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.55);
    transform: translateX(100%);
    transition: transform 0.38s var(--ease-out);
  }

  .nav-panel.is-open .nav-sheet {
    transform: translateX(0);
  }

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

    .nav-panel {
      transition: none;
    }
  }

  .nav-sheet-head {
    flex-shrink: 0;
    padding: 1.35rem 1.35rem 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-sheet-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    font-style: italic;
    letter-spacing: -0.02em;
    color: var(--text);
  }

  .nav-panel-inner {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem 1rem 1.5rem;
    flex: 1;
  }

  .nav-panel-inner a {
    display: flex;
    align-items: center;
    color: var(--text);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.95rem 1rem;
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
  }

  .nav-panel-inner a:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
    box-shadow: none;
  }

  .nav-panel-inner a.is-active {
    color: var(--accent);
    background: rgba(74, 232, 214, 0.08);
    border-color: rgba(74, 232, 214, 0.25);
  }

  .nav-sheet-cta {
    margin-top: auto;
    justify-content: center;
    background: var(--accent-soft) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(74, 232, 214, 0.35) !important;
  }

  .nav-sheet-cta:hover {
    background: rgba(74, 232, 214, 0.18) !important;
  }
}

@media (min-width: 881px) {
  .nav-panel {
    display: none !important;
  }
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(2.5rem, 7vw, 4.5rem) 0 clamp(3.5rem, 9vw, 5.5rem);
  overflow: clip;
}

.hero-aurora {
  position: absolute;
  inset: -20% -10% auto;
  height: min(70vh, 620px);
  background:
    radial-gradient(ellipse 55% 45% at 75% 15%, rgba(74, 232, 214, 0.16), transparent 55%),
    radial-gradient(ellipse 40% 35% at 15% 45%, rgba(201, 162, 39, 0.09), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(88, 120, 255, 0.07), transparent 55%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy {
    order: 1;
  }

  .hero-visual {
    order: 0;
    max-width: 340px;
    margin-inline: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-lead,
  .hero-sublead,
  .hero-bridge,
  .hero-cta-hint {
    margin-inline: auto;
  }
}

.hero-line {
  display: block;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.hero-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(2.6rem, 7vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--text) 0%, #b8c4d9 45%, var(--accent) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 38ch;
  margin: 0 0 0.65rem;
}

.hero-sublead {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 42ch;
  margin: 0 0 1rem;
}

.hero-sublead strong {
  color: var(--text);
  font-weight: 600;
}

.hero-bridge {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 0.5rem;
}

.hero-bridge strong {
  color: var(--text);
  font-weight: 600;
}

.hero-cta-hint {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent2);
  margin: 0 0 0.75rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn-hero-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.45rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(74, 232, 214, 0.45);
  transition: transform 0.2s var(--ease-out), background 0.2s, border-color 0.2s;
}

.btn-hero-line:hover {
  text-decoration: none;
  background: rgba(74, 232, 214, 0.1);
  border-color: rgba(74, 232, 214, 0.65);
  transform: translateY(-1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.45rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ease-out), box-shadow 0.25s, border-color 0.2s, background 0.2s;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #4ae8d6 0%, #2fc4b5 55%, #1fa89c 100%);
  color: #031016;
  box-shadow: 0 12px 40px rgba(74, 232, 214, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(74, 232, 214, 0.38);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.hero-visual {
  position: relative;
  justify-self: end;
}

.hero-frame {
  position: relative;
  border-radius: 28px;
  padding: 1px;
  background: linear-gradient(
    145deg,
    rgba(74, 232, 214, 0.55),
    rgba(255, 255, 255, 0.08) 42%,
    rgba(201, 162, 39, 0.35)
  );
  box-shadow: var(--shadow-lg);
}

.hero-frame-inner {
  border-radius: 27px;
  overflow: hidden;
  background: var(--elev);
  aspect-ratio: 3 / 4;
}

.hero-frame-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.hero-float {
  position: absolute;
  bottom: 0.75rem;
  left: -0.25rem;
  right: 1rem;
  padding: 0.85rem 1.1rem;
  background: rgba(17, 24, 34, 0.92);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

@media (max-width: 960px) {
  .hero-float {
    left: 0.5rem;
    right: 0.5rem;
  }
}

.hero-float strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.hero-float-sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
}

/* Secciones genéricas */
.section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  position: relative;
}

.section-head {
  margin-bottom: 2rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.15;
}

.project-block + .project-block {
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
  padding-top: clamp(2rem, 4vw, 2.85rem);
  border-top: 1px solid var(--border);
}

.project-block-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.project-block-lead {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 62ch;
  line-height: 1.55;
}

.projects-bento--productos {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.project-links--row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.15rem;
  align-items: center;
}

/* Proyectos bento */
.proyectos {
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(74, 232, 214, 0.06), transparent 55%),
    var(--bg);
}

.projects-bento {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .projects-bento {
    grid-template-columns: 1fr;
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--elev);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color 0.35s, box-shadow 0.35s, transform 0.35s var(--ease-out);
}

.project-card:hover {
  border-color: rgba(74, 232, 214, 0.22);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  transform: translateY(-4px);
}

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

.project-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
}

@media (max-width: 900px) {
  .project-card--featured {
    flex-direction: column;
  }
}

.project-card--featured .project-thumb {
  flex: 1.1;
  aspect-ratio: auto;
  min-height: 260px;
}

.project-card--featured .project-body {
  flex: 0.9;
  justify-content: center;
  padding: 1.75rem 1.75rem 2rem;
}

.project-card--featured .project-more {
  order: 3;
  width: 100%;
  flex-basis: 100%;
}

.project-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface);
  overflow: hidden;
  display: block;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s var(--ease-out);
}

.project-card:hover .project-thumb img {
  transform: scale(1.04);
}

.project-thumb-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, 0.07) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.9s var(--ease-out);
  pointer-events: none;
}

.project-card:hover .project-thumb-shine {
  transform: translateX(100%);
}

.project-meta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent2);
}

.project-body {
  padding: 1.35rem 1.4rem 1.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.project-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: 1.35rem;
  margin: 0;
}

.project-body p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--muted);
  flex: 1;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.stack span {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid var(--border);
}

.project-links {
  margin-top: 0.35rem;
}

.project-links a {
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent);
}

.project-links a:hover {
  text-decoration: underline;
}

.project-more {
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
}

.project-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.35rem;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  transition: background 0.2s;
}

.project-more summary::-webkit-details-marker {
  display: none;
}

.project-more summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease-out);
  flex-shrink: 0;
}

.project-more[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}

.project-more summary:hover {
  background: rgba(74, 232, 214, 0.06);
}

.project-detail-prose {
  padding: 0 1.35rem 1.35rem;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--muted);
  max-height: min(70vh, 520px);
  overflow-y: auto;
  border-top: 1px solid var(--border);
}

.project-detail-prose > *:first-child {
  margin-top: 1rem;
}

.project-detail-prose h4 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin: 1.15rem 0 0.45rem;
}

.project-detail-prose h4:first-child {
  margin-top: 0;
}

.project-detail-prose p {
  margin: 0 0 0.65rem;
}

.project-detail-prose ul {
  margin: 0 0 0.75rem;
  padding-left: 1.15rem;
}

.project-detail-prose li {
  margin-bottom: 0.35rem;
}

.project-detail-prose .detail-note {
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(201, 162, 39, 0.08);
  font-size: 0.82rem;
  color: var(--muted);
}

.project-detail-prose .detail-note strong {
  color: var(--accent2);
}

.project-detail-prose code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.82em;
  padding: 0.12em 0.35em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.project-code-sample {
  margin: 0.5rem 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.78rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.project-code-sample code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: inherit;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #7ee8dc;
}

/* Contacto */
.contacto {
  padding-bottom: clamp(4rem, 10vw, 6rem);
}

.contact-shell {
  position: relative;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(130deg, rgba(74, 232, 214, 0.45), rgba(201, 162, 39, 0.25), rgba(88, 120, 255, 0.2));
  overflow: hidden;
}

.contact-glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 30% 30%, rgba(74, 232, 214, 0.2), transparent 45%);
  pointer-events: none;
}

.contact-inner {
  position: relative;
  padding: clamp(2rem, 5vw, 3rem);
  background: radial-gradient(ellipse 100% 80% at 50% 0%, rgba(74, 232, 214, 0.08), var(--elev));
  border-radius: 23px;
  text-align: center;
}

.contact-inner h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  margin: 0 0 1.25rem;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* Footer */
.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr auto;
  align-items: start;
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-nav {
    justify-content: center;
  }
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-copy {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

/* Reveal on scroll (solo con JS: sin JS el contenido es visible) */
.reveal {
  opacity: 1;
  transform: none;
}

html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.75s var(--ease-out);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Focus visible */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.nav-toggle:focus-visible {
  outline-offset: 2px;
}
