/* ==========================================================================
   Quetzal Starzak Portfolio — Shared Stylesheet
   ========================================================================== */

:root {
  --color-bg: #ffffff;
  --color-heading: #1a1a1a;
  --color-body: #646464;
  --color-muted: #999999;
  --font-family: "Manrope", system-ui, sans-serif;

  /* Shared container — ALL sections use this */
  --container-max: 100%;
  --container-pad: 9%;

  /* Left text column width */
  --meta-width: 225px;

  /* Gap between text col and image col */
  --col-gap: 170px;

  /* Info / project detail main column (matches .info-layout center column) */
  --info-main-width: 100%;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-family);
  font-weight: 200;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--color-body);
  background: #fff;
}

main {
  flex: 1 0 auto;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover { opacity: 0.7; }

h1, h2, h3 {
  font-weight: 200;
  margin: 0;
  color: var(--color-heading);
}

/* --------------------------------------------------------------------------
   Shared container — used by header, main, footer to stay aligned
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.site-header {
  padding-left: 27rem;
  padding-top: 4rem;
  padding-bottom: 1.5rem;
  align-items: left;
}

.nav {
  display: flex;
  gap: 3.5rem;
  font-size: 1rem;
  font-weight: 200;
  color: var(--color-muted);
}

.nav-link { color: var(--color-muted); }
.nav-link--active { color: var(--color-heading); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding-left: 27rem;
  padding-top: 5rem;
  padding-bottom: 2.5rem;
}

.footer-inner {
  display: flex;
  align-items: baseline;
  gap: 3.5rem;
  font-size: 1rem;
  font-weight: 200;
  color: var(--color-muted);
}

.nav-link { color: var(--color-muted); }
.nav-link--active { color: var(--color-heading); }

.footer-inner a { color: var(--color-muted); }

.footer-credit {
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Page wrapper
   -------------------------------------------------------------------------- */
.page-wrap {
  padding-top: 0;
  padding-bottom: 6rem;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding: 5rem 17rem 7rem;
}

.avatar {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.hero-text {
  font-size: 2rem;
  font-weight: 200;
  color: var(--color-heading);
  line-height: 1.3;
  margin: 0;
}

.hero-name {
  font-weight: 300;
  color: var(--color-heading);
}

.hero-tagline {
  font-style: italic;
  font-weight: 200;
  color: var(--color-muted);
}

/* --------------------------------------------------------------------------
   Project rows
   -------------------------------------------------------------------------- */
.project-row {
  display: grid;
  grid-template-columns: var(--meta-width) 1fr;
  column-gap: var(--col-gap);
  padding: 4.5rem 0;
  align-items: start;
}

.project-row:first-of-type {
  padding-top: 0;
}

.project-meta {
  padding-top: 0rem;
}

.project-title {
  font-size: 1.6rem;
  font-weight: 200;
  color: var(--color-heading);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.project-subtitle {
  font-size: 1rem;
  font-weight: 200;
  color: var(--color-muted);
  margin: 0 0 1rem;
  line-height: 1.2;
}

.project-desc {
  font-size: 0.9rem;
  font-weight: 200;
  color: var(--color-body);
  line-height: 1.55;
  margin: 0 0 2rem;
}

.project-gallery {
  min-width: 0;
}

.project-card-image-link {
  display: contents;
  color: inherit;
  text-decoration: none;
}

.project-img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #d9d9d9;
  border-radius: 23px;
}

.no-border {
  border: none;
  border-radius: 0;
}

.project-img-fractal {
  display: block;
  width: 70%;
  height: auto;
  border: 1px solid #d9d9d9;
  border-radius: 23px;
}
/* --------------------------------------------------------------------------
   Pill button
   -------------------------------------------------------------------------- */
.btn-pill {
  display: inline-block;
  padding: 0.35rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 200;
  color: var(--color-heading);
  border: 1px solid var(--color-muted);
  border-radius: 20px;
}

a.btn-pill:hover { opacity: 0.6; }

/* --------------------------------------------------------------------------
   Info page
   -------------------------------------------------------------------------- */
.info-layout {
  --info-col-gap: clamp(2rem, 5vw, var(--col-gap));
  display: grid;
  grid-template-columns: var(--meta-width) minmax(0, 1fr) minmax(0, 250px);
  column-gap: var(--info-col-gap);
  padding: 7rem 0;
  align-items: start;
}

.info-layout .info-col-left {
  width: auto;
  max-width: var(--meta-width);
  min-width: 0;
}

/* Match nav x: 27rem + pad(header), where %-pad is (100vw−27rem)·P; main pad is 100vw·P → inset 27rem·(1−P) − meta − gap */
.info-layout .info-col-center {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  overflow-wrap: break-word;
  padding-left: max(0px, calc(27rem * 0.91 - var(--meta-width) - var(--info-col-gap)));
}

.info-layout .info-col-right {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  justify-self: end;
}



.info-col-left {
  padding-top: 1rem;
  font-size: 1.2rem;
  font-weight: 200;
  color: var(--color-heading);
  line-height: 1.65;
}

.info-lead { margin: 0 0 2rem; }

.education-block { 
padding-bottom: 2rem;
line-height: 1.2;
}

.location-block {
  padding-bottom: 2rem;
  padding-top: 2rem;
  line-height: 1.2;
}
.contact-block {
  padding-top: 4rem;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.info-col-left > .btn-pill {
  display: block;
  width: fit-content;
}

.info-col-left > .btn-pill + .btn-pill {
  margin-top: 1.25rem;
}

.info-label {
  display: block;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-muted);
  margin-bottom: 0.1rem;
}

.info-value {
  margin: 0;
  color: var(--color-heading);
}

/* .info-col-center {
 width: 70%;
} */

.info-heading {
  font-size: 2rem;
  font-weight: 200;
  color: var(--color-heading);
  margin: 0 0 1.25rem;
}

.info-bio p {
  font-size: 1rem;
  font-weight: 200;
  color: var(--color-body);
  margin: 0 0 0.85rem;
  line-height: 1.2;
}
.info-col-right {
  align-items: start;
}
 
.info-graphic {
  display: block;
  width: min(250px, 100%);
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   Project detail pages (layout matches Info: .project-layout + .info-col-*)
   -------------------------------------------------------------------------- */
/* Project detail: same left + main columns as Info; no third column */
.project-layout {
  display: grid;
  grid-template-columns: var(--meta-width) minmax(0, 1fr);
  column-gap: var(--col-gap);
  padding: 7rem 0;
  align-items: start;
}

.project-layout .info-col-left {
  width: auto;
  max-width: var(--meta-width);
  min-width: 0;
}

.project-layout .project-col-main {
  min-width: 0;
}

   .project-col-main .info-heading {
  margin-bottom: 0.35rem;
}

.project-page-subtitle {
  font-size: 1rem;
  font-weight: 200;
  color: var(--color-muted);
  margin: 0 0 1.25rem;
  line-height: 1.2;
  padding-bottom: 5rem;
}

.project-col-main .project-content__media {
  margin-top: 0;
}

.project-content__text {
  font-size: 1rem;
  font-weight: 200;
  line-height: 1.2;
  color: var(--color-body);
  padding-top: 10rem;
}

.project-content__text p {
  margin: 0 0 0.85rem;
}

.project-content__text .btn-pill {
  margin-top: 0.5rem;
}

.project-content__media {
  min-width: 0;
}

.caption {
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 200;
  color: var(--color-muted);
  margin: 0.4rem 0 2.5rem;
}

/* --------------------------------------------------------------------------
   Celluloid
   -------------------------------------------------------------------------- */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 2.5rem;
}

.poster-grid .project-img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* Celluloid only: 2 posters + 1 below first; posters 1.5× prior quarter-column width; square corners */
.celluloid-media {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.celluloid-media .poster-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: start;
  width: 100%;
  max-width: 100%;
  row-gap: 1rem;
  column-gap: 0;
}

.celluloid-media .poster-grid .project-img:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.celluloid-media .poster-grid .project-img:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
  margin-left: calc(1rem - 12.5cqi);
}

.celluloid-media .poster-grid .project-img:nth-child(3) {
  grid-column: 1;
  grid-row: 2;
}

.celluloid-media .poster-grid .project-img {
  width: 75%;
  border-radius: 0;
}

.celluloid-media .second-grid {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  max-width: 100%;
}

.celluloid-media .second-grid .project-img:nth-child(1),
.celluloid-media .second-grid .project-img:nth-child(2) {
  flex: 0 0 auto;
  min-width: 0;
  width: min(calc((100% - 0.5rem) / 2), min(47.5vh, 450px));
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
}

.fractal-media {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.fractal-media .poster-grid {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.fractal-media .poster-grid > img.project-img:first-child {
  width: fit-content;
  max-width: 100%;
  max-height: min(85vh, 920px);
  height: auto;
  object-fit: contain;
  object-position: left top;
  border-radius: 0;
  aspect-ratio: unset;
}

.fractal-media .fractal-row-2 {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* .fractal-media .fractal-img-2-wrap,
.fractal-media .fractal-img-3-wrap {
  flex: 0 1 auto;
  box-sizing: border-box;
  width: fit-content;
  max-width: calc((100% - 1rem) / 2);
  min-width: 0;
  align-self: center;
  line-height: 0; */
/* } */

.fractal-media .fractal-img-2-wrap .project-img,
.fractal-media .fractal-img-3-wrap .project-img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: min(70vh, 720px);
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  aspect-ratio: unset;
}

.fractal-media .second-grid {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  gap: 0;
}

.fractal-media .second-grid .project-img {
  width: fit-content;
  max-width: 100%;
  max-height: min(85vh, 920px);
  height: auto;
  object-fit: contain;
  border-radius: 0;
}

/* Same width as before (70% of each poster half); flex sits them side by side with no gap in the middle */
.second-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.5rem;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
}

.second-grid .project-img:nth-child(1),
.second-grid .project-img:nth-child(2) {
  width: 100%;
  max-width: 100%;
  flex-shrink: 0;
}

.second-grid .project-img {
  height: auto;
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   ParkingBuddy
   -------------------------------------------------------------------------- */
/* .figma-embed-placeholder {
  width: 100%;
  overflow: hidden;
  margin-bottom: 2rem;
  align-items: start;
} */

.figma-iframe {
  display: block;
  height: 874px;
  border: 1px solid rgba(0,0,0,0.08);
}

/* .screen-grid-label {
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 200;
  color: var(--color-muted);
  margin: 0 0 0.5rem;
} */

/* ParkingBuddy gallery: intrinsic img box (no letterboxing inside the element); flush, no border */
.screen-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  margin-bottom: 0.5rem;
  width: 100%;
  max-width: 100%;
  padding-top: 7rem;
}

.screen-grid .project-img {
  display: block;
  flex: 0 1 auto;
  width: auto;
  height: auto;
  max-width: 78.125%;
  max-height: min(96.875vh, 969px);
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  outline: none;
  box-shadow: none;
}

.parkingbuddy-media {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.parkingbuddy-media .parking-figma {
  display: block;
  width: 100%;
  max-width: 362px;
  height: 784px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.parkingbuddy-media .screen-grid {
  min-width: 0;
}

.parkingbuddy-media .screen-grid .project-img {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   Atlantic (stacked figures; matches reference layout)
   -------------------------------------------------------------------------- */
.atlantic-media {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 7rem;
  padding: 0;
  margin: 0;
}

.atlantic-media .figure-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  align-self: flex-start;
}

.atlantic-media .project-img {
  display: block;
  width: auto;
  max-width: 100%;
  min-width: 0;
  height: auto;
  max-height: min(78vh, 920px);
  object-fit: contain;
  object-position: left top;
  border-radius: 0;
  border: none;
}

.atlantic-media .caption {
  display: block;
  width: 100%;
  text-align: center;
  margin: 0.4rem 0 0;
  padding: 0;
}

/* --------------------------------------------------------------------------
   Atlantic / Fractal
   -------------------------------------------------------------------------- */
.figure-block { margin-bottom: 2rem; }

.figure-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.merch-wide .project-img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  :root {
    --container-pad: 5%;
    --col-gap: 3rem;
  }

  .info-layout .info-col-center {
    padding-left: max(0px, calc(27rem * 0.95 - var(--meta-width) - var(--info-col-gap)));
  }
}

@media (max-width: 768px) {
  :root { --container-pad: 1.5rem; }

  .hero,
  .project-row,
  .project-layout,
  .info-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .project-layout .project-col-main {
    order: -1;
  }

  .project-layout .info-col-left {
    max-width: none;
    width: 100%;
  }

  .info-layout .info-col-left,
  .info-layout .info-col-center {
    max-width: none;
    width: 100%;
  }

  .info-layout .info-col-center {
    padding-left: 27rem;
  }

  .hero { flex-direction: row; flex-wrap: wrap; }
  .info-col-right { display: none; }
  .poster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .second-grid {
    flex-wrap: wrap;
  }
  .screen-grid--secondary { grid-template-columns: repeat(2, 1fr); }
  .screen-grid .project-img {
    max-height: min(90.625vh, 813px);
  }
  .editorial-project-media .project-img {
    max-height: min(36vh, 380px);
  }
  .editorial-project-media .figure-row .project-img {
    max-height: min(32vh, 340px);
  }
  .editorial-project-media .merch-wide .project-img {
    max-height: min(30vh, 280px);
  }
  .atlantic-media {
    gap: 4rem;
  }
  .atlantic-media .project-img {
    max-height: min(62vh, 560px);
  }
  .atlantic-media .figure-block:nth-child(2) .project-img {
    max-height: min(33.6vh, 336px);
  }
  .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
  .figma-iframe { height: 560px; }

  .parkingbuddy-media .parking-figma {
    height: min(560px, 72vh);
    max-height: min(560px, 72vh);
  }
}

@media (max-width: 480px) {
  .poster-grid { grid-template-columns: 1fr; }
  .celluloid-media .poster-grid {
    grid-template-columns: 1fr;
    row-gap: 1rem;
    column-gap: 0;
  }
  .celluloid-media .poster-grid .project-img:nth-child(2) {
    margin-left: 0;
  }
  .celluloid-media .poster-grid .project-img:nth-child(1),
  .celluloid-media .poster-grid .project-img:nth-child(2),
  .celluloid-media .poster-grid .project-img:nth-child(3) {
    grid-column: 1;
    grid-row: auto;
  }
  .celluloid-media .poster-grid .project-img {
    width: 100%;
  }
  .celluloid-media .second-grid {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .celluloid-media .second-grid .project-img:nth-child(1),
  .celluloid-media .second-grid .project-img:nth-child(2) {
    width: min(calc((100% - 0.35rem) / 2), min(32.5vh, 250px));
    aspect-ratio: 1 / 1;
  }
  .second-grid {
    flex-direction: column;
    align-items: center;
  }
  .second-grid .project-img:nth-child(1),
  .second-grid .project-img:nth-child(2) {
    width: 70%;
    max-width: 100%;
  }

  .fractal-media .second-grid {
    align-items: flex-start;
  }
  .fractal-media .second-grid .project-img {
    width: fit-content;
    max-width: 100%;
  }
  .fractal-media .fractal-row-2 {
    flex-direction: column;
    align-items: flex-start;
  }
  .fractal-media .fractal-img-2-wrap,
  .fractal-media .fractal-img-3-wrap {
    flex: none;
    width: fit-content;
    max-width: 100%;
    height: auto;
  }
  .screen-grid .project-img {
    max-height: min(78.125vh, 656px);
  }
  .parkingbuddy-media .parking-figma {
    height: min(420px, 60vh);
    max-height: min(420px, 60vh);
  }
  .parkingbuddy-media .screen-grid {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .parkingbuddy-media .screen-grid .project-img {
    max-width: 100%;
  }
  .figure-row { grid-template-columns: 1fr; }
}
