:root {
  --bg: #fbfbf8;
  --text: #191919;
  --muted: #666;
  --line: #d9d9d2;
  --soft: #f1f1ed;
  --accent: #4f6f52;
  --accent-soft: #e6ebe4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

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

.page {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 700;
  letter-spacing: 0;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  color: var(--muted);
  font-size: 0.93rem;
}

main {
  padding: 54px 0 36px;
}

section {
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

.hero {
  padding-top: 8px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 7vw, 5rem);
  font-weight: 500;
}

h2 {
  margin-bottom: 18px;
  font-size: 1.25rem;
}

h3 {
  font-size: 1rem;
}

p {
  margin: 0;
}

.lead {
  max-width: 720px;
  margin-top: 20px;
  color: #333;
  font-size: 1.22rem;
  line-height: 1.5;
}

.small {
  margin-top: 12px;
  color: var(--muted);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.86rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid var(--text);
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-size: 0.95rem;
}

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

.button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.button.secondary:hover {
  color: white;
}

.thesis {
  max-width: 720px;
}

ul {
  margin: 14px 0 0;
  padding-left: 19px;
}

li + li {
  margin-top: 5px;
}

.notes {
  display: grid;
  gap: 18px;
}

.note {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.meta,
.tags,
.status,
footer {
  color: var(--muted);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
}

.note p {
  margin-top: 7px;
  color: #3d3d3d;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.tag,
.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  background: var(--soft);
  color: #424242;
  white-space: nowrap;
}

.badge {
  background: var(--accent-soft);
  border-color: #cbd8c8;
  color: #2f4d31;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.76rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

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

.area,
.postmortem,
.follow {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  background: #fff;
}

.area p {
  margin-top: 8px;
  color: #444;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.stat {
  min-width: 0;
  padding: 11px;
  background: #fff;
}

.stat strong {
  display: block;
  font-size: 1.05rem;
}

.stat span {
  color: var(--muted);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
}

.about {
  max-width: 690px;
}

form {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 11px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

button {
  height: 40px;
  border: 1px solid var(--text);
  border-radius: 6px;
  padding: 0 13px;
  background: var(--text);
  color: var(--bg);
  font: inherit;
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
  background: var(--accent);
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 24px 0 38px;
}

.post-page main {
  max-width: 740px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 0.92rem;
}

article.post h1 {
  margin-bottom: 16px;
}

.post-meta {
  margin-bottom: 24px;
  color: var(--muted);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
}

article.post h2 {
  margin-top: 38px;
}

article.post p {
  margin-top: 16px;
}

article.post code {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
  background: var(--soft);
}

@media (max-width: 740px) {
  header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  main {
    padding-top: 34px;
  }

  .note,
  .areas,
  .stats {
    grid-template-columns: 1fr;
  }

  form {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
