/* ==========================================================================
   Internals — Exploded View's deep-tech strand
   Design system generated in Google Stitch ("Exploded View" theme):
   engineering-journal aesthetic, bone & charcoal + architectural blue,
   Source Serif 4 / IBM Plex Sans / JetBrains Mono, hairlines, sharp corners.
   Self-contained: Internals pages link only this file + Google Fonts.
   ========================================================================== */

:root {
  /* Bone & charcoal foundation */
  --bg:            #fbf9f9;   /* archival bone paper */
  --surface:       #f2f2f2;   /* sunken container */
  --surface-2:     #efeded;
  --ink:           #1a1a1a;   /* deep charcoal: primary text + rules */
  --ink-soft:      #303031;
  --muted:         #5f6163;   /* metadata / captions / secondary */
  --muted-2:       #757575;
  --hairline:      #d1d1d1;   /* structural rules */
  --hairline-soft: #e3e2e2;
  --accent:        #0d47a1;   /* deep architectural blue */
  --accent-tint:   #eaf0fb;

  /* Type */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", "Menlo", monospace;

  /* Rhythm */
  --unit: 8px;
  --gutter: 24px;
  --margin: 64px;
  --maxw: 1200px;
  --measure: 68ch;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* --- Reading progress bar --------------------------------------------- */
.iv-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--accent); z-index: 100;
  transition: width 0.1s linear;
}

/* --- Links ------------------------------------------------------------- */
a { color: inherit; text-decoration: none; }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.prose a:hover { text-decoration-thickness: 2px; }

/* --- Layout ------------------------------------------------------------ */
.iv-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--margin); }
@media (max-width: 768px) { .iv-wrap { padding: 0 20px; } }

/* --- Masthead / nav ---------------------------------------------------- */
.iv-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,249,249,0.92);
  backdrop-filter: saturate(1.1) blur(4px);
  border-bottom: 1px solid var(--ink);
}
.iv-nav .iv-wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 18px; padding-bottom: 18px;
}
.iv-wordmark {
  font-family: var(--serif); font-weight: 700; font-size: 22px;
  letter-spacing: -0.01em; color: var(--ink);
}
.iv-navlinks { display: flex; gap: 28px; align-items: baseline; }
.iv-navlinks a {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  transition: color 0.15s ease;
}
.iv-navlinks a:hover { color: var(--ink); }
.iv-navlinks a.is-active { color: var(--accent); font-weight: 500; }
@media (max-width: 640px) {
  .iv-navlinks { gap: 16px; }
  .iv-navlinks a { font-size: 11px; letter-spacing: 0.05em; }
}

/* --- Shared type ------------------------------------------------------- */
.kicker {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2);
}
.kicker .sep { color: var(--hairline); margin: 0 8px; }
.rule-top { border-top: 1px solid var(--ink); padding-top: 16px; }
.eyebrow-rule { display: flex; align-items: center; gap: 16px; }
.eyebrow-rule::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }

h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 600; }

/* --- Article header ---------------------------------------------------- */
/* One centered reading column: header, hero and body share the same axis
   so the page reads balanced instead of hugging the left. */
.iv-article { max-width: 768px; margin: 0 auto; padding: 56px 24px 48px; }
.iv-article .article-head,
.iv-article .prose,
.iv-article .iv-hero,
.iv-article .iv-next,
.iv-article .iv-sources,
.iv-article .iv-author,
.iv-article .iv-subscribe { max-width: none; margin-left: 0; margin-right: 0; }
.iv-article .prose { margin-top: 44px; }
.article-head { max-width: none; }
.article-head h1 {
  font-size: 60px; font-weight: 700; line-height: 1.08;
  letter-spacing: -0.02em; margin: 20px 0 0;
}
.dek {
  font-family: var(--serif); font-size: 24px; font-weight: 400;
  line-height: 1.4; color: var(--ink-soft); margin: 24px 0 0; max-width: 40ch;
}
.byline {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); margin-top: 28px;
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.byline .dot { width: 3px; height: 3px; background: var(--muted); border-radius: 0; }
@media (max-width: 768px) { .article-head h1 { font-size: 38px; } .dek { font-size: 20px; } }

/* --- Hero figure ------------------------------------------------------- */
.iv-hero { margin: 40px 0 8px; }
.iv-hero .frame {
  border: 1px solid var(--hairline); background: var(--surface);
  aspect-ratio: 16 / 9; overflow: hidden;
}
.iv-hero img { width: 100%; height: 100%; object-fit: cover; }
figcaption {
  font-family: var(--sans); font-style: italic; font-size: 14px;
  color: var(--muted); margin-top: 10px;
  display: flex; gap: 10px; align-items: baseline;
}
.fig-label {
  font-family: var(--mono); font-style: normal; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink);
  white-space: nowrap; flex: none;
}

/* --- Reading column ---------------------------------------------------- */
.prose { max-width: var(--measure); margin: 48px 0 0; }
.prose > * + * { margin-top: 22px; }
.prose p {
  font-size: 18px; line-height: 1.66; color: var(--ink);
  text-align: justify; text-justify: inter-word; hyphens: auto;
}
.prose h2 {
  font-size: 30px; line-height: 1.25; margin-top: 56px; padding-top: 8px;
}
.prose h3 {
  font-size: 21px; line-height: 1.3; margin-top: 40px; color: var(--ink);
}
.prose strong { font-weight: 600; }
.prose code, .iv-next code {
  font-family: var(--mono); font-size: 0.86em;
  background: var(--surface); padding: 1px 5px; color: var(--ink-soft);
}
/* Code blocks: mono, sunken, accent rule, never justified or hyphenated */
.prose pre {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.55;
  background: var(--surface); border: 1px solid var(--hairline);
  border-left: 2px solid var(--accent);
  padding: 18px 20px; overflow-x: auto; max-width: 100%;
  text-align: left; hyphens: none; white-space: pre; color: var(--ink-soft);
}
.prose pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.iv-next h3 a { color: inherit; border-bottom: 1px solid var(--hairline); }
.iv-next h3 a:hover { color: var(--accent); border-color: var(--accent); }
.prose ul { padding-left: 0; list-style: none; }
.prose ul li {
  position: relative; padding-left: 24px; margin-top: 12px;
  font-size: 18px; line-height: 1.6;
  text-align: justify; text-justify: inter-word; hyphens: auto;
}
.prose ul li::before {
  content: ""; position: absolute; left: 4px; top: 12px;
  width: 6px; height: 6px; background: var(--accent);
}

/* --- Pull-quote -------------------------------------------------------- */
.pullquote {
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  padding: 28px 0; margin: 40px 0;
  font-family: var(--serif); font-size: 26px; line-height: 1.35;
  font-weight: 600; color: var(--ink); max-width: none; text-align: left;
}

/* --- Mono callout ------------------------------------------------------ */
.callout {
  font-family: var(--mono); font-size: 14px; line-height: 1.6;
  background: var(--surface); border-left: 2px solid var(--accent);
  padding: 20px 24px; color: var(--ink-soft);
}

/* --- Data table -------------------------------------------------------- */
.iv-tablewrap { margin: 40px 0; overflow-x: auto; max-width: 100%; }
table.iv-table {
  width: 100%; border-collapse: collapse; font-size: 15px;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink);
}
table.iv-table th {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; text-align: left; color: var(--ink);
  padding: 14px 16px 12px; border-bottom: 1px solid var(--ink);
  vertical-align: bottom;
}
table.iv-table td {
  padding: 14px 16px; vertical-align: top; line-height: 1.5;
  border-bottom: 1px solid var(--hairline); color: var(--ink-soft);
}
table.iv-table td:first-child { color: var(--ink); font-weight: 600; }
table.iv-table tr:last-child td { border-bottom: none; }

/* --- End / Part 2 block ------------------------------------------------ */
.iv-next {
  margin-top: 72px; border-top: 1px solid var(--ink); padding-top: 32px;
  max-width: var(--measure);
}
.iv-next .kicker { color: var(--accent); }
.iv-next h3 { font-size: 26px; margin: 14px 0 8px; }
.iv-next p { color: var(--muted); font-size: 17px; line-height: 1.6; }

.iv-sources { margin-top: 56px; max-width: var(--measure); }
.iv-sources h4 {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
  border-bottom: 1px solid var(--hairline); padding-bottom: 10px; margin: 0 0 16px;
}
.iv-sources ul { list-style: none; padding: 0; margin: 0; }
.iv-sources li { font-size: 14px; line-height: 1.5; margin-top: 10px; color: var(--muted); }
.iv-sources a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* --- Author + subscribe ------------------------------------------------ */
.iv-author {
  margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--hairline);
  max-width: var(--measure); display: flex; gap: 20px; align-items: flex-start;
}
.iv-author .mark {
  flex: none; width: 56px; height: 56px; background: var(--ink); color: #fff;
  font-family: var(--serif); font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.iv-author p { font-size: 15px; line-height: 1.55; color: var(--muted); margin: 0; }
.iv-author strong { color: var(--ink); }

.iv-subscribe {
  margin-top: 40px; border: 1px solid var(--ink); padding: 28px 32px;
  max-width: var(--measure);
}
.iv-subscribe .kicker { color: var(--accent); }
.iv-subscribe h3 { font-family: var(--serif); font-size: 22px; margin: 10px 0 6px; }
.iv-subscribe p { color: var(--muted); font-size: 15px; margin: 0 0 16px; }
.iv-btn {
  display: inline-block; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  padding: 12px 22px; cursor: pointer; transition: background 0.15s ease;
}
.iv-btn:hover { background: var(--accent); border-color: var(--accent); }
.iv-btn--ghost { background: transparent; color: var(--ink); }
.iv-btn--ghost:hover { background: var(--ink); color: #fff; }

/* --- Section landing --------------------------------------------------- */
.section-hero { padding: 72px 0 40px; border-bottom: 1px solid var(--ink); }
.section-hero .kicker { color: var(--accent); }
.section-hero h1 {
  font-size: 72px; font-weight: 700; letter-spacing: -0.03em; line-height: 1;
  margin: 20px 0 0;
}
.section-hero .lede {
  font-family: var(--serif); font-size: 22px; line-height: 1.4; color: var(--ink-soft);
  max-width: 46ch; margin: 24px 0 0; border-left: 2px solid var(--accent); padding-left: 20px;
}
@media (max-width: 768px) { .section-hero h1 { font-size: 44px; } }

.feature {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px;
  align-items: stretch; padding: 48px 0; border-bottom: 1px solid var(--hairline);
}
.feature .art { border: 1px solid var(--hairline); background: var(--surface); overflow: hidden; min-height: 280px; }
.feature .art img { width: 100%; height: 100%; object-fit: cover; }
.feature .meta { display: flex; flex-direction: column; justify-content: center; }
.feature .meta .kicker { color: var(--accent); }
.feature .meta h2 { font-size: 40px; line-height: 1.1; letter-spacing: -0.01em; margin: 16px 0 12px; }
.feature .meta p { color: var(--muted); font-size: 18px; line-height: 1.55; margin: 0 0 20px; }
.feature .meta .go { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; gap: 24px; } }

.entry-list { border-top: 1px solid var(--ink); margin-top: 8px; }
.entry {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 24px;
  align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--hairline);
  transition: background 0.15s ease;
}
.entry:hover { background: var(--surface-2); }
.entry.is-soon { opacity: 0.55; }
.entry .num { font-family: var(--serif); font-size: 26px; color: var(--muted); }
.entry h3 { font-size: 24px; line-height: 1.2; margin: 0 0 6px; }
.entry .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.entry p { color: var(--muted); font-size: 16px; margin: 8px 0 0; }
.entry .read { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.entry.is-soon .read { color: var(--muted); font-style: italic; }
@media (max-width: 640px) { .entry { grid-template-columns: 32px 1fr; } .entry .read { display: none; } }

/* --- Footer ------------------------------------------------------------ */
.iv-foot {
  margin-top: 96px; border-top: 1px solid var(--ink);
  background: var(--surface-2);
}
.iv-foot .iv-wrap {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 40px var(--margin); gap: 32px; flex-wrap: wrap;
}
@media (max-width: 768px) { .iv-foot .iv-wrap { padding: 32px 20px; } }
.iv-foot .brand { font-family: var(--serif); font-weight: 700; font-size: 18px; }
.iv-foot p { font-family: var(--sans); font-size: 14px; color: var(--muted); max-width: 34ch; margin: 8px 0 0; }
.iv-foot .cols { display: flex; gap: 48px; flex-wrap: wrap; }
.iv-foot .col a { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.iv-foot .col a:hover { color: var(--accent); }
.iv-foot .col .h { color: var(--ink); font-weight: 500; margin-bottom: 4px; }
.iv-foot .legal { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
