/* ===== Reset & Variables ===== */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
:root{
  --bg:#f5f5f3;--bg-white:#fff;--text:#1a1a1a;--text-secondary:#666;--text-muted:#999;
  --accent:#3ecf8e;--accent-dark:#2db87a;
  --chi:#e74c3c;--acl:#3498db;--acl-f:#5dade2;--sigir:#9b59b6;--emnlp:#e67e22;--emnlp-f:#f0a050;--chi-ea:#c0392b;--other:#888;
  --border:#e5e5e5;--radius:16px;--max-width:1100px;
}
html{scroll-behavior:smooth;font-size:16px}
body{font-family:'Inter',-apple-system,sans-serif;background:var(--bg);color:var(--text);line-height:1.7;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}

/* ===== Nav ===== */
.nav{position:fixed;top:0;left:0;right:0;z-index:100;background:rgba(245,245,243,.85);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border-bottom:1px solid transparent;transition:all .3s}
.nav.scrolled{border-bottom-color:var(--border)}
.nav-inner{max-width:var(--max-width);margin:0 auto;padding:0 2rem;height:64px;display:flex;align-items:center;justify-content:space-between}
.nav-logo{font-weight:700;font-size:1rem;letter-spacing:-.02em}
.nav-links{display:flex;gap:1.5rem}
.nav-links a{font-size:.8rem;color:var(--text-secondary);transition:color .2s;font-weight:500;position:relative;padding-bottom:4px}
.nav-links a:hover{color:var(--text)}
.nav-links a.active{color:var(--text)}
.nav-links a.active::after{content:'';position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--accent);border-radius:1px}
.nav-mobile-btn{display:none;background:none;border:none;cursor:pointer;flex-direction:column;gap:4px;padding:4px}
.nav-mobile-btn span{display:block;width:20px;height:2px;background:var(--text);transition:transform .3s}
.nav-mobile{display:none;flex-direction:column;padding:1rem 2rem;gap:.75rem;background:var(--bg);border-bottom:1px solid var(--border)}
.nav-mobile a{font-size:.9rem;color:var(--text-secondary);font-weight:500}
.nav-mobile.open{display:flex}

/* ===== Page Header (detail pages) ===== */
.page-header{padding:130px 2rem 50px;text-align:center}
.page-title{font-family:'Playfair Display',Georgia,serif;font-size:clamp(2rem,4vw,3rem);font-weight:700;letter-spacing:-.02em}
.page-subtitle{color:var(--text-secondary);margin-top:.75rem;font-size:1rem}

/* ===== Hero ===== */
.hero{min-height:100vh;display:flex;align-items:center;padding:120px 2rem 80px;position:relative}
.hero-content{max-width:var(--max-width);margin:0 auto;width:100%}
.hero-content.hero-grid{display:grid;grid-template-columns:1fr 300px;gap:4rem;align-items:center}

.hero-label{font-size:.75rem;font-weight:600;letter-spacing:.15em;text-transform:uppercase;color:var(--text-muted);margin-bottom:1.5rem}
.hero-title{font-family:'Playfair Display',Georgia,serif;font-size:clamp(2.5rem,5.5vw,4.5rem);font-weight:700;line-height:1.1;letter-spacing:-.03em;margin-bottom:1.5rem}
.hero-title em{font-style:italic;color:var(--accent)}
.hero-subtitle{font-size:1.05rem;color:var(--text-secondary);max-width:550px;line-height:1.8;margin-bottom:2rem}
.hero-subtitle strong{color:var(--text);font-weight:600}
.hero-actions{display:flex;gap:1rem;margin-bottom:2.5rem;flex-wrap:wrap}
.btn{display:inline-flex;align-items:center;padding:.8rem 1.75rem;border-radius:100px;font-size:.875rem;font-weight:600;transition:all .2s}
.btn-primary{background:var(--text);color:var(--bg)}
.btn-primary:hover{background:#333;transform:translateY(-1px)}
.btn-secondary{background:transparent;color:var(--text);border:1.5px solid var(--border)}
.btn-secondary:hover{border-color:var(--text);transform:translateY(-1px)}
.hero-stats{display:flex;gap:2rem;padding-top:1.5rem;border-top:1px solid var(--border)}
.stat-item{display:flex;flex-direction:column}
.stat-number{font-family:'Playfair Display',serif;font-size:2rem;font-weight:700;letter-spacing:-.03em}
.stat-label{font-size:.7rem;color:var(--text-muted);font-weight:600;letter-spacing:.05em;text-transform:uppercase}
.hero-photo{display:flex;justify-content:center}
.photo-rotator{width:280px;height:350px;border-radius:20px;overflow:hidden;position:relative;box-shadow:0 8px 30px rgba(0,0,0,.08)}
.profile-img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity 1s ease}
.profile-img.active{opacity:1}

/* ===== Sections ===== */
.section{padding:80px 2rem}
.container{max-width:var(--max-width);margin:0 auto}
.section-label{font-size:.75rem;font-weight:600;letter-spacing:.15em;text-transform:uppercase;color:var(--text-muted);margin-bottom:1rem;text-align:center}
.section-title{font-family:'Playfair Display',Georgia,serif;font-size:clamp(1.75rem,3.5vw,2.5rem);font-weight:700;line-height:1.2;letter-spacing:-.02em;text-align:center;margin-bottom:3rem}
.section-title em{font-style:italic;color:var(--accent)}

/* ===== About ===== */
.about{background:var(--bg-white)}
.about-grid{display:grid;grid-template-columns:1fr 1fr;gap:3.5rem;align-items:start}
.about-text p{color:var(--text-secondary);margin-bottom:1rem;font-size:.95rem;line-height:1.85}
.about-text strong{color:var(--text);font-weight:600}
.about-areas{display:flex;flex-direction:column;gap:1.25rem}
.area-item{display:flex;gap:1rem;align-items:flex-start;padding:1.25rem;background:var(--bg);border-radius:12px;transition:transform .2s}
.area-item:hover{transform:translateY(-2px)}
.area-icon{flex-shrink:0;width:44px;height:44px;background:var(--text);border-radius:10px;display:flex;align-items:center;justify-content:center;color:white}
.area-item h4{font-size:.9rem;font-weight:700;margin-bottom:.2rem}
.area-item p{font-size:.8rem;color:var(--text-secondary);line-height:1.5}

/* ===== Publication Summary (index) ===== */
.pub-summary{background:var(--bg)}
.pub-highlight-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1.25rem}
.pub-highlight-card{display:block;background:var(--bg-white);border:1px solid var(--border);border-radius:12px;overflow:hidden;transition:transform .2s,box-shadow .2s}
.pub-highlight-card:hover{transform:translateY(-4px);box-shadow:0 12px 30px rgba(0,0,0,.06)}
.pub-highlight-card img{width:100%;height:160px;object-fit:cover;object-position:top center}
.pub-highlight-card .card-text{padding:1rem}
.pub-highlight-card h4{font-size:.82rem;font-weight:650;line-height:1.4;margin-top:.4rem}

/* ===== Research Summary (index) ===== */
.research-summary{background:var(--bg-white)}
.theme-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:1.25rem}
.theme-card-summary{background:var(--bg);border-radius:12px;padding:1.5rem;border-left:4px solid var(--tc);transition:transform .2s}
.theme-card-summary:hover{transform:translateY(-3px)}
.theme-card-summary h4{font-size:.9rem;font-weight:700;margin-bottom:.4rem}
.theme-card-summary p{font-size:.78rem;color:var(--text-secondary);line-height:1.5;margin-bottom:.75rem}
.theme-count{font-size:.7rem;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em}

/* ===== View All Link ===== */
.view-all-link{display:block;text-align:center;margin-top:2rem;font-weight:600;font-size:.9rem;color:var(--accent-dark);transition:color .2s}
.view-all-link:hover{color:var(--text);text-decoration:underline}

/* ===== Project ===== */
.project-card{background:var(--bg-white);border-radius:var(--radius);padding:2.5rem;border:1px solid var(--border);position:relative;overflow:hidden}
.project-card::before{content:'';position:absolute;top:0;left:0;right:0;height:4px;background:linear-gradient(90deg,var(--accent),#6c63ff)}
.project-meta{display:flex;gap:.75rem;margin-bottom:1.25rem;flex-wrap:wrap}
.project-tag{font-size:.7rem;font-weight:600;padding:.3rem .75rem;background:var(--bg);border-radius:100px;color:var(--text-secondary)}
.project-name{font-size:1.25rem;font-weight:700;margin-bottom:1rem}
.project-desc{font-size:.9rem;color:var(--text-secondary);line-height:1.8;margin-bottom:2rem}
.project-phases{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.phase{padding:1rem;background:var(--bg);border-radius:10px;display:flex;flex-direction:column;gap:.5rem}
.phase-num{font-family:'Playfair Display',serif;font-size:1.5rem;font-style:italic;color:#ddd;font-weight:700}
.phase span:last-child{font-size:.8rem;font-weight:600;line-height:1.4}

/* ===== Research Storyline ===== */
.storyline{background:var(--bg-white)}
.storyline-flow{max-width:650px;margin:0 auto;display:flex;flex-direction:column;align-items:center;gap:0}
.storyline-step{display:flex;gap:1.25rem;align-items:flex-start;width:100%}
.step-marker{width:40px;height:40px;border-radius:50%;color:white;font-weight:800;font-size:1rem;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.step-content h3{font-size:1.05rem;font-weight:700;margin-bottom:.3rem}
.step-content p{font-size:.85rem;color:var(--text-secondary);line-height:1.65}
.storyline-arrow{font-size:1.2rem;color:#ddd;margin:.5rem 0;text-align:center;width:40px;align-self:flex-start}

/* ===== Storyline Viz ===== */
.storyline-viz-section{background:var(--bg-white);padding-bottom:0}
.storyline-viz{width:100%;height:560px;position:relative;overflow:hidden;border-radius:var(--radius);background:linear-gradient(135deg,#f8faf8 0%,#f0f4f8 50%,#f8f6f0 100%);touch-action:none;cursor:grab}
.storyline-viz:active{cursor:grabbing}
.storyline-viz .zoom-controls{position:absolute;bottom:12px;right:12px;display:flex;gap:6px;z-index:5}
.storyline-viz .zoom-btn{width:32px;height:32px;border-radius:8px;border:1px solid #ddd;background:#fff;font-size:16px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;color:#666;user-select:none}
.storyline-viz .zoom-btn:hover{background:#f0f0f0}
.storyline-viz svg{width:100%;height:100%}
.storyline-viz .viz-node{cursor:pointer}
.storyline-viz .paper-dot{cursor:pointer;transition:r .15s,opacity .15s}
.viz-tooltip{position:fixed;background:var(--text);color:var(--bg);padding:.5rem .85rem;border-radius:8px;font-size:.75rem;font-weight:500;pointer-events:none;opacity:0;transition:opacity .15s;z-index:1000;max-width:320px;line-height:1.4;box-shadow:0 4px 16px rgba(0,0,0,.2)}

/* ===== Research Garden (research page) ===== */
.garden-section{background:var(--bg)}
.garden-desc{text-align:center;color:var(--text-secondary);max-width:500px;margin:-1.5rem auto 1.5rem;font-size:.9rem}
.garden-viz{width:100%;min-height:520px;border-radius:var(--radius);background:linear-gradient(180deg,#f0f5f8 0%,#e8f0e4 70%,#d4e8d0 100%);position:relative;overflow-x:auto}
.garden-viz svg{display:block;margin:0 auto}
.garden-viz .petal{transition:fill .2s,opacity .2s}
.garden-viz .flower-center{transition:r .2s}
.garden-tooltip{position:fixed;background:var(--text);color:var(--bg);padding:.6rem 1rem;border-radius:8px;font-size:.78rem;font-weight:500;pointer-events:none;opacity:0;transition:opacity .15s;z-index:1000;max-width:380px;line-height:1.5;box-shadow:0 4px 20px rgba(0,0,0,.2)}

/* ===== Research Theme Detail (research page) ===== */
.theme-detail{background:var(--bg-white);border-bottom:1px solid var(--border)}
.theme-detail:nth-child(odd){background:var(--bg)}
.theme-header{display:flex;align-items:center;gap:1rem;margin-bottom:1.25rem;padding-bottom:1rem;border-bottom:3px solid;border-color:inherit;flex-wrap:nowrap}
.theme-header h2{font-family:'Playfair Display',serif;font-size:1.75rem;font-weight:700}
.theme-badge{display:inline-block;padding:.3rem .75rem;border-radius:100px;font-size:.7rem;font-weight:700;color:white;white-space:nowrap;flex-shrink:0}
.theme-description{color:var(--text-secondary);font-size:.95rem;line-height:1.85;margin-bottom:2rem;max-width:700px}
.theme-papers{display:flex;flex-direction:column;gap:1rem}
.theme-paper-item{display:flex;gap:1.25rem;padding:1.25rem;background:var(--bg-white);border:1px solid var(--border);border-radius:12px;transition:transform .2s}
.theme-paper-item:hover{transform:translateX(4px)}
.theme-paper-item img{width:100px;height:130px;object-fit:cover;object-position:top;border-radius:8px;flex-shrink:0}
.theme-paper-item h4{font-size:.9rem;font-weight:700;margin:.35rem 0 .3rem}
.theme-paper-item p{font-size:.82rem;color:var(--text-secondary);line-height:1.6}
.theme-connector{margin-top:2rem;padding:1.25rem;background:rgba(0,0,0,.02);border-radius:10px;font-size:.85rem;color:var(--text-secondary);line-height:1.6;border-left:3px solid var(--border)}
.theme-connector strong{color:var(--text);font-weight:600}

/* ===== Publications Full (publications page) ===== */
.publications-full{background:var(--bg)}
.pub-filters{display:flex;flex-direction:column;gap:.75rem;margin-bottom:1.5rem;align-items:center}
.filter-group{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;justify-content:center}
.filter-label{font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text-muted);margin-right:.25rem}
.filter-btn{background:transparent;border:1.5px solid var(--border);padding:.4rem 1rem;border-radius:100px;font-size:.78rem;font-weight:500;cursor:pointer;font-family:inherit;color:var(--text-secondary);transition:all .2s}
.filter-btn.active{background:var(--text);color:var(--bg);border-color:var(--text)}
.filter-btn:hover:not(.active){border-color:var(--text);color:var(--text)}
.pub-footnote{text-align:center;font-size:.75rem;color:var(--text-muted);margin-bottom:1.5rem;font-style:italic}
.pub-year-heading{font-family:'Playfair Display',serif;font-size:1.5rem;font-weight:700;color:var(--text-muted);margin:2.5rem 0 1rem;padding-bottom:.5rem;border-bottom:2px solid var(--border)}
.pub-year-heading:first-of-type{margin-top:0}
.pub-item{display:flex;gap:1.25rem;padding:1.25rem;border-radius:12px;transition:all .25s;align-items:flex-start;cursor:pointer;background:var(--bg-white);border:1px solid var(--border);margin-bottom:.5rem}
.pub-item:hover{transform:translateX(4px);box-shadow:0 4px 16px rgba(0,0,0,.05)}
.pub-item.hidden{display:none}
.pub-thumb{flex-shrink:0;width:100px;height:130px;border-radius:8px;overflow:hidden;background:var(--bg);border:1px solid var(--border)}
.pub-thumb img{width:100%;height:100%;object-fit:cover;object-position:top center}
.pub-content{flex:1;min-width:0}
.pub-venue-badge{display:inline-block;padding:.2rem .55rem;border-radius:5px;font-size:.6rem;font-weight:700;letter-spacing:.03em;color:white;margin-bottom:.4rem}
.pub-venue-badge.chi{background:var(--chi)}
.pub-venue-badge.chi-ea{background:var(--chi-ea)}
.pub-venue-badge.acl{background:var(--acl)}
.pub-venue-badge.acl-f{background:var(--acl-f)}
.pub-venue-badge.sigir{background:var(--sigir)}
.pub-venue-badge.emnlp{background:var(--emnlp)}
.pub-venue-badge.emnlp-f{background:var(--emnlp-f)}
.pub-venue-badge.other{background:var(--other)}
.pub-title{font-size:.9rem;font-weight:650;line-height:1.45;margin-bottom:.3rem}
.pub-authors{font-size:.78rem;color:var(--text-secondary);margin-bottom:.15rem}
.pub-authors strong{color:var(--text);font-weight:600}
.pub-venue{font-size:.72rem;color:var(--text-muted);font-style:italic}
.pub-expand{max-height:0;overflow:hidden;transition:max-height .4s ease,padding .3s ease;padding:0}
.pub-item.expanded .pub-expand{max-height:200px;padding-top:.75rem}
.pub-abstract{font-size:.82rem;color:var(--text-secondary);line-height:1.6;margin-bottom:.5rem}
.pub-link{font-size:.78rem;font-weight:600;color:var(--accent-dark);display:inline-flex;align-items:center;gap:.3rem}
.pub-link:hover{text-decoration:underline}
.pub-link::after{content:'↗';font-size:.65rem}

/* ===== Awards ===== */
.awards{background:var(--bg-white)}
.awards-list{max-width:700px;margin:0 auto}
.award-item{display:flex;gap:1.5rem;padding:1.5rem 0;border-bottom:1px solid var(--border);align-items:flex-start}
.award-item:first-child{border-top:1px solid var(--border)}
.award-year{font-family:'Playfair Display',serif;font-size:1.1rem;font-weight:700;color:var(--text-muted);flex-shrink:0;width:70px}
.award-content h4{font-size:.9rem;font-weight:700;margin-bottom:.2rem}
.award-content p{font-size:.82rem;color:var(--text-secondary);line-height:1.5}

/* ===== Timeline ===== */
.timeline-list{max-width:700px;margin:0 auto}
.timeline-item{display:flex;gap:1.5rem;padding:1.5rem 0;border-bottom:1px solid var(--border);align-items:flex-start}
.timeline-item:first-child{border-top:1px solid var(--border)}
.timeline-date{font-family:'Playfair Display',serif;font-size:.95rem;font-weight:700;color:var(--text-muted);flex-shrink:0;width:100px;padding-top:.1rem}
.timeline-content h4{font-size:.9rem;font-weight:700;margin-bottom:.2rem}
.timeline-content p{font-size:.82rem;color:var(--text-secondary);line-height:1.5}
.timeline-note{font-style:italic;margin-top:.3rem;font-size:.78rem!important;color:var(--text-muted)!important}
.award-detail{font-size:.78rem!important;color:var(--text-muted)!important;margin-top:.3rem;font-style:italic}

/* ===== Contact ===== */
.contact{text-align:center}
.contact-text{font-size:1rem;color:var(--text-secondary);max-width:500px;margin:-1.5rem auto 2rem;line-height:1.8}
.contact-links{display:flex;justify-content:center;gap:1rem;flex-wrap:wrap}
.contact-link{display:inline-flex;align-items:center;gap:.5rem;padding:.75rem 1.5rem;background:var(--bg-white);border:1.5px solid var(--border);border-radius:100px;font-size:.85rem;font-weight:500;transition:all .2s}
.contact-link:hover{border-color:var(--text);transform:translateY(-2px);box-shadow:0 8px 20px rgba(0,0,0,.06)}

/* ===== Footer ===== */
.footer{border-top:1px solid var(--border);padding:2rem}
.footer-inner{max-width:var(--max-width);margin:0 auto;display:flex;justify-content:space-between;align-items:center}
.footer-name{font-weight:700;font-size:.8rem;letter-spacing:.1em}
.footer-copy{font-size:.75rem;color:var(--text-muted)}

/* ===== Animations ===== */
.fade-in{opacity:0;transform:translateY(20px);transition:opacity .6s ease,transform .6s ease}
.fade-in.visible{opacity:1;transform:translateY(0)}

/* ===== Responsive ===== */
@media(max-width:768px){
  .nav-links{display:none}
  .nav-mobile-btn{display:flex}
  .hero{padding:100px 1.5rem 60px}
  .hero-grid{grid-template-columns:1fr;gap:2rem}
  .hero-photo{order:-1}
  .photo-rotator{width:200px;height:250px}
  .hero-stats{gap:1.5rem;flex-wrap:wrap}
  .about-grid{grid-template-columns:1fr;gap:2rem}
  .pub-highlight-grid{grid-template-columns:1fr 1fr}
  .theme-cards{grid-template-columns:1fr 1fr}
  .project-phases{grid-template-columns:1fr}
  .section{padding:60px 1.5rem}
  .pub-thumb{width:70px;height:90px}
  .theme-paper-item{flex-direction:column}
  .theme-paper-item img{width:100%;height:auto;max-height:150px}
  .footer-inner{flex-direction:column;gap:.5rem;text-align:center}
  .hero-actions{flex-direction:column}
  .btn{text-align:center;justify-content:center}
  .garden-viz{min-height:350px}
}
