/* palsgaard.net
   Forside og CV er det professionelle udtryk (standard).
   html.hobby er app-delen om orienteringsløb med kortets farver og højdekurver. */
:root {
  color-scheme: light dark;
  --paper: #FFFFFF; --surface: #FFFFFF; --surface2: #F2F5F8; --text: #1B2430; --muted: #55606E;
  --accent: #1F5A96; --accent-bright: #1F5A96; --line: #DCE2E9;
  --band: #13263F; --band-text: #F4F6F9; --band-muted: #C3CEDB;
  --serif: "Palatino Linotype", Palatino, "Iowan Old Style", "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1620; --surface: #17212D; --surface2: #1D2935; --text: #E8EDF3; --muted: #AEB9C6;
    --accent: #8DBBEA; --accent-bright: #8DBBEA; --line: #2B3847;
    --band: #17263A; --band-text: #F4F6F9; --band-muted: #C3CEDB;
  }
}
.hobby {
  --paper: #FFFCF5; --surface: #FFFFFF; --surface2: #F3ECE2; --text: #241F19; --muted: #5B4F43;
  --accent: #C4480A; --accent-bright: #E8590C; --accent-soft: #FFDBCB;
  --forest: #2E7D32; --forest-soft: #C8E6C9;
  --error: #B3261E; --error-soft: #F9DEDC;
  --line: #E4D8C8;
}
@media (prefers-color-scheme: dark) {
  .hobby {
    --paper: #14130F; --surface: #1E1C17; --surface2: #2B2821; --text: #EDE6DC; --muted: #D3C6B6;
    --accent: #FF8A4C; --accent-bright: #FF8A4C; --accent-soft: #7A2E00;
    --forest: #81C784; --forest-soft: #1B5E20;
    --error: #F2B8B5; --error-soft: #601410;
    --line: #3A352C;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-anchor: none; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 17px/1.6 var(--sans); }
.hobby body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("/assets/contours.svg") center / cover no-repeat; opacity: .4;
}
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
img { max-width: 100%; height: auto; }
[id] { scroll-margin-top: 16px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 880px; }

/* Sidehoved */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.hobby .site-header { background: color-mix(in srgb, var(--paper) 88%, transparent); }
.site-header .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 22px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 20px/1.2 var(--serif); color: var(--text); text-decoration: none; margin-right: auto; }
.flag { display: block; flex: none; width: 22px; height: 22px; border: 1.5px solid var(--muted); background: linear-gradient(to bottom right, #fff 50%, var(--accent-bright) 50%); }
.site-nav { display: flex; gap: 20px; }
.site-nav a { color: var(--text); text-decoration: none; font-size: 16px; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-color: var(--line); }
.site-nav a[aria-current="page"] { border-color: var(--accent-bright); }

/* Sprog (kun app-delen) */
.lang-switch { display: flex; gap: 4px; }
.lang-switch a {
  text-decoration: none; color: var(--text); border: 1px solid var(--line);
  padding: 2px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--surface);
}
.lang-switch a[aria-current="true"] { background: var(--text); border-color: var(--text); color: var(--paper); }
html:not([data-lang]) .lang-switch { display: none; }
html[data-lang="da"] .lang[lang="en"], html[data-lang="en"] .lang[lang="da"] { display: none; }

/* Typografi */
h1, h2 { font-family: var(--serif); font-weight: 600; line-height: 1.15; }
h1 { margin: 0; font-size: clamp(38px, 6.5vw, 58px); }
h2 { margin: 0 0 14px; font-size: clamp(25px, 3.4vw, 30px); }
h3 { margin: 22px 0 6px; font-size: 18px; font-weight: 650; line-height: 1.3; }
h4 { margin: 14px 0 4px; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: clamp(19px, 2.4vw, 22px); line-height: 1.45; color: var(--muted); margin: 14px 0 0; max-width: 36em; }
.eyebrow { margin: 0 0 12px; font-size: 14px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
ul, ol { padding-left: 22px; margin: 8px 0; }
li { margin: 4px 0; }

/* Mørkt bånd øverst på forside og CV */
.band { background: var(--band); color: var(--band-text); }
.band .eyebrow { color: var(--band-muted); }
.band .lead { color: var(--band-muted); }
.band a:not(.btn) { color: var(--band-text); }
.btn {
  display: inline-block; padding: 10px 22px; border-radius: 3px; font: 600 16px/1.4 var(--sans); text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--band-muted); color: var(--band-text); background: transparent;
}
.btn:hover { border-color: var(--band-text); background: rgba(255,255,255,.08); }
.btn.primary { background: var(--band-text); border-color: var(--band-text); color: var(--band); }
.btn.primary:hover { background: #fff; border-color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.hero { padding: 64px 0; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 56px; align-items: center; }
.hero-photo { margin: 0; }
.hero-photo img { display: block; width: 100%; border-radius: 2px; }

.page-band { padding: 48px 0 40px; }
.page-band h1 { font-size: clamp(34px, 5.5vw, 48px); }
.page-band .wrap > .actions { margin-top: 20px; }

/* Nøgletal */
.figures { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-bottom: 1px solid var(--line); }
.figures div { padding: 24px 18px 24px 0; }
.figures div + div { border-left: 1px solid var(--line); padding-left: 18px; }
.figures dt { font: 600 clamp(27px, 3.6vw, 34px)/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.figures dd { margin: 6px 0 0; font-size: 15px; line-height: 1.35; color: var(--muted); }

/* Afsnit med overskrift i venstre spalte */
.section { padding: 44px 0; }
.section + .section { border-top: 1px solid var(--line); }
.split { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 8px 40px; }
.split > h2 { margin: 0; }
.split > div > :first-child { margin-top: 0; }
.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
.results h3 { margin: 0 0 4px; }
.results p { margin: 0; color: var(--muted); font-size: 16px; }
.role-title { margin: 0 0 2px; font-size: 20px; font-weight: 650; }
.role-meta { margin: 0 0 12px; color: var(--muted); }
.quote { margin: 0; font: 400 clamp(21px, 2.8vw, 26px)/1.35 var(--serif); }
.quote-note { margin: 14px 0 0; color: var(--muted); }
.contact { list-style: none; padding: 0; margin: 0; }
.contact li { margin: 6px 0; }
.contact span { display: inline-block; min-width: 6em; color: var(--muted); }
.aside-note { color: var(--muted); }

/* CV */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.cv-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.cv-nav a { color: var(--text); text-decoration: none; }
.cv-nav a:hover { color: var(--accent); text-decoration: underline; }
.jobs { list-style: none; padding: 0; margin: 20px 0 0; }
.job { display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: 28px; margin: 0; padding: 26px 0; border-top: 1px solid var(--line); }
.job:first-child { border-top: 0; padding-top: 0; }
.job > * { grid-column: 2; }
.job > .period { grid-column: 1; grid-row: 1 / span 8; margin: 3px 0 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.job h3 { margin: 0 0 2px; font-size: 21px; }
.org { margin: 0 0 8px; 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: 0 40px; }
.skills h3 { margin-top: 18px; }
.skills > div > h3:first-child { margin-top: 0; }
.terms { margin: 0; }
.terms div { padding: 7px 0; border-bottom: 1px solid var(--line); }
.terms dt { font-weight: 600; display: inline; }
.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: 140px minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.timeline dt { font-variant-numeric: tabular-nums; color: var(--muted); }
.timeline dd { margin: 0; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { margin: 0; background: var(--surface2); padding: 2px 11px; border-radius: 3px; font-size: 15px; }

/* App-delen (hobby) */
.page-head { padding: 44px 0 8px; }
.page-head h1 { font-size: clamp(34px, 6vw, 52px); }
.hobby .toc a {
  text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  padding: 5px 12px; border-radius: 999px; font-size: 15px;
}
.hobby .toc a:hover { border-color: var(--accent-bright); color: var(--accent); }
.hobby .toc a[aria-current="page"] { background: var(--text); border-color: var(--text); color: var(--paper); }

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 18px; list-style: none; padding: 0; margin: 24px 0 0; }
.app-grid > li { margin: 0; }
.app-card {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px;
}
.app-card img { display: block; width: 76px; height: 76px; border-radius: 18px; }
.app-card h2 { font-size: 24px; margin: 0 0 4px; }
.app-card h2 a { color: inherit; text-decoration: none; }
.app-card h2 a:hover { color: var(--accent); }
.app-card p { margin: 0 0 8px; }
.app-meta { font-size: 15px; color: var(--muted); }
.app-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 16px; }

.app-hero { display: flex; align-items: center; gap: 20px; padding: 36px 0 6px; }
.app-hero img { width: 88px; height: 88px; border-radius: 20px; flex: none; }
.app-hero h1 { font-size: clamp(32px, 6vw, 46px); }
.app-hero .lead { margin-top: 6px; font-size: 19px; }
.crumb { margin: 18px 0 0; font-size: 15px; color: var(--muted); }

/* Vejledningens kort (samme opbygning som SI Startinfos oprindelige side) */
section.card {
  background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--line);
  border-radius: 20px; padding: 20px 22px; margin: 16px 0; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
section.card h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 700 22px/1.2 var(--sans); color: var(--accent); }
section.card h2::before { content: ""; flex: none; width: 4px; height: 20px; border-radius: 2px; background: var(--accent-bright); }
section.card h3 { margin: 18px 0 6px; font: 700 18px/1.3 var(--sans); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; margin-top: 10px; }
.tile { background: var(--surface2); border-radius: 14px; padding: 12px 14px; }
.tile b { display: block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tile span { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile span.big { font-size: 30px; color: var(--accent); }
.chip { display: inline-block; border-radius: 999px; padding: 2px 12px; font-weight: 600; font-size: 15px; }
.chip.started { background: var(--forest-soft); }
.chip.late { background: var(--accent-soft); }
.warn { background: var(--error-soft); color: var(--error); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.note { border-left: 4px solid var(--forest); background: var(--surface2); padding: 10px 14px; border-radius: 0 12px 12px 0; margin: 12px 0; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }
code { background: var(--surface2); padding: 1px 6px; border-radius: 6px; font-size: .92em; overflow-wrap: anywhere; }
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; margin-top: 12px; }
.demo .name { font-size: clamp(24px, 5vw, 34px); font-weight: 800; line-height: 1.15; margin-bottom: 8px; }
.demo .bar { height: 6px; border-radius: 3px; background: var(--accent-bright); margin-top: 12px; }
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0 4px; }
.shots figure { margin: 0; }
.shots img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.shots figcaption { font-size: 14px; line-height: 1.35; color: var(--muted); margin-top: 6px; }
.shots.wide { grid-template-columns: repeat(2, 1fr); }

/* Sidefod */
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); padding: 20px 0 28px; font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 4px 20px; justify-content: space-between; }
.site-footer p { margin: 0; }

@media (max-width: 800px) {
  .hero { padding: 40px 0; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-photo { max-width: 200px; order: -1; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .figures div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .figures div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .split, .results, .columns, .skills { grid-template-columns: minmax(0, 1fr); }
  .split { gap: 14px; }
}
@media (max-width: 640px) {
  .shots { grid-template-columns: repeat(2, 1fr); }
  .shots.wide { grid-template-columns: minmax(0, 1fr); }
  .job { grid-template-columns: minmax(0, 1fr); }
  .job > *, .job > .period { grid-column: 1; grid-row: auto; }
  .job > .period { margin: 0 0 4px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hobby .brand { margin-right: 0; width: 100%; }
  section.card { padding: 16px; }
  .timeline { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .timeline dd { margin-bottom: 8px; }
  .app-hero img { width: 64px; height: 64px; border-radius: 14px; }
  .app-card { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  :root { color-scheme: light; --paper: #fff; --surface: #fff; --surface2: #f2f2f2; --text: #000; --muted: #333; --accent: #000; --line: #ccc; --band: #fff; --band-text: #000; --band-muted: #333; }
  body { font-size: 10.5pt; line-height: 1.45; }
  .site-header, .site-footer, .cv-nav, .actions { display: none !important; }
  .wrap, .wrap.narrow { max-width: none; padding: 0; }
  .page-band { padding: 0 0 8pt; }
  .section { padding: 12pt 0; }
  .job { break-inside: avoid; padding: 10pt 0; }
  a { color: inherit; text-decoration: none; }
}
