:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --text: #14213d;
  --muted: #5d6b82;
  --line: #dce4ef;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #dbeafe;
  --teal: #0f766e;
  --shadow: 0 18px 50px rgba(30, 50, 90, 0.10);
  --shadow-sm: 0 8px 26px rgba(30, 50, 90, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; display: block; }
button, input { font: inherit; }

.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 248, 252, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(220, 228, 239, 0.86);
}

.nav-wrap {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  color: white;
  font-size: 0.88rem;
  letter-spacing: -0.04em;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: #43516a;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.94rem;
  font-weight: 650;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: white; box-shadow: var(--shadow-sm); }
.nav-links .cv-link { color: white; background: var(--text); padding-inline: 16px; }
.nav-links .cv-link:hover { color: white; background: #243454; }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: white;
  border-radius: 11px;
  width: 42px;
  height: 42px;
  color: var(--text);
  cursor: pointer;
}

main { min-height: 70vh; }

.hero { padding: 88px 0 68px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(270px, 0.65fr);
  gap: clamp(46px, 8vw, 94px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--accent-dark);
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--accent); }

h1, h2, h3, h4 { margin-top: 0; line-height: 1.16; letter-spacing: -0.035em; }
h1 { font-size: clamp(3.4rem, 7vw, 6.6rem); margin-bottom: 20px; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
h3 { font-size: 1.28rem; margin-bottom: 8px; }

.hero-title span { color: var(--accent); }
.hero-lead { max-width: 760px; color: #465570; font-size: clamp(1.08rem, 1.6vw, 1.24rem); margin: 0 0 28px; }
.hero-lead strong { color: var(--text); }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 12px;
  font-weight: 750;
  font-size: 0.94rem;
  transition: 0.2s ease;
}
.btn-primary { background: var(--accent); color: white; box-shadow: 0 9px 22px rgba(37, 99, 235, 0.20); }
.btn-primary:hover { color: white; background: var(--accent-dark); transform: translateY(-1px); }
.btn-secondary { background: white; color: var(--text); border: 1px solid var(--line); }
.btn-secondary:hover { color: var(--text); border-color: #becae0; transform: translateY(-1px); }

.profile-card {
  position: relative;
  padding: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(220, 228, 239, 0.9);
  border-radius: 32px;
  box-shadow: var(--shadow);
}
.profile-card::before {
  content: "";
  position: absolute;
  inset: -18px 22px auto -18px;
  height: 52%;
  z-index: -1;
  border-radius: 34px;
  background: linear-gradient(145deg, var(--accent-soft), rgba(15, 118, 110, 0.10));
}
.profile-card img { width: 100%; aspect-ratio: 1 / 1.06; object-fit: cover; border-radius: 22px; }
.profile-meta { padding: 18px 6px 5px; }
.profile-meta strong { display: block; font-size: 1.03rem; margin-bottom: 3px; }
.profile-meta span { color: var(--muted); font-size: 0.92rem; }
.social-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.social-row a {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #43516a;
  background: white;
  font-size: 0.84rem;
  font-weight: 700;
}
.social-row a:hover { color: var(--accent-dark); border-color: #b8c9e5; }

.section { padding: 70px 0; }
.section-tight { padding: 48px 0; }
.section-soft { background: rgba(235, 241, 250, 0.6); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 28px; }
.section-head p { max-width: 640px; margin: 0; color: var(--muted); }
.section-head .text-link { white-space: nowrap; font-weight: 750; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.topic-card { padding: 26px; }
.topic-number { color: var(--accent); font-weight: 850; font-size: 0.83rem; margin-bottom: 20px; }
.topic-card p { color: var(--muted); margin: 0; }
.topic-card a { display: inline-block; margin-top: 17px; font-weight: 750; }

.pub-list { display: grid; gap: 14px; }
.pub-card { padding: 22px 24px; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: start; }
.pub-card h3 { margin-bottom: 8px; font-size: 1.12rem; letter-spacing: -0.02em; }
.authors { color: var(--muted); font-size: 0.94rem; margin: 0 0 13px; }
.authors strong { color: var(--text); }
.pub-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-links a {
  padding: 6px 9px;
  border-radius: 8px;
  background: #f3f6fb;
  color: #3d4c65;
  font-size: 0.8rem;
  font-weight: 750;
}
.pub-links a:hover { color: var(--accent-dark); background: var(--accent-soft); }
.venue {
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 850;
}

.mini-timeline { display: grid; gap: 14px; }
.timeline-row { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.timeline-row:last-child { border-bottom: 0; }
.timeline-time { color: var(--accent-dark); font-weight: 800; font-size: 0.9rem; }
.timeline-row h3 { margin-bottom: 4px; }
.timeline-row p { margin: 0; color: var(--muted); }

.page-hero { padding: 66px 0 36px; }
.page-hero h1 { font-size: clamp(2.7rem, 6vw, 5rem); margin-bottom: 14px; }
.page-hero p { max-width: 760px; color: var(--muted); font-size: 1.12rem; margin: 0; }

.research-block { padding: 30px; }
.research-block + .research-block { margin-top: 18px; }
.research-kicker { color: var(--accent); font-size: 0.8rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.11em; margin-bottom: 10px; }
.research-block p { color: var(--muted); }
.research-block ul { margin: 16px 0 0; padding-left: 20px; color: #4b5a73; }
.research-block li + li { margin-top: 7px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.search-box { flex: 1 1 300px; max-width: 470px; position: relative; }
.search-box input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  background: white;
  color: var(--text);
  outline: none;
}
.search-box input:focus { border-color: #91afe7; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08); }
.filter-row { display: flex; gap: 7px; flex-wrap: wrap; }
.filter-btn {
  border: 1px solid var(--line);
  background: white;
  color: #4c5a71;
  padding: 8px 11px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 750;
  font-size: 0.86rem;
}
.filter-btn.active { background: var(--text); color: white; border-color: var(--text); }
.pub-year { margin: 34px 0 12px; font-size: 1rem; color: #3f4d66; font-weight: 850; letter-spacing: 0.02em; }
.hidden { display: none !important; }

.experience-card { padding: 26px; }
.experience-card .meta { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 10px; }
.experience-card .role { color: var(--accent-dark); font-weight: 800; }
.experience-card .date { color: var(--muted); white-space: nowrap; font-weight: 700; font-size: 0.9rem; }
.experience-card p { margin: 0; color: var(--muted); }

.skills-wrap { display: flex; flex-wrap: wrap; gap: 9px; }
.skill { padding: 8px 11px; border-radius: 999px; background: white; border: 1px solid var(--line); color: #42516a; font-weight: 700; font-size: 0.86rem; }

.service-list { display: grid; gap: 12px; }
.service-item { display: flex; gap: 15px; align-items: start; padding: 20px 22px; }
.service-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 850; }
.service-item p { margin: 2px 0 0; color: var(--muted); }

.callout { padding: 28px; background: linear-gradient(135deg, #14213d, #233c70); color: white; border: 0; }
.callout h2 { color: white; }
.callout p { color: #d9e4f7; max-width: 720px; }
.callout .btn-secondary { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: white; }
.callout .btn-secondary:hover { background: rgba(255,255,255,.14); color: white; }

.site-footer { margin-top: 70px; padding: 30px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.87rem; }
.footer-wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 15px; flex-wrap: wrap; }
.footer-links a { color: #536078; font-weight: 650; }

@media (max-width: 900px) {
  .hero { padding-top: 60px; }
  .hero-grid { grid-template-columns: 1fr; }
  .profile-card { max-width: 430px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    display: none;
    position: absolute;
    top: 66px;
    left: 20px;
    right: 20px;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255,255,255,.98);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { text-align: center; }
}

@media (max-width: 650px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .hero { padding: 48px 0 42px; }
  .section { padding: 52px 0; }
  .page-hero { padding-top: 46px; }
  h1 { font-size: clamp(3rem, 15vw, 4.3rem); }
  .section-head { display: block; }
  .section-head .text-link { display: inline-block; margin-top: 12px; }
  .pub-card { grid-template-columns: 1fr; gap: 14px; }
  .venue { justify-self: start; }
  .timeline-row { grid-template-columns: 1fr; gap: 4px; }
  .experience-card .meta { display: block; }
  .experience-card .date { margin-top: 4px; }
}

/* =========================================================
   Education
   ========================================================= */

   .education-section {
    position: relative;
    overflow: hidden;
  }
  
  /* Very subtle decorative glow */
  .education-section::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(55, 105, 190, 0.06);
    filter: blur(70px);
    right: -120px;
    top: -170px;
    pointer-events: none;
  }
  
  .section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 2.2rem;
  }
  
  .section-heading h2 {
    margin-bottom: 0;
  }
  
  
  /* Education cards */
  
  .education-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
  
  
  /* Connecting line */
  .education-grid::before {
    content: "";
    position: absolute;
    top: 42px;
    left: 8%;
    right: 8%;
    height: 1px;
    background: var(--border, #dbe2ea);
    z-index: 0;
  }
  
  
  .education-card {
    position: relative;
    z-index: 1;
  
    padding: 1.5rem 1.6rem 1.6rem;
  
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border, #dbe2ea);
    border-radius: 16px;
  
    transition:
      transform 0.2s ease,
      box-shadow 0.2s ease,
      border-color 0.2s ease;
  }
  
  
  .education-card:hover {
    transform: translateY(-4px);
    border-color: rgba(49, 93, 160, 0.35);
  
    box-shadow:
      0 14px 32px rgba(23, 39, 64, 0.08);
  }
  
  
  .education-year {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent, #315da0);
  
    margin-bottom: 1.15rem;
  }
  
  
  .education-dot {
    position: absolute;
    top: 36px;
    right: 1.5rem;
  
    width: 12px;
    height: 12px;
  
    border-radius: 50%;
    background: var(--accent, #315da0);
  
    box-shadow:
      0 0 0 5px rgba(49, 93, 160, 0.10);
  }
  
  
  .education-card h3 {
    margin: 0 0 0.45rem;
  
    font-size: 1.08rem;
    line-height: 1.35;
  }
  
  
  .education-degree {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text, #263447);
  }
  
  
  .education-location {
    margin: 0.35rem 0 0;
  
    font-size: 0.86rem;
    color: var(--muted, #6b7685);
  }
  
  
  /* Responsive */
  
  @media (max-width: 850px) {
  
    .education-grid {
      grid-template-columns: 1fr;
    }
  
    .education-grid::before {
      display: none;
    }
  
    .education-card {
      padding: 1.35rem 1.4rem;
    }
  
  }

  .education-details {
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border, #dbe2ea);
  }
  
  .education-details p {
    margin: 0.45rem 0 0;
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--muted, #6b7685);
  }
  
  .education-details span {
    display: block;
    margin-bottom: 0.1rem;
  
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  
    color: var(--accent, #315da0);
  }