/* =====================================================================
   style.css  -  danielcastilla.es  -  Versión 1.0 (02-12-2026)
   Web estática: sin JavaScript, sin fuentes externas, sin cookies.
   Imágenes en assets/img/ (si faltan, se ve un degradado):
     hero.jpg      cabecera oscura de Inicio y Contacto
     sobremi.jpg   cabecera de «Sobre mí»
     portatil.jpg  foto de la portada
   ===================================================================== */
:root {
  --acento: #e5265f;
  --texto: #4b5563;
  --titulo: #1f2937;
  --suave: #6b7280;
  --linea: #e5e7eb;
  --fondo: #f6f7f9;
  --oscuro: #0b0d12;
  --ancho: 1100px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font: 17px/1.75 "Mulish", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--acento); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }

/* ---------- Cabecera y menú (sobre la imagen de cabecera) ---------- */
.cabecera {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  max-width: 1280px; margin: 0 auto; padding: 60px 32px 22px;
}
.logo { display: block; line-height: 0; }
.logo img { width: 88px; height: 88px; display: block; }
.cabecera nav { display: flex; flex-wrap: wrap; gap: 6px 34px; }
.cabecera nav a {
  color: #fff; text-transform: uppercase; font-size: 16px; font-weight: 500; letter-spacing: .01em;
  padding: 6px 0; border-bottom: 3px solid transparent;
}
.cabecera::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw;
  background: rgba(11, 13, 18, .98); box-shadow: 0 2px 18px rgba(0, 0, 0, .35);
  opacity: 0; transition: opacity .25s;
}
.cabecera { transition: padding .25s; }
.cabecera.fija { padding-top: 12px; padding-bottom: 12px; }
.cabecera.fija::before { opacity: 1; }
.cabecera .logo img { transition: width .25s, height .25s; }
.cabecera.fija .logo img { width: 52px; height: 52px; }
.cabecera nav a:hover { text-decoration: none; border-bottom-color: rgba(255, 255, 255, .5); }
.cabecera nav a[aria-current="page"] { border-bottom-color: var(--acento); }

/* ---------- Cabecera de página ---------- */
.hero {
  position: relative; display: flex; align-items: flex-end; justify-content: center; text-align: center;
  color: #fff; padding: 200px 24px 56px; min-height: 400px;
  background-color: var(--oscuro);
  background-image:
    linear-gradient(rgba(5, 6, 9, .10), rgba(5, 6, 9, .55)),
    url("/assets/img/hero.jpg"),
    radial-gradient(60% 70% at 50% 62%, rgba(222, 142, 40, .38), transparent 70%),
    linear-gradient(180deg, #0b0d12 0%, #16110b 100%);
  background-size: cover; background-position: center;
}
.hero h1 { margin: 0; font-size: clamp(34px, 6vw, 56px); line-height: 1.15; font-weight: 700; text-shadow: 0 2px 24px rgba(0, 0, 0, .5); }
.hero.grande { min-height: 640px; padding-bottom: 90px; }
.hero.grande h1 { font-size: clamp(44px, 9vw, 84px); letter-spacing: .01em; }
.hero.sobremi {
  background-image:
    linear-gradient(rgba(5, 6, 9, .10), rgba(5, 6, 9, .55)),
    url("/assets/img/sobremi.jpg"),
    radial-gradient(60% 70% at 50% 62%, rgba(150, 70, 190, .45), transparent 70%),
    linear-gradient(180deg, #0b0d12 0%, #1a1026 100%);
}

/* ---------- Contenido ---------- */
main { max-width: var(--ancho); margin: 0 auto; padding: 56px 24px 72px; }
.tarjeta {
  background: #fff; border-radius: 10px; box-shadow: 0 6px 30px rgba(17, 24, 39, .07);
  padding: 48px; margin-bottom: 40px;
}
.tarjeta p { margin: 0 0 1.1em; text-align: justify; hyphens: manual; }
.tarjeta p:last-child { margin-bottom: 0; }
.presentacion { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.foto {
  min-height: 420px; border-radius: 10px; box-shadow: 0 10px 30px rgba(17, 24, 39, .25);
  background-color: #1b1f3b;
  background-image: url("/assets/img/portatil.jpg"), linear-gradient(135deg, #14183a 0%, #7b2a6b 55%, #e5703a 100%);
  background-size: cover; background-position: center;
}
.aviso-practicas { text-align: center; }
.aviso-practicas h2 { margin: 0 0 8px; font-size: 26px; color: var(--titulo); }
.aviso-practicas p { text-align: center; max-width: 640px; margin: 0 auto 20px; }
.boton {
  display: inline-block; padding: 11px 26px; border-radius: 8px; background: var(--acento);
  color: #fff; font-weight: 700; font-size: 16px;
}
.boton:hover { background: #c81d50; text-decoration: none; }

.centro { text-align: center; padding: 24px 0; }
.centro p { text-align: center; font-size: 19px; margin-bottom: 18px; }
.correo { display: inline-block; font-size: clamp(24px, 5vw, 44px); font-weight: 300; color: var(--titulo); word-break: break-all; }
.correo:hover { color: var(--acento); text-decoration: none; }

.texto h2 { color: var(--titulo); font-size: 22px; margin: 1.6em 0 .5em; }
.texto h2:first-child { margin-top: 0; }
.texto ul { padding-left: 1.3em; }
.texto li { margin-bottom: .4em; }

/* ---------- Pie ---------- */
footer {
  background: #fff; border-top: 1px solid var(--linea); padding: 26px 24px; text-align: center;
  font-size: 14.5px; color: var(--suave);
}
footer a { color: var(--suave); text-decoration: underline; margin: 0 4px; }
footer a:hover { color: var(--acento); }

/* ---------- Pantallas pequeñas ---------- */
@media (max-width: 860px) {
  .cabecera { padding: 36px 18px 14px; justify-content: center; }
  .cabecera.fija { padding-top: 8px; padding-bottom: 8px; }
  .cabecera.fija .logo img { width: 40px; height: 40px; }
  .logo img { width: 64px; height: 64px; }
  .cabecera nav { justify-content: center; gap: 4px 20px; }
  .cabecera nav a { font-size: 14px; }
  .hero { padding-top: 220px; min-height: 340px; }
  .hero.grande { min-height: 520px; }
  .presentacion { grid-template-columns: 1fr; gap: 28px; }
  .foto { min-height: 260px; order: -1; }
  .tarjeta { padding: 28px 22px; }
  .tarjeta p { text-align: left; }
}
@media print {
  .cabecera, .hero { display: none; }
  body { background: #fff; }
}
