/* harperlangston.com — shared styles */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d1f23;
  --muted: #5c6370;
  --line: #e4e1da;
  --accent: #1f5f8b;
  --accent-soft: #e6eff6;
  --award: #8a5a00;
  --award-bg: #fbf0d9;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a; --surface: #1c1f23; --text: #e6e6e3; --muted: #9aa1ab;
    --line: #2d3238; --accent: #7fb8e0; --accent-soft: #1f2e3a;
    --award: #f0c46b; --award-bg: #3a2f17;
  }
  img.thumb { background: #fff; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 1.25rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 3.5rem; }
.brand { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; color: var(--text); white-space: nowrap; }
nav { display: flex; gap: 1.1rem; overflow-x: auto; scrollbar-width: none; }
nav a { color: var(--muted); font-size: .92rem; white-space: nowrap; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); text-decoration: none; }

/* intro */
.intro { padding: 3.5rem 0 2rem; border-bottom: 1px solid var(--line); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 .75rem; font-weight: 600; letter-spacing: -.01em; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 40rem; margin: 0 0 1.25rem; }
.contact { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.contact a { display: inline-block; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .9rem; }
.contact a:hover { border-color: var(--accent); text-decoration: none; }
.stats { font-size: .85rem; color: var(--muted); margin: 0; }

/* sections */
section { padding: 2.5rem 0 1rem; }
h2 { font-size: 1.6rem; margin: 0 0 1.25rem; font-weight: 600; }
h3.year { font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: .08em; color: var(--muted); margin: 1.75rem 0 .5rem; padding-bottom: .35rem; border-bottom: 1px solid var(--line); }

/* entries */
.pub { display: grid; grid-template-columns: 96px 1fr; gap: 1.1rem; padding: 1rem 0; }
.pub + .pub { border-top: 1px dashed var(--line); }
.thumb { width: 96px; height: auto; max-height: 120px; object-fit: contain; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); }
.thumb-empty { height: 72px; background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 6px, var(--bg) 6px, var(--bg) 12px); }
.pub h3 { font-size: 1.08rem; margin: 0 0 .3rem; font-weight: 600; }
.pub h3 a { color: var(--text); }
.pub h3 a:hover { color: var(--accent); }
.authors { margin: 0 0 .2rem; font-size: .92rem; color: var(--muted); }
.authors strong { color: var(--text); font-weight: 600; }
.venue { margin: 0 0 .4rem; font-size: .92rem; font-style: italic; }
.award { font-style: normal; display: inline-block; font-size: .75rem; font-weight: 600; color: var(--award); background: var(--award-bg); padding: .05rem .5rem; border-radius: 999px; margin-left: .25rem; }
.links { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0; }
.links a { font-size: .78rem; font-weight: 600; padding: .1rem .55rem; border-radius: 4px; background: var(--accent-soft); }
.links a:hover { text-decoration: none; filter: brightness(.96); }
details { margin-top: .35rem; font-size: .92rem; }
summary { cursor: pointer; color: var(--muted); font-size: .85rem; width: fit-content; }
summary:hover { color: var(--accent); }
details p { margin: .5rem 0; }
details[open] { padding: .25rem 0 .25rem .9rem; border-left: 2px solid var(--line); }
.kw { color: var(--muted); font-size: .85rem; }
.kw span { font-weight: 600; text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; margin-right: .3rem; }

/* education */
.edu article { padding: .9rem 0; }
.edu article + article { border-top: 1px dashed var(--line); }
.edu h3 { font-size: 1.1rem; margin: 0 0 .2rem; }
.edu p { margin: .15rem 0; font-size: .95rem; }

/* code page */
.profile { display: flex; gap: 1.25rem; align-items: center; padding: 3rem 0 1.75rem; border-bottom: 1px solid var(--line); }
.profile img { width: 88px; height: 88px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); }
.profile h1 { margin: 0 0 .25rem; font-size: 2rem; }
.profile p { margin: 0 0 .6rem; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin: 1.5rem 0 1rem; font-size: .9rem; color: var(--muted); }
.toolbar label { display: inline-flex; gap: .4rem; align-items: center; cursor: pointer; }
.repos { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; padding-bottom: 2rem; }
.repo { display: flex; flex-direction: column; gap: .4rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; transition: border-color .15s, transform .15s; }
.repo:hover { border-color: var(--accent); transform: translateY(-1px); text-decoration: none; }
.repo h3 { margin: 0; font-family: var(--mono); font-size: .98rem; color: var(--accent); word-break: break-word; }
.repo p { margin: 0; color: var(--text); font-size: .9rem; flex: 1; }
.repo .meta { display: flex; flex-wrap: wrap; gap: .8rem; font-size: .78rem; color: var(--muted); }
.dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; margin-right: .3rem; vertical-align: -1px; background: var(--muted); }
.tag { font-size: .7rem; border: 1px solid var(--line); border-radius: 999px; padding: 0 .45rem; }
.note { font-size: .85rem; color: var(--muted); }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.5rem 0 2.5rem; font-size: .85rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; }

@media (max-width: 600px) {
  .site-header .wrap { height: auto; padding-top: .6rem; padding-bottom: .6rem; flex-direction: column; align-items: flex-start; gap: .3rem; }
  .pub { grid-template-columns: 64px 1fr; gap: .8rem; }
  .thumb { width: 64px; }
  .intro { padding-top: 2rem; }
  .profile { flex-direction: column; align-items: flex-start; }
}
@media print {
  .site-header, .site-footer, .links, summary { display: none; }
  details { display: none; }
  body { background: #fff; }
}
