/* ============================================================
   IGNACIO BALASCH SOLA — MODEL PORTFOLIO
   ============================================================ */

/* RESET & BASE ------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black:   #0a0a0a;
  --white:   #fafafa;
  --muted:   #888888;
  --border:  #e4e4e4;
  --display: 'Bebas Neue', Impact, sans-serif;
  --sans:    'Space Grotesk', system-ui, sans-serif;
  --header-h: 52px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --black:  #f0f0f0;
    --white:  #0a0a0a;
    --muted:  #666666;
    --border: #222222;
  }
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-weight: 300;
  overflow-x: hidden;
}

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

/* STICKY HEADER ----------------------------------------------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  padding: 0 2rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-name {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.1em;
}

nav {
  display: flex;
  gap: 2.5rem;
}

nav a {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

nav a:hover {
  color: var(--black);
}

/* HERO -------------------------------------------------------- */
/* Two-column split: text left (38%), editorial photo right (62%) */
.hero {
  display: grid;
  grid-template-columns: 38% 62%;
  height: calc(100vh - var(--header-h));
  border-bottom: 1px solid var(--border);
  min-height: 480px;
}

/* Push all hero text to the bottom of the column */
.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem 2.5rem 3.5rem;
  border-right: 1px solid var(--border);
}

.hero-text-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

h1 {
  font-family: var(--display);
  font-size: clamp(3.5rem, 6.5vw, 8.5rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: 0.02em;
}

/* STATS */
.stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
}

.stats li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-label {
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Language callout — visually distinct from the stats grid */
.lang-callout {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  border-left: 2px solid var(--black);
  padding-left: 1rem;
}

.lang-label {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.lang-value {
  font-family: var(--display);
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  letter-spacing: 0.04em;
  line-height: 1;
}

.bio {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--black);
}

/* ABOUT SECTION */
#about {
  border-bottom: 1px solid var(--border);
}

.about-inner {
  display: grid;
  grid-template-columns: 38% 62%;
  border-bottom: none;
}

.about-inner > .section-label {
  padding: 3rem 2.5rem;
  border-right: 1px solid var(--border);
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}

.about-body {
  padding: 3rem 3rem 3rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 60ch;
}

.intro {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Hero photo — right column, full image visible, clickable */
.hero-photo {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.6s ease;
}

.hero-photo:hover img {
  transform: scale(1.02);
}

/* SECTION HEADER ---------------------------------------------- */
.section-header {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* COMPOSITES -------------------------------------------------- */
/* Side-by-side agency comp card layout.
   White background always so the cut-out photos float cleanly. */
#composites {
  border-bottom: 1px solid var(--border);
}

.comp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.comp-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #ffffff;
  border-right: 1px solid var(--border);
  aspect-ratio: 2 / 3;
}

.comp-item:last-child {
  border-right: none;
}

/* Use contain so the full-body 3/4 shot is never cropped */
.comp-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.6s ease;
}

.comp-item:hover img {
  transform: scale(1.025);
}

.comp-caption {
  position: absolute;
  bottom: 1.25rem;
  left: 1.5rem;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}

/* LIFESTYLE VIDEOS -------------------------------------------- */
#lifestyle {
  border-bottom: 1px solid var(--border);
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.video-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  aspect-ratio: 16 / 9;
}

/* Even items: right border removed (sits at grid edge) */
.video-item:nth-child(even) {
  border-right: none;
}

/* Bottom row (last two): bottom border removed */
.video-item:nth-last-child(-n+2) {
  border-bottom: none;
}

.video-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.video-item:hover video {
  transform: scale(1.03);
}

.video-label {
  position: absolute;
  bottom: 1.25rem;
  left: 1.5rem;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
  pointer-events: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

/* FOOTER / CONTACT -------------------------------------------- */
#contact {
  padding: 6rem 2rem;
  text-align: center;
}

.contact-label {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.contact-email {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  display: inline-block;
  letter-spacing: 0.04em;
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
  transition: color 0.2s;
}

.contact-email:hover {
  color: var(--muted);
}

.contact-location {
  margin-top: 2.5rem;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* LIGHTBOX ---------------------------------------------------- */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.94);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: pointer;
}

#lightbox.open {
  display: flex;
}

.lb-content {
  cursor: default;
  max-width: calc(100vw - 10rem);
  max-height: calc(100vh - 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-content img,
.lb-content video {
  max-width: 100%;
  max-height: calc(100vh - 4rem);
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.lb-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s;
  z-index: 10;
}

.lb-close:hover { opacity: 1; }

.lb-prev,
.lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.2s;
  padding: 1rem 1.25rem;
  z-index: 10;
}

.lb-prev { left: 0.5rem; }
.lb-next { right: 0.5rem; }

.lb-prev:hover,
.lb-next:hover { opacity: 1; }

/* RESPONSIVE -------------------------------------------------- */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    height: auto;
    min-height: unset;
  }

  /* Photo stacks on top, text below */
  .hero-photo {
    order: -1;
    height: 65vw;
    max-height: 480px;
  }

  .hero-text {
    border-right: none;
    border-top: 1px solid var(--border);
    justify-content: flex-start;
    padding: 2.5rem 1.5rem 3rem;
  }

  h1 {
    font-size: clamp(3rem, 14vw, 5.5rem);
  }

  .comp-grid {
    grid-template-columns: 1fr;
  }

  .comp-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    aspect-ratio: 3 / 4;
  }

  .comp-item:last-child {
    border-bottom: none;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .video-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    aspect-ratio: 16 / 9;
  }

  .video-item:nth-child(even) {
    border-right: none;
  }

  .video-item:nth-last-child(-n+2) {
    border-bottom: 1px solid var(--border);
  }

  .video-item:last-child {
    border-bottom: none;
  }

  .about-inner {
    grid-template-columns: 1fr;
  }

  .about-inner > .section-label {
    padding: 1.25rem 1.5rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
    position: static;
  }

  .about-body {
    padding: 2rem 1.5rem 2.5rem;
  }

  .header-inner {
    padding: 0 1.25rem;
  }

  .section-header {
    padding: 1.25rem 1.5rem;
  }

  .lb-content {
    max-width: calc(100vw - 2rem);
  }
}
