/***** Global *****/
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
  background-color: #fafafa;
  color: #222;
  line-height: 1.7;
}

/***** Navigation *****/
header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  background: #ffffff;
  color: #111827;
  padding: 1.5rem 1rem;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
  z-index: 100;
}

.nav-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-link {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  text-align: center;
}

.nav-logo {
  max-width: 160px;
  width: 100%;
  height: auto;
  display: inline-block;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

nav a {
  color: #111827;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  transition: background 0.2s ease, color 0.2s ease;
}

nav a:hover,
nav a:focus {
  background: rgba(96, 165, 250, 0.18);
  color: #1d4ed8;
}

nav a.active {
  background: #bfdbfe;
  color: #1d4ed8;
}

.nav-footer {
  margin-top: auto;
  width: 100%;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
}

nav a.active:hover,
nav a.active:focus {
  background: #93c5fd;
  color: #1d4ed8;
}

.language-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  margin-bottom: 0.75rem;
}

.lang-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  color: #374151;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lang-option.active {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
}

.lang-option:hover {
  border-color: #93c5fd;
}

.lang-separator {
  color: #9ca3af;
}

/***** Layout *****/
.container {
  display: flex;
  max-width: 1000px;
  margin: 40px auto 40px 300px;
  gap: 60px;
  padding: 0 20px;
}

/***** Sidebar *****/
.sidebar {
  flex: 1;
  max-width: 260px;
  text-align: center;
}

.sidebar img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.sidebar h1 {
  font-size: 1.6rem;
  margin: 0.3rem 0;
  text-align: center;
}

.sidebar p {
  margin: 0.2rem 0;
  color: #555;
  font-size: 0.95rem;
  text-align: center;
}

.sidebar a {
  color: #2563eb;
  text-decoration: none;
}

.sidebar a:hover {
  text-decoration: underline;
}

/***** Main Content *****/
.main {
  flex: 2;
}

.main h2 {
  font-size: 1.4rem;
  margin-top: 0;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 5px;
}

.main p {
  margin: 0.8rem 0 1.5rem;
}

/***** Lists *****/
ul {
  padding-left: 20px;
}

li {
  margin-bottom: 8px;
}

/***** Links *****/
a {
  color: #2563eb;
}

a:hover {
  text-decoration: underline;
}

/***** Footer *****/
footer {
  text-align: center;
  padding: 2rem 0;
  margin-top: 40px;
  font-size: 0.9rem;
  color: #777;
  border-top: 1px solid #e5e7eb;
}

/***** Responsive *****/
@media (max-width: 768px) {
  header {
    position: static;
    width: auto;
    height: auto;
    padding: 1rem 0;
    box-shadow: none;
  }

  .nav-container {
    padding: 0 20px;
  }

  nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  nav a {
    padding: 0.7rem 0.9rem;
  }

  .container {
    flex-direction: column;
    margin: 20px auto;
  }

  .sidebar {
    max-width: 100%;
    text-align: center;
  }

  .main {
    width: 100%;
  }
}

.pub {
  background: #fff;
  padding: 12px 15px;
  margin-bottom: 12px;
  border-left: 4px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pub:hover {
  background: #f3f4f6;
  border-left-color: #2563eb;
}

/* ===== Team Grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

/* ===== Card Style ===== */
.card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: #ffffff;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.card img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
  background: #f3f4f6;
}

.card-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.card:hover::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: #2563eb;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.card h3 {
  margin: 0 0 5px;
  font-size: 1.1rem;
}

.card p {
  margin: 3px 0;
  font-size: 0.95rem;
  color: #444;
}

/* Subtle topic styling */
.card em {
  color: #666;
  font-size: 0.9rem;
}

/* Make card links behave like normal cards */
.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* ===== Icons row ===== */
.icons {
  margin-top: 8px;
}

.icons a {
  margin-right: 10px;
  font-size: 1.2rem;
  text-decoration: none;
  transition: transform 0.15s ease, color 0.15s ease;
}

/* Hover effect */
.icons a:hover {
  transform: scale(1.2);
  color: #2563eb;
}

.cosupervision {
  font-size: 0.9rem;
  color: #666;
  margin-top: 4px;
}

/* ===== Responsive (mobile) ===== */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .card {
    flex-direction: column;
    align-items: stretch;
  }

  .card img {
    width: 100%;
    height: auto;
  }
}

#toTopBtn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

#toTopBtn:hover {
  background-color: #1e40af;
  transform: translateY(-2px);
}


/* Intro text */
.intro {
  font-size: 1.05rem;
  color: #444;
  margin-bottom: 25px;
}

/* Section spacing */
.main h2 {
  margin-top: 30px;
}

/* Lists */
.main ul {
  margin: 10px 0 20px;
  padding-left: 20px;
}

.main li {
  margin-bottom: 6px;
}

/* Closing note */
.closing {
  margin-top: 30px;
  font-style: italic;
  color: #555;
}

/* Slight emphasis for important section */
h2 {
  font-weight: 600;
}

.contact-simple {
  padding-left: 10px;
}

.contact-simple a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.contact-simple a:hover {
  text-decoration: underline;
}

.section-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 25px;
  position: relative; /* IMPORTANT */
}

.section-card p {
  margin: 4px 0;
}

.section-card p {
  color: #555;
  line-height: 1.5;
}

.timeline {
  margin-top: 10px;
}

.entry {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  margin-bottom: 18px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.entry:last-child {
  border-bottom: none;
}

.date {
  font-weight: 500;
  color: #374151;
  font-size: 0.95rem;
  white-space: nowrap;
}

.content {
  line-height: 1.4;
}

.content strong {
  font-size: 1rem;
  color: #111827;
}

.desc {
  color: #666;
  font-size: 0.9rem;
}

.services {
  padding-left: 20px;
}

.services li {
  margin-bottom: 6px;
}

.section-card:hover {
  background: #f3f4f6;
}

.section-card h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

.join-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 25px;
  position: relative;
}

.join-panel h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

.join-panel details {
  margin-top: 18px;
}

.join-panel summary {
  cursor: pointer;
  font-weight: 600;
  color: #1f2937;
  padding: 10px 0;
  list-style: none;
}

.join-panel summary::-webkit-details-marker {
  display: none;
}

.join-panel summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 10px;
  transform: rotate(0deg);
  transition: transform 0.2s ease;
}

.join-panel details[open] summary::before {
  transform: rotate(90deg);
}

.join-card {
  display: block;
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 18px;
}

.join-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.15rem;
}

.join-card .desc {
  color: #334155;
  margin-bottom: 12px;
}

.join-card p,
.join-card ul,
.join-card ol {
  color: #475569;
  line-height: 1.7;
  margin-top: 0.8rem;
}

.join-card ul,
.join-card ol {
  padding-left: 20px;
}

.join-card a {
  color: #2563eb;
}

.cv-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
}

.last-updated {
  font-size: 0.85rem;
  color: #666;
}

.hero-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 25px;
}

.visiting-banner {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 25px;
}

.visiting-banner-copy h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #1d4ed8;
}

.visiting-banner-copy p {
  margin: 0 0 1rem;
  color: #334155;
  line-height: 1.6;
}

.hero-card h1 {
  margin-top: 0;
}

.tagline {
  font-size: 1.1rem;
  color: #2563eb;
  margin-top: 5px;
}

.hero-desc {
  color: #555;
  margin-top: 10px;
  line-height: 1.5;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 10px;
}

.mini-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px;
  background: #fafafa;
  transition: transform 0.2s ease;
}

.mini-card-icon {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
}

.mini-card-content {
  flex: 1;
}

.mini-card:hover {
  transform: translateY(-3px);
}

.mini-card h3 {
  margin-top: 0;
  font-size: 1rem;
}

.topic-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 16px;
}

.topic-card {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.topic-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.2rem;
  color: #111827;
}

.topic-card p {
  margin: 0.75rem 0;
  color: #4b5563;
}

.topic-meta {
  display: block;
  font-weight: 600;
  color: #1f2937;
  margin-top: 18px;
}

.topic-card strong {
  color: #111827;
}

.publication-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.publication-list li {
  padding: 14px 0;
  border-bottom: 1px solid #eff6ff;
  color: #334155;
}

.publication-list li:last-child {
  border-bottom: none;
}

.publication-list a {
  color: #2563eb;
  text-decoration: none;
}

.publication-list a:hover {
  text-decoration: underline;
}

.publication-title {
  display: block;
  margin-bottom: 8px;
  color: #111827;
}

.publication-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  color: #475569;
  font-size: 0.95rem;
}

.publication-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #e0f2fe;
  color: #1d4ed8;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
}

.tag-icon {
  display: inline-flex;
  font-size: 0.95em;
  line-height: 1;
}

@media (max-width: 768px) {
  .topic-grid {
    grid-template-columns: 1fr;
  }
}

.news-list {
  padding-left: 18px;
}

.news-list li {
  margin-bottom: 6px;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.link-btn {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #2563eb;
  border-radius: 5px;
  text-decoration: none;
  color: #2563eb;
  font-size: 0.9rem;
  transition: 0.2s;
}

.link-btn:hover {
  background: #2563eb;
  color: white;
}

@media (max-width: 768px) {
  .grid-cards {
    grid-template-columns: 1fr;
  }

  .quick-links {
    flex-direction: column;
  }
}


/* logo style */

.hero-logo {
  height: 120px;
  width: auto;
  display: block;
  margin: 0 auto 12px auto;

  /* fixes white background issue */
  background: white;
  padding: 6px;
  border-radius: 8px;

  /* subtle polish */
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}


/* Styling the learn more */
/* Footer container inside section card */
.section-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
}

/* Learn more link */
.learn-more-section {
  font-size: 0.95rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.15s ease, color 0.15s ease;
}

.learn-more-section:hover {
  color: #1e40af;
  transform: translateX(4px);
}