:root {
  --bg: #000;
  --fg: #fff;
  --soft: #d4d4d4;
  --muted: #8f8f8f;
  --line: #262626;
  --panel: #0e0e0e;
  --code-bg: #141414;
  --font: Poppins, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 17px; line-height: 1.7; font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

/* ---------- header / footer ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 40px; background: rgba(0,0,0,.88);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.logo { display: inline-block; line-height: 0; }
.logo img { height: 40px; width: auto; }
.site-footer .logo img { margin: 0 auto; }
nav { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 500; }
nav a { text-decoration: none; color: var(--soft); }
nav a:hover { color: var(--fg); }
.nav-cta { border: 1px solid #fff; color: #fff !important; padding: 7px 16px; border-radius: 999px; }
.nav-cta:hover { background: #fff; color: #000 !important; }

.site-footer { border-top: 1px solid var(--line); text-align: center; padding: 48px 20px 40px; margin-top: 40px; }
.footer-links { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; font-size: 14px; margin: 16px 0 8px; }
.footer-links a { color: var(--soft); text-decoration: none; }
.footer-links a:hover { color: #fff; }
.copy { color: var(--muted); font-size: 13px; margin: 0; }

/* ---------- shared bits ---------- */
.eyebrow {
  text-transform: uppercase; letter-spacing: .55em; font-size: 13px; font-weight: 400;
  color: var(--soft); margin: 0 0 14px; padding-left: .55em;
}
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 13px 26px; border-radius: 10px; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: #fff; color: #000; }
.btn-ghost { border: 1px solid #3a3a3a; color: #fff; }
.btn-ghost:hover { border-color: #fff; }

/* ---------- hero ---------- */
.hero { text-align: center; max-width: 760px; margin: 0 auto; padding: 72px 20px 40px; }
.portrait {
  width: 200px; height: 200px; border-radius: 50%; object-fit: cover; margin: 0 auto 32px;
  box-shadow: 0 0 0 1px #2a2a2a, 0 30px 80px rgba(255,255,255,.08);
}
.hero h1 {
  font-size: clamp(38px, 6.4vw, 64px); line-height: 1.08; font-weight: 800;
  letter-spacing: -0.02em; margin: 0 0 22px;
}
.lede { color: var(--soft); font-size: 18px; max-width: 560px; margin: 0 auto 34px; }
.actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-about { padding-bottom: 8px; }

/* ---------- sections ---------- */
.block { max-width: 1040px; margin: 0 auto; padding: 96px 20px 0; text-align: center; }
.block-title { font-size: clamp(32px, 5vw, 46px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 10px; }
.block-sub { color: var(--soft); margin: 0 0 48px; }

.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; }
.project {
  display: flex; flex-direction: column; text-decoration: none; background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px; padding: 26px;
  transition: border-color .15s ease, transform .15s ease;
}
.project:hover { border-color: #555; transform: translateY(-2px); }
.project-label { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.project h3 { font-size: 24px; font-weight: 800; margin: 8px 0 8px; letter-spacing: -0.01em; }
.project p { color: var(--soft); font-size: 15px; margin: 0 0 20px; flex: 1; }
.link { font-weight: 600; font-size: 14px; }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px 32px; text-align: left; }
.card-cover { display: block; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #111; margin-bottom: 22px; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-cover img { transform: scale(1.03); }
.cover-fallback { display: flex; align-items: center; justify-content: center; height: 100%; padding: 24px; font-weight: 800; font-size: 26px; text-align: center; }
.card h3 { font-size: 24px; font-weight: 800; line-height: 1.25; margin: 0 0 10px; letter-spacing: -0.01em; }
.card h3 a { text-decoration: none; }
.card p { color: var(--soft); margin: 0 0 18px; font-size: 16px; }
.read { font-weight: 700; font-style: italic; font-size: 14px; text-underline-offset: 4px; }
.byline { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 14px; font-size: 13px; font-style: italic; color: var(--soft); }
.byline span { margin: 0 8px; color: var(--muted); }

.subscribe {
  max-width: 760px; margin: 110px auto 0; padding: 56px 28px; text-align: center;
  border: 1px solid var(--line); border-radius: 20px;
  background: radial-gradient(ellipse at top, #1c1c1c, #000 70%);
}
.subscribe h2 { font-size: clamp(28px, 4.4vw, 40px); font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 14px; }
.subscribe p { color: var(--soft); margin: 0 auto 28px; max-width: 480px; }

/* ---------- post ---------- */
.post { max-width: 720px; margin: 0 auto; padding: 64px 20px 0; }
.post-header { text-align: center; }
.post-header .eyebrow { letter-spacing: .3em; padding-left: .3em; font-size: 12px; }
.post-header h1 { font-size: clamp(36px, 6vw, 58px); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 20px; }
.post-dek { color: var(--soft); font-size: 19px; margin: 0 auto 28px; max-width: 620px; }
.author { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; color: var(--soft); }
.author img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.author strong { color: #fff; font-weight: 600; }
.post-cover { width: 100%; border-radius: 10px; margin: 44px 0 8px; }

.post-body { font-size: 18px; line-height: 1.85; color: #e8e8e8; font-weight: 300; padding-top: 24px; }
.post-body strong { color: #fff; font-weight: 600; }
.post-body a { text-underline-offset: 4px; }
.post-body h1 { font-size: 40px; font-weight: 800; }
.post-body h2 { font-size: 30px; font-weight: 800; line-height: 1.2; letter-spacing: -0.015em; margin: 2.2em 0 .6em; color: #fff; }
.post-body h3 { font-size: 21px; font-weight: 700; margin: 1.8em 0 .5em; color: #fff; }
.post-body blockquote {
  margin: 2em 0; padding: 4px 0 4px 24px; border-left: 3px solid #fff;
  font-size: 22px; line-height: 1.5; font-weight: 600; color: #fff; font-style: normal;
}
.post-body blockquote p { margin: 0; }
.post-body code { font-family: var(--mono); font-size: .8em; background: var(--code-bg); padding: .15em .4em; border-radius: 4px; }
.post-body pre {
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 20px; overflow-x: auto; font-size: 14.5px; line-height: 1.6;
}
.post-body pre code { background: none; padding: 0; font-size: inherit; white-space: pre; color: #dcdcdc; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }
.post-body li { margin: .35em 0; }
.post-body li::marker { color: var(--muted); }
.post-body img { border-radius: 8px; }

.comments { max-width: 720px; margin: 80px auto 0; padding: 0 20px; }
.comments h2 { font-size: 22px; font-weight: 800; margin: 0 0 18px; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .projects { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header { padding: 10px 16px; }
  .logo img { height: 34px; }
  nav { gap: 16px; font-size: 13px; }
  nav a:not(.nav-cta):first-child { display: none; }
  .nav-cta { padding: 6px 12px; }
  .hero { padding: 48px 16px 24px; }
  .portrait { width: 160px; height: 160px; }
  .lede { font-size: 16.5px; }
  .block { padding: 72px 16px 0; }
  .cards { grid-template-columns: 1fr; gap: 56px; }
  .subscribe { margin: 80px 16px 0; padding: 44px 20px; }
  .post { padding: 44px 16px 0; }
  .post-body { font-size: 17px; }
  .post-body h2 { font-size: 25px; }
  .post-body blockquote { font-size: 19px; }
  .comments { padding: 0 16px; }
}

/* a lone post card sits centered instead of hugging the left column */
.cards:has(> .card:only-child) { grid-template-columns: minmax(0, 560px); justify-content: center; }
