/* nathanmark.us — one stylesheet, no build. */
:root {
  --bg: #ffffff;
  --fg: #1c1f24;
  --muted: #5e6672;
  --accent: #252e3c;
  --link: #1f4e8c;
  --rule: #e3e6ea;
  --code-bg: #f4f5f7;
  --measure: 68ch;
  --serif: Charter, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181c;
    --fg: #e6e8eb;
    --muted: #9aa3ad;
    --accent: #c9d2de;
    --link: #8ab4f8;
    --rule: #2b3139;
    --code-bg: #1e2328;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  max-width: var(--measure);
  padding: 1.5rem 1.25rem 3rem;
  margin-inline: auto;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; display: block; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--bg); padding: .5rem 1rem;
}
.skip:focus { left: 1rem; z-index: 1; }

.site-header {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.5rem;
  padding-bottom: 1rem; margin-bottom: 2.5rem;
  border-bottom: 2px solid var(--accent);
}
.site-name {
  font-weight: 700; font-size: 1.35rem; color: var(--accent); text-decoration: none;
  margin-right: auto;
}
.site-header nav { display: flex; gap: 1.25rem; }
.site-header nav a { color: var(--fg); text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current] { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--accent); margin: 2em 0 .6em; }
h1 { font-size: 2rem; margin-top: 0; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h2 + h3 { margin-top: 1em; }
p, ul, ol, pre, figure, blockquote { margin: 0 0 1.2em; }
li { margin: .25em 0; }
li > ul, li > ol { margin-bottom: 0; }
li > p { margin-bottom: .6em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }
blockquote { border-left: 3px solid var(--rule); padding-left: 1rem; color: var(--muted); }

code, pre {
  font-family: var(--mono);
  font-size: .875em;
  background: var(--code-bg);
}
code { padding: .1em .35em; border-radius: 3px; }
pre {
  padding: 1rem; border-radius: 6px; overflow-x: auto;
  line-height: 1.45; border: 1px solid var(--rule);
}
pre code { padding: 0; background: none; font-size: 1em; }
figure { margin-inline: 0; }
figure img { border: 1px solid var(--rule); border-radius: 4px; }
figcaption { color: var(--muted); font-size: .9rem; margin-top: .4rem; }

.meta { color: var(--muted); font-size: .95rem; margin-top: -.5rem; }
.post-list { list-style: none; padding: 0; }
.post-list li { margin: 0 0 1.75rem; }
.post-list h2 { margin: 0 0 .25rem; font-size: 1.35rem; }
.post-list p { margin: .25rem 0 0; }
.post-list time { color: var(--muted); font-size: .95rem; }

.site-footer {
  margin-top: 4rem; padding-top: 1rem; border-top: 1px solid var(--rule);
  color: var(--muted); font-size: .9rem;
}
.site-footer a { color: inherit; }

@media (max-width: 600px) {
  body { font-size: 1.05rem; padding-top: 1rem; }
  h1 { font-size: 1.65rem; }
}
@media print {
  .site-header nav, .site-footer, .skip { display: none; }
  body { max-width: none; }
}

/* Click-to-enlarge images (see lightbox.js) */
a.zoom { display: block; cursor: zoom-in; }
.lightbox {
  border: 0; padding: 0; margin: 0; background: transparent;
  width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh;
  cursor: zoom-out;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgb(0 0 0 / .85); }
.lightbox img {
  max-width: 95vw; max-height: 95vh; width: auto; height: auto;
  object-fit: contain; border-radius: 4px; box-shadow: 0 10px 40px rgb(0 0 0 / .5);
}
.lightbox-close {
  position: fixed; top: .75rem; right: 1rem;
  background: none; border: 0; color: #fff; font-size: 2.5rem; line-height: 1; cursor: pointer;
}
.lightbox-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
