/*
  Portfolio layout fixes
  ----------------------
  This file contains page-specific overrides that sit on top of the base
  stylesheet. Keep it focused on layout corrections and visual stability;
  content remains in assets/js/data.js and behavior remains in assets/js/app.js.
*/

/* Keep the hero identity, but remove only the duplicated metadata strip. */
.hero {
  display: flex;
  min-height: clamp(470px, 58svh, 650px);
  padding-top: clamp(72px, 8vh, 96px);
  padding-bottom: clamp(28px, 4vh, 46px);
}

.hero__meta {
  display: none;
}

.hero__content {
  margin: auto 0;
}

/*
  The translation script previously stored one original value per parent,
  causing sibling text nodes in the title to repeat “Hipólito”. Render the
  identity as a stable visual label until that translator is refactored.
*/
.hero__title {
  font-size: 0;
}

.hero__title::before {
  content: "Hipólito\A Angeloni";
  display: block;
  white-space: pre-line;
  font-family: "Instrument Serif", serif;
  font-size: clamp(4.8rem, 12.4vw, 11rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.01em;
}

.hero__title::after {
  content: "©";
  display: inline-block;
  margin-left: 10px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(11px, 1.1vw, 14px);
  font-weight: 400;
  letter-spacing: 0.1em;
  vertical-align: super;
}

.hero__title sup {
  display: none;
}

/* Availability indicator: use a clear green status colour. */
.availability i {
  background: #2f9e44;
}

/* Do not show Spanish and English simultaneously in section labels. */
.mobile-menu__top > span,
.work .section-heading .eyebrow,
.workshop .section-heading .eyebrow,
.about .section-kicker > span:first-child,
.contact .section-kicker > span:first-child {
  font-size: 0;
}

html[lang="en"] .mobile-menu__top > span::after { content: "MENU"; }
html[lang="es"] .mobile-menu__top > span::after { content: "MENÚ"; }

html[lang="en"] .work .section-heading .eyebrow::after { content: "01 — PROJECTS"; }
html[lang="es"] .work .section-heading .eyebrow::after { content: "01 — PROYECTOS"; }

html[lang="en"] .workshop .section-heading .eyebrow::after { content: "02 — WORKSHOP"; }
html[lang="es"] .workshop .section-heading .eyebrow::after { content: "02 — TALLER"; }

html[lang="en"] .about .section-kicker > span:first-child::after { content: "03 — ABOUT"; }
html[lang="es"] .about .section-kicker > span:first-child::after { content: "03 — ESTUDIO"; }

html[lang="en"] .contact .section-kicker > span:first-child::after { content: "04 — CONTACT"; }
html[lang="es"] .contact .section-kicker > span:first-child::after { content: "04 — CONTACTO"; }

.mobile-menu__top > span::after,
.work .section-heading .eyebrow::after,
.workshop .section-heading .eyebrow::after,
.about .section-kicker > span:first-child::after,
.contact .section-kicker > span:first-child::after {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Project list: every card uses the same image frame and occupies only its content height. */
.projects--editorial {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(28px, 4vw, 56px);
  row-gap: clamp(48px, 7vw, 92px);
  align-items: start;
}

.project-card {
  display: block !important;
  align-self: start;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  flex: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
  background: transparent;
  text-align: left;
}

.project-card__meta {
  position: static !important;
  display: block;
  width: fit-content;
  margin: 0 0 8px !important;
  padding: 0 !important;
  background: transparent !important;
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: 0.12em;
}

.project-card__image {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3 !important;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-deep);
}

.project-mosaic__image,
.project-index__thumb {
  background: var(--paper-deep);
}

/*
  Thumbnails keep the original portfolio composition: the frame is filled.
  Cropping is controlled through object-position instead of changing the image
  behavior to contain, which made the cards look visually weaker.
*/
.project-card__image img,
.project-mosaic__image img,
.project-index__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center center;
}

/* Case-study images can be read more calmly without changing the grid cards. */
.case-study__hero img,
.case-study__gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center center;
}

.project-card__caption {
  position: static !important;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0 0 !important;
  padding: 0 !important;
}

.project-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

/* About portrait: replaces the temporary placeholder with a real image block. */
.portrait-image {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  background: var(--paper-deep);
}

.portrait-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

@media (max-width: 899px) {
  :root {
    --page-x: clamp(16px, 5vw, 28px);
  }

  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-header {
    gap: 12px;
    padding: 14px var(--page-x);
  }

  .brand {
    min-width: 0;
    gap: 10px;
  }

  .brand__mark {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    font-size: 11px;
  }

  .brand__text {
    max-width: 210px;
    overflow: hidden;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-overflow: ellipsis;
  }

  .hero {
    min-height: clamp(420px, 60svh, 560px);
    padding-top: 76px;
    padding-bottom: 28px;
  }

  .hero__title::before {
    font-size: clamp(3.6rem, 18vw, 6.4rem);
    line-height: 0.88;
  }

  .corner {
    display: none;
  }

  .projects--editorial {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 52px;
  }

  .layout-switcher {
    display: none;
  }

  .filter-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .filter-list::-webkit-scrollbar {
    display: none;
  }

  .filter-button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .about__grid,
  .contact__grid,
  .case-study__narrative,
  .case-study__result {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .brand__text {
    max-width: 160px;
  }

  .hero__title::before {
    font-size: clamp(3.2rem, 17.5vw, 5.2rem);
  }
}
