/* Crescentia Jung — site styles
   Colors are drawn from the blue background of photo.jpg. */

:root {
  --bg: #ffffff;
  --ink: #2a2f33;
  --muted: #5a646b;       /* 6.0:1 on white */
  --accent: #2c6587;      /* (theme) links, 6.3:1 on white */
  --accent-soft: #e3f0f7; /* (theme) pill fills, sampled from photo background */
  --accent-mid: #a9d0e4;  /* (theme) dots and photo ring */
  --line: #dcebf3;        /* (theme) dividers */
  --focus: #2c6587;
  --max: 62rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161c20;
    --ink: #eef3f6;
    --muted: #b3bec5;
    --accent: #a3d2ea;
    --accent-soft: #22323c;
    --accent-mid: #4f7f99;
    --line: #2a3640;
    --focus: #a3d2ea;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  line-height: 1.7;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: var(--bg);
  padding: .5rem 1rem;
  border-radius: 999px;
  z-index: 20;
}
.skip:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 3px; }

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

/* Header: sticks to top so section links stay reachable */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}
.brand svg { width: 1.3rem; height: 1.3rem; color: var(--accent); }

nav ul {
  list-style: none;
  display: flex;
  gap: .25rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
nav a {
  display: inline-block;
  padding: .3rem .85rem;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: .95rem;
}
nav a:hover { background: var(--accent-soft); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: center;
  padding: 3rem 0 1rem;
}
@media (min-width: 640px) {
  .hero { grid-template-columns: 16rem 1fr; gap: 3.5rem; }
}
.photo {
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  object-fit: cover;
  color: transparent;
  background: var(--accent-soft);
  border: 5px solid var(--bg);
  box-shadow: 0 0 0 3px var(--accent-mid);
}

h1, h2 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.025em;
}
h1 { font-size: clamp(2.1rem, 6vw, 2.8rem); margin: 0 0 .9rem; }
h2 {
  font-size: 1.4rem;
  margin: 3.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
h2::before {
  content: "";
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
  background: var(--accent-mid);
  flex: none;
}

.role {
  margin: 0 0 .35rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
}
.tagline {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.links a {
  display: inline-block;
  padding: .3rem .9rem;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
}
.links a:hover { text-decoration: underline; }

#about p { margin: 0 0 1rem; }

.note { color: var(--muted); font-size: .95rem; margin: 0 0 1rem; }

/* Publications: plain list, one divider per item */
.year {
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 2rem 0 .25rem;
}
.pubs, .plain {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pubs li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.pubs li:last-child { border-bottom: 0; }
.pubs p { margin: 0; }
.pub-title {
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: .3rem !important;
}
.pub-authors {
  font-size: .97rem;
  color: var(--muted);
}
.pub-authors strong { color: var(--ink); }
.pub-venue {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: .4rem !important;
  font-size: .92rem;
  color: var(--muted);
}
.pub-venue a { font-weight: 600; }

.tag {
  display: inline-block;
  padding: 0 .6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: .82rem;
  font-weight: 600;
}

/* Awards */
.plain li {
  display: flex;
  gap: 1rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--line);
}
.plain li:last-child { border-bottom: 0; }
.when {
  flex: none;
  width: 6.5rem;
  color: var(--muted);
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) {
  .plain li { flex-direction: column; gap: 0; }
}

footer {
  margin: 4.5rem auto 2.5rem;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}
footer svg { width: 1rem; height: 1rem; vertical-align: -2px; color: var(--accent); }
