:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #2f5fd6;
  --border: #e5e5e5;
  --max-width: 720px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14141a;
    --text: #ececec;
    --muted: #9a9a9a;
    --accent: #7ea2ff;
    --border: #2a2a32;
  }
}

:root[data-theme="dark"] {
  --bg: #14141a;
  --text: #ececec;
  --muted: #9a9a9a;
  --accent: #7ea2ff;
  --border: #2a2a32;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 17px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px 40px;
  position: relative;
}

.theme-toggle {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.hero {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 32px;
}

.avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.hero-text h1 {
  margin: 0 0 4px;
  font-size: 1.6rem;
  font-weight: 700;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.subtitle-secondary {
  margin-top: 2px;
}

.links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.92rem;
}

.links a:hover {
  text-decoration: underline;
}

.about {
  margin-bottom: 40px;
}

.about p {
  margin: 0 0 14px;
}

section {
  margin-bottom: 36px;
}

h2 {
  font-size: 1.05rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 14px;
}

.entry-list, .pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry-list li, .pub-list li {
  margin-bottom: 14px;
}

.entry-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.entry-title {
  font-weight: 600;
  flex: 1 1 auto;
  min-width: 0;
}

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

.entry-desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.section-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.section-note-top {
  margin: -6px 0 16px;
}

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

.section-note a:hover {
  text-decoration: underline;
}

.pub-list li {
  display: flex;
  flex-direction: column;
}

.pub-title {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.pub-title:hover {
  color: var(--accent);
  text-decoration: underline;
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 3px;
}

.pub-venue {
  color: var(--accent);
  font-size: 0.88rem;
  margin-top: 3px;
}

.pub-links {
  font-size: 0.85rem;
  margin-top: 4px;
}

.pub-links a {
  color: var(--accent);
  text-decoration: none;
}

.pub-links a:hover {
  text-decoration: underline;
}

footer {
  margin-top: 48px;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}
