:root {
  --ink: #111111;
  --ink-soft: #8a8a8a;
  --text: #444444;
  --paper: #ffffff;
  --max: 1320px;                      /* bredeste indholdsbredde */
  --side: clamp(24px, 5vw, 72px);     /* luft i siderne */
  --gap: clamp(28px, 4vw, 56px);      /* luft mellem billederne */
  --header-h: 96px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Space Grotesk", -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-transform: lowercase;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* ---------- Header (ingen streger) ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
  /* flugter med galleriets kanter på brede skærme */
  padding-inline: max(var(--side), calc((100% - var(--max)) / 2 + var(--side)));
  background: var(--paper);
}

.logo {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.logo span { font-weight: 400; color: var(--ink-soft); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--ink);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin: -8px;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  margin: 5px 0;
}

@media (max-width: 720px) {
  :root { --header-h: 76px; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    height: calc(100vh - var(--header-h));
    z-index: 39;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px var(--side) 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .main-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .main-nav a {
    padding: 10px 0;
    font-size: 22px;
  }
  .menu-toggle { display: block; }
}

/* ---------- Galleri: mindre billeder, mere luft ---------- */

.gallery {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--side) 0;
  column-count: 1;
  column-gap: var(--gap);
}

@media (min-width: 560px) {
  .gallery { column-count: 2; }
}
@media (min-width: 900px) {
  .gallery { column-count: 3; }
}
@media (min-width: 1100px) {
  .gallery { column-count: 4; }
}

.gallery-item {
  display: block;
  width: 100%;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin-bottom: var(--gap);
  cursor: pointer;
  background: #f5f5f5;
}

.gallery-item img {
  width: 100%;
  height: auto;
  transition: opacity 0.3s ease;
}

.gallery-item:hover img {
  opacity: 0.85;
}

/* ---------- Lightbox (lys og rolig) ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--paper);
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

.lightbox img {
  max-width: 86vw;
  max-height: 82vh;
  width: auto;
  height: auto;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  padding: 14px;
  opacity: 0.5;
  transition: opacity 0.15s ease;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }

.lightbox-close { top: 12px; right: 16px; font-size: 32px; }
.lightbox-prev { left: 8px; top: 50%; transform: translateY(-50%); font-size: 40px; }
.lightbox-next { right: 8px; top: 50%; transform: translateY(-50%); font-size: 40px; }

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  .lightbox-prev, .lightbox-next { font-size: 30px; padding: 10px; }
}

/* ---------- Om mig / Kontakt ---------- */

.page {
  max-width: calc(560px + 2 * var(--side));
  margin: 0 auto;
  padding: clamp(56px, 12vh, 140px) var(--side) 48px;
}

.page h1 {
  font-size: 28px;
  font-weight: 500;
  margin: 0 0 32px;
}

.page p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 20px;
}

.text-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--ink);
  transition: color 0.2s ease;
}
.text-link:hover { color: var(--ink-soft); }

.contact-list {
  list-style: none;
  padding: 0;
  margin: 48px 0 0;
  display: grid;
  gap: 16px;
}
.contact-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  font-size: 16px;
}
.contact-list span { color: var(--ink-soft); }
.contact-list a { transition: color 0.2s ease; }
.contact-list a:hover { color: var(--ink-soft); }

/* ---------- Footer (ingen streger) ---------- */

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px var(--side) 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-soft);
}

.site-footer a { color: var(--ink-soft); transition: color 0.2s ease; }
.site-footer a:hover { color: var(--ink); }

.footer-links {
  display: flex;
  gap: 24px;
}
