:root {
  color-scheme: light dark;
  --bg: #fafaf9;
  --fg: #1c1917;
  --muted: #57534e;
  --accent: #0d9488;
  --border: #e7e5e4;
  --font: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 38rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a09;
    --fg: #fafaf9;
    --muted: #a8a29e;
    --accent: #2dd4bf;
    --border: #292524;
  }
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

.wrap {
  max-width: calc(var(--measure) + 4rem);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

header.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.site-title {
  font-family: var(--font-sans);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-title a:hover {
  color: var(--accent);
}

nav.site-nav {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
}

nav.site-nav a {
  color: var(--muted);
  margin-left: 1.25rem;
  text-decoration: none;
}

nav.site-nav a:first-child {
  margin-left: 0;
}

nav.site-nav a:hover,
nav.site-nav a[aria-current="page"] {
  color: var(--fg);
}

main {
  text-align: center;
}

main ol,
main ul {
  list-style-position: inside;
  padding-left: 0;
}

main h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 1rem;
}

main h2 {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 2.5rem 0 0.75rem;
}

main h2:first-of-type {
  margin-top: 0;
}

main h3 {
  font-family: var(--font);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 1.75rem 0 0.5rem;
}

main p {
  margin: 0 0 1rem;
}

.note-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.note-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.note-list a {
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
}

.note-list a:hover {
  color: var(--accent);
}

.note-meta {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--muted);
  display: block;
  margin-top: 0.2rem;
}

article.note time {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--muted);
}

.bookshelf ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.bookshelf li {
  margin-bottom: 0.35rem;
}

.tool-grid {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.tool-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  transition: border-color 0.15s ease;
}

.tool-card:hover {
  border-color: var(--accent);
}

.tool-title {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--fg);
  margin: 0 0 0.4rem;
}

.tool-title a {
  color: inherit;
  text-decoration: none;
}

.tool-title a:hover {
  color: var(--accent);
}

.tool-desc {
  font-size: 0.95rem;
  color: var(--fg);
  margin: 0 0 0.5rem;
}

.tool-meta {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
  word-break: break-all;
}

.deck {
  margin: 1.5rem 0 2rem;
  padding: 0;
}

.deck-stage {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--border);
  border: 1px solid var(--border);
  overflow: hidden;
}

.deck-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.deck-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
}

.deck-controls button {
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  border-radius: 4px;
}

.deck-controls button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.deck-counter {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

footer.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--muted);
}
