/* frederikholtel.com — single stylesheet, no build step, no external fonts. */

:root {
  --bg: #fbfaf7;
  --surface: #f3f1ec;
  --text: #1d1e1c;
  --muted: #62665f;
  --rule: #e2dfd7;
  --accent: #1f6a50;
  --accent-strong: #154d3a;

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

  --measure: 46rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131513;
    --surface: #1b1e1b;
    --text: #e7e5df;
    --muted: #a2a69f;
    --rule: #2c302c;
    --accent: #7cc8a7;
    --accent-strong: #a3dcc3;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-strong);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

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

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.1rem;
}

.site-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.site-name:hover {
  color: var(--accent);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ---------- Main ---------- */

main {
  padding: 3rem 0 4rem;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

h1 {
  font-size: 2.2rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.005em;
}

h2 {
  font-size: 1.35rem;
  margin: 3rem 0 1.25rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
}

h3 {
  font-size: 1.08rem;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.muted {
  color: var(--muted);
}

/* ---------- Home ---------- */

.intro {
  display: flow-root; /* contains the floated photo */
}

.portrait {
  float: right;
  width: 15rem;
  margin: 0.35rem 0 1.25rem 2.25rem;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 8px 24px -12px rgb(0 0 0 / 0.25);
}

.intro h1 {
  margin-bottom: 0.25rem;
}

.intro .role {
  color: var(--muted);
  margin: 0;
}

.intro .contact-links {
  margin: 0.9rem 0 1.75rem;
}

.contact-links {
  margin-top: 0.9rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
}

.contact-links a:hover span {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.contact-links svg {
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
  flex: none;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.1rem 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Dated lists (news, CV, talks) ---------- */

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline > li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1.25rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
}

.timeline > li:first-child {
  border-top: 0;
  padding-top: 0;
}

.timeline .when {
  color: var(--muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  padding-top: 0.15rem;
}

.timeline .what p {
  margin: 0;
}

.timeline .what .sub {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Work list (research, publications) ---------- */

.works {
  margin: 0;
  padding: 0;
  list-style: none;
}

.works > li {
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}

.works > li:first-child {
  border-top: 0;
  padding-top: 0;
}

.works .title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.2rem;
}

.works .authors,
.works .venue {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.works .venue em {
  color: var(--text);
}

.works .links {
  margin: 0.5rem 0 0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
}

.pill:hover {
  border-color: var(--accent);
}

.me {
  color: var(--text);
  font-weight: 600;
}

/* ---------- CV ---------- */

.cv-contact {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.35rem 1.25rem;
  margin: 0;
}

.cv-contact dt {
  color: var(--muted);
  font-size: 0.88rem;
  padding-top: 0.15rem;
}

.cv-contact dd {
  margin: 0;
}

/* ---------- Blog ---------- */

.post-link {
  color: var(--text);
  text-decoration: none;
}

.post-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.post-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.post-meta a {
  color: inherit;
}

.post h1 {
  font-size: 1.9rem;
  margin-bottom: 2rem;
}

.post figure {
  margin: 0 0 2rem;
}

.post figure img {
  margin: 0 auto;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
}

.post figcaption {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 0.6rem;
}

.options {
  padding-left: 1.4rem;
  margin: 0 0 1.5rem;
}

.options > li {
  margin-bottom: 1.25rem;
}

.options > li::marker {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--accent);
}

.options h3 {
  margin-bottom: 0.2rem;
}

.options p {
  margin-bottom: 0.4rem;
}

.proscons {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.proscons li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.2rem;
}

.proscons li::before {
  position: absolute;
  left: 0;
  font-weight: 700;
}

.proscons .pro::before {
  content: "+";
  color: var(--accent);
}

.proscons .con::before {
  content: "−";
  color: #b4533c;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer a {
  color: inherit;
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer .wrap {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

/* ---------- Small screens ---------- */

@media (max-width: 40rem) {
  body {
    font-size: 1rem;
  }

  main {
    padding: 2rem 0 3rem;
  }

  h1 {
    font-size: 1.85rem;
  }

  .portrait {
    float: none;
    width: 100%;
    max-width: 16rem;
    margin: 0 0 1.5rem;
  }

  .timeline > li,
  .cv-contact {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .cv-contact dd {
    margin-bottom: 0.5rem;
  }
}

@media print {
  .site-header,
  .site-footer {
    display: none;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
