/* ================== RESET ================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ================== BODY ================== */
body {
  font-family: 'Titillium Web', sans-serif;
  padding-top: 70px; /* space for fixed navbar */
  background: #f9f9f9;
}

/* ================== CONTAINER ================== */
.container {
  max-width: 1000px;
  margin: auto;
  padding: 20px;
}

/* ================== NAVBAR ================== */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
  background: white;
  border-bottom: 1px solid #ddd;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  font-family: "Roboto Condensed", Titillium Web, sans-derif;
}

.navbar .logo {
  font-weight: bold;
  font-size: 1.8rem;
  color: #004080;
}

/* Nav menu on right */
nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
  justify-content: flex-end;
}

nav ul li a {
  text-decoration: none;
  color: #004080;
  font-weight: bold;
  position: relative;
}

nav ul li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background: #ff6600;
  left: 0;
  bottom: -4px;
  transition: width 0.3s;
}

nav ul li a:hover::after {
  width: 100%;
}

nav ul li a.active {
  color: #ff6600;
}

/* ================== HAMBURGER ================== */
#hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 6px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

#hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: #004080;
  border-radius: 3px;
  margin: 3px 0;
  transition: 0.3s ease;
}

/* ================== HERO / PROFILE ================== */
.hero {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.profile {
  text-align: center;
}

.profile img {
  width: 100%;
  max-width: 250px;
  border-radius: 20px;
  display: block;
  object-fit: cover;
  margin: auto;
}

/* Names */
.desktop-name {
  display: block;
  font-size: 2.2rem;
  margin-bottom: 10px;
  text-align: left;
}

.mobile-name {
  display: none;
  font-size: 1.6rem;
  font-weight: 600;
  color: #003366;
  margin-bottom: 10px;
  text-align: center;
}

/* Social links */
.social-links {
  margin-top: 10px;
  text-align: center;
}

.social-links a i {
  font-size: 22px;
  margin: 0 8px;
  transition: transform 0.2s;
}

.social-links a.email i { color: #d93025; }
.social-links a.cv i { color: #0b66c3; }
.social-links a.scholar i { color: #4285f4; }
.social-links a.github i { color: #333; }

.social-links a:hover i {
  transform: scale(1.15);
  opacity: 0.85;
}

/* ================== INFO ================== */
.info {
  flex: 1;
  min-width: 250px;
  text-align: left;
  font-size: 17px;
  margin-top: 0;       /* remove extra spacing */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* ensure content hugs top */
}

/* ================== PUBLICATIONS ================== */
.publication-list {
  max-width: 900px;
  margin: 20px auto 20px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.publication {
    display: flex;
    gap: 20px;
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 5px;
    align-items: center;
    position: relative;
}

.publication img {
    width: 130px;
    height: 95px;
    border-radius: 10px;
    object-fit: cover;
    background: #f2f2f2;
}

.pub-number {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #222;
    color: white;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.pub-content {
    flex: 1;
}

.pub-title {
    font-family: 'Jost', 'Barlow', sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.pub-authors {
    font-family: 'Roboto Condensed', sans-serif;
    font-variant: small-caps;
    font-size: 1rem;
    color: #444;
}

.pub-journal {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 10px;
}

.pub-buttons button {
    margin-right: 8px;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    font-size: 0.85rem;
}

.btn-pdf { background: #d9534f; }
.btn-abs { background: #0275d8; }
.btn-bib { background: #5bc0de; }
.btn-video { background: #5cb85c; }
.btn-slides { background: #f0ad4e; }

/* Popup modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    padding: 20px;
    width: 90%;
    max-width: 550px;
    border-radius: 10px;
}

.close {
    float: right;
    cursor: pointer;
    font-size: 1.4rem;
}

.copy-btn {
    background: #4CAF50;
    border: none;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .publication {
        flex-direction: column;
        text-align: center;
    }

    .publication img {
        width: 100%;
        height: 160px;
        max-width: 360px;
        margin: 0 auto;
    }
}

.pub-authors a {
  color: #444;
  text-decoration: underline;
  transition: color 0.2s;
}

.pub-authors a:hover {
  color: red;
  text-decoration: none;
}

/* ================== RESPONSIVE ================== */

/* Large Tablets & Desktops: 769px+ keep desktop layout */
@media (max-width: 1024px) and (min-width: 769px) {
  .desktop-name { display: block !important; }
  .mobile-name { display: none !important; }

  #hamburger { display: none; }
  nav ul { display: flex; gap: 15px; justify-content: flex-end; }

  .hero { flex-direction: row; align-items: flex-start; gap: 40px; }
  .profile img { width: 250px; max-height: 350px; }
  .info { text-align: left; max-width: 60%; margin-top: 0; }

  .publication-list {
    flex-direction: column;
    gap: 25px;
  }

  .publication {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 20px;
  }

  .publication img { width: 150px; height: auto; }
  .pub-content { width: auto; text-align: left; }
}

/* Small Tablets & Mobiles: below 768px */
@media (max-width: 768px) {
  .desktop-name { display: none !important; }
  .mobile-name { display: block !important; }

  .hero { flex-direction: column; align-items: center; gap: 20px; }
  .profile img { width: 220px; max-height: 300px; }
  .info { text-align: left; max-width: 95%; margin-top: 20px; }

  .publication-list { flex-direction: column; gap: 15px; }

  .publication {
    flex-direction: column;  /* stack image above text */
    align-items: flex-start;
    text-align: left;
    padding: 10px;
    gap: 10px;
  }

  .publication img { width: 140px; height: auto; margin-bottom: 10px; }
  .pub-content { width: 100%; text-align: left; }

  .pub-title { font-size: 1.15rem; font-family: 'Jost';}
  .pub-authors { font-size: 0.95rem; }
  .pub-journal { font-size: 0.85rem; }
  .pub-buttons button { font-size: 0.75rem; padding: 5px 10px; }
}

/* Mobile: below 600px */
@media (max-width: 600px) {
  #hamburger { display: flex; }

  nav ul {
    display: none;
    flex-direction: column;
    background: white;
    position: absolute;
    top: 60px;
    right: 20px;
    width: 180px;
    padding: 10px;
    gap: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  }

  nav.show ul { display: flex; }

  .profile img { width: 200px; max-height: 280px; }

  
}


.research-interests {
  list-style-type: disc;
  margin-left: 20px;
  padding-left: 0;
  line-height: 1;
}

.research-interests li {
  margin-bottom: 6px;
  font-family: 'Titillium Web', sans-serif;
  color: #444;
}

/* ================== NEWS ================== */
.news {
  margin-top: 40px;
}

.news h2 {
  font-family: 'Barlow', sans-serif;
  font-size: 1.1rem;
  color: #004080;
  margin-bottom: 10px;
}

.news-list {
  list-style-type: disc;
  padding-left: 20px;
  font-family: 'Titillium Web', sans-serif;
  font-size: 1rem;
  color: #444;
  line-height: 1.5;
}

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


.page-title {
  font-family: "Barlow", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #004080;
  margin-bottom: 30px;
  text-align: center;
  text-align: center;
}

/* ================== FOOTER ================== */
.site-footer {
  margin: 30px 0 25px;
  display: flex;
  justify-content: center;
}

.footer-inner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.footer-line {
  width: 100%;
  height: 1px;
  background-color: #ccc;
  margin-bottom: 8px;
}

.footer-text {
  font-size: 0.70rem;
  color: #777;
  font-family: 'Titillium Web', sans-serif;
  text-align: center;
  white-space: nowrap;
}

.footer-text a {
  color: #00990a;
  text-decoration: none;
}

.footer-text a:hover {
  text-decoration: underline;
  color: #00990a;
}

/* Mobile & Tablet */
@media (max-width: 768px) {
  .footer-text {
    font-size: 0.65rem;
    white-space: normal;
    line-height: 1.4;
  }
}


/* Teaching Page */
.course {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  overflow: hidden;
}

.course-header {
  padding: 15px 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f0f0f0;
}

.course-office {
  padding: 5px 20px 10px;
  font-size: 0.9rem;
  color: #555;
  background: #fafafa;
}

.course-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 20px;
  font-size: 0.9rem;
  color: #333;
}

.course.active .course-content {
  max-height: 500px; /* large enough to show full content */
  padding-top: 10px;
  padding-bottom: 20px;
}