@font-face {
  font-family: 'Fansan';
  src: url('../assets/fonts/Fansan-Display-Medium-iF666bfc3717abf.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: 'Fansan';
  src: url('../assets/fonts/Fansan-Display-Light-Italic-iF666bfc371353e.woff') format('woff');
  font-weight: 300;
  font-style: italic;
  font-display: block;
}

@font-face {
  font-family: 'Averia Serif Libre';
  src: url('../assets/fonts/AveriaSerifLibre-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Averia Serif Libre';
  src: url('../assets/fonts/AveriaSerifLibre-Italic.woff') format('woff');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #000F1A;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.5);
  --sidebar-width: clamp(340px, 34vw, 520px);
  --font-display: 'Fansan', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'Averia Serif Libre', Georgia, serif;
}

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

img {
  max-width: 100%;
  height: auto;
}

html {
  overflow: auto;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--text);
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ==================== ANIMATION SYSTEM ==================== */

@keyframes slideInFromRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

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

.anim-slide-left {
  opacity: 0;
}
.anim-slide-left.anim-in {
  animation: slideInFromRight 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.anim-fade-up {
  opacity: 0;
}
.anim-fade-up.anim-in {
  animation: fadeInUp 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}


/* Index project cards */
#index-view .project-card {
  opacity: 0;
  transform: translateY(16px);
}
#index-view .project-card.anim-in {
  animation: fadeInUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* About page elements */
.headshot-img,
.about-bio p,
.music-label {
  opacity: 0;
  transform: translateY(14px);
}
.headshot-img.anim-in,
.about-bio p.anim-in,
.music-label.anim-in {
  animation: fadeInUp 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* CV entries */
.cv-section-label,
.cv-entry {
  opacity: 0;
  transform: translateY(10px);
}
.cv-section-label.anim-in,
.cv-entry.anim-in {
  animation: fadeInUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Thumbnail hover scale */
.thumbnail {
  overflow: hidden;
}
.thumbnail img {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.thumbnail:hover img {
  transform: scale(1.04);
}

/* Photo mobile cards: stagger fade up */
.photo-mobile-card {
  opacity: 0;
  transform: translateY(12px);
}
.photo-mobile-card.anim-in {
  animation: fadeInUp 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ==================== UTILITY ==================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==================== LOCK SCREEN ==================== */

/* ==================== LOADER ==================== */

#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo {
  height: 192px;
  width: auto;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader-logo.zoom-out {
  transform: scale(2.5);
  opacity: 0;
}

.loader-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.loader-svg {
  clip-path: inset(100% 0 0 0);
  animation: fillUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
}

@keyframes fillUp {
  from { clip-path: inset(100% 0 0 0); }
  to   { clip-path: inset(0% 0 0 0); }
}

/* ==================== PORTFOLIO LAYOUT ==================== */

#portfolio {
  opacity: 1;
}

.content {
  opacity: 0;
}

.content.visible {
  animation: fadeInContent 1s ease forwards;
}

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

/* ==================== BACKGROUND LOGO ==================== */

.bg-logo {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 85vh;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
  z-index: -1;
  user-select: none;
  opacity: 0;
  transition: opacity 1s ease;
}

.bg-logo.visible {
  opacity: 1;
}

.bg-logo svg {
  height: 100%;
  width: auto;
}

/* ==================== SIDEBAR ==================== */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 15px 15px;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.site-name {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.03em;
  line-height: 1;
  display: inline-block;
  opacity: 0;
  transform: translateX(calc(50vw - var(--sidebar-width)));
}

.site-name.slide-in {
  animation: slideInItem 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.sidebar-item {
  opacity: 0;
  transform: translateX(calc(50vw - var(--sidebar-width)));
}

.sidebar-item.slide-in {
  animation: slideInItem 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideInItem {
  from {
    opacity: 0;
    transform: translateX(calc(50vw - var(--sidebar-width)));
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.site-name:hover {
  opacity: 0.7;
}

.contact-nav {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-nav a {
  font-size: 15px;
  line-height: 1.6;
  transition: opacity 0.2s ease;
}

.contact-nav a:hover {
  opacity: 0.6;
}

.external-arrow {
  display: inline-block;
  vertical-align: middle;
  margin-left: 2px;
  position: relative;
  top: -1px;
}

.work-nav {
  margin-top: auto;
  margin-bottom: auto;
}

.work-label {
  font-size: 15px;
  font-weight: 700;
  display: block;
  margin-bottom: 12px;
}

.project-list li {
  margin-bottom: 4px;
}

.project-list a {
  font-size: 15px;
  line-height: 1.7;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s ease;
}

.project-list a:hover {
  opacity: 1;
}

.project-list a.active {
  font-weight: 700;
  opacity: 1;
}

.project-list.has-scroll-active a:not(.active) {
  opacity: 0.35;
}

/* Small circular arrow icon */
.nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.nav-arrow::after {
  content: '›';
  font-size: 20px;
  line-height: 1;
  margin-top: -1px;
  margin-left: 1px;
  color: rgba(255, 255, 255, 0.6);
}

/* ==================== MAIN CONTENT ==================== */

.content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: 15px 40px 80px;
}

/* ==================== INDEX VIEW ==================== */

#detail-view {
  display: none;
}

.content-top-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.scroll-motif {
  display: inline-block;
  will-change: transform;
  vertical-align: middle;
  margin-left: 4px;
  margin-top: -4px;
}

.greeting {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  transition: opacity 0.3s ease;
}

/* ==================== PROJECT CARDS ==================== */

.project-card {
  margin-bottom: 80px;
}

.thumbnail {
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
}

.placeholder-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #0a1628, #1a2a4a);
  border-radius: 2px;
}

.thumbnail img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.thumbnail {
  cursor: pointer;
}

.card-info {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.card-meta {
  max-width: 480px;
}

.card-category {
  font-size: 14px;
  line-height: 1.4;
}

.card-year {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-description {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 16px;
  max-width: 480px;
}

.details-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  margin-top: 16px;
  transition: opacity 0.2s ease;
}

.details-link:hover {
  opacity: 0.6;
}

/* ==================== DETAIL VIEW ==================== */

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.detail-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.index-link {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.index-link:hover {
  opacity: 0.6;
}

.up-arrow {
  font-size: 13px;
}

.detail-hero {
  width: 65%;
  margin-left: auto;
  margin-bottom: 24px;
}

.detail-hero .placeholder-img {
  aspect-ratio: 4 / 3;
}

.detail-hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.detail-meta-row {
  width: 65%;
  margin-left: auto;
  margin-bottom: 8px;
}

.detail-meta-row .detail-year {
  font-size: 14px;
  color: var(--text-muted);
}

.detail-meta-row .detail-category {
  font-size: 14px;
  color: var(--text-muted);
}

.detail-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 28px 0;
}

.detail-body {
  display: flex;
  margin-bottom: 60px;
}

.detail-label {
  font-size: 14px;
  color: var(--text-muted);
  width: 35%;
  flex-shrink: 0;
}

.detail-text {
  font-size: 14px;
  line-height: 1.65;
  width: 65%;
}

.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-gallery img {
  width: 100%;
  display: block;
  border-radius: 2px;
  max-height: 100vh;
  object-fit: cover;
  object-position: top center;
}

.gallery-placeholder {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #0a1628, #1a2a4a);
  border-radius: 2px;
}

.gallery-text-block {
  width: 66.67%;
  margin: 56px auto;
  text-align: left;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  text-wrap: pretty;
  orphans: 3;
  widows: 3;
}

.gallery-img-row {
  display: flex;
  gap: 8px;
}

.gallery-img-row img {
  flex: 1;
  width: 0;
  min-width: 0;
  clip-path: inset(0 2px 2px 0);
}

/* ==================== ACCORDIONS ==================== */

.detail-accordions {
  margin-top: 60px;
}

.accordion {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.accordion:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.accordion-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.25s ease;
}

.accordion-toggle:hover,
.accordion.open .accordion-toggle {
  opacity: 1;
}

.accordion-icon {
  font-size: 20px;
  font-weight: 300;
  transition: transform 0.3s ease;
}

.accordion.open .accordion-icon {
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.accordion.open .accordion-content {
  max-height: 400px;
  padding-bottom: 24px;
}

.accordion-content p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ==================== PROJECT NAV ==================== */

.project-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 80px;
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.project-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

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

.project-nav-arrow {
  font-size: 16px;
}

.project-nav-text {
  font-style: italic;
}

/* ==================== CV VIEW ==================== */

#cv-view {
  display: none;
}

.cv-page-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cv-about {
  display: flex;
  margin-bottom: 20px;
}

.cv-about-left {
  width: 35%;
  flex-shrink: 0;
}

.cv-about-right {
  width: 65%;
}

.cv-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.cv-title {
  font-size: 14px;
  color: var(--text-muted);
}

.cv-pronouns {
  font-size: 14px;
  color: var(--text-muted);
}

.cv-about-right p {
  font-size: 14px;
  line-height: 1.65;
}

.cv-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 28px 0;
}

.cv-section {
  display: flex;
  margin-bottom: 20px;
}

.cv-section-label {
  width: 35%;
  flex-shrink: 0;
  font-size: 14px;
  color: var(--text-muted);
  padding-top: 2px;
}

.cv-section-content {
  width: 65%;
}

.cv-entry {
  margin-bottom: 24px;
}

.cv-entry:last-child {
  margin-bottom: 0;
}

.cv-entry-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.cv-entry-detail {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ==================== PHOTOGRAPHY ==================== */

#photo-view {
  display: none;
}

#photo-gallery-view {
  display: none;
}

.photo-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.photo-filter {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.photo-filter:hover {
  color: var(--text);
}

.photo-filter.active {
  color: var(--text);
  font-weight: 700;
}

.filter-divider {
  color: rgba(255, 255, 255, 0.2);
  font-size: 14px;
  user-select: none;
}

.photo-collections .project-card {
  cursor: pointer;
}

.masonry-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  padding-bottom: 40px;
}

.gallery-photo-wrap {
  width: 100%;
  max-width: 680px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-photo-wrap.in {
  opacity: 1;
  transform: translateY(0);
}

.gallery-photo-wrap img {
  width: 100%;
  display: block;
  border-radius: 2px;
}

.gallery-empty {
  font-size: 14px;
  color: var(--text-muted);
  padding: 60px 0;
  text-align: center;
}

/* ==================== PHOTO ACTIVE LAYOUT ==================== */

body.photo-active .sidebar {
  display: none;
}

body.photo-active .content {
  margin-left: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.photo-active #photo-view {
  flex: 1;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body.photo-active .detail-header {
  display: none;
}

body.photo-active .photo-filters {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  margin-bottom: 0;
  background: none;
}

body.photo-active #photo-collections {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* ==================== PHOTO BOTTOM NAV ==================== */

.photo-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 20px 40px;
  z-index: 300;
  pointer-events: none;
}

.photo-bottom-nav > * {
  pointer-events: auto;
}

body.photo-active .photo-bottom-nav {
  display: flex;
}

.photo-nav-link {
  font-size: 13px;
  font-family: var(--font-body);
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.2s ease;
  flex: 1;
  text-align: right;
}

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

.photo-nav-pinwheel {
  display: block;
}

.photo-nav-label {
  font-size: 13px;
  font-family: var(--font-body);
  color: rgba(255, 255, 255, 0.4);
  flex: 1;
  text-align: left;
}

/* ==================== PHOTO LIGHTBOX ==================== */

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 15, 26, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.photo-lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s ease;
  line-height: 1;
  padding: 6px 10px;
  font-family: var(--font-body);
}

.lightbox-close:hover {
  color: var(--text);
}

.lightbox-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.lightbox-stack {
  position: absolute;
  inset: 0;
  perspective: 700px;
  perspective-origin: 50% 50%;
}

.lightbox-board {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(260px, 60vw, 860px);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.lightbox-board img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 85vh;
  user-select: none;
  pointer-events: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.72), 0 4px 16px rgba(0, 0, 0, 0.4);
}

.lightbox-counter {
  position: absolute;
  bottom: 32px;
  right: 48px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.1em;
}

.lightbox-name {
  position: absolute;
  bottom: 32px;
  left: 48px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.05em;
}

/* ==================== PHOTO CAROUSEL ==================== */

.carousel-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 900px;
  perspective-origin: 50% 50%;
  height: 55vh;
  min-height: 280px;
  margin-top: 20px;
  overflow: visible;
  transform-style: preserve-3d;
}

.carousel-scene {
  position: relative;
  width: 220px;
  height: 155px;
  transform-style: preserve-3d;
  will-change: transform;
}

.carousel-pivot {
  position: absolute;
  left: 0;
  top: 0;
  width: 220px;
  height: 155px;
  transform-style: preserve-3d;
  cursor: pointer;
}

.carousel-card {
  position: absolute;
  left: 0;
  top: 0;
  width: 220px;
  height: 155px;
  transform: translateZ(380px);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s ease,
              opacity 0.4s ease;
  box-shadow: -4px 6px 24px rgba(0, 0, 0, 0.6);
}

.carousel-pivot:hover .carousel-card {
  transform: translateZ(450px) scale(1.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}

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

.carousel-card .placeholder-img {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.3) 48%, transparent 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 2px;
  padding: 10px 10px;
  text-align: left;
  transition: background 0.25s ease;
}

.carousel-pivot:hover .carousel-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0.08) 100%);
}

.carousel-name {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  font-family: var(--font-body);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.carousel-sub {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-body);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* ==================== ABOUT VIEW ==================== */

#about-view {
  display: none;
}

.about-header {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  margin-bottom: 32px;
  position: sticky;
  top: 15px;
  z-index: 10;
}

.sidebar.minimal .work-nav,
.sidebar.minimal .contact-nav {
  display: none;
}

body.about-active .content {
  margin-left: 0;
  padding: 15px 40px 0;
}

.about-scroll {
  display: flex;
  flex-direction: column;
  gap: 80px;
  padding: 0 40px 80px;
}

.about-panel {
  width: 100%;
}

/* Viewfinder */

.headshot-panel {
  display: flex;
  justify-content: center;
}

.headshot-img {
  max-width: 825px;
  width: 100%;
  display: block;
  border-radius: 4px;
}


/* About Bio */

.text-panel {
  max-width: 600px;
  margin: 0 auto;
}

.about-bio p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 24px;
  color: var(--text);
}

.about-bio em {
  color: var(--text);
  font-style: italic;
}

/* Contact Sheet */

.contact-sheet-panel {
  width: 100%;
  position: relative;
}

.contact-sheet-img {
  width: 100%;
  display: block;
  border-radius: 4px;
}

/* ==================== ABOUT SCROLL INDICATOR ==================== */

.about-scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 40px auto 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.about-scroll-indicator.visible {
  opacity: 1;
}

.about-scroll-indicator.hidden {
  opacity: 0;
}

.scroll-indicator-text {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  font-family: var(--font-display);
}

.scroll-indicator-arrow {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.5);
  animation: scrollBounce 1.5s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ==================== MUSIC SECTION ==================== */

.music-panel {
  text-align: center;
  margin-top: 80px;
}

.music-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.album-grid {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
}

.album-wrapper {
  width: 150px;
  height: 200px;
  margin-left: -30px;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
}

.album-item {
  position: relative;
  width: 150px;
  height: 150px;
  transform: perspective(400px) rotateY(-25deg);
  box-shadow: -6px 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.35s ease;
}

.album-overlay {
  display: none;
}

.album-wrapper:hover {
  z-index: 10;
}

.album-wrapper:hover .album-item {
  transform: perspective(400px) rotateY(0deg) translateY(-180px) scale(1.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.album-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.album-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a1628, #1a2a4a);
  border-radius: 2px;
}

.now-playing {
  margin-top: 32px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.now-playing.active {
  opacity: 1;
}

.np-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.np-artist {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==================== HOVER / INTERACTION ==================== */

.thumbnail {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover .thumbnail {
  transform: scale(0.99);
}

/* ==================== HAMBURGER MENU ==================== */

.hamburger {
  display: none;
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 300;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 24px;
  height: 1px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-spinner {
  display: none;
  position: fixed;
  top: 17px;
  left: 20px;
  z-index: 300;
  width: 22px;
  height: 22px;
}

.mobile-back {
  display: none;
  text-align: center;
  margin-top: 40px;
  padding-bottom: 20px;
}

.mobile-back a {
  font-size: 14px;
  color: var(--text-muted);
  transition: opacity 0.2s ease;
}

.mobile-back a:hover {
  opacity: 0.6;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 250;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow-y: auto;
  padding: 80px 24px 60px;
}

.mobile-menu-projects {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 40px;
}

.mobile-menu-project-link {
  font-family: var(--font-display) !important;
  font-size: clamp(22px, 5.5vw, 38px) !important;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--text) !important;
  text-decoration: none;
  text-align: center;
  opacity: 0.85;
  transition: opacity 0.2s ease;
  line-height: 1.3;
  padding: 4px 0;
}

.mobile-menu-project-link:hover {
  opacity: 1;
}

.mobile-menu-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  justify-content: center;
  margin-bottom: 28px;
}

.mobile-menu-contact a {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mobile-menu-contact a:hover {
  color: var(--text);
}

.mobile-menu-home-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.25);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-body);
  padding: 12px 28px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  margin-top: 8px;
}

.mobile-menu-home-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ==================== PROJECT INTRO ACCORDION ==================== */

.project-intro-accordion {
  /* On desktop: render as transparent block, always open */
  display: block;
}

.project-intro-accordion-summary {
  display: none; /* hidden on desktop */
}

/* ==================== PHOTO MOBILE GRID ==================== */

.photo-mobile-grid {
  display: none; /* shown only on mobile via media query */
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 12px;
}

.photo-mobile-card {
  position: relative;
  cursor: pointer;
  border-radius: 2px;
  overflow: hidden;
}

.photo-mobile-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}

.photo-mobile-card:active img {
  opacity: 0.75;
}

.photo-mobile-card-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 14px 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-body);
  color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
}

/* Masonry view — inside a collection on mobile */
.photo-masonry-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 6vw, 40px);
  font-weight: 300;
  color: var(--text);
  letter-spacing: 0.03em;
  display: block;
  width: 100%;
  padding: 20px 16px 28px;
  text-align: center;
}

.photo-masonry {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  width: 100%;
}

.photo-masonry img {
  width: 100%;
  display: block;
}

.photo-masonry-back {
  display: block;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-body);
  padding: 28px 12px 120px;
  text-align: center;
  transition: color 0.2s;
}

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

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 260px;
  }

  .card-info {
    flex-direction: column;
    gap: 12px;
  }

  .card-title {
    min-width: unset;
  }

  .detail-hero {
    width: 80%;
  }

  .detail-body {
    flex-direction: column;
    gap: 16px;
  }

  .carousel-stage {
    height: 45vh;
  }

  .carousel-scene,
  .carousel-pivot,
  .carousel-card {
    width: 180px;
    height: 126px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    padding: 18px 20px;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    z-index: 200;
    background: var(--bg);
  }

  .site-name {
    font-size: 22px;
    text-align: center;
  }

  .site-name .scroll-motif {
    display: none;
  }

  .work-nav,
  .contact-nav {
    display: none !important;
  }

  .content {
    margin-left: 0;
    padding: 24px 20px 60px;
  }

  .content-top-bar {
    margin-bottom: 40px;
  }

  .about-header {
    display: none;
  }

  .mobile-back {
    display: block;
  }

  .detail-hero,
  .detail-meta-row {
    width: 100%;
    margin-left: 0;
  }

  .gallery-text-block {
    width: 85%;
  }

  .gallery-img-row {
    flex-direction: column;
  }

  .cv-about {
    flex-direction: column;
  }

  .cv-about-left,
  .cv-about-right {
    width: 100%;
  }

  .cv-section {
    flex-direction: column;
    gap: 8px;
  }

  .cv-section-label,
  .cv-section-content {
    width: 100%;
  }

  /* Hamburger & Mobile Spinner */
  .hamburger {
    display: flex;
  }

  .mobile-spinner {
    display: block;
  }

  .mobile-menu.open {
    display: flex;
  }

  /* Albums */
  .album-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    direction: ltr;
  }

  .album-wrapper {
    width: 100%;
    height: auto;
    margin-left: 0;
  }

  .album-item {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .album-wrapper:hover .album-item {
    transform: none;
  }

  .now-playing {
    display: none;
  }

  .album-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 2px;
  }

  .album-item.tapped .album-overlay {
    opacity: 1;
  }

  .album-overlay-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
  }

  .album-overlay-artist {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
  }

  /* About */
  body.about-active .content {
    padding: 24px 20px 60px;
  }

  .headshot-img {
    max-width: 100%;
  }

  .about-bio p {
    font-size: 14px;
    text-align: center;
  }

  /* Replace 3D carousel with flat grid on mobile */
  .carousel-stage {
    display: none;
  }

  .photo-mobile-grid {
    display: grid;
  }

  .lightbox-board {
    width: 88vw;
  }

  /* Photography: show sidebar nav on mobile */
  body.photo-active .sidebar {
    display: flex !important;
  }

  /* Filter: move to sticky bottom with bg gradient instead of fixed top */
  body.photo-active .photo-filters {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    background: linear-gradient(to top, rgba(0, 15, 26, 1) 70%, transparent);
    padding: 44px 16px 20px;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0 10px;
    width: 100%;
  }

  body.photo-active .photo-filters .filter-divider {
    display: none;
  }

  body.photo-active .photo-filters .photo-filter {
    font-size: 11px;
    letter-spacing: 0.04em;
  }

  /* Collections container: full-width, stack vertically */
  body.photo-active #photo-collections {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding-bottom: 120px;
    overflow-y: auto;
    width: 100%;
  }

  /* Hide the photo bottom nav (Photography / star / Home) on mobile */
  .photo-bottom-nav {
    display: none !important;
  }

  /* Detail pages: show sidebar top bar, hide detail-specific controls */
  body.detail-active .sidebar {
    display: flex !important;
  }

  body.detail-active .detail-site-name,
  body.detail-active .detail-controls,
  body.detail-active .detail-bottom-bar,
  body.detail-active .credits-panel {
    display: none !important;
  }

  /* Mobile menu */
  .mobile-menu.open {
    display: flex;
  }

  /* Accordion for project intro on mobile */
  .project-intro-accordion-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-family: var(--font-body);
    color: rgba(255, 255, 255, 0.35);
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    cursor: pointer;
    list-style: none;
  }

  .project-intro-accordion-summary::-webkit-details-marker { display: none; }

  .project-intro-accordion-summary::after {
    content: '+';
    font-size: 14px;
    color: rgba(255, 255, 255, 0.3);
    transition: transform 0.2s;
  }

  details.project-intro-accordion[open] .project-intro-accordion-summary::after {
    content: '−';
  }
}

/* =====================================================
   DETAIL ACTIVE — sidebar hidden, full-width canvas
   ===================================================== */

body.detail-active .sidebar {
  display: none;
}

body.detail-active .content {
  margin-left: 0;
}

body.detail-split .content {
  padding: 0;
}

/* Hide old detail elements in split-layout mode */
body.detail-split .detail-header  { display: none !important; }
body.detail-split .detail-hero    { display: none !important; }
body.detail-split .detail-meta-row { display: none !important; }
body.detail-split .detail-accordions { display: none !important; }
body.detail-split #project-nav    { display: none !important; }

/* Hide accordions for all detail-active pages (replaced by credits button) */
body.detail-active .detail-accordions { display: none; }

/* =====================================================
   SPLIT DETAIL LAYOUT — intro + sections
   ===================================================== */

.project-split-intro {
  display: grid;
  grid-template-columns: 38% 62%;
  min-height: 75vh;
  padding: 80px 15px 60px 15px;
  align-items: start;
}

.project-intro-left {
  padding-right: 40px;
  padding-top: 60px;
  position: sticky;
  top: 60px;
  align-self: start;
}

.project-meta-line {
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 20px;
}

.project-display-name {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 64px);
  font-weight: 300;
  line-height: 1;
  margin-bottom: 32px;
  color: var(--text);
}

.project-intro-block {
  margin-top: 28px;
}

.project-intro-block-label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
  margin-bottom: 6px;
  font-family: var(--font-body);
}

.project-intro-brief {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.38);
  text-wrap: pretty;
  orphans: 3;
  widows: 3;
}

.project-intro-right img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

/* Individual project sections */
.project-section {
  display: grid;
  grid-template-columns: 38% 62%;
  padding: 0 15px 0 15px;
}

.section-left {
  padding-right: 40px;
  padding-top: 56px;
  padding-bottom: 56px;
  position: sticky;
  top: 60px;
  align-self: start;
}

.section-label {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(21px, 2.8vw, 34px);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 10px;
}

.section-text {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.38);
  text-wrap: pretty;
  orphans: 3;
  widows: 3;
}

.section-right {
  padding-top: 56px;
  padding-bottom: 56px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-right img {
  width: 100%;
  display: block;
  border-radius: 2px;
  clip-path: inset(0 2px 2px 0);
}

.section-right .gallery-img-row {
  display: flex;
  gap: 8px;
}

.section-right .gallery-img-row img {
  flex: 1;
  width: 0;
  min-width: 0;
  clip-path: inset(0 2px 2px 0);
}

/* =====================================================
   NEXT PROJECT FOOTER
   ===================================================== */

.project-section-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 15px;
  transform: scaleX(0);
  transform-origin: right center;
}

.project-next-footer {
  margin-top: 0;
  padding: 60px 15px 60px 15px;
  cursor: pointer;
}

.project-next-footer:hover .project-next-name {
  opacity: 0.65;
}

.project-next-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-body);
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 28px;
}

.project-next-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.project-next-left {
  flex: 1;
  min-width: 0;
}

.project-next-name {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 56px);
  font-weight: 300;
  line-height: 1;
  color: var(--text);
  margin-bottom: 16px;
  transition: opacity 0.3s ease;
}

.project-next-desc {
  font-size: 12px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.3);
  max-width: 420px;
  text-wrap: pretty;
}

.project-next-right {
  width: 42%;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 2px;
}

.project-next-right img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-next-footer:hover .project-next-right img {
  transform: scale(1.04);
}

/* =====================================================
   DETAIL CONTROLS (bottom-left: credits + hamburger)
   ===================================================== */

.detail-controls {
  position: fixed;
  bottom: 32px;
  left: 15px;
  z-index: 200;
  display: none;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 16px;
}

body.detail-active .detail-controls {
  display: flex;
}

.detail-credits-btn {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-body);
  transition: color 0.2s;
}

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

.detail-hamburger-btn {
  width: 26px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}

.detail-hamburger-btn span {
  display: block;
  height: 1px;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.2s;
}

.detail-hamburger-btn span:nth-child(1) { width: 100%; }
.detail-hamburger-btn span:nth-child(2) { width: 60%; }

.detail-hamburger-btn:hover span {
  background: var(--text);
}

/* =====================================================
   FIXED SITE NAME (top-left, matches sidebar, fades on scroll)
   ===================================================== */

.detail-site-name {
  position: fixed;
  top: 15px;
  left: 15px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--text);
  z-index: 400;
  transition: opacity 0.3s ease;
  display: none;
  text-decoration: none;
  cursor: pointer;
  align-items: center;
  gap: 4px;
}

.detail-site-name svg {
  vertical-align: middle;
  margin-left: 2px;
}

body.detail-active .detail-site-name {
  display: inline-flex;
}

/* =====================================================
   DETAIL BOTTOM GRADIENT BAR
   ===================================================== */

.detail-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(to bottom, transparent, rgba(0, 15, 26, 1));
  z-index: 195;
  pointer-events: none;
  display: none;
}

body.detail-active .detail-bottom-bar {
  display: block;
}


/* =====================================================
   PROJECT OVERLAY (hamburger full-screen)
   ===================================================== */

.project-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 500;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px 60px;
}

.project-overlay.open {
  display: flex;
}

.project-overlay-close {
  position: absolute;
  top: 24px;
  right: 36px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  transition: color 0.2s;
}

.project-overlay-close:hover {
  color: var(--text);
}

.overlay-take-home-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.25);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-body);
  padding: 12px 28px;
  cursor: pointer;
  margin-top: 32px;
  transition: border-color 0.2s, color 0.2s;
}

.overlay-take-home-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

.project-overlay-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-bottom: 60px;
}

.project-overlay-item {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.5vw, 44px);
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--text);
  opacity: 0.2;
  transition: opacity 0.2s;
  cursor: pointer;
  text-align: center;
  line-height: 1.35;
  padding: 2px 0;
  user-select: none;
}

.project-overlay-item.active {
  opacity: 1;
}

.project-overlay-item:hover:not(.active) {
  opacity: 0.55;
}

.project-overlay-contact {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.project-overlay-contact a {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  text-decoration: none;
  transition: color 0.2s;
}

.project-overlay-contact a:hover {
  color: var(--text);
}

/* =====================================================
   CREDITS PANEL (full left-column overlay)
   ===================================================== */

.credits-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 38vw;
  z-index: 300;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 15, 26, 0.55) 45%,
    rgba(0, 15, 26, 1) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 60px 80px;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.credits-panel.open {
  opacity: 1;
  pointer-events: auto;
}

.credits-panel.open.scroll-hidden {
  opacity: 0;
  pointer-events: none;
}

.credits-panel-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
  margin-bottom: 10px;
}

.credits-panel-text {
  font-size: 12px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 24px;
}

.credits-panel-close {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.35);
  font-size: 14px;
  padding: 0;
  text-align: left;
  letter-spacing: 0.06em;
  transition: color 0.2s;
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.credits-panel-close:hover {
  color: var(--text);
}


/* =====================================================
   MOBILE — detail layout
   ===================================================== */

@media (max-width: 860px) {
  .project-split-intro,
  .project-section {
    grid-template-columns: 1fr;
    padding: 40px 24px;
  }

  .project-split-intro {
    min-height: auto;
    padding-top: 56px;
  }

  .project-intro-left {
    position: static;
    padding-right: 0;
    padding-top: 0;
    padding-bottom: 32px;
    text-align: center;
  }

  .project-intro-block-label {
    text-align: left;
  }

  .project-intro-brief {
    text-align: left;
  }

  .section-left {
    position: static;
    padding-right: 0;
    padding-top: 0;
    padding-bottom: 24px;
    text-align: center;
  }

  .section-label {
    font-size: 27px;
  }

  .section-text {
    text-align: center;
  }

  .section-right {
    padding-top: 0;
  }

  .project-next-footer {
    padding: 40px 24px;
  }

  .project-next-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .project-next-right {
    width: 100%;
  }

  .project-next-name {
    font-size: clamp(20px, 6vw, 36px);
  }

  /* Detail controls desktop-only — hidden on mobile via 768px block */

  /* Overlay: centered vertically, scrollable if needed */
  .project-overlay {
    padding: 80px 24px 60px;
    justify-content: center;
    overflow-y: auto;
  }

  .project-overlay-list {
    margin-bottom: 32px;
  }

  /* Photo nav tighter on mobile */
  .photo-bottom-nav {
    padding: 16px 24px;
  }
}

/* Gallery row: stack vertically on mobile (placed after base rules to win cascade) */
@media (max-width: 768px) {
  .gallery-img-row {
    flex-direction: column;
  }

  .gallery-img-row img,
  .section-right .gallery-img-row img {
    flex: none;
    width: 100%;
    min-width: 0;
  }
}
