:root {
  color-scheme: light;
  --bg: #fafaf9;
  --text: #1c1917;
  --muted: #5f5b57;
  --subtle: #726e6a;
  --line: #e7e5e4;
  --soft: #f5f5f4;
  --button: #e7e5e4;
  --button-hover: #d6d3d1;
  --link: #1d4ed8;
}

:root.dark {
  color-scheme: dark;
  --bg: #0c0a09;
  --text: #f5f5f4;
  --muted: #a8a29e;
  --subtle: #78716c;
  --line: #44403c;
  --soft: #292524;
  --button: #44403c;
  --button-hover: #57534e;
  --link: #60a5fa;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease;
}

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

button {
  font: inherit;
}

.theme-toggle {
  align-items: center;
  background: var(--button);
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  position: fixed;
  right: 16px;
  top: 16px;
  transition: background 160ms ease, color 160ms ease;
  width: 36px;
  z-index: 10;
}

.theme-toggle:hover {
  background: var(--button-hover);
  color: var(--text);
}

.theme-icon {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.moon-icon,
.dark .sun-icon {
  display: none;
}

.dark .moon-icon {
  display: block;
}

.page {
  display: flex;
  gap: 64px;
  margin: 0 auto;
  max-width: 1024px;
  padding: 48px 24px;
}

.sidebar {
  align-self: flex-start;
  flex: 0 0 240px;
  position: sticky;
  top: 48px;
  /* Darker grey for sidebar text than the main content (light mode) */
  --muted: #45413e;
}

/* In dark mode use a brighter grey so the sidebar stays legible */
.dark .sidebar {
  --muted: #c4beb7;
}

.profile-photo {
  border-radius: 8px;
  height: 128px;
  margin-bottom: 20px;
  object-fit: cover;
  width: 128px;
}

.sidebar h1 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 4px;
}

.sidebar p,
.sidebar > a {
  color: var(--muted);
  display: block;
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 2px;
}

.sidebar > a:last-of-type {
  margin-bottom: 16px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
}

.social-links a {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  height: 24px;
  justify-content: center;
  line-height: 1;
  width: 24px;
}

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

.social-links iconify-icon {
  font-size: 21px;
}

.social-links .hf-icon {
  height: 22px;
  width: 24px;
}

.cv-link {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  gap: 6px;
  font-size: 14px;
  margin-bottom: 20px;
}

.cv-link svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.contact-list {
  color: var(--muted);
  display: grid;
  font-size: 14px;
  gap: 8px;
  margin-bottom: 28px;
}

.contact-row {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.contact-row a {
  overflow-wrap: anywhere;
}

.copy-email {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  display: inline-flex;
  flex: 0 0 auto;
  height: 22px;
  justify-content: center;
  padding: 0;
  width: 22px;
}

.copy-email:hover {
  color: var(--text);
}

.copy-email svg {
  fill: none;
  height: 14px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 14px;
}

.site-nav {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-top: 16px;
}

.site-nav a {
  color: var(--muted);
  font-size: 14px;
}

.content {
  flex: 1 1 auto;
  min-width: 0;
}

section {
  margin-bottom: 40px;
}

h2 {
  border-bottom: 1px solid var(--line);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 20px;
  padding-bottom: 8px;
}

h3 {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 12px;
}

h4 {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  margin: 0;
}

p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

strong {
  color: var(--text);
  font-weight: 600;
}

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

.justify {
  color: color-mix(in srgb, var(--text), var(--muted) 35%);
  font-size: 16px;
  line-height: 1.65;
  text-align: justify;
}

.content a {
  color: var(--link);
}

.entry {
  margin-bottom: 24px;
}

.entry p {
  line-height: 1.65;
}

.entry > a,
.software-list a {
  color: var(--link);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.doi-label {
  color: var(--muted);
  font-size: 14px;
}

.soon-tag {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-left: 6px;
  padding: 2px 8px;
  text-transform: uppercase;
  vertical-align: middle;
}

.page-link {
  color: var(--link);
  font-size: 14px;
}

.page-link .software-globe {
  margin-right: 4px;
}

.software-list {
  display: grid;
  gap: 12px;
}

.software-list p {
  line-height: 1.6;
}

.software-globe {
  color: #2563eb;
  font-size: 15px;
  margin-right: 6px;
  vertical-align: -2px;
}

.timeline {
  display: grid;
  gap: 16px;
  margin: 0 0 28px;
}

.timeline article {
  display: flex;
  gap: 20px;
}

.timeline time {
  color: var(--subtle);
  flex: 0 0 112px;
  font-size: 14px;
  padding-top: 2px;
}

.timeline p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 2px;
}

.note {
  color: var(--subtle);
  font-size: 14px;
  margin: -14px 0 28px 132px;
}

.compact-list,
.detail-list {
  color: var(--muted);
  display: grid;
  font-size: 15px;
  gap: 12px;
  line-height: 1.6;
  list-style: none;
  margin: 0;
  padding: 0;
}

.compact-list li,
.detail-list li {
  padding-left: 18px;
  position: relative;
}

.compact-list li::before,
.detail-list li::before {
  color: var(--subtle);
  content: "•";
  left: 0;
  position: absolute;
}

.detail-list span,
.entry .tag {
  color: var(--subtle);
  font-size: 13px;
}

.detail-list p {
  font-size: 14px;
  margin-top: 2px;
}

.tag {
  background: var(--soft);
  border-radius: 4px;
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
}

footer {
  border-top: 1px solid var(--line);
}

footer div {
  color: var(--subtle);
  font-size: 12px;
  margin: 0 auto;
  max-width: 1024px;
  padding: 20px 24px;
  text-align: center;
}

@media (max-width: 860px) {
  .page {
    display: block;
    padding: 48px 24px 32px;
  }

  .sidebar {
    margin-bottom: 48px;
    position: static;
  }

  .site-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .page {
    padding-left: 20px;
    padding-right: 20px;
  }

  .timeline article {
    display: block;
  }

  .timeline time {
    display: block;
    margin-bottom: 4px;
  }

  .note {
    margin-left: 0;
  }
}
