@import url('https://fonts.googleapis.com/css2?family=42dot+Sans:wght@300..800&family=BBH+Bartle&display=swap');

/* =========================================================
   VELLUM — pale paper, whisper-soft type, gallery whitespace
   ========================================================= */
:root {
  --paper:        #e8e7e3;
  --paper-warm:   #ecebe6;
  --paper-shadow: rgba(0,0,0,0.04);

  --ink:          #1d1d1b;
  --ink-soft:     rgba(29,29,27,0.62);
  --ink-mut:      rgba(29,29,27,0.40);
  --ink-line:     rgba(29,29,27,0.12);

  --fs:    '42dot Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --fmark: 'BBH Bartle', 'Helvetica Neue', Arial, sans-serif;
  --fb:    ui-monospace, Menlo, monospace;

  --pad-x: clamp(20px, 5vw, 64px);
  --pad-top: clamp(28px, 4vw, 56px);
}

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

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--fs);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

body {
  min-height: 100vh;
  padding: var(--pad-top) var(--pad-x) calc(var(--pad-x) + 24px);
  position: relative;
}

/* Whisper paper grain — barely there */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.4 0'/%3E%3C/filter%3E%3Crect width='320' height='320' filter='url(%23p)'/%3E%3C/svg%3E");
  background-size: 220px;
  opacity: 0.07;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
}

a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }

main { position: relative; z-index: 2; }

/* =========================================================
   PILL NAV — floating rounded capsule, centered at top
   ========================================================= */
.pillnav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 18px 12px 14px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.7),
    0 1px 1px rgba(0,0,0,0.04),
    0 6px 20px -6px rgba(0,0,0,0.10);
}

.pillnav__mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.pillnav__mark svg { width: 14px; height: 14px; }

.pillnav__links {
  display: flex;
  gap: 28px;
}
.pillnav__links a {
  font-family: var(--fs);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: var(--ink);
  transition: opacity 160ms ease;
}
.pillnav__links a:hover { opacity: 0.55; }

/* Right-edge fixed icon column */
.edge-social {
  position: fixed;
  right: var(--pad-x);
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.edge-social a {
  width: 18px;
  height: 18px;
  color: var(--ink);
  opacity: 0.7;
  transition: opacity 160ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.edge-social a:hover { opacity: 1; }
.edge-social svg { width: 18px; height: 18px; }

/* =========================================================
   HERO — sphere composition + tiny identity block
   ========================================================= */
.hero {
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  align-items: center;
  padding: 0;
}

/* Solo hero — no graphic, no sections — center the identity block */
.hero--solo {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: left;
  min-height: 0;
  height: 100%;
}
.hero--solo .hero__id { max-width: 420px; }

/* Landing: lock the page, no scroll */
html:has(body.landing), body.landing { height: 100vh; overflow: hidden; }
body.landing { display: flex; align-items: center; padding-top: 0; padding-bottom: 0; }
body.landing main { width: 100%; }
body.landing .pillnav { display: none; }

.hero__art {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 580px;
  margin-left: auto;
}
.hero__art svg { width: 100%; height: 100%; }

.hero__id {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
}
.hero__name {
  font-family: var(--fs);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.005em;
  color: var(--ink);
}
.hero__role {
  font-family: var(--fs);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* Hide every old hero subpart that doesn't apply */
.hero__pre, .hero__sub, .hero__stats,
.hero__head, .hero__title, .hero__lede, .hero__row, .hero__mark { display: none; }

/* =========================================================
   SECTION — quiet rows, sparse
   ========================================================= */
section { margin: 0 auto; padding: 96px 0; max-width: 980px; }
section + section { padding-top: 0; }

section > h2 {
  font-family: var(--fs);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mut);
  margin-bottom: 56px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink-line);
}
section > h2::after { content: none; }

/* Project list — single column rows, restrained */
.projects {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.project {
  display: grid;
  grid-template-columns: 96px 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 28px 0;
  border-bottom: 1px solid var(--ink-line);
  color: var(--ink);
  transition: padding-left 200ms ease;
}
.project:hover { padding-left: 16px; }
.project::before, .project::after { content: none; }

.thumb {
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper-warm);
  box-shadow:
    inset 0 0 0 1px var(--ink-line),
    0 1px 2px rgba(0,0,0,0.04);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.meta { display: contents; }
.meta::before { content: none; }

.name {
  font-family: var(--fs);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--ink);
}

.desc {
  font-family: var(--fs);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}

@media (max-width: 720px) {
  .project {
    grid-template-columns: 80px 1fr;
    gap: 18px;
    padding: 22px 0;
  }
  .desc { grid-column: 2; }
}

/* =========================================================
   ARTICLE / PROJECT PAGE
   ========================================================= */
.article { max-width: 760px; margin: 88px auto 0; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 56px;
  font-family: var(--fs);
  font-size: 13px;
  color: var(--ink-soft);
}
.back:hover { color: var(--ink); }

.article header {
  padding-bottom: 32px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--ink-line);
}

.article header h1 {
  font-family: var(--fs);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 16px;
}

.tagline {
  max-width: 60ch;
  font-family: var(--fs);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.tagline a { color: var(--ink); border-bottom: 1px solid var(--ink-line); }
.tagline a:hover { border-color: var(--ink); }

figure.hero, .hero-figure {
  margin: 0 0 56px !important;
  display: block !important;
  min-height: 0 !important;
  background: var(--paper-warm);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--ink-line);
}
figure.hero img, .hero-figure img,
figure.hero video, .hero-figure video {
  width: 100%; height: auto; display: block;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 56px;
}
.links a {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--fs);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink);
  transition: background 140ms ease, color 140ms ease;
}
.links a:hover { background: var(--ink); color: var(--paper); }
.links .meta-line {
  font-family: var(--fs);
  font-size: 12px;
  color: var(--ink-mut);
  padding: 9px 0;
}

.article section { margin-top: 64px; padding: 0; max-width: none; }

.article section h2 {
  font-family: var(--fs);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mut);
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink-line);
  border-top: 0;
}
.article section h2::after { content: none; }

.intro p, .article section p {
  font-family: var(--fs);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 16px;
  max-width: 64ch;
}
.intro p { font-size: 16px; color: var(--ink); }

.intro p strong, .article section p strong { font-weight: 600; }

/* Stack list — no leather, just clean spec rows */
.stack-list {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 3fr;
  margin: 0;
  border-top: 1px solid var(--ink-line);
  background: none;
  box-shadow: none;
  color: var(--ink);
  border-radius: 0;
}
.stack-list dt,
.stack-list dd {
  padding: 14px 0;
  border-bottom: 1px solid var(--ink-line);
  font-family: var(--fs);
  font-size: 13.5px;
  line-height: 1.6;
  border-right: 0;
  background: none;
}
.stack-list dt {
  font-weight: 500;
  color: var(--ink);
  padding-right: 24px;
}
.stack-list dd { color: var(--ink-soft); padding-left: 0; }
.stack-list code { background: rgba(29,29,27,0.07); color: var(--ink); }

@media (max-width: 640px) {
  .stack-list { grid-template-columns: 1fr; }
  .stack-list dt { padding-bottom: 4px; border-bottom: 0; }
  .stack-list dd { padding-top: 4px; }
}

/* Inline media — very subtle */
.media {
  margin: 32px 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper-warm);
  box-shadow: inset 0 0 0 1px var(--ink-line);
  border: 0;
}
.media img, .media video { width: 100%; height: auto; }
.media figcaption {
  padding: 10px 14px;
  font-family: var(--fs);
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--paper-warm);
  border-top: 1px solid var(--ink-line);
}

/* Slidev embeds */
.slide-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: #111;
  margin: 18px 0 8px;
  box-shadow: inset 0 0 0 1px var(--ink-line);
}
.slide-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.embed-cap {
  font-family: var(--fs);
  font-size: 12px;
  color: var(--ink-mut);
  margin: 6px 0 24px;
}
.embed-cap a { color: var(--ink-soft); border-bottom: 1px solid var(--ink-line); }
.embed-cap a:hover { color: var(--ink); border-color: var(--ink); }

/* Inline code */
code {
  font-family: var(--fb);
  font-size: 0.88em;
  color: var(--ink);
  background: rgba(29,29,27,0.06);
  padding: 0.04em 0.36em;
  border-radius: 3px;
}

/* Hide old chrome bits */
.chrome, .section-id, .barcode, .spec-id { display: none; }
.logo { display: none; } /* old logo, pillnav owns it now */
.topnav { display: none; }

@media (max-width: 720px) {
  .pillnav { gap: 16px; padding: 10px 14px 10px 10px; }
  .pillnav__links { gap: 16px; }
  .pillnav__links a { font-size: 12px; }
  .hero { grid-template-columns: 1fr; gap: 40px; min-height: auto; padding: 56px 0; }
  .hero__art { margin: 0 auto; max-width: 360px; }
  .edge-social { display: none; }
  section { padding: 56px 0; }
}
