:root {
  --ink: #172331;
  --muted: #5d6976;
  --subtle: #7c8792;
  --blue: #164f78;
  --blue-strong: #0f3e60;
  --blue-soft: #edf4f8;
  --paper: #ffffff;
  --surface: #f7f9fb;
  --line: #dbe2e8;
  --line-strong: #bfcbd4;
  --max: 1120px;
  --content: 820px;
  --sans: "Noto Sans KR", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 3px solid #6aa2c5;
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

.shell {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--blue);
  color: #fff;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  white-space: nowrap;
}

.brand strong {
  color: var(--blue-strong);
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.brand small {
  color: var(--subtle);
  font-size: 0.76rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  color: #465463;
  font-size: 0.9rem;
}

.site-nav a {
  padding-block: 4px;
}

.site-nav a:hover {
  color: var(--blue);
}

.site-nav .nav-github {
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
}

.home-intro {
  padding-block: clamp(70px, 10vw, 118px) 58px;
}

.home-intro h1,
.page-hero h1,
.project-hero h1,
.post-header h1 {
  margin: 0;
  color: var(--blue-strong);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.16;
}

.home-intro h1 {
  font-size: clamp(2.8rem, 7vw, 5.4rem);
}

.home-role {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: clamp(1.12rem, 2.2vw, 1.45rem);
  font-weight: 600;
}

.home-description {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.eyebrow,
.section-kicker,
.project-period,
.project-type,
.note-tag {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.fact-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 46px;
  border-block: 1px solid var(--line-strong);
}

.fact-strip div {
  padding: 20px 24px 20px 0;
}

.fact-strip div + div {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.fact-strip dt,
.project-facts dt {
  color: var(--subtle);
  font-size: 0.76rem;
  font-weight: 700;
}

.fact-strip dd,
.project-facts dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.5;
}

.section {
  padding-block: clamp(62px, 9vw, 100px);
}

.section-tinted {
  background: var(--surface);
  border-block: 1px solid #edf0f2;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.section-heading > a {
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 700;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.project-card {
  position: relative;
  display: flex;
  min-height: 290px;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  background: #fff;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: #9fb5c5;
  box-shadow: 0 12px 26px rgba(18, 50, 72, 0.08);
}

.project-card-featured,
.project-index-card-featured {
  grid-column: 1 / -1;
  border-top-color: #0f7591;
  background: linear-gradient(135deg, #ffffff 0%, #f3f8fa 100%);
}

.project-card-featured {
  min-height: 255px;
}

.project-card h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: -0.025em;
}

.project-card .card-description {
  margin: 14px 0 20px;
  color: var(--muted);
}

.card-stack {
  margin: auto 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 0.82rem;
}

.card-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 700;
}

.career-list {
  border-top: 1px solid var(--line-strong);
}

.career-row {
  display: grid;
  grid-template-columns: 180px 230px 1fr;
  gap: 30px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.career-period {
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 700;
}

.career-company {
  font-weight: 700;
}

.career-row p {
  margin: 0;
  color: var(--muted);
}

.note-list {
  border-top: 1px solid var(--line-strong);
}

.note-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 28px;
  align-items: start;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.note-date {
  color: var(--subtle);
  font-size: 0.85rem;
}

.note-row h3 {
  margin: 2px 0 7px;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
}

.note-row h3 a:hover {
  color: var(--blue);
}

.note-row p:not(.note-tag) {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.note-arrow {
  color: var(--blue);
  font-weight: 700;
}

.page-hero {
  padding-block: clamp(64px, 9vw, 100px) 48px;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
}

.page-hero > p:last-child {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
}

.project-index,
.career-page,
.archive {
  padding-block: 58px 100px;
}

.project-index-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.project-index-card {
  padding: 26px;
  border: 1px solid var(--line);
  background: #fff;
}

.project-index-card:hover {
  border-color: #9fb5c5;
}

.project-index-card h2 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
}

.project-index-card p:not(.project-type) {
  margin: 0;
  color: var(--muted);
}

.project-index-card .card-stack {
  margin-top: 22px;
}

.project-hero {
  padding-block: 54px 48px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.back-link {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 700;
}

.project-hero h1 {
  max-width: 900px;
  font-size: clamp(2.45rem, 5.5vw, 4.25rem);
}

.project-summary {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.project-facts {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1.5fr;
  margin: 38px 0 0;
  border-top: 1px solid var(--line-strong);
}

.project-facts div {
  padding: 18px 24px 0 0;
}

.project-content {
  max-width: var(--content);
  padding-block: 58px 100px;
}

.project-content h2,
.post-body h2,
.prose-page h2 {
  margin: 52px 0 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 1.55rem;
  letter-spacing: -0.025em;
}

.project-content h2:first-child,
.post-body h2:first-child,
.prose-page h2:first-child {
  margin-top: 0;
}

.project-content h3,
.post-body h3 {
  margin: 30px 0 9px;
  font-size: 1.1rem;
}

.project-content p,
.project-content li,
.post-body p,
.post-body li,
.prose-page p,
.prose-page li {
  color: #465463;
}

.project-content ul,
.post-body ul,
.prose-page ul {
  padding-left: 1.2rem;
}

.project-content li + li,
.post-body li + li,
.prose-page li + li {
  margin-top: 7px;
}

.project-content code {
  padding: 2px 5px;
  background: var(--blue-soft);
  color: var(--blue-strong);
  font-size: 0.9em;
}

.project-content table,
.post-body table,
.prose-page table {
  width: 100%;
  margin: 22px 0 32px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.project-content th,
.project-content td,
.post-body th,
.post-body td,
.prose-page th,
.prose-page td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.project-content th,
.post-body th,
.prose-page th {
  width: 22%;
  color: var(--blue-strong);
  background: var(--blue-soft);
}

.flow-list {
  margin: 24px 0;
  padding: 0;
  counter-reset: flow;
  list-style: none;
}

.flow-list li {
  position: relative;
  padding: 14px 16px 14px 52px;
  border-bottom: 1px solid var(--line);
  counter-increment: flow;
}

.flow-list li::before {
  content: counter(flow, decimal-leading-zero);
  position: absolute;
  top: 14px;
  left: 8px;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 700;
}

.evidence-figure {
  margin: 34px 0;
}

.evidence-figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  background: #eef1f4;
}

.evidence-figure figcaption {
  margin-top: 9px;
  color: var(--subtle);
  font-size: 0.8rem;
}

.evidence-figure-compact {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 34px 0;
}

.image-grid .evidence-figure {
  margin: 0;
}

.scope-note {
  margin: 32px 0;
  padding: 15px 18px;
  border-left: 3px solid var(--blue);
  background: var(--blue-soft);
  color: #3d5363;
  font-size: 0.9rem;
}

.project-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 34px 0 18px;
  border-block: 1px solid var(--line-strong);
}

.project-metrics div {
  padding: 20px 16px;
  text-align: center;
}

.project-metrics div + div {
  border-left: 1px solid var(--line);
}

.project-metrics strong {
  display: block;
  color: var(--blue-strong);
  font-size: 1.9rem;
  line-height: 1.1;
}

.project-metrics span {
  display: block;
  margin-top: 7px;
  color: var(--subtle);
  font-size: 0.76rem;
  font-weight: 700;
}

.architecture-diagram {
  margin: 28px 0 42px;
}

.architecture-layer {
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.architecture-entry,
.architecture-store {
  background: var(--surface);
}

.architecture-flower {
  border-color: #a9c4d4;
  background: #f1f7fa;
}

.architecture-action {
  border-color: #9fc1c7;
  background: #f0f8f8;
}

.architecture-primary {
  border-color: #9cbccc;
  background: #f1f7fa;
}

.diagram-label {
  margin: 0 0 11px !important;
  color: var(--blue) !important;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.architecture-items {
  display: grid;
  gap: 10px;
}

.architecture-items-2 {
  grid-template-columns: repeat(2, 1fr);
}

.architecture-items-3 {
  grid-template-columns: repeat(3, 1fr);
}

.architecture-items > div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
}

.architecture-items > .diagram-focus {
  border-color: #8fb3c8;
  background: #edf5f9;
}

.architecture-items strong,
.architecture-items span {
  display: block;
}

.architecture-items strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.architecture-items span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.55;
}

.diagram-connector {
  position: relative;
  height: 48px;
  display: grid;
  place-items: center;
}

.diagram-connector::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--line-strong);
}

.diagram-connector::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: calc(50% - 4px);
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--blue);
  border-bottom: 1px solid var(--blue);
  transform: rotate(45deg);
}

.diagram-connector span {
  position: relative;
  z-index: 1;
  padding: 2px 9px;
  background: var(--paper);
  color: var(--subtle);
  font-size: 0.7rem;
  font-weight: 700;
}

.worker-lanes {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.worker-lanes span {
  padding: 4px 9px;
  border: 1px solid #bfd2dc;
  background: #fff;
  color: #456577;
  font-size: 0.7rem;
  font-weight: 700;
}

.control-pipeline {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.control-pipeline span {
  position: relative;
  display: grid;
  min-height: 54px;
  place-items: center;
  padding: 7px;
  border: 1px solid #b8d3d5;
  background: #fff;
  color: #355c62;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.control-pipeline span:not(:last-child)::after {
  content: "›";
  position: absolute;
  z-index: 2;
  right: -7px;
  color: #78989d;
  font-size: 0.9rem;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 28px 0 40px;
}

.process-grid article {
  position: relative;
  min-height: 184px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.process-grid article > span {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.process-grid h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1rem;
}

.process-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

.incident-flow {
  margin: 28px 0 42px;
}

.incident-phase {
  padding: 20px;
  border: 1px solid var(--line);
  background: #fff;
}

.incident-phase > header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.incident-phase > header > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid #9cbccc;
  background: #f1f7fa;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
}

.incident-phase > header strong,
.incident-phase > header small {
  display: block;
}

.incident-phase > header strong {
  color: var(--ink);
  font-size: 1rem;
}

.incident-phase > header small {
  margin-top: 3px;
  color: var(--subtle);
  font-size: 0.7rem;
  font-weight: 700;
}

.incident-phase-evidence {
  background: #fbfcfd;
}

.incident-phase-agent {
  border-color: #9cbccc;
  background: #f5f9fb;
}

.incident-phase-finish {
  background: var(--surface);
}

.incident-steps {
  display: grid;
  gap: 9px;
}

.incident-steps-4 {
  grid-template-columns: repeat(4, 1fr);
}

.incident-steps-3 {
  grid-template-columns: repeat(3, 1fr);
}

.incident-steps article {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.incident-steps article b {
  display: block;
  margin-bottom: 13px;
  color: var(--blue);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.incident-steps article h3 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 0.88rem;
}

.incident-steps article p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.58;
}

.incident-phase-connector {
  position: relative;
  display: grid;
  height: 48px;
  place-items: center;
}

.incident-phase-connector::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: 1px;
  background: var(--line-strong);
}

.incident-phase-connector::after {
  content: "";
  position: absolute;
  bottom: 1px;
  left: calc(50% - 4px);
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--blue);
  border-bottom: 1px solid var(--blue);
  transform: rotate(45deg);
}

.incident-phase-connector span {
  position: relative;
  padding: 2px 9px;
  background: var(--paper);
  color: var(--subtle);
  font-size: 0.68rem;
  font-weight: 700;
}

.incident-loop-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid #9cbccc;
  background: #f4f8fa;
  color: var(--muted);
  font-size: 0.72rem;
}

.incident-loop-note span {
  color: var(--blue);
  font-weight: 800;
}

.incident-loop-note strong {
  color: var(--ink);
  font-size: 0.75rem;
}

.runner-pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 0 0 14px;
}

.runner-pipeline span {
  position: relative;
  display: grid;
  min-height: 48px;
  place-items: center;
  padding: 8px;
  border: 1px solid #b7cdd9;
  background: #fff;
  color: #355c70;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.runner-pipeline span:not(:last-child)::after {
  content: "›";
  position: absolute;
  z-index: 2;
  right: -7px;
  color: #7898aa;
  font-size: 0.9rem;
}

.evidence-loop {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 7px;
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed #9cbccc;
  background: #edf5f9;
}

.evidence-loop > div {
  min-width: 0;
  padding: 10px;
  background: #fff;
}

.evidence-loop span,
.evidence-loop strong,
.evidence-loop small {
  display: block;
}

.evidence-loop span {
  color: var(--blue);
  font-size: 0.64rem;
  font-weight: 800;
}

.evidence-loop strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 0.76rem;
}

.evidence-loop small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.45;
}

.evidence-loop > i {
  align-self: center;
  color: #6b91a5;
  font-style: normal;
  font-weight: 800;
}

.incident-boundary-note {
  margin: 12px 0 0 !important;
  padding: 11px 13px;
  border: 1px solid #c2d5de;
  background: #fff;
  color: #486878 !important;
  font-size: 0.74rem !important;
}

.hierarchy-diagram {
  margin: 30px 0 42px;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.hierarchy-node {
  max-width: 590px;
  margin: 0 auto;
  padding: 15px 18px;
  border: 1px solid var(--line-strong);
  background: #fff;
  text-align: center;
}

.hierarchy-root {
  border-color: #9cbccc;
}

.hierarchy-flower-node {
  border-color: #9cbccc;
  background: #f1f7fa;
}

.hierarchy-action-node {
  border-color: #9ac1c2;
  background: #eef8f7;
}

.hierarchy-node span,
.hierarchy-node strong,
.hierarchy-node small {
  display: block;
}

.hierarchy-node span {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.hierarchy-node strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 0.95rem;
}

.hierarchy-node small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.72rem;
}

.hierarchy-arrow {
  padding: 7px 0;
  color: #7590a0;
  font-size: 1rem;
  line-height: 1;
  text-align: center;
}

.hierarchy-branch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 590px;
  margin: 10px auto 0;
}

.hierarchy-branch div {
  padding: 12px;
  border: 1px dashed var(--line-strong);
  background: #fff;
  text-align: center;
}

.hierarchy-branch strong,
.hierarchy-branch span {
  display: block;
}

.hierarchy-branch strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.hierarchy-branch span {
  margin-top: 3px;
  color: var(--subtle);
  font-size: 0.68rem;
}

.hierarchy-steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  max-width: 720px;
  margin: 10px auto 0;
}

.hierarchy-steps span {
  padding: 8px 5px;
  border: 1px solid #c7d7df;
  background: #fff;
  color: #536978;
  font-size: 0.66rem;
  font-weight: 700;
  text-align: center;
}

.compact-process {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin: 28px 0 32px;
}

.compact-process span {
  display: grid;
  flex: 1;
  min-width: 0;
  place-items: center;
  padding: 11px 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: #4e6372;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.compact-process b {
  display: grid;
  place-items: center;
  color: #89a0ae;
  font-weight: 400;
}

.archive-year {
  display: grid;
  grid-template-columns: 110px 1fr;
  border-top: 1px solid var(--line-strong);
}

.archive-year h2 {
  margin: 0;
  padding-top: 24px;
  color: var(--blue);
  font-size: 1.35rem;
}

.archive-item {
  grid-column: 2;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.archive-item time {
  color: var(--subtle);
  font-size: 0.82rem;
}

.archive-item h3 {
  margin: 2px 0 6px;
  font-size: 1.2rem;
}

.archive-item h3 a:hover {
  color: var(--blue);
}

.archive-item p:not(.note-tag) {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.prose-page {
  max-width: var(--content);
  padding-block: 58px 100px;
}

.post {
  max-width: var(--content);
  padding-block: 58px 100px;
}

.post-header {
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.post-meta {
  display: flex;
  gap: 14px;
  margin: 0 0 12px;
  color: var(--subtle);
  font-size: 0.8rem;
}

.post-meta span::before {
  content: "·";
  margin-right: 14px;
}

.post-header h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.post-lead {
  margin: 16px 0 0;
  color: var(--muted);
}

.tag-list,
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li,
.chip-list li {
  padding: 4px 8px;
  border: 1px solid var(--line);
  color: #586875;
  font-size: 0.74rem;
}

.post-body {
  padding-block: 46px 24px;
}

.post-body code {
  padding: 2px 5px;
  background: var(--blue-soft);
  color: var(--blue-strong);
}

.post-body pre {
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--line);
  background: #f7f9fa;
}

.post-body pre code {
  padding: 0;
  background: transparent;
}

.post-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 0.82rem;
}

.post-footer p {
  margin: 0 0 6px;
}

.post-footer a {
  color: var(--blue);
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 0.8rem;
}

.footer-inner {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-inner p {
  margin: 0;
}

.not-found {
  min-height: 65vh;
  display: grid;
  align-content: center;
}

.not-found h1 {
  margin: 0;
  color: var(--blue-strong);
  font-size: 3rem;
}

@media (max-width: 820px) {
  .project-grid,
  .project-index-grid {
    grid-template-columns: 1fr;
  }

  .career-row {
    grid-template-columns: 140px 1fr;
    gap: 10px 24px;
  }

  .career-row p {
    grid-column: 2;
  }

  .project-facts {
    grid-template-columns: 1fr;
  }

  .project-facts div + div {
    margin-top: 14px;
  }

  .control-pipeline {
    grid-template-columns: repeat(4, 1fr);
  }

  .control-pipeline span:not(:last-child)::after {
    display: none;
  }

  .compact-process {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .compact-process b {
    display: none;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(calc(100% - 28px), var(--max));
  }

  .header-inner {
    min-height: 64px;
  }

  .brand small,
  .site-nav .nav-github {
    display: none;
  }

  .site-nav {
    gap: 14px;
    font-size: 0.8rem;
  }

  .fact-strip {
    grid-template-columns: 1fr;
  }

  .fact-strip div,
  .fact-strip div + div {
    padding: 14px 0;
    border-left: 0;
  }

  .fact-strip div + div {
    border-top: 1px solid var(--line);
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .career-row {
    grid-template-columns: 1fr;
  }

  .career-row p {
    grid-column: 1;
  }

  .note-row {
    grid-template-columns: 1fr auto;
    gap: 8px 16px;
  }

  .note-date {
    grid-column: 1 / -1;
  }

  .archive-year {
    display: block;
  }

  .archive-year h2 {
    padding-bottom: 8px;
  }

  .archive-item {
    grid-template-columns: 58px 1fr;
  }

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

  .project-card-featured,
  .project-index-card-featured {
    grid-column: auto;
  }

  .project-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-metrics div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .project-metrics div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .architecture-items-2,
  .architecture-items-3,
  .process-grid,
  .hierarchy-branch {
    grid-template-columns: 1fr;
  }

  .incident-steps-4,
  .incident-steps-3 {
    grid-template-columns: 1fr;
  }

  .runner-pipeline {
    grid-template-columns: 1fr;
  }

  .runner-pipeline span:not(:last-child)::after {
    content: "⌄";
    right: auto;
    bottom: -9px;
  }

  .evidence-loop {
    grid-template-columns: 1fr;
  }

  .evidence-loop > i {
    justify-self: center;
    transform: rotate(90deg);
  }

  .incident-loop-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .control-pipeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid article {
    min-height: 0;
  }

  .hierarchy-diagram {
    padding: 18px 12px;
  }

  .hierarchy-steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .compact-process {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-content table,
  .post-body table,
  .prose-page table {
    display: block;
    overflow-x: auto;
  }

  .footer-inner {
    align-items: start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}
