/* HeyProto blog. Tokens follow heyproto.in (Framer) so /blogs reads as the same site. */
@font-face { font-family: Switzer; src: url(fonts/switzer-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Switzer; src: url(fonts/switzer-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Switzer; src: url(fonts/switzer-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/inter-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/inter-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/inter-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --page: #ffffff;
  --card: #f6f6f6;
  --soft: #f0f0f0;
  --line: #e7e7e7;
  --ink: #141419;
  --body: #3b3f45;
  --muted: #6b727a;
  --maroon: #610031;
  --maroon-hover: #4d0027;
  --pink: #ff02bc;
  --display: Switzer, Inter, system-ui, sans-serif;
  --text: Inter, system-ui, sans-serif;
  --wrap: 1136px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 112px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 16px/1.6 var(--text); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; color: var(--ink); text-wrap: balance; margin: 0; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 16px; }
.icon { flex: none; }

/* Buttons and chips, as on heyproto.in */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 18px; border-radius: 999px; font: 500 15px/1 var(--text); text-decoration: none; white-space: nowrap; transition: background-color 160ms ease, transform 160ms var(--ease-out); }
.btn:active { transform: scale(0.97); }
.btn-lg { height: 46px; padding: 0 22px; font-size: 16px; }
.btn-maroon { background: var(--maroon); color: #fff; }
.btn-soft { background: var(--soft); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn-maroon:hover { background: var(--maroon-hover); }
  .btn-soft:hover { background: #e7e7e7; }
}
.chips { display: flex; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: 500 14px/1 var(--text); color: var(--ink); }
.chip-pink { background: var(--pink); border-color: var(--pink); color: #fff; padding: 0 10px; }
.eyebrow { margin: 0 0 12px; font: 500 13px/1.3 var(--text); color: var(--muted); }

/* Nav */
.site-nav { position: sticky; top: 16px; z-index: 20; display: flex; justify-content: center; padding: 16px 16px 0; pointer-events: none; }
.nav-pill { pointer-events: auto; display: flex; align-items: center; gap: 6px; padding: 6px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid #f0f0f0; border-radius: 26px; box-shadow: 0 12px 32px rgba(20, 20, 25, 0.08), 0 1px 2px rgba(20, 20, 25, 0.04); }
.nav-logo { display: block; border-radius: 50%; }
.nav-logo img { width: 44px; height: 44px; }
.site-nav a, .site-nav a:hover { text-decoration: none; }
.nav-title { padding: 0 14px 0 10px; font: 500 17px/1 var(--display); letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.nav-divider { width: 1px; height: 22px; margin: 0 6px; background: var(--line); }
.site-nav .btn { height: 38px; font-family: var(--display); }

/* Blog index */
.blog-index, .article-page, .page-narrow { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.index-head { padding: 96px 0 56px; }
.index-head h1 { margin: 20px 0 16px; font-size: clamp(44px, 7vw, 76px); line-height: 1; letter-spacing: -0.045em; }
.index-head p { max-width: 560px; margin: 0; font-size: 19px; line-height: 1.5; color: var(--muted); }
.posts { border-top: 1px solid var(--line); padding-top: 48px; }

.visual-card { display: grid; place-items: center; padding: 40px; background: var(--card); border-radius: 28px; overflow: hidden; }
.visual-card img { width: auto; height: auto; max-width: 100%; object-fit: contain; }
.visual-card img.shot { border-radius: 12px; border: 1px solid #e3e3e3; background: #fff; box-shadow: 0 12px 32px rgba(20, 20, 25, 0.08), 0 1px 2px rgba(20, 20, 25, 0.04); }

.post-card { border-radius: 28px; }
.post-link { display: grid; gap: 22px; text-decoration: none; color: inherit; }
.post-link .visual-card { aspect-ratio: 16 / 10; min-height: 0; }
.visual-card.thumb img { max-height: 100%; }
.post-link .visual-card img { transition: transform 400ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .post-link:hover .visual-card img { transform: translateY(-4px) scale(1.015); } .post-link:hover h2 { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; } }
.kicker { margin: 0 0 10px; font: 500 14px/1.3 var(--text); color: var(--maroon); }
.post-copy h2 { font-size: 26px; line-height: 1.15; letter-spacing: -0.03em; }
.post-copy p { margin: 12px 0 14px; color: var(--muted); line-height: 1.55; }
.post-meta { font-size: 14px; color: var(--muted); }
.post-card.is-featured .post-link { grid-template-columns: 1.25fr 1fr; align-items: center; gap: 48px; }
.post-card.is-featured h2 { font-size: clamp(30px, 3.4vw, 40px); }
.post-card.is-featured .post-copy p { font-size: 18px; }
.post-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 56px; }

/* Article */
.article-head { max-width: 780px; margin: 0 auto; padding: 72px 0 40px; text-align: center; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }
.article-head .crumbs { justify-content: center; }
.crumbs a { color: var(--ink); font-weight: 500; text-decoration: none; }
.crumbs a:hover { color: var(--maroon); }
.article-head h1 { margin: 22px 0 18px; font-size: clamp(36px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -0.04em; }
.deck { margin: 0 auto; max-width: 640px; font-size: 20px; line-height: 1.5; color: var(--muted); }
.byline { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; text-align: left; font-size: 14px; }
.byline a { font-weight: 600; text-decoration: none; }
.byline-meta { display: block; color: var(--muted); }
.article-hero { margin: 0; }
.article-hero .visual-card { padding: clamp(24px, 6vw, 72px); }
.article-hero img { max-height: 520px; }

.article-grid { display: grid; grid-template-columns: 220px minmax(0, 680px); justify-content: center; gap: 72px; padding: 64px 0 24px; }
.article-aside { position: relative; }
.aside-block { position: sticky; top: 112px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--line); font-size: 14px; line-height: 1.4; color: var(--muted); text-decoration: none; transition: color 160ms ease, border-color 160ms ease; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-color: var(--pink); }

.prose { font-size: 18px; line-height: 1.75; color: var(--body); }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 22px; }
.prose h1 { margin: 24px 0 20px; font-size: clamp(36px, 5vw, 52px); line-height: 1.05; letter-spacing: -0.04em; }
.prose h2 { margin: 56px 0 18px; font-size: 30px; line-height: 1.15; letter-spacing: -0.03em; }
.prose h3 { margin: 32px 0 8px; font-size: 20px; line-height: 1.3; letter-spacing: -0.02em; }
.prose h3 + p { margin-top: 0; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--maroon); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { margin: 0 0 24px; padding-left: 22px; }
.prose li { margin: 8px 0; padding-left: 4px; }
.prose li::marker { color: var(--muted); }
.prose blockquote { margin: 28px 0; padding: 22px 26px; background: var(--card); border-radius: 18px; border-left: 3px solid var(--pink); font: 500 19px/1.55 var(--display); color: var(--ink); }
.prose blockquote p { margin: 0; }
.takeaways { margin-bottom: 40px; padding: 24px 26px; border: 1px solid var(--line); border-radius: 20px; }
.takeaways ol { margin: 0; padding-left: 22px; }
.takeaways li { margin: 6px 0; font-size: 16px; line-height: 1.55; color: var(--ink); }
.figure { margin: 36px 0 40px; }
.figure .visual-card { padding: 40px 32px; }
.figure .visual-card.narrow img { max-width: min(100%, 420px); }
.figure .visual-card.wide { padding: 32px 24px; }
.figure figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.copy-block { position: relative; margin: 28px 0; padding: 56px 24px 24px; background: var(--card); border-radius: 18px; overflow-x: auto; font-size: 15px; line-height: 1.65; }
.copy-block code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); white-space: pre-wrap; }
.copy-button { position: absolute; top: 12px; right: 12px; height: 32px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: 500 13px/1 var(--text); color: var(--ink); cursor: pointer; transition: transform 160ms var(--ease-out); }
.copy-button:active { transform: scale(0.97); }
.table-scroll { overflow-x: auto; }

.read-next { max-width: 972px; margin: 40px auto 0; padding: 48px 0 24px; border-top: 1px solid var(--line); }
.read-next-title { margin-bottom: 28px; font-size: 28px; letter-spacing: -0.03em; }
.read-next-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

.page-narrow { max-width: 728px; padding-top: 88px; padding-bottom: 40px; }
.not-found h1 { margin: 24px 0 16px; font-size: clamp(36px, 6vw, 56px); letter-spacing: -0.04em; line-height: 1.05; }
.not-found p { color: var(--muted); font-size: 18px; margin: 0 0 28px; }

/* Footer, as on heyproto.in */
.site-footer { padding: 96px 16px 16px; }
.footer-shell { max-width: 1408px; margin: 0 auto; padding: 8px 40px 0; background: #f7f7f7; border: 1px solid #ececec; border-radius: 40px; }

.footer-main { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 48px 8px 40px; }
.footer-brand a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.footer-brand a img:last-child { width: 100px; height: auto; }
.footer-brand p { margin: 20px 0 0; font-size: 14px; color: var(--muted); }
.footer-links { display: grid; align-content: start; gap: 12px; }
.footer-links a { width: fit-content; font-size: 14px; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding: 28px 8px 32px; border-top: 1px solid #e3e3e3; font-size: 12px; color: var(--muted); }
.footer-bottom > div { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--ink); }

/* Tablet */
@media (max-width: 1020px) {
  .article-grid { grid-template-columns: minmax(0, 680px); gap: 0; }
  .article-aside { display: none; }
  .post-card.is-featured .post-link { grid-template-columns: 1fr; gap: 22px; }
}

/* Phone */
@media (max-width: 760px) {
  .blog-index, .article-page, .page-narrow { padding: 0 16px; }
  .index-head { padding: 56px 0 40px; }
  .post-row, .read-next-grid { grid-template-columns: 1fr; gap: 40px; }
  .visual-card { padding: 24px; border-radius: 22px; }
  .post-copy h2 { font-size: 24px; }
  .article-head { padding: 48px 0 32px; }
  .deck { font-size: 18px; }
  .article-grid { padding-top: 40px; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 25px; margin-top: 44px; }
  .figure .visual-card, .figure .visual-card.wide { padding: 20px 16px; }
  .site-footer { padding: 64px 8px 8px; }
  .footer-shell { padding: 0 8px; border-radius: 28px; }
  .footer-main { grid-template-columns: 1fr; padding: 40px 16px 32px; }
  .footer-bottom { padding: 24px 16px 28px; }
}
