/* Base and layout */
:root {
  color-scheme: dark;
  --bg: #0b0c0c;
  --text: #f1f1ef;
  --muted: #8f908e;
  --gap: clamp(12px, 1.8vw, 22px);
  --edge: clamp(18px, 5vw, 58px);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.site-shell { width: 100%; padding: 0 var(--edge) clamp(40px, 7vw, 90px); }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  min-height: clamp(82px, 8.4vw, 100px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(18px, 2.15vw, 27px);
  font-weight: 400;
  letter-spacing: .20em;
  line-height: 1;
  white-space: nowrap;
}

.brand-icon { width: 34px; height: 34px; flex: 0 0 auto; object-fit: cover; border-radius: 50%; }

/* Header navigation */
.nav { display: flex; align-items: center; gap: clamp(28px, 4vw, 50px); }
.nav-link {
  position: relative;
  padding: 8px 2px 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: clamp(10px, 1vw, 13px);
  font-weight: 700;
  letter-spacing: .20em;
  line-height: 1;
}
.nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: .20em;
  bottom: 0;
  height: 1px;
  background: currentColor;
}
.nav-placeholder { cursor: default; display: inline-block; }

/* Photo grid */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.photo {
  display: block;
  overflow: hidden;
  background: transparent;
  aspect-ratio: 3 / 2;
  text-decoration: none;
  border: 1px solid #292b2b;
  padding: 0;
  box-shadow: none;
  cursor: zoom-in;
}
.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  transition: transform 220ms ease, opacity 220ms ease;
}
.photo-squirrel img { object-position: 50% 42%; }

/* Fullscreen viewer */
.lightbox {
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(24px, 4vw, 48px);
  border: 0;
  background: rgba(5, 6, 6, .96);
  overflow: hidden;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(0, 0, 0, .86); }
.lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(90vw, calc(100vw - 48px));
  max-height: min(85vh, calc(100vh - 48px));
  object-fit: contain;
}
.lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 2;
  border: 0;
  padding: 6px 10px;
  background: transparent;
  color: #f1f1ef;
  font: 300 34px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
}
html.lightbox-open, body.lightbox-open {
  overflow: hidden;
  overscroll-behavior: none;
}
.lightbox-nav {
  position: fixed;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 64px;
  padding: 0;
  border: 0;
  background: rgba(0,0,0,.28);
  color: rgba(255,255,255,.88);
  font: 300 48px/1 Arial, sans-serif;
  cursor: pointer;
  transform: translateY(-50%);
}
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }

/* Quiet lightbox position indicator */
.lightbox-counter {
  position: fixed;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  color: #b8b9b7;
  font: 400 12px/1.4 Arial, Helvetica, sans-serif;
  letter-spacing: .12em;
  pointer-events: none;
}

/* Dropdown menu */
.nav-menu { position: relative; border: 0; border-radius: 0; background: transparent; }
.nav-menu summary { list-style: none; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-current {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  gap: 12px;
  justify-content: flex-start;
  cursor: pointer;
  user-select: none;
}
.nav-current .nav-link { pointer-events: none; }
.nav-current .nav-link.active {
  padding: 0;
  font-size: clamp(18px, 2.15vw, 27px);
  font-weight: 400;
  letter-spacing: .20em;
}
.nav-current .nav-link.active::after { display: none; }
.menu-icon {
  width: 20px;
  height: 15px;
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.menu-icon i { display: block; width: 100%; height: 1px; background: var(--text); }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: auto;
  right: 0;
  z-index: 10;
  width: 210px;
  min-width: 210px;
  padding: 4px 12px;
  gap: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid #343738;
  border-radius: 10px;
  background: #0d0f10;
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
}
.nav-menu:not([open]) .nav-dropdown { display: none; }
.nav-dropdown::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 8px;
  width: 12px;
  height: 12px;
  background: #0d0f10;
  border-left: 1px solid #343738;
  border-top: 1px solid #343738;
  transform: rotate(45deg);
}
.nav-dropdown .nav-link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 2px;
  border-radius: 0;
  background: transparent;
  color: #b8b9b7;
  font-size: clamp(13px, 1.15vw, 16px);
  font-weight: 400;
  letter-spacing: .18em;
  text-align: left;
  white-space: nowrap;
}
.nav-dropdown .nav-link + .nav-link { border-top: 1px solid #343738; }
.nav-arrow {
  margin-left: 18px;
  color: #d9d9d7;
  font-size: 28px;
  font-weight: 200;
  line-height: .7;
  letter-spacing: 0;
}

/* Responsive */
@media (max-width: 700px) {
  :root { --edge: 16px; --gap: 12px; }
  .site-header { min-height: 74px; align-items: center; }
  .brand { font-size: clamp(16px, 5vw, 20px); letter-spacing: .16em; gap: 8px; }
  .brand-icon { width: 26px; height: 26px; }
  .nav { gap: 14px; }
  .nav-link { font-size: 9px; letter-spacing: .16em; }
  .gallery { grid-template-columns: 1fr; }
  .lightbox { padding: 12px; }
  .lightbox-image { max-width: calc(100vw - 24px); max-height: calc(100vh - 56px); }
  .lightbox-close { top: 10px; right: 10px; }
  .nav-current { gap: 10px; }
  .nav-current .nav-link.active {
    font-size: clamp(16px, 5vw, 20px);
    letter-spacing: .16em;
  }
  .nav-dropdown { top: calc(100% + 12px); width: 210px; min-width: 210px; padding: 3px 12px; }
  .nav-dropdown .nav-link { padding: 16px 2px; font-size: 13px; letter-spacing: .16em; }
  .nav-arrow { font-size: 26px; }
}
@media (max-width: 430px) {
  .site-header { min-height: 68px; }
  .brand { font-size: 15px; letter-spacing: .13em; gap: 6px; }
  .brand-icon { width: 22px; height: 22px; }
  .nav-link { font-size: 8px; }
  .nav-current .nav-link.active { font-size: 15px; letter-spacing: .13em; }
  .nav-dropdown { width: 190px; min-width: 190px; }
}
@media (hover: hover) and (pointer: fine) {
  .photo:hover img { transform: scale(1.012); opacity: .96; }
  .lightbox-nav:hover { background: rgba(0,0,0,.55); color: #fff; }
  .nav-dropdown .nav-link:hover { color: var(--text); background: transparent; }
  .nav-dropdown .nav-link:hover .nav-arrow { transform: translateX(2px); }
}
/* On touchscreens, navigation shares the existing bottom counter row. */
@media (hover: none) and (pointer: coarse) {
  .lightbox-nav {
    display: grid;
    place-items: center;
    top: auto;
    bottom: max(8px, calc(env(safe-area-inset-bottom) - 10px));
    width: 52px;
    height: 42px;
    transform: none;
    font-size: 34px;
    background: transparent;
    color: #d9d9d7;
    touch-action: manipulation;
  }
  .lightbox-prev { left: calc(50% - 105px); }
  .lightbox-next { right: calc(50% - 105px); }
  .lightbox-counter {
    bottom: max(18px, env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  .photo img { transition: none; }
}

/* Image loading status is visible only while a full-resolution image is pending. */
.lightbox.is-loading .lightbox-image { opacity: 0; }
.lightbox.is-loading::after {
  content: "";
  position: fixed;
  top: 50%; left: 50%;
  width: 22px; height: 22px;
  margin: -11px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: #d9d9d7;
  border-radius: 50%;
  animation: lightbox-spin .75s linear infinite;
  pointer-events: none;
}
@keyframes lightbox-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lightbox.is-loading::after { animation: none; } }
