/* ============================================
   QID Lab - Academic Minimalist Style
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: #333;
  background: #fff;
}
a { color: #c0392b; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: disc; padding-left: 24px; }

/* === Navigation === */
nav {
  background: #3d4f5f;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
}
.logo {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.82rem;
  font-weight: 400;
  transition: color 0.2s;
  text-decoration: none;
}
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links a.active { color: #fff; font-weight: 500; }
.lang-switch { display: flex; gap: 3px; }
.lang-switch button {
  padding: 2px 8px;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: rgba(255,255,255,0.7);
  font-size: 0.7rem;
  cursor: pointer;
  border-radius: 2px;
}
.lang-switch button.active { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.5); }
.menu-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.2rem; cursor: pointer; }

/* === Container === */
.container { max-width: 900px; margin: 0 auto; padding: 0 16px; }

/* === Page Header === */
.page-header { padding: 24px 0 16px; }
.page-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
}

/* === Home Layout === */
.home-intro {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  padding: 24px 0 32px;
}
.home-intro-left h1 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 12px;
}
.home-intro-left p {
  margin-bottom: 10px;
  color: #444;
}
.home-intro-left .specialties {
  margin: 12px 0;
  font-style: italic;
  color: #555;
}
.home-intro-left .recruiting {
  margin-top: 48px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-left: 3px solid #c0392b;
}
.home-intro-left .recruiting a { font-weight: 500; }

.pi-photo {
  width: 100%;
  max-width: 180px;
  aspect-ratio: 3/4;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.8rem;
  margin-bottom: 10px;
}
.pi-photo img { width: 100%; height: 100%; object-fit: cover; }
.pi-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 3px;
}
.pi-info .pi-title {
  font-size: 0.78rem;
  color: #666;
  margin-bottom: 6px;
}
.pi-edu { font-size: 0.78rem; color: #555; }
.pi-edu li { margin-bottom: 3px; }

/* === Section Titles === */
.section-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 24px 0 12px;
}

/* === Research Highlights === */
.highlights-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}
.highlight-item { margin-bottom: 20px; }
.highlight-item img {
  width: 100%;
  max-width: 240px;
  margin-bottom: 8px;
  border: 1px solid #e0e0e0;
}
.highlight-item h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}
.highlight-item p {
  font-size: 0.82rem;
  color: #555;
  margin-bottom: 4px;
}
.highlight-item .journal { font-style: italic; color: #777; }
.highlight-item a { font-size: 0.82rem; }

/* === News === */
.news-list { }
.news-item {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}
.news-item:last-child { border-bottom: none; }
.news-item .date {
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 3px;
}
.news-item h4 {
  font-size: 0.85rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 3px;
}
.news-item a { font-size: 0.82rem; }

/* === Team Page === */
.pi-section {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e0e0e0;
}
.pi-section .pi-photo { max-width: 140px; }
.pi-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 3px;
}
.pi-section .pi-role {
  font-size: 0.82rem;
  color: #666;
  font-style: italic;
  margin-bottom: 8px;
}

.team-group-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 24px 0 12px;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.member-card {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
}
.member-photo {
  width: 90px;
  height: 115px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.7rem;
}
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.member-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 2px;
}
.member-info .role {
  font-size: 0.78rem;
  color: #666;
  font-style: italic;
  margin-bottom: 4px;
}
.member-info p {
  font-size: 0.8rem;
  color: #555;
  line-height: 1.55;
}
.member-contacts {
  display: flex;
  gap: 5px;
  margin-top: 6px;
}
.member-contacts a {
  display: inline-block;
  width: 22px; height: 22px;
  background: #c0392b;
  color: #fff;
  border-radius: 2px;
  text-align: center;
  line-height: 22px;
  font-size: 0.65rem;
}
.member-contacts a:hover { background: #a93226; text-decoration: none; }

/* === Research Page === */
.research-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #eee;
}
.research-area:nth-child(even) { grid-template-columns: 1fr 1fr; }
.research-area:nth-child(even) .research-img { order: 2; }
.research-area:nth-child(even) .research-text { order: 1; }
.research-img img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}
.research-text h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}
.research-text p {
  color: #444;
  margin-bottom: 8px;
}
@media (max-width: 768px) {
  .research-area {
    grid-template-columns: 1fr !important;
  }
  .research-area:nth-child(even) .research-img { order: 1; }
  .research-area:nth-child(even) .research-text { order: 2; }
}
.research-area:last-child { border-bottom: none; }
.research-area h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}
.research-area p {
  color: #444;
  margin-bottom: 8px;
}
.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.research-tags .tag {
  padding: 2px 8px;
  background: #f0f0f0;
  font-size: 0.75rem;
  color: #555;
  border-radius: 2px;
}

/* === Publications Page === */
.pub-category {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 20px 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e0e0e0;
}
.pub-list { list-style: none; padding: 0; }
.pub-item {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.85rem;
  line-height: 1.65;
}
.pub-item:last-child { border-bottom: none; }
.pub-item .authors { color: #444; }
.pub-item .title { font-weight: 500; }
.pub-item .journal { font-style: italic; color: #555; }
.pub-item .year { font-weight: 500; }
.pub-item .links { margin-top: 4px; }
.pub-item .links a, .pub-item .links button {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  font-size: 0.72rem;
  color: #555;
  cursor: pointer;
  border-radius: 2px;
  text-decoration: none;
}
.pub-item .links a:hover, .pub-item .links button:hover {
  background: #e8e8e8;
  text-decoration: none;
}
.pub-filters { margin-bottom: 16px; }
.pub-filters button {
  padding: 3px 12px;
  margin-right: 5px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  font-size: 0.78rem;
  color: #555;
  cursor: pointer;
  border-radius: 2px;
}
.pub-filters button.active { background: #3d4f5f; color: #fff; border-color: #3d4f5f; }

/* === News Page === */
.news-year {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 20px 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e0e0e0;
}
.news-entry {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}
.news-entry:last-child { border-bottom: none; }
.news-entry .date {
  font-size: 0.78rem;
  color: #888;
  margin-bottom: 3px;
}
.news-entry h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 6px;
}
.news-entry p {
  color: #555;
  font-size: 0.85rem;
}
.news-entry.featured {
  padding: 16px;
  background: #f8f9fa;
  border-left: 3px solid #c0392b;
}

/* === Join Page === */
.position-item {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}
.position-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
}
.position-item .status {
  display: inline-block;
  padding: 2px 8px;
  background: #c0392b;
  color: #fff;
  font-size: 0.7rem;
  border-radius: 2px;
  margin-bottom: 6px;
}
.position-item p { color: #555; font-size: 0.85rem; }

.contact-section {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
}
.contact-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 10px;
}
.contact-row {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 0.85rem;
}
.contact-row .label {
  min-width: 50px;
  color: #666;
  font-weight: 500;
}

/* === Footer === */
footer {
  background: #f5f5f5;
  border-top: 1px solid #e0e0e0;
  margin-top: 32px;
  padding: 20px 0;
}
.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-left h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 3px;
}
.footer-left p {
  font-size: 0.78rem;
  color: #666;
}
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-links a {
  font-size: 0.78rem;
  color: #666;
  text-decoration: none;
}
.footer-links a:hover { color: #c0392b; text-decoration: none; }
.footer-right p {
  font-size: 0.75rem;
  color: #888;
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #3d4f5f;
    flex-direction: column;
    padding: 16px;
    gap: 0;
    z-index: 1000;
    overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    display: block;
    padding: 12px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    width: 100%;
  }
  .nav-links a:last-of-type { border-bottom: none; }
  .nav-links .lang-switch {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .menu-toggle { display: block; }
  .home-intro { grid-template-columns: 1fr; }
  .highlights-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .member-card { grid-template-columns: 70px 1fr; }
  .member-photo { width: 70px; height: 90px; }
  .pi-section { grid-template-columns: 100px 1fr; }
  .footer-inner { flex-direction: column; }
}
