/* ==================================================
RESET + BASE GLOBAL
================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: #ffffff;
  color: #000;
  line-height: 1.6;
  font-size: 1.15rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #59a3d4;
  text-decoration: underline;
}

/* ==================================================
NAVIGATION (GLOBAL)
================================================== */

nav#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  z-index: 100;
  padding: 1rem 2rem;
  border-bottom: 1px solid #ccc;
}

nav#nav ul {
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
}

nav#nav .logo a {
  font-size: 1.3rem;
  font-weight: 700;
  color: #000;
  text-decoration: none;
}

nav#nav .menu {
  display: flex;
  gap: 2.5rem;
  font-size: 1.2rem;
}

nav#nav .menu a {
  color: #000;
  text-decoration: none;
  font-weight: 600;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid transparent;
  transition: 0.2s ease;
}

nav#nav .menu a:hover {
  color: #F5277D;
  transform: scale(1.05);
  border-bottom: 2px solid #F5277D;
}

/* ==================================================
LAYOUT GENERAL (GLOBAL)
================================================== */

#top {
  display: flex;
  gap: 4rem;
  margin: 3rem 10rem;
  flex-wrap: wrap;
}

.profile {
  position: fixed;
  top: 10rem;
  left: 6rem;
  width: 270px;
  text-align: left;
  z-index: 10;
}

.profile img {
  width: 210px;
  height: 210px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.text {
  flex: 1;
  min-width: 300px;
  max-width: 900px;
  margin-left: 260px;
  text-align: justify;
}

/* Tipografía global */

.text h1 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #000;
  padding-bottom: 0.3rem;
}

.text h2,
.text h3 {
  font-size: 1.4rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #000;
  padding-bottom: 0.2rem;
}

.text p {
  margin-bottom: 1.2rem;
}

/* ==================================================
COMPONENT: GALLERY
================================================== */

.gallery {
  margin-top: 3rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.gallery-grid figure {
  background: #f9f9f9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.gallery-grid figure:hover {
  transform: translateY(-4px);
}

.gallery-grid img {
  height: 220px;
  object-fit: cover;
}

.gallery-grid figcaption {
  padding: 0.8rem;
  font-size: 0.95rem;
  text-align: center;
  color: #444;
}

/* ==================================================
PAGE MODIFIERS (solo cuando algo cambia)
================================================== */

/* CV Page */

.cv-page .cv-frame {
  width: 100%;
  aspect-ratio: 8.5 / 11;
  min-height: 800px;
  border: 1px solid #ccc;
  margin-top: 1.5rem;
}

/* Gallery Page (si quieres imágenes más grandes solo aquí) */

.gallery-page .gallery-grid img {
  height: 260px;
}

/* Projects Page (ejemplo de modificación futura) */

.projects-page .text h1 {
  border-bottom: 2px solid #333;
}

/* Publications Page (ejemplo) */

.publications-page .text h1 {
  letter-spacing: 0.5px;
}

/* ==================================================
 RESPONSIVE
================================================== */

@media (max-width: 700px) {
  #top {
    flex-direction: column;
    margin: 2rem;
  }

  .profile {
    position: static;
    width: 100%;
    margin-bottom: 2rem;
  }

  .text {
    margin-left: 0;
  }
}
