:root {
  color-scheme: dark;
  --bg: #10131a;
  --surface: #ffffff;
  --ink: #f7fafc;
  --muted: rgba(255, 255, 255, 0.74);
  --line: rgba(255, 255, 255, 0.2);
  --accent: #45c7b5;
  --coral: #ff9b70;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  --radius: 8px;
  --header-chip-bg: rgba(16, 19, 26, 0.5);
  --brand-mark-bg: rgba(16, 19, 26, 0.72);
  --control-bg: rgba(16, 19, 26, 0.58);
  --dot-bg: rgba(255, 255, 255, 0.38);
  --slide-bg:
    radial-gradient(circle at 78% 45%, rgba(69, 199, 181, 0.18), transparent 32%),
    linear-gradient(135deg, #10131a, #171b24 58%, #0d1016);
  --instrument-shadow: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.35));
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #151923;
  --muted: #4f5b68;
  --line: #d8e1ea;
  --accent: #007f73;
  --coral: #d86f45;
  --shadow: 0 22px 70px rgba(17, 24, 39, 0.14);
  --header-chip-bg: rgba(255, 255, 255, 0.78);
  --brand-mark-bg: #151923;
  --control-bg: rgba(255, 255, 255, 0.78);
  --dot-bg: rgba(21, 25, 35, 0.24);
  --slide-bg:
    radial-gradient(circle at 78% 45%, rgba(0, 127, 115, 0.14), transparent 34%),
    linear-gradient(135deg, #f6f7f9, #eef3f6 58%, #e9edf2);
  --instrument-shadow: drop-shadow(0 24px 50px rgba(17, 24, 39, 0.16));
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.gallery-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem max(1rem, calc((100vw - 1160px) / 2));
}

.brand,
.gallery-header nav {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand,
.gallery-header a {
  text-decoration: none;
}

.brand span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--brand-mark-bg);
  color: #ffffff;
  font-weight: 900;
}

.gallery-header nav a,
.theme-toggle {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--header-chip-bg);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.55rem 0.75rem;
  backdrop-filter: blur(14px);
}

.theme-toggle {
  min-height: 38px;
  cursor: pointer;
}

.slideshow {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100svh;
}

.slides {
  display: flex;
  height: 100%;
  transition: transform 650ms ease;
}

.slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--slide-bg);
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center right;
  padding:
    clamp(5rem, 9vh, 7rem)
    clamp(1rem, 5vw, 4rem)
    clamp(5.5rem, 11vh, 8rem)
    min(42vw, 36rem);
  filter: var(--instrument-shadow);
}

.slide-content {
  position: absolute;
  left: max(1rem, calc((100vw - 1160px) / 2));
  bottom: clamp(6.2rem, 13vh, 9.5rem);
  z-index: 2;
  max-width: min(650px, 43vw);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.8rem;
  font-size: clamp(2.75rem, 5vw, 4rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 0.7rem;
  color: #111827;
}

.slide-content p {
  max-width: 56ch;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.read-more,
.close-card,
.gallery-controls button,
.dots button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.read-more {
  min-height: 44px;
  background: var(--accent);
  border-color: var(--accent);
  color: #08201d;
  padding: 0.72rem 1rem;
}

.read-more:hover,
.close-card:hover,
.gallery-controls button:hover,
.dots button:hover {
  transform: translateY(-2px);
}

.detail-card {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(8, 10, 14, 0.72);
}

.detail-card.is-open {
  display: flex;
}

.detail-content {
  width: min(560px, 100%);
  border-radius: var(--radius);
  background: var(--surface);
  color: #111827;
  box-shadow: var(--shadow);
  padding: 1.4rem;
}

.detail-content p {
  color: #5b6572;
  line-height: 1.7;
}

.close-card {
  min-height: 42px;
  background: #111827;
  border-color: #111827;
  color: #ffffff;
  padding: 0.62rem 0.9rem;
}

.gallery-controls {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  transform: translateX(-50%);
}

.gallery-controls button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--control-bg);
  color: var(--ink);
  backdrop-filter: blur(14px);
}

.dots {
  display: flex;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--control-bg);
  padding: 0.45rem;
  backdrop-filter: blur(14px);
}

.dots button {
  width: 12px;
  height: 12px;
  min-height: 12px;
  padding: 0;
  border-color: transparent;
  background: var(--dot-bg);
}

.dots button.is-active {
  background: var(--coral);
}

@media (max-width: 720px) {
  body {
    overflow: auto;
  }

  .gallery-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .slideshow {
    min-height: 100svh;
  }

  .slide img {
    object-position: center top;
    padding: 6.8rem 1rem 19rem;
  }

  .slide-content {
    left: 1rem;
    right: 1rem;
    bottom: 5.8rem;
    max-width: none;
  }

  h1 {
    font-size: 2.75rem;
  }

  .slide-content p {
    font-size: 1rem;
  }

  .gallery-controls {
    width: calc(100% - 2rem);
    justify-content: space-between;
  }
}

@media (min-width: 721px) and (max-width: 1080px) {
  .slide img {
    object-position: center top;
    padding: 6rem 1.5rem 15.5rem;
  }

  .slide-content {
    left: 1.5rem;
    right: 1.5rem;
    bottom: 6.4rem;
    max-width: 680px;
  }

}

@media (max-height: 760px) and (min-width: 1081px) {
  .gallery-header {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }

  .slide img {
    padding-top: 4.4rem;
    padding-bottom: 4.7rem;
    padding-left: min(40vw, 34rem);
  }

  .slide-content {
    bottom: 5.2rem;
  }

  .slide-content p {
    font-size: 1rem;
    line-height: 1.55;
  }
}
