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

:root {
  --bg: #111111;
  --text: #d4cfc6;
  --muted: #6b6560;
  --link: #b89a6a;
  --link-hover: #d4b88a;
  --rule: #2a2a2a;
  --max: 660px;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.0625rem;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 2rem 1.25rem 4rem;
}

.site-wrap {
  max-width: var(--max);
  margin: 0 auto;
}

/* Header */
header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.site-title {
  font-size: 1rem;
  font-weight: normal;
  letter-spacing: 0.02em;
  margin: 0;
}

.site-title a {
  color: var(--text);
  text-decoration: none;
}

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

nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.03em;
}

nav a:hover {
  color: var(--link-hover);
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.825rem;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: normal;
  line-height: 1.35;
  margin-top: 2em;
  margin-bottom: 0.5em;
}

h1 { font-size: 1.6rem; margin-top: 0; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; }

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover { color: var(--link-hover); }

blockquote {
  margin: 1.5em 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

ul, ol {
  padding-left: 1.5em;
  margin: 0 0 1.1em;
}

li { margin-bottom: 0.3em; }

strong { color: #e0dbd2; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  margin: 1.5em 0;
}

th, td {
  text-align: left;
  padding: 0.4em 0.75em;
  border-bottom: 1px solid var(--rule);
}

th {
  color: var(--muted);
  font-weight: normal;
}

code {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 0.85em;
  background: #1e1e1e;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

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

.note-list li {
  margin-bottom: 0;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
}

.note-list li:first-child { border-top: 1px solid var(--rule); }

.note-date {
  color: var(--muted);
  font-size: 0.825rem;
  white-space: nowrap;
  flex-shrink: 0;
}

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

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

/* Home intro */
.home-intro {
  margin-bottom: 2.5rem;
}

.home-intro p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
}

/* Note page */
.note-header {
  margin-bottom: 2rem;
}

.note-header time {
  display: block;
  color: var(--muted);
  font-size: 0.825rem;
  margin-top: 0.4rem;
}

.note-body { max-width: var(--max); }

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover { color: var(--link-hover); }

/* Notes page heading */
.page-heading {
  font-size: 1rem;
  font-weight: normal;
  color: var(--muted);
  margin: 0 0 2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.8rem;
}
