/* Stefan Dietrich — personal site
   Monochrome, minimal. Two families: serif for text, sans for utility labels. */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&family=Inter:wght@400;500&display=swap');

:root {
  --ink:   #141414;   /* primary text            */
  --muted: #6a6a6a;   /* secondary text / labels */
  --faint: #9a9a9a;   /* captions                */
  --rule:  #e2e2e2;   /* hairline dividers       */
  --bg:    #ffffff;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 39rem;   /* comfortable reading width */
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---- top navigation ---- */
nav {
  display: flex;
  gap: 1.9rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-bottom: 1.9rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--ink); }

/* ---- header block ---- */
h1 {
  font-weight: 500;
  font-size: 2.35rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.55rem;
}
.subtitle {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 2.4rem;
}

/* ---- headshot ---- */
.headshot {
  width: 132px;
  height: 165px;
  object-fit: cover;
  filter: grayscale(100%);
  float: right;
  margin: 0.5rem 0 1.1rem 1.9rem;
}

/* ---- body text ---- */
p { margin: 0 0 1.15rem; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 0.5px; }
a:hover { color: var(--muted); }

/* ---- research page ---- */
.section-label {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 3.2rem 0 1.4rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--rule);
}
.paper { margin: 0 0 2.4rem; }
.paper h3 {
  font-weight: 600;
  font-size: 1.18rem;
  line-height: 1.3;
  margin: 0 0 0.15rem;
}
.paper .paper-sub {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.35;
  margin: 0 0 0.5rem;
}
.paper .coauthors { color: var(--muted); font-style: italic; margin: 0 0 0.7rem; font-size: 0.98rem; }
.paper .abstract  { color: var(--ink); font-size: 0.98rem; margin: 0 0 0.55rem; }
.paper .links     { font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.02em; }
.paper .links a   { color: #1a3a6b; font-weight: 600; text-decoration: none; margin-right: 1.2rem; }
.paper .links a:hover { color: #0f2547; text-decoration: underline; text-underline-offset: 2px; }

.footer-nav {
  margin-top: 4rem;
  padding-top: 1.9rem;
  border-top: 1px solid var(--rule);
}

/* ---- responsive ---- */
@media (max-width: 30rem) {
  body { font-size: 17px; }
  .wrap { padding: 2.4rem 1.3rem 3.5rem; }
  h1 { font-size: 2rem; }
  .headshot { width: 108px; height: 135px; margin-left: 1.1rem; }
  nav { gap: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

a:focus-visible, nav a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
