:root {
  --bg: #ffffff;
  --fg: #1f2328;
  --muted: #59636e;
  --accent: #1a5fb4;
  --border: #d8dee4;
  --header-bg: #f6f8fa;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --fg: #e6edf3;
    --muted: #9198a1;
    --accent: #6cb6ff;
    --border: #30363d;
    --header-bg: #161b22;
  }
}

* { box-sizing: border-box; }

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

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.site-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg);
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.site-header nav a { color: var(--muted); }
.site-header nav a.active { color: var(--fg); font-weight: 600; }

/* Content */
main { padding-top: 24px; padding-bottom: 48px; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 2rem; margin-top: 0.5em; }
h2 { font-size: 1.4rem; margin-top: 2em; padding-bottom: 0.3em; border-bottom: 1px solid var(--border); }
h3 { font-size: 1.15rem; margin-top: 1.5em; }
li { margin: 0.25em 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
img { max-width: 100%; height: auto; }

/* Home page identity card */
.profile {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  margin-bottom: 1.5em;
}
.profile img {
  width: 180px;
  border-radius: 8px;
}
.profile .info p { margin: 0.2em 0; }
.profile .role { font-size: 1.1rem; font-weight: 600; }

/* Long reference lists (publications, internships) */
.biblio li { margin: 0.6em 0; }

.muted { color: var(--muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 16px 0;
}

/* Code */
code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}
code {
  background: var(--header-bg);
  padding: 0.1em 0.3em;
  border-radius: 4px;
}
pre {
  background: var(--header-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  overflow-x: auto;
}
pre code { background: none; padding: 0; }

blockquote {
  margin: 1em 0;
  padding: 0 1em;
  border-left: 4px solid var(--border);
  color: var(--muted);
}
