:root {
  --bg: #F5F5F1;
  --bg-2: #EBECE6;
  --ink: #1A1E21;
  --ink-2: #555C61;
  --rule: #D4D6D0;
  --rule-strong: #1A1E21;
  --sea: #1E4B66;
  --sea-soft: #DCE6EC;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
  --w: 1120px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --headerh: 3rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-decoration-color 120ms ease;
}
a:hover { text-decoration-color: var(--sea); color: var(--sea); }
a:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; }

h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.1; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: var(--w); margin: 0 auto; padding: 0 var(--gutter); }

/* Sidhuvud */
.masthead-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
}
.masthead .home { text-decoration: none; letter-spacing: 0.01em; }
.masthead nav { display: flex; gap: 1.75rem; }
.masthead nav a { text-decoration: none; color: var(--ink-2); }
.masthead nav a:hover { color: var(--sea); }
.masthead nav a[aria-current="true"] {
  color: var(--sea);
  text-decoration: underline;
  text-decoration-color: var(--sea);
  text-underline-offset: 0.4em;
}
.masthead nav .lang { color: var(--ink); }

/* Ingång: text till vänster, porträtt till höger */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: end;
  padding: 3rem 0 4.5rem;
  border-bottom: 1px solid var(--rule-strong);
}
.hero h1 {
  font-size: clamp(2.6rem, 6.2vw, 4.75rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin-bottom: 2rem;
  max-width: 14ch;
}
.hero .intro {
  font-size: 1.25rem;
  line-height: 1.5;
  max-width: 44ch;
  color: var(--ink);
}
.hero .intro + .intro { color: var(--ink-2); font-size: 1.125rem; }
.hero .meta {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-2);
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.75rem;
}
.hero .meta a { text-decoration: none; color: var(--ink); }
.hero .meta a:hover { color: var(--sea); }

.portrait { position: relative; margin: 0 0 0 auto; max-width: 400px; }
.portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  object-position: 50% 30%;
  filter: grayscale(1) contrast(1.02);
  background: var(--bg-2);
}
.portrait figcaption {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-2);
  margin-top: 0.7rem;
}

/* Sektion med rubrik i vänsterkolumn */
.block {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2.5rem;
  padding: 3.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.block > h2 {
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  position: sticky;
  top: calc(var(--headerh) + 1.5rem);
  align-self: start;
}
section[id] { scroll-margin-top: calc(var(--headerh) + 0.75rem); }
.block > h2 small {
  display: block;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-2);
  margin-top: 0.5rem;
  font-weight: 500;
}
.block .body { max-width: 66ch; }

/* Just nu */
.now > li {
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
}
.now > li:first-child { border-top: 0; padding-top: 0.25rem; }
.now h3 {
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 0.65rem;
  letter-spacing: -0.005em;
}
.now h3 span {
  display: block;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--sea);
  margin-top: 0.3rem;
}
.now p { color: var(--ink-2); }
.now p:last-child { margin-bottom: 0; }

/* Områden: term till vänster, beskrivning till höger */
.areas > li {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
}
.areas > li:first-child { border-top: 0; padding-top: 0.25rem; }
.areas h3 { font-size: 1.15rem; font-weight: 500; padding-top: 0.1rem; }
.areas p { margin: 0; color: var(--ink-2); font-size: 1.08rem; }

/* Citat */
.quote {
  padding: 3.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.quote blockquote {
  margin: 0 auto;
  max-width: 30ch;
  text-align: center;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.quote cite {
  display: block;
  margin-top: 1.25rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.85rem;
  color: var(--ink-2);
}

/* Bakgrund */
.cv > li {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
}
.cv > li:first-child { border-top: 0; padding-top: 0.25rem; }
.cv .when {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-2);
  padding-top: 0.3rem;
  font-variant-numeric: tabular-nums;
}
.cv .what strong { font-weight: 500; font-size: 1.15rem; display: block; }
.cv .what span { display: block; color: var(--ink-2); font-size: 1.05rem; margin-top: 0.15rem; }
.cv .divider { border-top: 1px solid var(--rule-strong); margin-top: 1rem; padding-top: 1.5rem; }

/* Länkar */
.links > li {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
}
.links > li:first-child { border-top: 0; padding-top: 0.25rem; }
.links a { font-weight: 500; }
.links span { color: var(--ink-2); font-size: 1.05rem; }

/* Kontakt */
.contact {
  background: var(--bg-2);
  padding: 3.75rem 0 4.5rem;
}
.contact .wrap {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2.5rem;
}
.contact h2 { font-size: 1.6rem; }
.contact p { max-width: 50ch; color: var(--ink-2); }
.contact .lines { font-family: var(--sans); font-size: 1rem; }
.contact .lines li { margin-bottom: 0.4rem; }
.contact .lines a { text-decoration: none; color: var(--ink); }
.contact .lines a:hover { color: var(--sea); }

footer {
  padding: 1.75rem 0 2.5rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  :root { --headerh: 5.4rem; }
  .hero { grid-template-columns: 1fr; gap: 2.5rem; align-items: start; }
  .portrait { order: -1; max-width: 240px; }
  .portrait img { aspect-ratio: 1 / 1; object-position: 50% 20%; }
  .block, .contact .wrap { grid-template-columns: 1fr; gap: 1.25rem; }
  .block > h2 { position: static; }
  .areas > li, .links > li, .cv > li { grid-template-columns: 1fr; gap: 0.3rem; }
  .masthead { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .masthead nav { gap: 1.25rem; flex-wrap: wrap; }
}

/* Artiklar */
.artikel {
  max-width: 66ch;
  padding: 3rem 0 4rem;
}
.artikel h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 1.25rem;
}
.artikel .datum {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 1rem;
}
.artikel .ingress {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink-2);
  margin-bottom: 2.25rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.artikel h2 {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.75rem;
}
.artikel h3 { font-size: 1.15rem; font-weight: 500; margin: 1.75rem 0 0.5rem; }
.artikel p { margin: 0 0 1.1em; }
.artikel ul, .artikel ol { margin: 0 0 1.1em; padding-left: 1.4rem; }
.artikel ul { list-style: disc; }
.artikel ol { list-style: decimal; }
.artikel li { margin-bottom: 0.4em; }
.artikel li p { margin: 0; }
.artikel strong { font-weight: 500; }
.artikel hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
.artikel blockquote {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 1px solid var(--rule-strong);
  color: var(--ink-2);
}
.artikel .sign {
  font-family: var(--sans);
  font-size: 0.9rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-strong);
}
