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

:root {
  --text: #ffffff;
  --muted: #b7c0d7;
  --hover-bg: #06397c;
  --active-bg: #002452;
  --sidebar-width: 14rem;
  --sidebar-pad: 0.5rem;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  color: var(--text);
  background: #000000;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

/* —— isak-style sidebar —— */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  padding: var(--sidebar-pad);
  overflow-y: auto;
  overflow-x: hidden;
  background: #000000;
  flex-shrink: 0;
}

.sidebar-name {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.sidebar-name a {
  text-decoration: none;
  color: var(--text);
}

.sidebar-name a:hover,
.sidebar-name a:focus-visible {
  color: #002452;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.sidebar-link {
  display: block;
  padding: 0;
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  text-decoration: none;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
  background: var(--hover-bg);
}

.sidebar-link.is-active {
  background: var(--active-bg);
}

.sidebar-link p {
  margin: 0;
}

/* —— Layout —— */
.layout {
  min-height: 100vh;
  min-height: 100dvh;
}

.main-content {
  min-width: 0;
  max-width: 100%;
  padding: 1.5rem;
  padding-left: calc(var(--sidebar-width) + 1.5rem);
  overflow-x: hidden;
}

.main-content--photos {
  max-width: none;
}

.main-content--home {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1.5rem;
  padding-left: calc(var(--sidebar-width) + 1.5rem);
  display: flex;
  align-items: flex-start;
  gap: 1rem; 
}


.home-hero {
  display: block;
  width: 100%;
  max-width: 36rem;
  height: auto;
  max-height: 70vh;
  max-height: 70dvh;
  object-fit: contain;
}

/* —— Text —— */
.page-text {
  max-width: 36rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
}

.page-text p + p {
  margin-top: 1rem;
}

.page-text a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-text a:hover {
  color: var(--muted);
}

.page-text--condensed {
  max-width: 28rem;
  font-size: 0.9375rem;
  line-height: 1.65;
}

.page-text--condensed p + p {
  margin-top: 0.75rem;
}

/* —— Photo grid —— */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.photo-thumb {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  display: block;
  width: 100%;
}

.photo-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}

@media (hover: hover) {
  .photo-thumb:hover img {
    opacity: 0.82;
  }
}

.photo-thumb:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 2px;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 2000;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  overflow: hidden;
}

.lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.lightbox-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: contain;
  cursor: default;
  touch-action: pan-x pan-y;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}


#lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2001;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 25px;
  line-height: 1;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

.lightbox-nav:hover {
  opacity: 1;
}

.lightbox-prev { left: 0.25rem; }
.lightbox-next { right: 0.25rem; }

.lightbox-counter {
  position: fixed;
  bottom: 0.75rem;
  right: 1rem;
  z-index: 2001;
  font-size: 0.875rem;
  color: var(--muted);
  pointer-events: none;
}


.close-lightbox {
  position: fixed;
  top: 0.25rem;
  right: 0.5rem;
  z-index: 2001;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

.close-lightbox:hover {
  opacity: 1;
}

@media (hover: none) {
  .lightbox-nav { display: none; }
}

@media (min-width: 1100px) {
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


@media (max-width: 767px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 0.75rem 1rem;
    overflow: visible;
  }

  .main-content {
    padding: 1.5rem 1rem 3rem;
  }

  /* Home: vertical menu + hero image */
  .home-page .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: var(--sidebar-pad);
    border-bottom: none;
    overflow: visible;
  }

  .home-page .main-content--home {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    min-height: 0;
  }

  .home-page .home-hero {
    max-width: 100%;
    max-height: 55vh;
    max-height: 55dvh;
  }

}
