@font-face {
  font-family: "Endroid Serif";
  src: url("fonts/anthropic_serif.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Endroid Sans";
  src: url("fonts/anthropic_sans.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains_mono.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #faf9f5;
  --bg-elevated: #f3f1ea;
  --bg-card: #ffffff;
  --ink: #141413;
  --ink-soft: #3d3d3a;
  --muted: #73726c;
  --line: #e8e6dc;
  --accent: #d97757;
  --accent-soft: #f3e2da;
  --accent-deep: #b55a3c;
  --shadow: 0 1px 2px rgba(20, 20, 19, 0.04), 0 8px 24px rgba(20, 20, 19, 0.04);
  --radius: 16px;
  --radius-sm: 10px;
  --shell: min(1080px, calc(100% - 2.5rem));
  --serif: "Endroid Serif", "Georgia", "Times New Roman", serif;
  --sans: "Endroid Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-deep); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-elevated);
  padding: 0.12em 0.4em;
  border-radius: 6px;
}

.shell { width: var(--shell); margin-inline: auto; }
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 245, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--ink); font-weight: 600;
  margin-right: auto;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  color: #fff; display: grid; place-items: center;
  font-family: var(--serif); font-size: 1rem;
}
.brand-text { font-size: 0.95rem; letter-spacing: -0.01em; }
.nav { display: flex; gap: 1.25rem; }
.nav a {
  text-decoration: none; color: var(--ink-soft); font-size: 0.92rem;
}
.nav a:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  border-radius: 999px; padding: 0.7rem 1.15rem;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 600;
  text-decoration: none; border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.btn-primary {
  background: var(--ink); color: #faf9f5 !important;
}
.btn-primary:hover { background: #2a2a28; color: #fff !important; }
.btn-ghost {
  background: transparent; color: var(--ink) !important;
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--bg-elevated); }
.btn.full { width: 100%; }

.icon { width: 22px; height: 22px; stroke-width: 1.75; }
.icon-sm { width: 16px; height: 16px; stroke-width: 1.85; vertical-align: -0.15em; }

/* Hero */
.hero {
  padding: 4.5rem 0 3.5rem;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--muted); font-size: 0.9rem; margin: 0 0 1.25rem;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  max-width: 14ch;
}
.accent-text { color: var(--accent-deep); }
.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 38rem;
  margin: 0 0 1.75rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }
.hero-meta {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.25rem;
  color: var(--muted); font-size: 0.9rem;
}
.hero-meta li { display: inline-flex; align-items: center; gap: 0.35rem; }

/* Sections */
.section { padding: 3.5rem 0; }
.section-head { margin-bottom: 1.75rem; max-width: 36rem; }
.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}
.section-head p { margin: 0; color: var(--muted); }
.prose { color: var(--ink-soft); max-width: 38rem; }
.lead-sm { color: var(--ink-soft); font-size: 1.05rem; }

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  display: flex; gap: 1rem;
  transition: border-color .2s ease, transform .2s ease;
}
.project-card:hover { border-color: #d6d3c8; transform: translateY(-2px); }
.project-card.featured { grid-column: span 1; }
.project-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-deep);
  display: grid; place-items: center; flex-shrink: 0;
}
.project-icon .icon, .project-icon svg { width: 20px; height: 20px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.4rem; }
.project-tags span {
  font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); background: var(--bg-elevated);
  padding: 0.2rem 0.5rem; border-radius: 999px;
}
.project-body h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}
.project-body p {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
  font-size: 0.96rem;
}
.project-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.project-links a {
  display: inline-flex; align-items: center; gap: 0.25rem;
  text-decoration: none; font-weight: 600; font-size: 0.9rem;
  color: var(--ink);
}
.project-links a:hover { color: var(--accent-deep); }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: start;
}
.stat-row {
  list-style: none; padding: 0; margin: 1.75rem 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem;
}
.stat-row li {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}
.stat-row strong { display: block; font-family: var(--serif); font-weight: 500; }
.stat-row span { color: var(--muted); font-size: 0.85rem; }

.aside-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}
.aside-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  margin: 0 0 1rem;
}
.checklist {
  list-style: none; padding: 0; margin: 0 0 1.25rem;
}
.checklist li {
  display: flex; gap: 0.5rem; align-items: flex-start;
  padding: 0.45rem 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.checklist .icon-sm { color: var(--accent-deep); margin-top: 0.15rem; }

/* Services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
}
.service-card .icon { color: var(--accent-deep); margin-bottom: 0.75rem; }
.service-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
}
.service-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* FAQ */
.faq-list { display: grid; gap: 0.6rem; max-width: 42rem; }
.faq-list details {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list details p { margin: 0.6rem 0 0; color: var(--ink-soft); }

/* Contact */
.contact-panel {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem;
}
.contact-panel h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2rem;
  margin: 0 0 0.5rem;
}
.contact-lines {
  list-style: none; padding: 0; margin: 1.5rem 0 0;
  display: grid; gap: 0.75rem;
}
.contact-lines li {
  display: flex; align-items: center; gap: 0.55rem;
  color: var(--ink-soft);
}
.contact-lines a { color: var(--ink); text-decoration: none; font-weight: 600; }
.contact-lines a:hover { color: var(--accent-deep); }
.contact-cta-block { display: grid; gap: 0.65rem; align-content: center; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  margin-top: 1rem;
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  justify-content: space-between;
  color: var(--muted); font-size: 0.9rem;
}
.footer-inner p { margin: 0; }
.muted { color: var(--muted); }

.seo-article {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

@media (max-width: 900px) {
  .nav { display: none; }
  .project-grid,
  .service-grid,
  .about-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }
  .stat-row { grid-template-columns: 1fr; }
  .hero { padding-top: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover, .project-card:hover { transform: none; }
}
