:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --paper: #ffffff;
  --ink: #202124;
  --muted: #626760;
  --line: #ded8cc;
  --accent: #0f766e;
  --accent-dark: #0b4f4a;
  --rust: #a4492d;
  --shadow: 0 22px 70px rgba(32, 33, 36, 0.10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

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

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid rgba(222, 216, 204, 0.8);
  background: rgba(246, 244, 239, 0.86);
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.hero-actions,
.tags,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 750;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--ink);
  border-radius: 50%;
}

.nav {
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover,
.site-footer a:hover {
  color: var(--accent);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(42px, 8vw, 90px) 0;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.meta {
  margin: 0 0 12px;
  color: var(--rust);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(44px, 8vw, 86px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.25;
}

.hero-lede {
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 700;
}

.button.primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.button.primary:hover {
  background: var(--accent-dark);
}

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

.hero-media {
  margin: 0;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-media figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.section {
  padding: clamp(46px, 8vw, 86px) 0;
  border-top: 1px solid var(--line);
}

.intro-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.intro-grid article,
.project,
.post {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.intro-grid article {
  padding: 24px;
}

.intro-grid p,
.project p,
.post p,
.about p {
  color: var(--muted);
  line-height: 1.7;
}

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

.search {
  display: grid;
  gap: 8px;
  min-width: min(320px, 100%);
  color: var(--muted);
  font-size: 13px;
}

.search input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  outline: none;
}

.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.posts {
  display: grid;
  gap: 14px;
}

.post {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 22px;
  padding: 24px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.post-date {
  color: var(--rust);
  font-size: 13px;
  font-weight: 750;
}

.post:hover,
.project:hover {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 16px 44px rgba(32, 33, 36, 0.08);
  transform: translateY(-2px);
}

.post h3 a,
.project h3 a {
  color: inherit;
}

.post h3 a:hover,
.project h3 a:hover {
  color: var(--accent);
}

.tags {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tags span,
.project span {
  display: inline-flex;
  color: var(--accent-dark);
  background: rgba(15, 118, 110, 0.10);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.project {
  padding: 24px;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.project span {
  margin-top: 8px;
}

.about {
  display: grid;
  grid-template-columns: 0.45fr 1fr;
  gap: clamp(24px, 5vw, 70px);
}

.facts {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
}

.facts div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.facts dt {
  color: var(--rust);
  font-weight: 800;
}

.facts dd {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  padding: 28px 0 42px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.article-main {
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
}

.article-hero {
  padding: clamp(42px, 8vw, 86px) 0 36px;
  border-bottom: 1px solid var(--line);
}

.back-link {
  display: inline-flex;
  margin-bottom: 26px;
  color: var(--accent);
  font-weight: 750;
}

.article-hero h1 {
  margin-bottom: 18px;
  font-size: clamp(38px, 7vw, 68px);
}

.article-meta {
  color: var(--muted);
  font-size: 14px;
}

.article-content {
  padding: 34px 0 72px;
}

.article-content h2 {
  margin: 42px 0 14px;
  font-size: clamp(24px, 4vw, 34px);
}

.article-content p,
.article-content li {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.article-content ul {
  padding-left: 22px;
}

.article-content pre {
  overflow-x: auto;
  margin: 24px 0;
  padding: 18px;
  color: #e8f0ed;
  background: #1d2526;
  border-radius: 8px;
}

.article-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.is-hidden {
  display: none;
}

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

  .hero,
  .about {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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

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

  .post {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 520px) {
  main,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .button {
    width: 100%;
  }

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