/* karevernby.github.io */
:root {
  --bg: #fbfaf7;
  --fg: #1b1a17;
  --muted: #5e5b53;
  --rule: #e1ddd3;
  --accent: #7a1f2b;
  --accent-soft: #f3e6e5;
  --link: #1f3f7a;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --measure: 44rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15151a; --fg: #ebe8e0; --muted: #a5a197; --rule: #2d2d35;
    --accent: #e3a3ab; --accent-soft: #2a1d21; --link: #9ab6ec;
  }
}
:root[data-theme="dark"] {
  --bg: #15151a; --fg: #ebe8e0; --muted: #a5a197; --rule: #2d2d35;
  --accent: #e3a3ab; --accent-soft: #2a1d21; --link: #9ab6ec;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--serif); font-size: 1.0625rem; line-height: 1.6;
  font-optical-sizing: auto;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
em { font-style: italic; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.nav {
  max-width: var(--measure); margin: 0 auto; padding: 0.7rem 1rem;
  display: flex; gap: 1.4rem; flex-wrap: wrap;
  font-family: var(--sans); font-size: 0.85rem; letter-spacing: 0.02em;
}
.nav a { color: var(--muted); }
.nav a:hover { color: var(--fg); text-decoration: none; }

main { max-width: var(--measure); margin: 0 auto; padding: 2.5rem 1rem 4rem; }
section { padding: 2.2rem 0; border-top: 1px solid var(--rule); scroll-margin-top: 3.2rem; }
section:first-of-type { border-top: 0; padding-top: 1rem; }

h1 { font-size: 2.4rem; font-weight: 600; line-height: 1.1; margin: 0 0 0.3rem; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; font-weight: 600; margin: 0 0 1.2rem; letter-spacing: -0.005em; }
h3 { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 2rem 0 0.8rem; }
.project h3 { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--fg); margin: 1.4rem 0 0.15rem; }
p { margin: 0 0 1rem; }

.intro { display: flex; gap: 2.5rem; align-items: flex-start; }
.intro-text { flex: 1 1 auto; min-width: 0; }
.role { font-family: var(--sans); font-size: 0.95rem; color: var(--muted); margin-bottom: 1.4rem; line-height: 1.45; }
.portrait {
  flex: 0 0 auto; width: 180px; height: 225px; object-fit: cover; border-radius: 4px;
  margin-top: 0.4rem; filter: saturate(0.9);
}
.contact { list-style: none; padding: 0; margin: 0; display: flex; gap: 0.35rem 1.2rem; flex-wrap: wrap; font-family: var(--sans); font-size: 0.9rem; }

.meta { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }

.pubs { list-style: none; padding: 0; margin: 0; }
.pubs li { padding: 0.55rem 0 0.55rem 1.4rem; text-indent: -1.4rem; border-top: 1px solid var(--rule); }
.pubs li:first-child { border-top: 0; }
.pubs .authors { color: var(--muted); }
.pubs .title a { color: var(--fg); border-bottom: 1px solid var(--rule); }
.pubs .title a:hover { color: var(--link); border-color: var(--link); text-decoration: none; }
.pubs .award { font-family: var(--sans); font-size: 0.8rem; color: var(--accent); background: var(--accent-soft); padding: 0.1em 0.5em; border-radius: 3px; text-indent: 0; display: inline-block; margin-left: 0.2rem; }
.pubs .coverage { font-family: var(--sans); font-size: 0.82rem; color: var(--muted); display: inline-block; text-indent: 0; }
.note { font-family: var(--sans); font-size: 0.88rem; color: var(--muted); margin-top: 1.2rem; }

.cv { display: grid; grid-template-columns: 7rem 1fr; gap: 0.35rem 1rem; margin: 0 0 1.4rem; }
.cv dt { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); padding-top: 0.15rem; }
.cv dd { margin: 0; }
.button { display: inline-block; font-family: var(--sans); font-size: 0.88rem; font-weight: 500; padding: 0.45rem 0.9rem; border: 1px solid var(--rule); border-radius: 4px; color: var(--fg); }
.button:hover { border-color: var(--fg); text-decoration: none; }

.site-footer { border-top: 1px solid var(--rule); padding: 1.5rem 1rem 2.5rem; font-family: var(--sans); font-size: 0.82rem; color: var(--muted); }
.site-footer p { max-width: var(--measure); margin: 0 auto; }

@media (max-width: 640px) {
  body { font-size: 1rem; }
  h1 { font-size: 2rem; }
  .intro { flex-direction: column-reverse; gap: 1.2rem; }
  .portrait { width: 128px; height: 160px; }
  .cv { grid-template-columns: 5.5rem 1fr; }
  .nav { gap: 0.8rem; font-size: 0.78rem; flex-wrap: nowrap; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 380px) {
  .nav { gap: 0.6rem; letter-spacing: 0; }
}
