* { margin: 0; padding: 0; box-sizing: border-box; }

ul, ol {
  padding-left: 30px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #d3e1f6;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.tagline {
  color: #555;
  margin-bottom: 0.75rem;
}

nav {
  display: flex;
  gap: 1.25rem;
}

nav a {
  color: #555;
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

nav a:hover {
  border-bottom-color: #1a1a1a;
  color: #1a1a1a;
}

#about {
  margin-bottom: 1.5rem;
  color: #333;
}

#news {
  margin-bottom: 1.5rem;
}

#news ul {
  list-style: none;
  padding-left: 0;
}

#news li {
  font-size: 0.9rem;
  color: #444;
  margin-bottom: 0.4rem;
}

#news time {
  color: #888;
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

p + h2 {
  margin-top: 1rem;
}

h2 {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  margin-bottom: 1.25rem;
}

h2 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

h2 a:hover {
  border-bottom-color: #888;
}

article {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #b8cfe8;
}

article:last-child {
  border-bottom: none;
}

article h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

article h3 a {
  color: #1a1a1a;
  text-decoration: none;
  border-bottom: 1px solid #ccc;
  transition: border-color 0.15s;
}

article h3 a:hover {
  border-bottom-color: #1a1a1a;
}

.sep {
  color: #ccc;
  margin: 0 0.25rem;
}

article p {
  color: #444;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-left: 0;
}

.tags li {
  font-size: 0.75rem;
  color: #666;
  background: #b8cfe8;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
}

#writing {
  margin-top: 2.5rem;
}

#writing ul {
  list-style: none;
  padding-left: 0;
}

#writing li {
  margin-bottom: 0.5rem;
}

#writing a {
  color: #1a1a1a;
  text-decoration: none;
  border-bottom: 1px solid #ccc;
  transition: border-color 0.15s;
}

#writing a:hover {
  border-bottom-color: #1a1a1a;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.site-nav a {
  color: #888;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover {
  color: #1a1a1a;
}

.site-nav a.active {
  color: #1a1a1a;
  border-bottom-color: #1a1a1a;
}

article time {
  display: block;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 0.4rem;
}

@media (max-width: 480px) {
  main { padding: 2rem 1rem; }
  header h1 { font-size: 1.5rem; }
}

.headshot {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Article pages */
body:has(#head) {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  background: #d3e1f6;
}

div#head {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

#head a {
  display: flex;
  text-decoration: none;
  align-items: center;
  font-size: 1.1rem;
  gap: 0.5rem;
  font-weight: 600;
  color: #1a1a1a;
}

#head img {
  height: 40px;
}

body:has(#head) h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

body:has(#head) h2 {
  font-size: 1.3rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  color: #1a1a1a;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

body:has(#head) h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

body:has(#head) p {
  margin-bottom: 1rem;
  color: #333;
}

body:has(#head) li {
  margin-bottom: 0.4rem;
}

img { max-width: 100%; }

pre, code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9rem;
}

code {
  background: #c4d6eb;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

body:has(#head) code {
  background: #c4d6eb;
}

pre {
  background: #c4d6eb;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1rem 0;
}

body:has(#head) pre {
  background: #c4d6eb;
}

pre code {
  background: none;
  padding: 0;
}

blockquote {
  border-left: 3px solid #bcd;
  padding-left: 1rem;
  color: #555;
  margin: 1rem 0;
}
