* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { position: fixed; inset: 0; margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.home-brand { position: absolute; top: calc(50% - 160px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 28px; width: min(640px, calc(100% - 32px)); }
.brand-identity { display: flex; align-items: center; gap: 22px; }
.home-role { margin: 0; color: var(--secondary); text-align: center; font-size: 13px; }
.home-role a { color: var(--ink); }
.home-brand h1 { margin: 0; line-height: 0; }
.portrait { width: 66px; height: 66px; border-radius: 50%; }
.wordmark { display: block; width: 264px; height: 56px; color: var(--ink); }
.command-area { position: absolute; width: min(640px, calc(100% - 48px)); left: 50%; top: calc(50% + 8px); transform: translateX(-50%); z-index: 6; }
/* A decorative edge, outside the scroller so it never adds scrollable space. */
.scroll-fade { position: fixed; z-index: 4; height: 52px; pointer-events: none; background: linear-gradient(to bottom, transparent, var(--bg)); }
body:not(.is-page) .scroll-fade, body.keyboard-open .scroll-fade { display: none; }
.command-box { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: var(--surface); border-left: 2px solid var(--accent); }
.command-input { position: relative; flex: 1; min-width: 0; overflow: hidden; }
#command { display: block; width: 100%; height: 29px; padding: 0; border: 0; border-radius: 0; outline: 0; background: transparent; color: var(--ink); caret-color: transparent; }
.block-caret { position: absolute; top: 3px; left: 0; width: 1ch; height: 23px; line-height: 23px; background: var(--ink); color: var(--bg); pointer-events: none; animation: caret-blink 1.1s step-end infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .block-caret { animation: none; } }
#command::placeholder { color: var(--muted); opacity: 1; }
.command-box:focus-within { border-left-color: var(--accent); }
.submit-command { margin-left: auto; border: 0; padding: 0 2px; color: var(--muted); background: transparent; font-size: 20px; line-height: 1; }
.submit-command:hover { color: var(--accent); }
.command-error { position: absolute; top: calc(100% + 2px); left: 0; right: 0; color: var(--error); margin: 0; max-height: 48px; overflow-y: auto; overscroll-behavior: none; overflow-wrap: anywhere; }
body.is-page .command-error, body.keyboard-open .command-error { top: auto; bottom: calc(100% + 10px); padding: 6px 8px; max-height: 72px; background: var(--bg); }
.command-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 10px); max-height: var(--command-menu-height, min(360px, 42vh)); overflow-y: auto; overscroll-behavior: none; padding: 6px; border: 1px solid var(--menu-border); background: var(--menu); box-shadow: 0 6px 24px #00000008; z-index: 5; }
.command-option { display: flex; width: 100%; gap: 20px; padding: 8px 12px; text-align: left; border: 0; background: transparent; color: var(--ink); }
.command-option[aria-selected="true"] { background: var(--selected); }
.command-option span:first-child { width: 120px; flex-shrink: 0; color: var(--command-color); }
.command-option span:last-child { color: var(--secondary); }
.page-header { position: absolute; top: 30px; left: 32px; right: 32px; display: flex; justify-content: space-between; align-items: center; }
.small-brand { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.small-brand img { width: 34px; height: 34px; border-radius: 50%; }
.breadcrumb { color: var(--muted); }
.site-socials { position: fixed; top: 36px; right: 32px; z-index: 5; }
.social-links { display: flex; align-items: center; gap: 18px; }
.social-icon { display: block; width: 23px; height: 23px; fill: var(--muted); }
.social-links a:hover .social-icon { fill: var(--accent); }
.page-content { width: min(960px, calc(100% - 48px)); margin: 130px auto 210px; }
.content-section { outline: none; }
.content-section h1, .content-section h2 { font-size: 24px; font-weight: 500; letter-spacing: -1px; margin: 0 0 32px; }
.content-section h2.intro { font-size: 17px; letter-spacing: 0; font-weight: 400; }
.content-section a { text-decoration: underline; text-decoration-color: var(--underline); text-underline-offset: 4px; }
.content-section ul { list-style: none; padding: 0; }
.content-section li { padding: 18px 0; }
.content-section li ul { padding-left: 24px; list-style: disc; }
.content-section li li::marker { color: var(--muted); }
.content-section li li { border: 0; padding: 8px 0; }
.date { color: var(--muted); }
.entry-group + .entry-group:has(> .entry-year) { margin-top: 36px; }
.content-section h2.entry-year { margin: 0 0 12px; color: var(--muted); font-size: 14px; font-weight: 400; letter-spacing: 0; }
.content-section .entry-list { margin: 0; padding: 0; list-style: none; }
.content-section .entry-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: start; gap: 8px 30px; padding: 18px 0; border-top: 1px solid var(--line); }
.entry-main { grid-column: 2; grid-row: 1; min-width: 0; overflow-wrap: anywhere; }
.entry-meta { color: var(--secondary); }
.entry-date { grid-column: 1; grid-row: 1; padding-top: 3px; color: var(--muted); white-space: nowrap; font-size: 12px; }
.content-section .community-entry { padding: 16px 0; }
.content-section .community-detail { padding: 16px 0; }
.entry-row, .community-detail, .skills-row { transition: background-color 150ms ease; }
@media (hover: hover) {
  .community-detail:hover, .skills-row:hover { background-color: var(--surface); }
}
.community-detail:focus-within { background-color: var(--surface); }
@media (prefers-reduced-motion: reduce) {
  .entry-row, .community-detail, .skills-row { transition: none; }
}
.skills { margin-top: 48px; }
.content-section .skills h2 { font-size: 17px; letter-spacing: 0; margin-bottom: 24px; }
.skills-grid { margin: 0; padding-left: 20px; border-left: 2px solid var(--accent); }
.skills-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 20px; padding: 12px 0; }
.skills-row dt { color: var(--secondary); }
.skills-row dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 0; }
.skills-row dd span:not(:last-child)::after { content: "·"; color: var(--muted); margin: 0 12px; }
.community-logo { width: 36px; height: 36px; vertical-align: middle; margin-right: 6px; }
.inline-organization { white-space: nowrap; }
.inline-logo { width: 18px; height: 18px; object-fit: contain; vertical-align: -4px; margin-right: 6px; }
.tool-logo { width: 14px; height: 17px; vertical-align: middle; margin-right: 6px; }
body.is-page .home-brand { display: none; }
body.is-page main { margin-top: 98px; height: calc(100dvh - 250px); overflow-y: auto; overscroll-behavior: none; }
body.is-page .page-content { margin-top: 12px; margin-bottom: 0; }
body.is-page .command-area { position: fixed; width: min(960px, calc(100% - 48px)); top: auto; bottom: 42px; }
@media (max-width: 600px), (hover: none) and (pointer: coarse) {
  /* iOS zooms small inputs on focus. Keep the input and block cursor in sync. */
  .command-input { font-size: 16px; }
  body.is-page main { margin-top: 82px; height: calc(100dvh - 192px); }
  body.is-page .command-area { bottom: 16px; }
  /* Let the home header move with the page when the keyboard pans it. */
  body:not(.is-page) .site-socials { position: absolute; }
  body:not(.is-page) .home-brand { top: max(80px, calc(50% - 160px)); }
  body:not(.is-page) .command-area { top: max(248px, calc(50% + 8px)); }
  body.keyboard-open .command-area { position: absolute; top: var(--command-top); bottom: auto; }
  body.keyboard-open:not(.is-page) .home-brand { top: calc(var(--keyboard-top) + 70px); }
  body.keyboard-open:not(.is-page) .site-socials { top: calc(var(--keyboard-top) + 28px); }
  body.keyboard-hide-brand .home-brand { display: none; }
}
@media (max-width: 600px) {
  .brand-identity { gap: 14px; }
  .portrait { width: 48px; height: 48px; }
  .wordmark { width: calc(41px * 33 / 7); height: 41px; }
  .command-area { width: calc(100% - 32px); }
  body.is-page .command-area { width: calc(100% - 40px); }
  .command-box { padding: 14px; }
  .page-header { left: 20px; right: 119px; top: 22px; }
  .small-brand { font-size: 14px; gap: 10px; min-width: 0; max-width: 100%; }
  .small-brand img { width: 32px; height: 32px; flex-shrink: 0; }
  .breadcrumb { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-socials { top: 28px; right: 20px; }
  .social-links { gap: 12px; }
  .page-content { width: calc(100% - 40px); margin-top: 100px; }
  .skills-row { grid-template-columns: 1fr; gap: 6px; }
  .content-section .entry-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .content-section { overflow-x: auto; }
  .command-option { gap: 8px; font-size: 12px; }
  .command-option span:first-child { width: 100px; }
}

/* Shared entry hierarchy for talks, writing, audits, bounties and tools. */
.content-section h1 { font-size: 27px; letter-spacing: -.8px; margin-bottom: 26px; }
.item-title { color: var(--ink); font-size: 16px; line-height: 1.5; font-weight: 500; }
.item-title > .entry-meta { font-size: 12px; margin-left: 5px; }
.item-context { margin-top: 5px; color: var(--secondary); font-size: 13px; line-height: 1.65; }
.item-links { display: flex; flex-wrap: wrap; align-items: baseline; margin-top: 9px; font-size: 12px; }
.item-links a { color: var(--link-color); }
.resource-item { display: inline-flex; align-items: baseline; }
.resource-separator { margin: 0 12px; color: var(--muted); }
@media (max-width: 600px) {
  .content-section .entry-row { padding: 22px 0; gap: 8px; }
  .entry-main { grid-column: 1; grid-row: 2; }
  .entry-date { padding-top: 0; font-size: 11px; }
  .item-title { font-size: 15px; }
  .item-context { font-size: 12px; }
}

/* The fixed command area already separates content from the prompt. Do not
   create a scroll range solely from space after the last visible content. */
.content-section > :last-child { margin-bottom: 0; }
.content-section > .entry-group:last-child > .entry-list > .entry-row:last-child { padding-bottom: 0; }
