/* Gene Chen — personal page. Accent colours match resume.tex. */

:root {
  --accent: #23637E;
  --accent-soft: rgba(35, 99, 126, 0.55);
  --muted: #5F6B73;
  --text: #1d2428;
  --bg: #ffffff;
  --measure: 42rem;
}

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

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

body {
  margin: 0;
  padding: 0 1rem;
  background: var(--bg);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* Single centred column */
.site-header,
main,
.site-footer {
  max-width: var(--measure);
  margin-inline: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- header ---------- */
.site-header { padding-top: 2rem; }

.name {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.15;
}

.site-header nav {
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--accent-soft);
}
.site-header ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-header nav a {
  display: inline-block;
  padding: 0.25rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}
.site-header nav a:hover { text-decoration: underline; }

/* ---------- sections ---------- */
section { scroll-margin-top: 1rem; margin-top: 2.25rem; }

h2 {
  margin: 0 0 0.9rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--accent-soft);
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h3 {
  margin: 0;
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1.35;
}

p { margin: 0 0 0.9rem; }

.lede {
  font-size: 1.15rem;
  line-height: 1.5;
}

/* ---------- research entries ---------- */
.entry { margin-bottom: 1.6rem; }
.entry p:last-child { margin-bottom: 0; }

.meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.1rem 1rem;
  margin: 0.15rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.context { font-style: italic; flex: 1 1 18rem; }
.dates { white-space: nowrap; }

/* ---------- publications, talks, contact ---------- */
.pubs {
  margin: 0;
  padding-left: 1.4rem;
}
.pubs li { margin-bottom: 0.9rem; }
.pubs li::marker { color: var(--accent); font-weight: 700; }
.links { display: block; font-size: 0.95rem; }

.talks,
.contact {
  margin: 0;
  padding: 0;
  list-style: none;
}
.talks li { margin-bottom: 1rem; }
.talks p { margin-bottom: 0.1rem; }
.talk-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 0.6rem;
  font-size: 1.02rem;
}

.tag {
  display: inline-block;
  padding: 0 0.5rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact li { margin-bottom: 0.3rem; }
.label {
  display: inline-block;
  min-width: 4.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.button {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border: 2px solid var(--accent);
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--accent); color: #fff; }

/* ---------- unconfirmed details; delete the <mark> in index.html once confirmed ---------- */
mark.todo {
  padding: 0 0.3rem;
  border-radius: 3px;
  background: #fff1b8;
  color: #5a4300;
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 600;
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 3rem;
  padding: 1rem 0 2rem;
  border-top: 1px solid var(--accent-soft);
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer p { margin: 0; }

/* ---------- small screens ---------- */
@media (max-width: 30rem) {
  body { font-size: 1rem; }
  .site-header { padding-top: 1.25rem; }
  .name { font-size: 1.6rem; letter-spacing: 0.1em; }
  .lede { font-size: 1.08rem; }
  .context { flex-basis: 100%; }
  .site-header ul { column-gap: 0.7rem; }
  .site-header nav a { font-size: 0.875rem; }
}

@media print {
  .site-header nav { display: none; }
  mark.todo { background: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
