:root {
  --text: #1a1a2e;
  --bg: #fafafa;
  --accent: #2d5a7b;
  --accent-light: #e8f0f6;
  --border: #ddd;
  --muted: #666;
  --max-width: 48rem;
}

[data-theme="dark"] {
  --text: #e0e0e8;
  --bg: #0f0f17;
  --accent: #5ba3d9;
  --accent-light: #1a2a3a;
  --border: #2a2a3a;
  --muted: #999;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  transition: background 0.2s, color 0.2s;
}

header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}

nav .logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin: 0;
}

nav a {
  color: var(--text);
  text-decoration: none;
}

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

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--text);
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

main {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 2rem;
}

h1 { font-size: 2rem; margin-bottom: 1rem; color: var(--accent); }
h2 { font-size: 1.4rem; margin: 2rem 0 0.75rem; color: var(--text); }
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }

p { margin-bottom: 1rem; }

a { color: var(--accent); }

ul, ol { margin: 0 0 1rem 1.5rem; }
li { margin-bottom: 0.25rem; }

.hero {
  background: var(--accent-light);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.hero h1 { margin-bottom: 0.5rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.card h3 { margin-top: 0; }

.pub-list { list-style: none; margin-left: 0; }
.pub-list li {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.pub-list li:last-child { border-bottom: none; }
.pub-list .venue { color: var(--muted); font-style: italic; }

footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 4rem;
}

footer a { color: var(--muted); }

/* Logo inversion for dark mode */
[data-theme="dark"] nav .logo img {
  filter: brightness(1.6);
}
