@import url('https://fonts.googleapis.com/css2?family=Sen:wght@400;500;700&display=swap');

:root {
  --bg: #fbfdff;
  --text: #202733;
  --muted: #697586;
  --accent: #2f80b7;
  --accent-dark: #1f5f8f;
  --accent-rgb: 47, 128, 183;
  --line: #dce8f2;
  --soft: #eef6fc;
  --surface: rgba(255, 255, 255, 0.78);
  --body-text: #3e4856;
  --shadow: rgba(31, 41, 55, 0.13);
  --max: 880px;
}

body[data-theme="dark"] {
  --bg: #0f0d14;
  --text: #f1edf8;
  --muted: #aaa0b7;
  --accent: #b38cff;
  --accent-dark: #d2bdff;
  --accent-rgb: 179, 140, 255;
  --line: #2c2438;
  --soft: #1b1624;
  --surface: rgba(25, 20, 33, 0.82);
  --body-text: #d5cede;
  --shadow: rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Sen", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 19px;
  line-height: 1.75;
  font-weight: 400;
  transition: background 180ms ease, color 180ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: transparent;
  z-index: -1;
}

body[data-theme="dark"]::before {
  background: transparent;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.35);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px 24px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.site-title {
  border: 0;
  color: var(--text);
  font-family: "Sen", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 37px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 17px;
  font-weight: 500;
}

.nav a { border-bottom: 0; color: var(--muted); }
.nav a:hover { color: var(--accent-dark); }
.nav .cv-link { color: var(--accent-dark); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-dark);
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  padding: 5px 10px;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.theme-toggle:hover {
  border-color: rgba(var(--accent-rgb), 0.60);
  transform: translateY(-1px);
}

.theme-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.14);
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.hero {
  min-height: 440px;
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 56px;
  align-items: center;
  padding: 48px 0 64px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

h1, h2, h3 {
  font-family: 'Sen', sans-serif;
  font-weight: 500;
}

h2 {
  font-size: 29px;
  font-weight: 500;
  margin-bottom: 18px;
}

h3 {
  font-size: 22px;
  font-weight: 500;
}

.lead {
  max-width: 620px;
  margin: 0;
  font-size: 23px;
  line-height: 1.75;
  color: var(--body-text);
  font-weight: 300;
}

.hero-links {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 500;
  box-shadow: 0 8px 24px var(--shadow);
}

.hero-links a:hover {
  border-color: rgba(var(--accent-rgb), 0.65);
  transform: translateY(-1px);
}

.portrait-wrap { justify-self: end; }

.portrait {
  width: 210px;
  height: 210px;
  object-fit: cover;
  border-radius: 50%;
  border: 8px solid var(--surface);
  box-shadow: 0 18px 45px var(--shadow);
  background: var(--soft);
}

.section {
  padding: 54px 0;
  border-bottom: 1px solid var(--line);
}

.section p {
  max-width: 720px;
  margin: 0;
  color: var(--body-text);
}

.interests {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.interests span {
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent-dark);
  font-size: 17px;
  font-weight: 500;
}

.paper {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.paper:first-of-type { margin-top: 4px; }

.paper-year {
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 16px;
  padding-top: 2px;
  white-space: nowrap;
}

.paper-meta {
  margin-top: 6px !important;
  color: var(--muted) !important;
  font-size: 18px;
}

.clean-list {
  margin: 20px 0 0;
  padding-left: 20px;
  color: var(--body-text);
}

.contact-section { border-bottom: 0; }

footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 24px 48px;
  color: var(--muted);
  font-size: 17px;
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav { gap: 14px; }

  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 28px;
  }

  .portrait-wrap {
    justify-self: start;
    order: -1;
  }

  .portrait {
    width: 150px;
    height: 150px;
  }

  .paper {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

