:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --panel: #ffffff;
  --ink: #1d2528;
  --muted: #607075;
  --line: #d8ddd6;
  --accent: #087f8c;
  --accent-strong: #0b4f6c;
  --code-bg: #172026;
  --code-ink: #e7f0ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
}

.site-header,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
}

.brand,
nav,
.meta,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

nav {
  gap: 6px;
}

nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

nav a[aria-current="page"] {
  background: #e3f2ee;
  color: var(--accent-strong);
  font-weight: 700;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: 360px;
  display: grid;
  align-items: center;
  border-block: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(247, 245, 239, 0.92), rgba(247, 245, 239, 0.66)),
    url("/images/desk-setup.svg") right center / min(58vw, 680px) auto no-repeat;
}

.hero div {
  width: min(700px, 100%);
  padding: 52px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.18;
}

.hero h1,
.narrow h1 {
  max-width: 800px;
  font-size: clamp(2.1rem, 6vw, 4.2rem);
}

.hero p,
.post header p,
.profile > p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.08rem;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  padding: 32px 0 64px;
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

.category-nav a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  padding: 7px 12px;
  text-decoration: none;
  font-size: 0.92rem;
}

.category-nav a[aria-current="page"] {
  border-color: #b6ddd8;
  background: #e3f2ee;
  color: var(--accent-strong);
  font-weight: 800;
}

.category-heading {
  padding-bottom: 24px;
}

.post-card {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.post-card a {
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  text-decoration: none;
}

.post-card time,
.post time {
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 700;
}

.post-card h2 {
  font-size: 1.45rem;
}

.post-card p {
  margin: 0;
  color: var(--muted);
}

.meta {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.narrow {
  width: min(820px, 100%);
  margin: 0 auto;
  padding: 64px 0;
}

.profile code,
.post :not(pre) > code {
  border-radius: 5px;
  background: #e9eee9;
  padding: 0.15em 0.35em;
  font-size: 0.92em;
}

.facts {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}

.facts div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.facts dt {
  font-weight: 800;
}

.facts dd {
  margin: 0;
  color: var(--muted);
}

.post header {
  margin-bottom: 40px;
}

.back-link {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.post h2 {
  margin-top: 38px;
  font-size: 1.7rem;
}

.post p,
.post li {
  color: #354347;
}

.post img {
  width: 100%;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

pre {
  overflow-x: auto;
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 18px;
  line-height: 1.55;
}

pre code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 0 16px;
  text-decoration: none;
  font-weight: 800;
}

.site-footer {
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 28px 0 34px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: 460px;
    align-items: start;
    background:
      linear-gradient(180deg, rgba(247, 245, 239, 0.96), rgba(247, 245, 239, 0.76)),
      url("/images/desk-setup.svg") center bottom / 520px auto no-repeat;
  }

  .hero div {
    padding-top: 36px;
  }

  .facts div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
