/* O10 design tokens and shared components. See /design-system.html. */
:root {
  color-scheme: light;
  --ink: #222;
  --paper: #fff;
  --muted: #555;
  --line: #ccc;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "Courier New", monospace;
  --reading-width: 648px;
  --space-small: 8px;
  --space-medium: 16px;
  --space-large: 24px;
  --entry-gap: 40px;
  --text-body: 18px;
  --text-meta: 13px;
  --text-title: 40px;
  --text-section: 27px;
  --text-entry: 23px;
}
:root[data-theme="night"] { color-scheme: dark; --paper: #171819; --ink: #e9e7e2; --muted: #b7b6b2; --line: #56585a; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: var(--text-body)/1.7 var(--serif); }
main, .site-footer { width: min(var(--reading-width), calc(100% - 44px)); margin: auto; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.3; }
h1 { font-size: var(--text-title); line-height: 1.2; letter-spacing: -.025em; margin: 0 0 var(--space-large); }
h2 { font-size: var(--text-section); margin: 40px 0 18px; }
h3 { font-size: var(--text-entry); margin: 28px 0 var(--space-small); }
h4 { font-size: 20px; margin: 24px 0 8px; }
p { margin: 0 0 18px; }
a { color: inherit; text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
img, svg, video { max-width: 100%; height: auto; }
figure { margin: 28px 0; }
li { margin-bottom: 8px; }
nav, .meta, .post-meta, .tag, summary, .archive, .site-footer { font-family: var(--mono); font-size: var(--text-meta); }
nav { display: flex; gap: var(--space-large); flex-wrap: wrap; }
nav a, .archive, .contact a { display: inline-flex; min-height: 44px; align-items: center; }
.meta { color: var(--muted); margin: 0 0 7px; }
.masthead { padding: var(--space-large) 0 0; font: var(--text-meta)/1.7 var(--mono); }
.masthead-tools { display: flex; align-items: center; justify-content: space-between; }
.masthead-tools > a { display: inline-flex; align-items: center; min-height: 44px; }
.masthead nav { column-gap: var(--space-large); row-gap: 0; }
.masthead [aria-current="page"] { text-decoration-thickness: 2px; }
.personal-home > .intro { padding: 44px 0 32px; }
.portrait { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; display: block; margin-bottom: 28px; }
.personal-home h1 { padding-bottom: var(--space-large); border-bottom: 4px double var(--ink); }
.lead { font-size: 20px; line-height: 1.55; }
.footnote { color: var(--muted); font-size: 14px; line-height: 1.6; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.footnote p { margin: 0; }
.footnote sup, .intro p > sup { margin-right: 3px; }
.personal-home section { padding: 24px 0; scroll-margin-top: 24px; }
.personal-home > section > h2 { padding-bottom: var(--space-medium); border-bottom: 1px solid var(--line); margin: 0 0 var(--space-large); }
.personal-home h3 { margin: 0 0 8px; }
.writings { padding: 0; margin: 0 0 var(--space-large); list-style: none; }
.writings li, .post-list li { margin: 0; padding: 0; border: 0; }
.writings li + li, .post-list li + li { margin-top: var(--entry-gap); }
.writings li > p:last-child { color: var(--muted); margin-bottom: 0; }
summary { min-height: 44px; padding: 9px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.career { padding: 0; list-style: none; }
.career li { display: grid; grid-template-columns: 165px 1fr; gap: 20px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.career p { margin: 0; }
.career span { font: 13px/1.7 var(--mono); color: var(--muted); }
.contact { padding-bottom: 48px; }
.site-footer { padding: 24px 0 36px; border-top: 1px solid var(--line); color: var(--muted); }
.skip-link { position: absolute; top: -100px; left: 22px; background: var(--paper); padding: 12px; }
.skip-link:focus { top: 12px; }
.cookie-consent { position: fixed; bottom: 16px; right: 16px; width: min(360px, calc(100% - 32px)); padding: 18px; border: 1px solid var(--ink); background: var(--paper); z-index: 10; }
.cookie-consent p { font-size: 16px; margin-bottom: 12px; }
.cookie-actions { display: flex; gap: 12px; }
button { font: 13px/1.5 var(--mono); min-height: 44px; padding: 8px 14px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); cursor: pointer; }
button:hover { background: var(--line); }
theme-switch { display: inline-block; }
theme-switch button { border: 0; padding: 0; text-decoration: underline; text-underline-offset: 4px; }
theme-switch button:hover { background: transparent; text-decoration-thickness: 2px; }
@media (max-width: 600px) {
  :root { --text-title: 34px; }
  .portrait { width: 80px; height: 80px; margin-bottom: var(--space-large); }
  .personal-home > .intro { padding-top: 36px; }
  .lead { font-size: 18px; }
  .career li { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
