/*
 Theme Name: Eldridge Morgan — Insights
 Description: Minimal engineering journal, single-column editorial.
 Version: 2.0.1
 Author: Eldridge Morgan
*/

:root {
  --bg:     #fcfcfc;
  --soft:   #f5f5f3;
  --ink:    #111111;
  --body:   #3a3a3a;
  --muted:  #8a8a8a;
  --faint:  #b8b8b6;
  --rule:   #e6e6e2;
  --link:   #1e50c8;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color .15s ease, color .15s ease;
  padding-bottom: 1px;
}
a:hover { border-color: var(--ink); }
a.plain, .no-underline a, .no-underline { border-bottom: 0; }

/* ============== LAYOUT ============== */
.shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 6rem 1.5rem 5rem;
}
@media (max-width: 640px) {
  .shell { padding: 3.5rem 1.25rem 4rem; }
}

/* ============== INTRO ============== */
.intro {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 1.5rem;
  text-decoration: none;
  border-bottom: 0;
}
.intro:hover { border-bottom: 0; }
.mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -.01em;
  flex: none;
  outline: 1px solid rgba(0,0,0,.05);
  outline-offset: -1px;
}
.intro-meta { display: flex; flex-direction: column; line-height: 1.3; }
.intro-name { font-weight: 600; color: var(--ink); font-size: 15px; }
.intro-role { color: var(--muted); font-size: 14px; font-weight: 500; }

.prose {
  color: var(--body);
  margin-bottom: 1rem;
}
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); font-weight: 500; }

/* ============== BLOCK ============== */
section.block { margin-top: 4rem; }
@media (max-width: 640px) { section.block { margin-top: 3rem; } }

.block-head {
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.block-head .head-aside {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* ============== TOPICS ============== */
.topics {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.topic {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--body);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .35rem .75rem;
  transition: border-color .15s ease, color .15s ease;
}
.topic:hover { border-color: var(--ink); color: var(--ink); }
.topic .count {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.topic.is-active { border-color: var(--ink); color: var(--ink); }

/* ============== NOTES (list) ============== */
.notes { list-style: none; padding: 0; margin: 0; }
.note {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 1rem;
  align-items: start;
  padding: .85rem .5rem;
  margin: 0 -.5rem;
  border-radius: 8px;
  transition: background .15s ease;
  text-decoration: none;
  color: inherit;
  border-bottom: 0;
}
.note-glyph { padding-top: 5px; }
.note-date { padding-top: 2px; }
.note:hover { background: var(--soft); border-bottom: 0; }
.note + .note { border-top: 1px solid var(--rule); }

.note-glyph {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 2px 0;
}
.note-glyph span {
  height: 2px;
  background: var(--faint);
  border-radius: 999px;
  display: block;
  transition: background .2s ease;
}
.note-glyph span:nth-child(1) { width: 14px; }
.note-glyph span:nth-child(2) { width: 20px; }
.note-glyph span:nth-child(3) { width: 10px; }
.note-glyph span:nth-child(4) { width: 16px; }
.note:hover .note-glyph span { background: var(--ink); }

.note-title {
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.4;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-date {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ============== PAGINATION ============== */
.pager {
  margin-top: 2.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.pager a { color: var(--ink); font-weight: 500; border-bottom-color: var(--rule); }
.pager a:hover { border-color: var(--ink); }
.pager .empty { color: var(--faint); }

.empty-state { color: var(--muted); padding: 2rem 0; }

/* ============== ARTICLE (single) ============== */
.article-head { margin-bottom: 2rem; }
.article-eyebrow {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 1rem;
}
.article-eyebrow a { color: var(--muted); border-bottom-color: var(--rule); }
.article-eyebrow a:hover { color: var(--ink); border-color: var(--ink); }
.article-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.018em;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 1rem;
}
.article-meta {
  font-size: 13px;
  color: var(--muted);
}
.article-meta a { color: var(--muted); border-bottom-color: var(--rule); }
.article-meta a:hover { color: var(--ink); border-color: var(--ink); }

.article-body {
  color: var(--body);
  font-size: 16px;
  line-height: 1.75;
  margin-top: 2rem;
}
.article-body p { margin-bottom: 1.25rem; }
.article-body h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 2.25rem 0 .75rem;
  letter-spacing: -.005em;
}
.article-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 1.75rem 0 .5rem;
}
.article-body a {
  color: var(--ink);
  font-weight: 500;
  border-bottom-color: var(--rule);
}
.article-body a:hover { border-color: var(--ink); }
.article-body ul, .article-body ol {
  margin: 0 0 1.25rem 1.25rem;
  padding: 0;
  list-style: disc;
}
.article-body ol { list-style: decimal; }
.article-body li { padding: .15rem 0; }
.article-body blockquote {
  border-left: 2px solid var(--ink);
  padding-left: 1rem;
  margin: 1.25rem 0;
  color: var(--ink);
  font-weight: 500;
}
.article-body code {
  font-family: 'Berkeley Mono', 'JetBrains Mono', Menlo, monospace;
  font-size: 13px;
  background: var(--soft);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
.article-body pre {
  background: var(--soft);
  padding: 1rem;
  overflow-x: auto;
  font-family: 'Berkeley Mono', 'JetBrains Mono', Menlo, monospace;
  font-size: 13px;
  border-radius: 6px;
  margin: 1.25rem 0;
}
.article-body pre code { background: transparent; padding: 0; }
.article-body img { margin: 1.25rem 0; }

.article-foot {
  margin-top: 3rem;
  font-size: 13px;
  color: var(--muted);
}
.article-foot a { color: var(--muted); border-bottom-color: var(--rule); }
.article-foot a:hover { color: var(--ink); border-color: var(--ink); }

/* ============== COLOPHON ============== */
.colophon {
  margin-top: 5rem;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.colophon a { color: var(--muted); border-bottom-color: var(--rule); }
.colophon a:hover { color: var(--ink); border-color: var(--ink); }
