:root {
  --bg: #fffce8;
  --bg-elevated: #ffe566;
  --mountain-far: #f6efca;
  --mountain-mid: #efe4b4;
  --mountain-near: #e8d99e;
  --bg-hover: #ffd83a;
  --text: #2e2800;
  --text-muted: #7a6a20;
  --accent: #f5b800;
  --accent-soft: rgba(255, 200, 0, 0.42);
  --accent-border: rgba(230, 170, 0, 0.55);
  --border: rgba(220, 180, 0, 0.42);
  --shadow-soft: rgba(200, 150, 0, 0.14);
  --shadow-hover: rgba(180, 130, 0, 0.22);
  --doodle: #c49a00;
  --doodle-soft: #dbb420;
  --frame-inset: clamp(14px, 2.5vw, 22px);
  --frame-inner-pad: clamp(14px, 2.8vw, 22px);
  --content-inset: calc(var(--frame-inset) + var(--frame-inner-pad));
  --inner-width: calc(100vw - var(--content-inset) * 2);
  --viewport-height: var(--app-height, 100vh);
  --mountain-height: clamp(180px, 28vh, 300px);
  --scroll-viewport-height: calc(
    var(--viewport-height) -
    var(--frame-inset) -
    var(--nav-offset) -
    var(--nav-bar-height) -
    var(--frame-inset)
  );
  --nav-offset: clamp(2.25rem, 5.5vw, 3.5rem);
  --nav-bar-height: 3.35rem;
  --doodle-scale: 1.28;
  --frame-line: rgba(200, 160, 0, 0.48);
  --frame-line-soft: rgba(230, 200, 80, 0.28);
  --frame-gem: rgba(220, 175, 0, 0.5);
  --radius: 22px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.15, 0.64, 1);
  --ease-smooth: cubic-bezier(0.33, 1, 0.68, 1);
  --t-hover: 0.42s var(--ease-out-expo);
  --t-micro: 0.28s var(--ease-smooth);
}

@supports (height: 100svh) {
  :root {
    --viewport-height: var(--app-height, 100svh);
    --mountain-height: clamp(180px, 28svh, 300px);
  }
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(229, 193, 88, 0.35) transparent;
}

html:has(body.page-home),
html:has(body.page-gallery),
html:has(body.page-contact) {
  overflow: hidden;
  height: 100%;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(229, 193, 88, 0.3);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(229, 193, 88, 0.45);
  border: 3px solid transparent;
  background-clip: padding-box;
}

body.page-home,
body.page-gallery,
body.page-contact {
  overflow: hidden;
  height: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0;
  width: 100%;
  overscroll-behavior: none;
  touch-action: manipulation;
}

body:not(.page-home):not(.page-gallery):not(.page-contact) {
  padding:
    calc(var(--frame-inset) + var(--nav-offset) + var(--nav-bar-height))
    var(--content-inset)
    var(--content-inset);
}

.page-scroll {
  position: fixed;
  top: calc(var(--frame-inset) + var(--nav-offset) + var(--nav-bar-height));
  left: var(--frame-inset);
  right: var(--frame-inset);
  bottom: var(--frame-inset);
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-radius: 0 0 18px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(229, 193, 88, 0.35) transparent;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
}

.page-scroll > main {
  padding-left: var(--frame-inner-pad);
  padding-right: var(--frame-inner-pad);
}

.page-scroll::-webkit-scrollbar {
  width: 10px;
}

.page-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.page-scroll::-webkit-scrollbar-thumb {
  background: rgba(229, 193, 88, 0.3);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

.page-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(229, 193, 88, 0.45);
}

.page-scroll--gallery {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.site-nav {
  position: fixed;
  top: calc(var(--frame-inset) + var(--nav-offset));
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: min(560px, calc(100% - var(--content-inset) * 2 - 1rem));
  padding: 0.55rem;
  background: rgba(255, 252, 232, 0.94);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 4px 20px var(--shadow-soft);
  backdrop-filter: blur(8px);
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(18px, 2.9vw, 21px);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

.site-nav-link {
  flex: 1;
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  border-radius: 999px;
  transition:
    color var(--t-micro),
    background var(--t-micro);
}

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

.site-nav-link.is-active {
  color: var(--text);
  background: var(--bg-elevated);
  box-shadow: inset 0 0 0 1px var(--border);
}

.site-nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@keyframes backdrop-in {
  from {
    opacity: 0;
    transform: scale(1.12);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(52px);
    filter: brightness(1.12);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: brightness(1);
  }
}

@keyframes name-word-in {
  0% {
    opacity: 0;
    transform: translateY(0.72em) scale(0.92);
    letter-spacing: 0.22em;
    filter: blur(10px);
  }
  55% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    letter-spacing: -0.02em;
    filter: blur(0);
  }
}

@keyframes name-line {
  0% {
    transform: scaleX(0);
    opacity: 0;
  }
  65% {
    opacity: 0.55;
  }
  100% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes tagline-in {
  from {
    opacity: 0;
    transform: translateY(26px);
    letter-spacing: 0.42em;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: 0.06em;
  }
}

header .name-headline {
  will-change: transform, opacity;
}

header .name-words .name-word {
  display: inline-block;
  opacity: 0;
  animation: name-word-in 0.95s var(--ease-spring) forwards;
  will-change: transform, opacity, filter;
}

header .name-word:nth-child(1) {
  animation-delay: 0.2s;
}

header .name-word:nth-child(2) {
  animation-delay: 0.38s;
}

header .name-word:nth-child(3) {
  animation-delay: 0.56s;
}

header .name-headline::after {
  content: "";
  display: block;
  width: min(320px, 82vw);
  height: 2px;
  margin: clamp(1.1rem, 3vw, 1.5rem) auto 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(230, 180, 0, 0.75) 42%,
    rgba(255, 230, 80, 0.85) 60%,
    transparent
  );
  transform-origin: center;
  opacity: 0;
  animation: name-line 0.85s var(--ease-out-expo) 0.78s forwards;
}

section h2 {
  opacity: 0;
  animation: rise-in 0.8s var(--ease-out-expo) forwards;
}

section:nth-of-type(1) h2 {
  animation-delay: 2.05s;
}

section:nth-of-type(1) ul li:nth-child(1),
section:nth-of-type(1) ul li:nth-child(2),
section:nth-of-type(2) h2,
section:nth-of-type(2) ul li:nth-child(1),
section:nth-of-type(2) ul li:nth-child(2) {
  opacity: 0;
  animation: rise-in 0.75s var(--ease-out-expo) forwards;
}

section:nth-of-type(1) ul li:nth-child(1) {
  animation-delay: 2.3s;
}

section:nth-of-type(1) ul li:nth-child(2) {
  animation-delay: 2.55s;
}

section:nth-of-type(2) h2 {
  animation-delay: 2.8s;
}

section:nth-of-type(2) ul li:nth-child(1) {
  animation-delay: 3.05s;
}

section:nth-of-type(2) ul li:nth-child(2) {
  animation-delay: 3.3s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body::before {
    animation: none;
    opacity: 1;
    transform: none;
  }

  header .name-words .name-word,
  header .name-headline::after,
  header .tagline,
  .scroll-hint,
  .hero-welcome,
  section h2,
  section ul li,
  .gallery-item {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    letter-spacing: inherit !important;
    filter: none !important;
    width: auto;
  }

  .carousel-track {
    transition: none;
  }

  .doodle {
    animation: none !important;
    opacity: 0.32 !important;
    transform: none !important;
  }

  header .name-headline::after {
    transform: scaleX(1);
  }

  header .tagline {
    letter-spacing: normal !important;
  }

  .card-link,
  .card-link:hover,
  .link-label,
  .link-meta,
  .arrow {
    transition-duration: 0.12s !important;
  }
}

main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.hero {
  min-height: var(--scroll-viewport-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 2rem 1.5rem clamp(2.5rem, 8vh, 4.5rem);
  margin-bottom: 0;
}

.hero-intro {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 28rem;
}

.links-panel {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  min-height: var(--scroll-viewport-height);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 1.75rem;
  position: relative;
}

.links-panel::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: clamp(1.75rem, 5vw, 2.5rem);
  flex-shrink: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(200, 160, 0, 0.3) 30%,
    rgba(200, 160, 0, 0.3) 70%,
    transparent
  );
}

.scroll-shadow {
  position: fixed;
  left: var(--frame-inset);
  right: var(--frame-inset);
  bottom: var(--frame-inset);
  height: 120px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(
    to top,
    rgba(18, 18, 18, 0.55) 0%,
    rgba(30, 30, 30, 0.28) 45%,
    transparent 100%
  );
  transition: opacity 0.15s ease-out;
}

.hero-welcome {
  margin: 0;
  max-width: 22em;
  opacity: 0;
  animation: tagline-in 0.9s var(--ease-out-expo) 1.45s forwards;
  font-family: "DM Serif Display", "Georgia", serif;
  font-size: clamp(1.15rem, 3.4vw, 1.45rem);
  font-weight: 400;
  font-style: normal;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  text-align: center;
}

.scroll-hint {
  opacity: 0;
  animation: tagline-in 0.9s var(--ease-out-expo) 1.65s forwards;
  margin-top: clamp(1.25rem, 3.5vw, 1.75rem);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-hint::after {
  content: "↓";
  display: block;
  margin-top: 0.55rem;
  font-size: 1.1rem;
  letter-spacing: 0;
  animation: scroll-bounce 1.7s ease-in-out 1.95s infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  header .name-words .name-word,
  header .name-headline,
  header .tagline {
    will-change: auto;
  }
}

.name-headline.name {
  font-family: "DM Serif Display", "Georgia", serif;
  font-size: clamp(1.4rem, 5.8vw, 3.4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
  line-height: 1.08;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.name-words {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.22em;
  white-space: nowrap;
}

header .tagline {
  opacity: 0;
  animation: tagline-in 0.9s var(--ease-out-expo) 1.1s forwards;
  will-change: transform, opacity, letter-spacing;
  font-size: clamp(1.15rem, 3.4vw, 1.4rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: clamp(1.25rem, 3.5vw, 1.75rem);
}

section {
  margin-bottom: clamp(2.35rem, 6vw, 3rem);
}

section:last-of-type {
  margin-bottom: 0;
}

h2 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.15rem;
}

ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

a.card-link {
  text-decoration: none;
}

button.card-link {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  margin: 0;
  cursor: pointer;
  font: inherit;
  text-align: start;
}

.card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.35rem 1.5rem;
  color: inherit;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 0 transparent,
    0 2px 8px var(--shadow-soft);
  transition:
    border-color var(--t-hover),
    background var(--t-hover),
    box-shadow var(--t-hover),
    transform var(--t-hover);
}

.card-link:hover {
  border-color: var(--accent-border);
  background: var(--bg-hover);
  box-shadow:
    0 12px 32px -14px var(--shadow-hover),
    0 0 0 1px var(--accent-soft);
}

@media (hover: hover) and (pointer: fine) {
  .card-link:hover {
    transform: translateY(-3px);
  }

  .card-link:active {
    transform: translateY(-1px) scale(0.995);
  }
}

.card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.link-label {
  font-weight: 500;
  transition: color var(--t-micro);
}

.link-meta {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: color var(--t-micro), transform var(--t-hover);
}

@media (hover: hover) and (pointer: fine) {
  .card-link:hover .link-meta {
    color: #5a4800;
    transform: translateX(2px);
  }

  .card-link:hover .link-label {
    color: #1f1a00;
  }
}

.link-meta .arrow {
  display: inline-block;
  transition: transform var(--t-hover);
}

@media (hover: hover) and (pointer: fine) {
  .card-link:hover .link-meta .arrow {
    transform: translateX(3px);
  }
}

.backdrop-doodles {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
}

.mountain-scape {
  position: fixed;
  left: var(--frame-inset);
  right: var(--frame-inset);
  bottom: var(--frame-inset);
  height: var(--mountain-height);
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 0 0 18px 18px;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  contain: layout style paint;
}

.mountain-scape-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mountain-layer--far {
  fill: var(--mountain-far);
}

.mountain-layer--mid {
  fill: var(--mountain-mid);
}

.mountain-layer--near {
  fill: var(--mountain-near);
}

.mountain-trees {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.mountain-tree {
  position: absolute;
  width: calc(var(--size) * var(--doodle-scale) * 1.05);
  height: calc(var(--size) * var(--doodle-scale) * 1.05);
  transform: translateX(-50%) rotate(var(--rot, 0deg));
  opacity: 0.36;
}

.mountain-tree svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: url(#sketch-wobble);
}

.page-home .backdrop-doodles {
  z-index: 0;
  bottom: calc(var(--frame-inset) + var(--mountain-height));
}

.page-frame {
  position: fixed;
  inset: var(--frame-inset);
  z-index: 2;
  pointer-events: none;
  border-radius: 20px;
  border: 1px solid var(--frame-line);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 240, 0.85),
    inset 0 0 0 4px rgba(255, 230, 100, 0.1);
}

.page-frame::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 14px;
  border: 1px dashed var(--frame-line-soft);
}

.frame-corner {
  position: absolute;
  width: 26px;
  height: 26px;
}

.frame-corner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-color: rgba(160, 120, 0, 0.5);
  border-style: solid;
}

.frame-corner::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--frame-gem);
  transform: rotate(45deg);
  border-radius: 1px;
}

.frame-tl { top: 8px; left: 8px; }
.frame-tl::before { border-width: 1.5px 0 0 1.5px; border-radius: 8px 0 0 0; }
.frame-tl::after { top: 4px; left: 4px; }

.frame-tr { top: 8px; right: 8px; }
.frame-tr::before { border-width: 1.5px 1.5px 0 0; border-radius: 0 8px 0 0; }
.frame-tr::after { top: 4px; right: 4px; }

.frame-bl { bottom: 8px; left: 8px; }
.frame-bl::before { border-width: 0 0 1.5px 1.5px; border-radius: 0 0 0 8px; }
.frame-bl::after { bottom: 4px; left: 4px; }

.frame-br { bottom: 8px; right: 8px; }
.frame-br::before { border-width: 0 1.5px 1.5px 0; border-radius: 0 0 8px 0; }
.frame-br::after { bottom: 4px; right: 4px; }

.frame-edge {
  position: absolute;
  opacity: 0.85;
}

.frame-top,
.frame-bottom {
  left: 30px;
  right: 30px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent) 8%,
    var(--accent) 92%,
    transparent
  );
}

.frame-top { top: 0; }
.frame-bottom { bottom: 0; }

.frame-left,
.frame-right {
  top: 30px;
  bottom: 30px;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    var(--accent) 8%,
    var(--accent) 92%,
    transparent
  );
}

.frame-left { left: 0; }
.frame-right { right: 0; }

.frame-gem {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid var(--frame-gem);
  background: rgba(255, 252, 210, 0.75);
  transform: rotate(45deg);
  border-radius: 2px;
}

.frame-gem-top { top: -3.5px; left: 50%; margin-left: -3.5px; }
.frame-gem-bottom { bottom: -3.5px; left: 50%; margin-left: -3.5px; }
.frame-gem-left { left: -3.5px; top: 50%; margin-top: -3.5px; }
.frame-gem-right { right: -3.5px; top: 50%; margin-top: -3.5px; }

.backdrop-doodles::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% -20%, rgba(255, 245, 160, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 238, 140, 0.14), transparent 45%),
    radial-gradient(ellipse 50% 35% at 0% 80%, rgba(255, 250, 190, 0.18), transparent 50%);
}

.doodle-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.doodle {
  position: absolute;
  width: calc(var(--size) * var(--doodle-scale));
  height: calc(var(--size) * var(--doodle-scale));
  color: var(--doodle);
  opacity: 0;
}

.doodle-2,
.doodle-5,
.doodle-11,
.doodle-14 {
  color: #8a9098;
}

.doodle-bolt {
  color: #bcc2cc;
}

.doodle-nut {
  color: #8a9098;
  width: calc(var(--size) * var(--doodle-scale) * 1.4);
  height: calc(var(--size) * var(--doodle-scale) * 1.4);
}

.doodle svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: url(#sketch-wobble);
}

.doodle-drift-a {
  animation:
    doodle-fade-in 1.15s var(--ease-out-expo) 0.25s forwards,
    doodle-drift-a 29s ease-in-out -4s infinite;
}

.doodle-drift-b {
  animation:
    doodle-fade-in 1.15s var(--ease-out-expo) 0.25s forwards,
    doodle-drift-b 24s ease-in-out -11s infinite;
}

.doodle-drift-c {
  animation:
    doodle-fade-in 1.15s var(--ease-out-expo) 0.25s forwards,
    doodle-drift-c 32s ease-in-out -7s infinite;
}

.doodle-drift-d {
  animation:
    doodle-fade-in 1.15s var(--ease-out-expo) 0.25s forwards,
    doodle-drift-d 25s ease-in-out -15s infinite;
}

.doodle-drift-e {
  animation:
    doodle-fade-in 1.15s var(--ease-out-expo) 0.25s forwards,
    doodle-drift-e 31s ease-in-out -2s infinite;
}

.doodle-drift-f {
  animation:
    doodle-fade-in 1.15s var(--ease-out-expo) 0.25s forwards,
    doodle-drift-f 22s ease-in-out -19s infinite;
}

.doodle-3,
.doodle-7,
.doodle-10,
.doodle-tree {
  width: calc(var(--size) * var(--doodle-scale) * 1.05);
  height: calc(var(--size) * var(--doodle-scale) * 1.05);
}

@keyframes doodle-fade-in {
  from { opacity: 0; }
  to { opacity: 0.32; }
}

@keyframes doodle-drift-a {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(22px, -28px) rotate(9deg); }
  50% { transform: translate(-14px, -48px) rotate(-6deg); }
  75% { transform: translate(18px, -20px) rotate(11deg); }
}

@keyframes doodle-drift-b {
  0%, 100% { transform: translate(0, 0) rotate(12deg); }
  33% { transform: translate(-26px, 18px) rotate(-4deg); }
  66% { transform: translate(16px, 32px) rotate(18deg); }
}

@keyframes doodle-drift-c {
  0%, 100% { transform: translate(0, 0) rotate(-8deg); }
  20% { transform: translate(30px, 12px) rotate(4deg); }
  55% { transform: translate(-20px, -24px) rotate(-14deg); }
  80% { transform: translate(10px, -36px) rotate(2deg); }
}

@keyframes doodle-drift-d {
  0%, 100% { transform: translate(0, 0) rotate(5deg); }
  40% { transform: translate(-18px, -30px) rotate(15deg); }
  70% { transform: translate(24px, -14px) rotate(-8deg); }
}

@keyframes doodle-drift-e {
  0%, 100% { transform: translate(0, 0) rotate(-3deg); }
  30% { transform: translate(14px, 26px) rotate(10deg); }
  60% { transform: translate(-28px, 10px) rotate(-12deg); }
}

@keyframes doodle-drift-f {
  0%, 100% { transform: translate(0, 0) rotate(7deg); }
  50% { transform: translate(-22px, -34px) rotate(-10deg); }
}

@keyframes doodle-drift-a-mobile {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(12px, -16px) rotate(6deg); }
  50% { transform: translate(-8px, -26px) rotate(-4deg); }
  75% { transform: translate(10px, -12px) rotate(7deg); }
}

@keyframes doodle-drift-b-mobile {
  0%, 100% { transform: translate(0, 0) rotate(8deg); }
  33% { transform: translate(-14px, 10px) rotate(-3deg); }
  66% { transform: translate(9px, 18px) rotate(12deg); }
}

@keyframes doodle-drift-c-mobile {
  0%, 100% { transform: translate(0, 0) rotate(-6deg); }
  20% { transform: translate(16px, 7px) rotate(3deg); }
  55% { transform: translate(-11px, -14px) rotate(-9deg); }
  80% { transform: translate(6px, -20px) rotate(2deg); }
}

@keyframes doodle-drift-d-mobile {
  0%, 100% { transform: translate(0, 0) rotate(4deg); }
  40% { transform: translate(-10px, -18px) rotate(10deg); }
  70% { transform: translate(13px, -8px) rotate(-5deg); }
}

@keyframes doodle-drift-e-mobile {
  0%, 100% { transform: translate(0, 0) rotate(-10deg); }
  35% { transform: translate(14px, -12px) rotate(6deg); }
  60% { transform: translate(-28px, 10px) rotate(-12deg); }
}

@keyframes doodle-drift-f-mobile {
  0%, 100% { transform: translate(0, 0) rotate(5deg); }
  50% { transform: translate(-12px, -18px) rotate(-7deg); }
}

@media (max-width: 640px) {
  :root {
    --frame-inset: 10px;
    --frame-inner-pad: 10px;
    --nav-offset: 1.15rem;
    --nav-bar-height: 2.85rem;
    --mountain-height: 155px;
    --doodle-scale: 0.72;
    --viewport-height: 100svh;
    --scroll-viewport-height: calc(
      100svh -
      var(--frame-inset) -
      var(--nav-offset) -
      var(--nav-bar-height) -
      var(--frame-inset) -
      env(safe-area-inset-top, 0px) -
      env(safe-area-inset-bottom, 0px)
    );
  }

  html {
    scrollbar-gutter: auto;
  }

  .page-frame {
    top: calc(var(--frame-inset) + env(safe-area-inset-top, 0px));
    left: calc(var(--frame-inset) + env(safe-area-inset-left, 0px));
    right: calc(var(--frame-inset) + env(safe-area-inset-right, 0px));
    bottom: calc(var(--frame-inset) + env(safe-area-inset-bottom, 0px));
  }

  .site-nav {
    top: calc(var(--frame-inset) + var(--nav-offset) + env(safe-area-inset-top, 0px));
    width: min(560px, calc(100% - (var(--frame-inset) + env(safe-area-inset-left, 0px)) * 2 - 0.5rem));
    padding: 0.4rem;
    gap: 0.25rem;
  }

  .site-nav-link {
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    padding: 0.58rem 0.4rem;
  }

  .page-scroll {
    top: calc(var(--frame-inset) + var(--nav-offset) + var(--nav-bar-height) + env(safe-area-inset-top, 0px));
    left: calc(var(--frame-inset) + env(safe-area-inset-left, 0px));
    right: calc(var(--frame-inset) + env(safe-area-inset-right, 0px));
    bottom: calc(var(--frame-inset) + env(safe-area-inset-bottom, 0px));
    scroll-behavior: auto;
    transform: none;
    -webkit-transform: none;
  }

  .page-scroll > main {
    padding-left: 0;
    padding-right: 0;
  }

  .page-scroll--gallery > main,
  .page-scroll:has(.contact-page) > main {
    padding-left: var(--frame-inner-pad);
    padding-right: var(--frame-inner-pad);
  }

  .hero {
    min-height: var(--scroll-viewport-height);
    padding: 1.25rem 1rem 1.75rem;
  }

  .name-words {
    flex-wrap: wrap;
    white-space: normal;
    justify-content: center;
  }

  .name-headline.name {
    font-size: clamp(1.6rem, 8.2vw, 2.35rem);
    line-height: 1.12;
  }

  .tagline {
    font-size: 0.82rem;
    margin-top: 0.65rem;
  }

  .hero-welcome {
    max-width: 18em;
    font-size: clamp(1rem, 3.6vw, 1.2rem);
    line-height: 1.42;
  }

  .scroll-hint {
    font-size: 0.72rem;
  }

  .links-panel {
    min-height: var(--scroll-viewport-height);
    padding: 1.5rem 1rem 2.5rem;
  }

  .card-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1rem 1.1rem;
  }

  .link-meta {
    flex-shrink: 1;
    min-width: 0;
    font-size: 0.84rem;
    line-height: 1.4;
    word-break: break-word;
    text-align: left;
    width: 100%;
  }

  .link-meta .arrow {
    display: none;
  }

  .mountain-scape {
    left: calc(var(--frame-inset) + env(safe-area-inset-left, 0px));
    right: calc(var(--frame-inset) + env(safe-area-inset-right, 0px));
    bottom: calc(var(--frame-inset) + env(safe-area-inset-bottom, 0px));
  }

  .page-home .backdrop-doodles {
    bottom: calc(var(--frame-inset) + env(safe-area-inset-bottom, 0px) + var(--mountain-height));
  }

  .scroll-shadow {
    left: calc(var(--frame-inset) + env(safe-area-inset-left, 0px));
    right: calc(var(--frame-inset) + env(safe-area-inset-right, 0px));
    bottom: calc(var(--frame-inset) + env(safe-area-inset-bottom, 0px));
    height: 80px;
  }

  .contact-page {
    padding: 2.75rem 0.5rem 2rem;
    min-height: var(--scroll-viewport-height);
  }

  .back-link {
    left: 0.5rem;
    top: 0.75rem;
    font-size: 0.92rem;
  }

  .contact-header h1 {
    font-size: clamp(2rem, 9vw, 2.75rem);
  }

  .gallery-page .back-link {
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
  }

  .gallery-page-header h1 {
    font-size: clamp(1.65rem, 7vw, 2rem);
  }

  .gallery-grid--page {
    gap: 0.45rem;
  }

  .doodle-9,
  .doodle-11 {
    display: none;
  }

  .doodle-nut {
    width: calc(var(--size) * var(--doodle-scale) * 1.15);
    height: calc(var(--size) * var(--doodle-scale) * 1.15);
  }

  .doodle-drift-a {
    animation:
      doodle-fade-in 1.15s var(--ease-out-expo) 0.25s forwards,
      doodle-drift-a-mobile 26s ease-in-out -4s infinite;
  }

  .doodle-drift-b {
    animation:
      doodle-fade-in 1.15s var(--ease-out-expo) 0.25s forwards,
      doodle-drift-b-mobile 22s ease-in-out -11s infinite;
  }

  .doodle-drift-c {
    animation:
      doodle-fade-in 1.15s var(--ease-out-expo) 0.25s forwards,
      doodle-drift-c-mobile 28s ease-in-out -7s infinite;
  }

  .doodle-drift-d {
    animation:
      doodle-fade-in 1.15s var(--ease-out-expo) 0.25s forwards,
      doodle-drift-d-mobile 21s ease-in-out -15s infinite;
  }

  .doodle-drift-e {
    animation:
      doodle-fade-in 1.15s var(--ease-out-expo) 0.25s forwards,
      doodle-drift-e-mobile 24s ease-in-out -2s infinite;
  }

  .doodle-drift-f {
    animation:
      doodle-fade-in 1.15s var(--ease-out-expo) 0.25s forwards,
      doodle-drift-f-mobile 20s ease-in-out -19s infinite;
  }
}

@media (hover: none) and (pointer: coarse) {
  html {
    scroll-behavior: auto;
  }

  .page-scroll {
    scroll-behavior: auto;
  }
}

.contact-cta {
  margin-top: clamp(2rem, 5vw, 2.75rem);
  text-align: center;
}

.contact-cta--page {
  margin-top: 0;
}

.contact-copy-hint {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.contact-copy-link {
  display: inline;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.contact-copy-link:hover {
  color: #5a4800;
}

.contact-copy-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 210px;
  padding: 1.15rem 2.25rem;
  font-family: inherit;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px var(--shadow-soft);
  transition:
    border-color var(--t-hover),
    background var(--t-hover),
    box-shadow var(--t-hover),
    transform var(--t-hover);
}

@media (hover: hover) and (pointer: fine) {
  .contact-btn:hover {
    border-color: var(--accent-border);
    background: var(--bg-hover);
    box-shadow: 0 12px 32px -14px var(--shadow-hover);
    transform: translateY(-3px);
  }

  .contact-btn:active {
    transform: translateY(-1px) scale(0.995);
  }
}

.contact-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.contact-page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  min-height: var(--scroll-viewport-height);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3.5rem, 11vw, 5.5rem) 1.75rem;
}

.back-link {
  position: absolute;
  top: clamp(2.5rem, 7vw, 3.75rem);
  left: 1.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-micro);
}

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

.back-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.contact-header {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 2.5rem);
}

.contact-header h1 {
  font-family: "DM Serif Display", "Georgia", serif;
  font-size: clamp(2.35rem, 6.5vw, 3.15rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}

.contact-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem 1.1rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px var(--shadow-soft);
  transition:
    border-color var(--t-micro),
    box-shadow var(--t-micro);
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(145, 133, 102, 0.65);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-border);
  box-shadow:
    0 2px 8px var(--shadow-soft),
    0 0 0 3px var(--accent-soft);
}

.contact-submit {
  margin-top: 0.5rem;
  width: 100%;
  padding: 1.1rem 1.2rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  cursor: pointer;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px var(--shadow-soft);
  transition:
    border-color var(--t-hover),
    background var(--t-hover),
    box-shadow var(--t-hover),
    transform var(--t-hover);
}

@media (hover: hover) and (pointer: fine) {
  .contact-submit:hover {
    border-color: var(--accent-border);
    background: var(--bg-hover);
    box-shadow: 0 12px 32px -14px var(--shadow-hover);
    transform: translateY(-2px);
  }

  .contact-submit:active {
    transform: translateY(0) scale(0.995);
  }
}

.contact-submit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.gallery-page--carousel {
  max-width: min(1100px, 100%);
}

.gallery-carousel {
  position: relative;
  width: 100%;
}

.gallery-carousel:focus {
  outline: none;
}

.gallery-carousel:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: var(--radius);
}

.carousel-viewport {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 252, 232, 0.55);
  box-shadow: 0 4px 24px var(--shadow-soft);
  min-height: clamp(320px, 72vh, 780px);
}

.carousel-track {
  display: flex;
  align-items: center;
  min-height: clamp(320px, 72vh, 780px);
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform 0.5s var(--ease-out-expo);
}

.carousel-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 100%;
  min-width: 0;
  min-height: clamp(320px, 72vh, 780px);
  padding: 0.75rem;
}

.carousel-slide-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: clamp(300px, 70vh, 760px);
  aspect-ratio: auto;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  overflow: visible;
  background: transparent;
}

.gallery-carousel .gallery-item.carousel-slide-btn img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(70vh, 760px);
  object-fit: contain;
  object-position: center;
  background: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .gallery-carousel .gallery-item.carousel-slide-btn:hover:not(.gallery-item--empty) {
    transform: none;
    box-shadow: none;
    border-color: transparent;
  }

  .gallery-carousel .gallery-item.carousel-slide-btn:hover:not(.gallery-item--empty) img {
    transform: none;
  }
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.carousel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 252, 232, 0.92);
  color: var(--text);
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px var(--shadow-soft);
  transition:
    background var(--t-micro),
    border-color var(--t-micro),
    transform var(--t-micro),
    opacity var(--t-micro);
}

.carousel-btn:hover:not(:disabled) {
  background: var(--bg-elevated);
  border-color: var(--accent-border);
  transform: translateY(-1px);
}

.carousel-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.carousel-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.carousel-counter {
  min-width: 4.5rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.carousel-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  padding: 0 0.5rem;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(200, 160, 0, 0.28);
  cursor: pointer;
  transition:
    background var(--t-micro),
    transform var(--t-micro);
}

.carousel-dot.is-active {
  background: var(--accent);
  transform: scale(1.15);
}

.carousel-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.carousel-caption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  min-height: 1.25rem;
}

.gallery-page--grid {
  width: 100%;
  max-width: var(--inner-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}

.gallery-scroll {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.15rem 0 0.35rem;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 14px,
    #000 calc(100% - 14px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 14px,
    #000 calc(100% - 14px),
    transparent 100%
  );
}

.gallery-page .back-link {
  position: relative;
  top: auto;
  left: auto;
  margin-bottom: 0.65rem;
  flex-shrink: 0;
}

.gallery-grid--page {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: start;
  width: 100%;
}

.gallery-grid--page .gallery-item {
  width: 100%;
  max-width: calc(var(--inner-width) / 2.15);
  justify-self: center;
  min-width: 0;
  display: block;
  margin: 0;
  padding: 0.28rem;
  aspect-ratio: auto;
  height: auto;
  transform: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: 0 2px 8px var(--shadow-soft);
  overflow: hidden;
}

.gallery-grid--page .gallery-item img {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: calc(var(--inner-width) / 2.85);
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: calc(var(--radius) - 6px);
  background: rgba(255, 252, 232, 0.45);
}

@media (hover: hover) and (pointer: fine) {
  .gallery-grid--page .gallery-item:hover:not(.gallery-item--empty) {
    border-color: var(--accent-border);
    box-shadow: 0 10px 28px -14px var(--shadow-hover);
    transform: translateY(-2px);
  }

  .gallery-grid--page .gallery-item:hover:not(.gallery-item--empty) img {
    transform: none;
  }
}

@media (max-width: 820px) {
  .gallery-grid--page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .gallery-grid--page .gallery-item img {
    max-height: calc(var(--inner-width) / 2.55);
  }
}

.gallery-section {
  margin-bottom: clamp(2.35rem, 6vw, 3rem);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.gallery-grid--three {
  grid-template-columns: repeat(3, 1fr);
}

.gallery-grid--full {
  gap: 0.75rem;
}

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2rem 1rem;
}

.gallery-empty code {
  font-size: 0.85em;
  background: var(--bg-elevated);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: 0 2px 8px var(--shadow-soft);
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition:
    border-color var(--t-hover),
    box-shadow var(--t-hover),
    transform var(--t-hover);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t-hover);
}

.gallery-item--empty::after {
  content: "Add photo";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-elevated);
}

.gallery-item--empty img {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .gallery-item:hover:not(.gallery-item--empty) {
    border-color: var(--accent-border);
    box-shadow: 0 12px 32px -14px var(--shadow-hover);
    transform: translateY(-3px);
  }

  .gallery-item:hover:not(.gallery-item--empty) img {
    transform: scale(1.05);
  }
}

.gallery-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.gallery-more {
  margin-top: 1rem;
  text-align: center;
}

.gallery-more a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-micro);
}

.gallery-more a:hover {
  color: var(--text);
}

.gallery-more .arrow {
  display: inline-block;
  transition: transform var(--t-hover);
}

.gallery-more a:hover .arrow {
  transform: translateX(3px);
}

.gallery-page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0.5rem 0 0;
  overflow: hidden;
}

.gallery-page-header {
  text-align: center;
  margin-bottom: 0.85rem;
  flex-shrink: 0;
}

.gallery-page-header h1 {
  font-family: "DM Serif Display", "Georgia", serif;
  font-size: clamp(1.85rem, 4.5vw, 2.35rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.gallery-page-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

#gallery-count {
  opacity: 0.75;
  font-size: 0.9em;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(20, 18, 12, 0.88);
  backdrop-filter: blur(6px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  width: auto;
  height: auto;
  max-width: min(96vw, 1600px);
  max-height: 92vh;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.lightbox-caption {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: rgba(255, 248, 230, 0.75);
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: clamp(1rem, 4vw, 2rem);
  right: clamp(1rem, 4vw, 2rem);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 248, 230, 0.12);
  color: #fff8e8;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--t-micro);
}

.lightbox-close:hover {
  background: rgba(255, 248, 230, 0.22);
}

.lightbox-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

