/* ============================================================
   Jakob Molinder — personal academic site
   Single stylesheet. No external dependencies, no tracking.
   Layout: fixed sidebar (desktop) → stacked banner (mobile).
   ============================================================ */

:root {
  --bg:      #ffffff;
  --text:    #23201c;
  --muted:   #6d675e;
  --accent:  #4a4a4a;
  --accent-hover: #1c1c1c;
  --rule:    #e6e6e6;
  --rule-strong: #cfcac3;
  --on-accent:#ffffff;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 680px;
  --sidebar-w: 260px;
  color-scheme: light;
}

/* Light theme only — always white background, regardless of the OS dark-mode setting. */

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* ---------- layout ---------- */
.layout {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- sidebar ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  align-self: flex-start;
  padding: 2.6rem 0 2rem;
}
.sidebar__photo {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 22%;
  border: 1px solid var(--rule);
  margin-bottom: 1.2rem;
}
.sidebar__name {
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 .5rem;
  letter-spacing: -0.01em;
}
.sidebar__name a { color: inherit; }
.sidebar__name a:hover { color: inherit; text-decoration: none; }
.sidebar__title {
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 1.3rem;
}
.sidebar__title .role { color: var(--text); font-weight: 500; }

/* nav */
.nav { margin: 0 0 1.4rem; }
.nav a {
  display: block;
  font-size: 1rem;
  padding: .28rem 0;
  color: var(--text);
  border: 0;
}
.nav a:hover { color: var(--accent); text-decoration: none; }
.nav a.is-active {
  position: relative;
  color: var(--accent);
  font-weight: 600;
}
.nav a.is-active::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 50%;
  width: 14px;
  height: 1px;
  background: var(--accent);
}

.sidebar__divider { border: 0; border-top: 1px solid var(--rule); margin: 1.2rem 0; }

/* link list */
.links { list-style: none; margin: 0; padding: 0; }
.links li { margin: 0; }
.links a {
  display: inline-block;
  font-size: .9rem;
  padding: .2rem 0;
  color: var(--muted);
}
.links a:hover { color: var(--accent); text-decoration: none; }
.links a .ext { font-size: .72em; opacity: .7; margin-left: 2px; }

/* ---------- content ---------- */
.content {
  flex: 1 1 auto;
  min-width: 0;
  max-width: var(--maxw);
  padding: 2.6rem 0 5rem;
}
.content > *:first-child { margin-top: 0; }

.lead {
  font-size: 1.12rem;
  line-height: 1.7;
}
.lead p:first-child { margin-top: 0; }

/* research-interests line */
.tags {
  margin: .1rem 0 0;
  font-size: .95rem;
  color: var(--muted);
}
.tags .label { color: var(--text); font-weight: 600; }

/* persistent, subtle underline for in-prose links (nav/pills stay clean) */
.lead a, .news a, .selected a, .contact-block a, .dataset p a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule-strong);
}
.lead a:hover, .news a:hover, .selected a:hover,
.contact-block a:hover, .dataset p a:hover { text-decoration-color: var(--accent); }

h1.page-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 1.4rem;
}

.section { margin-top: 2.8rem; }
.section__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  margin: 0 0 1.1rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--rule);
  letter-spacing: -0.01em;
}
.section__more {
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
}

/* news feed */
.news { list-style: none; margin: 0; padding: 0; }
.news li {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: .9rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--rule);
}
.news li:last-child { border-bottom: 0; }
.news .yr {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: .9rem;
  padding-top: .05rem;
}
.news .what { font-size: .98rem; }

/* publications */
.pub-group { margin-top: 2.4rem; }
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub {
  padding: .95rem 0;
  border-bottom: 1px solid var(--rule);
}
.pub:last-child { border-bottom: 0; }
.pub .title { font-weight: 600; }
.pub .authors { color: var(--text); }
.pub .authors strong { font-weight: 500; } /* own name stays findable but titles carry the bold */
.pub .venue { color: var(--muted); font-style: italic; }
.pub .yr { color: var(--muted); }
.pub-links {
  margin-top: .35rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.pub-links a {
  font-size: .8rem;
  padding: .16rem .6rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  line-height: 1.6;
}
.pub-links a:hover,
.pub-links a:focus-visible { background: var(--accent); color: var(--on-accent); border-color: var(--accent); text-decoration: none; }

/* selected pubs (compact) */
.selected { list-style: none; margin: 0; padding: 0; }
.selected li { padding: .5rem 0; border-bottom: 1px solid var(--rule); font-size: .98rem; }
.selected li:last-child { border-bottom: 0; }
.selected .venue { color: var(--muted); font-style: italic; }

/* datasets */
.dataset {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--rule);
}
.dataset:last-child { border-bottom: 0; }
.dataset h2 { font-family: var(--serif); font-size: 1.2rem; margin: .2rem 0 .35rem; }
.dataset p { margin: .3rem 0 .6rem; font-size: .96rem; }
.dataset .files { display: flex; flex-wrap: wrap; gap: .5rem; }
.dataset .files a {
  font-size: .82rem;
  padding: .2rem .7rem;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  color: var(--accent);
}
.dataset .files a:hover,
.dataset .files a:focus-visible { background: var(--accent); color: var(--on-accent); border-color: var(--accent); text-decoration: none; }

/* contact */
.contact-block { margin-bottom: 1.8rem; }
.contact-block h2 { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 .3rem; }
.contact-block p { margin: .15rem 0; color: var(--text); }
.contact-block .muted { color: var(--muted); }

/* misc */
p { margin: 0 0 1rem; }
strong { font-weight: 600; }
.footer {
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-size: .82rem;
  color: var(--muted);
}

/* skip link */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--on-accent); padding: .5rem .9rem; border-radius: 0 0 6px 0; z-index: 10;
}
.skip:focus { left: 0; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .layout { display: block; padding: 0 1.3rem; }
  .sidebar {
    width: auto;
    flex: none;
    padding: 2rem 0 1.4rem;
    text-align: center;
    border-bottom: 1px solid var(--rule);
  }
  .sidebar__photo { margin: 0 auto 1.1rem; width: 150px; height: 150px; }
  .sidebar__title { margin-bottom: 1.2rem; }
  .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .3rem 1.3rem;
    margin-bottom: 1.2rem;
  }
  .nav a { padding: .2rem 0; }
  .nav a.is-active::before { display: none; }
  .sidebar__divider { display: none; }
  .links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .35rem 1.1rem;
    margin-top: .3rem;
  }
  .links a { padding: .55rem 0; } /* ~44px touch targets */
  .nav a { padding: .45rem 0; }
  .content { padding: 2.2rem 0 3.5rem; max-width: none; }
  .news li { grid-template-columns: 3rem 1fr; }
}

@media (max-width: 460px) {
  body { font-size: 16px; }
  .layout { padding: 0 1rem; }
  .sidebar__photo { width: 120px; height: 120px; }
  .links a { font-size: .85rem; }
}
