@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

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

:root {
  --sidebar-width: 230px;
  --accent: #2563eb;
  --accent-light: rgba(37, 99, 235, 0.08);
  --text: #1a1a1a;
  --muted: #6b7280;
  --sidebar-bg: #f8f9fa;
  --border: #e5e7eb;
  --content-max: 720px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: #fff;
}

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

a:hover {
  text-decoration: underline;
}

/* ── SIDEBAR ──────────────────────────────────────────────────────────────── */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 2.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  margin-bottom: 1rem;
}

.sidebar-name {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.sidebar-affil {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 1.75rem;
}

.sidebar-nav {
  list-style: none;
  margin-bottom: 1.5rem;
}

.sidebar-nav li {
  margin-bottom: 2px;
}

.sidebar-nav a {
  display: block;
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
}

.sidebar-nav a:hover {
  color: var(--accent);
  background: var(--accent-light);
  text-decoration: none;
}

.sidebar-nav a.active {
  color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
}

.sidebar-links {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.sidebar-links a {
  font-size: 0.78rem;
  color: var(--muted);
}

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

/* ── MAIN CONTENT ─────────────────────────────────────────────────────────── */

.main {
  margin-left: var(--sidebar-width);
  padding: 3.5rem 4rem 5rem 3.5rem;
  max-width: calc(var(--sidebar-width) + var(--content-max));
}

section {
  margin-bottom: 4rem;
  scroll-margin-top: 2rem;
}

section h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.75rem;
}

/* ── ABOUT ────────────────────────────────────────────────────────────────── */

.about-name {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

.about-affil {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.about-tagline {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.about-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.chip {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
}

.about-bio {
  max-width: 640px;
  color: #374151;
}

.about-interests {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.interests-label {
  font-weight: 600;
  color: var(--text);
  margin-right: 0.5rem;
}

.about-photo-mobile {
  display: none;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  margin-bottom: 1.25rem;
}

/* ── CV ───────────────────────────────────────────────────────────────────── */

.cv-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.cv-table td {
  padding: 0.45rem 0;
  vertical-align: top;
}

.cv-table td:first-child {
  width: 150px;
  color: var(--muted);
  font-size: 0.82rem;
  padding-right: 1.25rem;
  white-space: nowrap;
}

.cv-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.subsection-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 2rem 0 0.9rem;
}

/* ── AWARDS ───────────────────────────────────────────────────────────────── */

.awards-list {
  list-style: none;
  padding: 0;
}

.awards-list li {
  padding: 0.35rem 0;
  font-size: 0.92rem;
}

/* ── TALKS ────────────────────────────────────────────────────────────────── */

.talks-list {
  list-style: none;
  padding: 0;
}

.talks-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.talks-list li:last-child {
  border-bottom: none;
}

.talk-venue {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 0.15rem;
}

.talk-title {
  font-style: italic;
}

/* ── PUBLICATIONS ─────────────────────────────────────────────────────────── */

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

.pub-list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  line-height: 1.55;
}

.pub-list li:last-child {
  border-bottom: none;
}

.pub-links {
  margin-top: 0.3rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.pub-links a {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 1px 6px;
  transition: background 0.15s, color 0.15s;
}

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

/* ── BLOG ─────────────────────────────────────────────────────────────────── */

.blog-list {
  list-style: none;
  padding: 0;
}

.blog-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.blog-list li:last-child {
  border-bottom: none;
}

.blog-list a {
  color: var(--text);
  font-weight: 500;
}

.blog-list a:hover {
  color: var(--accent);
  text-decoration: none;
}

.blog-date {
  color: var(--muted);
  font-size: 0.82rem;
}

.blog-empty {
  color: var(--muted);
  font-size: 0.88rem;
}

/* ── BLOG POST PAGES ──────────────────────────────────────────────────────── */

body.post-body {
  background: #fff;
}

.post-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.post-back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.post-back:hover {
  color: var(--accent);
  text-decoration: none;
}

.post-title {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.post-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-content {
  line-height: 1.75;
  color: #374151;
}

.post-content p { margin-bottom: 1.25rem; }
.post-content h2 { font-size: 1.15rem; font-weight: 600; margin: 2rem 0 0.75rem; }
.post-content h3 { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.post-content li { margin-bottom: 0.4rem; }
.post-content code { background: #f3f4f6; padding: 1px 5px; border-radius: 3px; font-size: 0.88em; }
.post-content pre { background: #f3f4f6; padding: 1rem; border-radius: 6px; overflow-x: auto; margin-bottom: 1.25rem; }

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
    padding: 2rem 1.5rem 4rem;
  }

  .about-photo-mobile {
    display: block;
  }

  .cv-table td:first-child {
    width: 110px;
  }
}
