:root {
  --bg: #fff;
  --text: #111;
  --accent: #2563eb;
  --card: #f9f9f9;
  --shadow: 0 2px 5px rgba(0,0,0,0.05);
  --muted: #666;
}
html[data-theme='dark'] {
  --bg: #111;
  --text: #eee;
  --accent: #7aa2ff;
  --card: #1c1c1c;
  --shadow: 0 2px 6px rgba(0,0,0,0.3);
  --muted: #aaa;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ----------- PAGE LAYOUT ----------- */
.page-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;        /* <— fix it on the left */
  top: 0;
  left: .1;
  height: 100vh;          /* full viewport height */
  background: #111;       /* black background */
  color: #eee;
  width: 150px;           /* fixed width */
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;       /* scroll inside if links overflow */
}

.sidebar .logo a {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: bold;
  display: block;
  margin-bottom: 2rem;
}

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.site-nav a {
  color: #ddd;
  text-decoration: none;
  font-size: 1rem;
}

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

.social-sidebar {
  margin-top: 20%;
  display: flex;
  gap: 1rem;
}

.social-sidebar a {
  color: #aaa;
  font-size: 1.3rem;
}

.social-sidebar a:hover {
  color: var(--accent);
}

.content {
  margin-left: 200px;     /* same as sidebar width */
  flex: 1;
  padding: 2rem;
  background: var(--bg);
  color: var(--text);
}

/* ----------- CV TIMELINE ----------- */
.cv-section { margin: 3rem 0; }
.cv-section h2 {
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 0.2rem;
}

.timeline {
  position: relative;
  margin-left: 6rem;
  padding-left: 2rem;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 3rem;
  width: 3px;
  height: 100%;
  background: var(--accent);
}

.cv-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
  position: relative;
}
.cv-left {
  position: absolute;
  left: -6rem;
  width: 5rem;
  text-align: right;
}
.cv-marker {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.3rem;
}
.cv-date {
  font-size: 0.85rem;
  color: var(--muted);
  display: inline-block;
  vertical-align: middle;
}
.cv-content {
  background: var(--card);
  padding: 1rem 1.2rem;
  border-radius: 6px;
  box-shadow: var(--shadow);
  flex: 1;
}
.cv-content h3 { margin-top: 0; font-size: 1.1rem; }
.cv-institution { margin: 0.3rem 0 0.8rem; font-weight: 500; }
.cv-institution a { color: var(--accent); text-decoration: none; }
.cv-institution a:hover { text-decoration: underline; }

/* ----------- COLLAPSIBLE ----------- */
.cv-details { display: none; margin-top: 0.5rem; }
.cv-item.open .cv-details { display: block; }
.cv-toggle {
  cursor: pointer;
  position: relative;
  padding-right: 1.2rem;
}
.cv-toggle::after {
  content: "▸";
  position: absolute;
  right: 0;
  color: var(--accent);
  font-size: 1.35rem;
  transition: transform 0.2s ease;
}
.cv-item.open .cv-toggle::after { transform: rotate(90deg); }


.pub-item { margin-bottom: 1rem; }
.pub-item a {
  color: var(--accent);
  text-decoration: none;
}
.pub-item a:hover { text-decoration: underline; }

.pub-list {
  margin: 0;
  padding-left: 1.2rem; /* indent for bullets/numbers */
}

.pub-list li {
  margin-bottom: 1rem;
  line-height: 1.6;
}


.hero {
  text-align: center;
  padding: 5rem 1rem;
}
.highlights {
  margin: 3rem auto;
  max-width: 800px;
}
.highlights ul {
  list-style: none;
  padding: 0;
}
.highlights li {
  margin: 0.5rem 0;
}

