/* ==========================================================================
   Matjituavi Kao — model portfolio
   Palette extracted from reference (Wix theme colors):
     page bg      #EBEAE6   (235,234,230)
     bar shade    #E0DFDC   (224,223,220)
     text         #090909   (9,9,9)
     greys        #B1B1B1 / #797979 / #414141
     taupe        #ACA9A1 / #767268
   Fonts: Forum (serif, on Google Fonts) + Barlow Light (closest free
   equivalent of DIN Next W01 Light)
   ========================================================================== */

:root {
  --bg: #EBEAE6;
  --bg-shade: #E0DFDC;
  --ink: #090909;
  --grey-mid: #797979;
  --grey-dark: #414141;
  --taupe: #ACA9A1;
  --taupe-dark: #767268;
  --white: #FFFFFF;
  --serif: 'Forum', Georgia, serif;
  --sans: 'Barlow', Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* --------------------------------------------------------------------------
   Navbar — centered tab strip, active page as raised white tab
   -------------------------------------------------------------------------- */

.site-header {
  background: var(--bg-shade);
  padding-top: 14px; /* room for the raised active tab */
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.nav-tabs {
  display: flex;
  align-items: flex-end;
  list-style: none;
}

.nav-tabs a {
  display: block;
  padding: 15px 30px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--ink);
  transition: background-color 0.25s ease;
}

.nav-tabs a:hover { background: rgba(255, 255, 255, 0.5); }

.nav-tabs a.active {
  background: var(--white);
  padding-top: 21px; /* taller: reads as a raised tab */
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 14px 18px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--ink);
  margin: 6px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 767.98px) {
  /* Reference mobile: plain light bar, hamburger top-right, no visible tabs */
  .site-header { padding-top: 0; position: relative; background: var(--bg); }
  .nav-inner { justify-content: flex-end; }
  .nav-toggle { display: block; padding: 20px 22px; }
  .nav-toggle span { width: 30px; height: 2px; margin: 7px 0; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
  .nav-tabs {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  }
  .nav-open .nav-tabs { display: flex; }
  .nav-tabs a, .nav-tabs a.active { padding: 15px 30px; }
}

/* --------------------------------------------------------------------------
   Footer — email + social icons
   -------------------------------------------------------------------------- */

.site-footer {
  text-align: center;
  padding: 70px 20px 40px;
}

.footer-email {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.footer-email:hover { color: var(--grey-mid); }

.footer-social {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  gap: 22px;
}

.footer-social a { line-height: 0; }
.footer-social svg { width: 20px; height: 20px; fill: var(--ink); transition: fill 0.2s; }
.footer-social a:hover svg { fill: var(--grey-mid); }

/* generous empty grey space below the footer on the cover page */
.page-cover .site-footer { padding-bottom: 180px; }

/* --------------------------------------------------------------------------
   Cover (index)
   -------------------------------------------------------------------------- */

.cover-strip {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.cover-strip img {
  width: 100%;
  height: min(92vh, 1000px);
  object-fit: cover;
}

.cover-title {
  position: absolute;
  left: 4%;
  bottom: 16%;
  z-index: 2;
  max-width: 62%;
  pointer-events: none;
}

.cover-title h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 7.5vw, 108px);
  line-height: 1.05;
  color: #F6F5F2;
  letter-spacing: 0.02em;
}

.cover-title p {
  margin-top: 14px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(12px, 1.3vw, 17px);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: #F6F5F2;
}

/* Mobile cover, matching the reference:
   one photo only, pinned as a fixed full-viewport layer that never moves;
   header, name block and an opaque footer scroll over it. No
   background-attachment: fixed (broken on iOS) — a fixed <img> instead. */
@media (max-width: 767.98px) {
  .cover-strip { display: block; }

  .cover-strip img { display: none; }

  /* Pinned full-screen: the image fills the whole viewport (cover), so the
     first screen is only image + name, nothing peeking below. Sized with
     100lvh (large viewport height) — a CONSTANT that does NOT change when the
     mobile address bar hides/shows, so the image never resizes or shifts.
     Only the sides are lightly cropped; object-position keeps it centered. */
  .cover-strip img:first-child {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;   /* fallback for older browsers */
    height: 100lvh;
    object-fit: cover;
    object-position: center top;
    z-index: -1; /* behind scrolling content, above the body background */
  }

  .cover-title {
    position: static;
    max-width: none;
    margin-top: 45vh;
    margin-top: 45svh;
    padding: 0 18px;
    pointer-events: none;
  }

  .cover-title h1 {
    font-size: clamp(46px, 15vw, 72px);
    line-height: 1.15;
    color: var(--grey-mid); /* reference: grey name over the photo */
  }

  .cover-title p {
    margin-top: 10px;
    margin-left: 24vw; /* reference: subtitle indented under the name */
    font-size: 13px;
    letter-spacing: 0.28em;
  }

  /* opaque footer panel that slides over the pinned photo.
     margin-top controls how much you scroll before the footer appears —
     larger value = footer comes later, image gets more space on its own. */
  .page-cover .site-footer {
    background: var(--bg);
    margin-top: 47vh;   /* fallback — keep this the same number as the svh line below */
    margin-top: 47svh;
    padding: 70px 20px 140px;
  }
}

/* --------------------------------------------------------------------------
   Portfolio grid — uniform row height, portrait (1 col) + landscape (2 cols)
   -------------------------------------------------------------------------- */

.portfolio-grid {
  max-width: 1000px;
  margin: 50px auto 0;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  /* row height keeps the 323x456 portrait ratio at any viewport width */
  grid-auto-rows: calc((min(100vw, 1000px) - 48px) / 3 * 1.412);
  grid-auto-flow: dense;
}

.portfolio-grid figure {
  overflow: hidden;
  cursor: pointer;
}

.portfolio-grid figure.land { grid-column: span 2; }

.portfolio-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-grid figure:hover img { transform: scale(1.03); }

/* Mobile: staggered two-column collage like the reference gallery —
   rows alternate narrow+wide / wide+narrow, edge to edge, small gaps */
@media (max-width: 767.98px) {
  .portfolio-grid {
    max-width: none;
    margin: 12px 0 0;
    padding: 0;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 48vw;
    gap: 10px;
  }
  .portfolio-grid figure,
  .portfolio-grid figure.land { grid-column: span 2; }
  .portfolio-grid figure:nth-child(4n + 1),
  .portfolio-grid figure:nth-child(4n) { grid-column: span 1; }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(9, 9, 9, 0.92);
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
}

.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: #F6F5F2;
  font-family: var(--sans);
  font-weight: 300;
  cursor: pointer;
  padding: 16px;
  font-size: 30px;
  line-height: 1;
}

.lightbox .lb-close { top: 14px; right: 20px; }
.lightbox .lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* --------------------------------------------------------------------------
   Digitals — white content area, 5-column uniform grid, stats block
   -------------------------------------------------------------------------- */

.digitals-section {
  background: var(--white);
  padding: 70px 0 90px;
}

.digitals-section h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4vw, 52px);
  text-align: center;
  letter-spacing: 0.04em;
  margin-bottom: 60px;
}

.digitals-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 34px 28px;
}

.digitals-grid figure { aspect-ratio: 3 / 4; overflow: hidden; }

.digitals-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 1024px) {
  .digitals-grid { grid-template-columns: repeat(3, 1fr); gap: 28px 22px; }
}


.model-stats {
  max-width: 680px;
  margin: 90px auto 0;
  padding: 0 20px;
  text-align: center;
}

/* Heavy serif, all caps, large, centered to match the stats below */
.model-stats h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 44px;
}

.stats-subhead {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  margin-bottom: 30px;
}

.model-stats ul { list-style: none; }

/* Centered single lines, generous ~1.5–2x line-height spacing, no borders */
.model-stats li {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.04em;
  padding: 14px 0;
}

/* Larger gap (~double) before the hair / eye group */
.stats-group--appearance { margin-top: 52px; }

/* Mobile, matching the reference digitals page: stats list first
   (top of page, left aligned), then photos stacked in one column */
@media (max-width: 767.98px) {
  .digitals-section {
    display: flex;
    flex-direction: column;
    padding: 28px 0 70px;
  }

  .digitals-section h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    margin: 0;
  }

  .digitals-grid { grid-template-columns: 1fr; gap: 22px; padding: 0 24px; }

  .model-stats {
    order: -1;
    max-width: none;
    width: 100%;
    margin: 8px 0 40px;
    padding: 0 24px;
    /* same centered layout as desktop */
  }

  .model-stats h2 {
    font-size: clamp(26px, 8vw, 34px);
    margin-bottom: 30px;
  }
}

/* --------------------------------------------------------------------------
   Contact — split layout
   -------------------------------------------------------------------------- */

.contact-split {
  display: grid;
  grid-template-columns: 58% 42%;
  min-height: calc(100vh - 66px); /* fill viewport below navbar */
}

.contact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-panel {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px clamp(36px, 6vw, 90px);
}

.contact-panel h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4vw, 56px);
  letter-spacing: 0.02em;
}

.contact-email {
  display: inline-block;
  margin-top: 18px;
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

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

.contact-form { margin-top: 44px; }

.contact-form label {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  margin-bottom: 22px;
  padding: 11px 14px;
  background: transparent;
  border: 1px solid var(--grey-dark);
  border-radius: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.contact-form textarea { min-height: 140px; resize: vertical; }

.contact-form ::placeholder {
  color: var(--grey-mid);
  text-transform: lowercase;
  opacity: 1;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--ink);
}

.btn-connect {
  display: inline-block;
  margin-top: 6px;
  padding: 13px 52px;
  border: 0;
  border-radius: 999px;
  background: var(--taupe);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.btn-connect:hover { background: var(--taupe-dark); }

.form-thanks {
  display: none;
  margin-top: 44px;
  font-size: 16px;
  letter-spacing: 0.04em;
}

@media (max-width: 820px) {
  .contact-split { grid-template-columns: 1fr; min-height: 0; }
  .contact-photo img { height: 62vh; }
  .contact-panel { padding: 56px 24px 80px; }
}

/* Footer exists in contact.html for mobile only (reference shows it there);
   desktop keeps the full-viewport split with no footer */
.page-contact .site-footer { display: none; }

/* Mobile, matching the reference contact page: the photo is a full-bleed
   backdrop behind the heading and the transparent bordered form fields;
   the pill button lands below the photo, then empty space and the footer */
@media (max-width: 767.98px) {
  .contact-split {
    display: block;
    position: relative;
    min-height: 0;
  }

  .contact-photo {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 580px;
    overflow: hidden;
  }

  .contact-photo img { height: 100%; }

  .contact-panel {
    position: relative;
    background: transparent;
    justify-content: flex-start;
    padding: 34px 20px 0;
  }

  .contact-panel h1 { font-size: clamp(42px, 13vw, 60px); }

  .contact-form { margin-top: 30px; }

  .contact-form input,
  .contact-form textarea {
    margin-bottom: 20px;
    padding: 16px 14px;
    border-color: var(--ink);
  }

  .contact-form textarea { min-height: 235px; }

  .btn-connect {
    display: block;
    width: 100%;
    margin-top: 34px;
    padding: 17px;
  }

  .page-contact .site-footer {
    display: block;
    margin-top: 130px;
    padding: 40px 20px 60px;
  }
}
