:root {
  --paper: #f4f1ea;
  --paper-2: #fbf9f4;
  --ink: #191712;
  --muted: #6b655b;
  --line: #e2dccf;
  --accent: #1f4d3a;
  --accent-ink: #16382a;
  --max: 1120px;
  --content: 720px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, ui-serif, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, .brand { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
h1 { line-height: 1.08; }
h2 { line-height: 1.15; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

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

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.narrow { max-width: var(--content); }

.meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 234, 0.86);
  backdrop-filter: saturate(140%) blur(8px);
  transition: box-shadow 0.35s ease;
}
.site-header.scrolled { box-shadow: 0 10px 30px rgba(20, 18, 15, 0.07); }
.site-header .container { display: flex; align-items: baseline; justify-content: space-between; min-height: 76px; gap: 20px; }
.brand { font-size: 1.35rem; color: var(--ink); display: inline-flex; align-items: baseline; gap: 2px; }
.brand:hover { text-decoration: none; }
.brand .dot { color: var(--accent); }
nav.main { font-family: var(--sans); }
nav.main a { color: var(--muted); margin-left: 26px; font-size: 0.95rem; }
nav.main a:hover { color: var(--ink); text-decoration: none; }

/* Hero */
.hero { padding: 104px 0 84px; border-bottom: 1px solid var(--line); }
.hero .meta { margin: 0 0 22px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 0 0 24px; max-width: 15ch; }
.hero p.lead { font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: var(--muted); margin: 0; max-width: 52ch; }
.hero .actions { margin-top: 36px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 2px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn:hover { text-decoration: none; background: #000; transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.link-arrow { font-weight: 600; font-family: var(--sans); }
.link-arrow .arrow { display: inline-block; transition: transform 0.25s ease; }
.link-arrow:hover .arrow { transform: translateX(5px); }

/* Project index number */
.specs .pno { font-family: var(--serif); font-size: 2.6rem; line-height: 1; color: #ccc4b4; margin: 0 0 16px; }

/* Scroll reveal (progressive enhancement: only active when .js is set) */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Sections */
section.block { padding: 88px 0; border-bottom: 1px solid var(--line); }
section.block:last-of-type { border-bottom: none; }
.section-head { display: flex; align-items: baseline; gap: 16px; margin: 0 0 44px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 0; }
.section-head .meta { margin: 0; }

/* Work / project */
.project { display: grid; grid-template-columns: 4fr 8fr; gap: 40px; align-items: start; }
.project + .project { margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--line); }
.project .specs { display: grid; gap: 14px; }
.project .specs .row { border-top: 1px solid var(--line); padding-top: 10px; }
.project .specs .row .k { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.project .specs .row .v { font-size: 0.98rem; }
.project .lead-body h3 { font-size: 1.7rem; margin: 0 0 14px; }
.project .lead-body p { color: #3a362e; margin: 0 0 18px; font-size: 1.05rem; }

/* About / founder */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: 52px; align-items: center; }
.about .portrait { position: relative; }
.about .portrait img { width: 100%; height: auto; display: block; position: relative; z-index: 1; border: 1px solid var(--line); border-radius: 6px; }
.about .portrait::after { content: ""; position: absolute; inset: 0; border: 1.5px solid var(--accent); border-radius: 6px; transform: translate(16px, 16px); z-index: 0; }
.about h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 0 0 8px; }
.about .role { margin: 0 0 22px; }
.about p { color: #3a362e; margin: 0 0 16px; }
.about .signoff { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); margin-top: 8px; }

/* Feature list (app site) */
.features { border-top: 1px solid var(--line); }
.features .item { display: grid; grid-template-columns: 3rem 1fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: start; }
.features .num { font-family: var(--serif); font-size: 1.5rem; color: var(--accent); line-height: 1.2; }
.features .item h3 { font-size: 1.2rem; margin: 0 0 6px; }
.features .item p { margin: 0; color: var(--muted); }

/* Screenshot showcase (app site): styles live in an inline <style> in index.html's
   <head> (keyed on #shots) so the gallery ships with the page even if this external
   stylesheet is cached or not re-uploaded on the host. */

/* Simple prose (subscription blurb etc.) */
.prose-inline p { color: #3a362e; max-width: 60ch; }
.disclaimer { color: var(--muted); font-size: 0.85rem; margin-top: 24px; max-width: 62ch; }

/* Legal / long-form */
.prose { padding: 72px 0 96px; }
.prose h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); margin: 0 0 8px; }
.prose .effective { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 40px; text-transform: uppercase; }
.prose h2 { font-size: 1.3rem; margin: 44px 0 12px; }
.prose p, .prose li { color: #34302a; }
.prose ul { padding-left: 22px; }
.prose li { margin: 7px 0; }
.prose .backlinks { margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 0.95rem; }

.callout {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 3px;
  padding: 18px 22px;
  margin: 28px 0;
  color: #34302a;
}

/* Footer */
.site-footer { padding: 0 0 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.footer-mark { padding: 60px 0 28px; overflow: hidden; }
.footer-mark .word { font-family: var(--serif); font-size: clamp(3.2rem, 13vw, 8rem); line-height: 0.92; letter-spacing: -0.03em; color: var(--ink); display: block; }
.footer-mark .word .dot { color: var(--accent); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.site-footer .legal-nav a { color: var(--muted); margin-right: 22px; }
.site-footer .legal-nav a:hover { color: var(--ink); }

@media (max-width: 820px) {
  .project, .about { grid-template-columns: 1fr; gap: 28px; }
  .about .portrait { max-width: 320px; }
}
@media (max-width: 560px) {
  .container { padding: 0 22px; }
  .hero { padding: 76px 0 60px; }
  section.block { padding: 64px 0; }
  nav.main a { margin-left: 16px; }
}
