/* ============================================= */
/* VARIABLES – COLOR, TIPO Y ESPACIADO           */
/* ============================================= */
:root {
  --color-white: #f7f7f7;
  --color-black: #333333;
  --color-gray-light: #e9e9e9;

  --font-family-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;

  --font-hero: clamp(5rem, 12vw, 14rem);
  --font-display: clamp(2.5rem, 6vw, 5rem);
  --font-title: clamp(1.5rem, 3vw, 2.5rem);
  --font-body: clamp(1.125rem, 2vw, 1.5rem);
  --font-small: clamp(0.875rem, 1vw, 1rem);

  --line-height-hero: 1.05;
  --line-height-display: 1.2;
  --line-height-title: 1.3;
  --line-height-body: 1.6;
  --line-height-small: 1.4;

  --font-weight-light: 300;
  --font-weight-medium: 450;
  --font-weight-semibold: 600;

  --space-xs: clamp(0.5rem, 1vw, 1rem);
  --space-s: clamp(1rem, 2vw, 1.5rem);
  --space-m: clamp(1.5rem, 4vw, 3rem);
  --space-l: clamp(3rem, 6vw, 6rem);
  --space-xl: clamp(6rem, 12vw, 9rem);

  --height-nav: 3rem;
  --height-button: 2.5rem;

  --border-standard: 1px solid var(--color-black);
}

/* ============================================= */
/* RESET Y BASE                                  */
/* ============================================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family-sans);
  font-size: var(--font-body);
  line-height: var(--line-height-body);
  font-weight: var(--font-weight-light);
  background-color: var(--color-white);
  color: var(--color-black);
}

.container {
  width: 100%;
  padding-inline: var(--space-m);
  margin-inline: auto;
}

/* ============================================= */
/* MENÚ                                           */
/* ============================================= */
.menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: var(--space-m);
  padding-block: var(--space-s);
  background: transparent;
  pointer-events: none;
  gap: var(--space-m);
  font-size: var(--font-small);
  font-weight: var(--font-weight-light);
}

.menu * {
  pointer-events: auto;
}

.menu-left,
.menu-center,
.menu-right {
  display: flex;
  align-items: center;
  height: var(--height-nav);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  border: var(--border-standard);
}

.menu-home-button {
  all: unset;
  display: flex;
  align-items: center;
  height: 100%;
  padding-inline: var(--space-s);
  cursor: pointer;
  font-size: var(--font-small);
  font-weight: var(--font-weight-light);
  color: var(--color-black);
  transition: background 0.2s ease, color 0.2s ease;
}

.menu-home-button:hover {
  background: var(--color-black);
  color: var(--color-white);
}

.menu-button-group {
  display: flex;
  height: 100%;
  overflow: hidden;
}

.menu-button {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding-inline: var(--space-s);
  font-size: var(--font-small);
  font-weight: var(--font-weight-light);
  color: var(--color-black);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  border-right: var(--border-standard);
}

.menu-button:last-child {
  border-right: none;
}

.menu-button:hover {
  background: var(--color-black);
  color: var(--color-white);
}

.menu-clock-group {
  display: flex;
  height: 100%;
}

.menu-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-width: var(--space-s);
  padding-inline: var(--space-xs);
  font-size: var(--font-small);
  font-weight: var(--font-weight-light);
  color: var(--color-black);
  white-space: nowrap;
  border-right: var(--border-standard);
  font-variant-numeric: tabular-nums;
}

.menu-clock:last-child {
  border-right: none;
}

/* ============================================= */
/* INTRODUCCIÓN                                   */
/* ============================================= */
.intro {
  background: var(--color-gray-light);
  color: var(--color-black);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: var(--space-m);
}

.intro .container {
  text-align: left;
}

.intro h1 {
  font-size: var(--font-hero);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-hero);
  margin-bottom: var(--space-s);
}

.intro p {
  font-size: var(--font-body);
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-body);
  max-width: 60ch;
}

/* ============================================= */
/* WORK: CINTILLO, CATEGORÍAS Y PROYECTOS         */
/* ============================================= */
.work-banner {
  width: 100%;
  overflow: hidden;
  border-top: var(--border-standard);
  border-bottom: var(--border-standard);
}

.work-banner-inner {
  display: flex;
  width: fit-content;
  animation: scrollBanner 20s linear infinite;
}

.work-banner-track {
  display: flex;
  white-space: nowrap;
  width: max-content;
}

.work-banner-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs);
}

.work-word {
  font-size: var(--font-display);
  font-weight: var(--font-weight-light);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
}

.work-message {
  font-size: var(--font-small);
  line-height: var(--line-height-small);
  font-weight: var(--font-weight-light);
  max-width: 24ch;
}

@keyframes scrollBanner {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.work-categories {
  width: 100%;
  border-bottom: var(--border-standard);
  background: var(--color-white);
  display: flex;
}

.work-categories-buttons {
  display: flex;
  flex: 1;
  height: var(--height-button);
}

.category-button {
  all: unset;
  flex: 1;
  cursor: pointer;
  font-size: var(--font-small);
  color: var(--color-black);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border-right: var(--border-standard);
  transition: background 0.2s ease, color 0.2s ease;
}

.category-button:last-child {
  border-right: none;
}

.category-button:hover,
.category-button.active {
  background: var(--color-black);
  color: var(--color-white);
}

/* ============================================= */
/* PROYECTOS Y TARJETAS                          */
/* ============================================= */

.projects-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-block: var(--space-m);
}

.projects-group {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 100%;
}

.projects-group.hidden {
  display: none !important;
}

/* ===== GRID ASIMÉTRICO (BRANDING + TYPE DESIGN) DESKTOP ===== */
.projects-grid-asym {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-s);
  width: 100%;
  max-width: 100%;
  height: 600px; /* 🔥 Ajustado a 600px */
  box-sizing: border-box;
}

.projects-grid-asym > * {
  min-width: 0;
}

.project-card.tall {
  width: 100%;
  height: 600px; /* 🔥 Ajustado a 600px */
  aspect-ratio: 4 / 3;
}

.project-column {
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  gap: var(--space-s);
  height: 600px; /* 🔥 Ajustado a 600px */
}

.project-card.right {
  flex: 1;
  aspect-ratio: 4 / 3;
  min-height: 0;
  overflow: hidden;
  transition: flex 0.3s ease, opacity 0.3s ease;
}

/* Hover 80/20 activo solo en desktop */
.project-card.right.expanded {
  flex: 2;
}

.project-card.right.minimized {
  flex: 0.5;
}

/* ===== GRID SIMÉTRICO (UI/UX DESIGN) ===== */
/* ===== GRID ASIMÉTRICO (BRANDING + TYPE DESIGN) DESKTOP ===== */
.projects-grid-asym {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-s);
  width: 100%;
  max-width: 100%;
  height: 500px; /* 🔥 Ajustado a 500px */
  box-sizing: border-box;
}

.projects-grid-asym > * {
  min-width: 0;
}

.project-card.tall {
  width: 100%;
  height: 500px; /* 🔥 Ajustado a 500px */
  aspect-ratio: 4 / 3;
}

.project-column {
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  gap: var(--space-s);
  height: 500px; /* 🔥 Ajustado a 500px */
}

.project-card.right {
  flex: 1;
  aspect-ratio: 4 / 3;
  min-height: 0;
  overflow: hidden;
  transition: flex 0.3s ease, opacity 0.3s ease;
}

/* Hover 80/20 activo solo en desktop */
.project-card.right.expanded {
  flex: 2;
}

.project-card.right.minimized {
  flex: 0.5;
}

/* ===== GRID SIMÉTRICO (UI/UX DESIGN) DESKTOP ===== */
.projects-grid-uiux {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-s);
  width: 100%;
  max-width: 100%;
  height: 500px; /* 🔥 Ajustado a 500px */
  box-sizing: border-box;
  align-items: stretch; /* 🔥 Estirar tarjetas */
}

.projects-grid-uiux .project-card {
  width: 100%;
  height: 100%; /* 🔥 Llenar espacio */
  aspect-ratio: unset; /* 🔥 Eliminar restricción */
  min-height: 0;
}

/* ===== ESTILO DE TARJETAS ===== */
.project-card {
  background-color: var(--color-gray-light);
  border: var(--border-standard);
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
}

.project-thumb {
  width: 100%;
  height: 100%;
  flex: 1;
  display: block;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  aspect-ratio: 4 / 3;
}

.project-title-overlay {
  font-size: var(--font-body);
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-body);
  color: var(--color-black);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  padding: var(--space-xs);
  width: 100%;
  box-sizing: border-box;
  position: absolute;
  bottom: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.project-card:hover .project-title-overlay {
  opacity: 1;
}

/* ============================================= */
/* SECCIÓN – CONTACTO                             */
/* ============================================= */

.contact-section {
  background: var(--color-gray-light);
  border-top: var(--border-standard);
  border-bottom: var(--border-standard);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--space-m);
  padding-block: var(--space-l);
  min-height: 25svh;
  height: auto;
}

.contact-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-s);
  width: 100%;
  max-width: 60ch;
  text-align: center;
  padding-inline: var(--space-l);
}

.contact-heading {
  font-size: var(--font-hero);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-hero);
  margin: 0;
}

/* Botonera */
.contact-buttons {
  display: flex;
  border: var(--border-standard);
  background: var(--color-white);
  width: 100%;
  height: var(--height-button);
}

.contact-button {
  all: unset;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding-inline: calc(var(--space-xs) * 0.5);
  font-size: var(--font-small);
  font-weight: var(--font-weight-light);
  color: var(--color-black);
  border-right: var(--border-standard);
}

.contact-button:last-child {
  border-right: none;
}

.contact-button:hover {
  background: var(--color-black);
  color: var(--color-white);
}

.contact-button a {
  all: unset;
  cursor: pointer;
}

/* Sticker de LinkedIn */
.sticker-linkedin {
  position: absolute;
  width: var(--space-l);
  height: var(--space-l);
  border-radius: 50%;
  background: #0A66C2; /* ✅ Azul LinkedIn oficial */
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xs);
  left: calc(75% + var(--space-m));
  top: 0;
  transform: rotate(15deg);
  transition: none;
  text-decoration: none;
  font-size: var(--font-small);
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
}

/* === Control de visibilidad de texto/icono === */
.linkedin-text {
  display: block; /* ✅ Mostrar texto por default */
}

.linkedin-icon {
  display: none; /* ✅ Ocultar ícono por default */
  font-weight: bold;
  font-size: 1.25rem;
}

/* ============================================= */
/* SECCIÓN – ABOUT ME                            */
/* ============================================= */
.about-section {
  background: var(--color-white);
  color: var(--color-black);
  min-height: 80svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: var(--space-m);
}

.about-inner {
  display: grid;
  grid-template-columns: 0.35fr 1fr 1fr;
  column-gap: calc(var(--space-s) * 1.5);
  row-gap: var(--space-l);
  width: 100%;
  max-width: 100%;
  align-items: start;
}

.about-col-title {
  font-weight: var(--font-weight-medium);
}

.about-col p {
  font-size: var(--font-body);
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-body);
  margin: 0;
}

.hover-word {
  text-decoration: underline;
  cursor: pointer;
  position: relative;
}

.colorful-link {
  text-decoration: none;
}

.colorful-link .word-1 {
  color: #e8921f;
}

.colorful-link .word-2 {
  color: #7be06f;
}

.colorful-link .word-3 {
  color: #7fc7f4;
}

.about-hover-image {
  display: none;
  position: fixed;
  width: calc(var(--space-xl) * 2);
  background: var(--color-white);
  border: var(--border-standard);
  z-index: 999;
  pointer-events: none;
  overflow: hidden;
  flex-direction: column;
}

.about-hover-image.active {
  display: flex;
}

.about-hover-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  margin: 0;
  padding: 0;
}

.about-hover-image .caption {
  background: var(--color-white);
  color: var(--color-black);
  font-size: var(--font-small);
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-small);
  padding: var(--space-xs);
  text-align: center;
  border-top: var(--border-standard);
  box-shadow: none !important;
  margin: 0;
}

/* ============================================= */
/* SECCIÓN – FOOTER                              */
/* ============================================= */
.site-footer {
  width: 100%;
  background: var(--color-black);
  color: var(--color-white);
  border-top: var(--border-standard);
  padding-block: var(--space-s);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-s);
  font-size: var(--font-small);
  font-weight: var(--font-weight-light);
  line-height: var(--line-height-small);
  width: 100%;
}

.footer-normal {
  display: flex;
  justify-content: space-between;
  width: 100%;
  transition: opacity 0.3s ease;
}

.footer-hover {
  display: none;
  width: 100%;
  justify-content: center;
  text-align: center;
  font-size: var(--font-small);
  font-weight: var(--font-weight-light);
  font-family: var(--font-family-sans);
  letter-spacing: normal;
  background: transparent;
  transition: all 0.3s ease;
}

.site-footer:hover {
  background: var(--color-white);
  color: var(--secondary-color);
  border-top: var(--border-standard);
}

.site-footer:hover .footer-normal {
  display: none;
}

.site-footer:hover .footer-hover {
  display: flex;
  color: var(--secondary-color);
}

/* ============================================= */
/* MEDIA QUERY: TABLET (≤1024px)                 */
/* ============================================= */
@media (max-width: 1024px) {

  /* ===== MENÚ DE NAVEGACIÓN ===== */
  .menu-clock-group,
  .menu-right {
    display: none;
  }

  .menu-center {
    justify-content: flex-end;
  }

  /* ===== SECCIÓN – INTRO ===== */
  .intro {
    min-height: 75svh;
    height: auto;
  }

  /* ===== SECCIÓN – CONTACTO ===== */
  .contact-section {
    min-height: 25svh;
    height: auto;
  }

  /* ===== PROYECTOS: Branding y Type Design ===== */
  .projects-grid-asym {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-s);
    width: 100%;
    max-width: 100%;
    height: 480px; /* 🔥 altura fija */
    box-sizing: border-box;
    align-items: stretch;
  }

  .project-card.tall {
    height: 480px;
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .project-column {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    gap: var(--space-s);
    height: 480px;
  }

  .projects-grid-asym .project-card.right {
    flex: 1 !important;
    transition: none !important;
  }

  .projects-grid-asym .project-card.right.expanded,
  .projects-grid-asym .project-card.right.minimized {
    flex: 1 !important;
  }

  /* ===== PROYECTOS: UI/UX ===== */
  .projects-grid-uiux {
    height: 480px; /* Misma altura que Branding/Type */
    align-items: stretch;
  }

  .projects-grid-uiux .project-card {
    height: 100%;
    aspect-ratio: unset;
    min-height: 0;
  }
}

/* ============================================= */
/* MEDIA QUERY: MOBILE (≤640px)                  */
/* ============================================= */
@media (max-width: 640px) {

  /* ===== MENÚ ===== */
  .menu-home-button {
    color: transparent;
  }

  .menu-home-button::after {
    content: "Agustín";
    color: var(--color-black);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: var(--font-small);
    white-space: nowrap;
  }

  /* ===== SECCIÓN – INTRO ===== */
  .intro {
    min-height: 80svh;
    height: auto;
  }

  /* ===== PROYECTOS: Branding y Type Design ===== */
  .projects-grid-asym {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-s);
    width: 100%;
    max-width: 100%;
    height: auto; /* 🔵 Dejar fluido */
    box-sizing: border-box;
  }

  .project-card.tall {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .project-column {
    height: auto;
  }

  .projects-grid-asym .project-card.right {
    flex: none;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  /* ===== PROYECTOS: UI/UX ===== */
  .projects-grid-uiux {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-s);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .projects-grid-uiux .project-card {
    width: 100%;
    min-height: auto;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  /* ===== SECCIÓN – CONTACTO ===== */
  .contact-section {
    min-height: 30svh;
    height: auto;
  }

  /* ===== ABOUT ===== */
  .about-section {
    min-height: 50svh;
  }

  .about-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
    margin-top: var(--space-l);
  }

  /* ===== FOOTER ===== */
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xs);
    padding-inline: var(--space-m);
  }
}
