/***** Global *****/
html {
  box-sizing: border-box;
  min-width: 0;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
  overflow-x: hidden;
  background-color: #fafafa;
  color: #222;
  line-height: 1.7;
  padding-left: 240px;
}

/***** 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;
}

.mobile-header {
  display: none;
}

.menu-toggle {
  display: none;
}

.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;
  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: none;
}

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

.page-banner {
  max-width: 560px;
  margin: 1.5rem auto 0;
  padding: 0.3rem 0;
  color: #475569;
  text-align: center;
}

.page-banner p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  font-style: italic;
}

.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;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/***** 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: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 1px 15px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    padding: 0;
  }

  body {
    padding-left: 0;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.9rem 1rem;
    gap: 1rem;
  }

  .mobile-header .logo-link {
    margin: 0;
    width: auto;
    text-align: left;
  }

  .mobile-header .nav-logo {
    max-width: 140px;
  }

  .desktop-logo {
    display: block;
  }

  .menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    margin-right: 1.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
  }

  .menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: #111827;
    border-radius: 999px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .mobile-menu-toggle {
    position: absolute;
    left: -9999px;
  }

  .menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 999;
  }

  .nav-container {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: min(280px, 85vw);
    max-width: 280px;
    background: #ffffff;
    padding: 1.5rem 1rem;
    box-shadow: 2px 0 18px rgba(0, 0, 0, 0.16);
    transform: translateX(-110%);
    transition: transform 0.3s ease;
    z-index: 1001;
    align-items: flex-start;
    overflow-y: auto;
  }

  .mobile-menu-toggle:checked + .menu-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-toggle:checked ~ .nav-container {
    transform: translateX(0);
  }

  .nav-container {
    padding-top: 0;
  }

  .language-toggle {
    justify-content: flex-start;
    width: 100%;
    margin-bottom: 1rem;
  }

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

  nav a {
    width: 100%;
    padding: 0.85rem 1rem;
  }

  .nav-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 1rem;
    right: 1rem;
    margin-top: 0;
    text-align: left;
  }

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

  .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;
  max-width: 140px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  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: min(280px, 100%);
    height: auto;
    margin: 0 auto 1rem;
  }
}

#toTopBtn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1000;
  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: none;
}

.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;
}

.hero-banner {
  position: relative;
  margin-bottom: 1.25rem;
  overflow: hidden;
  border-radius: 8px;
  height: 320px;
}

.hero-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12) 0%, rgba(15, 23, 42, 0.72) 100%);
  color: #ffffff;
}

.hero-banner-overlay h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  text-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.hero-banner-overlay .tagline {
  margin: 0.8rem 0 0;
  font-size: 1rem;
  max-width: 680px;
  color: rgba(247, 250, 252, 0.95);
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

.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-image {
  flex-direction: column;
  padding: 0;
  border-color: transparent;
  overflow: hidden;
}

.mini-card-image-inner {
  position: relative;
  width: 100%;
  min-height: 180px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-size 0.3s ease, transform 0.3s ease;
}

.mini-card-image:hover .mini-card-image-inner {
  background-size: 110%;
  transform: scale(1.02);
}

.mini-card-image-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.72) 100%);
}

.mini-card-image-inner h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #ffffff;
  text-align: center;
  font-size: 1.1rem;
}

.mini-card-image .mini-card-content {
  padding: 16px;
  background: #fafafa;
}

.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: none;
}

.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);
}