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

:root {
  --bg: #f0eeeb;
  --border: #d8d5d0;
  --text: #1a1a18;
  --text-muted: #888880;
  --text-soft: #555550;
}

html, body {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  background: var(--bg);
  font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  overflow-x: hidden;
  opacity: 0;
  animation: pageFadeIn 0.35s ease forwards;
  transition: opacity 0.35s ease;
}

body.fade-out {
  opacity: 0;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ─── LANDING ─── */

.border-frame {
  width: 100vw;
  min-height: calc(100dvh - 2px);
  height: calc(100dvh - 2px);
  margin: 0;
  padding: 18px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  padding: 20px;
  background-color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.75);
}

.placeholder-text {
  font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 200;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
}


.hero-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  padding: 1.2rem 2rem 0;
}

.site-name {
  font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 200;
  font-size: 1rem;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  display: inline-block;
  position: relative;
  transform-origin: center;
  transition: color 0.3s ease, letter-spacing 0.4s ease;
  text-transform: none;
  line-height: 1;
  opacity: 0;
  animation: fadeUp 1s ease 0.3s forwards;
}

.site-name::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.22em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  opacity: var(--site-name-underline-opacity, 1);
  pointer-events: none;
}

.site-name:hover {
  color: #fff;
  letter-spacing: 0.34em;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 2rem;
  text-align: right;
}

.nav-links li {
  width: auto;
  text-align: right;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}
.nav-links li:nth-child(1) { animation-delay: 0.6s; }
.nav-links li:nth-child(2) { animation-delay: 0.8s; }
.nav-links li:nth-child(3) { animation-delay: 1.0s; }

.nav-links a {
  font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 200;
  font-size: 1rem;
  color: rgba(255, 255, 255, 1);
  text-decoration: none;
  letter-spacing: 0.28em;
  line-height: 1;
  display: inline-flex;
  justify-content: flex-end;
  align-items: flex-start;
  min-width: max-content;
  transform-origin: center;
  transition: color 0.3s ease, letter-spacing 0.4s ease;
  text-transform: uppercase;
}

.nav-links a:hover {
  color: #fff;
  letter-spacing: 0.34em;
}

.hero-footer {
  position: relative;
  z-index: 2;
  padding: 0 2rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  opacity: 0;
  animation: fadeUp 1s ease 1.3s forwards;
}

.hero-footer .tagline {
  font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 200;
  font-size: 10px;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── GALLERY PAGES ─── */

.gallery-frame {
  min-height: 95dvh;
  margin: 18px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  justify-content: flex-start;
  align-items: center;
  padding-top: 1rem;
}

.gallery-header {
  padding: 0 2.5rem 0.9rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: baseline;
  border-bottom: 1px solid var(--border);
  width: 100%;
}

.gallery-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(22px, 3.5vw, 38px);
  color: var(--text-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  justify-self: center;
  text-align: center;
}

.gallery-nav-link {
  font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 200;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s;
}

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

.gallery-nav-link--left {
  text-align: left;
  justify-self: start;
}

.gallery-nav-link--right {
  text-align: right;
  justify-self: end;
}

.gallery-nav-combo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

.gallery-nav-separator {
  font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 200;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

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

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding: 2rem;
  width: min(100%, 1200px);
}

.gallery-grid--scattered {
  width: min(100%, 1360px);
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(46px, 4.4vw, 60px);
  gap: clamp(0.85rem, 1.7vw, 1.35rem);
  padding: 2.2rem 2rem 2.5rem;
}

.gallery-grid--scattered .gallery-item-wrapper {
  align-items: stretch;
}

.gallery-grid--scattered .gallery-item {
  height: 100%;
  aspect-ratio: auto;
}

.gallery-grid--science .gallery-item-wrapper:nth-child(1) {
  grid-column: 1 / span 5;
  grid-row: 1 / span 6;
}

.gallery-grid--science .gallery-item-wrapper:nth-child(2) {
  grid-column: 7 / span 5;
  grid-row: 2 / span 5;
}

.gallery-grid--science .gallery-item-wrapper:nth-child(3) {
  grid-column: 3 / span 5;
  grid-row: 8 / span 6;
}

.gallery-grid--science .gallery-item-wrapper:nth-child(4) {
  grid-column: 8 / span 4;
  grid-row: 10 / span 6;
}

.gallery-grid--science .gallery-item-wrapper:nth-child(5) {
  grid-column: 6 / span 4;
  grid-row: 16 / span 5;
}

.gallery-grid--science .gallery-item-wrapper:nth-child(6) {
  grid-column: 7 / span 4;
  grid-row: 22 / span 5;
}

.gallery-grid--science .gallery-item-wrapper:nth-child(7) {
  grid-column: 2 / span 4;
  grid-row: 22 / span 5;
}

.gallery-item.gallery-item--text {
  padding: 1.1rem 1.2rem;
  align-items: flex-start;
  justify-content: flex-start;
  background: transparent !important;
  cursor: default;
}

.gallery-item.gallery-item--text::after {
  content: none !important;
  background: transparent !important;
}

.science-text-card-copy {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.1rem, 1.45vw, 1.42rem);
  line-height: 1.25;
  color: var(--text-soft);
  letter-spacing: 0.03em;
  text-align: justify;
  text-justify: inter-word;
  white-space: pre-line;
  hyphens: none;
  overflow-wrap: anywhere;
  text-shadow: none;
}

.gallery-grid--humannature .gallery-item-wrapper:nth-child(1) {
  grid-column: 2 / span 4;
  grid-row: 1 / span 5;
}

.gallery-grid--humannature .gallery-item-wrapper:nth-child(2) {
  grid-column: 7 / span 5;
  grid-row: 1 / span 6;
}

.gallery-grid--humannature .gallery-item-wrapper:nth-child(3) {
  grid-column: 1 / span 5;
  grid-row: 7 / span 5;
}

.gallery-grid--humannature .gallery-item-wrapper:nth-child(4) {
  grid-column: 8 / span 4;
  grid-row: 8 / span 6;
}

.gallery-grid--research .gallery-item-wrapper:nth-child(1) {
  grid-column: 1 / span 5;
  grid-row: 1 / span 6;
}

.gallery-grid--research .gallery-item-wrapper:nth-child(2) {
  grid-column: 7 / span 4;
  grid-row: 2 / span 6;
}

.gallery-grid--research .gallery-item-wrapper:nth-child(3) {
  grid-column: 4 / span 5;
  grid-row: 8 / span 5;
}

.gallery-grid--research .gallery-item-wrapper {
  align-items: stretch;
  justify-content: start;
}

.gallery-grid--research .gallery-item {
  align-items: stretch;
  justify-content: center;
}

.gallery-grid--research .gallery-item {
  height: auto;
  min-height: 100%;
  background: transparent;
}

.gallery-grid--research .gallery-item img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-grid--research .gallery-item:hover img {
  transform: none;
}

.gallery-grid--scattered .gallery-item .item-title {
  font-weight: 350;
  font-size: 1.02rem;
  letter-spacing: 0.11em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.82), 0 1px 4px rgba(0, 0, 0, 0.65);
}

@media (max-width: 1050px) {
  .gallery-grid--scattered {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: clamp(44px, 7vw, 58px);
    padding: 1.4rem;
  }

  .gallery-grid--science {
    width: min(100%, 980px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 1rem;
    padding: 1.4rem;
  }

  .gallery-grid--science .gallery-item-wrapper {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .gallery-grid--science .gallery-item {
    aspect-ratio: 3 / 2;
  }

  .gallery-grid--science .gallery-item--text {
    aspect-ratio: auto;
    min-height: 0;
    height: auto;
  }

  .gallery-grid--science .gallery-item-wrapper:nth-child(2) {
    grid-column: 1 / -1 !important;
  }

  .gallery-grid--science .gallery-item-wrapper:nth-child(1),
  .gallery-grid--humannature .gallery-item-wrapper:nth-child(1) {
    grid-column: 1 / span 4;
    grid-row: auto;
  }

  .gallery-grid--science .gallery-item-wrapper:nth-child(2),
  .gallery-grid--humannature .gallery-item-wrapper:nth-child(2) {
    grid-column: 4 / span 3;
    grid-row: auto;
  }

  .gallery-grid--science .gallery-item-wrapper:nth-child(3),
  .gallery-grid--humannature .gallery-item-wrapper:nth-child(3) {
    grid-column: 2 / span 4;
    grid-row: auto;
  }

  .gallery-grid--science .gallery-item-wrapper:nth-child(4) {
    grid-column: 1 / span 3;
    grid-row: auto;
  }

  .gallery-grid--science .gallery-item-wrapper:nth-child(5) {
    grid-column: 3 / span 4;
    grid-row: auto;
  }

  .gallery-grid--science .gallery-item-wrapper:nth-child(6) {
    grid-column: 1 / span 3;
    grid-row: auto;
  }

  .gallery-grid--science .gallery-item-wrapper:nth-child(7) {
    grid-column: 1 / span 6;
    grid-row: auto;
  }

  .gallery-grid--research .gallery-item-wrapper:nth-child(1) {
    grid-column: 1 / span 4;
    grid-row: auto;
  }

  .gallery-grid--research .gallery-item-wrapper:nth-child(2) {
    grid-column: 4 / span 3;
    grid-row: auto;
  }

  .gallery-grid--research {
    width: min(100%, 980px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 1rem;
    padding: 1.4rem;
  }

  .gallery-grid--research .gallery-item-wrapper {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .gallery-grid--research .gallery-item-wrapper:nth-child(1) {
    order: -1;
    grid-column: 1 / -1 !important;
  }

  .gallery-grid--research .gallery-item--text {
    aspect-ratio: auto;
    min-height: 0;
    height: auto;
  }

  .gallery-grid--science .gallery-item-wrapper:nth-child(2) {
    order: -1;
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }

  .gallery-grid--humannature .gallery-item-wrapper:nth-child(4) {
    grid-column: 1 / span 3;
    grid-row: auto;
  }
}

.work-frame {
  height: calc(100dvh - 36px);
  overflow-y: auto;
  overflow-x: hidden;
}

.collab-section {
  width: min(100%, 1200px);
  padding: 0 2rem 2.5rem;
}

.collab-divider {
  width: min(100%, 1200px);
  padding: 0 2rem;
  margin: 0.25rem auto 1.5rem;
}

.collab-divider::before {
  content: '';
  display: block;
  border-top: 1px solid var(--border);
}

.collab-title {
  font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.collab-title--centered {
  text-align: center;
}

.collab-logos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.2rem;
  align-items: center;
  justify-content: center;
}

.collab-logo-item {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.collab-logo-item img {
  height: 100%;
  width: auto;
  max-width: min(220px, 34vw);
  object-fit: contain;
  display: block;
}

.collab-featured {
  margin-top: 1.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.collab-featured-title {
  margin-bottom: 0;
  text-align: center;
  text-decoration: none;
  transition: color 0.25s ease, letter-spacing 0.35s ease;
}

.collab-featured-title:hover {
  color: var(--text);
  letter-spacing: 0.34em;
}

.collab-featured-logo {
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.collab-featured-logo img {
  height: 100%;
  width: auto;
  max-width: min(260px, 44vw);
  object-fit: contain;
  display: block;
  transition: transform 0.25s ease;
}

.collab-featured-logo:hover img {
  transform: translateY(-1px);
}

@media (max-width: 700px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  .gallery-grid--science {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  .gallery-grid--science .gallery-item-wrapper {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .gallery-grid--science .gallery-item--text {
    aspect-ratio: auto;
    min-height: 0;
    height: auto;
  }

  .gallery-grid--science .gallery-item-wrapper:nth-child(2) {
    order: -1;
  }

  .gallery-grid--scattered {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 1rem;
    padding: 1rem;

  .gallery-grid--research {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
  }

  .gallery-grid--scattered .gallery-item-wrapper {
    grid-column: auto !important;
    grid-row: auto !important;

  .gallery-grid--research .gallery-item-wrapper {
    grid-column: auto !important;
    grid-row: auto !important;
  }
  }

  .gallery-grid--scattered .gallery-item {
    aspect-ratio: 3 / 2;

  .gallery-grid--research .gallery-item-wrapper:nth-child(1) {
    order: -1;
  }

  .gallery-grid--research .gallery-item--text {
    aspect-ratio: auto;
    min-height: 0;
    height: auto;
  }
  }

  .gallery-grid--research .gallery-item {
    min-height: 0;
    aspect-ratio: auto;
  }

  .gallery-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.8rem 1rem 0.7rem;
  }

  .gallery-title {
    text-align: center;
  }

  .hero-content {
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem 1rem 0;
  }

  .site-name {
    font-size: 0.75rem;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-end;
    gap: 0.85rem;
  }

  .gallery-nav-link {
    font-size: 0.7rem;
  }

  .gallery-nav-combo {
    justify-content: center;
    flex-wrap: wrap;
  }

  .project-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem;
  }

  .project-header a {
    text-align: left;
  }

  .slideshow {
    align-items: center;
    background: var(--bg);
  }

  .slide img {
    object-fit: contain;
    width: 100%;
    height: 100%;
  }

  .back-link {
    font-size: 12px;
  }

  .collab-section {
    padding: 0 1rem 1.5rem;
  }

  .collab-divider {
    padding: 0 1rem;
    margin: 0 auto 1.1rem;
  }

  .collab-logos-grid {
    justify-content: center;
    gap: 0.6rem;
  }

  .collab-logo-item {
    height: 40px;
  }

  .collab-logo-item img {
    max-width: 58vw;
  }

  .collab-featured {
    margin-top: 1.4rem;
  }

  .collab-featured-logo {
    height: 40px;
  }

  .collab-featured-logo img {
    max-width: 72vw;
  }
}

.gallery-item-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.item-title {
  font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 0.665rem;
  margin-bottom: 0.85rem;
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-item {
  width: 100%;
  aspect-ratio: 3 / 2;
  background: linear-gradient(135deg, #d8d5cf 0%, #c2bfb8 100%);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item .item-title {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  left: 50%;
  color: #fff;
  z-index: 1;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55), 0 0px 2px rgba(0, 0, 0, 0.35);
  transition: letter-spacing 0.4s ease;
}

.gallery-item:hover .item-title {
  letter-spacing: 0.2em;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
}
.gallery-item:hover::after {
  background: rgba(0, 0, 0, 0.1);
}

.ph {
  font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 200;
  font-size: 9px;
  letter-spacing: 0.25em;
  color: rgba(80, 78, 74, 0.4);
  text-transform: uppercase;
}

.project-frame {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
}

.project-header {
  padding: 0.9rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.project-header a {
  flex: 0;
}

.project-header .gallery-nav-link--left {
  white-space: nowrap;
}

.slideshow {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .75s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.slide--intro {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.2rem;
  overflow: hidden;
}

.intro-slide-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.intro-slide-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  opacity: 0.8;
  display: block;
}

.intro-slide-content {
  width: min(560px, 100%);
  border: 1px solid var(--border);
  background: rgba(240, 238, 235, 0.92);
  padding: clamp(0.95rem, 2.4vw, 1.6rem);
  text-align: justify;
  position: relative;
  z-index: 1;
}

.intro-slide-label {
  font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 450;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.intro-slide-text {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(0.84rem, 1.47vw, 1.3rem);
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: pre-line;
}

.cursor-counter {
  position: fixed;
  z-index: 6;
  pointer-events: none;
  color: var(--text);
  background: transparent;
  padding: 0;
  font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 350;
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-shadow: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.16s ease, color 0.14s ease, text-shadow 0.14s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.cursor-counter.is-on-image {
  color: #fff;
  text-shadow: 0 1px 7px rgba(0, 0, 0, 0.55), 0 0 2px rgba(0, 0, 0, 0.45);
}

.cursor-counter.is-visible {
  opacity: 1;
}

.cursor-counter-value {
  display: inline-block;
}

.cursor-arrow {
  display: inline-block;
  width: 1ch;
  text-align: center;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.cursor-arrow--left {
  margin-right: 0.18rem;
}

.cursor-counter.is-left .cursor-arrow--left {
  opacity: 1;
}

.cursor-counter.is-right .cursor-arrow--right {
  opacity: 1;
}

@media (max-width: 700px) {
  .cursor-counter {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }
}

.bio-frame {
  min-height: calc(100dvh - 2px);
  margin: 0;
  padding: 18px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.bio-background,
.bio-overlay,
.bio-shell {
  position: absolute;
  inset: 18px;
}

.bio-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.62);
}

.bio-overlay {
  background: linear-gradient(110deg, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.22) 48%, rgba(0, 0, 0, 0.35) 100%);
}

.bio-shell {
  z-index: 2;
  display: flex;
  flex-direction: column;
  overflow-y: hidden;
  overflow-x: hidden;
}

.bio-shell.is-scrollable {
  overflow-y: auto;
}

.bio-header {
  padding: 2rem 2.2rem 0;
}

.bio-header .gallery-nav-link {
  color: rgba(255, 255, 255, 0.88);
}

.bio-header .gallery-nav-link:hover {
  color: #fff;
}

.bio-content {
  flex: 1;
  display: flex;
  align-items: flex-start;
  padding: 2rem 2.2rem 3rem;
}

.bio-panel {
  width: min(100%, 760px);
  color: #fff;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.2s forwards;
}

.bio-kicker {
  font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.bio-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(56px, 10vw, 92px);
  line-height: 0.95;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
}

.bio-text,
.bio-contact-value {
  font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
}

.bio-text {
  white-space: pre-line;
}

.bio-divider {
  width: 72px;
  height: 1px;
  background: rgba(255, 255, 255, 0.45);
  margin: 2rem 0;
}

.bio-sections-row {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(180px, 0.9fr);
  gap: 1.8rem;
  align-items: start;
  margin-top: 0.2rem;
}

.bio-section {
  margin-top: 0;
}

.bio-section-title,
.bio-contact-label {
  font-family: 'Avenir Next', 'Avenir', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.bio-section-title {
  margin-bottom: 1rem;
}

.bio-contact-line {
  display: grid;
  grid-template-columns: clamp(7.2rem, 22vw, 9rem) minmax(0, 1fr);
  align-items: baseline;
  column-gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.bio-contact-label {
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0;
  white-space: nowrap;
}

.bio-contact-value {
  margin-bottom: 0;
}

.bio-contact-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.bio-contact-link:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.bio-socials {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bio-social-link {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.bio-social-link:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.48);
}

.bio-social-link img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.nav-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: none;
}

.nav-left {
  left: 0;
}

.nav-right {
  right: 0;
}

@media (max-width: 700px) {
  .project-header {
    align-items: center;
  }

  .bio-frame {
    padding: 14px;
  }

  .bio-background,
  .bio-overlay,
  .bio-shell {
    inset: 14px;
  }

  .bio-header {
    padding: 1.25rem 1.2rem 0;
  }

  .bio-content {
    align-items: flex-end;
    padding: 1.5rem 1.2rem 2rem;
  }

  .bio-panel {
    width: 100%;
  }

  .bio-sections-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .bio-title {
    font-size: clamp(42px, 16vw, 68px);
  }

  .bio-text,
  .bio-contact-value {
    font-size: 0.92rem;
    line-height: 1.7;
  }

  .bio-social-link {
    width: 40px;
    height: 40px;
  }

  .slideshow {
    align-items: center;
    background: var(--bg);
  }

  .slide {
    background: var(--bg);
  }

  .slide img {
    object-fit: contain;
    width: 100%;
    height: 100%;
  }

  .back-link {
    font-size: 12px;
  }
}
