/* ============================
   Reset & Base Styles
============================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  background: #f9fafb;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Navbar */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f97316;
}

header h1 a {
  text-decoration: none;
  color: inherit;
}

nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: #555;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #4f46e5;
}

/* ============================
   Hero Section
============================ */
.hero {
  height: auto;
  background: linear-gradient(135deg, #f97316, #f43f5e);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  color: white;
  text-align: left;
  padding: 2rem;
  gap: 2rem;
  padding-top: 100px; /* leave space for fixed header */
  min-height: calc(90vh - 100px);
  height: auto;
  padding-bottom: 1rem;
}

.hero img.researcher-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
}

.hero .hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h2 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.hero a {
  background: white;
  color: #4f46e5;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.3s;
  width: fit-content;
}

.hero a:hover {
  background: #f3f4f6;
}

/* Responsive: stack hero vertically on mobile */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================
   Page Content
============================ */
main {
  flex: 1;
  padding: 1rem 5%;
  max-width: 1200px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 8rem;
}

h1, h3 {
  font-weight: 700;
  margin-bottom: 1rem;
  margin-top: 2rem;
}

h1 {
  font-size: 2rem;
  color: #111827;
}

h3 {
  font-size: 2rem;
  color: #111827;
}

p, li {
  font-size: 1.05rem;
  color: #444;
  margin-bottom: 1rem;
}

.card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.card1 {
  background: rgb(234, 207, 176);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(203, 76, 2, 0.95);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 3rem;
}

.card1:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(203, 76, 2, 0.95);
}

/* Footer */
footer {
  background: #111827;
  color: #9ca3af;
  padding: 2rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

footer a {
  color: #9ca3af;
  margin-left: 1rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: white;
}

/* ============================
   Section Buttons
============================ */
#subjects, #notes-subjects, #subjects-latest {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 8px;
}

#subjects::-webkit-scrollbar,
#notes-subjects::-webkit-scrollbar,
#subjects-latest::-webkit-scrollbar {
  height: 6px;
}

#subjects::-webkit-scrollbar-thumb,
#notes-subjects::-webkit-scrollbar-thumb,
#subjects-latest::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.subject-btn {
  background-color: #007BFF;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  flex: 0 0 auto;
}

.subject-btn:hover {
  background-color: #0056b3;
}

.subject-btn.active {
  background-color: #28a745;
}

/* ============================
   Talks (Videos)
============================ */
#main-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 15px;
  margin-top: 15px;
}

#video-list {
  border: 1px solid #ddd;
  padding: 10px;
  overflow-y: auto;
  max-height: 300px;
}

#player {
  display: flex;
  justify-content: center;
  align-items: center;
}

#video-frame {
  width: 100%;
  height: 300px;
  border: none;
}

/* ============================
   Notes (PDFs)
============================ */
#notes-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 15px;
  margin-top: 15px;
}

#notes-list {
  border: 1px solid #ddd;
  padding: 10px;
  overflow-y: auto;
  max-height: 300px;
}

#notes-viewer {
  display: flex;
  justify-content: center;
  align-items: center;
}

#pdf-frame {
  width: 100%;
  height: 300px;
  border: none;
}

/* ============================
   Latest Publication (PDFs)
============================ */
#latest-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 15px;
  margin-top: 15px;
}

#latest-list {
  border: 1px solid #ddd;
  padding: 10px;
  overflow-y: auto;
  max-height: 300px;
}

#latest-viewer {
  display: flex;
  justify-content: center;
  align-items: center;
}

#latest-pdf-frame {
  width: 100%;
  height: 300px;
  border: none;
}

/* ============================
   Shared List Styles
============================ */
.video-title, .note-title, .latestpub-title {
  padding: 8px;
  margin-bottom: 5px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
}

.video-title:hover, .note-title:hover, .latestpub-title:hover {
  background: #f0f0f0;
}

.video-title.playing, .note-title.playing, .latestpub-title.playing {
  background: #4f46e5;
  color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #main-container, #notes-container, #latest-container {
    grid-template-columns: 1fr;
  }

  #video-list, #notes-list, #latest-list {
    max-height: none;
    width: 100%;
  }

  #video-frame, #pdf-frame, #latest-pdf-frame {
    height: 300px;
  }
}
