/* ===== RESET & BASE ===== */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
:root{
  --clr-bg:#f5f6fa;--clr-surface:#ffffff;--clr-sidebar:#1a1e2e;--clr-sidebar-hover:#262b3e;
  --clr-accent:#4a6cf7;--clr-accent-light:#6d8bfa;--clr-text:#2d3748;--clr-text-light:#718096;
  --clr-border:#e2e8f0;--clr-timeline:#cbd5e0;--sidebar-width:260px;--radius:10px;
  --shadow:0 2px 12px rgba(0,0,0,.06);--transition:.3s ease;
}
html{scroll-behavior:smooth;font-size:16px}
body{font-family:'Inter',system-ui,-apple-system,sans-serif;color:var(--clr-text);background:var(--clr-bg);line-height:1.7;display:flex;min-height:100vh}
a{color:var(--clr-accent);text-decoration:none;transition:color var(--transition)}
a:hover{color:var(--clr-accent-light)}
img{max-width:100%;display:block}

/* ===== SIDEBAR ===== */
.sidebar{position:fixed;top:0;left:0;width:var(--sidebar-width);height:100vh;background:var(--clr-sidebar);color:#cbd5e0;display:flex;flex-direction:column;z-index:100;overflow-y:auto}
.sidebar-toggle{display:none;position:fixed;top:16px;left:16px;z-index:200;background:var(--clr-sidebar);color:#fff;border:none;border-radius:8px;width:44px;height:44px;font-size:1.2rem;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.25)}
.sidebar-inner{display:flex;flex-direction:column;align-items:center;padding:2rem 1.25rem 2rem;flex:1}
.avatar-wrap{width:120px;height:120px;border-radius:50%;overflow:hidden;border:3px solid var(--clr-accent);margin-bottom:1.25rem;flex-shrink:0}
.avatar-wrap img{width:100%;height:100%;object-fit:cover}
.avatar-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:var(--clr-sidebar-hover);font-size:2.5rem;color:var(--clr-accent)}
.sidebar-name{font-family:'Source Serif 4',Georgia,serif;font-size:1.3rem;font-weight:600;color:#fff;text-align:center;margin-bottom:.25rem}
.sidebar-title{font-size:.75rem;text-align:center;color:#a0aec0;margin-bottom:1.5rem;line-height:1.5}
.sidebar-nav{width:100%;display:flex;flex-direction:column;gap:1px}
.sidebar-nav a{display:flex;align-items:center;gap:.75rem;padding:.5rem 1rem;border-radius:8px;color:#a0aec0;font-size:.82rem;font-weight:500;transition:background var(--transition),color var(--transition)}
.sidebar-nav a i{width:18px;text-align:center;font-size:.85rem}
.sidebar-nav a:hover,.sidebar-nav a.active{background:var(--clr-sidebar-hover);color:#fff}
.sidebar-social{margin-top:auto;padding-top:1.25rem;display:flex;gap:.6rem;flex-wrap:wrap;justify-content:center}
.sidebar-social a{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--clr-sidebar-hover);color:#a0aec0;font-size:.85rem;transition:background var(--transition),color var(--transition)}
.sidebar-social a:hover{background:var(--clr-accent);color:#fff}

/* ===== MAIN ===== */
.main-content{margin-left:var(--sidebar-width);flex:1;padding:2.5rem 3.5rem 2rem;max-width:940px}

/* ===== SECTIONS ===== */
.section{margin-bottom:3rem}
.section-header{margin-bottom:1.5rem}
.section-header h2{font-family:'Source Serif 4',Georgia,serif;font-size:1.65rem;font-weight:600;color:var(--clr-text);position:relative;padding-bottom:.5rem}
.section-header h2::after{content:'';position:absolute;bottom:0;left:0;width:48px;height:3px;background:var(--clr-accent);border-radius:2px}
.section-subtitle{color:var(--clr-text-light);margin-top:.5rem;font-size:.92rem}

/* Intro */
.intro-body p{margin-bottom:.9rem;font-size:.95rem}
.info-chips{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:1rem}
.chip{display:inline-flex;align-items:center;gap:.4rem;padding:.35rem .8rem;background:var(--clr-surface);border:1px solid var(--clr-border);border-radius:999px;font-size:.8rem;color:var(--clr-text-light)}
.chip a{color:var(--clr-text-light);display:inline-flex;align-items:center;gap:.35rem}
.chip a:hover{color:var(--clr-accent)}
.chip i{color:var(--clr-accent);font-size:.78rem}

/* ===== TIMELINE ===== */
.timeline{position:relative;padding-left:28px}
.timeline::before{content:'';position:absolute;left:6px;top:8px;bottom:8px;width:2px;background:var(--clr-timeline)}
.timeline-item{position:relative;margin-bottom:1.75rem}
.timeline-item::before{content:'';position:absolute;left:-24px;top:8px;width:10px;height:10px;border-radius:50%;background:var(--clr-accent);border:2px solid var(--clr-bg)}
.timeline-date{font-size:.76rem;font-weight:600;color:var(--clr-accent);margin-bottom:.2rem;letter-spacing:.02em}
.timeline-content h3{font-size:1rem;font-weight:600;color:var(--clr-text);margin-bottom:.1rem}
.timeline-content h4{font-size:.9rem;font-weight:500;color:var(--clr-text);margin-bottom:.2rem}
.timeline-content .location{font-size:.78rem;color:var(--clr-text-light);margin-bottom:.4rem}
.timeline-content .supervisor{font-size:.83rem;color:var(--clr-text-light);margin-top:.4rem}
.timeline-content p{font-size:.88rem;line-height:1.6}

/* ===== EXPERTISE GRID ===== */
.expertise-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:.9rem}
.expertise-card{background:var(--clr-surface);border:1px solid var(--clr-border);border-radius:var(--radius);padding:1.25rem;text-align:center;transition:transform var(--transition),box-shadow var(--transition)}
.expertise-card:hover{transform:translateY(-3px);box-shadow:var(--shadow)}
.expertise-card i{font-size:1.5rem;color:var(--clr-accent);margin-bottom:.6rem}
.expertise-card h3{font-size:.84rem;font-weight:600}

/* ===== PUBLICATIONS ===== */
.pub-category{font-family:'Source Serif 4',Georgia,serif;font-size:1.1rem;font-weight:600;margin-bottom:.9rem;padding-bottom:.3rem;border-bottom:1px solid var(--clr-border)}
.pub-list{margin-bottom:1.75rem}
.pub-item{background:var(--clr-surface);border:1px solid var(--clr-border);border-radius:var(--radius);padding:1.1rem 1.3rem;margin-bottom:.65rem;display:flex;gap:1rem;align-items:flex-start;transition:box-shadow var(--transition)}
.pub-item:hover{box-shadow:var(--shadow)}
.pub-number{font-family:'Source Serif 4',Georgia,serif;font-size:1.1rem;font-weight:700;color:var(--clr-accent);min-width:24px;text-align:center;padding-top:2px}
.pub-content{flex:1}
.pub-title{font-weight:600;font-size:.9rem;margin-bottom:.2rem}
.pub-authors{font-size:.82rem;color:var(--clr-text-light);margin-bottom:.1rem}
.pub-venue{font-size:.8rem;color:var(--clr-accent);font-style:italic;margin-bottom:.4rem}
.pub-links{display:flex;gap:.6rem;flex-wrap:wrap}
.pub-links a{font-size:.78rem;font-weight:500;display:inline-flex;align-items:center;gap:.3rem;padding:.2rem .55rem;border-radius:6px;background:#eef2ff;color:var(--clr-accent);transition:background var(--transition)}
.pub-links a:hover{background:#dde4ff}
.pub-links a img{display:inline;vertical-align:middle}
.award-badge{display:inline-flex;align-items:center;gap:.25rem;background:#fef3c7;color:#92400e;font-size:.72rem;font-weight:600;padding:.15rem .5rem;border-radius:999px;margin-left:.5rem}
.award-badge i{font-size:.68rem;color:#d97706}

/* ===== REVIEW ===== */
.review-list{display:flex;flex-direction:column;gap:.5rem}
.review-item{background:var(--clr-surface);border:1px solid var(--clr-border);border-radius:var(--radius);padding:.7rem 1.1rem;font-size:.87rem}
.review-item a{font-weight:500}
.if-badge{display:inline-flex;align-items:center;background:#eef2ff;color:var(--clr-accent);font-size:.72rem;font-weight:600;padding:.12rem .45rem;border-radius:999px;margin-left:.5rem}

/* ===== SKILLS CATEGORIES ===== */
.skills-category-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:1rem}
.skills-category-card{background:var(--clr-surface);border:1px solid var(--clr-border);border-radius:var(--radius);padding:1.2rem 1.4rem}
.skills-category-card h3{font-size:.9rem;font-weight:600;margin-bottom:.5rem;display:flex;align-items:center;gap:.5rem}
.skills-category-card h3 i{color:var(--clr-accent);font-size:.9rem}
.skills-category-card p{font-size:.84rem;color:var(--clr-text-light);line-height:1.6}

/* ===== CERTIFICATIONS ===== */
.cert-list{display:flex;flex-direction:column;gap:.6rem}
.cert-item{display:flex;align-items:center;gap:1rem;background:var(--clr-surface);border:1px solid var(--clr-border);border-radius:var(--radius);padding:.85rem 1.3rem}
.cert-year{font-size:.76rem;font-weight:600;color:var(--clr-accent);white-space:nowrap;min-width:72px}
.cert-info h3{font-size:.88rem;font-weight:600}
.cert-info h3 a{color:var(--clr-text)}
.cert-info h3 a:hover{color:var(--clr-accent)}
.cert-info p{font-size:.8rem;color:var(--clr-text-light)}

/* ===== REFERENCES ===== */
.ref-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.ref-card{background:var(--clr-surface);border:1px solid var(--clr-border);border-radius:var(--radius);padding:1.1rem 1.3rem}
.ref-card h3{font-size:.92rem;font-weight:600;margin-bottom:.15rem}
.ref-head{display:flex;justify-content:space-between;align-items:flex-start;gap:.75rem}
.ref-head-text{flex:1;min-width:0}
.ref-logo{flex-shrink:0;height:34px;width:auto;max-width:84px;object-fit:contain}
.ref-title{font-size:.8rem;color:var(--clr-text-light);margin-bottom:.5rem;line-height:1.45}
.ref-links{display:flex;gap:.5rem;flex-wrap:wrap}
.ref-links a{width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:#eef2ff;color:var(--clr-accent);font-size:.78rem;transition:background var(--transition),color var(--transition)}
.ref-links a:hover{background:var(--clr-accent);color:#fff}

/* ===== CONTACT ===== */
.contact-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1rem}
.contact-card{background:var(--clr-surface);border:1px solid var(--clr-border);border-radius:var(--radius);padding:1.25rem;text-align:center}
.contact-card i{font-size:1.3rem;color:var(--clr-accent);margin-bottom:.5rem}
.contact-card h3{font-size:.85rem;font-weight:600;margin-bottom:.25rem}
.contact-card p{font-size:.82rem;color:var(--clr-text-light)}
.contact-card a{color:var(--clr-text-light)}
.contact-card a:hover{color:var(--clr-accent)}

/* ===== FOOTER ===== */
.site-footer{margin-top:2rem;padding:1.25rem 0;border-top:1px solid var(--clr-border);text-align:center;font-size:.8rem;color:var(--clr-text-light)}

/* ===== RESPONSIVE ===== */
@media(max-width:900px){.main-content{padding:2rem 2rem}}
@media(max-width:768px){
  .sidebar{transform:translateX(-100%);transition:transform .35s ease}
  .sidebar.open{transform:translateX(0)}
  .sidebar-toggle{display:flex;align-items:center;justify-content:center}
  .main-content{margin-left:0;padding:4.5rem 1.25rem 2rem}
  .skills-category-grid,.ref-grid{grid-template-columns:1fr}
  .expertise-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:480px){
  .expertise-grid,.contact-grid{grid-template-columns:1fr}
}

/* ===== ORG LOGOS ===== */
.content-with-logo{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}
.content-main{flex:1;min-width:0}
.org-logo-wrap{flex-shrink:0;display:flex;align-items:flex-start;padding-top:.15rem}
.org-logo-wrap img{max-height:40px;width:auto;max-width:130px;object-fit:contain}
.org-logo-wrap.logo-wide img{max-width:190px}
.org-logo-wrap.logo-sm img{height:30px;width:auto;max-height:none;max-width:84px;object-fit:contain}
.logo-placeholder{display:none}
.org-logo-wrap.logo-pair{gap:.5rem;align-items:center}
.org-logo-wrap.logo-pair img{max-height:30px;max-width:80px}
@media(max-width:480px){
  .org-logo-wrap.logo-wide img{max-width:120px}
  .org-logo-wrap.logo-sm img{height:24px;max-width:60px}
  .ref-logo{height:28px;max-width:64px}
  .org-logo-wrap.logo-pair{flex-direction:column;align-items:flex-end;gap:.35rem}
  .org-logo-wrap.logo-pair img{max-height:24px;max-width:64px}
}
.inline-logo{height:15px;width:auto;display:inline-block;vertical-align:middle;margin:0 2px;position:relative;top:-1px}
.review-item{display:flex;align-items:center;gap:.6rem}
.review-logo{height:18px;width:auto;object-fit:contain;flex-shrink:0}
.cert-logo{height:20px;width:auto;object-fit:contain;flex-shrink:0;margin-left:auto}

/* ===== SCROLLBAR ===== */
.sidebar::-webkit-scrollbar{width:4px}
.sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,.15);border-radius:2px}

/* ===== ANIMATIONS ===== */
.section{opacity:0;transform:translateY(20px);transition:opacity .6s ease,transform .6s ease}
.section.visible{opacity:1;transform:translateY(0)}

/* ===== HERO STATUS / CV BUTTON ===== */
.sidebar-focus{display:inline-block;margin-top:.35rem;color:#cbd5e0}
.sidebar-status{display:inline-block;margin-top:.45rem;color:#9ae6b4;font-weight:500}
.sidebar-status i{font-size:.45rem;vertical-align:middle;margin-right:.25rem;color:#48bb78}
.cv-btn{display:inline-flex;align-items:center;gap:.45rem;padding:.55rem 1.1rem;border-radius:999px;background:var(--clr-accent);color:#fff!important;font-size:.82rem;font-weight:600;text-decoration:none;box-shadow:0 2px 8px rgba(0,0,0,.12);transition:transform var(--transition),box-shadow var(--transition)}
.cv-btn:hover{transform:translateY(-1px);box-shadow:0 4px 14px rgba(0,0,0,.18)}
.sidebar-cv{margin-top:1rem;align-self:center}
.cv-actions{margin-top:1.1rem}
.cv-actions-center{text-align:center;margin-top:1.5rem}

/* ===== PROJECTS ===== */
.project-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.project-card{background:var(--clr-surface);border:1px solid var(--clr-border);border-radius:var(--radius);padding:1.1rem 1.3rem;display:flex;flex-direction:column;gap:.45rem;transition:transform var(--transition),box-shadow var(--transition)}
.project-card:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(0,0,0,.06)}
.project-head{display:flex;align-items:center;gap:.6rem}
.project-head i{color:var(--clr-accent);font-size:1rem;flex-shrink:0}
.project-head h3{font-size:.95rem;font-weight:600;line-height:1.35}
.project-card p{font-size:.85rem;line-height:1.55}
.project-card .project-tags{font-size:.75rem;color:var(--clr-text-light)}
.project-card .pub-links{margin-top:auto}
.private-badge{font-size:.75rem;font-weight:500;display:inline-flex;align-items:center;gap:.35rem;padding:.2rem .55rem;border-radius:6px;background:#f1f5f9;color:var(--clr-text-light)}
@media(max-width:1180px){.project-grid{grid-template-columns:1fr}}
.pub-links a.gh-stars{background:#fff7e0;color:#b7791f}
.pub-links a.gh-stars:hover{background:#ffefc2}
.pub-links a.gh-stars[hidden]{display:none}
.project-head h3{flex:1;min-width:0}
.project-date{flex-shrink:0;align-self:flex-start;font-size:.7rem;font-weight:600;color:var(--clr-accent);background:#eef2ff;padding:.15rem .5rem;border-radius:999px;white-space:nowrap;margin-top:.1rem}
.project-card .project-tags{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
