/* ===== Theme ===== */
:root{
  --fg:#16181a;
  --bg:#ffffff;
  --muted:#66707a;
  --line:#e6e8eb;
  --primary:#2c6bed;
  --radius:12px;

  /* per-section background colors */
  --home-bg:#f7fafc;
  --education-bg:#f0f7ff;   /* <--- add this */
  --research-bg:#f9f7ff;
  --teaching-bg:#f6fbf7;
  --awards-bg:#fff8f3; /* soft peach, tweak as you like */
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font:16px/1.65 Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans", sans-serif;
  color:var(--fg); background:var(--bg);
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
.wrap{max-width:980px;margin:0 auto;padding:0 20px}

/* ===== Header / Nav ===== */
.site-header{
  position:sticky; top:0; z-index:20;
  background:var(--bg);
  border-bottom:1px solid var(--line);
  backdrop-filter:saturate(120%) blur(4px);
}
.site-header .wrap{display:flex;align-items:center;justify-content:space-between}
.brand{margin:12px 0;font-size:22px;font-weight:700;letter-spacing:.2px}
.nav{display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.nav a{
  color:var(--muted); text-decoration:none; padding:10px 0; font-size:15px;
  border-bottom:2px solid transparent;
}
.nav a:hover{color:var(--fg)}
.nav a.active{color:var(--primary); border-bottom-color:var(--primary)}

/* ===== SPA sections ===== */
/* ===== Single-page sections (no hiding) ===== */
section{padding:18px 0}

/* make anchor jumps smooth */
html { scroll-behavior: smooth; }

/* offset for sticky header so anchors aren't hidden under it */
:root { --header-h: 64px; }              /* adjust if your header is taller/shorter */
.main-section { scroll-margin-top: var(--header-h); }

/* keep your per-section backgrounds if you want */
.section-home{background:var(--home-bg)}
.section-education{background:var(--education-bg)}
.section-research{background:var(--research-bg)}
.section-teaching{background:var(--teaching-bg)}
.section-awards{background:var(--awards-bg)}




/* Hamburger button (hidden on desktop) */
.hamburger{
  display:none; /* shown in mobile via media query */
  width:40px; height:36px;
  border:0; background:transparent; padding:0; margin-right:8px;
  align-items:center; justify-content:center; cursor:pointer;
}
.hamburger span{
  display:block; width:22px; height:2px; background:var(--fg);
  margin:3px 0; transition:transform .2s ease, opacity .2s ease;
}

/* Make header container the anchor for absolute dropdown */
.site-header .wrap{ position:relative; }

/* Mobile dropdown behavior */
@media (max-width:760px){
  .hamburger{ display:inline-flex; }

  /* Stack brand and button on left, push nav to dropdown */
  .site-header .wrap{
    gap:10px;
  }

  /* Hide nav by default on mobile */
  .nav{
    display:none;
    position:absolute; top:100%; left:0; right:0;
    background:var(--bg); border-bottom:1px solid var(--line);
    flex-direction:column; padding:8px 16px; z-index:25;
  }
  .nav.open{ display:flex; }

  .nav a{
    padding:10px 0; border-bottom:1px solid var(--line);
  }
  .nav a:last-child{ border-bottom:none; }

  /* Optional: animate hamburger to X when open */
  .hamburger.is-open span:nth-child(1){ transform: translateY(5px) rotate(45deg); }
  .hamburger.is-open span:nth-child(2){ opacity:0; }
  .hamburger.is-open span:nth-child(3){ transform: translateY(-5px) rotate(-45deg); }
}



/* ===== Home layout (screenshot-style) ===== */
.about-grid{
  display:grid;
  grid-template-columns: 300px 1fr;
  gap:28px;
}
.avatar{
  width:280px; height:280px; margin:0 auto 12px;
  border-radius:50%; overflow:hidden;
  box-shadow:0 1px 1px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.06);
  background:#fff;
}
.avatar img{width:100%; height:100%; object-fit:cover; display:block}
.left-meta{ text-align:center; }
.title-line{ color:var(--muted); margin:8px 0 6px }
.email a{ color:var(--fg); text-decoration:none }
.email a:hover{ text-decoration:underline }
.badges{ display:flex; justify-content:center; gap:10px; margin-top:10px }
.badge{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:36px; height:32px; padding:0 10px;
  border-radius:8px; border:1px solid var(--line); background:#fff;
  text-decoration:none; color:#2b6cb0; font-weight:600;
}
.badge-ln{ background:#0a66c2; border-color:#0a66c2; color:#fff; }
.badge-em{ background:#2563eb; border-color:#2563eb; color:#fff; font-weight:700 }

.about-right p{ margin:10px 0 12px }
.home-cards{
  display:grid; grid-template-columns: 1fr 1fr; gap:18px; margin-top:6px;
}
.card{
  background:#fff; border:1px solid var(--line);
  border-radius:12px; padding:14px;
}

/* subtle highlight for the section that matches the URL hash */
.main-section:target h2 {
  box-shadow: inset 0 -2px 0 var(--primary);
}

/* ===== Footer ===== */
.site-footer{
  border-top:1px solid var(--line);
  margin-top:28px; padding:14px 0;
  color:var(--muted); font-size:14px;
}

/* ===== Responsive ===== */
@media (max-width:900px){
  .about-grid{ grid-template-columns: 1fr; }
  .avatar{ width:220px; height:220px }
  .home-cards{ grid-template-columns: 1fr; }
}
@media (max-width:760px){
  .entry h4, .entry h3{flex-direction:column; gap:2px}
  ul.compact.two-col{columns:1}
  .brand{font-size:20px}
}

/* ===== Print ===== */
@media print{
  .site-header,.nav,.site-footer{display:none !important}
  body{font-size:12px; line-height:1.4}
  .wrap{max-width:none; padding:0}
  section{padding:6px 0}
  h2{margin:6px 0 4px; padding-bottom:2px}
  .block, .card{border:none; padding:0; margin:6px 0}
}



/* ===== Social Icons ===== */
.social-icons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 12px;
}

.social-icons a {
  color: #a8c5e8;      /* light blue */
  font-size: 28px;     /* icon size */
  transition: color 0.2s ease;
}

.social-icons a:hover {
  color: #ffffff;      /* hover color */
}

/* ===== CV Download Link ===== */
.cv-download {
  margin-top: 10px;
  text-align: center;
}

.cv-download a {
  color: #2c6bed; /* same as your primary blue */
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.cv-download a:hover {
  text-decoration: underline;
}
