/* ============================================
   ZARROCA — Estilos globales
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,700;1,9..40,300&family=Rubik:wght@300;400;500&display=swap');

/* --- Variables --- */
:root {
  --rojo: #cd5655;
  --negro: #1a1a1a;
  --gris: #545454;
  --gris-claro: #b1b1af;
  --blanco: #ffffff;
  --fondo: #ffffff;

  --fuente-logo: 'DM Sans', sans-serif;
  --fuente-cuerpo: 'Rubik', sans-serif;

  --tamaño-logo: 1.1rem;
  --tamaño-nav: 15px;
  --tamaño-titulo-proyecto: 15px;
  --tamaño-meta: 15px;
  --tamaño-cuerpo: 0.9rem;
  --tamaño-titulo-grande: clamp(1.8rem, 4vw, 3rem);

  --espaciado-header: 1.5rem 2rem;
  --transicion: 0.2s ease;
}

/* --- Reset base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--fuente-cuerpo);
  font-weight: 300;
  color: #545454;
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--blanco);
}

.site-header__inner {
  display: flex;
  width: calc(100% - 50px);
  margin: 0 auto;
  padding-top: 18px;
  align-items: flex-start;
}

.site-header__logo-wrap {
  width: 50%;
  line-height: 45px;
}

.site-header__logo-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: #cd5655;
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 45px;
  display: inline-block;
}

.site-header__nav {
  width: 50%;
  display: block;
}

.site-header__bola {
  height: 30px;
  float: right;
  margin-top: 7.5px;
}

/* Links de navegación — igual que el original */
.nav {
  text-decoration: none;
  color: #545454;
  font-weight: 400;
  font-size: 15px;
  float: left;
  text-align: left;
  line-height: 45px;
  margin-right: 120px;
}

.nav-mobile {
  text-decoration: none;
  color: #545454;
  font-weight: 400;
  font-size: 15px;
  display: block;
  margin-bottom: 1rem;
}

/* Espaciado para el contenido debajo del header fijo */
.page-content {
  padding-top: 5rem;
}

/* Menú móvil */
.mobile-menu-btn {
  position: fixed;
  top: 35px;
  right: 20px;
  width: 20px;
  cursor: pointer;
  display: none;
}

.mobile-menu {
  width: 100%;
  background: var(--blanco);
  padding: 1rem 25px;
}

@media screen and (max-width: 600px) {
  #shortcuts {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
}

/* ============================================
   ANIMACIÓN REVEAL (proyectos subiendo al entrar)
   ============================================ */
@keyframes reveal {
  0% {
    opacity: 0;
    transform: translateY(100%);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  animation: reveal 0.5s ease-out forwards;
}

/* ============================================
   HOVER CON SUBRAYADO ANIMADO (.a-span)
   — conservado exactamente del original —
   ============================================ */
.project-a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.project-a:hover .a-span {
  color: var(--rojo) !important;
}

.project-a .a-span {
  position: relative;
  display: inline-block;
  line-height: 1.35em;
}

.project-a .a-span::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(1.35em - 2px),
    currentColor calc(1.35em - 2px),
    currentColor 1.35em
  );
  background-size: 100% 1.35em;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 320ms cubic-bezier(.2,.8,.2,1);
}

.project-a:hover .a-span::after,
.project-a:focus-within .a-span::after {
  transform: scaleX(1);
}

/* ============================================
   TARJETA DE PROYECTO (usada en portafolio y archivo)
   ============================================ */
.proyecto-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.proyecto-card__meta {
  margin-bottom: 0.6rem;
}

.proyecto-card__nombre {
  font-family: var(--fuente-cuerpo);
  font-size: var(--tamaño-titulo-proyecto);
  font-weight: 400;
  color: var(--gris);
  display: block;
  transition: color var(--transicion);
  text-decoration: none;
}

.proyecto-card__tipo,
.proyecto-card__año {
  font-size: var(--tamaño-meta);
  color: var(--gris);
  font-weight: 400;
  display: block;
  line-height: 1.35;
}

.proyecto-card:hover .proyecto-card__nombre {
  color: var(--rojo);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.proyecto-card__imagen {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

/* ============================================
   UTILIDADES
   ============================================ */
.u-rojo { color: var(--rojo); }
.u-gris { color: var(--gris); }
.u-mayus { text-transform: uppercase; letter-spacing: 0.05em; }

/* Respeta preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
