:root {
  color-scheme: light dark;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  max-width: 700px;
  margin: 40px auto;
  padding: 0 20px;
  line-height: 1.6;
  font-size: 18px;
  color: #222;
  background: #fff;
  overflow-x: hidden;
}

@media (prefers-color-scheme: dark) {
  body { color: #ddd; background: #111; }
  a { color: #8ab4f8; }
  hr { border-color: #333; }
}

header nav a {
  margin-right: 1em;
  text-decoration: none;
  font-weight: 600;
}

h1, h2, h3 {
  line-height: 1.3;
}

a {
  color: #1a5fb4;
}

.post-meta {
  color: #767676;
  font-size: 0.9em;
  margin-top: -0.5em;
}

/* Post list on homepage */
.post-list {
  list-style: none;
  padding: 0;
}

.post-list li {
  margin-bottom: 0.6em;
}

.post-list .date {
  color: #767676;
  font-size: 0.85em;
  margin-right: 0.5em;
}

pre {
  background: #f5f5f5;
  padding: 1em;
  overflow-x: auto;
  border-radius: 4px;
}

@media (prefers-color-scheme: dark) {
  pre { background: #1c1c1c; }
}

code {
  font-family: "SF Mono", Consolas, Menlo, monospace;
  font-size: 0.9em;
}

footer {
  margin-top: 4em;
  font-size: 0.85em;
  color: #767676;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* Timeline (events page) */
.timeline {
  border-left: 2px solid #ccc;
  margin-left: 8px;
  padding-left: 24px;
}

.timeline-entry {
  position: relative;
  margin-bottom: 1.8em;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  left: -29px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1a5fb4;
}

.timeline-date {
  color: #767676;
  font-size: 0.85em;
  display: block;
}

.timeline-entry h3 {
  margin: 0.15em 0 0.2em 0;
}

.timeline-entry p {
  margin: 0;
}

@media (prefers-color-scheme: dark) {
  .timeline { border-left-color: #333; }
  .timeline-entry::before { background: #8ab4f8; }
}
/* Hero and Top of page content */
.hero {
  position: relative;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-top: -40px;
  margin-bottom: 1.5em;
  background: #07070a;
  height: 150px;
  overflow: hidden;
  box-sizing: border-box;
}
 
.hero-inner {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 20px 0;
  position: relative;
  z-index: 2;
}
 
.hero nav a {
  color: #f2e9d8;
}
 
.hero-text {
  margin-top: 24px;
}
 
.hero-text h1 {
  color: #f2e9d8;
  font-size: 1.7em;
  margin: 0;
}
 
.starfield {
  position: absolute;
  inset: 0;
}
 
.starfield .star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #ffffff;
  opacity: 0.5;
  border-radius: 50%;
}

/* PDF embed for talk/slide posts */
.pdf-embed {
  position: relative;
  width: 100%;
  height: 600px;
  margin: 1.5em 0 0.5em;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  .pdf-embed { border-color: #333; }
}

.pdf-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.pdf-fallback {
  font-size: 0.85em;
  color: #767676;
}
