/* Field Effect Institute — Typography-Forward Stylesheet */

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

:root {
  --bg: #fafaf8;
  --text: #1a1a1a;
  --text-muted: #555;
  --text-light: #888;
  --accent: #2c5282;
  --accent-hover: #1a365d;
  --border: #e2e2e0;
  --bg-subtle: #f0f0ee;
  --max-width: 680px;
}

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: Georgia, "Times New Roman", Times, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
}

/* ---- Navigation ---- */

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  border-bottom: 1px solid var(--border);
}

nav .site-name {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
}

nav .site-name:hover {
  color: var(--accent);
}

nav .nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

nav .nav-links a {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
}

nav .nav-links a:hover {
  color: var(--text);
}

/* ---- Main Content ---- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ---- Headings ---- */

h1, h2, h3, h4 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111;
  line-height: 1.3;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

/* ---- Article Header ---- */

.article-meta {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 2.5rem;
}

.article-meta .date {
  margin-bottom: 0.4rem;
}

.article-meta .tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.article-meta .tag {
  background: var(--bg-subtle);
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ---- Subtitle ---- */

.subtitle {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 2rem;
  font-weight: 400;
}

/* ---- Body Text ---- */

p {
  margin-bottom: 1.25rem;
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

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

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

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

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

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

li {
  margin-bottom: 0.4rem;
}

code {
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-size: 0.85em;
  background: var(--bg-subtle);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

/* ---- MathJax ---- */

mjx-container {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.25rem 0;
}

/* ---- Landing Page ---- */

.hero {
  text-align: center;
  padding: 4rem 0 2.5rem;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}

.hero .tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto;
}

.hero .mission {
  margin-top: 2rem;
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Article Listing ---- */

.article-list {
  margin-top: 3rem;
}

.article-list > h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.article-card {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.article-card:first-of-type {
  border-top: 1px solid var(--border);
}

.article-card h3 {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: 1.15rem;
}

.article-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.article-card h3 a:hover {
  color: var(--accent);
}

.article-card .excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.article-card .meta {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.72rem;
  color: var(--text-light);
}

/* ---- Article Navigation (prev/next) ---- */

.article-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.85rem;
}

.article-nav .prev,
.article-nav .next {
  max-width: 45%;
}

.article-nav .next {
  text-align: right;
  margin-left: auto;
}

.article-nav .label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

/* ---- Series Info ---- */

.series-info {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 2.5rem;
}

/* ---- Footer ---- */

footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  color: var(--text-light);
  text-align: center;
  line-height: 1.6;
}

footer a {
  color: var(--text-muted);
}

/* ---- About Page ---- */

.about-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.about-content h2:first-child {
  margin-top: 0;
}

/* ---- Placeholder Pages ---- */

.placeholder {
  text-align: center;
  padding: 4rem 0;
  color: var(--text-light);
}

.placeholder h1 {
  font-weight: 400;
  margin-bottom: 1rem;
}

.placeholder p {
  font-size: 0.95rem;
}

/* ---- Responsive ---- */

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

  nav {
    padding: 0.8rem 1rem;
  }

  nav .site-name {
    font-size: 0.78rem;
  }

  nav .nav-links {
    gap: 1rem;
  }

  nav .nav-links a {
    font-size: 0.72rem;
  }

  main {
    padding: 1.5rem 1rem 3rem;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .article-nav {
    flex-direction: column;
    gap: 1rem;
  }

  .article-nav .prev,
  .article-nav .next {
    max-width: 100%;
    text-align: left;
  }
}
