:root {
  /* Palette */
  --bone: #fdf6dd;
  --ink: #2d2011;
  --oxblood: #491b12;
  --blue: #8494a1;
  --olive: #858248;
  --lilac: #937c91;
  /* Roles */
  --beige: var(--bone);
  --black: var(--ink);
  --red: var(--oxblood);
  --aqua: var(--lilac);
  --serif: "The Seasons", "Prata", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad-x: 5.5vw;
  /* Film-grain tile: 50% of pixels are gray specks baked at 0.11 alpha */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0 0.11'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/*
  When The Seasons font files arrive, drop them in fonts/
  (TheSeasons-Regular.woff2 / .woff / .otf) and uncomment:

@font-face {
  font-family: "The Seasons";
  src: url("fonts/TheSeasons-Regular.woff2") format("woff2"),
       url("fonts/TheSeasons-Regular.woff") format("woff"),
       url("fonts/TheSeasons-Regular.otf") format("opentype");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
*/

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html,
body {
  overflow-x: clip;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--black);
  background: var(--beige);
  line-height: 1.5;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ol,
ul {
  list-style: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---------------------------------- */
/* Panels + stacking scroll           */
/* ---------------------------------- */

.panel {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
}

.panel--bone { --panel: var(--bone); background: var(--panel); }
.panel--blue { --panel: var(--blue); background: var(--panel); }
.panel--olive { --panel: var(--olive); background: var(--panel); }
.panel--lilac { --panel: var(--lilac); background: var(--panel); }
.panel--oxblood { --panel: var(--oxblood); background: var(--panel); }
.panel--ink { --panel: var(--ink); background: var(--panel); }

/* Grainy film texture — footer only */
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  background-size: 200px 200px;
  pointer-events: none;
}


.inner {
  position: relative;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 10vh var(--pad-x) 8vh;
}

@media (min-width: 900px) and (min-height: 620px) {
  .panel {
    position: sticky;
    top: 0;
    min-height: 0;
    height: 100vh;
    height: 100dvh;
    overflow: clip;
  }
}

/* ---------------------------------- */
/* Shared pieces                      */
/* ---------------------------------- */

.sec-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.5rem, min(12vw, 16vh), 11rem);
  line-height: 0.84;
  letter-spacing: 0.005em;
}

.t-beige { color: var(--beige); }
.t-ink { color: var(--ink); }
.t-olive { color: var(--olive); }
.t-lilac { color: var(--lilac); }

.t-red { color: var(--red); }

.align-right { text-align: right; }

.oval {
  aspect-ratio: 3 / 4;
  border-radius: 50%;
  overflow: hidden;
}

.arr {
  display: inline-block;
  flex-shrink: 0;
}


/* Placeholders — swap for real images later */

/* ---------------------------------- */
/* Nav                                */
/* ---------------------------------- */

.site-nav {
  position: fixed;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.site-nav > * {
  pointer-events: auto;
}

/* Back to the front page — round bone disc, top-left, on sub-pages only */
.home-link {
  margin-right: auto;
  width: 2.9rem;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(253, 246, 221, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.4);
  color: var(--red);
  text-decoration: none;
  font-size: 1.25rem;
  line-height: 1;
  transition: background 0.3s ease, color 0.3s ease, transform 0.4s var(--ease);
}

.home-link:hover {
  background: var(--red);
  color: var(--beige);
  transform: translateX(-2px);
}

.nav-pill {
  display: flex;
  gap: 0.15rem;
  background: rgba(253, 246, 221, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 0.3rem;
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.4);
}

.nav-pill a {
  text-decoration: none;
  color: var(--red);
  font-size: 0.83rem;
  font-weight: 500;
  padding: 0.55em 1.05em;
  border-radius: 999px;
  transition: background 0.3s ease, color 0.3s ease;
}

.nav-pill a:hover {
  background: rgba(73, 27, 18, 0.1);
}

/* Selected page: oxblood pill (same colour as every interactive element) */
.nav-pill a.active {
  background-color: var(--red);
  color: var(--beige);
}

/* "Um mig" call-to-action: standing oxblood pill, rightmost (olive when selected) */
.nav-pill a.nav-cta {
  background-color: var(--red);
  color: var(--beige);
  font-weight: 700;
}

.nav-pill a.nav-cta.active {
  background-color: var(--red);
}

.nav-pill a.nav-cta:hover,
.nav-pill a.active:hover {
  background-color: var(--ink);
  color: var(--beige);
}

.nav-toggle {
  display: none;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--beige);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .mobile-menu {
  opacity: 1;
  visibility: visible;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 2.1rem;
  text-align: center;
}

.mobile-menu a {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--red);
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1;
  text-decoration: none;
}

.mobile-menu a:focus-visible {
  outline-color: var(--red);
}

/* ---------------------------------- */
/* 01 · Hero                          */
/* ---------------------------------- */

.hero .inner {
  padding-top: 13vh;
  padding-left: 8.5vw;
}

.hero-name {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--red);
  font-size: clamp(4rem, min(12vw, 15.5vh), 12rem);
  line-height: 0.85;
  letter-spacing: 0.005em;
  display: flex;
  flex-direction: column;
  max-width: 72%;
}

/* Sub-header paragraph, tucked right under the name */
.hero-pill {
  margin-top: clamp(0.75rem, 2.5vh, 1.75rem);
  max-width: min(34rem, 46vw);
  font-size: clamp(1rem, 1.35vw, 1.45rem);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

/* Pre-masked oval PNG — tilt and shape are baked into the image */
/* Red rule under the tagline — bleeds in from the left edge like the
   timelines; scroll stretches it and sends it off to the right (JS) */
.hero-rule {
  align-self: flex-start;
  margin-top: 4vh;
  margin-left: -8.5vw;
  width: calc(8.5vw + min(26vw, 24rem));
  height: 3px;
  background-color: var(--red);
  transform-origin: left center;
}

html.js .reveal .hero-rule {
  transform: scaleX(0);
  transition: transform 1s var(--ease) 1.2s;
}

html.js .reveal.in-view .hero-rule {
  transform: scaleX(1);
}

/* Pill CTA — oxblood (primary) or outlined (ghost); used in the
   hero and under the talks list */
.pill-cta {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55em;
  background-color: var(--red);
  color: var(--beige);
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(0.95rem, 1.1vw, 1.15rem);
  letter-spacing: 0.02em;
  padding: 0.95em 2.3em;
  border-radius: 999px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease),
    background-color 0.4s var(--ease), color 0.4s var(--ease);
}

.pill-cta .arr {
  transition: transform 0.4s var(--ease);
}

.pill-cta:hover .arr {
  transform: translate(4px, 2px);
}

.pill-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -20px rgba(0, 0, 0, 0.45);
}

.pill-cta--ghost {
  background-color: transparent;
  background-image: none;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.pill-cta--ghost:hover {
  background-color: var(--ink);
  color: var(--beige);
  box-shadow: inset 0 0 0 1.5px var(--ink), 0 18px 36px -20px rgba(0, 0, 0, 0.45);
}

.hero-ctas {
  align-self: flex-start;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 4vh;
}

.talk-cta {
  margin-top: 3.5vh;
}

.hero-photo {
  position: absolute;
  top: 16vh;
  right: 9vw;
}

.hero-photo img {
  display: block;
  height: min(76vh, 42vw);
  width: auto;
}


/* ---------------------------------- */
/* 02 · Um mig                        */
/* ---------------------------------- */

.about .inner {
  flex-direction: row;
  align-items: center;
  gap: 6vw;
  padding-top: 8vh;
}

.about-photo {
  flex-shrink: 0;
  margin-left: 2.5vw;
}

.about-photo img {
  display: block;
  height: min(76vh, 42vw);
  width: auto;
}

.about-right {
  margin-left: auto;
  margin-right: 3vw;
  max-width: 36rem;
  width: 100%;
}

.about-text {
  font-size: clamp(1.1rem, 1.6vw, 1.75rem);
  line-height: 1.75;
}

/* Paragraph carousel — text slides sideways, photo never moves */
.para-carousel {
  overflow: hidden;
}

.para-track {
  display: flex;
  transition: transform 0.7s var(--ease);
}

.para-track .about-text {
  flex: 0 0 100%;
  margin: 0;
  padding-right: 1.5rem;
}

.about-nav {
  margin-top: 2.25rem;
}

.about-copy .about-text {
  margin: 0 0 1.1em;
  font-size: clamp(1rem, 1.35vw, 1.4rem);
  line-height: 1.65;
}

.about-copy .about-text:last-child {
  margin-bottom: 0;
}

.about .car-btn {
  border-color: var(--beige);
  color: var(--beige);
}

.about .car-btn:hover:not(:disabled) {
  background: var(--beige);
  color: var(--lilac);
}

/* Invisible scroll runway that drives the paragraph carousel while
   the Um mig panel stays pinned. Collapsed on mobile (no pinning there). */
.about-spacer {
  height: 0;
}

@media (min-width: 900px) and (min-height: 620px) {
  .about-spacer {
    height: 225vh;
  }
}

.em-link {
  position: relative;
  color: var(--red);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  padding: 0 0.05em 0.05em;
}

.em-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.04em;
  height: 0.12em;
  background: var(--aqua);
  transition: height 0.3s var(--ease), bottom 0.3s var(--ease);
}

.em-link:hover::after {
  height: 0.24em;
  bottom: -0.1em;
}

.em-link:focus-visible {
  outline-color: var(--red);
}

/* ---------------------------------- */
/* 03 + 04 · Timelines                */
/* ---------------------------------- */

.timeline {
  position: relative;
  margin: auto 0;
  --logo: clamp(4.5rem, 7.2vw, 9rem);
  --dot: 1.5rem;
}

.tl-line {
  position: absolute;
  background: var(--aqua);
}

.panel--blue .tl-line,
.panel--olive .tl-line,
.panel--lilac .tl-line {
  background: var(--beige);
}

/* Desktop: horizontal line, bleeding off the screen edge like the design */
@media (min-width: 900px) {
  .tl-line {
    top: calc(var(--logo) + 1.4rem + var(--dot) / 2 - 1.5px);
    height: 3px;
  }

  /* Menntun: from the first dot out past the right edge */
  .from-right .tl-line {
    left: var(--line-start, 0%);
    right: calc(-1 * var(--pad-x));
  }

  /* Reynsla: from past the left edge to the last dot */
  .from-left .tl-line {
    left: calc(-1 * var(--pad-x));
    right: var(--line-end, 0%);
  }
}

.tl-items {
  position: relative;
  height: calc(var(--logo) + 1.4rem + var(--dot) + 1.3rem + 7.2rem);
}

.tl-item {
  position: absolute;
  left: var(--x);
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: max-content;
  max-width: 15rem;
}

.tl-logo {
  width: var(--logo);
  height: var(--logo);
  border-radius: 50%;
  margin-bottom: 1.4rem;
}

.tl-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tl-dot {
  width: var(--dot);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--aqua);
  margin-bottom: 1.3rem;
}

.panel--blue .tl-dot,
.panel--olive .tl-dot,
.panel--lilac .tl-dot {
  background: var(--beige);
}

/* Expandable roles (Reynsla) */
.tl-toggle {
  display: flex;
  flex-direction: column;
  align-items: inherit;
  text-align: inherit;
  font: inherit;
  color: inherit;
  cursor: default;
}

.tl-item.has-more .tl-toggle {
  cursor: pointer;
}

.tl-logo {
  transition: transform 0.4s var(--ease);
}

.tl-item.has-more .tl-toggle:hover .tl-logo,
.tl-item.has-more .tl-toggle:focus-visible .tl-logo {
  transform: scale(1.06);
}

.tl-item.has-more .tl-toggle:hover .tl-role,
.tl-item.has-more .tl-toggle:focus-visible .tl-role {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tl-item.open .tl-dot {
  background: var(--red);
}

/* Plus/minus disc — same language as the talks accordion */
.tl-plus {
  display: none;
}

.tl-item.has-more .tl-plus {
  display: block;
  position: relative;
  color: var(--red);
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.7rem;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  transition: background 0.3s ease, color 0.3s ease;
}

.tl-plus::before,
.tl-plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.7rem;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.4s var(--ease);
}

.tl-plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.tl-item.open .tl-plus::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.tl-item.has-more .tl-toggle:hover .tl-plus,
.tl-item.open .tl-plus {
  background: var(--red);
  color: var(--beige);
}

/* The text that opens reads in the dark brown */
#reynsla .tl-detail,
#reynsla .tl-more {
  color: var(--ink);
}

/* Shared detail band below the line (desktop).
   Absolutely positioned so opening it never moves the timeline. */
.tl-detail {
  position: absolute;
  top: calc(100% + 1.5rem);
  left: 0;
  max-width: 56rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  visibility: hidden;
  font-size: clamp(0.95rem, 1.15vw, 1.2rem);
  line-height: 1.55;
  color: var(--black);
  transition: max-height 0.5s var(--ease), opacity 0.5s var(--ease),
    visibility 0s 0.5s;
}

.tl-detail.open {
  max-height: min(30rem, 26vh);
  opacity: 1;
  visibility: visible;
  overflow-y: auto;
  scrollbar-width: thin;
  transition: max-height 0.5s var(--ease), opacity 0.5s var(--ease),
    visibility 0s 0s;
}

/* Reynsla: the timeline sits right under the heading instead of centred,
   leaving room below for the role text that opens */
#reynsla .timeline {
  margin: 12vh 0 auto;
}

.tl-detail-head {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

/* Per-item inline text: hidden on desktop (mirrored into .tl-detail),
   becomes the inline accordion on mobile */
.tl-more {
  display: none;
}

.tl-years {
  font-weight: 700;
  font-size: clamp(1rem, 1.4vw, 1.35rem);
  line-height: 1.3;
}

.tl-role {
  font-size: clamp(0.9rem, 1.15vw, 1.15rem);
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* ---------------------------------- */
/* 05 · Verkefni — tile grid          */
/* ---------------------------------- */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1.2rem, 2vw, 2rem);
  margin-top: 1vh;
}

.tile-link {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.tile-img {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(45, 32, 17, 0.08);
}

.tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

a.tile-link:hover .tile-img img,
a.tile-link:focus-visible .tile-img img {
  transform: scale(1.04);
}

/* Status badge over the image — bone pill, ink text */
.tile-tag {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  background: var(--bone);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45em 0.9em;
  font-size: clamp(0.7rem, 0.75vw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

.tile-title {
  display: block;
  margin-top: 0.9rem;
  font-size: clamp(1rem, 1.2vw, 1.3rem);
  font-weight: 700;
  line-height: 1.3;
}

.tile-title .arr {
  display: inline-block;
  margin-left: 0.2em;
  font-weight: 400;
  opacity: 0.6;
  transition: transform 0.4s var(--ease);
}

a.tile-link:hover .tile-title .arr {
  transform: translate(3px, -3px);
}

.tile-desc {
  display: block;
  margin-top: 0.3rem;
  font-size: clamp(0.85rem, 1vw, 1.02rem);
  line-height: 1.5;
}

/* ---------------------------------- */
/* 07 · Greinar — editorial list      */
/* ---------------------------------- */

.posts-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.more-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  margin-bottom: 1.1rem;
  padding-bottom: 0.15em;
  border-bottom: 1.5px solid currentColor;
  color: var(--ink);
  font-weight: 700;
  font-size: clamp(0.95rem, 1.1vw, 1.15rem);
  text-decoration: none;
}

.more-link .arr {
  display: inline-block;
  transition: transform 0.4s var(--ease);
}

.more-link:hover .arr {
  transform: translateX(4px);
}

.post-list {
  --divider: rgba(253, 246, 221, 0.45);
  list-style: none;
  margin-top: 1vh;
  border-top: 1px solid var(--divider);
}

.post {
  border-bottom: 1px solid var(--divider);
}

.post-link {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr) auto;
  grid-template-areas: "meta body arr";
  gap: 0 2.5rem;
  align-items: baseline;
  padding: clamp(0.85rem, 1.6vh, 1.4rem) 0;
  color: var(--ink);
  text-decoration: none;
}

.post-meta {
  grid-area: meta;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: clamp(0.78rem, 0.9vw, 0.9rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.3;
  opacity: 0.7;
}

.post-body {
  grid-area: body;
  min-width: 0;
}

.post-title {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.7vw, 1.8rem);
  line-height: 1.2;
  text-decoration: underline transparent;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.3s ease;
}

.post-link:hover .post-title,
.post-link:focus-visible .post-title {
  text-decoration-color: currentColor;
}

.post-desc {
  display: block;
  margin-top: 0.3rem;
  font-size: clamp(0.9rem, 1.05vw, 1.08rem);
  line-height: 1.5;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Front page: title + lead only, no date column; cream text, ink titles */
#skrif .post-link {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "body arr";
  color: var(--ink);
}

#skrif .post-list {
  --divider: rgba(45, 32, 17, 0.18);
}

#skrif .post-title {
  color: var(--ink);
}

#skrif .section-sub,
#skrif .more-link {
  color: var(--ink);
}

/* Greinar page: thumbnail, date, text, arrow */
.page .post-link {
  grid-template-columns: 8rem 10rem minmax(0, 1fr) auto;
  grid-template-areas: "thumb meta body arr";
  align-items: center;
}

.post-thumb {
  grid-area: thumb;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(45, 32, 17, 0.06);
}

.post-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.post-link:hover .post-thumb img {
  transform: scale(1.04);
}

.post-arr {
  grid-area: arr;
  font-size: clamp(1.1rem, 1.4vw, 1.5rem);
  line-height: 1;
  transition: transform 0.4s var(--ease);
}

.post-link:hover .post-arr {
  transform: translateX(4px);
}

.post-link:hover .post-arr.ext {
  transform: translate(3px, -3px);
}

/* Round arrow buttons (Um mig paragraph carousel) */
.car-nav {
  display: flex;
  gap: 0.9rem;
  margin-top: 2.5vh;
}

.car-btn {
  width: 2.9rem;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid var(--beige);
  color: var(--beige);
  display: grid;
  place-items: center;
  transition: opacity 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.car-btn svg {
  width: 1.15rem;
  height: 1.15rem;
}

.car-btn:hover:not(:disabled) {
  background: var(--beige);
  color: var(--panel, var(--aqua));
}

.car-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ---------------------------------- */
/* 06 · Fyrirlestrar & námskeið       */
/* ---------------------------------- */

.talks .inner {
  flex-direction: row;
  align-items: center;
  gap: 6vw;
  padding-top: 8vh;
}

.talks-left {
  max-width: 44rem;
}

/* Long two-line title — scaled to the design's proportion so it stays on two lines */
.talks .sec-title {
  font-size: clamp(2.75rem, min(8.5vw, 11.5vh), 8rem);
}

/* Verkefni and Greinar: smaller titles with a lead line under each */
#verkefni .sec-title,
#skrif .sec-title {
  font-size: clamp(2.75rem, min(8.5vw, 11.5vh), 8rem);
  margin-bottom: 0.75rem;
}

#fyrirlestrar .sec-title {
  margin-bottom: 0.75rem;
}

/* Fyrirlestrar on dusty blue: oxblood text, dividers, tags and button */
.talks .section-sub,
.talk-list li {
  color: var(--ink);
}

.section-sub {
  max-width: 38rem;
  font-size: clamp(0.98rem, 1.25vw, 1.3rem);
  line-height: 1.6;
  margin-bottom: 2.5vh;
}

#verkefni .inner,
#skrif .inner {
  padding-top: 8vh;
  padding-bottom: 6vh;
}

.talk-list {
  margin-top: 3vh;
  border-top: 1px solid rgba(45, 32, 17, 0.35);
}

.talk-list li {
  border-bottom: 1px solid rgba(45, 32, 17, 0.35);
  font-weight: 500;
  font-size: clamp(1.05rem, 1.45vw, 1.55rem);
  line-height: 1.5;
}

/* Accordion row: tag + title left, plus/minus disc right */
.talk-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(0.85rem, 1.7vh, 1.3rem) 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.talk-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}

.talk-toggle:hover .talk-title,
.talk-toggle:focus-visible .talk-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.talk-chev {
  position: relative;
  flex-shrink: 0;
  color: var(--red);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  transition: background 0.3s ease, color 0.3s ease;
}

.talk-chev::before,
.talk-chev::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.9rem;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.4s var(--ease);
}

.talk-chev::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.talk-list li.open .talk-chev::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.talk-toggle:hover .talk-chev,
.talk-list li.open .talk-chev {
  background: var(--red);
  color: var(--beige);
}

/* Inline accordion body under each row */
.talk-more {
  display: block;
  max-width: 40rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 400;
  font-size: clamp(0.95rem, 1.1vw, 1.15rem);
  line-height: 1.6;
  transition: max-height 0.5s var(--ease), opacity 0.5s var(--ease),
    padding-bottom 0.5s var(--ease);
}

.talk-list li.open .talk-more {
  max-height: min(16rem, 22vh);
  opacity: 1;
  padding-bottom: 1.4rem;
  overflow-y: auto;
  scrollbar-width: thin;
}

#fyrirlestrar .pill-cta {
  background-color: var(--red);
}

/* Category tag — outlined pill, echoes the design's button style */
.talk-tag {
  display: inline-block;
  border: 1.5px solid var(--black);
  border-radius: 999px;
  padding: 0.32em 1em;
  font-size: 0.68em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.talks-photo {
  margin-left: auto;
  margin-right: 2vw;
  flex-shrink: 0;
}

.talks-photo img {
  display: block;
  height: min(76vh, 42vw);
  width: auto;
}

/* ---------------------------------- */
/* 08 · Heyrumst                      */
/* ---------------------------------- */

.contact .inner {
  padding-left: 8.5vw;
}

#heyrumst .sec-title {
  margin-bottom: 0.75rem;
}

#heyrumst .section-sub {
  color: var(--beige);
}

/* Bottom row: lead text bottom-left, icons bottom-right */
.contact-bottom {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2.5rem;
}

.contact .section-sub {
  margin-bottom: 0;
  max-width: 32rem;
}

.contact-cols {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 3.5vw, 3.5rem);
  color: var(--beige);
}

/* Icon-only contact links: lilac icon on a bone disc — the disc lifts the
   lilac off the olive so it pops instead of blending in */
.contact-ic {
  display: grid;
  place-items: center;
  width: clamp(3.4rem, 4.2vw, 4.4rem);
  height: clamp(3.4rem, 4.2vw, 4.4rem);
  border-radius: 50%;
  background: var(--beige);
  color: var(--red);
  box-shadow: 0 14px 30px -20px rgba(45, 32, 17, 0.5);
  transition: background 0.3s ease, color 0.3s ease, transform 0.4s var(--ease);
}

.contact-ic svg {
  width: 46%;
  height: 46%;
}

.contact-ic:hover {
  background: var(--red);
  color: var(--beige);
  transform: translateY(-3px);
}

/* ---------------------------------- */
/* Reveal animations                  */
/* ---------------------------------- */

html.js .reveal [data-a] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}

html.js .reveal.in-view [data-a] {
  opacity: 1;
  transform: none;
}


/* Timeline: triggers when the timeline itself enters the viewport —
   line draws in from the side, items pop in after */
html.js .timeline .tl-line {
  transform: scaleX(0);
  transition: transform 1.1s var(--ease) 0.15s;
}

html.js .timeline.in-view .tl-line {
  transform: scaleX(1);
}

.from-left .tl-line { transform-origin: left center; }
.from-right .tl-line { transform-origin: right center; }

html.js .timeline .tl-item {
  opacity: 0;
  transform: translateX(-50%) translateY(18px) scale(0.94);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(0.55s + var(--i) * 0.16s);
}

html.js .timeline.in-view .tl-item {
  opacity: 1;
  transform: translateX(-50%);
}

/* List rows and tiles rise in, staggered — keyed to the list/grid itself */
html.js .post-list .post,
html.js .tile-grid .tile {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(0.15s + var(--i) * 0.09s);
}

html.js .post-list.in-view .post,
html.js .tile-grid.in-view .tile {
  opacity: 1;
  transform: none;
}

/* ---------------------------------- */
/* 09 · Undirsíður (greinar)          */
/* ---------------------------------- */

.page {
  background: var(--bone);
  min-height: 100svh;
}

.page-inner {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 17vh var(--pad-x) 10vh;
}

.page-inner--wide {
  max-width: 68rem;
}

/* Articles read on a white sheet laid on the beige page. Same max-width and
   horizontal padding as before, so the text measure does not change. */
article.page-inner {
  margin: 15vh auto 8vh;
  padding: 4rem var(--pad-x) 4.5rem;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 30px 60px -40px rgba(45, 32, 17, 0.35);
}

.page .sec-title {
  font-size: clamp(2.75rem, min(8.5vw, 11.5vh), 7rem);
  margin-bottom: 0.75rem;
}

/* Greinar page: each article on its own white card */
.page .post-list {
  margin-top: 3vh;
  border-top: none;
}

.page .post {
  border-bottom: none;
  margin-bottom: 0.85rem;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 40px -34px rgba(45, 32, 17, 0.35);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.page .post:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 46px -32px rgba(45, 32, 17, 0.45);
}

.page .post-link {
  padding: 1rem 1.25rem;
}

.back-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  margin-bottom: 3rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  opacity: 0.8;
}

.back-link:hover {
  opacity: 1;
}

.page-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em 0.7em;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.65;
}

.article-title {
  margin: 0.8rem 0 1.4rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  line-height: 1.04;
}

.article-lead {
  margin-bottom: 2.4rem;
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  font-weight: 500;
  line-height: 1.55;
}

.article-body {
  font-size: clamp(1.125rem, 1.3vw, 1.25rem);
  line-height: 1.7;
}

.article-body p {
  margin: 0 0 1.35em;
}

.article-body h2 {
  margin: 2.2em 0 0.7em;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.2;
}

.article-body blockquote {
  margin: 2em 0;
  padding-left: 1.4rem;
  border-left: 3px solid var(--oxblood);
  font-family: var(--serif);
  font-size: 1.15em;
  line-height: 1.45;
}

.article-body blockquote p {
  margin: 0;
}

.article-body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--aqua);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.article-body a:hover {
  text-decoration-color: var(--oxblood);
}

.article-body figure {
  margin: 2.2em 0;
}

.article-body figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.article-body figcaption {
  margin-top: 0.6em;
  font-size: 0.85rem;
  opacity: 0.65;
}

.article-foot {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(45, 32, 17, 0.18);
  font-size: 0.95rem;
  opacity: 0.85;
}

.article-foot a {
  color: inherit;
}

/* ---------------------------------- */
/* Mobile                             */
/* ---------------------------------- */

@media (max-width: 899px) {
  :root {
    --pad-x: 7vw;
  }

  .inner {
    padding: 15vh var(--pad-x) 10vh;
  }

  .nav-pill {
    display: none;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 2.9rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--beige);
    box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.4);
  }

  .nav-toggle .bar {
    width: 1.15rem;
    height: 2px;
    border-radius: 2px;
    background: var(--red);
    transition: transform 0.35s var(--ease);
  }

  body.menu-open .nav-toggle .bar:nth-child(1) {
    transform: translateY(3.5px) rotate(45deg);
  }

  body.menu-open .nav-toggle .bar:nth-child(2) {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  /* Hero */
  .hero .inner {
    padding-top: 14vh;
    padding-left: var(--pad-x);
  }

  .hero-name {
    max-width: 100%;
    font-size: clamp(3.4rem, 15vw, 5.5rem);
  }

  .hero-pill {
    margin-top: 2.5rem;
    max-width: 100%;
    font-size: 1.05rem;
  }

  .hero-ctas {
    margin-top: 2rem;
  }

  .hero-rule {
    margin-left: calc(-1 * var(--pad-x));
    width: calc(var(--pad-x) + 60vw);
  }

  .hero-photo {
    position: static;
    margin-top: 3rem;
  }

  .hero-photo img {
    height: auto;
    width: min(68vw, 19rem);
  }

  /* Um mig */
  .about .inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3rem;
  }

  .about-photo {
    margin-left: 0;
  }

  .about-photo img {
    height: auto;
    width: min(68vw, 19rem);
  }

  .about-right {
    margin: 0;
  }

  /* Timelines become vertical */
  .timeline {
    --logo: 3.75rem;
    margin: 9vh 0 auto;
  }

  .tl-line {
    left: 11px;
    right: auto;
    top: 0;
    width: 2px;
    height: 100%;
  }

  .tl-items {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding-left: 2.5rem;
  }

  /* Reynsla vertical: newest on top (DOM stays chronological for desktop) */
  #reynsla .tl-items {
    flex-direction: column-reverse;
  }

  html.js #reynsla .tl-item {
    transition-delay: calc(0.55s + (3 - var(--i)) * 0.16s);
  }

  .tl-item {
    position: relative;
    left: auto;
    width: auto;
    align-items: flex-start;
    text-align: left;
    max-width: none;
  }

  .tl-dot {
    position: absolute;
    left: -2.5rem;
    top: calc(var(--logo) / 2 - var(--dot) / 2);
    margin: 0;
  }

  .tl-logo {
    margin-bottom: 1rem;
  }

  /* Mobile: shared panel off, inline accordion under the tapped item */
  .tl-detail {
    display: none;
  }

  .tl-more {
    display: block;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--black);
    transition: max-height 0.5s var(--ease), opacity 0.5s var(--ease),
      margin-top 0.5s var(--ease);
  }

  .tl-item.open .tl-more {
    max-height: 32rem;
    opacity: 1;
    margin-top: 0.7rem;
  }

  html.js .timeline .tl-line {
    transform: scaleY(0);
  }

  html.js .timeline.in-view .tl-line {
    transform: scaleY(1);
  }

  .from-left .tl-line,
  .from-right .tl-line {
    transform-origin: center top;
  }

  html.js .timeline .tl-item {
    transform: translateY(18px) scale(0.96);
  }

  html.js .timeline.in-view .tl-item {
    transform: none;
  }

  /* Greinar: title, lead, list, then the "all articles" link */
  .posts-head {
    display: contents;
  }

  #skrif .section-sub {
    order: 1;
  }

  .post-list {
    order: 2;
  }

  .more-link {
    order: 3;
    align-self: flex-start;
    margin: 1.75rem 0 0;
  }

  .post-link {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "meta meta"
      "body arr";
    gap: 0.35rem 1rem;
  }

  .post-meta {
    flex-direction: row;
    gap: 0.6rem;
  }

  .page .post-link {
    grid-template-columns: 5rem minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb meta meta"
      "thumb body arr";
    align-items: start;
  }

  .post-src::before {
    content: "· ";
  }

  .post-desc {
    white-space: normal;
  }

  /* Verkefni: two tiles per row */
  .tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 1rem;
  }

  /* Content sections shrink to their content */
  .cards-panel {
    min-height: 0;
  }

  /* Sub-pages */
  .page-inner {
    padding: 13vh var(--pad-x) 10vh;
  }

  article.page-inner {
    margin: 12vh 0 0;
    padding: 2.5rem var(--pad-x) 3rem;
    border-radius: 18px 18px 0 0;
  }


  /* Fyrirlestrar */
  .talks .inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3rem;
  }

  .talk-list {
    margin-top: 2.5rem;
  }

  .talk-chev {
    width: 2rem;
    height: 2rem;
  }

  .talks-photo {
    margin: 0;
  }

  .talks-photo img {
    height: auto;
    width: min(68vw, 19rem);
  }

  /* Heyrumst */
  .contact .inner {
    padding-left: var(--pad-x);
  }

  .contact-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.75rem;
  }

  .contact-cols {
    gap: 2rem;
    align-self: flex-end;
  }

  /* Footer: shrink to its content on phones instead of a full screen */
  .contact.panel {
    min-height: 0;
  }

  .contact .inner {
    padding-top: 9vh;
    padding-bottom: 7vh;
  }
}

/* ---------------------------------- */
/* Reduced motion                     */
/* ---------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html.js .reveal [data-a],
  html.js .timeline .tl-line,
  html.js .timeline .tl-item,
  html.js .post-list .post,
  html.js .tile-grid .tile {
    transition: none;
  }

  .para-track {
    transition: none;
  }

  html.js .reveal .hero-rule {
    transition: none;
  }

  .tl-detail,
  .tl-more,
  .tl-logo,
  .talk-more {
    transition: none;
  }

  .pill-cta,
  .tile-img img,
  .em-link {
    transition: none;
  }
}

/* v2: the footer no longer takes a whole screen on desktop */
@media (min-width: 900px) and (min-height: 620px) {
  .contact.panel {
    height: 60dvh;
  }
}


/* ==================================================================== */
/* v4 · Oxblood + dusty blue til skiptis                                */
/* Every section is one of the pair. Copy is bone on oxblood, ink on   */
/* blue; the title, rule, buttons, plus discs, lines and arrows are     */
/* always the partner colour. Grain only on the footer.                 */
/* ==================================================================== */

:root {
  --aqua: var(--blue);
}

body {
  color: var(--ink);
  background: var(--blue);
}

.panel--oxblood {
  --bg: var(--red);
  --fg: var(--beige);
  --partner: var(--blue);
  --partner-fg: var(--ink);
}

.panel--blue,
.page {
  --bg: var(--blue);
  --fg: var(--ink);
  --partner: var(--red);
  --partner-fg: var(--beige);
}

.page {
  position: relative;
  background: var(--blue);
}

.page-inner {
  position: relative;
}

/* The white sheet keeps dark type; a touch wider than before */
article.page-inner {
  color: var(--ink);
  max-width: 50rem;
}

/* Type */
.hero-name {
  color: var(--beige);
}

.sec-title,
.page .sec-title {
  color: var(--partner);
}

.hero-pill,
.section-sub,
.page .section-sub,
.talks .section-sub,
.talk-list li,
.talk-more,
.tl-years,
.tl-role,
.tl-detail,
.tl-more,
#reynsla .tl-detail,
#reynsla .tl-more,
.about-text,
.tile-link,
#skrif .post-link,
#skrif .post-title,
#skrif .section-sub,
#skrif .more-link,
#heyrumst .section-sub {
  color: var(--fg);
}

.post-desc,
.tile-desc {
  opacity: 0.85;
}

.em-link {
  color: var(--partner);
}

.em-link::after {
  background: var(--partner);
}

.hero-rule {
  background-color: var(--partner);
}

/* Buttons: the partner colour, inverted on hover */
.pill-cta,
#fyrirlestrar .pill-cta {
  background-color: var(--partner);
  color: var(--partner-fg);
}

.pill-cta:hover,
#fyrirlestrar .pill-cta:hover {
  background-color: var(--fg);
  color: var(--bg);
}

/* Nav: oxblood throughout */
.nav-pill a.active,
.nav-pill a.nav-cta,
.nav-pill a.nav-cta.active {
  background-color: var(--red);
  color: var(--beige);
}

.nav-pill a.nav-cta:hover,
.nav-pill a.active:hover {
  background-color: var(--ink);
  color: var(--beige);
}

.nav-pill a:hover {
  background: rgba(73, 27, 18, 0.1);
}

.home-link:hover {
  background: var(--red);
  color: var(--beige);
}

/* Talks accordion (blue section) */
.talk-list {
  border-top-color: rgba(45, 32, 17, 0.3);
}

.talk-list li {
  border-bottom-color: rgba(45, 32, 17, 0.3);
}

.talk-tag {
  border-color: currentColor;
}

.talk-chev {
  color: var(--partner);
}

.talk-toggle:hover .talk-chev,
.talk-list li.open .talk-chev {
  background: var(--partner);
  color: var(--partner-fg);
}

/* Greinar list (oxblood section) */
#skrif .post-list {
  --divider: rgba(253, 246, 221, 0.3);
}

#skrif .post-arr {
  color: var(--partner);
}

#skrif .more-link {
  border-bottom-color: var(--partner);
}

/* Verkefni tiles (blue section) */
.tile-img {
  background: rgba(45, 32, 17, 0.08);
}

.tile-tag {
  background: var(--partner);
  color: var(--partner-fg);
}

/* Timelines */
.tl-line,
.tl-dot,
.panel--blue .tl-line,
.panel--blue .tl-dot {
  background: var(--partner);
}

.tl-item.has-more .tl-plus {
  color: var(--partner);
}

.tl-item.has-more .tl-toggle:hover .tl-plus,
.tl-item.open .tl-plus {
  background: var(--partner);
  color: var(--partner-fg);
}

.tl-item.open .tl-dot {
  background: var(--fg);
}

/* Footer (oxblood, grainy): bone discs, oxblood icons */
.contact-ic {
  background: var(--beige);
  color: var(--red);
}

.contact-ic:hover {
  background: var(--blue);
  color: var(--ink);
}

/* v4 · Fyrirlestrar: photo on the left, text on the right (desktop) */
@media (min-width: 900px) {
  .talks-photo {
    order: -1;
    margin-left: 2vw;
    margin-right: 0;
  }

  .talks-left {
    margin-left: auto;
  }
}

/* v4 · Verkefni: heading and lead line right-aligned */
#verkefni .sec-title {
  text-align: right;
}

#verkefni .section-sub {
  margin-left: auto;
  text-align: right;
}

/* Greinar page: more air between the lead line and the first card */
.page .post-list {
  margin-top: 7vh;
}

/* Front page Greinar: titles only in the list, with air under the lead line */
#skrif .post-list {
  margin-top: 6vh;
}

/* Fyrirlestrar: the booking button sits at the right edge of the text column */
.talks-left {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.talk-cta {
  align-self: flex-end;
}
