/* ============================================================
   SILICON MYSTIC — editorial theme, inspired by Aeon
   Grounded opinion on technology, AI, and the mind.
   Original CSS. Serif display + mono labels + ink on white.
   ============================================================ */

:root {
  color-scheme: light;
  --ink: #141414;
  --ink-soft: #2a2a2a;
  --grey-mid: #666;
  --grey-mid-light: #999;
  --grey-light-bg: #f4f4f4;
  --grey-light-border: #e6e6e6;
  --accent: #4b2e8f;
  --accent-soft: #6a4db8;
  --bg: #ffffff;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --measure: 46rem;
  --maxw: 80rem;
  --spacing: 0.25rem;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 1.125rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--grey-light-border);
  padding: 1.25rem 1.5rem;
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.site-logo {
  height: 2.5rem;
  width: auto;
  display: block;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}
.wordmark .accent-dot { color: var(--accent); }
.wordmark .tag {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--grey-mid-light);
  text-transform: uppercase;
}
.site-nav { display: flex; gap: 1.6rem; }
.site-nav a {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey-mid);
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--accent); }

/* ---------- Hero / featured ---------- */
.hero {
  max-width: 1111px;
  margin: 2.5rem auto 0;
  padding: 0 1.5rem;
}
.hero-link {
  position: relative;
  display: block;
  min-height: 358px;
  overflow: hidden;
  border-radius: 6px;
  background: #111;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}
.hero-link, .hero-link:link, .hero-link:visited, .hero-link:hover, .hero-link:focus {
  text-decoration: none;
}
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.hero-scrim {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 8, 10, 0.42);
}
.hero-body {
  position: relative;
  z-index: 2;
  min-height: 358px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
}
.hero-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.9rem;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  color: #fff;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 26ch;
}
.hero-standfirst {
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
  max-width: 60ch;
  margin-top: 0.8rem;
}
.hero-byline {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1rem;
}
.hero-credit {
  position: absolute;
  right: 0.9rem;
  bottom: 0.55rem;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Article grid ---------- */
.articles-section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}
.section-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  color: var(--grey-mid);
  margin-bottom: 2rem;
}
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem 2.5rem;
}
.card {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}
.card-media {
  display: block;
  position: relative;
  width: 100%;
  padding-top: 56%;
  overflow: hidden;
  background: var(--grey-light-bg);
  margin-bottom: 1rem;
}
.card-media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: filter 0.3s ease;
}
.card:hover .card-media img { filter: grayscale(1); }
.card-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: capitalize;
  color: var(--grey-mid-light);
  margin-bottom: 0.45rem;
}
.card-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--ink);
}
.card:hover .card-title { color: var(--accent); }
.card-synopsis {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--grey-mid);
  margin-top: 0.5rem;
}
.card-author {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--grey-mid-light);
  margin-top: 0.7rem;
}

.card-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 3 / 2;
  margin-bottom: 1.1rem;
  background: var(--grey-light-bg);
  color: var(--grey-mid-light);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px dashed var(--grey-light-border);
}
.article-hero-image {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  display: block;
}
.article-image-caption {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--grey-mid-light);
  margin: 0.5rem 0 2rem;
}
.card .card-category {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.card h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-top: 0.7rem;
  flex: 1;
}
.card .card-byline {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--grey-mid-light);
  margin-top: 1rem;
  text-transform: uppercase;
}

/* ---------- Article page ---------- */
.article-hero {
  position: relative;
  width: 100%;
  height: 56vw;
  max-height: 600px;
  min-height: 380px;
  overflow: hidden;
  background: #111;
}
@media (min-width: 1100px) {
  .article-hero { height: 540px; }
}
.article-hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-hero-scrim {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 8, 10, 0.45);
}
.article-hero-body {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
}
.article-hero-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.9rem;
}
.article-hero-kicker a { color: inherit; text-decoration: none; }
.article-hero-kicker a:hover { text-decoration: underline; }
.article-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 22ch;
}
.article-standfirst {
  font-size: 1.1rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  max-width: 56ch;
  margin-top: 0.9rem;
}
.article-byline {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 1.1rem;
}
.article-hero-credit {
  position: absolute;
  right: 0.9rem;
  bottom: 0.55rem;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
}

/* Articles without a lead image fall back to plain flow */
.article-hero-plain {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 4rem 1.5rem 0;
  text-align: center;
}
.article-hero-plain .article-title { color: var(--ink); }
.article-hero-plain .article-standfirst { color: var(--ink-soft); }
.article-hero-plain .article-byline {
  display: block;
  color: var(--grey-mid);
  margin-top: 1rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--grey-light-border);
}

.article-wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.article-content { margin-top: 0; }
.article-content p {
  font-family: var(--serif);
  font-size: 1.16rem;
  line-height: 1.65;
  margin-bottom: 1.4rem;
}
.article-content p:first-of-type::first-letter {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 3.6rem;
  float: left;
  line-height: 0.85;
  padding-right: 0.5rem;
  padding-top: 0.25rem;
  color: var(--ink);
}
.article-content h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1.25;
  margin: 2.8rem 0 1rem;
  letter-spacing: -0.01em;
}
.article-content h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 2.2rem 0 0.9rem;
}
.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-content a:hover { color: var(--accent-soft); }
.article-content ul, .article-content ol {
  margin: 0 0 1.5rem 1.6rem;
  line-height: 1.7;
}
.article-content li { margin-bottom: 0.5rem; }
.article-content blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.2rem 0 0.2rem 1.6rem;
  margin: 2.2rem 0;
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.pullquote {
  margin: 2.6rem 0;
  padding-left: 2.2rem;
}
.pullquote blockquote {
  border-left: none;
  padding: 0;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.35;
  color: var(--accent);
}
.pullquote cite {
  display: block;
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--grey-mid);
}

/* Article figures (images) */
.article-figure { margin: 2.5rem 0; }
.article-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
.article-figure figcaption {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
  color: var(--grey-mid);
  margin-top: 0.8rem;
}
.article-figure figcaption a { color: var(--accent); }
.article-content .note {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--grey-mid);
  background: var(--grey-light-bg);
  border-left: 2px solid var(--grey-mid-light);
  padding: 1.1rem 1.3rem;
  margin: 2rem 0;
  line-height: 1.6;
}

/* References */
.refs {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--grey-light-border);
}
.refs h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey-mid-light);
  margin-bottom: 1.2rem;
}
.refs ol { margin-left: 1.3rem; }
.refs li {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--grey-mid);
  margin-bottom: 0.5rem;
}
.refs li a { color: var(--accent); }
.article-enddate {
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--grey-mid-light);
}
.article-tags {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.article-tags a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--grey-mid);
  border: 1px solid var(--grey-mid-light, #ccc);
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.article-tags a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Simple pages (About, Privacy) ---------- */
.page-wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}
.page-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.page-body { font-size: 1.1rem; line-height: 1.75; }
.page-body p { margin-bottom: 1.4rem; }
.page-body h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin: 2rem 0 0.9rem;
}
.page-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--grey-light-border);
  padding: 2.5rem 1.5rem;
  background: var(--bg);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-inner .foot-note {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey-mid-light);
}
.footer-nav { display: flex; gap: 1.4rem; }
.footer-nav a {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey-mid);
  text-decoration: none;
}
.footer-nav a:hover { color: var(--accent); }

/* ---------- 404 ---------- */
.notfound {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 6rem 1.5rem;
  text-align: center;
}
.notfound h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 3rem;
  margin-bottom: 1rem;
}
.notfound p { color: var(--grey-mid); margin-bottom: 1.5rem; }
.notfound a { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hero-body { padding: 1.1rem 1.2rem 1.2rem; }
  .article-standfirst { font-size: 1.15rem; }
  .site-nav { gap: 1rem; }
  .site-nav a { font-size: 0.68rem; }
}
