
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  color: #333;
  background: #f9f9f9;
}
/* Mobile adjustments */
@media only screen and (max-width: 600px) 
{
  body {
    font-size: 14px;        
    line-height: 1.4;       
  }
}
header {
  background: #003366;
  color: #fff;
  padding: 1.5rem;
  text-align: center;
}
header h1 {
  margin: 0;
  margin-bottom: 1.5rem; 
  font-size: 2rem;       
  line-height: 1.2;
}
nav {
  margin-top: 0rem;
}
nav a {
  color: #fff;
  margin: 0 10px;
  text-decoration: none;
  font-weight: bold;
}
@media only screen and (max-width: 600px) {
  nav {
    display: flex;          
    flex-direction: row;    
    flex-wrap: wrap;        
    justify-content: center; 
    max-width: 100%;        
    gap: 0px 10px;        
    padding: 10px;
  }

  nav a {
    display: inline-flex;  
    align-items: center;
    width: auto;            
    padding: 5px 3px;      
    font-size: 0.9rem;      
    border-bottom: none;    
    white-space: nowrap;    
  }

  nav a i {
    width: auto;            
    margin-right: 6px;     
  }
}
section {
  max-width: 1000px;
  margin: auto;
  padding: 2rem;
  background: #fff;
  margin-bottom: 1rem;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
h2 {
  border-bottom: 2px solid #003366;
  padding-bottom: 0.3rem;
  color: #003366;
}
#news > h2 {
  color: lightgreen;
}
#publications > h2 {
  color: lightgreen;
}
ul {
  list-style: none;
  padding-left: 0;
}
li {
  margin-bottom: 0.6rem;
}
a { color: #003366; }
.sky-blue-link {
  color: #87CEEB;
  text-decoration: none;
}
.sky-blue-link:hover {
  text-decoration: underline;
}
.light-green-link {
  color: lightgreen;
}
/* ---------- Add figure-row styles here ---------- */
.cv-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.cv-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5em;
}
.cv-list .institution {
  flex: 2;           /* left column */
  text-align: left;
}
.cv-list .role {
  flex: 3;           /* middle column */
  text-align: left;
}
.cv-list .duration {
  flex: 1;           /* right column */
  text-align: right;
  color: #555;
  white-space: nowrap; /* prevent line break */
}
.pub-title {
  font-size: 1em;
  margin-bottom: 3px;
}
.authors {
  font-size: 0.9em;
  margin-bottom: 4px;
}
.pub-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
}
.pub-meta .role {
  font-style: italic
}
.pub-meta .duration {
  white-space: nowrap;
  margin-left: 12px;
}
/* ---------- Add figure-row styles here ---------- */
.figure-row {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap; /* wrap to next line if screen is small */
}
.figure-row img {
  width: auto;
  max-height: 200px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  object-fit: contain;
  pointer-events: none; /* keep non-interactive */
  user-select: none;
}  
.contact-info {
  font-family: Arial, sans-serif;
  font-style: normal;
  color: #87CEEB;
}
html {
  scroll-behavior: smooth;
}
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  background-color: lightgreen;
  color: #003366; /* Color of the home icon */
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column; /* Stack triangle over home */
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  transition: transform 0.3s ease, background-color 0.3s;
}

#backToTop:hover {
  background-color: #90ee90;
  transform: translateY(-5px);
}

/* The Triangle (Up Arrow) */
.triangle-up {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 15px solid white; /* Matches home icon color */
  margin-bottom: 2px; /* Small gap between triangle and house */
}

/* The Home Icon */
.home-icon {
  font-size: 18px;
}

/* Mobile Adjustments */
  @media only screen and (max-width: 600px) {
    #backToTop {
      bottom: 20px;
      right: 20px;
      width: 50px;
      height: 50px;
    }
    .triangle-up {
      border-left: 10px solid transparent;
      border-right: 10px solid transparent;
      border-bottom: 15px solid white;
    }
    .home-icon {
      font-size: 16px;
    }
  }
  @media only screen and (max-width: 600px) {
    #lecture li { flex-direction: column; }
    #lecture li div:first-child { flex: 0 0 auto !important; width: 100%; margin-bottom: 10px; }
    .team-list li[style*="display: flex"] > div:first-child { 
      flex: 0 0 100px !important;   
      width: 100px !important;
      max-width: 100px !important;
    }
  }
   /* Snapshot Grid Layout (3xN) */
  .snapshot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
  }

  @media (max-width: 600px) {
    .snapshot-grid {
      grid-template-columns: 1fr;
      gap: 20px; 
    }
  
    .snapshot-item img {
      height: 200px; 
    }
  }

  .snapshot-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
  }
  .snapshot-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
  }

  .snapshot-item img {
    width: 100%;
    height: 240px; 
    object-fit: cover; 
    display: block;
  }

  .snapshot-info {
    padding: 20px;
    flex-grow: 1;
  }
  .snapshot-date {
    color: #87CEEB; /* Sky Blue Date */
    font-size: 0.85rem;
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
  }
  .snapshot-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: #003366;
  }
  .snapshot-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
  }

.team-list {
  list-style: none;
  padding: 0;
}

.team-category-title {
  font-weight: bold;
  color: #333;
  margin-bottom: 20px;
  margin-top: 40px;
  font-size: 1.2em;
  border-left: 4px solid #003366;
  padding-left: 10px;
}


.team-member {
  display: flex;
  gap: 25px;
  margin-bottom: 40px;
  align-items: flex-start;
}

.member-profile {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 200px;
  text-align: left;
}

.member-photo {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  margin-bottom: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.member-name {
  font-weight: bold;
  font-size: 1.05em;
  color: #333;
  margin-bottom: 5px;
}

.member-contacts {
  display: block;
  text-align: left;
  font-size: 0.9em;
  line-height: 1.6;
  color: #555;
}

.member-details .member-contacts {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;       
  background-color: #f9f9f9; 
  border-radius: 4px;     
}

.member-details .role {
  font-size: 0.95rem;
  font-weight: 300;
  color: #333;           
}

.member-details .duration {
  font-size: 0.85rem;    
  color: #888;            
  font-style: italic;   
}


@media only screen and (max-width: 600px) {
  .member-details .member-contacts {
    flex-direction: column;   
    align-items: flex-start;  
  }

  .member-details .duration {
    margin-left: 0;          
    margin-top: 2px;          
    text-align: left;        
  }
}

.member-contacts i {
  width: 18px;
  color: #003366;
}

.contact-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 5px;
}

.member-details {
  flex: 1;
  text-align: left;
  padding-left: 25px;
  border-left: 2px solid #eee;
}

.details-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.details-item {
  margin-bottom: 20px;
}

.inst-name {
  display: block;
  font-size: 1.15rem;     
  font-weight: 800;       
  color: #1a1a1a;         
  margin-bottom: 2px;    
  line-height: 1.3;
}
.dept-name {
  display: block;
  font-size: 1rem;
  font-weight: 500;      
  color: #555;            
  margin-bottom: 10px;   
}

@media only screen and (max-width: 600px) {
  .team-member {
    display: flex !important; 
    flex-direction: row !important;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
    list-style: none;          
    margin-bottom: 30px;       
  }

  .member-profile {
    flex: 0 0 100px !important;  
    width: 100px !important;
    max-width: 100px;
    margin: 0;
    text-align: left;         
  }
  
  .member-profile img {
    width: 100%;                
    height: auto;
  }

  .member-profile .member-name {
    font-size: 0.8rem;
    margin-top: 5px;
    word-break: keep-all;       
    text-align: left;  
  }

  .member-details {
    flex: 1 !important;         
    padding-left: 10px;
    border-left: 1px solid #eee;
    border-top: none;
    padding-top: 0;
    min-width: 0;             
  }

  .inst-name {
    font-size: 0.85rem;
    line-height: 1.2;
    display: block;
    margin-bottom: 4px;
  }

  .dept-name {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.3;
  }

  .member-details .member-contacts {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: flex-start;
    background: none;           
    padding: 0;
  }

  .member-details .role {
    font-size: 0.7rem;
    flex: 1;
    padding-right: 5px;
  }

  .member-details .duration {
    font-size: 0.7rem;
    color: #999;
    white-space: nowrap;        
  }
  
  .member-profile .member-contacts div[style*="margin-bottom"] {
    margin-bottom: 2px !important; 
    font-size: 0.7rem;            
    line-height: 1.2;
  }

  .member-profile .contact-links {
    display: flex;                 
    flex-wrap: wrap;               
    gap: 2px;                     
    font-size: 0.7rem;           
  }

  .member-profile .contact-links span[style*="color: #ccc"] {
    display: none;                
  }
  .member-profile .contact-links a {
    display: inline-block;
    padding: 1px 0;                
  }

  .member-profile .member-contacts i.fas {
    display: none !important;
  }
  
  .member-profile .member-contacts div {
    margin-left: 0;
    padding-left: 0;
  }
}
}
