/* Warm paper, graphite ink, and one oxide accent. */
:root {
  color-scheme: light;
  --paper: #f4f0e8;
  --surface: #fbf8f2;
  --ink: #202625;
  --muted: #68706d;
  --line: #d8d1c6;
  --accent: #a4452d;
  --accent-soft: #f1ddd6;
  --code: #1b2323;
  --code-ink: #edf0e9;
  --shadow: 0 24px 70px rgb(46 35 30 / 10%);
  --sans: "DM Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Iowan Old Style, Charter, Georgia, serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .18em; transition: color .2s ease, text-decoration-color .2s ease; }
a:hover { color: var(--accent); }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 20;
  padding: .6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }
.site-shell { width: min(1180px, calc(100% - 3rem)); margin-inline: auto; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 108px;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
}
.brand > span:last-child { display: grid; line-height: 1.15; }
.brand strong { font-size: .94rem; }
.brand small { margin-top: .2rem; color: var(--muted); font-size: .68rem; letter-spacing: .11em; text-transform: uppercase; }
.header-actions { display: flex; align-items: center; gap: clamp(.8rem, 2vw, 1.5rem); }
nav { display: flex; gap: clamp(1.1rem, 3vw, 2.5rem); }
nav a { padding-block: .45rem; border-bottom: 1px solid transparent; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
nav a:hover, nav a[aria-current="page"] { border-bottom-color: currentColor; color: var(--accent); }
.theme-toggle { display: grid; width: 2.3rem; height: 2.3rem; place-items: center; border: 1px solid var(--line); border-radius: .45rem; background: transparent; color: var(--ink); cursor: pointer; font: 1rem/1 var(--mono); transition: border-color .2s ease, color .2s ease, transform .2s ease; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:active { transform: scale(.96); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr);
  gap: clamp(3rem, 9vw, 8rem);
  align-items: center;
  min-height: 670px;
  padding: 6rem 0;
}
.eyebrow, .section-number { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.status-dot { display: inline-block; width: .5rem; height: .5rem; margin-right: .5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgb(164 69 45 / 12%); }
.hero h1, .page-header h1, .bio-intro h1, .not-found h1 {
  margin: 1.15rem 0 1.5rem;
  font-size: clamp(3.3rem, 7vw, 6.6rem);
  font-weight: 700;
  letter-spacing: -.068em;
  line-height: .94;
  text-wrap: balance;
}
h1 em, h2 em { color: var(--accent); font-family: var(--serif); font-weight: 400; }
.hero-copy > p { max-width: 62ch; margin: 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.27rem); }
.hero-actions, .deck-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  min-height: 48px;
  padding: .65rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgb(255 255 255 / 28%);
  font-size: .82rem;
  font-weight: 750;
  letter-spacing: .025em;
  text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.button:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.button:active { transform: translateY(1px) scale(.98); }
.button.primary { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.button.primary:hover { border-color: var(--accent); background: var(--accent); color: #fff; }

.signal-card {
  position: relative;
  overflow: hidden;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgb(251 250 247 / 72%);
  box-shadow: var(--shadow);
}
.signal-card::after { position: absolute; inset: 0; background-image: radial-gradient(var(--line) .75px, transparent .75px); background-size: 14px 14px; content: ""; mask-image: linear-gradient(to bottom, black, transparent 65%); pointer-events: none; }
.signal-top { position: relative; z-index: 1; display: flex; justify-content: space-between; font-size: .63rem; font-weight: 800; letter-spacing: .12em; }
.live { color: var(--accent); }
.signal-visual { position: relative; z-index: 1; display: flex; gap: 7px; height: 180px; padding: 1.4rem .1rem .8rem; border-bottom: 1px solid var(--line); }
.topic-column { display: grid; flex: 1; grid-template-rows: 1rem 1fr auto; gap: .3rem; min-width: 0; color: var(--tag-base, var(--muted)); text-align: center; text-decoration: none; }
.topic-column strong { color: var(--tag-base, var(--ink)); font: 700 .65rem/1 var(--mono); }
.topic-column small { overflow: hidden; color: var(--tag-base, var(--muted)); font-size: .57rem; font-weight: 750; text-overflow: ellipsis; text-transform: uppercase; }
.topic-bar { align-self: end; width: 100%; height: var(--h); border-radius: 3px 3px 0 0; background: var(--tag-base, var(--accent)); opacity: .82; }
.topic-column:hover { color: var(--tag-base); }
.topic-column:hover .topic-bar { opacity: 1; }
.signal-card dl { position: relative; z-index: 1; margin: 1.2rem 0 0; }
.signal-card dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; }
.signal-card dt { color: var(--muted); font-size: .72rem; }
.signal-card dd { margin: 0; font-size: .74rem; font-weight: 700; text-align: right; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin: 2rem 0 1.25rem; padding-top: 3rem; border-top: 1px solid var(--line); }
.section-heading > div { display: flex; align-items: baseline; gap: 1.4rem; }
.section-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.045em; }
.section-heading > a, .text-link { color: var(--muted); font-size: .83rem; font-weight: 700; }
.post-list { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.post-list li { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 2rem; align-items: start; padding: 1.8rem .2rem; border-bottom: 1px solid var(--line); transition: background-color .2s ease; }
.post-list li:hover { background: rgb(164 69 45 / 7%); }
.post-list time { padding-top: .18rem; color: var(--muted); font: .76rem/1.4 var(--mono); letter-spacing: .03em; }
.post-link { font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 680; letter-spacing: -.025em; line-height: 1.35; text-decoration: none; }
.post-meta { display: flex; flex-wrap: wrap; gap: .38rem; margin-top: .7rem; }
.tag, .tag-cloud a { --tag-base: var(--accent); border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--muted); font-weight: 700; text-decoration: none; }
.tag { padding: .2rem .5rem; font-size: .64rem; letter-spacing: .045em; text-transform: uppercase; }
.tag-cloud a { padding: .45rem .8rem; font-size: .76rem; }
@supports (color: color-mix(in srgb, red, red)) {
  .tag, .tag-cloud a { border-color: color-mix(in srgb, var(--tag-base) 32%, var(--surface)); background: color-mix(in srgb, var(--tag-base) 18%, var(--surface)); color: color-mix(in srgb, var(--tag-base) 92%, var(--ink)); }
}
.tag:hover, .tag-cloud a:hover { border-color: var(--tag-base); background: var(--accent-soft); color: var(--ink); }

/* Muted pigments keep topics distinct without competing with the oxide accent. */
.tag-microsoft { --tag-base: #4f7280; }
.tag-fabric { --tag-base: #75618d; }
.tag-pipelines { --tag-base: #b35f3e; }
.tag-python { --tag-base: #4f7a68; }
.tag-powerbi { --tag-base: #9b7a2e; }
.tag-powershell { --tag-base: #5a6f9b; }
.tag-terraform { --tag-base: #89618a; }
.tag-iac { --tag-base: #986a39; }
.tag-security { --tag-base: #677544; }
.tag-purview { --tag-base: #4c7971; }

.arrow { padding-top: .1rem; color: var(--muted); font-size: 1.25rem; }
.split-callout { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; margin: 8rem 0 3rem; padding: clamp(2rem, 5vw, 4rem); border-radius: 1.4rem; background: var(--ink); color: var(--paper); }
.split-callout h2 { margin: 1rem 0 0; font-size: clamp(2.2rem, 4vw, 3.8rem); letter-spacing: -.05em; line-height: 1.02; }
.split-callout p { max-width: 500px; margin-top: 2.3rem; color: #d5d0c6; font-size: 1.05rem; }
.split-callout .text-link { color: #fff; }

.page-header { max-width: 850px; padding: clamp(5rem, 10vw, 9rem) 0 4rem; }
.page-header.compact { padding-bottom: 2rem; }
.page-header h1 { margin-bottom: 1rem; }
.page-header p { max-width: 600px; margin: 0; color: var(--muted); font-size: 1.2rem; }
.tag-route { margin: 2.5rem 0 6rem; color: var(--muted); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: .6rem; padding: 1.4rem 0 4rem; }
.tag-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 7rem; }
.tag-section { scroll-margin-top: 2rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: 1rem; background: rgb(251 250 247 / 45%); }
.tag-section h2 { margin: 0 0 1rem; font-size: 1.1rem; text-transform: capitalize; }
.tag-section ul { margin: 0; padding: 0; list-style: none; }
.tag-section li { display: grid; gap: .25rem; padding: .75rem 0; border-top: 1px solid var(--line); }
.tag-section li a { font-weight: 650; line-height: 1.35; text-decoration: none; }
.tag-section time { color: var(--muted); font-size: .68rem; }

.article { padding-bottom: 6rem; }
.article-header { width: min(850px, 100%); margin: 0 auto; padding: 4rem 0 3rem; }
.back-link { display: inline-block; margin-bottom: 4rem; color: var(--muted); font-size: .78rem; font-weight: 700; text-decoration: none; }
.article-header h1 { max-width: 850px; margin: 1rem 0 1.4rem; font-size: clamp(2.6rem, 6vw, 5.3rem); letter-spacing: -.06em; line-height: 1.01; }
.article-byline { display: flex; gap: .7rem; color: var(--muted); font-size: .78rem; }
.prose { width: min(74ch, 100%); margin-inline: auto; font-size: clamp(1rem, 1.4vw, 1.1rem); }
.prose > * + * { margin-top: 1.35em; }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 2rem; margin-top: 2.3em; margin-bottom: .6em; letter-spacing: -.035em; line-height: 1.2; }
.prose h2 { padding-top: .8em; border-top: 1px solid var(--line); font-size: clamp(1.65rem, 3vw, 2.25rem); }
.prose h3 { font-size: 1.35rem; }
.prose p, .prose li { color: #35413f; }
.prose .lead { color: var(--ink); font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 1.8rem); line-height: 1.45; }
.prose a { color: var(--accent); font-weight: 600; }
.prose img { margin: 2rem auto; border: 1px solid var(--line); border-radius: .7rem; box-shadow: 0 12px 30px rgb(32 42 40 / 8%); }
.prose blockquote { margin: 2rem 0; padding: .2rem 0 .2rem 1.4rem; border-left: 3px solid var(--accent); }
.prose blockquote p { color: var(--muted); font-family: var(--serif); font-size: 1.15rem; }
.prose :not(pre) > code { padding: .13em .35em; border-radius: .25rem; background: var(--accent-soft); color: #7b2e1e; font: .86em/1.5 var(--mono); }
.prose pre { overflow-x: auto; margin: 1.8rem -1.2rem; padding: 1.2rem; border: 1px solid #34413e; border-radius: .75rem; background: var(--code); color: var(--code-ink); font: .82rem/1.65 var(--mono); tab-size: 4; }
.prose pre.mermaid { display: grid; min-height: 180px; place-items: center; border-color: var(--line); background: var(--surface); color: var(--ink); }
.prose table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; font-size: .9rem; }
.prose th, .prose td { padding: .65rem; border-bottom: 1px solid var(--line); text-align: left; }
.article-footer { width: min(74ch, 100%); margin: 5rem auto 0; padding: 1.5rem; border: 1px solid var(--line); border-radius: .8rem; }
.article-footer p { margin: 0; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.article-footer a { display: inline-block; margin-top: .3rem; font-weight: 700; text-decoration: none; }

.deck-card { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; margin-bottom: 2rem; border: 1px solid var(--line); border-radius: 1.3rem; background: var(--surface); box-shadow: var(--shadow); }
.deck-preview { position: relative; display: grid; min-height: 430px; place-items: center; overflow: hidden; background: var(--code); color: var(--paper); }
.deck-preview::before { position: absolute; inset: 0; background-image: linear-gradient(rgb(255 255 255 / 7%) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 7%) 1px, transparent 1px); background-size: 28px 28px; content: ""; }
.case-label { position: absolute; top: 1.5rem; left: 1.5rem; color: #e39a85; font: 800 .68rem/1 var(--mono); letter-spacing: .14em; }
.evidence { position: absolute; right: 1.5rem; bottom: 1.5rem; color: #9faaa7; font: .6rem/1 var(--mono); letter-spacing: .08em; }
.spark-bars { z-index: 1; display: flex; align-items: end; gap: 8px; width: 58%; height: 170px; transform: skewX(-5deg); }
.spark-bars i { flex: 1; height: 35%; background: #6e7a77; }
.spark-bars i:nth-child(2) { height: 60%; }
.spark-bars i:nth-child(3) { height: 90%; background: #e39a85; }
.spark-bars i:nth-child(4) { height: 46%; }
.spark-bars i:nth-child(5) { height: 75%; background: #e39a85; }
.spark-bars i:nth-child(6) { height: 54%; }
.deck-content { align-self: center; padding: clamp(2rem, 5vw, 4rem); }
.deck-content h2 { margin: .8rem 0 1rem; font-size: clamp(2rem, 4vw, 3.3rem); letter-spacing: -.05em; line-height: 1; }
.deck-content p { color: var(--muted); }
.speaker-note { display: flex; justify-content: space-between; gap: 2rem; margin: 4rem 0 7rem; padding: 1.5rem 0; border-block: 1px solid var(--line); }
.speaker-note p { margin: 0; }
.bio-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(3rem, 9vw, 8rem); padding: clamp(5rem, 10vw, 9rem) 0 6rem; }
.bio-intro h1 { margin-top: 1.2rem; font-size: clamp(3rem, 6vw, 5.4rem); }
.bio-copy { width: auto; padding-top: 2.2rem; }
.profile-links { margin-top: 3rem; border-top: 1px solid var(--line); }
.profile-links a { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.profile-links span { color: var(--muted); font-size: .8rem; }
.profile-links strong { font-size: .83rem; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; margin-bottom: 7rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--line); }
.principles div { padding: 2rem; background: var(--surface); }
.principles span { color: var(--accent); font: .72rem/1 var(--mono); }
.principles h2 { font-size: 1.15rem; }
.principles p { margin-bottom: 0; color: var(--muted); font-size: .88rem; }
.not-found { min-height: 620px; padding: 9rem 0; text-align: center; }
.not-found > span { color: var(--accent); font: .72rem/1 var(--mono); letter-spacing: .12em; }
.not-found h1 { font-size: clamp(3rem, 7vw, 6rem); }
.not-found p { margin-bottom: 2rem; color: var(--muted); }
.site-footer { display: grid; grid-template-columns: 1fr auto; gap: 2rem; margin-top: 6rem; padding: 3rem 0; border-top: 1px solid var(--line); }
.site-footer strong { font-size: .9rem; }
.site-footer p { margin: .2rem 0; color: var(--muted); font-size: .78rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: .75rem; font-weight: 700; }
.site-footer small { grid-column: 1 / -1; color: var(--muted); font-size: .65rem; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #141817;
  --surface: #1d2423;
  --ink: #edf0e9;
  --muted: #a9ada5;
  --line: #38403c;
  --accent: #e08368;
  --accent-soft: #512d25;
  --code: #0c100f;
  --code-ink: #edf0e9;
  --shadow: 0 24px 70px rgb(0 0 0 / 25%);
}
:root[data-theme="dark"] .signal-card,
:root[data-theme="dark"] .tag-section { background: rgb(29 36 35 / 75%); }
@supports (color: color-mix(in srgb, red, red)) {
  :root[data-theme="dark"] .tag,
  :root[data-theme="dark"] .tag-cloud a { border-color: color-mix(in srgb, var(--tag-base) 34%, var(--surface)); background: color-mix(in srgb, var(--tag-base) 24%, var(--surface)); color: color-mix(in srgb, var(--tag-base) 86%, white); }
}
:root[data-theme="dark"] .button { background: rgb(255 255 255 / 3%); }
:root[data-theme="dark"] .prose p,
:root[data-theme="dark"] .prose li { color: #d0d2cb; }
:root[data-theme="dark"] .prose :not(pre) > code { color: #f0b0a0; }
:root[data-theme="dark"] .split-callout { background: var(--surface); color: var(--ink); }
:root[data-theme="dark"] .split-callout p { color: var(--muted); }
:root[data-theme="dark"] .split-callout .text-link { color: var(--accent); }
:root[data-theme="dark"] .button.primary,
:root[data-theme="dark"] .brand-mark { background: var(--ink); color: var(--paper); }
:root[data-theme="dark"] .button.primary { border-color: var(--ink); }
:root[data-theme="dark"] .button.primary:hover { color: var(--paper); }

@media (max-width: 800px) {
  .site-shell { width: min(100% - 2rem, 680px); }
  .site-header { min-height: 88px; }
  .brand small { display: none; }
  nav { gap: .9rem; }
  nav a { font-size: .65rem; }
  .hero, .bio-grid { grid-template-columns: 1fr; }
  .hero { gap: 4rem; min-height: auto; padding: 5rem 0; }
  .signal-card { max-width: 480px; }
  .post-list li { grid-template-columns: 1fr auto; gap: .5rem 1rem; }
  .post-list time { grid-column: 1 / -1; }
  .split-callout, .deck-card { grid-template-columns: 1fr; }
  .split-callout { gap: 1rem; margin-top: 5rem; }
  .deck-preview { min-height: 330px; }
  .tag-sections, .principles { grid-template-columns: 1fr; }
  .article-header { padding-top: 2.5rem; }
  .back-link { margin-bottom: 2.5rem; }
}

@media (max-width: 520px) {
  .site-header { align-items: flex-start; padding: 1.2rem 0; }
  .header-actions { gap: .5rem; }
  nav { gap: .6rem; }
  .theme-toggle { width: 2rem; height: 2rem; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.5rem); }
  .hero-actions .button, .deck-actions .button { width: 100%; }
  .section-heading { align-items: flex-start; }
  .section-heading > div { display: block; }
  .section-heading > a { max-width: 7rem; text-align: right; }
  .prose pre { margin-inline: -.5rem; border-radius: .4rem; }
  .speaker-note, .profile-links a { display: grid; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
