/* ------------------------------------------------------------------ *
 *  Sebastian Neumaier — personal site
 *  Minimalist static stylesheet, system fonts, light + dark themes.
 * ------------------------------------------------------------------ */

:root {
  --bg:        #fbfbfa;
  --surface:   #ffffff;
  --fg:        #18181b;
  --muted:     #6b7280;
  --faint:     #9ca3af;
  --accent:    #1f6f8b;
  --accent-bg: #eaf2f5;
  --border:    #ececec;
  --maxw:      46rem;
  --radius:    10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0e0f11;
    --surface:   #16181b;
    --fg:        #e7e7e9;
    --muted:     #9aa1ab;
    --faint:     #6b7280;
    --accent:    #5cbed4;
    --accent-bg: #14242a;
    --border:    #25282d;
  }
}

* { box-sizing: border-box; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  margin: 0;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem 4rem;
}

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

::selection { background: var(--accent-bg); }

/* ---- Header ---- */
header { margin-bottom: 1.5rem; }

header h1 {
  font-size: clamp(1.85rem, 5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  line-height: 1.1;
}

header .role {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}
header .role .sep { color: var(--faint); margin: 0 0.4rem; }

/* ---- Nav ---- */
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
  margin: 1.75rem 0 2.75rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
nav a { color: var(--muted); }
nav a:hover { color: var(--fg); text-decoration: none; }
nav a.active { color: var(--fg); font-weight: 600; }
nav .ext::after {
  content: "↗";
  font-size: 0.7em;
  margin-left: 0.15em;
  color: var(--faint);
}

/* ---- Sections ---- */
section { margin-bottom: 3rem; }

h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  font-weight: 600;
  margin: 0 0 1.15rem;
}

.lede { font-size: 1.15rem; line-height: 1.6; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

/* ---- News ---- */
.news { list-style: none; padding: 0; margin: 0; }
.news li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}
.news li:last-child { border-bottom: none; }
.news .date {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  padding-top: 0.05rem;
}

/* ---- Generic stacked list (interests, projects) ---- */
.stack { list-style: none; padding: 0; margin: 0; }
.stack li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.stack li:last-child { border-bottom: none; }
.stack strong { color: var(--fg); font-weight: 600; }
.stack .meta, p .meta { color: var(--muted); }

/* sub-heading within a section */
.subhead {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 0.75rem;
}
.subhead + .subhead,
.stack + .subhead { margin-top: 1.75rem; }

/* ---- Publications ---- */
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.97rem;
  line-height: 1.55;
}
.pub-list li:last-child { border-bottom: none; }
.pub-list .year {
  display: inline-block;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  margin-right: 0.5rem;
}
.pub-list .title { font-weight: 600; }
.pub-list .venue { color: var(--muted); font-style: italic; }
.pub-list .note {
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- Cite (Copy BibTeX) button ---- */
.cite-btn {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.05rem 0.5rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  vertical-align: middle;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.cite-btn:hover { color: var(--accent); border-color: var(--accent); }
.cite-btn.copied { color: #fff; background: var(--accent); border-color: var(--accent); }

/* ---- Callout ---- */
.callout {
  background: var(--accent-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.15rem;
  font-size: 0.95rem;
  margin-bottom: 2.25rem;
}

/* ---- Inline link row ---- */
.links {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap;
  gap: 0.6rem 0.6rem;
}
.links a {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  font-size: 0.9rem;
  background: var(--surface);
}
.links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.more { font-size: 0.95rem; margin-top: 1rem; }

/* ---- Footer ---- */
footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.85rem;
}
footer a { color: var(--muted); }

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .news li { grid-template-columns: 4.6rem 1fr; gap: 0.75rem; }
}
