/* =========================================================
   frederikbisbjerg.com — design system
   Editorial / premium, dependency-free (system fonts)
   ========================================================= */

:root {
  --bg:        #f7f5f1;   /* warm paper */
  --surface:   #ffffff;
  --ink:       #16181d;   /* near-black text */
  --muted:     #66696f;   /* secondary text */
  --line:      #e4e1d9;   /* hairlines */
  --accent:    #14615a;   /* deep teal */
  --accent-2:  #0e4a44;   /* hover */
  --gold:      #b08d2e;   /* subtle warm highlight */

  --max:    1080px;
  --measure: 64ch;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --space: clamp(1rem, 4vw, 2rem);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-2); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--space); }

section { padding-block: clamp(3rem, 8vw, 5.5rem); }

.rule { border: 0; border-top: 1px solid var(--line); }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; }

h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); }
h3 { font-size: 1.2rem; line-height: 1.25; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}

.lede { font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: var(--muted); max-width: var(--measure); }

p { max-width: var(--measure); }
p + p { margin-top: 1rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.nav { display: flex; gap: clamp(1rem, 3vw, 2rem); align-items: center; }
.nav a { font-size: 0.95rem; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-size: 0.98rem; font-weight: 600;
  padding: .7rem 1.3rem; border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent); color: #fff;
  transition: background .15s ease, transform .05s ease;
}
.btn:hover { background: var(--accent-2); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3.5rem, 10vw, 7rem); }
.hero h1 { margin: 1.2rem 0; max-width: 16ch; }
.hero .lede { margin-bottom: .5rem; }

.hero-grid { display: flex; align-items: center; gap: clamp(1.5rem, 5vw, 3.5rem); }
.hero-copy { flex: 1 1 auto; min-width: 0; }
.hero-portrait {
  flex: 0 0 auto;
  width: 190px; height: 190px;
  border-radius: 50%;
  object-fit: cover; object-position: 50% 30%;
  background: #fff;
  border: 4px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 16px 38px -22px rgba(0,0,0,.45);
}
@media (max-width: 680px) {
  .hero-grid { flex-direction: column-reverse; align-items: flex-start; }
  .hero-portrait { width: 132px; height: 132px; }
}

/* ---------- Credibility strip ---------- */
.facts { border-block: 1px solid var(--line); background: var(--surface); }
.facts .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem 2rem; padding-block: 2.2rem; }
.fact .n { font-family: var(--serif); font-size: 1.9rem; color: var(--ink); line-height: 1; }
.fact .l { font-size: 0.9rem; color: var(--muted); margin-top: .4rem; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-top: 2.5rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.6rem; display: flex; flex-direction: column; gap: .6rem;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); box-shadow: 0 12px 30px -18px rgba(0,0,0,.25); }
.card .tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); font-weight: 600; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--accent); }
.card p { font-size: 0.97rem; color: var(--muted); margin: 0; }
.card .meta { margin-top: auto; font-size: 0.85rem; color: var(--muted); display: flex; gap: .8rem; align-items: center; padding-top: .4rem; }
.card .arrow { color: var(--accent); font-weight: 600; font-size: 0.95rem; }

/* Section heading block */
.shead { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.shead h2 { margin-top: .4rem; }

/* ---------- About / prose ---------- */
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.8rem; }
.prose p, .prose ul { margin-top: 1rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-top: .35rem; max-width: var(--measure); }

/* Timeline */
.timeline { list-style: none; padding: 0; margin-top: 1.5rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1.5rem 1.5rem; max-width: var(--measure); }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .55rem; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.timeline .role { font-weight: 600; }
.timeline .org { color: var(--ink); }
.timeline .when { font-size: 0.85rem; color: var(--muted); display: block; margin-top: .1rem; }

/* ---------- White-paper library (list) ---------- */
.wp-cat { margin-top: 3rem; }
.wp-cat:first-of-type { margin-top: .25rem; }
.wp-list { margin-top: 1rem; }
.wp-item { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.wp-item:last-child { border-bottom: 1px solid var(--line); }
.wp-kicker { font-size: .78rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.wp-kicker .tag { color: var(--gold); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.wp-kicker .sep { opacity: .45; }
.wp-item h3 { margin: .5rem 0 .5rem; font-size: 1.35rem; line-height: 1.2; }
.wp-item h3 a { color: var(--ink); }
.wp-item h3 a:hover { color: var(--accent); }
.wp-item > p { color: var(--muted); margin: 0 0 .85rem; font-size: 1rem; max-width: 66ch; }
.wp-actions { display: flex; gap: 1.1rem; align-items: center; font-size: .92rem; }
.wp-actions .sep { color: var(--muted); opacity: .45; }
.wp-actions a[download] { color: var(--muted); }
.wp-actions a[download]:hover { color: var(--ink); }

/* ---------- White-paper article ---------- */
.wp-meta { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; margin-top: 1.4rem; font-size: .9rem; color: var(--muted); }
.wp-meta .dot { opacity: .5; }
.article-body { margin-top: 0.5rem; }
.article-body h2 { margin-top: 2rem; font-size: 1.4rem; }
.article-body > h2:first-child, .article-body > h3:first-child, .article-body > p:first-child { margin-top: 0; }
.article-body h3 { margin-top: 1.5rem; font-size: 1.12rem; }

/* Article title (white papers) — more modest than the home hero */
.wp-hero h1 { font-size: clamp(1.65rem, 4.2vw, 2.4rem); margin: .6rem 0 .55rem; }
.wp-hero .lede { font-size: clamp(1.02rem, 2vw, 1.18rem); }
.article-body p, .article-body ul, .article-body ol { margin-top: 1rem; }
.article-body ul, .article-body ol { padding-left: 1.3rem; }
.article-body li { margin-top: .4rem; max-width: var(--measure); }
.article-body strong { color: var(--ink); }
.wp-table { width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: .94rem; display: block; overflow-x: auto; }
.wp-table th, .wp-table td { border: 1px solid var(--line); padding: .55rem .75rem; text-align: left; vertical-align: top; }
.wp-table th { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); font-weight: 600; }
.backlink { display: inline-block; margin-bottom: 1rem; font-size: .9rem; }

/* ---------- Latest from LinkedIn ---------- */
.li-section { background: var(--surface); border-top: 1px solid var(--line); }
.li-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, 1fr); margin-top: 2.5rem; }
.li-card {
  display: flex; flex-direction: column; gap: .7rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.5rem 1.6rem; color: var(--ink);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.li-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); box-shadow: 0 12px 30px -18px rgba(0,0,0,.25); color: var(--ink); }
.li-date { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-weight: 600; }
.li-text { font-family: var(--serif); font-size: 1.08rem; line-height: 1.45; color: var(--ink); margin: 0; max-width: none; }
.li-foot { margin-top: auto; padding-top: .3rem; display: flex; flex-wrap: wrap; gap: .5rem .8rem; align-items: baseline; justify-content: space-between; }
.li-stats { font-size: .82rem; color: var(--muted); }
.li-read { font-size: .9rem; font-weight: 600; color: var(--accent); }
.li-card:hover .li-read { color: var(--accent-2); }
@media (max-width: 720px) { .li-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; padding-block: 2.2rem; }
.site-footer .links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); font-size: 0.95rem; }
.site-footer a:hover { color: var(--ink); }
.site-footer .copy { font-size: 0.85rem; color: var(--muted); }

/* ---------- Utilities ---------- */
.center { text-align: center; }
.muted { color: var(--muted); }
.note { background: color-mix(in srgb, var(--gold) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 30%, var(--line)); border-radius: 12px; padding: 1.1rem 1.3rem; font-size: 0.95rem; color: var(--ink); }
.note strong { color: var(--ink); }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .nav { gap: 1rem; }
  .nav a.hide-sm { display: none; }
}
