:root{
  --bg:#ffffff;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --line:rgba(15,23,42,.12);
  --accent:#2563eb;
  --good:#16a34a;
  --gold:#D4AF37;
}

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family:Arial, Helvetica, sans-serif;
  font-size:14px;
  line-height:1.5;
  background:var(--bg);
  color:#202124;
}

.container{
  max-width:980px;
  margin:0 auto;
  padding:18px 20px;
}

/* =========================
   HEADER
   ========================= */

.header{
  padding-top:26px;
  padding-bottom:4px;
}

.hero{
  display:flex;
  gap:22px;
  align-items:flex-start;
  flex-wrap:wrap;
}

.hero-text{
  flex:1;
  min-width:280px;
  padding-top:2px;
}

.hero-profile{
  align-items:flex-start;
}

.hero-photo-col{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  width:180px;
  flex-shrink:0;
}

h1{
  margin:0 0 2px;
  font-size:34px;
  font-weight:700;
}

.subtitle{
  margin:4px 0 8px;
  color:#555;
  font-size:14px;
}

/* =========================
   AVATAR
   ========================= */

.avatar-wrap{
  width:130px;
  height:130px;
  border-radius:4px;
  border:0;
  background:#f3f4f6;
  display:grid;
  place-items:center;
  overflow:hidden;
}

.avatar{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.avatar-fallback{
  width:56px;
  height:56px;
  border-radius:18px;
  background:linear-gradient(
    135deg,
    rgba(37,99,235,.25),
    rgba(22,163,74,.22)
  );
}

/* =========================
   LINKS
   ========================= */

a{
  color:var(--accent);
  text-decoration:none;
}

a:hover{
  text-decoration:underline;
}

.links{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  align-items:center;
  color:var(--muted);
  font-size:13px;
  line-height:1.65;
}

.iconlink{
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:var(--accent);
  font-weight:600;
  text-decoration:none;
}

.iconlink:hover{
  text-decoration:underline;
}

.iconlink i{
  font-size:14px;
  line-height:1;
}

.iconlink span{
  color:inherit;
}

/* =========================
   TAGS
   ========================= */

.tags{
  margin-top:8px;
  display:flex;
  gap:5px;
  flex-wrap:wrap;
}

.tag{
  border:1px solid var(--line);
  background:#f7f7f7;
  padding:2px 7px;
  border-radius:3px;
  color:var(--text);
  font-size:11px;
}

/* =========================
   NAVIGATION
   ========================= */

.nav{
  margin-top:14px;
  padding:9px 0;
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  border-top:1px solid #ddd;
  border-bottom:1px solid #ddd;
}

.nav a{
  font-size:13px;
  color:#444;
  font-weight:600;
}

.nav a:hover{
  color:#111;
}

/* =========================
   SECTIONS
   ========================= */

.card{
  margin-top:0;
  border:0;
  border-radius:0;
  padding:24px 0 20px;
  box-shadow:none;
  background:transparent;
  border-bottom:1px solid #ddd;
}

h2{
  margin:0 0 10px;
  font-size:20px;
  font-weight:700;
  color:#222;
}

h3{
  margin:10px 0 4px;
  font-size:15px;
}

p{
  margin:6px 0;
  color:var(--text);
}

ul{
  margin-top:6px;
  margin-bottom:6px;
  padding-left:22px;
}

li{
  margin:2px 0;
}

code{
  color:var(--text);
  background:rgba(15,23,42,.06);
  padding:2px 6px;
  border-radius:8px;
}

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

.tiny{
  font-size:12px;
}

.section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  flex-wrap:wrap;
}

.section-head .muted.tiny{
  font-size:11px;
  color:#777;
}

.two-col{
  display:grid;
  grid-template-columns:1fr;
  gap:24px;
}

@media(min-width:900px){
  .two-col{
    grid-template-columns:1fr 1fr;
  }
}

/* =========================
   ABOUT
   ========================= */

.bio-paragraphs p{
  line-height:1.65;
  margin:0 0 12px;
}

.bio-paragraphs p:last-child{
  margin-bottom:0;
}

/* =========================
   RESEARCH MAP
   ========================= */

#research-map{
  padding-top:18px;
  padding-bottom:14px;
}

#research-map .section-head{
  margin-bottom:0;
}

#research-map .section-head .muted.tiny{
  margin-top:1px;
}

#research-map .venn-wrap{
  width:100%;
  max-width:570px;
  margin:0 auto;
}

#research-map .venn-wrap svg{
  display:block;
  width:100%;
  height:auto;
  margin:0 auto;
  overflow:hidden;
}

/* Circle behavior */

.vgroup .vcircle{
  opacity:.10;
  transition:opacity .3s;
}

.vgroup .vcircle-border{
  fill:none;
  stroke-width:1.25;
  opacity:.45;
  transition:opacity .3s;
}

.vgroup:hover .vcircle{
  opacity:.18;
}

.vgroup:hover .vcircle-border{
  opacity:.9;
}

/* Main labels */

#research-map .vclabel{
  font-family:Arial, Helvetica, sans-serif;
  font-size:8.5px;
  font-weight:700;
  text-anchor:middle;
  dominant-baseline:middle;
  pointer-events:none;
}

#research-map .vclabel-sub{
  font-family:Arial, Helvetica, sans-serif;
  font-size:5.8px;
  letter-spacing:0;
  text-anchor:middle;
  pointer-events:none;
  fill:#475569;
}

#research-map .vilabel{
  font-family:Arial, Helvetica, sans-serif;
  font-size:5.2px;
  text-anchor:middle;
  dominant-baseline:middle;
  pointer-events:none;
  fill:#475569;
}

#research-map .vcentre{
  font-family:Arial, Helvetica, sans-serif;
  font-size:7.4px;
  font-weight:700;
  text-anchor:middle;
  dominant-baseline:middle;
  pointer-events:none;
  fill:#0f172a;
}

#research-map .vcentre-sub{
  font-family:Arial, Helvetica, sans-serif;
  font-size:5px;
  letter-spacing:.03em;
  text-anchor:middle;
  pointer-events:none;
  fill:#475569;
}

/* Center pulse */

@keyframes vpulse{
  0%{
    r:38;
    opacity:.35;
  }

  100%{
    r:54;
    opacity:0;
  }
}

.vpulse{
  fill:none;
  stroke:#2563eb;
  stroke-width:.8;
  animation:vpulse 2.8s ease-out infinite;
}

.vpulse:nth-child(2){
  animation-delay:1.4s;
}

/* =========================
   RESEARCH TOPIC LEGEND
   ========================= */

#research-map .venn-legend{
  display:flex !important;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
  gap:24px;

  width:100%;
  max-width:none;

  margin:6px auto 0 !important;
  padding:0 !important;

  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}

#research-map .vlegend-item{
  display:inline-flex !important;
  align-items:center;
  gap:6px;

  width:auto !important;
  min-width:0 !important;
  height:auto !important;

  margin:0 !important;
  padding:0 !important;

  border:0 !important;
  outline:0 !important;
  border-radius:0 !important;

  background:none !important;
  background-color:transparent !important;

  box-shadow:none !important;
}

#research-map .vlegend-dot{
  display:inline-block;
  width:7px;
  height:7px;
  margin:0 !important;
  padding:0;
  border:0;
  border-radius:50%;
  flex:0 0 7px;
}

#research-map .vlegend-name{
  margin:0;
  padding:0;
  font-size:12px;
  font-weight:700;
  line-height:1.2;
  white-space:nowrap;
}

#research-map .vlegend-desc{
  display:none !important;
}

/* =========================
   NEWS
   ========================= */

.timeline{
  list-style:none;
  margin:4px 0 0;
  padding:0;
  display:grid;
  gap:0;
}

.timeline li{
  display:grid;
  grid-template-columns:82px 1fr;
  gap:8px;
  align-items:start;
  padding:2px 0;
  border:0;
  border-radius:0;
  background:transparent;
  font-size:12.5px;
  line-height:1.42;
}

/* Hide empty middle timeline span */
.timeline li > span:nth-child(2){
  display:none;
}

.timeline .date{
  color:#777;
  font-size:11.5px;
  white-space:nowrap;
}

.timeline .item{
  color:#222;
  font-size:12.5px;
}

/* Keep default News text dark,
   but allow nested spans to use their own colors */
#news .timeline .item{
  color:#222;
}

#news .timeline .item b,
#news .timeline .item strong{
  color:inherit;
}

/* NEW badge */
.news-new{
  color:#dc2626 !important;
  font-style:italic;
  font-weight:700;
  font-size:11px;
  margin-right:5px;
}

/* News venue highlight */
.news-venue{
  color:#1e3a8a !important;
  font-weight:500;
}

/* If using inline span styles directly, allow them */
#news .timeline .item span[style*="color:red"],
#news .timeline .item span[style*="color: red"]{
  color:red !important;
}

#news .timeline .item span[style*="#1e3a8a"]{
  color:#1e3a8a !important;
}

/* =========================
   TRUE GOLD TROPHY ICONS
   ========================= */

.trophy-icon{
  color:#D4AF37 !important;
  margin-right:6px;
}

#news .trophy-icon,
#news i.fa-trophy,
#news .fa-trophy,
#news i.fa-solid.fa-trophy{
  color:#D4AF37 !important;
}

/* =========================
   NEWS TOGGLE
   ========================= */

.hidden{
  display:none;
}

.news-toggle-btn{
  margin-top:6px;
  padding:0;
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:0;
  background:transparent;
  color:var(--accent);
  border-radius:0;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
}

.news-toggle-btn:hover{
  background:transparent;
  text-decoration:underline;
}

.news-toggle-btn i{
  font-size:10px;
}

.news-toggle-btn.expanded i{
  transform:rotate(180deg);
}

/* =========================
   FILTER BUTTONS
   ========================= */

.filters{
  display:flex;
  gap:5px;
  flex-wrap:wrap;
}

.chip{
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  padding:3px 7px;
  border-radius:3px;
  cursor:pointer;
  font-weight:600;
  font-size:11px;
}

.chip.active{
  border-color:rgba(37,99,235,.45);
  box-shadow:none;
  background:#f0f4ff;
}

/* =========================
   ACADEMIC SERVICE
   ========================= */

.service-list{
  margin-top:10px;
}

.service-row{
  display:grid;
  grid-template-columns:220px 1fr;
  column-gap:34px;
  align-items:start;
  margin-bottom:24px;
}

.service-row:last-child{
  margin-bottom:0;
}

.service-label{
  font-size:14px;
  font-weight:700;
  color:#111;
  line-height:1.6;
}

.service-content{
  font-size:14px;
  font-weight:400;
  color:#111;
  line-height:1.65;
}

@media(max-width:700px){
  .service-row{
    grid-template-columns:1fr;
    row-gap:3px;
    margin-bottom:18px;
  }
}

/* =========================
   PUBLICATIONS
   ========================= */

.pubgrid{
  display:block;
  margin-top:10px;
}

.pub-year-heading{
  font-size:17px;
  font-weight:700;
  margin:20px 0 6px;
  padding-bottom:3px;
  color:#222;
}

.pubcard{
  display:grid;
  grid-template-columns:125px 1fr;
  gap:14px;
  border:0;
  border-radius:0;
  overflow:visible;
  background:transparent;
  padding:10px 0 13px;
  border-bottom:none !important;
}

.thumb{
  min-height:90px;
  height:90px;
  background-size:contain;
  background-position:left center;
  background-repeat:no-repeat;
  background-color:transparent;
  border:0;
  position:relative;
}

.thumb-fallback{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  padding:10px;
  text-align:center;
  color:var(--muted);
  background:#fafafa;
  backdrop-filter:none;
  font-size:10px;
  pointer-events:none;
}

.pubbody{
  padding:0;
}

.badge{
  display:inline-block;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:#666;
  font-size:11px;
  font-weight:700;
}

.pubtitle{
  margin:3px 0 4px;
  font-size:15px;
  line-height:1.32;
  color:#111;
}

.authors{
  color:#555;
  font-size:12px;
  line-height:1.42;
}

.venue{
  color:#555;
  font-size:12px;
  line-height:1.42;
  margin-top:2px;
}

.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:5px;
  font-size:11.5px;
  font-weight:600;
}

.mutedlink{
  color:var(--muted);
  font-weight:600;
  text-decoration:none;
}

.mutedlink:hover{
  color:var(--muted);
  text-decoration:underline;
}

.meta-row{
  display:flex;
  gap:10px;
  margin-top:4px;
  font-size:11.5px;
}

.meta-row .k{
  color:var(--muted);
  min-width:32px;
}

.meta-row .v{
  color:var(--text);
}

/* Hide venue summary strip */
.pub-venue-strip{
  display:none !important;
}

/* =========================
   TEXT HIGHLIGHTS
   ========================= */

.me{
  font-weight:700;
  color:var(--text);
}

.red{
  color:#dc2626;
  font-weight:700;
}

.deepblue{
  color:#1e3a8a;
  font-weight:700;
}

.darkdraw{
  color:#334155;
  font-weight:700;
}

/* =========================
   FOOTER
   ========================= */

.footer{
  margin:10px 0;
  padding:10px 0;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:space-between;
  color:var(--muted);
  font-size:11px;
}

/* =========================
   MOBILE
   ========================= */

@media(max-width:800px){

  #research-map .venn-legend{
    gap:14px;
  }

}

@media(max-width:700px){

  .container{
    padding-left:15px;
    padding-right:15px;
  }

  h1{
    font-size:28px;
  }

  .avatar-wrap{
    width:105px;
    height:105px;
  }

  .hero{
    gap:14px;
  }

  .pubcard{
    grid-template-columns:95px 1fr;
    gap:10px;
  }

  .thumb{
    height:72px;
    min-height:72px;
  }

  .timeline li{
    grid-template-columns:72px 1fr;
  }

  #research-map .venn-wrap{
    max-width:460px;
  }

}

@media(max-width:520px){

  #research-map .venn-legend{
    gap:10px 16px;
  }

  #research-map .vlegend-name{
    font-size:11px;
  }

  #research-map .venn-wrap{
    max-width:100%;
  }

}
