/* Axel Ahrens - personal site. Edit the colour tokens below to re-theme. */
:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --text: #1c2326;
  --muted: #5a6a70;
  --accent: #0f4c5c;
  --accent-2: #e36414;
  --border: #dfe5e6;
  --hero-from: #0b2e38;
  --hero-to: #14596b;
  --maxw: 60rem;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101719;
    --surface: #172124;
    --text: #e6eced;
    --muted: #9fb1b6;
    --accent: #6cc4d6;
    --accent-2: #ff9f5a;
    --border: #28383c;
    --hero-from: #08181c;
    --hero-to: #0f3a46;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; height: auto; }

.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.6rem; }
.brand { white-space: nowrap; flex: none; font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--accent); }
nav ul { list-style: none; display: flex; flex-wrap: nowrap; gap: .25rem 1.1rem; margin: 0; padding: 0; }
nav a { white-space: nowrap; color: var(--muted); text-decoration: none; font-size: .95rem; padding: .35rem 0; border-bottom: 2px solid transparent; }
nav a:hover { color: var(--text); }
nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent-2); }

.nav-toggle { display: none; background: none; border: 0; padding: .6rem; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; transition: .2s; }

/* Hero */
.hero {
  background:
    linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.55)),
    url("/images/hero.jpg") center/cover no-repeat,
    linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: #fff;
  padding: 3.2rem 0 2.6rem;
}
.hero.hero-home { padding: 5rem 0 4rem; }
.hero h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 300; letter-spacing: .01em; }
.hero p { margin: .5rem 0 0; font-size: 1.1rem; opacity: .9; max-width: 40rem; }

/* Content */
.content { padding-top: 2.2rem; padding-bottom: 3rem; }
section { margin-bottom: 2.4rem; }
h2 { font-size: 1.45rem; line-height: 1.3; margin: 0 0 .7rem; }
h3 { font-size: 1.1rem; margin: 0 0 .3rem; }
.lead { font-size: 1.12rem; }

.intro { display: flex; gap: 2rem; align-items: flex-start; }
.portrait { border-radius: var(--radius); object-fit: cover; object-position: center 18%; width: 180px; height: 220px; flex: none; box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.contact-links { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.contact-links a { display: inline-block; padding: .3rem .85rem; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; background: var(--surface); font-size: .95rem; }
.contact-links a:hover { border-color: var(--accent); }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.chips li { padding: .35rem .9rem; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); border-radius: 999px; font-size: .95rem; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; }
.tile { display: block; padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: transform .15s, border-color .15s, box-shadow .15s; }
.tile:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 6px 18px rgba(0,0,0,.08); color: var(--text); }
.tile p { margin: 0; color: var(--muted); font-size: .95rem; }
.tile .date { display: block; margin-bottom: .2rem; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-2); }
.portrait-fig { margin: 0; flex: none; width: 180px; }
.portrait-fig figcaption { margin-top: .35rem; font-size: .625rem; line-height: 1.3; color: var(--muted); }
.portrait-fig figcaption a { color: inherit; }

/* Publications */
.pub-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin: 0 0 1.5rem; }
.pub-filter input { flex: 1 1 14rem; padding: .55rem .8rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.pub-filter .count { color: var(--muted); font-size: .9rem; }
.year { margin: 2rem 0 .6rem; padding-bottom: .3rem; border-bottom: 1px solid var(--border); color: var(--accent); font-size: 1.25rem; }
.pubs { list-style: none; padding: 0; margin: 0; }
.pub { padding: .85rem 0; border-bottom: 1px solid var(--border); }
.pub:last-child { border-bottom: 0; }
.pub .authors { color: var(--muted); font-size: .96rem; }
.pub .authors strong { color: var(--text); }
.pub .ptitle { font-weight: 600; display: block; margin: .1rem 0; }
.pub .venue { font-size: .96rem; }
.pub .tag { display: inline-block; margin-left: .4rem; padding: 0 .5rem; border-radius: 4px; background: var(--accent-2); color: #fff; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; vertical-align: 1px; }
.pub .links { margin-top: .25rem; font-size: .92rem; }
.pub[hidden] { display: none; }
.note { color: var(--muted); font-size: .95rem; }

/* Lists, cards, galleries */
.link-list li { margin: .25rem 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.card { padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card .kind { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-2); font-weight: 700; }
.card p { margin: .3rem 0 .5rem; color: var(--muted); font-size: .95rem; }
.people-list { list-style: none; padding: 0; margin: 0; }
.people-list li { padding: .6rem 0; border-bottom: 1px solid var(--border); }
.people-list li:last-child { border-bottom: 0; }
.people-list .meta { color: var(--muted); font-size: .93rem; display: block; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .8rem; margin-top: 1.2rem; }
.gallery img { width: 100%; height: 11rem; object-fit: cover; border-radius: 8px; display: block; }
.pdf-embed { width: 100%; height: 75vh; border: 1px solid var(--border); border-radius: 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 1.6rem 0; color: var(--muted); font-size: .9rem; }
.site-footer p { margin: .2rem 0; }

/* Mobile */
@media (max-width: 760px) {
  .intro { flex-direction: column; }
  .hero.hero-home { padding: 3.5rem 0 3rem; }
}
/* The seven menu items need about 900px; below that use the hamburger menu */
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--border); padding: .5rem 1.25rem 1rem; }
  nav.open { display: block; }
  nav ul { flex-direction: column; gap: 0; }
  nav a { display: block; padding: .6rem 0; }
  .site-header .bar { position: relative; }
}
@media print {
  .site-header, .hero, .site-footer, .pub-filter { display: none; }
  body { background: #fff; color: #000; }
}
