html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Prevents sticky navbar from overlapping section tops */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
  background-color: #f0f4fa;
  color: #333333;
  line-height: 1.5;
  padding-bottom: 40px;
}

/* Navbar Header */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background-color: rgba(240, 244, 250, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 16px 0;
}

.nav-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-square {
  width: 20px;
  height: 20px;
  background-color: #4a6fa5;
  border-radius: 4px;
}

.brand-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #444;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 10px;
}

.nav-item {
  text-decoration: none;
  color: #555;
  font-size: 0.9rem;
  padding: 6px 16px;
  border-radius: 20px;
  background-color: transparent;
  transition: all 0.2s ease;
}

/* Hover state for inactive links */
.nav-item:hover {
  background-color: #e8f0fc;
  color: #1a365d;
}

/* Focus reset to strip residual browser click highlight */
.nav-item:focus {
  outline: none;
  background-color: transparent;
}

/* Explicit Active class state overrides hover and focus */
.nav-links .nav-item.active,
.nav-links .nav-item.active:hover,
.nav-links .nav-item.active:focus {
  background-color: #dbe7f6;
  color: #1a365d;
  font-weight: 600;
}

/* Hamburger Toggle Button */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  flex-direction: column;
  gap: 5px;
  z-index: 100;
}

.hamburger-bar {
  width: 24px;
  height: 3px;
  background-color: #4a6fa5;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Layout Container */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  margin-top: 30px;
}

.section-title {
  font-size: 1.0rem;
  font-weight: 700;
  color: #556070;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

/* Card General Style */
.card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  padding: 20px;
}

/* About Me Section */
.about-card {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 30px;
}

.about-portrait-wrapper {
  flex-shrink: 0;
}

.about-portrait {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #eef3f9;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.about-content {
  flex-grow: 1;
}

.about-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1e293b;
}

.about-nickname {
  font-size: 0.8rem;
  color: #383e47;
  margin-bottom: 10px;
}

.about-subtitle {
  font-size: 0.95rem;
  font-weight: 700;
  color: #4a6fa5;
  margin-bottom: 5px;
}

.about-bio {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 16px;
}

/* Social Links & Icons */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background-color: #f1f5f9;
  color: #334155;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.social-pill:hover {
  background-color: #dbe7f6;
  color: #1e3a8a;
  transform: translateY(-1px);
}

.social-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Featured Section (Single Card Layout) */
.featured-card {
  display: flex;
  padding: 0;
  overflow: hidden;
}

.featured-media {
  flex: 1.2;
  background: #d4e0ee;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: none;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-caption {
  position: absolute;
  bottom: 12px;
  left: 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #222;
}

.featured-info {
  flex: 1.5;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 0.85rem;
  color: #667085;
  line-height: 1.4;
  margin-bottom: 15px;
}

.featured-actions {
  margin-top: auto;
}

/* Buttons */
.btn {
  display: block;
  text-align: center;
  padding: 10px 18px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.btn-teal { background-color: #88e2d1; color: #0b4f42; }
.btn-gold { background-color: #fcd277; color: #573e03; }
.btn-blue { background-color: #a4cafc; color: #1e3a8a; }
.btn-purple { background-color: #d1b3ff; color: #431185; }

/* Grid Cards */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-media {
  height: 170px;
  background-color: #e2e8f0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Constrain card images to fit containers properly */
.card-media img,
.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-video { background-color: #1a1a1a; }
.media-chart { background-color: #f8fafc; }

.card-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tags {
  margin: 10px 0 14px 0;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #4a5568;
  margin-right: 4px;
}

.card-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

/* Publications Section */
.publications-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pub-item {
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 16px;
}

.pub-title { font-size: 0.95rem; font-weight: 700; color: #2d3748; }
.pub-authors { font-size: 0.85rem; color: #4a5568; margin-top: 2px; }
.pub-venue { font-size: 0.82rem; font-weight: 600; color: #2b6cb0; margin-top: 2px; }

.pub-links {
  margin-top: 8px;
}

.link-btn {
  font-size: 0.8rem;
  color: #3182ce;
  text-decoration: none;
  font-weight: 600;
  margin-right: 10px;
}

/* Footer */
.footer {
  text-align: center;
  margin-top: 50px;
  font-size: 0.85rem;
  color: #718096;
}

.footer-link {
  color: #2b6cb0;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 6px;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 50px;
    right: 20px;
    background-color: #ffffff;
    flex-direction: column;
    width: 200px;
    padding: 12px;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-item {
    text-align: left;
    width: 100%;
    padding: 10px 14px;
  }

  .about-card {
    flex-direction: column;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  /* Single Card stacked for mobile */
  .featured-card {
    flex-direction: column;
  }

  .featured-media {
    min-height: 180px;
  }
}




.github-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: #ffffff;
  padding: 1.5rem 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.banner-text h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  color: #1e293b;
}

.banner-text p {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
}

.banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Primary Pill Button (Matches your "Learn More" buttons) */
.btn-primary {
  background-color: #93c5fd; /* Match your existing soft blue */
  color: #0f172a;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.4rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn-primary:hover {
  background-color: #60a5fa;
  transform: translateY(-1px);
}

/* Secondary Outline Button (Creates visual hierarchy between personal & org) */
.btn-outline {
  background-color: #f8fafc;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.4rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-outline:hover {
  border-color: #94a3b8;
  background-color: #f1f5f9;
}




.talk-featured-card {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 2rem;
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  align-items: center;
}

.talk-thumbnail {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.talk-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.event-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  backdrop-filter: blur(4px);
}

.talk-meta {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #2563eb;
  margin-bottom: 0.4rem;
}

.talk-content h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
  color: #0f172a;
  line-height: 1.35;
}

.talk-content p {
  margin: 0 0 1rem 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #475569;
}

.talk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 1.25rem;
}

.talk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 820px) {
  .talk-featured-card {
    grid-template-columns: 1fr;
  }
}

education-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.edu-header h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1.15rem;
  color: #0f172a;
}

.edu-institution {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: #475569;
}

.edu-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.honors-badge {
  background-color: #dbeafe; /* Soft blue matching your button accent */
  color: #1e40af;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
}

.year-badge {
  background-color: #f1f5f9;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
}

.edu-summary {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #64748b;
}