html {
  scroll-behavior: smooth;
}

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

:root {
  --ink: #1e1f24;
  --slate: #4a4f5a;
  --paper: #f7f1e9;
  --sand: #ece3d6;
  --accent: #2b8a7e;
  --accent-dark: #1f6e64;
  --accent-blue: #2b8a7e;
  --shadow: 0 24px 60px rgba(20, 20, 20, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --heading-font: 'Cormorant Garamond', serif;
  --nav-height: 64px;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(180deg, var(--paper) 0%, #f2ece4 45%, #ffffff 100%);
  color: var(--ink);
  line-height: 1.6;
  padding-top: var(--nav-height);
  font-weight: 400;
  font-size: 17.5px;
}


header {
  position: relative;
  height: 90vh;
  min-height: 620px;
  overflow: hidden;
  background: #0f1116;
}

.page-header {
  height: auto;
  background: #ffffff;
  min-height: 0;
  overflow: visible;
  position: sticky;
  top: 0;
  z-index: 3000;
}

.page-header .site-nav,
.page-header nav {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(30, 31, 36, 0.08);
  z-index: 3001;
}

.hero {
  position: absolute;
  inset: 0;
  display: block;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15, 17, 22, 0.72) 0%, rgba(15, 17, 22, 0.35) 45%, rgba(15, 17, 22, 0.1) 100%);
  pointer-events: none;
  z-index: 3;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  position: absolute;
  text-align: left;
  padding: 0 8vw 8vh;
  z-index: 10;
  pointer-events: auto;
}

.logo {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 320px;
  transform: translate(-50%, -50%);
  max-width: 100%;
  pointer-events: auto;
  transition: transform 0.25s ease;
}

.logo:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

h1 {
  font-family: var(--heading-font);
  font-size: clamp(2.6rem, 4vw, 4rem);
  margin-bottom: 0.5rem;
}

h2 {
  font-family: var(--heading-font);
}

p {
  font-size: 1rem;
}

.hero-badges {
  position: absolute;
  top: 6vh;
  left: 8vw;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.hero-badges > div {
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.hero-badges > div:hover,
.hero-badges > div:focus-within {
  opacity: 1;
}

.hero-pin,
.hero-date,
.hero-exposure {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(15, 17, 22, 0.55);
  color: rgba(247, 241, 233, 0.95);
  cursor: default;
  line-height: 1.2;
  font-size: 0.95rem;
}

.hero-pin svg,
.hero-date svg,
.hero-exposure svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.hero-pin-label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.2s ease, opacity 0.2s ease;
  line-height: 1.1;
}

.hero-pin:hover .hero-pin-label,
.hero-pin:focus-within .hero-pin-label {
  max-width: 260px;
  opacity: 1;
}

.hero-date-label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.2s ease, opacity 0.2s ease;
}

.hero-date:hover .hero-date-label,
.hero-date:focus-within .hero-date-label {
  max-width: 220px;
  opacity: 1;
}

.hero-exposure-label {
  display: inline-flex;
  gap: 0.6rem;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.2s ease, opacity 0.2s ease;
}

.hero-exposure-label span {
  display: inline-block;
}

.hero-exposure:hover .hero-exposure-label,
.hero-exposure:focus-within .hero-exposure-label {
  max-width: 320px;
  opacity: 1;
}


.hero-title {
  color: #f9f4ee;
  letter-spacing: 0.02em;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(247, 241, 233, 0.85);
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

section h2 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60%;
  height: 3px;
  background: var(--accent-blue);
  border-radius: 999px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(43, 138, 126, 0.3);
}

.btn.primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn.ghost {
  background: rgba(247, 241, 233, 0.1);
  color: #f9f4ee;
  border-color: rgba(247, 241, 233, 0.4);
}

.btn.ghost:hover {
  background: rgba(247, 241, 233, 0.2);
}

.site-nav,
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 0.75rem 2rem;
  background: rgba(247, 241, 233, 0.85);
  backdrop-filter: blur(10px);
  z-index: 3000;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  box-shadow: 0 8px 20px rgba(20, 20, 20, 0.08);
  --underline-left: 0px;
  --underline-width: 0px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-nav a,
nav a {
  color: var(--ink);
  margin: 0 1rem;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}


.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(30, 31, 36, 0.08);
  padding: 0.5rem 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 3002;
}

.portfolio-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 4000;
}

.portfolio-overlay.is-open {
  display: flex;
}

.portfolio-panel {
  width: min(520px, 90vw);
  max-height: 85vh;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: auto;
}

.portfolio-panel h3 {
  font-family: var(--heading-font);
  font-size: 1.8rem;
}

.portfolio-close {
  align-self: flex-end;
  border: none;
  background: rgba(30, 31, 36, 0.08);
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 1.4rem;
  cursor: pointer;
}

.portfolio-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.portfolio-list a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  padding: 0.5rem 0.25rem;
}

.portfolio-list a:hover,
.portfolio-list a:focus {
  color: var(--accent);
}

.has-dropdown.is-open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

main {
  position: relative;
  z-index: 0;
}

.dropdown a {
  display: block;
  margin: 0;
  padding: 0.5rem 1rem;
  font-weight: 600;
  color: var(--ink);
}

.dropdown a:hover,
.dropdown a:focus {
  background: var(--sand);
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

section {
  padding: 4rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

#about, #contact {
  text-align: left;
}

#about .about-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 2rem;
  align-items: center;
}

#about .about-photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

#about p + p {
  margin-top: 1.2rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
  max-width: 640px;
}

.contact-form label {
  font-weight: 600;
  color: var(--ink);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(30, 31, 36, 0.2);
  font-family: inherit;
  font-size: 1rem;
  background: #ffffff;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 138, 126, 0.15);
}

@media (max-width: 900px) {
  #about .about-grid {
    grid-template-columns: 1fr;
  }
}

.portfolio-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.album-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(30, 31, 36, 0.08);
  box-shadow: var(--shadow);
  align-items: stretch;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.album-card.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.album-card.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .album-card.reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.album-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 70px rgba(20, 20, 20, 0.16);
}

.album-link {
  position: relative;
  display: block;
  text-decoration: none;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.album-image-frame {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(20, 20, 20, 0.12);
  --slide-x: 0%;
  --zoom: 1;
}

.album-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #ffffff;
  border-radius: inherit;
  transition: transform 0.75s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.75s ease;
  opacity: 1;
}

.album-image {
  position: absolute;
  inset: 0;
  will-change: transform;
  transform: translateX(var(--slide-x)) scale(var(--zoom));
}

.album-image.is-current {
  --slide-x: 0%;
}

.album-image.is-next {
  --slide-x: 100%;
}

.album-image-frame.is-sliding .album-image.is-current {
  --slide-x: -100%;
}

.album-image-frame.is-sliding .album-image.is-next {
  --slide-x: 0%;
}

.album-image-frame.is-resetting .album-image {
  transition: none;
}

.album-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.album-title {
  position: absolute;
  left: 1.5rem;
  bottom: 1.25rem;
  color: #ffffff;
  font-family: var(--heading-font);
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.album-link:hover .album-image-frame {
  --zoom: 1.02;
}

.album-link:hover .album-image-frame {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.album-content h3 {
  font-family: var(--heading-font);
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.album-content h3 a {
  color: inherit;
  text-decoration: none;
}

.album-content h3 a:hover,
.album-content h3 a:focus {
  color: var(--accent);
}

.album-content p {
  font-size: 1.05rem;
  color: var(--slate);
}

@media (max-width: 900px) {
  .album-title {
    font-size: 1.4rem;
  }

  header {
    height: 80vh;
    min-height: 520px;
  }

  .overlay {
    padding: 0 6vw 6vh;
  }

  .hero-copy {
    max-width: 520px;
  }

  .logo {
    height: 240px;
  }

  nav {
    padding: 0.6rem 0.75rem;
    gap: 0.5rem;
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  nav a {
    margin: 0 0.35rem;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    transform: none;
    box-shadow: var(--shadow);
    border: 1px solid rgba(30, 31, 36, 0.08);
    padding: 0.5rem 0;
    background: #ffffff;
    min-width: 220px;
  }

  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown {
    opacity: 0;
    visibility: hidden;
    transform: none;
  }

  .has-dropdown.is-open .dropdown {
    display: block;
    opacity: 1;
    visibility: visible;
  }

  .dropdown a {
    padding: 0.35rem 0.9rem;
  }
}

@media (max-width: 600px) {
  .logo {
    height: 190px;
  }

  .hero-copy {
    left: 6vw;
    bottom: 6vh;
    max-width: 90%;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .btn {
    width: 100%;
  }

  .hero-image {
    object-position: center center;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  header {
    height: 60vh;
    min-height: 360px;
  }

  .logo {
    height: 180px;
  }

  nav {
    padding: 0.5rem 0.75rem;
  }

  nav a {
    font-size: 0.85rem;
  }
}

.home .carousel {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
  padding: 0 2.5rem;
}

.home .slides {
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.6s ease;
  will-change: transform;
}

.home .slide {
  position: relative;
  flex: 0 0 70%;
  opacity: 0.6;
  transform: scale(0.94);
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.home .slide.active {
  opacity: 1;
  transform: scale(1);
}

.home .slide img {
  width: 100%;
  height: 320px;
  object-fit: contain;
  border-radius: 32px;
}

.slide-title {
  position: absolute;
  bottom: 10px;
  left: 10px;
  color: white;
  background: rgba(0, 0, 0, 0.7);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
}

.home .carousel button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  color: #333333;
  border: none;
  padding: 10px;
  font-size: 24px;
  cursor: pointer;
  z-index: 2;
}

.home .prev {
  left: 10px;
}

.home .next {
  right: 10px;
}

.home .carousel button:hover {
  background: rgba(255, 255, 255, 1);
}

.home .carousel a {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

@media (max-width: 900px) {
  .home .slide {
    flex-basis: 85%;
  }

  .home .carousel {
    padding: 0 2rem;
  }
}

@media (max-width: 600px) {
  .home .slide {
    flex-basis: 100%;
  }

  .home .carousel {
    padding: 0 1.25rem;
  }

  .home .slide img {
    height: 260px;
  }
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--slate);
  background: var(--paper);
}

.social-links {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-links a {
  color: var(--slate);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.social-links a:hover,
.social-links a:focus {
  color: var(--accent);
}

.social-links svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.strapline {
  font-size: 1.1rem;
  color: #9da7b3;
  max-width: 600px;
}

.gallery {
  max-width: none;
  padding: 1.25rem 2rem 2rem;
}

.gallery h2 {
  margin-bottom: 0.75rem;
}

.caption-editor {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(30, 31, 36, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

body:not(.show-caption-editor) .caption-editor {
  display: none;
}

body:not(.show-caption-editor) .caption-editor-toggle {
  display: none;
}

.caption-editor-toggle {
  border: 1px solid rgba(30, 31, 36, 0.2);
  background: #ffffff;
  color: var(--ink);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 1rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.caption-editor-toggle:hover,
.caption-editor-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.caption-editor-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--slate);
  font-weight: 600;
}

.caption-editor-info strong {
  color: var(--ink);
  font-weight: 700;
}

.caption-editor-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.caption-editor button {
  border: 1px solid rgba(30, 31, 36, 0.2);
  background: #ffffff;
  color: var(--ink);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.caption-editor button:hover,
.caption-editor button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.exif-filters {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(30, 31, 36, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

body:not(.show-exif-filters) .exif-filters {
  display: none;
}

.exif-filters-toggle {
  border: 1px solid rgba(30, 31, 36, 0.2);
  background: #ffffff;
  color: var(--ink);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: block;
  width: fit-content;
  margin-bottom: 1rem;
  margin-top: 0.75rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.exif-filters-toggle:hover,
.exif-filters-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.exif-filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.exif-filters-header h3 {
  font-family: var(--heading-font);
  font-size: 1.2rem;
}

.exif-reset {
  border: 1px solid rgba(30, 31, 36, 0.2);
  background: #ffffff;
  color: var(--ink);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.exif-reset:hover,
.exif-reset:focus {
  border-color: var(--accent);
  color: var(--accent);
}

.exif-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.9rem 1.2rem;
}

.exif-filters-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--slate);
}

.exif-filters-grid input,
.exif-filters-grid select {
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(30, 31, 36, 0.2);
  font-family: inherit;
  font-size: 0.95rem;
  background: #ffffff;
  color: var(--ink);
}

.exif-filters-grid input:focus,
.exif-filters-grid select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 138, 126, 0.15);
}

.exif-lens-filter {
  gap: 0.5rem;
}

.exif-lens-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.exif-lens-button {
  border: 1px solid rgba(30, 31, 36, 0.2);
  background: #ffffff;
  color: var(--ink);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.exif-lens-button:hover,
.exif-lens-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.exif-lens-button.is-active {
  background: var(--accent);
  border-color: var(--accent-dark);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(43, 138, 126, 0.3);
}

.exif-summary {
  margin: 0 0 1rem;
  color: var(--slate);
  font-weight: 600;
}

body:not(.show-exif-filters) .exif-summary,
body:not(.show-exif-filters) .exif-matches {
  display: none;
}

.exif-matches {
  margin: 0 0 2rem;
}

.exif-matches-empty {
  color: var(--slate);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.exif-matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.exif-matches-grid img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(20, 20, 20, 0.12);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.exif-matches-grid img:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(20, 20, 20, 0.16);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1rem;
  position: relative;
  z-index: 0;
}

.grid .gallery-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.grid img {
  display: block;
  transform: scale(1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

.gallery-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  line-height: 0;
}

.exif-info-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 17, 22, 0.55);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.exif-info-hint {
  position: absolute;
  top: 10px;
  right: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transform: translateX(6px);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.exif-info-hint::after {
  content: "->";
  font-size: 0.85rem;
  opacity: 0.9;
}

.gallery-media.show-exif-info .exif-info-hint {
  opacity: 1;
  transform: translateX(0);
}

.exif-info-button:hover,
.exif-info-button:focus-visible {
  background: rgba(15, 17, 22, 0.75);
  outline: none;
}

.exif-info-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(10, 10, 10, 0.62);
  color: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1;
}

.exif-info-overlay span {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.gallery-media.show-exif-info .exif-info-overlay {
  opacity: 1;
  pointer-events: auto;
}

.gallery-media.show-exif-info img {
  filter: brightness(0.65);
}

.gallery-caption {
  margin-top: 0.6rem;
  color: var(--slate);
  font-size: 0.95rem;
  line-height: 1.5;
  min-height: 1.3em;
}

.gallery .gallery-caption {
  display: none;
}

.gallery.caption-editing .gallery-caption {
  display: block;
}

.gallery-caption.is-empty {
  display: none;
}

.caption-editing .gallery-caption {
  display: block;
  background: #ffffff;
  border: 1px dashed rgba(30, 31, 36, 0.2);
  border-radius: 12px;
  padding: 0.45rem 0.7rem;
}

.caption-editing .gallery-caption:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 138, 126, 0.15);
}

.caption-editing .gallery-caption:empty::before {
  content: "Add caption...";
  color: #9da7b3;
}



.no-scroll {
  overflow: hidden;
}

body.lightbox-open nav,
body.lightbox-open .site-nav {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}


.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 5000;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.lightbox-caption {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: min(80vw, 720px);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.4;
  opacity: 0.35;
  transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.lightbox:hover .lightbox-caption,
.lightbox:focus-within .lightbox-caption,
.lightbox-caption:hover {
  opacity: 1;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.55);
}

.lightbox-caption.is-empty {
  display: none;
}

@media (max-width: 900px) and (orientation: landscape) {
  .lightbox-caption {
    font-size: 0.8rem;
    opacity: 0.2;
    background: rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 0.45);
  }

  .lightbox:hover .lightbox-caption,
  .lightbox:focus-within .lightbox-caption,
  .lightbox-caption:hover {
    opacity: 0.6;
    color: rgba(255, 255, 255, 0.8);
  }
}

.lightbox button {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  color: #111111;
  border: none;
  padding: 0.5rem 0.75rem;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 999px;
  z-index: 3;
}

.lightbox button:hover {
  background: #ffffff;
}

.lightbox-close {
  top: 16px;
  right: 16px;
}

.lightbox-info-toggle {
  top: 16px;
  right: 58px;
  font-weight: 700;
  width: 36px;
  height: 36px;
  padding: 0;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox-exif {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 2;
}

.lightbox-exif span {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.lightbox-exif-hint {
  position: absolute;
  top: 22px;
  right: 96px;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 3;
}

.lightbox-exif-hint::after {
  content: "→";
  margin-left: 0.35rem;
  opacity: 0.7;
}

.lightbox.is-exif-open .lightbox-exif-hint {
  opacity: 1;
  transform: translateX(0);
}

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

@media (max-width: 700px) {
  .lightbox button {
    padding: 0.4rem 0.6rem;
    font-size: 1rem;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}


.grid img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}
.site-nav::after,
nav::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: var(--underline-left);
  width: var(--underline-width);
  height: 3px;
  background: var(--accent-blue);
  border-radius: 999px;
  transition: width 0.2s ease, left 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}

.site-nav.is-underline::after,
nav.is-underline::after {
  opacity: 1;
}
