/* ning.sh — a small, build-free personal site.
   Everything is in this one stylesheet on purpose. */

:root {
  color-scheme: light dark;

  --bg: #fbfbf9;
  --fg: #1a1a18;
  --muted: #6b6b64;
  --rule: #e4e3dd;
  --accent: #b4530a;

  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14140f;
    --fg: #e8e6df;
    --muted: #9a978c;
    --rule: #2b2b24;
    --accent: #f0a15a;
  }
}

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

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

body {
  margin: 0;
  padding: clamp(2.5rem, 9vw, 6rem) 1.5rem 4rem;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  max-width: var(--measure);
  margin: 0 auto;
}

h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

h2 {
  margin: 2.75rem 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--rule);
  transition: color 0.12s ease, text-decoration-color 0.12s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent);
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.tagline {
  margin: 0 0 2rem;
  color: var(--muted);
}

/* Simple definition-style link list: label on the left, note on the right. */
.links {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.links li {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.links .note {
  color: var(--muted);
  font-size: 0.875rem;
}

footer {
  max-width: var(--measure);
  margin: 4rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.8125rem;
}

/* Centered layout for the 404 page. */
.centered {
  display: flex;
  min-height: 50vh;
  flex-direction: column;
  justify-content: center;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
