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

:root {
  --bg: #ffffff;
  --bg-lavender: #e4e2ed;
  --bg-blush: #d9c0b3;
  --bg-silver: #c8c8c5;
  --bg-sage: #d1d5b9;
  --surface: #ece9e6;
  --text: #1e1c1a;
  --text-muted: #7a7672;
  --accent: #b0957e;
  --border: #dddad6;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Minimal Site Layout ── */

body.minimal {
  overflow: hidden;
}

.nav-minimal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  padding: 2rem 3rem;
  pointer-events: none;
}

.nav-minimal-logo {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-minimal-tabs {
  display: flex;
  gap: 1.2rem;
  list-style: none;
  pointer-events: auto;
}

.nav-tab {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
  padding-bottom: 2px;
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
}

.nav-tab:not(.active) {
  opacity: 0.45;
}

.nav-tab:hover {
  opacity: 1;
}

.minimal-main {
  display: flex;
  min-height: 100vh;
  padding: 7rem 3rem 3rem;
  gap: 4rem;
}

.minimal-list {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 7rem - 3rem);
  overflow-y: auto;
  gap: 1.5rem;
}

body.ab-active .minimal-list {
  flex-basis: clamp(260px, 40vw, 600px);
}

.ab-bio {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  order: 1;
}

.ab-contact {
  position: fixed;
  top: 2rem;
  right: 3rem;
  z-index: 99;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0 !important;
  padding-top: 0;
  border-top: none;
}

.ab-contact li a {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.45;
  padding: 0;
  display: block;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.ab-contact li a:hover {
  opacity: 1;
}

.ab-contact li a::after {
  content: none;
}

.ab-bio-mobile {
  display: none !important;
}

.mobile-name-heading {
  display: none;
}

.minimal-section-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.minimal-name-list {
  list-style: none;
}

.minimal-name-list li a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
  display: block;
  line-height: 1.6;
  padding: 0;
  transition: opacity 0.2s ease;
}

.minimal-name-list li a:hover {
  opacity: 0.6;
}

.minimal-default {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  opacity: 1;
  transition: opacity 0.4s ease;
  width: 100%;
  max-width: 700px;
}

.minimal-default.hidden {
  display: none;
}

.minimal-bio {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text);
  line-height: 1.85;
}

.minimal-bio a {
  color: var(--text);
  text-underline-offset: 2px;
  transition: opacity 0.2s ease;
}

.minimal-bio a:hover {
  opacity: 0.6;
}


.bio-header-photo {
  max-height: 72vh;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.minimal-contact {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s ease;
}

.minimal-contact:hover {
  color: var(--text);
}

.minimal-preview-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-y: auto;
  max-height: calc(100vh - 7rem - 3rem);
  order: -1;
}

.minimal-preview-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-height: 75vh;
  max-width: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.minimal-preview-img.visible {
  opacity: 1;
}

.section-list.hidden-section {
  display: none;
}

/* ── Graduation Grid ── */

.grad-grid {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
}

.grad-grid.hidden { display: none; }

.grad-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grad-col-sm  { flex: 0 0 20%; }
.grad-col-lg  { flex: 0 0 33%; }

.grad-right-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grad-right-row {
  display: flex;
  gap: 10px;
}

.grad-right-row .grad-item {
  flex: 1;
}

.grad-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.7;
}

.grad-item img {
  width: 100%;
  height: auto;
  display: block;
}

#grad-landscape-hero {
  margin-left: calc(-20vw - 2rem);
  width: calc(100% + 20vw + 2rem);
}

.grad-item-centered {
  display: flex;
  justify-content: flex-start;
}

body.grad-active .minimal-preview-area {
  overflow-y: auto;
  max-height: calc(100vh - 7rem - 3rem);
  align-items: flex-start;
}

body.grad-active .minimal-list,
body:not(.ab-active):not(.grad-active) .minimal-list {
  display: none;
}

/* ── Portraiture Overview Grid ── */

.portraiture-grid {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.portraiture-grid.hidden {
  display: none;
}

/* Isis — left panel, natural size */
.port-main {
  display: block;
  flex-shrink: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.port-main img {
  display: block;
  max-height: 49vh;
  max-width: 100%;
  width: auto;
  height: auto;
  transition: opacity 0.2s ease;
}

.port-main:hover img { opacity: 0.75; }

/* Right panel — two rows */
.port-grid-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 1;
  min-width: 0;
}

.port-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* Nina — bottom-aligned so its bottom edge meets Orjowan's top edge */
.port-row:first-child .port-item:last-child {
  align-self: flex-end;
}

/* Nina/eyes — slightly larger than default */
.port-row:first-child .port-item:last-child img { max-height: 37vh; }

/* Nefer — smaller than before but bigger than Orjowan */
.port-row:last-child .port-item:first-child img { max-height: 26vh; }

/* Orjowan — slightly smaller */
.port-row:last-child .port-item:last-child img { max-height: 23vh; }

/* Each photo at natural proportions, roughly half of Isis height */
.port-item {
  display: block;
  flex-shrink: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.port-item img {
  display: block;
  max-height: 32vh;
  max-width: 100%;
  width: auto;
  height: auto;
  transition: opacity 0.2s ease;
}

.port-item:hover img { opacity: 0.75; }

/* Dara — larger than the other right-panel photos */
.port-row:first-child .port-item:first-child img {
  max-height: 52vh;
}

.muted-link {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  line-height: 1.6;
  cursor: default;
}

/* ── Navigation ── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  background: linear-gradient(to bottom, rgba(255,255,255,0.96) 0%, transparent 100%);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

/* ── Hero / Bio ── */

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 7rem 3rem 4rem 0;
  gap: 4rem;
  border-bottom: 1px solid var(--border);
  background-color: var(--bg);
}

.hero-text {
  max-width: 520px;
  padding-left: 1.5rem;
}

.hero-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.75rem;
}

.hero-bio {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--text-muted);
}

/* ── Bio Photos Collage (overlapping) ── */

.bio-collage {
  position: relative;
  height: 560px;
  flex-shrink: 0;
  width: 100%;
  overflow: visible;
}

.bio-collage-item {
  position: absolute;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.12);
  transition: transform 0.6s ease, box-shadow 0.6s ease;
  cursor: pointer;
}

.bio-collage-item:hover {
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.bio-collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* head.jpg — dominant, center */
.bio-collage-item:nth-child(1) {
  width: 310px; height: 445px;
  top: 30px; left: 130px;
  transform: rotate(1deg);
  z-index: 1;
}
.bio-collage-item:nth-child(1):hover { transform: rotate(1deg) scale(1.03); }

/* germ.JPG — top-left */
.bio-collage-item:nth-child(2) {
  width: 165px; height: 225px;
  top: 0; left: 0;
  transform: rotate(-7deg);
  z-index: 2;
}
.bio-collage-item:nth-child(2):hover { transform: rotate(-7deg) scale(1.03); }

/* trum.jpg — lower-left, landscape */
.bio-collage-item:nth-child(3) {
  width: 220px; height: 147px;
  top: 235px; left: -45px;
  transform: rotate(-3deg);
  z-index: 0;
}
.bio-collage-item:nth-child(3):hover { transform: rotate(-3deg) scale(1.03); }

/* switz.jpeg — top-right, landscape */
.bio-collage-item:nth-child(4) {
  width: 245px; height: 163px;
  top: 0; left: 383px;
  transform: rotate(5deg);
  z-index: 2;
}
.bio-collage-item:nth-child(4):hover { transform: rotate(5deg) scale(1.03); }

/* gradv.jpg — bottom-center */
.bio-collage-item:nth-child(5) {
  width: 165px; height: 220px;
  top: 428px; left: 148px;
  transform: rotate(-4deg);
  z-index: 1;
}
.bio-collage-item:nth-child(5):hover { transform: rotate(-4deg) scale(1.03); }

/* kazak.jpg — bottom-right, portrait */
.bio-collage-item:nth-child(6) {
  width: 160px; height: 215px;
  top: 330px; left: 400px;
  transform: rotate(3.5deg);
  z-index: 0;
}
.bio-collage-item:nth-child(6):hover { transform: rotate(3.5deg) scale(1.03); }

/* ── Gallery Sections ── */

.gallery-section {
  padding: 6rem 3rem;
  border-bottom: 1px solid var(--border);
}

body.subject-page .nav-minimal {
  position: relative;
}

body.subject-page .ab-contact {
  position: fixed !important;
  top: 2rem;
  right: 3rem;
  left: auto;
  transition: opacity 0.4s ease;
}

body.subject-page .ab-contact.scrolled {
  opacity: 0;
  pointer-events: none;
}

body.subject-page .gallery-section {
  padding-top: 2rem;
}

.gallery-section.alt-bg {
  background-color: #f5f3f0;
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 4rem;
}

.section-number {
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  padding-top: 0.5rem;
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 400px;
  line-height: 1.75;
}

/* ── Photo Grid (grad placeholders) ── */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 300px;
  gap: 6px;
}

.photo-slot {
  background-color: var(--bg-lavender);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.photo-slot:nth-child(2) { background-color: var(--bg-blush); }
.photo-slot:nth-child(3) { background-color: var(--bg-silver); }
.photo-slot:nth-child(4) { background-color: var(--bg-sage); }
.photo-slot:nth-child(5) { background-color: var(--bg-lavender); }
.photo-slot:nth-child(6) { background-color: var(--bg-blush); }

.photo-slot:hover { opacity: 0.88; }
.photo-slot.tall  { grid-row: span 2; }
.photo-slot.wide  { grid-column: span 2; }

.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-placeholder-label {
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.2);
  user-select: none;
}

/* ── Portraiture Grid (natural ratios, no tilt, no overlap) ── */

.portrait-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  justify-content: center;
  padding-left: 80px;
}

.portrait-grid .photo-slot {
  flex-shrink: 0;
  background: none;
  border-radius: 0;
}

.portrait-grid .photo-slot.portrait {
  width: 260px;
  aspect-ratio: 2 / 3;
}

.portrait-grid .photo-slot.landscape {
  width: 400px;
  aspect-ratio: 3 / 2;
}

.portrait-grid .photo-slot.landscape.large {
  width: 660px;
  aspect-ratio: 3 / 2;
}

.portrait-grid .photo-slot.landscape.medium {
  width: 590px;
  aspect-ratio: 3 / 2;
}

.portrait-grid .photo-slot.square {
  width: 320px;
  aspect-ratio: 4791 / 5073;
}

.portrait-grid .photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* shad — top-aligned to match the gap spacing of surrounding photos */
.portrait-grid .photo-slot:nth-child(5) {
  align-self: flex-start;
}

.portrait-grid .photo-link {
  position: relative;
  text-decoration: none;
}

.photo-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(30, 28, 26, 0.45);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-overlay span {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 1.5rem;
}

.photo-link:hover .photo-overlay {
  opacity: 1;
}

/* ── Subject Page (e.g. orjowan.html) ── */

.subject-section {
  padding-top: 7rem;
  border-bottom: none;
}

.subject-name {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  display: block;
  margin-bottom: 2rem;
}

.subject-caption {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 220px;
}

.subject-section .photo-slot:hover,
.subject-section .nina-photo:hover,
.subject-section .orjowan-collage-item:hover {
  opacity: 1;
  cursor: default;
}

.back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
}

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

/* ── Nina Two-Column Grid ── */

.nina-grid {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 870px;
  margin: 0 auto;
  padding-left: 80px;
}

.nina-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nina-photo {
  width: 100%;
}

.nina-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Dara Two-Column Grid ── */

.dara-grid {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
}

.dara-text-col {
  flex: 1;
  padding-top: 130px;
  padding-right: 2rem;
}

.dara-intro-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text);
  line-height: 1.7;
  max-width: 320px;
}

.dara-intro-text a {
  color: var(--text);
  text-underline-offset: 2px;
  transition: opacity 0.2s ease;
}

.dara-intro-text a:hover {
  opacity: 0.6;
}

.dara-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dara-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Dara P2 Grid ── */

.dara-p2 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 6rem auto 0;
}

.dara-p2-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dara-p2-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.dara-p2-middle {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Dara P3 Grid ── */

.dara-p3-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin: 6rem auto 0;
}

.dara-p3-text {
  flex: 0 0 200px;
  padding-top: 2rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
}

.dara-p3-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dara-p3-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.dara-p3-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dara-p3-pair {
  display: flex;
  gap: 10px;
}

.dara-p3-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Orjowan Collage (no overlap, no borders) ── */

.orjowan-collage {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 80px;
}

.orjowan-collage-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.orjowan-collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.orjowan-collage-item.shot-1,
.orjowan-collage-item.shot-2 {
  width: 440px;
  aspect-ratio: 3 / 2;
}

.orjowan-collage-item.shot-3 {
  width: 700px;
  aspect-ratio: 3 / 2;
}

@media (max-width: 900px) {
  .orjowan-collage {
    flex-direction: column;
    align-items: center;
  }

  .orjowan-collage-item.shot-1,
  .orjowan-collage-item.shot-2,
  .orjowan-collage-item.shot-3 {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 3 / 2;
  }
}

/* ── Contact ── */

.contact-section {
  padding: 8rem 3rem;
  text-align: center;
  background-color: var(--bg-lavender);
  border-bottom: 1px solid var(--border);
}

.contact-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
  letter-spacing: -0.03em;
}

.contact-email {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 3px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

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

/* ── Footer ── */

.footer {
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background-color: var(--bg);
  border-top: 1px solid var(--border);
}

/* ── Responsive ── */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 7rem 2rem 4rem;
    gap: 3rem;
  }

  .hero-photos {
    height: 55vh;
    max-height: 480px;
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 1.25rem 1.5rem;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .gallery-section {
    padding: 4rem 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }

  .photo-slot.wide {
    grid-column: span 2;
  }

  .contact-section {
    padding: 5rem 1.5rem;
  }

  .footer {
    padding: 1.5rem;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .nav-links {
    display: none;
  }

  .hero-photos {
    grid-template-columns: 1fr 1fr;
    height: auto;
    max-height: none;
  }

  .bio-side-photos {
    grid-template-rows: repeat(5, 80px);
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
  }

  .photo-slot.tall,
  .photo-slot.wide {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* ── Desktop bio tab: full-height cover photo ── */

@media (min-width: 769px) {
  body.ab-active .minimal-preview-area {
    align-items: stretch;
    justify-content: flex-start;
  }

  body.ab-active .minimal-default {
    max-width: none;
    height: 100%;
  }

  body.ab-active .bio-header-photo {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center;
  }
}

/* ── Dara: medium screens — proportional photo scaling ── */

@media (min-width: 769px) and (max-width: 1700px) {
  /* P1: text col shrinks, photo strip scales down proportionally */
  .dara-grid {
    gap: 1.5rem;
    align-items: flex-start;
  }

  .dara-text-col {
    flex: 0 0 clamp(180px, 22%, 260px);
    padding-top: 1.5rem;
    padding-right: 0;
    min-width: 0;
  }

  /* Maintain original 340:510 (2:3) ratio between columns */
  .dara-text-col + .dara-col {
    flex: 2 !important;
    width: auto !important;
    /* Scale margin-top proportionally with strip width (130/860 ≈ 15%) */
    margin-top: 15% !important;
    min-width: 0;
  }

  .dara-text-col + .dara-col + .dara-col {
    flex: 3 !important;
    width: auto !important;
    margin-top: 0 !important;
    min-width: 0;
  }

  /* Col 1 portrait fills its column */
  .dara-text-col + .dara-col .dara-photo {
    width: 100% !important;
  }

  /* Col 2 portrait: maintain original 348/510 ≈ 68% ratio within col */
  .dara-text-col + .dara-col + .dara-col .dara-photo:first-child {
    width: 68% !important;
  }

  /* Col 2 landscape: fill full column width */
  .dara-text-col + .dara-col + .dara-col .dara-photo:last-child {
    width: 100% !important;
  }

  /* P2: shrink left col, let right flex, drop text to its own row */
  .dara-p2 {
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 4rem;
  }

  .dara-p2 > .dara-photo {
    width: 300px !important;
  }

  .dara-p2-right {
    flex: 1;
    min-width: 0;
  }

  .dara-p2-middle {
    flex: 1;
  }

  .dara-p2-middle .dara-photo {
    width: 100% !important;
  }

  .dara-p2-top > .dara-photo:last-child {
    width: 160px !important;
    flex-shrink: 0;
  }

  .dara-p2-right > .dara-photo:last-child {
    width: 100% !important;
  }

  .dara-p2 > div:last-child {
    flex: 0 0 100%;
    margin-left: 0 !important;
    padding-top: 0 !important;
  }

  .dara-p2 > div:last-child .dara-intro-text {
    max-width: 600px;
  }

  /* P3: all photo slots flex within their row/col parents */
  .dara-p3-row > div {
    flex: 1 !important;
    width: auto !important;
    min-width: 0;
  }

  .dara-p3-col > div {
    width: 100% !important;
  }

  .dara-p3-pair > div {
    flex: 1 !important;
    width: auto !important;
    min-width: 0;
  }
}

/* ── Medium screens: portraiture grid switches to width-based ── */

@media (max-width: 1100px) {
  .port-item {
    flex: 1;
  }

  .port-item img,
  .port-row:first-child .port-item:first-child img,
  .port-row:first-child .port-item:last-child img,
  .port-row:last-child .port-item:first-child img,
  .port-row:last-child .port-item:last-child img {
    width: 100%;
    height: auto;
    max-height: none;
  }

  .port-main img {
    max-height: 45vh;
  }
}

/* ── Mobile: redesigned for a clean, inviting experience ── */

@media (max-width: 768px) {

  /* Warm off-white background */
  body {
    background: #faf9f7;
  }

  /* Nav: frosted glass bar */
  .nav-minimal {
    padding: 0 1.5rem;
    height: 52px;
    background: rgba(250, 249, 247, 0.93);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    align-items: center;
  }

  .nav-minimal-tabs {
    gap: 1.75rem;
    align-items: center;
  }

  .nav-tab {
    position: relative;
    padding-bottom: 2px;
  }

  .nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 1px;
    background: currentColor;
  }

  /* Main layout: full-bleed column */
  body.minimal { overflow-y: auto; }

  .minimal-main {
    flex-direction: column;
    padding: 52px 0 0;
    gap: 0;
    min-height: auto;
  }

  /* Default tab order: names → photo */
  .minimal-list {
    order: 1;
    flex: none;
    height: auto;
    max-height: none;
    gap: 0;
    padding: 1.5rem 1.5rem;
  }

  .minimal-preview-area,
  body.grad-active .minimal-preview-area {
    order: 2;
    flex: none;
    overflow-y: visible;
    max-height: none;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    width: 100%;
  }

  .ab-bio-mobile {
    order: 3;
    display: flex !important;
    flex-direction: column;
    gap: 1.1rem;
    padding: 2rem 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
  }

  .ab-bio-mobile.hidden-section {
    display: none !important;
  }

  body:not(.ab-active) .ab-contact {
    display: none;
  }

  /* Bio tab: photo → bio → links */
  body.ab-active .minimal-preview-area {
    order: 1;
  }

  body.ab-active .ab-bio-mobile {
    order: 2;
  }

  body.ab-active .minimal-list {
    order: 3;
    padding: 0;
    flex: none;
  }

  /* Header photo: full bleed, tall, cover */
  .minimal-default {
    width: 100%;
    max-width: 100%;
  }

  .bio-header-photo {
    width: 100%;
    height: 72vh;
    max-height: 72vh;
    object-fit: cover;
    object-position: center top;
    display: block;
  }

  .ab-bio { display: none !important; }

  /* Mobile name heading hidden */
  .mobile-name-heading {
    display: none;
  }

  /* Bio paragraphs */
  .ab-bio-mobile .minimal-bio {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.85;
  }

  /* Reset desktop contact styles on mobile */
  .ab-contact {
    position: static;
    border-top: none;
    padding-top: 0;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    flex-direction: column;
    gap: 0;
  }

  /* Contact links: elegant rows */
  .minimal-name-list li {
    border-bottom: 1px solid var(--border);
  }

  .minimal-name-list li:first-child {
    margin-top: 0;
  }

  .minimal-name-list li a {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    line-height: 1;
  }

  .minimal-name-list li a::after {
    content: '↗';
    font-size: 0.9rem;
    font-style: normal;
    opacity: 0.4;
    letter-spacing: 0;
    text-transform: none;
  }

  /* ── Portraiture: full-page stacked photos ── */
  .portraiture-grid {
    flex-direction: column;
    align-items: stretch;
    padding-left: 0;
    gap: 0;
  }

  .port-main {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .port-main img {
    width: 100%;
    height: auto;
    max-height: none;
    display: block;
  }

  /* Explicit column flex instead of display:contents — avoids iOS Safari bugs */
  .port-grid-right {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .port-row {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .port-item {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    flex: none;
    align-self: stretch;
  }

  /* All portrait photos: natural dimensions, no cropping */
  .port-item img,
  .port-row:first-child .port-item:first-child img,
  .port-row:first-child .port-item:last-child img,
  .port-row:last-child .port-item:first-child img,
  .port-row:last-child .port-item:last-child img,
  .port-item.port-landscape img,
  .port-row:first-child .port-item.port-landscape:last-child img,
  .port-row:last-child .port-item.port-landscape:first-child img,
  .port-row:last-child .port-item.port-landscape:last-child img {
    width: 100%;
    height: auto;
    max-height: none;
    display: block;
  }

  /* Name overlays: hidden by default, revealed on scroll */
  .portraiture-grid .photo-overlay {
    opacity: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 45%);
    align-items: flex-end;
    justify-content: flex-start;
    padding: 0 1.25rem 1.25rem;
    transition: opacity 0.5s ease;
  }

  .portraiture-grid .photo-overlay.scroll-visible {
    opacity: 1;
  }

  .portraiture-grid .photo-overlay span {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  /* ── Graduation tab ── */
  .grad-grid {
    flex-direction: column;
  }

  .grad-col-sm,
  .grad-col-lg {
    flex: none;
    width: 100%;
  }

  .grad-right-section {
    flex: none;
    width: 100%;
  }

  #grad-col-left,
  #grad-col-r1 {
    margin-top: 0 !important;
  }

  #grad-landscape-hero {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* ── Subject pages ── */
  .gallery-section {
    padding: 5rem 1.25rem 2rem;
  }

  .subject-section {
    padding-top: 5rem;
  }

  /* Isis */
  .portrait-grid {
    flex-direction: column;
    align-items: stretch;
    padding-left: 0;
    justify-content: flex-start;
    max-width: 100% !important;
    gap: 8px;
  }

  .portrait-grid .photo-slot {
    width: 100% !important;
    align-self: stretch !important;
  }

  .subject-caption {
    max-width: 100%;
    margin-top: 1rem !important;
  }

  /* Nina */
  .nina-grid {
    flex-direction: column;
    transform: none !important;
    padding-left: 0;
    max-width: 100%;
    gap: 8px;
  }

  .nina-col {
    flex: none !important;
    width: 100% !important;
    margin-top: 0 !important;
  }

  .nina-photo {
    width: 100% !important;
  }

  .nina-grid > div:last-child {
    flex: none !important;
    width: 100% !important;
    padding-top: 0 !important;
  }

  /* Nefer */
  .subject-section > div:not([class])[style] {
    flex-direction: column !important;
    max-width: 100% !important;
  }

  .subject-section > div:not([class])[style] > div:last-child {
    flex: none !important;
    width: 100% !important;
    padding-top: 0 !important;
  }

  /* Dara */
  .dara-grid,
  .dara-p2,
  .dara-p3-wrapper {
    flex-direction: column;
    max-width: 100%;
    gap: 1rem;
    margin-top: 2rem;
  }

  .dara-text-col {
    flex: none;
    padding-top: 0;
    padding-right: 0;
  }

  .dara-p3-text {
    flex: none;
    padding-top: 0;
  }

  .dara-col {
    flex: none !important;
    width: 100% !important;
    margin-top: 0 !important;
  }

  .dara-photo {
    width: 100% !important;
    height: auto;
  }

  .dara-p2-right {
    margin-top: 0 !important;
    width: 100%;
  }

  .dara-p2-top {
    flex-direction: column;
    gap: 8px;
  }

  .dara-p2-middle {
    flex-direction: column;
    gap: 8px;
  }

  .dara-p2 > div:last-child {
    flex: none !important;
    width: 100% !important;
    padding-top: 0 !important;
  }

  .dara-p3-section {
    margin: 0;
  }

  .dara-p3-row {
    flex-direction: column;
    gap: 8px;
  }

  .dara-p3-col {
    width: 100%;
    gap: 8px;
  }

  .dara-p3-pair {
    gap: 8px;
  }

  .dara-p3-pair > div {
    width: calc(50% - 4px) !important;
  }

  /* Orjowan */
  .orjowan-collage {
    flex-direction: column;
    padding-left: 0;
    align-items: stretch;
    max-width: 100%;
    gap: 8px;
  }

  .orjowan-collage-col {
    width: 100%;
    gap: 8px;
  }

  .orjowan-collage-item.shot-1,
  .orjowan-collage-item.shot-2,
  .orjowan-collage-item.shot-3 {
    width: 100% !important;
    max-width: 100%;
  }

  .orjowan-collage > div:last-child {
    flex: none !important;
    width: 100% !important;
    padding-top: 0 !important;
  }
}
