/* =====================================================
   HOME
   Escritorio primero; abajo, ajustes para tablet y celular.
===================================================== */

body#index {
  min-height: 100vh;
  min-height: 100dvh;           /* alto real en celulares (sin la barra del navegador) */
  display: flex;
  flex-direction: column;
}

/*** ENCABEZADO ***/
.home-header {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--colGutter);
  padding: var(--spaceY) var(--spaceX);
  font-size: var(--fontSizeSmall);
  position: relative;
  z-index: 20;
}
.bio {
  grid-column: 1 / span 4;
  color: var(--paletteViolet);
}
.contacto {
  grid-column: 10 / span 3;
  text-align: right;
  color: var(--paletteGray);
}
.contacto a:hover { color: var(--paletteViolet); }

/*** LISTA ***/
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 var(--spaceX) var(--rowGutterBetweenSections);
  position: relative;
  z-index: 5;
}
/* La lista queda pegada abajo; si sumás muchos proyectos, empuja y la página scrollea */
.list {
  margin-top: auto;
  padding-top: max(50vh, 2rem);
}

.list_row {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: var(--rowGutterSmall) 0;
  color: var(--textColor);
}
.list_row > span { position: relative; z-index: 2; }
.row_year  { flex: 0 0 30%; }
.row_title { flex: 1; padding-left: calc(var(--colGutter) * 2); }
.row_type  { flex: 0 0 20%; text-align: right; }

/* Recuadro gris al pasar el mouse (solo en dispositivos con mouse) */
.list_row::before {
  content: "";
  position: absolute;
  inset: calc(var(--rowGutterSmall) * 0.2) calc(var(--colGutter) * -1);
  border: var(--borderLine);
  background: var(--hoverBox);
  box-shadow:
    inset 0.5px 0.5px 0 rgba(255,255,255,0.6),
    inset -0.5px -0.5px 0 rgba(0,0,0,0.12);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 1;
}
@media (hover: hover) {
  .list_row:hover { color: var(--hoverColor); }
  .list_row:hover::before { opacity: 0.7; }
}
.list_row:focus-visible { color: var(--hoverColor); outline-offset: -2px; }

/*** FLOR ***/
.flor {
  position: fixed;
  top: calc(var(--spaceY) * -1);
  right: calc(var(--spaceX) * -1);
  width: clamp(420px, 48.6vw, 700px);   /* 700px en una pantalla de 1440 */
  aspect-ratio: 1000 / 886;
  z-index: 10;
  pointer-events: none;
}
.flor-img {
  position: absolute;
  top: 0;
  right: 0;
  width: 128.6%;                         /* = 900px cuando la caja mide 700px */
  max-width: none;
  opacity: 0.21;                         /* = 0.7 × 0.3 del efecto original */
  filter: brightness(0) blur(20px);
  will-change: filter, transform;
}

/*** FOOTER (oculto en escritorio) ***/
.home-footer { display: none; }


/* =====================================================
   TABLET Y CELULAR (hasta 1023px)
===================================================== */
@media (max-width: 1023px) {

  :root {
    --fontSizeSmall: 0.8rem;
    --fontSizeMedium: 0.95rem;
  }

  .home-header { display: block; }
  .bio { max-width: 34em; }
  .bio p + p { margin-top: 0.4em; }
  .contacto { display: none; }           /* pasa al footer */

  .content { padding-bottom: 5rem; }      /* lugar para el footer fijo */
  .list { margin-top: var(--rowGutterBetweenSections); padding-top: 0; }

  .list_row {
    color: var(--paletteViolet);
    padding: 0.55rem 0;                   /* filas más altas = más fácil de tocar */
  }
  .row_year  { flex: 0 0 4.5em; }
  .row_title {
    padding-left: 0;
    text-decoration: underline dotted 1.5px;
    text-underline-offset: 4px;
  }
  .row_type  { flex: 0 0 auto; padding-left: var(--colGutter); color: var(--paletteStone); }

  /* La flor pasa al centro, detrás del texto */
  .flor {
    top: 50%;
    left: 50%;
    right: auto;
    width: min(110vw, 80vh);
    transform: translate(-50%, -45%);
    z-index: 0;
  }
  .flor-img {
    position: static;
    width: 100%;
    opacity: 0.16;
  }

  .home-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.3rem var(--colGutter);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 20;
    padding: var(--spaceY) var(--spaceX);
    padding-bottom: max(var(--spaceY), env(safe-area-inset-bottom));
    font-size: var(--fontSizeSmall);
    color: var(--paletteViolet);
    background: linear-gradient(to top, var(--backColor) 60%, transparent);
  }
}

/* =====================================================
   CELULAR (hasta 600px)
===================================================== */
@media (max-width: 600px) {
  :root {
    --fontSizeSmall: 0.75rem;
    --fontSizeMedium: 0.9rem;
  }
  .row_type { display: none; }
  .row_year { flex-basis: 3.8em; }
  .flor { width: min(120vw, 75vh); }
}
