/* Reset / basis */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  background: #f7f7f8;
  color: #111827;
}

/* Topbar / nav */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #0f172a;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.nav a {
  color: #e6eef8;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 8px;
  font-weight: 600;
}
.nav a:hover { background: rgba(255,255,255,0.03); }
.nav .btn {
  margin-left: auto;
  background: #2563eb;
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
}
.nav .btn:hover { filter: brightness(1.05); }

/* Layout */
.container { max-width: 960px; margin: 28px auto; padding: 0 16px; }
.section {
  background: white;
  margin: 16px 0;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(2,6,23,0.06);
}
.intro .lead { color: #475569; margin-top: 6px; }

/* Lists / grid */
.list { padding-left: 18px; margin: 8px 0; }
.grid.two { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
@media (min-width: 720px) { .grid.two { grid-template-columns: 1fr 1fr; } }

/* Projects */
.card { border: 1px solid #eef2f6; border-radius: 10px; padding: 14px; background: #fff; }
.card .meta { color: #6b7280; font-size: 0.95rem; margin-top: 6px; }

/* Footer */
.footer { text-align: center; color: #6b7280; padding: 24px 16px 48px; }

/* små justeringer */
h1,h2,h3 { margin: 0 0 8px 0; }
p { margin: 6px 0; }
a.link { color: #2563eb; font-weight: 600; }

/* Litt mer luft i seksjoner */
.section { padding: 24px; }

/* Overskrifter: skaler pent på mobil/desktop */
h1 { font-size: clamp(1.6rem, 2.5vw + 1rem, 2.2rem); }
h2 { font-size: clamp(1.2rem, 1.2vw + .9rem, 1.6rem); }
h3 { font-size: clamp(1.05rem, 1vw + .8rem, 1.3rem); }

/* Intro-layout + profilbilde (for "Forside" + "Om meg") */
.intro-wrap {
  display: grid;
  gap: 16px;
  align-items: center;
}
.profile {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  justify-self: start;
}
.subtle { opacity: 0.9; }

/* To kolonner på større skjermer */
@media (min-width: 760px) {
  .intro-wrap { grid-template-columns: 1fr auto; }
}

/* Thumbnail til prosjekt-screenshots */
.thumb {
  width: 100%;
  max-width: 680px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  display: block;
  margin: 8px 0 10px;
}

/* Bedre tastaturfokus (tilgjengelighet) */
.nav a:focus-visible,
a.link:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
  border-radius: 8px;
}

/* Respektér redusert bevegelse */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav a, .nav .btn, a.link { transition: none !important; }
}

/* Litt bedre mellomrom under seksjonsoverskrifter */
.section h2 { margin-bottom: 8px; }