:root{
  --bg:#f7f8fc;
  --panel:#ffffff;
  --fg:#111827;
  --muted:#4b5563;
  --line:rgba(17,24,39,.10);
  --accent:#2563eb;
  --accent2:#06b6d4;
  --shadow:0 10px 24px rgba(17,24,39,.08);
}
*{box-sizing:border-box}
html, body { height: 100%; }
.page{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  background: transparent;
}

.content{
  flex:1;
  background: transparent;
}

body{
  margin:0;
  font:16px/1.65 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  color:var(--fg);
  background:
    linear-gradient(
      90deg,
      #f7f8fc 0%,
      #f3f7ff 35%,
      #f6fbff 70%,
      #f7f8fc 100%
    );
}
.container{max-width:980px;margin:0 auto;padding:28px}
.site-header{
  border-bottom:1px solid var(--line);
  position:sticky; top:0; z-index:5;
  background: rgba(226,232,240,.92);
  backdrop-filter:saturate(1.2) blur(10px);
  box-shadow: 0 6px 16px rgba(17,24,39,.06);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding-top:14px;
  padding-bottom:14px;
}
.brand{
  font-weight:800;
  text-decoration:none;
  color:var(--fg);
  letter-spacing:.2px;
  font-size:16px;
  white-space:nowrap;
}
.nav{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:0;
}
.nav a{
  color:var(--muted);
  text-decoration:none;
  padding:7px 10px;
  border-radius:12px;
  font-weight:600;
  font-size:14px;
}
.nav a:hover{
  color:var(--fg);
  background:rgba(17,24,39,.07);
}
@media (max-width:820px){
  .header-inner{align-items:flex-start; flex-direction:column}
  .nav{gap:8px}
}
h1{font-size:44px;line-height:1.1;margin:0 0 10px}
h2{font-size:22px;margin:22px 0 10px}
p{margin:10px 0;color:var(--muted)}
a{color:inherit}
.hero{
  display:grid;
  grid-template-columns: 160px 1fr;
  gap:26px;
  align-items:center;
  margin-top:34px;
}

.avatar{
  width:160px;
  height:160px;
  border-radius:26px;
  object-fit:cover;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  background:var(--panel);
}

.badges{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:14px 0 10px;
}

.badge{
  font-size:13px;
  line-height:1;
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--muted);
  background:rgba(255,255,255,.85);
  box-shadow:0 6px 16px rgba(17,24,39,.06);
}
.hero-content{min-width:0;}   /* prevents weird wrapping issues */

.phd{
  margin:4px 0 0;
  color:var(--muted);
  font-weight:650;
  font-size:15px;
  letter-spacing:.1px;
}

.hero-lead{
  margin-top:10px;
  max-width:72ch;
}
.grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin-top:22px;
  align-items:stretch;
  margin-bottom: 40px;
}
.card{
  border:1px solid var(--line);
  border-radius:20px;
  padding:18px 18px;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.86));
  box-shadow: 0 10px 18px rgba(17,24,39,.06);
  display:flex;
  flex-direction:column;
  min-height: 220px;
  position:relative;
  overflow:hidden;
}
.card::before{
  content:"";
  position:absolute;
  top:0; left:0; right:0;
  height:4px;
  background:linear-gradient(90deg, var(--accent), var(--accent2));
  opacity:.55;
}
.card h2{
  margin:6px 0 10px;
  font-size:20px;
  letter-spacing:.1px;
}
.card p{
  margin:0;
  color:var(--muted);
}
.card p + p{ margin-top:10px; }
.card b{
  color:var(--fg);
}
@media (max-width:820px){
  .grid{grid-template-columns:1fr;}
  .card{min-height:auto;}
}
.btns{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:38px;              /* ↓ from 44 */
  padding:0 13px;           /* ↓ from 16 */
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--fg);
  background:rgba(255,255,255,.92);
  text-decoration:none;
  font-weight:600;          /* keep readable */
  font-size:14px;           /* add explicit smaller text */
  letter-spacing:0;
  box-shadow:0 8px 16px rgba(17,24,39,.07);
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 22px rgba(17,24,39,.10);
}

.btn.primary{
  border-color:rgba(37,99,235,.30);
  background:linear-gradient(90deg, rgba(37,99,235,.11), rgba(6,182,212,.09));
}

.site-footer{border-top:1px solid var(--line);color:var(--muted);background: rgba(226,232,240,.92);box-shadow: 0 -6px 16px rgba(17,24,39,.04);}
@media (max-width:820px){
  .hero{grid-template-columns:1fr; gap:16px}
  .avatar{width:130px;height:130px}
}

/*  ********************** Contact Page ********************** */
.contact-wrap{
  max-width: 860px;
  margin: 22px 0 0;
  padding-left: 6px;
}

.contact-card{
  border:1px solid var(--line);
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.88));
  box-shadow:0 14px 32px rgba(17,24,39,.10);
  overflow:hidden;
}

.contact-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 18px;
  border-bottom:1px solid var(--line);
  background:linear-gradient(90deg, rgba(37,99,235,.10), rgba(6,182,212,.08));
}

.contact-title{font-size:18px;font-weight:800;color:var(--fg);}
.contact-subtitle{font-size:14px;color:var(--muted);margin-top:2px;}

.contact-row{
  display:grid;
  grid-template-columns: 160px 1fr;
  gap:14px;
  padding:14px 18px;
  border-bottom:1px solid rgba(17,24,39,.06);
}

.contact-label{
  color:var(--muted);
  font-weight:700;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.contact-value a{
  color:var(--fg);
  text-decoration:none;
  border-bottom:1px dotted rgba(17,24,39,.25);
}

.contact-value a:hover{
  border-bottom-color: rgba(37,99,235,.55);
}

.contact-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px 18px;
}

.contact-note{color:var(--muted);font-size:13px;}

@media (max-width:720px){
  .contact-header{flex-direction:column; align-items:flex-start;}
  .contact-row{grid-template-columns:1fr; gap:6px;}
  .contact-footer{flex-direction:column; align-items:flex-start;}
}

/*  ********************** Publications Page ********************** */
.pubs{margin-top:16px; display:flex; flex-direction:column; gap:14px; max-width:980px;}
.pubs-lead{max-width:80ch; margin-top:6px; color:var(--muted);}

.pubs-toolbar{
  max-width:980px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin:14px 0 10px;
}

.pubs-count{color:rgba(17,24,39,.70); font-weight:650; font-size:14px; display:flex; align-items:center; gap:10px;}
.pubs-count .dot{width:8px;height:8px;border-radius:99px;background:linear-gradient(90deg,var(--accent),var(--accent2)); display:inline-block;}

.pub-card{
  display:grid;
  grid-template-columns: 180px 1fr;
  gap:18px;
  align-items:stretch;
  border:1px solid rgba(17,24,39,.10);
  border-radius:20px;
  padding:16px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 12px 22px rgba(17,24,39,.06);
}

.pub-media{
  border-radius:16px;
  overflow:hidden;
  border:none;
  background: transparent;
  display:flex;
  align-items:center;
  justify-content:center;
}

.pub-media img{
  width:100%;
  height:100%;
  min-height:120px;
  object-fit:cover;
  display:block;
  border:none;
}

.pub-body{min-width:0; display:flex; flex-direction:column; gap:10px;}
.pub-title{margin:0; font-size:18px; line-height:1.25; font-weight:850;}
.pub-title a{text-decoration:none;color: #1e3a8a;}
.pub-title a:hover{text-decoration:underline;color: #1d4ed8;}

.pub-meta{color:var(--muted); font-size:14px; line-height:1.55;}
.pub-venue{display:flex; gap:8px; flex-wrap:wrap; align-items:center;}

.pill{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(17,24,39,.10);
  background: rgba(247,248,252,.9);
  font-size:12.5px;
  font-weight:700;
  color:rgba(17,24,39,.72);
}

.pub-link{
  font-weight:750;
  color:rgba(37,99,235,.95);
  text-decoration:none;
  border-bottom:1px dotted rgba(37,99,235,.40);
}
.pub-link:hover{border-bottom-style:solid;}

@media (max-width:820px){
  .pub-card{grid-template-columns:1fr;}
  .pub-media img{min-height:180px;}
  .pubs-toolbar{flex-direction:column; align-items:flex-start;}
}

/*  ********************** Talks Page ********************** */
.talks{max-width:980px;margin-top:16px;display:flex;flex-direction:column;gap:12px;}

.talk-card{
  display:grid;
  grid-template-columns: 90px 1fr;
  gap:14px;
  border:1px solid rgba(17,24,39,.10);
  border-radius:20px;
  padding:14px 16px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 12px 22px rgba(17,24,39,.06);
}

.talk-year{
  font-weight:900;
  font-size:16px;
  color: rgba(17,24,39,.75);
  padding-top:2px;
}

.talk-title{
  font-weight:850;
  font-size:16px;
  line-height:1.25;
  color:#1e3a8a;
}

.talk-authors{color:var(--muted);font-size:14px;margin-top:6px;}
.talk-venue{color:rgba(17,24,39,.70);font-size:14px;margin-top:6px;}
.talk-tags{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;}

@media (max-width:820px){
  .talk-card{grid-template-columns:1fr;}
  .talk-year{font-size:14px;}
}

/*  ********************** About Page ********************** */
.soft-rule{
  border:0;
  height:1px;
  background: rgba(17,24,39,.10);
  margin:22px 0;
}

.about-hero{
  max-width:980px;
  margin-top:18px;
  display:grid;
  grid-template-columns: 240px 1fr;
  gap:24px;
  align-items:start;
}

.about-left{display:flex;flex-direction:column;gap:12px;padding-top: 65px;}
.about-photo{
  width:240px;height:240px;object-fit:cover;
  border-radius:24px;
  border:1px solid rgba(17,24,39,.10);
  box-shadow: 0 14px 30px rgba(17,24,39,.08);
}

.about-links.icons{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

.icon-btn{
  width:36px;
  height:36px;
  border-radius:12px;
  border:1px solid rgba(17,24,39,.10);
  background: rgba(255,255,255,.70);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 10px 18px rgba(17,24,39,.06);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration:none;
}

.icon-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 22px rgba(17,24,39,.08);
  background: rgba(255,255,255,.88);
}

.icon-btn svg{
  width:18px;
  height:18px;
  fill: rgba(17,24,39,.78);
}
.about-name{font-size:30px;font-weight:900;letter-spacing:.1px;color:var(--fg);}
.about-subtitle{margin-top:8px;color:rgba(17,24,39,.70);font-weight:650;}
.about-lead{
  margin-top:14px;
  padding:14px 14px;
  border-left:4px solid rgba(37,99,235,.35);
  background: rgba(255,255,255,.55);
  border-radius:16px;
  color:var(--muted);
}

.about-pillrow{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px;}

.about-section{max-width:980px;}
.about-section h2{margin:0 0 10px;font-size:20px;}
.about-list{margin:8px 0 0; padding-left:18px; color:var(--muted);}
.about-list li{margin:8px 0;}

.about-timeline{
  position:relative;
  padding-left:18px;
  margin-top:10px;
}
.about-timeline:before{
  content:"";
  position:absolute;
  left:7px; top:6px; bottom:6px;
  width:2px;
  background: rgba(37,99,235,.20);
}
.about-item{
  display:grid;
  grid-template-columns: 18px 1fr;
  gap:12px;
  padding:10px 0;
}
.about-dot{
  width:12px;height:12px;border-radius:99px;
  margin-top:4px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 18px rgba(37,99,235,.18);
}
.about-when{font-weight:850;color:#1e3a8a;}
.about-what{color:var(--muted);margin-top:4px;}

.about-two{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin-top:10px;
}
.about-mini{
  padding:12px 14px;
  background: rgba(255,255,255,.55);
  border:1px solid rgba(17,24,39,.10);
  border-radius:16px;
}
.about-mini-title{font-weight:850;color:var(--fg);}
.about-mini-text{color:var(--muted);margin-top:6px;}

.about-note{max-width:80ch;color:var(--muted);}

@media (max-width:920px){
  .about-hero{grid-template-columns:1fr;}
  .about-left{ padding-top: 0; }
  .about-photo{width:180px;height:180px;}
  .about-links{flex-direction:row;flex-wrap:wrap;}
  .about-links .btn{width:auto;}
  .about-two{grid-template-columns:1fr;}
}

/*  ********************** Research Page ********************** */
/* Research page (no-cards) */
.research-lead{max-width:90ch;margin-top:10px;color:var(--muted);font-size:16px;}
.research-bullets{
  max-width:980px;
  margin-top:14px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.rchip{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;
  border:1px solid rgba(17,24,39,.10);
  border-radius:999px;
  background: rgba(255,255,255,.55);
  color: rgba(17,24,39,.72);
  font-weight:650;
  font-size:13.5px;
}
.rchip .dot{width:8px;height:8px;border-radius:99px;background:linear-gradient(90deg,var(--accent),var(--accent2));}

.research-section{max-width:980px;}
.rblock{
  padding:14px 14px;
  background: rgba(255,255,255,.50);
  border:1px solid rgba(17,24,39,.10);
  border-radius:18px;
  margin-top:12px;
}
.rblock-title{font-weight:900;color:#1e3a8a;font-size:16px;}
.rblock-text{color:var(--muted);margin-top:8px;line-height:1.6;}
.rblock-tags{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;}
.rfig{ margin:0 0 12px; }
.rfig-img{
  width:100%;
  height:auto;
  display:block;
  border-radius:16px;
  border:1px solid rgba(17,24,39,.10);
  box-shadow: 0 12px 22px rgba(17,24,39,.06);
  background: rgba(255,255,255,.7);
}
.rfig figcaption{
  margin-top:8px;
  font-size:13px;
  color: rgba(17,24,39,.62);
}
.research-themes{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:16px;
  margin-top:12px;
}
.theme{
  padding:12px 14px;
  border-left:4px solid rgba(37,99,235,.28);
  background: rgba(255,255,255,.45);
  border-radius:16px;
  border:1px solid rgba(17,24,39,.10);
}
.theme-title{font-weight:900;color:var(--fg);}
.theme-text{color:var(--muted);margin-top:6px;}

.research-cols{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin-top:10px;
}
.minihead{margin:0 0 8px;font-size:15px;color:rgba(17,24,39,.78);font-weight:850;}

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

@media (max-width:920px){
  .research-themes{grid-template-columns:1fr;}
  .research-cols{grid-template-columns:1fr;}
}
