/* www.palsgaard.net
   Varm minimalisme med en lysende koboltblå som eneste accent, store serif-overskrifter,
   bento-felter og diskret bevægelse, der slår fra ved "reducer bevægelse". */

@font-face { font-family: "Geist"; src: url("/assets/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }

:root {
  --bg: #F7F5F1; --surface: #FFFFFF; --surface-2: #EFEBE4; --ink: #14161C; --muted: #5A5F6B; --line: #E3DED5;
  --accent: #2643E9; --accent-ink: #FFFFFF; --accent-soft: #E4E8FD;
  --night: #0E1424; --night-ink: #F3F4F8; --night-muted: #AEB6CC;
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 24px; --gap: clamp(12px, 1.6vw, 18px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0D0F14; --surface: #161922; --surface-2: #1E2230; --ink: #ECEEF3; --muted: #A3A9B6; --line: #2A2F3C;
  --accent: #8EA2FF; --accent-ink: #0D0F14; --accent-soft: #1F2650;
  --night: #1A2140; --night-ink: #F3F4F8; --night-muted: #B9C1DA;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0D0F14; --surface: #161922; --surface-2: #1E2230; --ink: #ECEEF3; --muted: #A3A9B6; --line: #2A2F3C;
    --accent: #8EA2FF; --accent-ink: #0D0F14; --accent-soft: #1F2650;
    --night: #1A2140; --night-ink: #F3F4F8; --night-muted: #B9C1DA;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--sans); font-feature-settings: "ss01"; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { width: min(1160px, 100% - 2 * clamp(16px, 4vw, 40px)); margin-inline: auto; }

/* Svævende sidehoved med glas – den ene flade, der får den effekt */
.site-header { position: sticky; top: 12px; z-index: 20; margin-top: 12px; }
.bar {
  display: flex; align-items: center; gap: 8px 20px; padding: 8px 8px 8px 18px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: 999px;
  box-shadow: 0 8px 30px -12px rgba(14, 20, 36, .18);
}
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.mono { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 600 13px/1 var(--sans); letter-spacing: .02em; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 500; }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.theme-toggle {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--ink); cursor: pointer; transition: transform .3s ease;
}
.theme-toggle:hover { transform: rotate(-20deg); }
.theme-toggle svg { width: 18px; height: 18px; }
[data-theme="dark"] .icon-moon, :root:not([data-theme="dark"]) .icon-sun { display: none; }

/* Typografi med tydelig forskel på overskrift og brødtekst */
h1, h2 { font-family: var(--display); font-weight: 450; letter-spacing: -.025em; line-height: 1.02; margin: 0; }
h1 { font-size: clamp(54px, 10vw, 128px); }
h2 { font-size: clamp(34px, 5vw, 60px); }
h3 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; margin: 0 0 6px; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 6px 14px 6px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500; color: var(--muted);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.lead { font-size: clamp(19px, 2.1vw, 23px); line-height: 1.5; color: var(--muted); margin: 24px 0 0; max-width: 34em; }
.kicker { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px;
  font: 500 16px/1.2 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); transition: transform .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }

/* Forside: hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: end; padding: clamp(48px, 9vw, 120px) 0 clamp(40px, 6vw, 72px); }
.portrait { position: relative; margin: 0; }
.portrait img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: calc(var(--radius) + 8px); }
.portrait figcaption {
  position: absolute; left: 16px; right: 16px; bottom: 16px; padding: 12px 16px; border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 86%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 14px; line-height: 1.4; color: var(--muted);
}
.portrait figcaption b { display: block; color: var(--ink); font-size: 15px; }

/* Bento */
.section { padding: clamp(56px, 8vw, 104px) 0 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; margin-bottom: 28px; }
.section-head p { margin: 0; max-width: 30em; color: var(--muted); }
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.tile {
  container-type: inline-size; position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(20px, 2.4vw, 30px); transition: transform .3s ease, box-shadow .3s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(14, 20, 36, .35); }
.tile p { margin: 0; color: var(--muted); }
.tile.now { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; background: var(--night); color: var(--night-ink); border-color: transparent; }
.tile.now .kicker, .tile.now p { color: var(--night-muted); }
.tile.now h3 { font: 450 clamp(28px, 9cqi, 46px)/1.05 var(--display); letter-spacing: -.02em; margin: 0 0 14px; }
.tile.now .grow { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 20px 0 0; }
.chips li { margin: 0; padding: 4px 12px; border-radius: 999px; font-size: 14px; background: var(--surface-2); color: var(--ink); }
.tile.now .chips li { background: rgba(255, 255, 255, .1); color: var(--night-ink); }
.stat { display: flex; flex-direction: column; justify-content: space-between; min-height: 180px; }
.stat b { font: 450 clamp(40px, 26cqi, 72px)/1 var(--display); letter-spacing: -.03em; color: var(--ink); }
.stat.accent { background: var(--accent); border-color: var(--accent); }
.stat.accent b, .stat.accent p { color: var(--accent-ink); }

.results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.results .wide { grid-column: span 2; }
.results .tile { display: flex; flex-direction: column; gap: 4px; min-height: 200px; }
.results .num { margin-bottom: auto; padding-bottom: 28px; font: 500 14px/1 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.results .wide h3 { font: 450 clamp(24px, 4.4cqi, 34px)/1.1 var(--display); letter-spacing: -.015em; }

.quote { margin: 0; font: 400 clamp(30px, 4.6vw, 58px)/1.12 var(--display); letter-spacing: -.02em; max-width: 20em; }
.quote em { color: var(--accent); }
.quote-note { margin: 24px 0 0; max-width: 40em; color: var(--muted); font-size: 18px; }

.contact-card {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px 48px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 8px); padding: clamp(24px, 4vw, 56px);
}
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.contact-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; padding: 14px 18px; border-radius: 16px; background: var(--surface-2); }
.contact-list span { min-width: 5.5em; font-size: 14px; color: var(--muted); }
.contact-list a { font-weight: 500; color: var(--ink); }
.reveal-btn {
  padding: 6px 14px; border-radius: 999px; border: 1px dashed var(--accent); background: transparent;
  font: 500 15px/1.2 var(--sans); color: var(--accent); cursor: pointer;
}
.reveal-btn:hover { background: var(--accent-soft); }
.cv-contact { margin-top: 28px; max-width: 560px; }
.copy {
  margin-left: auto; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font: 500 13px/1 var(--sans); color: var(--ink); cursor: pointer;
}
.copy.is-done { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* CV */
.cv-head { padding: clamp(40px, 7vw, 96px) 0 clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.cv-head h1 { font-size: clamp(48px, 8vw, 104px); }
.cv-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0 clamp(32px, 5vw, 72px); padding-top: 8px; }
.cv-toc { grid-column: 1; grid-row: 1 / span 20; align-self: start; position: sticky; top: 96px; padding-top: 48px; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.cv-toc a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 10px; border-left: 2px solid transparent; }
.cv-toc a:hover { color: var(--ink); background: var(--surface-2); }
.cv-toc a[aria-current] { color: var(--ink); border-left-color: var(--accent); background: var(--surface); }
.cv-layout > section { grid-column: 2; padding: 48px 0; border-bottom: 1px solid var(--line); }
.cv-layout > section:last-of-type { border-bottom: 0; }
.cv-layout h2 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 24px; }
.cv-layout h4 { margin: 18px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cv-layout ul { padding-left: 20px; margin: 6px 0; }
.cv-layout li { margin: 5px 0; }
.cv-layout li::marker { color: var(--accent); }
.prose p { max-width: 42em; }
.prose p:first-of-type { font: 400 clamp(21px, 2.2vw, 25px)/1.45 var(--display); letter-spacing: -.01em; }

/* Erhvervserfaring som et nummereret register */
.jobs { list-style: none; padding: 0; margin: 0; counter-reset: job; }
.job { counter-increment: job; display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 28px; margin: 0; padding: 32px 0; border-top: 1px solid var(--line); }
.job:first-child { border-top: 0; padding-top: 4px; }
.job > * { grid-column: 2; }
.job::before { content: counter(job, decimal-leading-zero); grid-column: 1; grid-row: 1; font: 450 34px/1 var(--display); color: var(--accent); }
.job > .period { grid-column: 1; grid-row: 2 / span 8; margin: 10px 0 0; font-size: 14px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.job h3 { grid-row: 1; margin: 0; font: 450 clamp(24px, 2.6vw, 30px)/1.15 var(--display); letter-spacing: -.015em; }
.org { margin: 4px 0 10px; color: var(--muted); }
.job > p:not(.period):not(.org) { margin: 0 0 4px; }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.columns ul, .job > ul { font-size: 16px; }

.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 40px; }
.skills h3 { margin: 22px 0 6px; }
.skills > div > h3:first-child { margin-top: 0; }
.terms { margin: 0; }
.terms div { padding: 9px 0; border-bottom: 1px solid var(--line); }
.terms dt { display: inline; font-weight: 600; }
.terms dt::after { content: " – "; font-weight: 400; color: var(--muted); }
.terms dd { display: inline; margin: 0; color: var(--muted); }
.timeline { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px 20px; margin: 0; }
.timeline dt { color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline dd { margin: 0; }
.tags { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { margin: 0; padding: 5px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; }
.cv-layout .tags li::marker { content: none; }

/* Læseforløb øverst i CV'et (ren CSS, styrer ikke rulningen) */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 30; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); display: none; }

.site-footer { margin-top: clamp(64px, 9vw, 120px); padding: 28px 0 40px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--ink); }

.page-head { padding: clamp(56px, 10vw, 140px) 0 0; }

/* Bevægelse kun for dem, der ikke har slået den fra */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  @supports (animation-timeline: view()) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
    @keyframes reveal { from { opacity: 0; transform: translateY(28px) scale(.98); } to { opacity: 1; transform: none; } }
  }
  @supports (animation-timeline: scroll()) {
    .progress { display: block; animation: progress linear both; animation-timeline: scroll(root); }
    @keyframes progress { to { transform: scaleX(1); } }
  }
  .hero > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .hero > :nth-child(2) { animation-delay: .12s; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  *, .tile:hover, .btn:hover { transition: none !important; transform: none !important; }
}

/* Responsivt */
@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cv-layout { grid-template-columns: minmax(0, 1fr); }
  .cv-toc { grid-row: auto; position: sticky; top: 76px; z-index: 10; flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 4px; padding: 10px 0; margin: 0 calc(-1 * clamp(16px, 4vw, 40px)); padding-inline: clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .cv-toc a { flex: none; border-left: 0; border-radius: 999px; padding: 6px 14px; }
  .cv-toc a[aria-current] { background: var(--ink); color: var(--bg); }
  .cv-layout > section { grid-column: 1; }
  html { scroll-padding-top: 140px; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); align-items: start; padding-top: 40px; }
  .portrait { order: -1; max-width: 300px; }
  .contact-card { grid-template-columns: minmax(0, 1fr); }
  .columns, .skills { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .bar { padding-left: 12px; }
  .brand .name { display: none; }
  .site-nav a { padding: 8px 12px; }
  .results { grid-template-columns: minmax(0, 1fr); }
  .results .wide { grid-column: auto; }
  .tile.now { grid-column: 1 / -1; grid-row: auto; }
  .stat { min-height: 150px; }
  .job { grid-template-columns: minmax(0, 1fr); }
  .job::before, .job > *, .job > .period { grid-column: 1; grid-row: auto; }
  .job::before { font-size: 26px; margin-bottom: 6px; }
  .job > .period { margin: 0 0 4px; }
  .timeline { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .timeline dd { margin-bottom: 10px; }
  .contact-list .copy { margin-left: 0; }
}

@media print {
  :root, :root[data-theme="dark"] { --bg: #fff; --surface: #fff; --surface-2: #f3f3f3; --ink: #000; --muted: #333; --line: #ccc; --accent: #000; color-scheme: light; }
  body { font-size: 10.5pt; line-height: 1.45; }
  .site-header, .site-footer, .cv-toc, .actions, .progress { display: none !important; }
  .wrap { width: 100%; }
  .cv-head { padding: 0 0 10pt; }
  .cv-head h1 { font-size: 30pt; }
  .cv-layout { display: block; }
  .cv-layout > section { padding: 12pt 0; }
  .job { break-inside: avoid; padding: 10pt 0; }
  .reveal { animation: none !important; opacity: 1 !important; transform: none !important; }
  a { color: inherit; text-decoration: none; }
}
