@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg: #f4efe7;
  --surface: rgba(255, 250, 242, 0.75);
  --surface-strong: #fffaf2;
  --ink: #181511;
  --ink-muted: #655d55;
  --accent: #bf4f2f;
  --accent-soft: #e6b9a4;
  --border: rgba(24, 21, 17, 0.12);
  --shadow: 0 18px 50px rgba(41, 28, 17, 0.08);
  --radius: 18px;
  --max-w: 960px;
  --gap: 2rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 18px; scroll-behavior: smooth; }

body {
  background:
    radial-gradient(circle at top left, rgba(191, 79, 47, 0.16), transparent 32%),
    radial-gradient(circle at 85% 20%, rgba(230, 185, 164, 0.45), transparent 22%),
    linear-gradient(180deg, #f8f3eb 0%, var(--bg) 40%, #efe6da 100%);
  color: var(--ink);
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  line-height: 1.7;
  padding: 3rem 1.5rem 6rem;
  min-height: 100vh;
}

main {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}

main::before {
  content: "";
  position: absolute;
  inset: -1.5rem 0 auto auto;
  width: 14rem;
  height: 14rem;
  border: 1px solid rgba(24, 21, 17, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

header {
  background: rgba(255, 250, 242, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.5rem 1.2rem;
  margin-bottom: 3rem;
}

.eyebrow,
.card-label,
.hero-kicker,
.post-meta {
  color: var(--ink-muted);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

header .site-title {
  font-family: 'DM Serif Display', serif;
  font-size: 3.4rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: 0.25rem;
}

header .site-title em {
  color: var(--accent);
  font-style: normal;
}

header .tagline {
  margin-top: 0.6rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
  max-width: 34rem;
}

nav {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

nav a {
  color: var(--ink-muted);
  background: rgba(255, 250, 242, 0.8);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s, transform 0.2s, background 0.2s;
}

nav a:hover {
  color: var(--accent);
  border-color: var(--accent-soft);
  background: var(--surface-strong);
  transform: translateY(-1px);
}

nav a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--accent-soft);
  background: var(--surface-strong);
}

h1, h2, h3, h4 {
  font-family: 'DM Serif Display', serif;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 0.6em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; margin-top: 2.5rem; }
h3 { font-size: 1.2rem; margin-top: 2rem; }

p { margin-bottom: 1.2rem; }

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

a:hover { opacity: 0.75; }

strong { font-weight: 500; }

em { font-style: italic; }

code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.15em 0.45em;
  font-size: 0.88em;
  color: var(--accent);
}

pre {
  background: var(--ink);
  color: #f0ece3;
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  color: var(--ink-muted);
  font-style: italic;
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

li { margin-bottom: 0.3rem; }

hr {
  border: none;
  border-top: 1px solid rgba(24, 21, 17, 0.14);
  margin: 3rem 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.hero {
  padding: 3rem 0 1rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 0.98;
  max-width: 12ch;
  margin-bottom: 1rem;
}

.hero-copy {
  max-width: 38rem;
  color: var(--ink-muted);
  font-size: 1rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.8rem;
}

.hero-stat {
  min-width: 9rem;
  background: rgba(255, 250, 242, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
}

.hero-stat-value {
  display: block;
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  line-height: 1;
}

.hero-stat-label {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink-muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-heading p {
  margin-bottom: 0.6rem;
}

.section-shell {
  padding: 0.25rem 0;
}

.page-intro {
  padding: 2rem 0 1rem;
}

.page-intro h1,
.article-shell h1 {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  line-height: 1;
  max-width: 12ch;
}

.stack > * + * {
  margin-top: 1rem;
}

.note-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card,
.post-card {
  height: 100%;
}

.project-card h3,
.post-card h3,
.note-grid h3 {
  margin-top: 0.35rem;
}

.project-card a {
  font-size: 0.9rem;
}

.prose-block {
  max-width: 42rem;
}

.article-shell {
  max-width: 44rem;
  padding: 2rem 0 1rem;
}

.article-lead {
  color: var(--ink-muted);
  font-size: 1.08rem;
  max-width: 40rem;
}

.btn {
  display: inline-block;
  background: var(--ink);
  color: #f7f1e8;
  text-decoration: none;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, border-color 0.2s;
}

.btn:hover { background: var(--accent); color: #fff; opacity: 1; }
.btn:active { transform: translateY(1px); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(24, 21, 17, 0.2);
}

.btn-outline:hover { background: var(--surface-strong); color: var(--ink); }

footer {
  max-width: var(--max-w);
  margin: 4rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(24, 21, 17, 0.14);
  color: var(--ink-muted);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.text-muted  { color: var(--ink-muted); }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

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

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

  .page-intro h1,
  .article-shell h1 {
    max-width: none;
  }
}

@media (max-width: 560px) {
  html { font-size: 16px; }
  body { padding: 1rem 1rem 4rem; }
  header { padding: 1.2rem 1rem; }
  header .site-title { font-size: 2.4rem; }
  .hero { padding-top: 2rem; }
  .hero h1 { max-width: none; }
  .hero-stat { width: 100%; }
  .btn { width: 100%; text-align: center; }
}
