/* ========== GLOBAL STYLES ========== */

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --accent: #1f4ad3;
  --light-gray: #f7f7f7;
  --border: #e5e5e5;
  --max-width: 850px;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  line-height: 1.7;
  font-size: 16px;
}

img {
  max-width: 100%;
  border-radius: 8px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px;
}

/* ========== HEADER ========== */

.header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.profile-pic {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}



.header-text h1 {
  font-size: 1.8rem;
  margin: 0;
}

.header-text p {
  margin: 4px 0;
  color: #444;
}

.header-text .links a {
  margin-right: 8px;
  font-size: 0.95rem;
}

/* ========== NAVIGATION ========== */

.nav {
  display: flex;
  justify-content: center;
  background: var(--light-gray);
  border-bottom: 1px solid var(--border);
}

.nav a {
  display: inline-block;
  padding: 12px 20px;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  transition: 0.2s;
}

.nav a:hover {
  background: var(--accent);
  color: white;
}

.nav a.active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

/* ========== MAIN CONTENT ========== */

section h2 {
  font-size: 1.4rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 16px;
}

section p {
  margin-bottom: 16px;
}

/* ========== RESEARCH PROJECTS ========== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.project {
  background: var(--light-gray);
  border-radius: 12px;
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.project img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

/* ========== PUBLICATIONS LIST ========== */

.pub-list {
  list-style: none;
  padding-left: 0;
}

.pub-list li {
  margin-bottom: 18px;
}

.pub-list b {
  font-size: 1rem;
}

.pub-list a {
  margin-left: 6px;
  font-size: 0.95rem;
}

.pub-item {
  display: flex;
  margin-bottom: 2rem;
  gap: 1rem;
}

.pub-thumbnail img {
  width: 250px;
  height: auto;
  border-radius: 8px;
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.thumbnail-grid img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
}

.pub-details h3 {
  margin: 0 0 0.5rem 0;
}

.pub-details p {
  margin: 0;
  line-height: 1.6;
}


.publication {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 1rem;
}

.pub-image img {
  width: 240px;
  border-radius: 8px;
}

.pub-content {
  max-width: 800px;
}

.pub-title {
  margin: 0 0 0.3rem 0;
  color: #002F6C;
  font-size: 1.1rem;
  font-weight: bold;
}

.pub-authors {
  color: #666;
  margin: 0.2rem 0;
}

.pub-venue {
  color: #999;
  margin: 0.2rem 0;
}

.pub-extra {
  margin-top: 0.3rem;
  font-size: 0.95rem;
}

.pub-extra a {
  color: #1a6dd0;
  text-decoration: none;
}

.pub-extra a:hover {
  text-decoration: underline;
}

.highlight {
  color: #fcb636;
  font-weight: 600;
}

.pub-video {
  width: 220px;           /* Fixed width */
  height: auto;           /* Maintain aspect ratio */
  max-height: 150px;      /* Prevent it from getting too tall */
  border-radius: 8px;
  object-fit: cover;      /* Ensures the video fills the box nicely */
}


.pub-title .pub-link {
  color: inherit;           /* keeps the same color as the h3 */
  text-decoration: none;    /* removes underline */
}

.pub-title .pub-link:hover {
  text-decoration: underline; /* optional hover effect */
}





/* Container styling (optional) */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Publication layout */
.publication {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
  gap: 15px;
}

/* Image/video container */
.pub-image {
  width: 220px;
  height: 150px;
  background-color: #f0f0f0; /* letterbox color */
  border-radius: 8px;
  flex-shrink: 0; /* prevent shrinking in flex layout */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Make img/video scale proportionally to fit the box */
.pub-image img,
.pub-image video {
  width: 100%;
  height: 100%;
  object-fit: contain; /* no cropping, scale to fit */
  display: block;
  border-radius: 8px;
}

/* Text content */
.pub-content {
  flex: 1;
}

/* Optional styling */
.pub-title {
  margin: 0 0 5px 0;
  font-size: 18px;
}

.pub-authors {
  margin: 0 0 5px 0;
  font-size: 14px;
  color: #555;
}

.pub-extra a {
  text-decoration: none;
  color: #002F6C;
}


/* ========== TALKS LIST ========== */

.talk-list {
  list-style-type: disc;
  padding-left: 20px;
}

.talk-list li {
  margin-bottom: 10px;
}



.talk-images-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;            /* horizontal scrolling */
  padding-bottom: 0.5rem;
  scroll-behavior: smooth;     /* smooth scroll when using scrollbar or JS */
}

.talk-images-scroll::-webkit-scrollbar {
  height: 8px;                 /* optional: customize scrollbar height */
}

.talk-images-scroll::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
}

.talk-images-scroll img {
  flex: 0 0 auto;             /* prevents shrinking, keeps original aspect ratio */
  height: 230px;              /* fixed row height */
  object-fit: cover;          /* crop to fill */
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.talk-images-scroll img:hover {
  transform: scale(1.05);
}





/* ========== FOOTER ========== */

.footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--border);
  color: #666;
  font-size: 0.9rem;
  margin-top: 40px;
}

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

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

  .profile-pic {
    width: 100px;
    height: 100px;
  }

  .nav {
    flex-wrap: wrap;
  }

  .nav a {
    flex: 1 1 50%;
    text-align: center;
  }

  .container {
    padding: 16px;
  }
}
