/* geoff.xyz — style.css */

/* ─── Reset & base ─────────────────────────────────────────── */

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

/* ─── Root variables ───────────────────────────────────────── */

:root {
  --bg: #fafaf8;
  --text: #1a1a1a;
  --secondary: #777;
  --max-width: 680px;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── Page layout ──────────────────────────────────────────── */

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}

body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Header ───────────────────────────────────────────────── */

.site-header {
  padding: 28px 0 18px;
  border-bottom: 1px solid #d8d8d4;
  margin-bottom: 40px;
}

.site-header-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.site-title {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.site-title:hover {
  text-decoration: underline;
}

.site-tagline {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--secondary);
}

.site-nav {
  display: flex;
  gap: 16px;
  list-style: none;
}

.site-nav a {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--secondary);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ─── Footer ───────────────────────────────────────────────── */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #d8d8d4;
  margin-top: 72px;
  padding: 20px 0 40px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--secondary);
}

.site-footer a {
  color: var(--secondary);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ─── Homepage ─────────────────────────────────────────────── */

.post-list {
  list-style: none;
}

.post-list li {
  margin-bottom: 40px;
}

.post-list .post-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: normal;
  line-height: 1.4;
  margin-bottom: 4px;
}

.post-list .post-title a {
  color: var(--text);
  text-decoration: none;
}

.post-list .post-title a:hover {
  text-decoration: underline;
}

.post-list .post-meta {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--secondary);
  margin-bottom: 6px;
}

.post-list .post-description {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--secondary);
  line-height: 1.55;
}

/* ─── Article page ─────────────────────────────────────────── */

.article-header {
  margin-bottom: 40px;
}

.article-title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: normal;
  line-height: 1.3;
  margin-bottom: 10px;
}

.article-subtitle {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--secondary);
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 18px;
}

.article-byline {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--secondary);
}

.article-byline .post-date {
  margin-left: 8px;
}

/* ─── Article body ─────────────────────────────────────────── */

.article-body p {
  margin-bottom: 1.5em;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.article-body a {
  text-decoration: underline;
  text-decoration-color: #c8c8c4;
  text-underline-offset: 2px;
}

.article-body a:hover {
  text-decoration-color: var(--text);
}

/* ─── Footnote hover tooltips ──────────────────────────────── */

.fn-ref {
  position: relative;
  display: inline;
}

/* The tooltip bubble */
.fn-ref::after {
  content: attr(data-note);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  background: #fff;
  border: 1px solid #d8d8d4;
  border-radius: 4px;
  padding: 10px 14px;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.55;
  color: var(--secondary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  white-space: normal;
  z-index: 100;
  /* hidden by default */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

/* Small arrow pointing down */
.fn-ref::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #d8d8d4;
  pointer-events: none;
  z-index: 101;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.fn-ref:hover::after,
.fn-ref:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Inline footnote markers */
.fn-ref sup a {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--secondary);
  text-decoration: none;
  vertical-align: super;
  line-height: 0;
}

.fn-ref sup a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ─── Notes / Footnotes ────────────────────────────────────── */

.article-notes {
  border-top: 1px solid #d8d8d4;
  margin-top: 56px;
  padding-top: 28px;
}

.article-notes h2 {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 20px;
}

.article-notes ol {
  padding-left: 1.5em;
}

.article-notes ol li {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.article-notes ol li a {
  color: var(--secondary);
  text-decoration: none;
  margin-left: 6px;
}

.article-notes ol li a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ─── Author bio ───────────────────────────────────────────── */

.author-bio {
  border-top: 1px solid #d8d8d4;
  margin-top: 48px;
  padding-top: 28px;
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--secondary);
  line-height: 1.65;
}

.author-bio strong {
  color: var(--text);
}

/* ─── Links (global) ───────────────────────────────────────── */

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ─── Mobile ───────────────────────────────────────────────── */

@media (max-width: 600px) {
  html {
    font-size: 17px;
  }

  body {
    padding: 0 18px;
  }

  .site-header {
    padding: 20px 0 14px;
    margin-bottom: 32px;
  }

  /* Suppress tooltip on touch devices — click-to-bottom still works */
  .fn-ref::after,
  .fn-ref::before {
    display: none;
  }

  .article-title {
    font-size: 24px;
  }

  .article-subtitle {
    font-size: 16px;
  }

  .site-footer {
    margin-top: 56px;
  }
}
