/* ========================================================================
   THE MONOLITH — Design System for 10 Claude Code Principles
   Striking. Bold. Imposing. Authority through restraint.
   ======================================================================== */

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

:root {
  --bg: #09090b;
  --bg-surface: #111113;
  --bg-elevated: #18181b;
  --border: #27272a;
  --border-strong: #3f3f46;
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #d97706;
  --accent-bright: #f59e0b;
  --accent-dim: rgba(217, 119, 6, 0.12);
  --positive: #4ade80;
  --negative: #ef4444;

  --font-serif: Georgia, 'Times New Roman', Times, serif;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, 'Liberation Mono', monospace;

  --content-width: 720px;
  --wide-width: 1080px;
  --page-padding: 24px;
}

::selection {
  background: var(--accent-dim);
  color: var(--text);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

/* ========================================================================
   TYPOGRAPHY
   ======================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: 2.8rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-top: 3rem; margin-bottom: 1rem; }
h3 { font-size: 1.4rem; margin-top: 2rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.15rem; margin-top: 1.5rem; margin-bottom: 0.5rem; font-weight: 600; font-family: var(--font-sans); }

p {
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
}

a {
  color: var(--accent-bright);
  text-decoration: none;
  transition: color 0.2s;
}

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

strong {
  color: var(--text);
  font-weight: 600;
}

em {
  font-style: italic;
}

img {
  max-width: 100%;
  height: auto;
}

/* Code */

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-elevated);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--accent-bright);
}

pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: var(--text-secondary);
}

/* Blockquotes — used for fact sheets */

blockquote {
  border-left: 4px solid var(--accent);
  background: var(--bg-surface);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  border-radius: 0 4px 4px 0;
}

blockquote p {
  color: var(--text-secondary);
}

blockquote p:last-child {
  margin-bottom: 0;
}

blockquote strong {
  color: var(--accent-bright);
}

/* Tables */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text);
  font-weight: 600;
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

td {
  color: var(--text-secondary);
}

/* Lists */

ul, ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.5rem;
}

li strong {
  color: var(--text);
}

/* Task list checkboxes */

.task-list {
  list-style: none;
  padding-left: 0;
}

.task-list-item {
  position: relative;
  padding-left: 1.75rem;
}

.task-list-item-checkbox {
  position: absolute;
  left: 0;
  top: 0.35em;
  margin: 0;
  accent-color: var(--accent);
}

/* Horizontal rules */

hr {
  border: none;
  height: 3px;
  background: var(--border);
  margin: 3rem 0;
}

/* ========================================================================
   LAYOUT
   ======================================================================== */

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--page-padding);
}

.container--wide {
  max-width: var(--wide-width);
}

/* ========================================================================
   SITE HEADER
   ======================================================================== */

.site-header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(9, 9, 11, 0.85);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--wide-width);
}

.site-header__logo {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.site-header__logo:hover {
  color: var(--accent-bright);
}

.site-header__nav {
  display: flex;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-header__nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.site-header__nav a:hover {
  color: var(--text);
}

/* ========================================================================
   HERO
   ======================================================================== */

.hero {
  padding: 8rem 0 6rem;
  text-align: center;
  border-bottom: 3px solid var(--border);
}

.hero__number {
  font-family: var(--font-serif);
  font-size: 8rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 0.25rem;
}

.hero__title {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hero__rule {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto 2rem;
}

.hero__headline {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 400;
  line-height: 1.15;
  color: var(--text);
  max-width: 700px;
  margin: 0 auto 1.5rem;
  letter-spacing: -0.02em;
}

.hero__sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.hero__stat {
  text-align: center;
}

.hero__stat-number {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--text);
  display: block;
  line-height: 1;
}

.hero__stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 0.5rem;
  display: block;
}

.hero__cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ========================================================================
   BUTTONS
   ======================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  color: var(--bg);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn--outline:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ========================================================================
   SECTION LABEL
   ======================================================================== */

.section-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  text-align: center;
}

.series-overview-link {
  display: block;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--accent-bright);
  text-decoration: none;
  margin-bottom: 4rem;
}

.series-overview-link:hover {
  text-decoration: underline;
}

/* ========================================================================
   PRINCIPLES SECTION (Landing Page)
   ======================================================================== */

.principles-section {
  padding: 6rem 0;
}

.act {
  margin-bottom: 5rem;
}

.act__header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.act__label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.act__title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--text-secondary);
}

.principle-card {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: all 0.15s;
}

.principle-card:hover {
  background: var(--bg-surface);
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  margin-left: -1.5rem;
  margin-right: -1.5rem;
}

.principle-card__number {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 400;
  color: var(--border-strong);
  line-height: 1;
  transition: color 0.15s;
}

.principle-card:hover .principle-card__number {
  color: var(--accent);
}

.principle-card__content {
  padding-top: 0.3rem;
}

.principle-card__title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.principle-card__subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ========================================================================
   TOOLS SECTION (Landing Page)
   ======================================================================== */

.tools-section {
  padding: 6rem 0;
  border-top: 3px solid var(--border);
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 2.5rem;
  transition: border-color 0.2s;
}

.tool-card:hover {
  border-color: var(--border-strong);
}

.tool-card__name {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 1rem;
}

.tool-card__description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.tool-card__install {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  color: var(--accent-bright);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tool-card__link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-bright);
  text-decoration: none;
  letter-spacing: 0.03em;
}

.tool-card__link:hover {
  color: var(--text);
}

/* ========================================================================
   RESEARCH SECTION (Landing Page)
   ======================================================================== */

.research-section {
  padding: 6rem 0;
  border-top: 3px solid var(--border);
  text-align: center;
}

.research-section__headline {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--text);
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.research-section__text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* ========================================================================
   ARTICLE HEADER
   ======================================================================== */

.article-header {
  padding: 6rem 0 3rem;
  border-bottom: 3px solid var(--border);
}

.article-header__act {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.article-header__number {
  font-family: var(--font-serif);
  font-size: 6rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.04em;
}

.article-header__title {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.article-header__subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
  font-style: italic;
}

/* ========================================================================
   ARTICLE BODY
   ======================================================================== */

.article-body {
  padding: 3rem 0 4rem;
}

.article-body h2 {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.article-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.article-body h3 {
  color: var(--text);
}

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

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

/* ========================================================================
   ARTICLE NAVIGATION
   ======================================================================== */

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 3rem 0;
  border-top: 3px solid var(--border);
}

.article-nav__link {
  display: block;
  padding: 1.5rem;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.2s;
}

.article-nav__link:hover {
  border-color: var(--accent);
  background: var(--bg-surface);
}

.article-nav__link--next {
  text-align: right;
}

.article-nav__direction {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.article-nav__title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text);
}

/* ========================================================================
   FOOTER
   ======================================================================== */

.site-footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer__text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.site-footer__text a {
  color: var(--text-secondary);
}

/* ========================================================================
   404 PAGE
   ======================================================================== */

.not-found {
  text-align: center;
  padding: 8rem 0;
}

.not-found__code {
  font-family: var(--font-serif);
  font-size: 8rem;
  color: var(--border-strong);
  line-height: 1;
}

.not-found__title {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--text);
  margin: 1rem 0;
}

.not-found__text {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* ========================================================================
   FIGURES (Inline SVG diagrams)
   ======================================================================== */

.figure {
  margin: 2rem 0;
  max-width: var(--content-width);
}

.figure--wide {
  max-width: var(--wide-width);
}

.figure svg {
  width: 100%;
  height: auto;
}

.figure__caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-family: var(--font-sans);
}

/* ========================================================================
   SYNTAX HIGHLIGHTING (Rouge — dark theme)
   ======================================================================== */

.highlight {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
  overflow-x: auto;
}

.highlight pre {
  margin: 0;
  padding: 1.5rem;
  background: transparent;
  border: none;
}

.highlight code {
  background: transparent;
  color: var(--text-secondary);
}

.highlight .c,
.highlight .cm,
.highlight .c1,
.highlight .cs { color: #6a737d; }

.highlight .k,
.highlight .kd,
.highlight .kn,
.highlight .kp,
.highlight .kr,
.highlight .kc { color: #f97583; }

.highlight .s,
.highlight .s1,
.highlight .s2,
.highlight .sb,
.highlight .sc,
.highlight .sd,
.highlight .sh,
.highlight .sx { color: #9ecbff; }

.highlight .mi,
.highlight .mf,
.highlight .mh,
.highlight .mo { color: #79b8ff; }

.highlight .na { color: #ffab70; }
.highlight .nb { color: #79b8ff; }
.highlight .nc,
.highlight .nn { color: #b392f0; }
.highlight .nf,
.highlight .nx { color: #b392f0; }
.highlight .nt { color: #85e89d; }
.highlight .no { color: #79b8ff; }

.highlight .o,
.highlight .ow { color: #f97583; }
.highlight .p { color: var(--text-secondary); }
.highlight .err { color: #f97583; }

/* ========================================================================
   RESPONSIVE
   ======================================================================== */

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

  .hero {
    padding: 5rem 0 4rem;
  }

  .hero__number {
    font-size: 5rem;
  }

  .hero__headline {
    font-size: 2.2rem;
  }

  .hero__stats {
    gap: 2rem;
  }

  .hero__cta {
    flex-direction: column;
    align-items: center;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .principle-card {
    grid-template-columns: 3.5rem 1fr;
    gap: 1rem;
  }

  .principle-card__number {
    font-size: 2.2rem;
  }

  .article-header {
    padding: 4rem 0 2rem;
  }

  .article-header__number {
    font-size: 4rem;
  }

  .article-header__title {
    font-size: 2rem;
  }

  .article-nav {
    grid-template-columns: 1fr;
  }

  .article-nav__link--next {
    text-align: left;
  }

  .site-header__nav {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .hero__number {
    font-size: 4rem;
  }

  .hero__headline {
    font-size: 1.8rem;
  }

  .hero__stats {
    flex-direction: column;
    gap: 1.5rem;
  }

  .article-header__number {
    font-size: 3rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}
