/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1e3a5f;
  --secondary: #2980b9;
  --accent: #c0392b;
  --bg: #f5f6f8;
  --white: #fff;
  --text: #2c3e50;
  --text-light: #6c757d;
  --border: #dee2e6;
  --shadow: 0 2px 15px rgba(0,0,0,0.08);
  --radius: 8px;
}

body { font-family: 'Inter','Noto Sans SC',-apple-system,sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--secondary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4 { font-weight: 600; line-height: 1.3; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== CAROUSEL ===== */
#carousel-wrapper { position: relative; width: 100%; height: 480px; overflow: hidden; background: #1a2a3a; }
.carousel-track { display: flex; height: 100%; transition: transform 0.7s cubic-bezier(0.4,0,0.2,1); }
.carousel-slide { min-width: 100%; height: 100%; background-size: cover; background-position: center; position: relative; }
.slide-inner { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: white; text-align: center; padding: 20px; }
.slide-inner h2 { font-size: 32px; margin-bottom: 12px; text-shadow: 1px 2px 6px rgba(0,0,0,0.4); font-weight: 700; }
.slide-inner p { font-size: 17px; opacity: 0.9; text-shadow: 1px 1px 4px rgba(0,0,0,0.3); }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.2); border: 2px solid rgba(255,255,255,0.5); color: white; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; font-size: 22px; display: flex; align-items: center; justify-content: center; transition: all 0.3s; z-index: 10; }
.carousel-btn:hover { background: rgba(255,255,255,0.4); }
#carousel-prev { left: 20px; }
#carousel-next { right: 20px; }
.carousel-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.carousel-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.3s; }
.carousel-dot.active { background: white; transform: scale(1.3); }

/* ===== NAVIGATION ===== */
#main-nav { background: var(--primary); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.25); }
.nav-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; padding: 0 20px; justify-content: space-between; }
.nav-left { display: flex; align-items: center; }
.nav-brand { color: white; font-weight: 700; font-size: 18px; padding: 16px 20px 16px 0; margin-right: 20px; border-right: 1px solid rgba(255,255,255,0.2); white-space: nowrap; }
.nav-links { display: flex; list-style: none; }
.nav-links li a { display: block; padding: 16px 16px; color: rgba(255,255,255,0.85); font-size: 14px; font-weight: 500; transition: all 0.25s; text-decoration: none; border-bottom: 3px solid transparent; }
.nav-links li a:hover, .nav-links li a.active { color: white; border-bottom-color: #5bc0de; background: rgba(255,255,255,0.08); }
.lang-toggle { display: flex; gap: 6px; align-items: center; }
.lang-btn { padding: 6px 14px; border-radius: 20px; border: 1.5px solid rgba(255,255,255,0.5); background: transparent; color: rgba(255,255,255,0.8); font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.lang-btn.active { background: rgba(255,255,255,0.2); color: white; border-color: white; }
.lang-btn:hover { background: rgba(255,255,255,0.15); color: white; }

/* ===== SECTIONS ===== */
.page-section { display: none; }
.page-section.active { display: block; }

/* ===== SECTION TITLE ===== */
.section-title { font-size: 26px; color: var(--primary); margin-bottom: 30px; padding-bottom: 12px; border-bottom: 3px solid var(--secondary); display: inline-block; }

/* ===== LANDING ===== */
.landing-wrap { padding: 50px 0; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px,1fr)); gap: 24px; }
.news-card { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border-left: 4px solid var(--secondary); transition: transform 0.2s, box-shadow 0.2s; }
.news-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }
.news-date { font-size: 12px; color: var(--text-light); margin-bottom: 6px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.news-card-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.news-card-body { font-size: 14px; color: var(--text-light); line-height: 1.6; }
.news-tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; margin-bottom: 8px; }
.tag-paper  { background: #e8f4fd; color: #1a6fa8; }
.tag-award  { background: #fef3cd; color: #856404; }
.tag-hiring { background: #d1e7dd; color: #0a5c36; }
.tag-event  { background: #f8d7da; color: #842029; }

/* ===== HOME / BIO ===== */
.bio-layout { display: grid; grid-template-columns: 280px 1fr; gap: 40px; padding: 40px 0; align-items: start; }
.bio-sidebar { position: sticky; top: 80px; }
.bio-photo { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; display: block; }
.bio-info-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.bio-name { font-size: 20px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.bio-title-text { font-size: 13px; color: var(--text-light); margin-bottom: 15px; }
.bio-info-item { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; font-size: 13px; color: var(--text); line-height: 1.4; }
.bio-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; margin-top: 1px; }
.bio-links { display: flex; flex-direction: column; gap: 8px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); }
.bio-link-btn { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg); border-radius: 6px; font-size: 13px; color: var(--text); transition: all 0.2s; text-decoration: none; }
.bio-link-btn:hover { background: var(--secondary); color: white; text-decoration: none; }
.bio-content { background: var(--white); border-radius: var(--radius); padding: 35px 40px; box-shadow: var(--shadow); }
.bio-content h2 { color: var(--primary); font-size: 22px; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.bio-content h3 { color: var(--primary); font-size: 18px; margin: 25px 0 15px; }
.bio-content p { margin-bottom: 16px; font-size: 15px; line-height: 1.8; color: #444; }
.bio-content ul { margin-left: 20px; margin-bottom: 16px; }
.bio-content ul li { margin-bottom: 8px; font-size: 14px; color: #444; }
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 20px; padding-left: 20px; }
.timeline-item::before { content: ''; position: absolute; left: -25px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--secondary); border: 2px solid white; box-shadow: 0 0 0 2px var(--secondary); }
.timeline-date { font-size: 12px; color: var(--text-light); font-weight: 600; text-transform: uppercase; margin-bottom: 3px; }
.timeline-content { font-size: 14px; color: var(--text); line-height: 1.6; }

/* ===== RESEARCH ===== */
.research-layout { display: grid; grid-template-columns: 220px 1fr; gap: 30px; padding: 40px 0; align-items: start; }
.research-filters { position: sticky; top: 80px; background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.filter-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-light); margin-bottom: 8px; display: block; }
.filter-select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; color: var(--text); background: white; cursor: pointer; margin-bottom: 20px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.filter-select:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(41,128,185,0.15); }
.pub-count { text-align: center; font-size: 13px; color: var(--text-light); margin-top: 5px; padding-top: 15px; border-top: 1px solid var(--border); }
.pub-list { display: flex; flex-direction: column; gap: 16px; }
.pub-card { background: var(--white); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow); border-left: 4px solid var(--border); transition: all 0.2s; }
.pub-card:hover { border-left-color: var(--secondary); box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.pub-card.first-author { border-left-color: var(--secondary); }
.pub-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.pub-year-badge { background: var(--primary); color: white; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.pub-venue-badge { background: #e8f4fd; color: #1a6fa8; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-oral-badge { background: #fef3cd; color: #856404; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.pub-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 8px; line-height: 1.4; }
.pub-authors { font-size: 13px; color: var(--text-light); margin-bottom: 10px; line-height: 1.5; }
.pub-links { display: flex; gap: 10px; flex-wrap: wrap; }
.pub-link { padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 500; border: 1px solid var(--secondary); color: var(--secondary); transition: all 0.2s; text-decoration: none; }
.pub-link:hover { background: var(--secondary); color: white; text-decoration: none; }

/* ===== TEACHING ===== */
.teaching-content { padding: 40px 0; }
.teaching-year { margin-bottom: 35px; }
.teaching-year-title { font-size: 20px; color: var(--primary); margin-bottom: 15px; padding: 10px 20px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); border-left: 4px solid var(--secondary); display: flex; align-items: center; gap: 10px; }
.course-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.course-table th { background: var(--primary); color: white; padding: 12px 16px; text-align: left; font-size: 14px; }
.course-table td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.course-table tr:last-child td { border-bottom: none; }
.course-table tr:hover td { background: #f0f7ff; }

/* ===== TEAM ===== */
.team-content { padding: 40px 0; }
.filter-bar { display: flex; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.filter-btn { padding: 8px 20px; border-radius: 25px; border: 2px solid var(--border); background: var(--white); color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.filter-btn:hover, .filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 24px; }
.member-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.member-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.12); }
.member-photo-wrap { height: 200px; background: linear-gradient(135deg, #1e3a5f, #2980b9); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.member-photo { width: 100%; height: 100%; object-fit: cover; }
.member-photo-placeholder { width: 90px; height: 90px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 40px; color: white; }
.member-info { padding: 18px; }
.member-name { font-size: 17px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.member-role-badge { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 20px; display: inline-block; margin-bottom: 10px; }
.role-postdoc { background: #d1ecf1; color: #0c5460; }
.role-phd    { background: #d4edda; color: #155724; }
.role-master { background: #fff3cd; color: #856404; }
.role-alumni { background: #e2e3e5; color: #383d41; }
.member-desc { font-size: 13px; color: var(--text-light); line-height: 1.5; }

/* ===== NEWS PAGE ===== */
.news-page-content { padding: 40px 0; }
.news-full-list { display: flex; flex-direction: column; gap: 20px; }
.news-item { background: var(--white); border-radius: var(--radius); padding: 24px 28px; box-shadow: var(--shadow); border-left: 4px solid var(--secondary); }
.news-item-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; flex-wrap: wrap; gap: 10px; }
.news-item-title { font-size: 17px; font-weight: 600; color: var(--text); }
.news-item-date { font-size: 13px; color: var(--text-light); white-space: nowrap; }
.news-item-body { font-size: 14px; color: #555; line-height: 1.7; }
.hiring-box { background: linear-gradient(135deg, #0a5c36, #27ae60); color: white; border-radius: var(--radius); padding: 30px; margin-bottom: 30px; }
.hiring-box h3 { font-size: 20px; margin-bottom: 12px; }
.hiring-box p { font-size: 14px; line-height: 1.7; opacity: 0.95; }
.hiring-box a { color: #b3f0d0; }

/* ===== CONTACT ===== */
.contact-content { padding: 40px 0; }
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.contact-card { background: var(--white); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.contact-card h3 { font-size: 18px; color: var(--primary); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.contact-item { display: flex; gap: 12px; margin-bottom: 18px; align-items: flex-start; }
.contact-icon { font-size: 20px; width: 28px; text-align: center; color: var(--secondary); flex-shrink: 0; }
.contact-text { font-size: 14px; color: var(--text); line-height: 1.6; }
.contact-text strong { display: block; font-size: 11px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; font-weight: 600; }

/* ===== FOOTER ===== */
footer { background: var(--primary); color: rgba(255,255,255,0.7); text-align: center; padding: 25px; font-size: 13px; margin-top: 60px; }
footer a { color: rgba(255,255,255,0.85); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .bio-layout, .research-layout { grid-template-columns: 1fr; }
  .bio-sidebar { position: static; }
  .research-filters { position: static; }
  .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  #carousel-wrapper { height: 280px; }
  .slide-inner h2 { font-size: 22px; }
  .slide-inner p { font-size: 14px; }
  .nav-links li a { padding: 16px 10px; font-size: 12px; }
  .nav-brand { display: none; }
  .bio-content { padding: 20px; }
}

/* ===== LANGUAGE TOGGLE ===== */
[data-lang] { display: none; }
[data-lang].lang-active { display: inline; }
[data-lang-block] { display: none; }
[data-lang-block].lang-active { display: block; }
