/*
 * jameshowe.eu — Editorial Minimal
 * A warm, editorial theme: Newsreader for headings, IBM Plex Sans for body,
 * a single teal accent, generous whitespace, no sidebar.
 */

:root {
  --bg: #fbfaf7;
  --ink: #221f1a;
  --text-soft: #3a352d;
  --muted: #6b6459;
  --border: #e7e2d8;
  --surface: #f1efe9;
  --accent: #2f6f77;
  --accent-dark: #1e4d54;
  --content-width: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171512;
    --ink: #ece7dd;
    --text-soft: #d8d2c5;
    --muted: #a39a8c;
    --border: #332e27;
    --surface: #201d19;
    --accent: #6cc4cf;
    --accent-dark: #96d8e0;
  }
}

* { box-sizing: border-box; }

html, body {
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.5em;
}

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ===================== Nav ===================== */

.site-nav {
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
  margin-bottom: 40px;
}
.site-nav-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.site-brand {
  font-family: "Newsreader", serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}
.site-brand:hover {
  color: var(--ink);
  text-decoration: none;
}
.site-nav-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  flex-wrap: wrap;
}
.site-nav-item {
  color: var(--ink);
}
.site-nav-item:hover {
  color: var(--accent);
}
.site-nav-item.active {
  color: var(--accent);
  font-weight: 600;
}

/* ===================== Footer ===================== */

.site-footer {
  max-width: var(--content-width);
  margin: 64px auto 0;
  padding: 24px 32px 56px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
.site-footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.site-footer a {
  color: var(--muted);
}
.site-footer a:hover {
  color: var(--accent);
}

/* ===================== Hero (homepage) ===================== */

.hero {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.hero img {
  width: 104px;
  height: 104px;
  border-radius: 12px;
  object-fit: cover;
  object-position: 50% 30%;
  flex-shrink: 0;
}
.hero h1 {
  font-size: 32px;
  line-height: 1.1;
}
.hero-tagline {
  font-size: 16px;
  margin-top: 8px;
  font-family: "Newsreader", serif;
  font-style: italic;
  color: var(--muted);
}
.hero-icons {
  display: flex;
  gap: 15px;
  margin-top: 16px;
}
.hero-icons a {
  display: flex;
  color: var(--muted);
}
.hero-icons a:hover {
  color: var(--accent);
}

/* ===================== Bio / body copy ===================== */

.bio {
  margin-top: 40px;
  font-size: 15.5px;
  line-height: 1.7;
}
.bio p {
  margin: 0 0 1.1em;
}
.muted {
  color: var(--muted);
}

.section {
  margin-top: 36px;
}
.section-label {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 13px;
}

/* ===================== Tags ===================== */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tags span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12.5px;
  color: var(--text-soft);
}

/* ===================== Recent ===================== */

.recent {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.recent .card {
  display: block;
  border-top: 2px solid var(--accent);
  padding-top: 13px;
  color: inherit;
  text-decoration: none;
}
.recent .card:hover {
  text-decoration: none;
}
.recent .card:hover .title {
  color: var(--accent);
}
.recent .kicker {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 6px;
}
.recent .title {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.4;
}
.recent .meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
}

/* ===================== Page (Publications / Talks / Contact / Projects index) ===================== */

.page {
  padding-bottom: 24px;
}
.page-title {
  font-size: 28px;
  margin-bottom: 28px;
}
.page ul, .page ol {
  padding-left: 1.25em;
}
.page li {
  margin-bottom: 0.85em;
  line-height: 1.6;
}
.page h2 {
  font-size: 20px;
  margin-top: 2em;
  margin-bottom: 0.6em;
}
.page h3 {
  font-size: 16px;
  color: var(--muted);
  font-family: "IBM Plex Sans", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
}

/* ===================== Projects ===================== */

.project-tagline {
  font-size: 15px;
  color: var(--muted);
  margin-top: -18px;
  margin-bottom: 20px;
}
.project-links {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  font-size: 14px;
  font-weight: 600;
}
.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.project-list li {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.project-list li:last-child {
  border-bottom: 1px solid var(--border);
}
.project-list .project-name {
  font-size: 16px;
  font-weight: 600;
  font-family: "Newsreader", serif;
}
.project-list .project-desc {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}

/* ===================== Baseline element styling ===================== */

blockquote {
  margin: 0 0 1.25em;
  padding: 0 0 0 1em;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

pre, code {
  font-family: Menlo, Monaco, "Courier New", monospace;
  font-size: 0.85em;
}
code {
  background: var(--surface);
  border-radius: 3px;
  padding: 0.15em 0.4em;
}
pre {
  background: var(--surface);
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
}
pre code {
  background: none;
  padding: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1.5em;
  font-size: 0.9em;
  overflow-x: auto;
  display: block;
}
th, td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}
th {
  font-weight: 600;
}

img { max-width: 100%; }

/* ===================== Responsive ===================== */

@media (max-width: 560px) {
  .recent {
    grid-template-columns: 1fr;
  }
  .site-nav-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero img {
    width: 88px;
    height: 88px;
  }
  .hero h1 {
    font-size: 26px;
  }
}
