/* ===========================================================================
   Tamás Papp — Cinematographer Portfolio
   =========================================================================== */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #0f0f0f;
  --bg-tertiary: #161616;
  --bg-card: #111111;
  --bg-overlay: rgba(6, 6, 6, 0.97);

  --text-primary: #edece8;
  --text-secondary: #8a8680;
  --text-dim: #555250;

  --accent-cine: #c8a97e;
  --accent-ue: #5d9ab5;
  --accent-photo: #a89880;
  --accent-about: #c8a97e;

  --font-heading: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  --nav-height: 64px;
  --ease-out: cubic-bezier(0.25, 0, 0.15, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; color: inherit; }

/* ===========================================================================
   Navigation
   =========================================================================== */

#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  padding: 0 clamp(24px, 4vw, 60px);
  transition: background 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out),
              transform 0.35s var(--ease-out);
}

#main-nav.nav-hidden {
  transform: translateY(-100%);
}

#main-nav.scrolled {
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04);
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}

#main-nav.scrolled .nav-logo { opacity: 1; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 40px;
}

.nav-links a {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text-primary);
  transition: width 0.3s var(--ease-out);
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  z-index: 1010;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle.open span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

html.nav-open,
body.nav-open {
  overflow: hidden;
  height: 100%;
}
body.nav-open {
  position: fixed;
  width: 100%;
  touch-action: none;
  -webkit-overflow-scrolling: auto;
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
}
.nav-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ===========================================================================
   Hero
   =========================================================================== */

#hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(200, 169, 126, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  z-index: 1;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.1;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1.2s var(--ease-out) 0.3s forwards;
}

.hero-title {
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1.2s var(--ease-out) 0.7s forwards;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeInUp 1s var(--ease-out) 1.4s forwards;
}

.hero-scroll-indicator span {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

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

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* ===========================================================================
   Section Common
   =========================================================================== */

.section {
  padding: 120px clamp(24px, 5vw, 80px) 80px;
  min-height: 80vh;
}

.section-header {
  max-width: 900px;
  margin: 0 auto 64px;
  text-align: center;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.section-line {
  width: 48px;
  height: 1px;
  margin: 20px auto 0;
  transition: background 0.3s;
}

/* Section accent colours */
[data-accent="cine"] .section-line { background: var(--accent-cine); }
[data-accent="ue"] .section-line { background: var(--accent-ue); }
[data-accent="photo"] .section-line { background: var(--accent-photo); }
[data-accent="about"] .section-line { background: var(--accent-about); }

[data-accent="cine"] { background: var(--bg-primary); }
[data-accent="ue"] { background: var(--bg-secondary); }
[data-accent="photo"] { background: var(--bg-primary); }
[data-accent="about"] { background: var(--bg-secondary); }

/* ===========================================================================
   Cinematography Grid
   =========================================================================== */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  max-width: 1400px;
  margin: 0 auto;
}

.project-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out), filter 0.6s var(--ease-out);
  filter: brightness(0.8) saturate(0.9);
}

.project-card:hover img {
  transform: scale(1.04);
  filter: brightness(0.45) saturate(0.8);
}

.project-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 28px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  transform: translateY(4px);
  opacity: 0.6;
  transition: transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out);
}

.project-card:hover .project-card-info {
  transform: translateY(0);
  opacity: 1;
}

.project-card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
  color: var(--accent-cine);
}

.project-card-sub {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.project-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-height: 50vh;
}

/* Reveal animation */
.project-card {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================================================================
   Unreal Engine Grid
   =========================================================================== */

.ue-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.ue-card {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: var(--bg-tertiary);
  cursor: default;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  text-align: center;
}

.ue-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.ue-card-img {
  width: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  background: var(--bg-tertiary);
  max-height: 480px;
  filter: brightness(0.9);
  transition: filter 0.5s, transform 0.6s var(--ease-out);
  will-change: transform, filter;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.ue-card:hover .ue-card-img {
  filter: brightness(0.7);
  transform: scale(1.02);
}

.ue-card-body {
  padding: 24px 20px;
  text-align: left;
}

.ue-card-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent-ue);
  margin-bottom: 4px;
}

.ue-card-year {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.ue-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.ue-card-link {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ue);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.ue-card-link:hover { border-color: var(--accent-ue); }

/* ===========================================================================
   Photography
   =========================================================================== */

.photo-collections {
  max-width: 1400px;
  margin: 0 auto;
}

.photo-collection {
  margin-bottom: 96px;
}

.photo-collection:last-child {
  margin-bottom: 0;
}

.photo-collection-header {
  text-align: center;
  margin-bottom: 40px;
}

.photo-collection-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--accent-photo);
  margin-bottom: 4px;
}

.photo-collection-subtitle {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.photo-preview-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 2 / 3;
  background: var(--bg-card);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.photo-preview-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-out), filter 0.4s;
  filter: brightness(0.85);
}

.photo-preview-item:hover img {
  transform: scale(1.04);
  filter: brightness(1);
}

.photo-external-link {
  display: block;
  text-align: center;
  margin-top: 28px;
  font-size: 0.8rem;
  color: var(--accent-photo);
  letter-spacing: 0.04em;
  transition: opacity 0.3s;
}

.photo-external-link:hover {
  opacity: 0.7;
}

.photo-view-all {
  display: block;
  margin: 36px auto 0;
  padding: 14px 44px;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border: 1px solid var(--text-dim);
  border-radius: 2px;
  transition: color 0.3s, border-color 0.3s;
}

.photo-view-all:hover {
  color: var(--text-primary);
  border-color: var(--accent-photo);
}

/* Photography Gallery Overlay */
#photo-gallery-overlay {
  z-index: 2000;
  background: var(--bg-primary);
}

.photo-gallery-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px clamp(16px, 3vw, 48px) 80px;
}

.photo-gallery-header {
  text-align: center;
  margin-bottom: 48px;
}

.photo-gallery-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 300;
  color: var(--accent-photo);
  margin-bottom: 8px;
}

.photo-gallery-subtitle {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.photo-gallery-grid .photo-gallery-item {
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--bg-card);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.photo-gallery-grid .photo-gallery-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.photo-gallery-grid .photo-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out), filter 0.4s;
  filter: brightness(0.85);
}

.photo-gallery-grid .photo-gallery-item:hover img {
  transform: scale(1.03);
  filter: brightness(1);
}

/* ===========================================================================
   About
   =========================================================================== */

.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.about-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.about-images img {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 4;
  filter: brightness(0.85);
  transition: filter 0.5s;
}

.about-images img:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 10;
}

.about-images img:hover { filter: brightness(1); }

.about-text {
  padding-top: 40px;
}

.about-text .section-title { text-align: left; }
.about-text .section-line { margin: 20px 0 0; }

.about-bio {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-top: 32px;
  white-space: pre-line;
}

.about-contact {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.contact-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.contact-email {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--accent-about);
  transition: opacity 0.3s;
}

.contact-email:hover { opacity: 0.7; }

/* ===========================================================================
   Footer
   =========================================================================== */

footer {
  padding: 40px clamp(24px, 5vw, 80px);
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* ===========================================================================
   Project Detail Overlay
   =========================================================================== */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg-overlay);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease-out), visibility 0.5s;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.overlay-close {
  position: fixed;
  top: 20px;
  right: 28px;
  font-size: 2rem;
  color: var(--text-secondary);
  z-index: 2010;
  transition: color 0.3s, transform 0.3s;
  line-height: 1;
}

.overlay-close:hover {
  color: var(--text-primary);
  transform: rotate(90deg);
}

.overlay-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 60px) 80px;
}

.overlay-hero {
  width: 100%;
  margin-bottom: 48px;
}

.overlay-hero img {
  width: 100%;
  aspect-ratio: 2.39 / 1;
  object-fit: cover;
}

.overlay-info {
  max-width: 800px;
  margin-bottom: 64px;
}

.overlay-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.overlay-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  color: var(--accent-cine);
  line-height: 1.2;
  margin-bottom: 8px;
}

.overlay-original-title {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.overlay-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.overlay-credits {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.8;
}

.overlay-actions {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn-watch {
  padding: 14px 36px;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bg-primary);
  background: var(--accent-cine);
  border-radius: 2px;
  transition: background 0.3s, transform 0.2s;
}

.btn-watch:hover { background: #d4b68e; transform: translateY(-1px); }

.btn-link {
  padding: 14px 36px;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border: 1px solid var(--text-dim);
  border-radius: 2px;
  transition: color 0.3s, border-color 0.3s;
}

.btn-link:hover { color: var(--text-primary); border-color: var(--text-secondary); }

.coming-soon-badge {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 14px 36px;
  border: 1px dashed var(--text-dim);
  border-radius: 2px;
}

/* Overlay gallery */
.overlay-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.img-fade-in {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.img-fade-in.loaded {
  opacity: 1;
}

.overlay-gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  cursor: pointer;
  filter: brightness(0.8);
  transition: filter 0.4s;
}

.overlay-gallery img:hover { filter: brightness(1); }

/* ===========================================================================
   Video Player Overlay
   =========================================================================== */

#video-overlay {
  z-index: 2500;
  background: #000;
}

#video-overlay .video-player-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 60px;
}

#video-player {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  background: #000;
}

/* ===========================================================================
   Password Modal
   =========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

.modal.active { opacity: 1; visibility: visible; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.modal-content {
  position: relative;
  background: var(--bg-tertiary);
  padding: 48px;
  max-width: 400px;
  width: 90%;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.06);
  transform: translateY(20px);
  transition: transform 0.4s var(--ease-out);
}

.modal.active .modal-content { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.5rem;
  color: var(--text-dim);
  transition: color 0.3s;
}

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

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 8px;
}

.modal-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.password-input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.3s;
}

.password-input:focus { border-color: var(--accent-cine); }

.password-error {
  font-size: 0.78rem;
  color: #c0605a;
  margin-top: 8px;
  min-height: 1.2em;
}

.btn-submit {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 16px;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bg-primary);
  background: var(--accent-cine);
  border-radius: 2px;
  transition: background 0.3s;
}

.btn-submit:hover { background: #d4b68e; }

/* ===========================================================================
   Lightbox
   =========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(0, 0, 0, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

.lightbox.active { opacity: 1; visibility: visible; }

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 2rem;
  color: var(--text-secondary);
  z-index: 4010;
  transition: color 0.3s;
}

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

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: var(--text-secondary);
  z-index: 4010;
  padding: 20px;
  transition: color 0.3s;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-prev:hover,
.lightbox-next:hover { color: var(--text-primary); }

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  transition: opacity 0.3s;
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

/* ===========================================================================
   Loading skeleton
   =========================================================================== */

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-tertiary) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===========================================================================
   Responsive
   =========================================================================== */

@media (max-width: 1024px) {
  .project-grid { grid-template-columns: 1fr; }
  .ue-grid { display: flex; flex-direction: column-reverse; max-width: 600px; gap: 32px; }
  .photo-preview-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .about-container { grid-template-columns: 1fr; gap: 0; }
  .about-text { padding-top: 0; order: -1; margin-bottom: 32px; }
  .about-images { grid-template-columns: 1fr 1fr; gap: 6px; }
  .about-images img { aspect-ratio: 3 / 4; }
  .about-images img:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
  .overlay-gallery { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  #main-nav.scrolled {
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav-overlay { display: block; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 260px;
    background: var(--bg-tertiary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
    z-index: 1010;
  }

  .nav-links.open { transform: translateX(0); }

  .photo-preview-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-gallery-grid { grid-template-columns: 1fr; }
  .about-images { grid-template-columns: 1fr 1fr; }
  .about-images img:first-child { aspect-ratio: 16 / 10; grid-column: 1 / -1; }

  #video-overlay .video-player-wrap { padding: 20px; }
}

@media (max-width: 480px) {
  .photo-preview-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-gallery-grid { grid-template-columns: 1fr; }
  .section { padding: 80px 16px 60px; }
}
