:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #5c5c5c;
  --line: #e3e3e3;
  --card: #fafafa;
  --accent: #111111;
  --maxw: 54rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0e;
    --fg: #f2f2f2;
    --muted: #a6a6a6;
    --line: #2a2a2a;
    --card: #171717;
    --accent: #ffffff;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 1.25rem 4rem;
  background: var(--bg);
  color: var(--fg);
  font: 400 clamp(1rem, 0.95rem + 0.25vw, 1.075rem)/1.65
        system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Language switching: only the active language is shown. */
html[data-lang="en"] .t[lang="nn"],
html[data-lang="no"] .t[lang="en"] { display: none; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--fg);
  color: var(--bg);
  border-radius: 4px;
}

.lang-switch {
  max-width: var(--maxw);
  margin: 1.25rem auto 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
}
.lang-switch button {
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.6rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.hero,
.section,
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
}

.hero {
  padding: 2.5rem 0 1rem;
  text-align: center;
}

.logo {
  width: min(15rem, 60vw);
  height: auto;
  display: block;
  margin: 0 auto 1.5rem;
}

@media (prefers-color-scheme: dark) {
  .logo { filter: invert(1); }
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

.tagline {
  margin: 0.4rem 0 1.75rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.lede {
  margin: 0 auto;
  max-width: 42rem;
  text-align: left;
}

.section {
  padding-top: 3rem;
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.muted { color: var(--muted); }

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.1rem;
}
.card p { margin: 0; color: var(--muted); }

.list,
.links {
  margin: 0;
  padding: 0;
  list-style: none;
}
.list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.list li:last-child { border-bottom: 0; }
.list.small { font-size: 0.95rem; }

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.timeline li:last-child { border-bottom: 0; }

.when {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}
.links a {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
}

a { color: inherit; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
.links a:hover { border-color: var(--accent); }

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

.nod {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 40rem) {
  .nod { grid-template-columns: 14rem 1fr; }
}

.photo { margin: 0; }
.photo img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.photo figcaption {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
.footer p { margin: 0.25rem 0; }
.footer .muted { max-width: 42rem; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
