/* Nick Baumann — Personal Blog Aesthetic (ultra-light, no JS) */
/* Palette */
:root {
  --paper: #FAFAF8;
  --ink: #121212;
  --graphite: #2B2B2B; /* use with low alpha for rules */
  --ghost: #EDEDED;
  --accent: #1A4FFF; /* cobalt ink (rare use) */
  --maxw: 68ch;
}

/* Base */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Inter, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.75;
  font-size: clamp(16px, 1.9vw, 19px);
  text-rendering: optimizeLegibility;
}

.container {
  max-width: var(--maxw);
  padding: clamp(16px, 3vw, 32px);
  margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.25;
  margin: 0 0 0.75rem 0;
}

h1 { font-size: clamp(28px, 5vw, 40px); }
h2 { font-size: clamp(22px, 3.5vw, 28px); margin-top: 2rem; }
h3 { font-size: clamp(18px, 3vw, 22px); margin-top: 1.5rem; }

p { margin: 0 0 1.1rem 0; }

ul, ol { margin: 0 0 1.1rem 1.25rem; padding: 0; }
li { margin: 0.25rem 0; }

/* Links (accent is rare; default is restrained) */
a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.17em;
  text-decoration-color: rgba(0,0,0,0.15);
}
a:hover { text-decoration-color: rgba(0,0,0,0.35); }
.accent-on a:hover { text-decoration-color: var(--accent); }

/* Article link styling: slightly thicker underline and subtle hover wash */
.container article a {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
  text-decoration-color: rgba(0,0,0,0.35);
  border-radius: 2px;
  transition: background-color .15s ease, text-decoration-color .15s ease;
}
.container article a:hover {
  background-color: rgba(0,0,0,0.06);
  text-decoration-color: rgba(0,0,0,0.85);
}
.accent-on .container article a:hover {
  text-decoration-color: var(--accent);
  background-color: rgba(26,79,255,0.08);
}

/* Source-style links (citations) */
a.source {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.25em;
  text-decoration-color: rgba(0,0,0,0.55);
}
a.source:hover {
  text-decoration-color: rgba(0,0,0,0.9);
  background: transparent;
}

/* Source link styling: subtle external marker for http(s) links */
.container article a[href^="http"]::after {
  content: "↗";
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
  font-size: 0.85em;
  margin-left: 0.2em;
  color: rgba(0,0,0,0.35);
}
.container article a[href^="http"]:hover::after {
  color: rgba(0,0,0,0.85);
}

/* Rules / separators */
hr {
  border: 0;
  height: 1px;
  background: linear-gradient(to right, rgba(43,43,43,0.12), rgba(43,43,43,0.18));
  margin: 2rem 0;
}

/* Meta */
.meta {
  color: rgba(0,0,0,0.6);
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
}

/* Signature (footer mark) */
.signature {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ghost);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  color: rgba(0,0,0,0.75);
}

/* Figures & images */
figure {
  margin: 1.5rem 0;
  padding: 0;
}
figure img, figure picture {
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;               /* no frame */
  background: var(--paper);/* blend with page */
}
figcaption {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
  color: rgba(0,0,0,0.6);
  font-size: 0.85em;
  margin-top: 0.5rem;
}

/* Code blocks & inline code */
code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
  background: #fff;
  border: 1px solid var(--ghost);
}
code {
  padding: 0.1em 0.3em;
  border-radius: 3px;
}
pre {
  padding: 0.75rem 1rem;
  overflow: auto;
  border-radius: 4px;
}

/* Footnotes / show-your-work box */
.box {
  border: 0;
  background: transparent;
  margin: 2rem 0 0 0;         /* more space above footnote */
  padding: 1.25rem 0 0 0;     /* breathing room inside */
  border-top: 1px solid var(--ghost); /* separator line */
  font-style: italic;         /* same size as body, just italic */
}
.box h3, .box h4 {
  margin-top: 0;
  font-weight: 400;
  font-family: inherit;
  font-style: italic;
}

/* Header / Home */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}
.brand {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
  font-size: 0.95em;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: rgba(0,0,0,0.8);
}
.nav a {
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.2);
  padding-bottom: 2px;
}

/* Post list (home) */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: idx; /* subtle index for items */
}
.post-list li {
  margin: 0 0 0.75rem 0;
  position: relative;
}

/* subtle index marker */
.post-list li::before {
  counter-increment: idx;
  content: counter(idx, decimal-leading-zero);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
  color: rgba(0,0,0,0.28);
  font-size: 0.85em;
  margin-right: 0.5rem;
  display: inline-block;
  width: 2ch;
}
.post-list a {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
  text-decoration: underline;
  text-decoration-color: rgba(0,0,0,0.2);
  text-decoration-thickness: 0.06em;
}
.post-list a:hover { text-decoration-color: rgba(0,0,0,0.5); }
.accent-on .post-list a:hover { text-decoration-color: var(--accent); }

/* Accessibility helpers */
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: #fff;
  border: 1px solid var(--ghost);
  padding: 0.5rem 0.75rem;
  z-index: 1000;
}

/* Inline notes sizing (checklist / accounting lens) */
article .mono.muted {
  font-size: 0.9em;
  margin: 0.25rem 0;
}
article ul.mono {
  font-size: 0.9em;
  margin: 0.25rem 0 1rem 1.1rem;
  padding-left: 1.1rem;
}

/* Minimal responsive video embed */
.player {
  margin: 2rem 0 0 0;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--paper);
}
.player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Small utilities */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace; }
.center { text-align: center; }
.muted { color: rgba(0,0,0,0.6); }
