/* Leland D. Crane — personal site
   Hand-written static styles. Clean, restrained, theme-aware. */

:root {
  --page:        #faf9f7;
  --surface:     #ffffff;
  --ink:         #171614;
  --ink-2:       #55534e;
  --muted:       #8a8781;
  --rule:        #e6e4de;
  --accent:      #2a6fd0;
  --accent-ink:  #1f5bb0;
  --maxw:        46rem;
  --serif: Charter, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page:    #14140f;
    --surface: #1b1b18;
    --ink:     #f3f1ea;
    --ink-2:   #b7b4ab;
    --muted:   #86837b;
    --rule:    #2c2b27;
    --accent:  #6ea8f0;
    --accent-ink: #8cbcf5;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---- Masthead ---- */
.masthead {
  padding: 4.2rem 0 0;
}
.masthead h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 2.7rem);
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 0 0 0.35rem;
}
.masthead .role {
  color: var(--ink-2);
  font-size: 1.06rem;
  margin: 0 0 1.1rem;
  max-width: 34rem;
}
.masthead .role a { color: inherit; text-decoration-color: var(--rule); }

/* ---- Nav ---- */
nav.site {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  align-items: baseline;
  padding: 1.3rem 0;
  margin-top: 1.6rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
nav.site a {
  color: var(--ink-2);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition: color .15s, border-color .15s;
}
nav.site a:hover { color: var(--ink); border-bottom-color: var(--accent); }
nav.site a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
nav.site .spacer { flex: 1; }

/* ---- Links ---- */
a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
a:hover { text-decoration-color: var(--accent); }

/* ---- Body sections ---- */
main { padding: 2.6rem 0 5rem; }

.lede {
  font-size: 1.12rem;
  line-height: 1.6;
  margin: 0 0 1.1rem;
}
.disclaimer {
  color: var(--ink-2);
  font-size: 0.94rem;
  border-left: 2px solid var(--rule);
  padding-left: 1rem;
  margin: 1.4rem 0 0;
}

h2.section {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin: 3rem 0 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

/* ---- Publications ---- */
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { padding: 0.95rem 0; border-bottom: 1px solid var(--rule); }
.pub:last-child { border-bottom: 0; }
.pub .title { font-weight: 600; color: var(--ink); }
.pub .title a { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.pub .title a:hover { color: var(--accent-ink); }
.pub .meta { color: var(--ink-2); font-size: 0.96rem; margin-top: 0.15rem; }
.pub .venue { font-style: italic; }
.pub .extra { font-size: 0.88rem; color: var(--muted); margin-top: 0.3rem; }
.pub .extra a { color: var(--ink-2); }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--rule);
  padding: 1.6rem 0 3rem;
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: baseline;
}
footer .spacer { flex: 1; }
footer a { color: var(--ink-2); }

/* ---- Buttons / link row ---- */
.linkrow { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 0.2rem 0 0; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.86rem;
  color: var(--ink-2);
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.28rem 0.8rem;
  background: var(--surface);
  transition: border-color .15s, color .15s;
}
.chip:hover { color: var(--ink); border-color: var(--accent); }
