/* ===== FONTS ===== */
@font-face {
  font-family: 'PP Neue Montreal';
  src: url('fonts/PPNeueMontreal-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PP Neue Montreal';
  src: url('fonts/PPNeueMontreal-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ===== VARIABLES ===== */
:root {
  --black: #1a1a1a;
  --gray: #e3e3e3;
  --white: #f5f5f5;
  --red: #da382e;
  --green: #167d4f;
  --font: 'PP Neue Montreal', sans-serif;
  --col-gap: 0.8vw;
  --row-gap: 1.3698vh;
  --pad-x: 1.6vw;
  --pad-top: 1.3698vh;
  --row-h: 10.9584vh;
  --nav-h: 4.1094vh;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: var(--font);
  background-color: var(--black);
  color: var(--black);
  min-height: 100%;
  overflow: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: inline-block; vertical-align: middle; }
h1 { font-weight: 500; }

/* ===== LOADER ===== */
.loader-wrapper {
  z-index: 150;
  background-color: var(--gray);
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 0; left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loader-section {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(8, var(--row-h));
  gap: var(--row-gap) var(--col-gap);
  padding: var(--pad-top) var(--pad-x) 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}
.loader-text {
  font-family: var(--font);
  font-size: 1.36986vh;
  font-weight: 600;
  line-height: 1.35vh;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 0.023vh;
  align-self: end;
}
.loader-text.t1 { grid-column: 1 / 3; grid-row: 8; }
.loader-text.t2 { grid-column: 5 / 7; grid-row: 8; }
.loader-text.t3 { grid-column: 9 / 11; grid-row: 8; }
.loader-number {
  grid-column: 1 / 7;
  grid-row: 1 / 8;
  font-family: var(--font);
  font-size: 26.0274vh;
  font-weight: 500;
  line-height: 100%;
  letter-spacing: -0.78vh;
  color: var(--black);
  align-self: end;
  margin-bottom: -3.65vh;
}
.counter-heading {
  grid-column: 7 / 8;
  grid-row: 1 / 8;
  font-family: var(--font);
  font-size: 26.0274vh;
  font-weight: 500;
  line-height: 100%;
  letter-spacing: -0.78vh;
  color: var(--black);
  align-self: end;
  margin-bottom: -3.65vh;
}

/* ===== MEGA WRAP ===== */
.mega-wrap {
  display: none;
}
.page-wrap {
  background-color: var(--white);
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* ===== NAV ===== */
.menu {
  z-index: 100;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px var(--col-gap);
  border-bottom: 0.3px solid rgba(26, 26, 26, 0.5);
  height: var(--nav-h);
  padding: var(--pad-top) var(--pad-x) 0;
  position: fixed;
  top: 0; left: 0; right: 0;
  background-color: var(--white);
  align-items: center;
}
.menu-item { display: flex; align-items: center; gap: 0.8vh; }
.menu-toggle-wrap { grid-column: 1 / 2; }
.menu-current-page { grid-column: 2 / 4; display: flex; align-items: center; gap: 0.6vw; }
.nav-title { grid-column: 5 / 8; justify-self: center; display: flex; align-items: center; position: relative; overflow: hidden; }
.grid-toggle { grid-column: 12 / 13; justify-self: end; display: flex; align-items: center; gap: 0.4vh; }

.vertical-stroke {
  background-color: var(--black);
  width: 1px;
  height: var(--row-gap);
}

/* ===== TITLE (small uppercase text) ===== */
/* Fix #10: title needs margin-top: .4vh per original */
.title {
  color: var(--black);
  letter-spacing: 0.023vh;
  text-transform: uppercase;
  font-family: var(--font);
  font-size: 1.1741vh;
  font-weight: 500;
  line-height: var(--row-gap);
  margin-top: 0.4vh;
  margin-bottom: 0;
}
.title.sub-divider { padding-top: 0.8vh; }
.title.project-page { font-size: 1.1741vh; margin-top: 0.4vh; }
.title.lable { color: var(--white); font-size: 1.1741vh; }
.title.bottom-align { margin-bottom: 0; }
.title.index { text-transform: uppercase; }
.title.div-cta-title { padding-top: 0.5vh; }

/* ===== HEADING ===== */
.heading {
  color: var(--black);
  letter-spacing: -0.05vh;
  font-family: var(--font);
  font-size: 5.4794vh;
  font-weight: 500;
  line-height: 100%;
  margin: 0 0 -0.635vh 0;
}
.heading.sub-divider { margin-top: 5vh; }

/* ===== SUBHEADING ===== */
.subheading {
  color: var(--black);
  font-family: var(--font);
  font-size: 2.7397vh;
  font-weight: 500;
  line-height: 100%;
  margin: 0;
}
.subheading.bottom-align { margin-bottom: -0.5vh; }

/* ===== DISPLAY HEADING (giant title) ===== */
.display-heading {
  color: var(--black);
  letter-spacing: -0.78vh;
  font-family: var(--font);
  font-size: 26.0274vh;
  font-weight: 500;
  line-height: 100%;
  margin: 0 0 -3.65vh 0;
  white-space: nowrap;
}
.display-heading.sx-indent { margin-left: -0.4vh; }

/* Fix #7: display-title-container uses vh units like the original */
.display-title-container {
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  margin-bottom: -1vh;
  margin-left: -1vh;
  padding-bottom: 1vh;
  padding-left: 1vh;
  display: flex;
  overflow: hidden;
}
.display-title-container.mobile { display: none; }
.display-title-container.with-line {
  flex-flow: row;
  justify-content: flex-start;
  align-items: flex-end;
  padding-left: 1vh;
}
/* Fix #13: desktop.with-line specific styles */
.display-title-container.desktop.with-line {
  justify-content: flex-end;
  align-items: flex-end;
  padding-left: 5vh;
}
.display-title-container.desktop { display: flex; }
.display-title-container.footer-display { display: none; }

/* ===== BODY TEXT ===== */
.body-text {
  color: var(--black);
  font-family: var(--font);
  font-size: 1.36986vh;
  font-weight: 600;
  line-height: 1.35vh;
  margin: 0.3vh 0 0;
  display: block;
}
.body-text.indent { text-indent: 2.5vw; }
.body-text.indent.off-grid { margin-top: 0.2vh; margin-left: 2.5vw; }
.body-text.indent._2nd-paragraph { margin-top: 0.1vh; }

.body-text-container { display: block; }
.body-text-container.sub-divider { padding-top: 0.8vh; }

/* ===== DIVIDER ===== */
.divider {
  z-index: 95;
  background-color: var(--black);
  opacity: 0.5;
  width: 100%;
  height: 0.3px;
  max-height: 0.3px;
}
.divider.sub-title { margin-top: 2.7396vh; }
.divider.bottom-footer-desktop { margin-top: -1.85vh; }

.divider-hover {
  z-index: 95;
  background-color: var(--black);
  opacity: 1;
  width: 100%;
  height: 1.5px;
  transform: translateX(110%);
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  position: absolute;
  top: 0;
}

/* ===== LABEL (black tag) ===== */
.label {
  z-index: 98;
  background-color: var(--black);
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  height: var(--row-gap);
  margin-right: calc(-1 * var(--pad-x));
  position: relative;
  padding: 0 0.4vw;
}
.label.sx {
  margin-left: -0.85vw;
  margin-right: 0;
  padding-left: 0.85vw;
}

/* ===== BUTTONS ===== */
.button-small {
  z-index: 99;
  display: flex;
  gap: 0.8vh;
  color: var(--black);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.button-small.sub-divider { padding-top: 1.4vh; }

.button-small-external {
  z-index: 99;
  display: flex;
  gap: 0.8vh;
  color: var(--black);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  align-items: center;
}
.button-small-external.title-off-grid { padding-left: 0; }

.internal-button-small {
  z-index: 99;
  display: flex;
  gap: 0.8vh;
  color: var(--black);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  align-items: center;
}
.internal-button-small.index {
  flex-direction: column;
  height: 1.4vh;
  overflow: hidden;
}

.small-button-underline {
  background-color: var(--black);
  height: 1px;
  position: absolute;
  bottom: 0; left: 0; right: 0;
  transform: translateX(-101%);
  transition: transform 0.3s ease;
}

.medium-button-underline {
  background-color: var(--black);
  height: 1px;
  position: absolute;
  bottom: -0.35vh; left: 0; right: 0;
  transform: translateX(-15vw);
  transition: transform 0.3s ease;
}

/* Hover effects */
.button-small:hover .small-button-underline,
.button-small-external:hover .small-button-underline,
.internal-button-small:hover .small-button-underline {
  transform: translateX(0);
}
.index-title-button:hover .medium-button-underline {
  transform: translateX(0);
}

/* ===== ICONS ===== */
.icon-small { height: 0.8vh; align-self: center; }
.icon-small.inline-button { margin-bottom: -0.4vh; }
.icon-medium { height: var(--row-gap); }
.icon-big { height: 3vh; }

/* ===== IMAGE ===== */
.image {
  mix-blend-mode: darken;
  object-fit: cover;
  border-radius: var(--row-gap);
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ===== SECTION (grid) ===== */
.section {
  z-index: 96;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(8, var(--row-h));
  gap: var(--row-gap) var(--col-gap);
  padding: var(--pad-top) var(--pad-x) 0;
  overflow: hidden;
}

/* Section variants */
.section.hero-home {
  grid-template-rows: repeat(8, var(--row-h));
}
.section.aug-1 {
  grid-template-rows: repeat(16, var(--row-h));
}
.section._4-rows {
  grid-template-rows: repeat(4, var(--row-h));
}
.section._6-rows {
  grid-template-rows: repeat(6, var(--row-h));
}
.section._11-rows {
  grid-template-rows: repeat(11, var(--row-h));
}
.section.footer {
  grid-template-rows: repeat(6, var(--row-h));
}
/* Fix #3: Index section needs right border */
.section.index {
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  gap: 3.9vh 0;
  padding: 6vh 2.5vw;
  border-right: 7px solid var(--black);
}

/* ===== PAGE CONTAINER ===== */
.page-container {
  width: 100vw;
  height: 100vh;
  display: flex;
  position: relative;
  left: -26.1vw;
}

/* ===== INDEX SIDEBAR ===== */
.index-wrap {
  opacity: 0;
  width: 26.1vw;
  min-width: 26.1vw;
  height: 100vh;
  position: relative;
  overflow: auto;
  transition: opacity 0.4s ease;
}
.index-wrap.open { opacity: 1; }

.index-container {
  z-index: 98;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(11, min-content);
  gap: 3.9vh 0;
  align-content: start;
}

.index-item {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: min-content min-content;
  gap: var(--row-gap) 0;
  overflow: hidden;
}
.index-item.title-container { grid-template-rows: min-content; }
.index-item.project-preview { grid-template-rows: min-content min-content; }

.index-title-button {
  z-index: 99;
  display: flex;
  gap: 1.125vw;
  align-items: flex-end;
  height: 2.7396vh;
  padding-left: 2.5vw;
  text-decoration: none;
  position: relative;
}

.index-heading { margin-bottom: 1vh; }
.index-main-title {
  font-size: 5.4794vh;
  font-weight: 500;
  line-height: 100%;
}

.index-projects-container {
  display: grid;
  gap: 2vh;
}
.index-image-container { width: 100%; }
.image-placeholder {
  background: var(--gray);
  width: 100%;
  padding-bottom: 66%;
  border-radius: var(--row-gap);
}

.index-button-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: -0.36vh;
}
.index-button-container.side-index { margin-top: 0; }

/* ===== PAGE CONTENT ===== */
.page-content {
  width: 100vw;
  min-width: 100vw;
  height: 100vh;
  position: relative;
  overflow: auto;
}

/* ===== HERO SECTION GRID PLACEMENT ===== */
.section.hero-home .display-title-container.mobile { grid-column: 1 / 7; grid-row: 1 / 3; display: none; }
.section.hero-home .display-title-container.with-line:not(.desktop) { grid-column: 1 / 7; grid-row: 1 / 3; }
.section.hero-home .display-title-container:not(.with-line):not(.mobile):not(.desktop) { grid-column: 5 / 10; grid-row: 1 / 3; }
.section.hero-home .sub-menu.desktop {
  grid-column: 1 / 13;
  grid-row: 3;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px var(--col-gap);
  height: 2.7396vh;
  align-items: start;
}
.section.hero-home .sub-menu.desktop > div:nth-child(1) { grid-column: 1 / 4; }
.section.hero-home .sub-menu.desktop > div:nth-child(2) { grid-column: 4 / 7; }
.section.hero-home .sub-menu.desktop > .specs-line-subcontainer { grid-column: 7 / 13; }
.section.hero-home .sub-menu.desktop > .divider { grid-column: 1 / 13; }
.specs-line-subcontainer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.section.hero-home .body-text-container.hero-bio { grid-column: 4 / 8; grid-row: 5 / 7; }
.section.hero-home .heading-container.year-heading { grid-column: 1 / 4; grid-row: 8; align-self: end; }
.section.hero-home .heading-container.portfolio-heading { grid-column: 4 / 8; grid-row: 8; align-self: end; }
.section.hero-home .hero-bottom-divider { grid-column: 1 / 13; grid-row: 8; align-self: end; }
.section.hero-home .hero-graphic { grid-column: 8 / 13; grid-row: 4 / 8; }
.section.hero-home .on-page-index-container { grid-column: 12 / 13; grid-row: 1 / 3; }

.heading-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding-top: 0.8vh;
}
.heading-container.bottom-anchor {
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-end;
  margin-bottom: var(--row-gap);
  gap: 0.8vh;
}
.heading-container.bottom-anchor-on-grid {
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 0.8vh;
}
.heading-container.div-cta-head { margin-bottom: 0; padding-left: 2.5vw; }

/* On-page index */
.on-page-index-container {
  display: flex;
  flex-direction: column;
  margin-top: 4.35vh;
  gap: 0;
}

/* ===== PROJECT LIST SECTION ===== */
/* Fix #4: aug-1 should be 11 rows (original), not 16 or auto */
.section.aug-1 {
  grid-template-rows: repeat(11, var(--row-h));
  gap: var(--row-gap) var(--col-gap);
}
.section.aug-1 .latest-project {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}
.latest-project {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5vh;
}
.latest-project-image {
  border-radius: var(--row-gap);
  width: 100%;
  height: auto;
  mix-blend-mode: darken;
}

/* Project list items */
.project-list {
  z-index: 98;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.4vh var(--col-gap);
  grid-template-rows: auto;
  text-decoration: none;
  grid-column: 1 / 13;
  position: relative;
  padding: 1vh 0 1.5vh;
}
.project-list .divider-hover { grid-column: 1 / 13; position: absolute; top: 0; left: 0; right: 0; }
.project-list .divider { grid-column: 1 / 13; }
.project-list .title.sub-divider { grid-column: 1 / 2; padding-top: 0.4vh; }
.project-list .heading-container { grid-column: 4 / 10; padding-top: 0; }
.project-list .label { grid-column: 12 / 13; align-self: start; }

/* Project hover preview image */
.list-project-preview {
  z-index: 96;
  border-radius: var(--row-gap);
  width: 15.5vw;
  max-width: none;
  display: none;
  position: fixed;
  pointer-events: none;
  object-fit: cover;
  height: auto;
  mix-blend-mode: darken;
}
.project-list:hover .list-project-preview {
  display: block;
}

.project-list:hover .divider-hover {
  transform: translateX(0);
}

/* ===== TRANSITION SECTION ===== */
.section._4-rows > .divider { grid-column: 1 / 13; grid-row: 1; }
.section._4-rows > .body-text-container { grid-column: 4 / 8; grid-row: 1; }
.section._4-rows > .button-small { grid-column: 10 / 13; grid-row: 1; justify-self: end; }
.section._4-rows > .icon-medium { grid-column: 6 / 7; grid-row: 3; justify-self: center; }

/* ===== DESIGN PROCESS SECTION ===== */
.section._11-rows > .heading-container.bottom-anchor { grid-column: 7 / 13; grid-row: 1; }
.section._11-rows > .process-briefing { grid-column: 7 / 10; grid-row: 2; }
.section._11-rows > .process-number { grid-column: 7 / 8; grid-row: 2; }
.section._11-rows > .paragraph-list-container {
  grid-column: 7 / 13;
  grid-row: 3 / 11;
}
.paragraph-list-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, min-content);
  gap: 5.2vh var(--col-gap);
  align-content: start;
}
.paragraph-list-item {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: min-content;
  gap: var(--row-gap) var(--col-gap);
  grid-column: 1 / -1;
}
.paragraph-list-item .label.sx { grid-column: 1 / 2; }
.paragraph-list-item .divider { grid-column: 1 / 6; }
.paragraph-list-item .body-text-container { grid-column: 2 / 6; }

.section._11-rows > .image.process-graph { grid-column: 2 / 5; grid-row: 2 / 9; }
.section._11-rows > .process-caption { grid-column: 7 / 13; grid-row: 11; }
.section._11-rows > .icon-medium { grid-column: 6 / 7; grid-row: 11; justify-self: center; }

.inline-title-container {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(8, var(--row-gap));
  gap: 0;
}
.section._11-rows > .inline-title-container:nth-of-type(1) { grid-column: 7 / 8; grid-row: 3 / 4; }
.section._11-rows > .inline-title-container:nth-of-type(2) { grid-column: 7 / 8; grid-row: 4 / 5; }
.section._11-rows > .inline-title-container:nth-of-type(3) { grid-column: 7 / 8; grid-row: 5 / 6; }
.section._11-rows > .inline-title-container:nth-of-type(4) { grid-column: 7 / 8; grid-row: 6 / 7; }
.section._11-rows > .inline-title-container:nth-of-type(5) { grid-column: 7 / 8; grid-row: 7 / 8; }
.section._11-rows > .inline-title-container:nth-of-type(6) { grid-column: 7 / 8; grid-row: 8 / 9; }

/* ===== PHILOSOPHY SECTION ===== */
.section._6-rows > .philosophy-label { grid-column: 4 / 8; grid-row: 1; align-self: start; }
.section._6-rows > .philosophy-quote {
  grid-column: 2 / 10;
  grid-row: 1 / 4;
  font-size: 5.4794vh;
  line-height: 110%;
  letter-spacing: -0.05vh;
  margin-top: 3vh;
}
.section._6-rows > .divider.sub-title { grid-column: 1 / 13; grid-row: 4; align-self: start; }
.section._6-rows > .icon-medium { grid-column: 6 / 7; grid-row: 5; justify-self: center; }
.section._6-rows > .philosophy-body { grid-column: 4 / 8; grid-row: 4 / 6; padding-top: 1vh; }

/* Fix #1 & #2: CTA section with proper 8-col grid and grid-based cards */
.section._6-rows.increase-mobile {
  grid-template-rows: repeat(6, var(--row-h));
}
.div-cta-container {
  grid-column: 2 / 10;
  grid-row: 1 / 7;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--row-gap) var(--col-gap);
}
.div-cta {
  grid-column: span 4;
  background-color: transparent;
  border: 0.3px solid rgba(26,26,26,0.3);
  border-radius: var(--row-gap);
  padding: var(--row-gap) var(--col-gap);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto auto;
  gap: var(--row-gap);
}
.div-cta-buttons-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.divider.div-cta-2 { margin: 0; }
.image-container { border-radius: var(--row-gap); overflow: hidden; }

/* Fix #5: Footer should be 7 rows with bottom padding */
/* ===== FOOTER SECTION ===== */
.section.footer { grid-template-rows: repeat(7, var(--row-h)); padding-bottom: var(--row-gap); }
.section.footer > .icon-medium { grid-column: 6 / 7; grid-row: 1; justify-self: center; align-self: center; }
.section.footer > .divider.footer-divider { grid-column: 1 / 13; grid-row: 2; align-self: end; }
.section.footer > .display-title-container.footer-display { grid-column: 1 / 7; grid-row: 3 / 6; display: none; }
.section.footer > .display-title-container.with-line:not(.desktop) { grid-column: 1 / 5; grid-row: 3 / 6; }
.section.footer > .display-title-container:not(.with-line):not(.mobile):not(.desktop):not(.footer-display) { grid-column: 4 / 9; grid-row: 3 / 6; }
.section.footer > .display-title-container.desktop.with-line { grid-column: 9 / 13; grid-row: 3 / 6; }
/* Fix #6: footer-title-container should be 12-column grid, row 7 */
.section.footer > .button-container { grid-column: 4 / 8; grid-row: 7; }
.section.footer > .footer-title-container {
  grid-column: 1 / 13;
  grid-row: 7;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 var(--col-gap);
  align-items: end;
  align-self: end;
  padding-bottom: 0.5vh;
}
.footer-title-container > h1:nth-child(1) { grid-column: 1 / 4; }
.footer-title-container > h1:nth-child(2) { grid-column: 4 / 8; }
.footer-title-container > h1:nth-child(3) { grid-column: 9 / 13; }
.footer-title-container > .divider { grid-column: 1 / 13; }
/* Fix #11: button-container needs margin-top */
.button-container {
  display: flex;
  flex-direction: column;
  gap: 0.3vh;
  margin-top: var(--row-gap);
}

/* ===== MENU OPEN STATE ===== */
.page-container.menu-open {
  transform: translateX(26.1vw);
  transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.page-container {
  transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Menu toggle button */
.internal-button-small.index {
  position: relative;
}
#menuOpen, #menuClose {
  transition: transform 0.3s ease, opacity 0.3s ease;
}
#menuClose {
  opacity: 0;
  position: absolute;
  top: 0;
}
.menu-is-open #menuOpen { opacity: 0; transform: translateY(-100%); }
.menu-is-open #menuClose { opacity: 1; transform: translateY(0); }

/* ===== GRID OVERLAY ===== */
.grid-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 200;
  pointer-events: none;
  display: none;
  padding: 0 var(--pad-x);
}
.grid-overlay.visible { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 var(--col-gap); }
.grid-overlay .grid-col {
  background: rgba(218, 56, 46, 0.08);
  border-left: 0.5px solid rgba(218, 56, 46, 0.2);
  border-right: 0.5px solid rgba(218, 56, 46, 0.2);
  height: 100vh;
}

/* ===== SCROLLBAR ===== */
.page-content::-webkit-scrollbar { width: 0; }
.index-wrap::-webkit-scrollbar { width: 0; }
.page-content:focus { outline: none; }
.page-content { scroll-behavior: smooth; }

/* Fix #8: Tablet breakpoint — 8 columns, 7.0584vh rows */
/* ===== RESPONSIVE: TABLET ===== */
@media screen and (max-width: 991px) {
  :root {
    --row-h: 7.0584vh;
    --row-gap: 1.56vh;
    --pad-x: 2.4vw;
    --col-gap: 1.2vw;
  }
  .display-title-container.mobile { display: flex !important; }
  .display-title-container.with-line,
  .display-title-container:not(.mobile):not(.footer-display) { display: none; }
  .sub-menu.desktop { display: none !important; }
  .desktop-only { display: none; }
  .section { grid-template-columns: repeat(8, 1fr); }
  .menu { grid-template-columns: repeat(8, 1fr); }
  .grid-toggle { grid-column: 8; }
  .project-list { grid-template-columns: repeat(8, 1fr); }
  .project-list .heading-container { grid-column: 3 / 7; }
  .project-list .label { grid-column: 8; }
  .on-page-index-container { display: none; }
  .section.hero-home .display-title-container.mobile { grid-column: 1 / 9; grid-row: 1 / 3; }
  .section.hero-home .body-text-container.hero-bio { grid-column: 1 / 5; grid-row: 5 / 7; }
  .section.hero-home .hero-graphic { grid-column: 5 / 9; grid-row: 4 / 8; }
  .section.hero-home .heading-container.year-heading { grid-column: 1 / 3; grid-row: 8; }
  .section.hero-home .heading-container.portfolio-heading { grid-column: 3 / 6; grid-row: 8; }
  .div-cta-container { grid-column: 1 / 9; grid-template-columns: repeat(8, 1fr); }
  .section.footer > .display-title-container.footer-display { display: flex !important; grid-column: 1 / 9; }
  .index-wrap { width: 40vw; min-width: 40vw; }
}

/* ===== RESPONSIVE: MOBILE ===== */
@media screen and (max-width: 767px) {
  :root {
    --pad-x: 4vw;
    --col-gap: 2vw;
    --row-h: 6.25vh;
  }
  .section { grid-template-columns: repeat(4, 1fr); }
  .menu { grid-template-columns: repeat(4, 1fr); }
  .grid-toggle { grid-column: 4; }
  .menu-current-page { display: none; }
  .project-list { grid-template-columns: repeat(4, 1fr); }
  .project-list .heading-container { grid-column: 1 / 4; }
  .project-list .label { grid-column: 4; }
  .div-cta-container { grid-column: 1 / 5; grid-template-columns: 1fr; }
  .div-cta { grid-column: 1; }
  .display-heading { font-size: 16vh; letter-spacing: -0.5vh; }
  .heading { font-size: 3.5vh; }
  .index-wrap { width: 80vw; min-width: 80vw; }
  .page-container { left: -80vw; }
  .page-container.menu-open { transform: translateX(80vw); }
}

/* Fix #12: Small phone breakpoint */
@media screen and (max-width: 479px) {
  :root {
    --pad-x: 5vw;
    --col-gap: 3vw;
    --row-h: 5.5vh;
  }
  .display-heading { font-size: 13vh; letter-spacing: -0.4vh; margin-bottom: -2vh; }
  .heading { font-size: 3vh; }
  .section.footer > .footer-title-container { grid-template-columns: 1fr; gap: 0.5vh; }
}
