/* =============================================================================
   Emily Zeman — Portfolio
   Translated from Figma (WU4R7xrqD5ckhwInAxA4Fn / node 712:6418)
   ============================================================================= */


/* =============================================================================
   0. Local Fonts
   ============================================================================= */

@font-face {
  font-family: 'Geist';
  src: url('Geist/Geist-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist';
  src: url('Geist/Geist-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist';
  src: url('Geist/Geist-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Geist';
  src: url('Geist/Geist-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist';
  src: url('Geist/Geist-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist';
  src: url('Geist/Geist-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


/* =============================================================================
   1. Design Tokens
   ============================================================================= */

:root {
  /* Colors */
  --color-cream:        #fcf8f2;
  --color-tan:          #f0ece9;
  --color-white:        #ffffff;
  --color-dark:         #1f1e1d;
  --color-darkest:      #101828;
  --color-border:       #e0ddd9;
  --color-cta:          #ffdba9;
  --color-text:         #000000;
  --color-text-muted:   #595857;
  --color-text-mid:     #6A6968;
  --color-text-light:   #8B8885;
  --color-footer-div:   #364153;

  /* Typography */
  --font-serif: 'gelica', Georgia, 'Times New Roman', serif;
  --font-sans:  'Geist', 'Inter', system-ui, -apple-system, sans-serif;
}


/* =============================================================================
   2. Reset & Base
   ============================================================================= */

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--color-cream);
  color: var(--color-text);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

ul {
  list-style: none;
}

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

img {
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}


/* =============================================================================
   3. Navigation
   ============================================================================= */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(252, 248, 242, 0.8);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding-top: 5px;
  padding-bottom: 5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

/* Dark mode — used on project pages when hero is in view */
.nav--dark {
  background-color: rgba(31, 30, 29, 1);
  border-bottom-color: #666563;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 160px;
}

/* Brand / Logo */
.nav__brand {
  position: relative;
  display: block;
  width: 131px;
  height: 31px;
  flex-shrink: 0;
}

.nav__brand-icon {
  position: absolute;
  left: 0;
  top: 4.7px;
  width: 20.3px;
  height: 17.1px;
  filter: brightness(0);           /* light mode — force pure black */
  transition: filter 0.35s ease;
}

.nav--dark .nav__brand-icon {
  filter: brightness(0) invert(1); /* dark mode — force pure white */
}

.nav__brand-name {
  position: absolute;
  left: 25.8px;
  top: 4.7px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.1px;
  color: var(--color-text);
  white-space: nowrap;
  transition: color 0.35s ease;
}

.nav--dark .nav__brand-name {
  color: var(--color-cream);
}

/* Nav links */
.nav__links {
  display: flex;
  align-items: stretch; /* allow items to fill full nav height for dropdown hit area */
  gap: 25px;
}

.nav__link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: -0.1px;
  color: var(--color-text-muted);
  white-space: nowrap;
  transition: color 0.35s ease;
}

.nav--dark .nav__link:not(.nav__link--cta) {
  color: var(--color-cream);
}

.nav__link--cta {
  background-color: var(--color-cta);
  color: var(--color-text);
  font-weight: 500;
  border-radius: 5px;
  padding: 6px 12px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.nav__link--cta:hover {
  background-color: #000000;
  color: var(--color-cta);
}

/* Animated underline on Work and About */
.nav__link--underline {
  position: relative;
}

.nav__link--underline::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 6px;
  right: 6px;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.nav__link--underline:hover::after {
  transform: scaleX(1);
}

/* Dropdown item — stretches full nav height so top:100% lands below the nav bar */
.nav__item--dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

/* Dropdown panel */
.nav__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 6px 0;
  min-width: 220px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}

.nav__item--dropdown:hover .nav__dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Invisible bridge that fills the gap between the nav item and the dropdown panel,
   so moving the mouse downward doesn't break the hover chain */
.nav__dropdown::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 12px;
}

/* Dropdown links */
.nav__dropdown-link {
  display: block;
  padding: 9px 18px;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.2;
  color: var(--color-text-muted);
  white-space: nowrap;
  position: relative;
  transition: color 0.2s ease;
}

.nav__dropdown-link::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 18px;
  right: 18px;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.nav__dropdown-link:hover {
  color: var(--color-text);
}

.nav__dropdown-link:hover::after {
  transform: scaleX(1);
}


/* Anchor scroll offset — accounts for sticky nav height */
#work,
#about {
  scroll-margin-top: 120px;
}


/* =============================================================================
   4. Hero
   ============================================================================= */

.hero {
  padding: 150px 160px;
  max-width: 1440px;
  margin: 0 auto;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}

.hero__headline {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 110px;
  line-height: 1.2;
  letter-spacing: -0.01px;
  color: var(--color-text);
}

.hero__tagline {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.36px;
  color: var(--color-text-muted);
  max-width: 722px;
}


/* =============================================================================
   5. Projects Carousel
   ============================================================================= */

.projects {
  padding-bottom: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Stage: column layout — track on top, nav buttons below */
.projects__stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Track: clips the translating carousel and holds a fixed height equal to the
   tallest card (data-pos="0" = 485.8px). This prevents card height transitions
   from shifting the section below. The track is also a flex container so the
   carousel row stays vertically centred as its own height fluctuates. */
.projects__track {
  width: 100%;
  height: 491.8px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Carousel row — JS drives position via translateX; transition set dynamically */
.projects__carousel {
  display: flex;
  align-items: center;   /* vertically centre cards relative to each other */
  gap: 20px;
  width: max-content;
  will-change: transform;
  /* transition is applied/removed by JS; do not set it here */
}

/* ---- Card base ---- */
.project-card {
  position: relative;
  border-radius: 18px;
  flex-shrink: 0;
  overflow: hidden;   /* clip content when card shrinks */
  cursor: pointer;
  box-shadow: 0 0 0 0 #ffdba9;
  transition: box-shadow 0.2s ease;
}

.project-card:hover {
  box-shadow: 0 0 0 3px #ffdba9;
}

.project-card--white { background-color: var(--color-white); }
.project-card--tan   { background-color: var(--color-tan); }

/* ---- Card dimensions by position (data-pos set by JS) ----
   Maths check at 20 px gap, 1440 px viewport:
     centre-card centre        = 720 px
     adjacent centres          = 720 ± 437 px  → [283, 1157]  fully visible
     edge centres              = 720 ± 772 px  → [-52, 1492]  ~80 px peeking in
   ---- */
.project-card[data-pos="0"] { width: 468.7px; height: 485.8px; padding: 25.6px 28.1px 28px; opacity: 1;    }
.project-card[data-pos="1"] { width: 365px;   height: 378.3px; padding: 20px 22.1px 22px;   opacity: 0.70; }
.project-card[data-pos="2"] { width: 264.6px; height: 274.2px; padding: 14.4px 16px 16px;   opacity: 0.35; }

.project-card[data-pos="1"] .project-card__title { font-size: 24px; }
.project-card[data-pos="2"] .project-card__title { font-size: 20px; }

.project-card[data-pos="1"] .project-card__desc  { font-size: 14px; }
.project-card[data-pos="2"] .project-card__desc  { font-size: 12px; }


/* Card sizes and opacity are driven by JS inline styles during animation;
   data-pos (set by CSS rules above) takes over once the animation completes. */

/* ---- Image placeholder ---- */
.project-card__image {
  width: 100%;
  border-radius: 14.2px;
}

.project-card[data-pos="0"] .project-card__image { height: 215.6px; }
.project-card[data-pos="1"] .project-card__image { height: 167.9px; }
.project-card[data-pos="2"] .project-card__image { height: 121.7px; }

.project-card__image--white { background-color: var(--color-white); }
.project-card__image--tan   { background-color: var(--color-tan); }

/* ---- Card text ---- */
.project-card__info {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
  letter-spacing: -0.2841px;
}

.project-card__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  color: var(--color-text);
}

.project-card__desc {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text-mid);
}

/* "text highlights" — rendered in body black, not gray */
.project-card__desc strong {
  font-weight: 400;
  color: var(--color-text);
}


/* ---- Tag — pinned to bottom-left of card ---- */
.project-card__tag {
  position: absolute;
  bottom: 22px;
  left: 22.3px;
  display: inline-flex;
  align-items: center;
  padding: 3.1px 6.25px;
  background-color: var(--color-cream);
  border-radius: 3px;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 12px;
  line-height: 1;
  color: var(--color-text-light);
  white-space: nowrap;
}

.project-card[data-pos="2"] .project-card__tag {
  opacity: 0;
  pointer-events: none;
}

.project-card__tag {
  transition: opacity 0.4s ease;
}

/* ---- Prev / Next buttons ---- */
.projects__nav {
  display: flex;
  align-items: center;
  gap: 26.6px;
  margin-top: 18px;
}

.projects__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width:  30.8px;
  height: 30.8px;
  background-color: var(--color-tan);
  border-radius: 50%;
  padding: 0;
  transition: background-color 0.2s ease;
}

.projects__btn:hover {
  background-color: #ffdba9;
}

.projects__btn-icon {
  width:  19.7px;
  height: 19.7px;
}

.projects__btn-icon--back {
  transform: rotate(180deg);
}

.projects__btn-icon path {
  transition: stroke 0.2s ease;
}

.projects__btn:hover .projects__btn-icon path {
  stroke: #000000;
}


/* =============================================================================
   6. Contributions
   ============================================================================= */

.contributions {
  padding: 0 160px 150px;
  max-width: 1440px;
  margin: 0 auto;
}

.contributions__intro {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.2px;
  color: var(--color-text);
  margin-bottom: 28px;
}

.contributions__cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.contributions__card {
  background-color: var(--color-white);
  border-radius: 18px;
  Padding-top: 28px;
  Padding-right: 16px;
  Padding-left: 23px;
  Padding-bottom: 28px;
  display: flex;
  flex-direction: column;
}

.contributions__kpi {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.5px;
  color: var(--color-text);
}

.contributions__headline {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: -0.2px;
  color: var(--color-text);
  margin-top: 10px;
}

/* See details / See less buttons */
.contributions__see-details,
.contributions__see-less {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: -0.1px;
  color: var(--color-text-muted);
  padding: 0;
  position: relative;
  margin-top: 16px;
}

.contributions__see-details {
  margin-top: auto;
  padding-top: 16px;
}

.contributions__see-details::after,
.contributions__see-less::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-text-muted);
  transition: width 0.35s ease;
}

.contributions__see-details:hover::after,
.contributions__see-less:hover::after {
  width: 100%;
}

.contributions__card.is-expanded .contributions__see-details {
  display: none;
}

/* Expandable detail area */
.contributions__detail-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease;
}

.contributions__card.is-expanded .contributions__detail-wrap {
  grid-template-rows: 1fr;
}

.contributions__detail-inner {
  overflow: hidden;
  min-height: 0;
}

.contributions__detail {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.1px;
  color: var(--color-text-muted);
  margin-top: 16px;
  opacity: 0;
  transition: opacity 0.3s ease 0.15s;
}

.contributions__card.is-expanded .contributions__detail {
  opacity: 1;
}

.contributions__see-less {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, width 0.35s ease;
}

.contributions__card.is-expanded .contributions__see-less {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.25s ease 0.3s, width 0.35s ease;
}


/* =============================================================================
   7. About
   ============================================================================= */

.about {
  overflow: hidden; /* contain rotated gallery edges */
}

.about__content {
  padding: 0px 160px 60px;
  max-width: 1440px;
  margin: 0 auto;
}

.about__inner {
  display: grid;
  grid-template-columns: 63fr 7fr 30fr;
  align-items: start;
}

.about__right {
  grid-column: 3;
  Padding-top: 0px;
}

.about__right .about__label {
  margin-bottom: 30px;
}

/* Label */
.about__label {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

/* Heading */
.about__heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 60px;
  line-height: 1.2;
  letter-spacing: -0.36px;
  color: var(--color-text);
  margin-bottom: 24px;
}

.about__desc {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

/* Headshot */
.about__photo-wrap {
  width: 233px;
  height: 233px;
  overflow: hidden;
  border-radius: 23px;
  margin-bottom: 28px;
  position: relative;
}

.about__photo {
  position: absolute;
  left: -107px;
  top: -176px;
  width: 470px;
  height: auto;
}

/* Audio button */
.about__audio-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0;
}

.about__speaker-icon {
  width: 33px;
  height: 31px;
  flex-shrink: 0;
  filter: brightness(0);
}

.about__audio-text {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.2px;
  color: var(--color-text-muted);
  text-decoration: underline;
  white-space: nowrap;
}

.about__audio-btn:hover .about__audio-text {
  color: var(--color-text);
}

/* Right column — accordion */
.about__item {
  border-top: 1px solid var(--color-border);
}

.about__item:last-child {
  border-bottom: 1px solid var(--color-border);
}

.about__item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
}

.about__item-subhead {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 27px;
  line-height: 1.2;
  color: var(--color-text);
  text-align: left;
  position: relative;
  align-self: flex-start;
}

.about__item-subhead::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-text);
  transition: width 0.35s ease;
}

.about__item-subhead:hover::after {
  width: 100%;
}

.about__item-plus {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 300;
  color: var(--color-text-muted);
  flex-shrink: 0;
  line-height: 1;
  transition: transform 0.3s ease;
}

.about__item.is-expanded .about__item-plus {
  transform: rotate(45deg);
}

/* Expand/collapse body */
.about__item-body-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease;
}

.about__item.is-expanded .about__item-body-wrap {
  grid-template-rows: 1fr;
}

.about__item-body-inner {
  overflow: hidden;
  min-height: 0;
}

.about__item-body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text-muted);
  padding-bottom: 18px;
  opacity: 0;
  transition: opacity 0.3s ease 0.15s;
}

.about__item.is-expanded .about__item-body {
  opacity: 1;
}


/* Gallery photos — full page width */
.about__gallery {
  display: flex;
  gap: 80px;
  align-items: center;
  padding: 0px 160px 80px;
}

.about__gallery-img {
  border-radius: 16px;
  background-color: var(--color-tan);
  border: 1px solid var(--color-border);
  background-size: cover;
  background-position: center;
  height: 300px;
  position: relative;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.about__gallery:hover .about__gallery-img {
  opacity: 0.5;
}

.about__gallery:hover .about__gallery-img:hover {
  opacity: 1;
}

.about__gallery-caption {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background-color: #000;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  padding: 2px;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.about__gallery-img:hover .about__gallery-caption {
  opacity: 1;
}

.about__gallery-img--1 {
  flex: 3;
  transform: rotate(-3deg);
}
.about__gallery-img--1.fade-up { transform: translateY(28px) rotate(-3deg); }
.about__gallery-img--1.fade-up.is-visible { transform: translateY(0) rotate(-3deg); }

.about__gallery-img--2 {
  flex: 5;
  transform: rotate(2deg);
}
.about__gallery-img--2.fade-up { transform: translateY(28px) rotate(2deg); }
.about__gallery-img--2.fade-up.is-visible { transform: translateY(0) rotate(2deg); }

.about__gallery-img--3 {
  flex: 4;
  transform: rotate(-2.5deg);
}
.about__gallery-img--3.fade-up { transform: translateY(28px) rotate(-2.5deg); }
.about__gallery-img--3.fade-up.is-visible { transform: translateY(0) rotate(-2.5deg); }


/* =============================================================================
   8. Footer
   ============================================================================= */

.site-footer {
  background-color: var(--color-dark);
  padding-top: 5px;
  padding-bottom: 5px;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 160px;
}

.site-footer__copy {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: -0.1px;
  color: var(--color-cream);
  white-space: nowrap;
}

.site-footer__links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-footer__link {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: -0.1px;
  color: var(--color-cream);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}

.site-footer__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-cream);
  transition: width 0.35s ease;
}

.site-footer__link:hover::after {
  width: 100%;
}


/* =============================================================================
   9. Project Page
   ============================================================================= */

/* ── Hero (dark) ── */
.project-hero {
  background-color: var(--color-dark);
}

.project-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: left;
  text-align: left;
  gap: 35px;
  padding: 120px 160px 130px;
  max-width: 1440px;
  margin: 0 auto;
}

.project-hero__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 90px;
  line-height: 1.2;
  letter-spacing: -0.01px;
  color: var(--color-white);
}

.project-hero__lower {
  display: flex;
  width: 100%;
  gap: 80px;
  align-items: flex-start;
  text-align: left;
}

.project-hero__summary-wrap {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: flex-start;
}

.project-hero__summary {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 24px;
  line-height: 1.5;
  letter-spacing: -0.36px;
  color: #e6e2dd;
}

.project-hero__metrics {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-hero__metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
  /*border-bottom: 1px solid #666563;*/
}

 .project-hero__metric:first-child {
  margin-top: -9px;
  /*border-top: 1px solid #666563;*/
}

.project-hero__metric-label {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: -0.2px;
  color: rgba(230, 226, 221, 0.5);
}

.project-hero__metric-value {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: -0.2px;
  color: #e6e2dd;
}

/* Hero image bridge — gradient wrapper provides 1/3 dark, 2/3 cream background */
.project-hero-img-wrap {
  background: linear-gradient(to bottom, var(--color-dark) 33.333%, var(--color-cream) 33.333%);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.project-hero-img-wrap.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.project-hero-img-inner {
  padding: 0 160px;
  max-width: 1440px;
  margin: 0 auto;
}

.project-hero-img {
  width: 100%;
  aspect-ratio: 1280 / 670;
  background-color: rgba(255, 255, 255, 0.08);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  border-radius: 25px;
}

/* Context + My Role — side by side */
.project-context-role {
  display: flex;
  gap: 80px;
}

.project-context-role .project-section--row {
  flex: 1;
}

/* ── Details (light) ── */
.project-details {
  display: flex;
  flex-direction: column;
  gap: 100px;
  padding: 80px 160px 100px;
  max-width: 1440px;
  margin: 0 auto;
}

/* Section label + body text — shared across Context / My Role / etc. */
.project-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.project-section__label {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1;
  letter-spacing: -0.2841px;
  color: #706e69;
}

.project-section__body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.5;
  letter-spacing: -0.36px;
  color: var(--color-text);
  max-width: 960px;
  white-space: pre-wrap;
}

/* Row variant — label left, body right, both top-aligned */
.project-section--row {
  flex-direction: row;
  gap: 40px;
  align-items: flex-start;
}

.project-section--row .project-section__label {
  flex-shrink: 0;
}

.project-section--row .project-section__body {
  flex: 1;
  max-width: none;
  margin-top: -6px; /* compensate for half-leading above the first line */
}

.project-section--impact {
  width: 80%;
}

/* Full-width image */
.project-fullimg {
  width: 100%;
  height: 670px;
  background-color: var(--color-white);
  border-radius: 25px;
}

/* ── Process ── */
.project-process {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project-process__steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.project-process__step {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--color-white);
  border-radius: 14px;
  padding: 18px 24px 24px;
  min-height: 240px;
}

.project-process__num {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.2px;
  color: var(--color-tan);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.project-process__text {
  align-self: flex-end;
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  letter-spacing: -0.36px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Sequential reveal: card → number → text */
.project-process__step.is-visible .project-process__num {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.25s;
}

.project-process__step.is-visible .project-process__text {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.45s;
}

.project-process__headline {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.3;
  color: var(--color-text);
}

.project-process__desc {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text-mid);
}

/* ── Work scroll strip ── */
.project-work {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project-final {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project-final__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 40px;
  margin-left:  calc(-160px - max(0px, (100vw - 1440px) / 2));
  margin-right: calc(-160px - max(0px, (100vw - 1440px) / 2));
  padding-left:  max(160px, calc((100vw - 1440px) / 2 + 160px));
  padding-right: max(160px, calc((100vw - 1440px) / 2 + 160px));
}

.project-final__img {
  background-color: var(--color-white);
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  aspect-ratio: 16 / 9; /* overridden per-image by JS */
  min-width: 0;
}

.project-work__track {
  overflow-x: auto;
  overflow-y: hidden;
  margin-left:  calc(-160px - max(0px, (100vw - 1440px) / 2));
  margin-right: calc(-160px - max(0px, (100vw - 1440px) / 2));
  scrollbar-width: none; /* Firefox */
  scroll-padding-left: max(160px, calc((100vw - 1440px) / 2 + 160px));
}
.project-work__track::-webkit-scrollbar { display: none; } /* Chrome, Safari */

.project-work__reel {
  display: flex;
  gap: 40px;
  width: max-content;
  padding-left:  max(160px, calc((100vw - 1440px) / 2 + 160px));
  padding-right: max(160px, calc((100vw - 1440px) / 2 + 160px));
  align-items: center;
}

.project-work__scrollbar {
  width: 150px;
  height: 9px;
  background-color: var(--color-tan);
  border-radius: 99px;
  position: relative;
  overflow: hidden;
  align-self: center;
  cursor: pointer;
}

.project-work__scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: #8B8885;
  border-radius: 99px;
  transition: left 0.05s linear;
  cursor: grab;
}

.project-work__scrollbar-thumb:active {
  cursor: grabbing;
}

.project-work__nav {
  display: none;
}

.project-work__img {
  width:  500px;
  height: 500px;
  flex-shrink: 0;
  background-color: var(--color-white);
  border-radius: 12px;
}

/* ── Impact ── */
/*.project-impact {
  display: flex;
  flex-direction: column;
  gap: 15px;
}*/

/* Show only the relevant metric variant based on data-metrics attribute */
.project-impact[data-metrics="numbers"] .metrics-text    { display: none; }
.project-impact[data-metrics="text"]    .metrics-numbers { display: none; }

/*.metrics-numbers,
.metrics-text {
  display: flex;
  gap: 40px;
}

.metrics-number,
.metrics-text__item {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.metrics-number__value {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 60px;
  line-height: 1.3;
  letter-spacing: -0.36px;
  color: var(--color-text);
}

.metrics-number__detail,
.metrics-text__detail {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.36px;
  color: var(--color-text-mid);
}

.metrics-text__headline {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.36px;
  color: var(--color-text);
}*/


/* =============================================================================
   10. Lightbox
   ============================================================================= */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  cursor: default;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease;
  padding: 4px 8px;
}

.lightbox__close:hover {
  opacity: 1;
}

/* =============================================================================
   11. Project Pagination (Prev / Next)
   ============================================================================= */

.project-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 50px 160px;
  background-color: var(--color-cream);
}

.project-pagination__prev,
.project-pagination__next {
  display: flex;
  align-items: flex-end; /* arrow bottom aligns with name bottom → centres match */
  gap: 20px;
}

.project-pagination__info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-pagination__info--right {
  text-align: right;
}

.project-pagination__label {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: -0.1px;
  color: var(--color-text-muted);
}

.project-pagination__name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.3636px;
  color: var(--color-text);
  position: relative;
}

/* Underline animates left → right on hover */
.project-pagination__name::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-text);
  transition: width 0.35s ease;
}

.project-pagination__prev:hover .project-pagination__name::after,
.project-pagination__next:hover .project-pagination__name::after {
  width: 100%;
}

.project-pagination__arrow {
  font-family: var(--font-sans);
  font-size: 28px;
  line-height: 1;
  color: var(--color-text);
}


/* =============================================================================
   11. Scroll Animations
   ============================================================================= */

.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================================================
   12. Mobile — 700px and below
   ============================================================================= */

@media (max-width: 700px) {

  /* ── Nav ── */
  .nav__inner {
    padding: 0 40px;
  }

  /* ── Homepage hero ── */
  .hero {
    padding: 60px 40px 60px;
  }

  /* ── Homepage project carousel → single column ── */
  .projects__track {
    height: auto;
    overflow: visible;
  }
  .projects__carousel {
    display: grid;
    grid-template-columns: 1fr;
    transform: none !important;
    width: 100%;
    padding: 0 40px 40px;
    gap: 16px;
  }
  .project-card {
    width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
    padding: 20px !important;
  }
  /* Image height — beats data-pos rules and inline JS animation styles */
  .project-card__image {
    height: auto !important;
    aspect-ratio: 2.17 / 1;
  }
  /* Hide cloned cards (used only by the desktop seamless-loop carousel) */
  .project-card[aria-hidden="true"] { display: none !important; }
  .projects__nav { display: none; }

  /* ── Contributions — single column ── */
  .contributions {
    padding: 0 40px 80px;
  }
  .contributions__cards {
    grid-template-columns: 1fr;
  }

  /* ── About — left, then right, then gallery stacked ── */
  .about__content {
    padding: 0 40px 40px;
  }
  .about__inner {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }
  .about__right {
    grid-column: auto;
  }
  .about__gallery {
    flex-direction: column;
    padding: 0 40px 60px;
    gap: 20px;
  }
  .about__gallery-img {
    flex: none;
    width: 100%;
    transform: none;
  }
  .about__gallery-img--1.fade-up,
  .about__gallery-img--2.fade-up,
  .about__gallery-img--3.fade-up           { transform: translateY(28px); }
  .about__gallery-img--1.fade-up.is-visible,
  .about__gallery-img--2.fade-up.is-visible,
  .about__gallery-img--3.fade-up.is-visible { transform: translateY(0); }

  /* ── Footer ── */
  .site-footer__inner {
    padding: 0 40px;
  }

  /* ── Project hero ── */
  .project-hero__inner {
    padding: 60px 40px 60px;
  }
  .project-hero__lower {
    flex-direction: column;
    gap: 32px;
  }
  .project-hero-img-inner {
    padding: 0 40px;
  }

  /* ── Project details ── */
  .project-details {
    padding: 40px 40px 60px;
    gap: 60px;
  }

  /* Context above My Role */
  .project-context-role {
    flex-direction: column;
    gap: 40px;
  }

  /* Process steps — single column */
  .project-process__steps {
    grid-template-columns: 1fr;
  }

  /* ── Work strip → single column grid ── */
  .project-work__scrollbar { display: none; }
  .project-work__nav { display: none; }
  .project-work__track {
    margin-left: 0;
    margin-right: 0;
    overflow: visible;
  }
  .project-work__reel {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 16px;
    padding: 0;
  }
  .project-work__img {
    width: 100% !important;
    height: auto !important;
    padding-bottom: var(--ratio-padding, 100%);
  }

  /* ── Final product grid → single column on mobile ── */
  .project-final__grid {
    grid-template-columns: 1fr;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    gap: 16px;
  }
  .project-final__img {
    grid-column: span 1 !important;
  }

  /* ── Typography ── */

  /* Nav */
  .nav__brand-name      { font-size: 14px; }
  .nav__link            { font-size: 13px; }
  .nav__dropdown-link   { font-size: 13px; }

  /* Homepage hero */
  .hero__headline       { font-size: 64px; }
  .hero__tagline        { font-size: 20px; }

  /* Project cards (carousel disabled on mobile — single size, beats inline JS) */
  .project-card__title,
  .project-card[data-pos="1"] .project-card__title,
  .project-card[data-pos="2"] .project-card__title { font-size: 20px !important; }
  .project-card__desc,
  .project-card[data-pos="1"] .project-card__desc,
  .project-card[data-pos="2"] .project-card__desc  { font-size: 16px !important; }
  .project-card__tag { display: none; }

  /* Contributions */
  .contributions__intro     { font-size: 16px; }
  .contributions__kpi       { font-size: 32px; }
  .contributions__headline  { font-size: 20px; }
  .contributions__detail    { font-size: 14px; }
  .contributions__see-less  { font-size: 12px; }

  /* About */
  .about__label         { font-size: 14px; }
  .about__heading       { font-size: 32px; }
  .about__desc          { font-size: 16px; }
  .about__item-subhead  { font-size: 20px; }
  .about__item-plus     { font-size: 18px; }
  .about__item-body     { font-size: 14px; }

  /* Footer */
  .site-footer__copy    { font-size: 12px; }
  .site-footer__link    { font-size: 12px; }

  /* Project hero */
  .project-hero__title          { font-size: 56px; }
  .project-hero__summary        { font-size: 18px; }
  .project-hero__metric-label   { font-size: 13px; }
  .project-hero__metric-value   { font-size: 13px; }

  /* Project body */
  .project-section--impact    { width: 100%; }
  .project-section__label     { font-size: 12px; }
  .project-section__body      { font-size: 16px; }
  .project-process__num       { font-size: 32px; }
  .project-process__headline  { font-size: 16px; }
  .project-process__desc      { font-size: 13px; }

  /* Project metrics blocks */
  .metrics-number__value      { font-size: 32px; }
  .metrics-text__headline     { font-size: 20px; }
  .metrics-text__detail       { font-size: 14px; }

  /* Project pagination */
  .project-pagination         { padding: 50px 40px; }
  .project-pagination__label  { font-size: 12px; }
  .project-pagination__name   { font-size: 20px; }
  .project-pagination__arrow  { font-size: 20px; }

}
