/* ================================================================
   morrisjb.com — site styles
   White ground, light-grey surfaces, light-blue accent.
   Serif wordmark + headlines (Newsreader), clean sans body (Inter).
   ================================================================ */

:root {
  --bg: #FFFFFF;
  --surface: #F4F6F8;
  --surface-2: #EDF1F5;
  --border: #E3E8EE;
  --text: #1B2A36;
  --muted: #5C6B7A;
  --faint: #8A97A4;
  --accent: #5B8DB8;
  --accent-soft: #A9C7DE;
  --max-width: 560px;
  --header-max: 1120px;
}

* { box-sizing: border-box; margin: 0; }

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Geometric background (all pages) ---------- */
/* Left-anchored node network, faint enough to sit behind the text.
   Fades out toward the right so the reading column stays clean. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("/bg-network.svg");
  background-size: cover;
  background-position: left center;
  background-repeat: no-repeat;
  opacity: 0.085;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 70%, transparent 100%);
          mask-image: linear-gradient(to right, #000 0%, #000 70%, transparent 100%);
  pointer-events: none;
}

/* ---------- Site header (full-width bar) ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-header__inner {
  max-width: var(--header-max);
  margin: 0 auto;
  padding: 1.1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.brand svg { display: block; height: 46px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ---------- Layout ---------- */
.page {
  max-width: var(--header-max);
  margin: 0 auto;
  padding: 3.5rem 2rem 4rem;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, .display {
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.25rem; margin: 0 0 1rem; }
h2 { font-size: 1.4rem; margin: 2.75rem 0 1rem; }
h3 { font-size: 1.15rem; margin: 2rem 0 0.75rem; }

p { margin-bottom: 1.25rem; }

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}
a:hover { text-decoration-color: var(--accent); }

em { font-style: italic; }
strong { font-weight: 600; }

ul, ol { margin: 0 0 1.25rem 1.4rem; }
li { margin-bottom: 0.45rem; }

blockquote {
  margin: 2rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--accent-soft);
  color: var(--muted);
  font-style: italic;
}

/* ---------- Eyebrow + rule (signature device) ---------- */
.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.rule {
  border: none;
  height: 2px;
  width: 56px;
  background: var(--accent-soft);
  margin: 0 0 1.75rem;
}

.section-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 3rem 0 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ---------- Hero (home / about) ---------- */
.hero { margin-bottom: 1rem; }

.hero-welcome {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.hero-title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 2rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 1.75rem;
  max-width: 30ch;
}

.lede {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
}

.lede + .lede { margin-top: 1.25rem; }

/* ---------- Post list ---------- */
.posts { list-style: none; padding: 0; margin: 1.5rem 0 0; }

.post-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.post-item:last-child { border-bottom: none; }

.post-meta {
  font-size: 0.74rem;
  color: var(--faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.post-title {
  font-size: 1.25rem;
  font-style: italic;
  margin: 0 0 0.4rem;
}
.post-title a { text-decoration: none; color: var(--text); }
.post-title a:hover { text-decoration: underline; text-decoration-color: var(--accent-soft); }

.post-excerpt { font-size: 0.96rem; color: var(--muted); margin: 0; }

/* ---------- Year groupings ---------- */
.year-group { margin-bottom: 2rem; }
.year-label {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.1rem;
  color: var(--faint);
  margin: 2rem 0 0;
}

/* ---------- Topic tags ---------- */
.tag-list {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin: 1.5rem 0 0; padding: 0; list-style: none;
}
.tag {
  display: inline-block;
  padding: 0.28rem 0.8rem;
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.tag:hover { border-color: var(--accent-soft); color: var(--text); background: var(--surface-2); }

/* ---------- Article ---------- */
.article-header { margin-bottom: 2.5rem; }
.article-meta {
  font-size: 0.74rem; color: var(--faint);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.article-title {
  font-size: 2.1rem; line-height: 1.2; margin: 0 0 0.9rem;
}
.article-subtitle {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.15rem; font-style: italic;
  color: var(--muted); line-height: 1.5;
}
.article-content { font-size: 1.0625rem; line-height: 1.78; }
.article-content p { margin-bottom: 1.3rem; }
.article-footer {
  margin-top: 4rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem; color: var(--muted);
}
.back-link { text-decoration: none; color: var(--accent); font-weight: 500; }
.back-link:hover { text-decoration: underline; }

/* ---------- About ---------- */
.about-intro {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.2rem; font-style: italic;
  color: var(--muted); margin-bottom: 2rem;
}

/* ---------- CV ---------- */
.cv-header {
  margin-bottom: 2.5rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.cv-name { font-size: 2rem; margin: 0 0 0.35rem; }
.cv-role-line {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.05rem; font-style: italic;
  color: var(--muted); margin-bottom: 0.5rem;
}
.cv-contact { font-size: 0.85rem; color: var(--faint); }
.cv-section { margin-bottom: 2.5rem; }
.cv-role { margin-bottom: 1.75rem; }
.cv-role:last-child { margin-bottom: 0; }
.cv-role-header {
  display: flex; justify-content: space-between;
  align-items: baseline; flex-wrap: wrap; gap: 0.4rem;
  margin-bottom: 0.25rem;
}
.cv-title { font-size: 1.05rem; font-weight: 600; }
.cv-dates { font-size: 0.82rem; color: var(--faint); }
.cv-org { font-size: 0.95rem; color: var(--muted); margin-bottom: 0.6rem; }
.cv-description { font-size: 0.96rem; margin: 0; color: var(--text); }
.cv-skills { font-size: 0.96rem; line-height: 1.8; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
.site-footer__inner {
  max-width: var(--header-max);
  margin: 0 auto;
  padding: 2rem;
  font-size: 0.82rem;
  color: var(--faint);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.site-footer__links a {
  color: var(--muted); text-decoration: none; margin-right: 1.1rem;
}
.site-footer__links a:hover { color: var(--text); }
.site-footer__note { color: var(--faint); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  html { font-size: 17px; }
  .site-header__inner { padding: 0.9rem 1.25rem; gap: 1rem; }
  .brand svg { height: 38px; }
  .site-nav { gap: 1.1rem; font-size: 0.84rem; }
  .page { padding: 2.5rem 1.25rem 3rem; }
  .hero-title { font-size: 1.6rem; }
  .article-title { font-size: 1.7rem; }
  .cv-role-header { flex-direction: column; gap: 0.1rem; }
  .site-footer__inner { padding: 1.5rem 1.25rem; flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .site-nav { gap: 0.85rem; font-size: 0.8rem; }
  .brand svg { height: 34px; }
}

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

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

/* ---------- Print (CV) ---------- */
@media print {
  .site-header, .site-footer { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: none; }
  .page { max-width: 100%; padding: 0; }
  .cv-section { page-break-inside: avoid; }
}
