/* nkinahamira.com — palette drawn from lanthanide oxide chemistry:
   violet-biased neutrals (Nd), dysprosium-region teal accent. */

:root {
  --ink: #1A1730;
  --paper: #FCFCFD;
  --surface: #FFFFFF;
  --line: #E3E0EB;
  --line-strong: #C9C4D8;
  --muted: #66627A;
  --accent: #0E7C74;
  --accent-soft: #E3F0EE;

  --display: "Charter", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --measure: 68ch;
  --wide: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ECEAF3;
    --paper: #131120;
    --surface: #1B1830;
    --line: #2E2A47;
    --line-strong: #443E64;
    --muted: #9B96AF;
    --accent: #55BEB3;
    --accent-soft: #14322F;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.02rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(1.95rem, 1.6rem + 1.5vw, 2.85rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.75rem); letter-spacing: -0.01em; }
h3 { font-size: 1.08rem; }

p { margin: 0; }

a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, .skip:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  background: var(--accent);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------------------------------------------------------------- chrome */

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.4rem;
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
header.site .brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
header.site nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
header.site nav a {
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
}
header.site nav a:hover { color: var(--ink); }
header.site nav a.on { color: var(--accent); font-weight: 600; }

footer.site {
  margin-top: 4rem;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
footer.site .links { display: flex; flex-wrap: wrap; gap: 1rem; }
footer.site .fine { font-size: 0.8rem; opacity: 0.8; }

/* ---------------------------------------------------------------- layout */

main { display: block; }

.band {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2.5rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.band:last-of-type { border-bottom: 0; }
.band--tight { padding-bottom: 1.5rem; }
.band p, .band .summary { max-width: var(--measure); }

.summary { font-family: var(--display); font-size: 1.15rem; color: var(--muted); }
.fine { font-size: 0.85rem; color: var(--muted); }
.more { font-size: 0.92rem; }

/* ------------------------------------------------------------------ hero */

.hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 3rem clamp(1rem, 4vw, 2.5rem) 2rem;
}
.hero__title {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
  margin-top: 0.45rem;
}
.hero__pitch {
  margin-top: 1rem;
  font-size: 1.08rem;
  max-width: 48ch;
}

.metrics {
  max-width: var(--wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.metrics div {
  padding: 1.15rem clamp(1rem, 4vw, 2.5rem);
  border-right: 1px solid var(--line);
}
.metrics div:last-child { border-right: 0; }
.metrics .n {
  display: block;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.metrics .l {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------- pillars */

.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.pillar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 3px;
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pillar p { font-size: 0.9rem; color: var(--muted); }

/* ----------------------------------------------------------------- works */

.works { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.3rem; }
.work { display: flex; flex-direction: column; gap: 0.55rem; }
.work__finding { font-size: 0.95rem; }
.work__cite { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.role {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
}

/* ------------------------------------------------------------ pub lists */

.year {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
}

ol.pubs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.4rem; }
ol.pubs li { display: flex; flex-direction: column; gap: 0.28rem; max-width: var(--measure); }
.pub__authors { font-size: 0.86rem; color: var(--muted); }
.pub__authors strong { color: var(--ink); }
.pub__title { font-family: var(--display); font-size: 1.03rem; line-height: 1.35; }
.pub__title a { color: var(--ink); text-decoration-color: var(--line-strong); }
.pub__title a:hover { color: var(--accent); }
.pub__meta { font-size: 0.84rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.if {
  font-family: var(--mono);
  font-size: 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 1px 6px;
}

ul.keyworks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
ul.keyworks li { display: flex; flex-direction: column; gap: 0.2rem; max-width: var(--measure); }
ul.keyworks .src { font-size: 0.82rem; color: var(--muted); }
ul.keyworks .res { font-size: 0.9rem; }

ul.plain { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; max-width: var(--measure); }
ul.plain li::marker { color: var(--accent); }

/* ------------------------------------------------------------ structures */

ul.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
ul.timeline li { display: grid; grid-template-columns: 11rem 1fr; gap: 0.2rem 1rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--line); }
ul.timeline li:last-child { border-bottom: 0; }
ul.timeline .when { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }

dl.caps { margin: 0; display: flex; flex-direction: column; gap: 0.8rem; }
dl.caps > div { display: grid; grid-template-columns: 11rem 1fr; gap: 0.2rem 1rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
dl.caps > div:last-child { border-bottom: 0; }
dl.caps dt { font-weight: 600; font-size: 0.92rem; }
dl.caps dd { margin: 0; color: var(--muted); font-size: 0.92rem; }

@media (max-width: 640px) {
  ul.timeline li, dl.caps > div { grid-template-columns: 1fr; }
}

table.grants { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
table.grants th {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
table.grants td { padding: 0.75rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.grants td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.grants tr:last-child td { border-bottom: 0; }
