/* Sebastian Renner — personal academic site */

:root {
  --bg: #fdfdfb;
  --text: #1f2823;
  --muted: #5c6a62;
  --accent: #16655a;
  --accent-soft: #e3efec;
  --rule: #e4e7e3;
  --card: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141816;
    --text: #e8ebe8;
    --muted: #9aa8a0;
    --accent: #5fc2b2;
    --accent-soft: #1e2f2b;
    --rule: #2a322e;
    --card: #191f1c;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 17px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- header / nav ---------- */

header.site {
  border-bottom: 1px solid var(--rule);
}

.site .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  padding-top: 1.4rem;
  padding-bottom: 1.1rem;
}

.site .name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  margin-left: 1.1rem;
  padding-bottom: 0.35rem;
}

nav a:first-child { margin-left: 0; }

nav a:hover { color: var(--accent); }

nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

/* ---------- main ---------- */

main {
  padding: 2.75rem 0 3rem;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
}

h2:first-child { margin-top: 0; }

p { margin-bottom: 1rem; }

a { color: var(--accent); }

a:hover { text-decoration-thickness: 2px; }

/* ---------- home ---------- */

.intro {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.intro-text { flex: 1; }

.portrait {
  width: 175px;
  height: 175px;
  object-fit: cover;
  object-position: 60% 20%;
  border-radius: 50%;
  flex-shrink: 0;
  border: 3px solid var(--accent-soft);
}

.lede {
  font-size: 1.05rem;
}

.contact {
  margin-top: 2.25rem;
  padding: 1.1rem 1.3rem;
  background: var(--accent-soft);
  border-radius: 10px;
  font-size: 0.95rem;
}

.contact .row { display: block; margin: 0.15rem 0; }

.contact strong { font-weight: 600; }

.social {
  margin-top: 0.5rem;
}

.social a {
  margin-right: 1rem;
  font-weight: 500;
}

/* ---------- research ---------- */

.paper {
  margin-bottom: 1.6rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--rule);
}

.paper:last-child { border-bottom: none; }

.paper .title {
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.45;
}

.paper .title a { text-decoration: none; }

.paper .title a:hover { text-decoration: underline; }

.paper .authors {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.15rem;
}

.paper .venue {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
}

.paper details {
  margin-top: 0.55rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.paper details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.88rem;
  list-style: none;
}

.paper details summary::-webkit-details-marker { display: none; }

.paper details summary::before { content: "+ "; }

.paper details[open] summary::before { content: "− "; }

.paper details p { margin-top: 0.45rem; text-align: justify; }

ul.plain {
  list-style: none;
}

ul.plain li {
  margin-bottom: 0.9rem;
  padding-left: 1.1rem;
  position: relative;
}

ul.plain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

ul.plain .authors {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- teaching / cv ---------- */

.course {
  margin-bottom: 1.1rem;
  padding: 0.9rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
}

.course .what { font-weight: 600; }

.course .where { color: var(--muted); font-size: 0.92rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  padding: 0.6rem 1.3rem;
  border-radius: 8px;
  margin: 0.5rem 0 1.5rem;
}

.btn:hover { opacity: 0.9; }

.pdf-frame {
  width: 100%;
  height: 75vh;
  border: 1px solid var(--rule);
  border-radius: 8px;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}

footer .wrap {
  padding-top: 1.2rem;
  padding-bottom: 1.6rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---------- responsive ---------- */

@media (max-width: 620px) {
  html { font-size: 16px; }
  .intro { flex-direction: column-reverse; align-items: center; text-align: left; }
  .portrait { width: 150px; height: 150px; }
  h1 { font-size: 1.7rem; }
  .site .wrap { flex-direction: column; }
  nav a { margin-left: 0; margin-right: 1rem; }
}
