@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --bg-color: #eaf6ff; /* Light bluish tint */
  --primary-text-color: #2c3e50; /* Professional dark blue-gray */
  --secondary-text-color: #55606f;
  --accent-color: #0c8ce9; /* Bright professional blue */
  --accent-color-dark: #005bb5;
  --surface-color: #ffffff;
  --header-bg: linear-gradient(135deg, #0c8ce9 0%, #29b6f6 100%);
}

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

body {
  font-family: "Open Sans", sans-serif;
  line-height: 1.8;
  color: var(--primary-text-color);
  background-color: var(--bg-color);
}

h1,
h2,
h3 {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  color: var(--primary-text-color);
}

/* Navigation */
.nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
  padding: 0.75rem 2rem;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1300px;
  margin: 0 auto;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.lab-name {
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--primary-text-color);
}

.logo {
  width: 80px;
  height: auto;
  /* background-color: #e0e0e0; Removed for light theme */
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--secondary-text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
  padding-bottom: 5px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.4s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Footer */
.footer {
  background: var(--surface-color);
  padding: 1.5rem 2rem;
  margin-top: 4rem;
  box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.05);
}

.footer-bottom {
  text-align: center;
  color: var(--secondary-text-color);
  font-size: 0.9rem;
}

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

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > a {
  color: var(--secondary-text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
  padding-bottom: 5px;
  cursor: pointer;
}

.nav-dropdown > a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.4s ease;
}

.nav-dropdown:hover > a::after {
  width: 100%;
}

.nav-dropdown:hover > a {
  color: var(--accent-color);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface-color);
  min-width: 260px;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  z-index: 200;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--secondary-text-color);
  text-decoration: none;
  transition:
    background 0.3s,
    color 0.3s;
  font-weight: 500;
  white-space: nowrap;
}

.dropdown-menu a::after {
  display: none;
}

.dropdown-menu a:hover {
  background: rgba(9, 132, 227, 0.1);
  color: var(--accent-color);
}

/* Hero Section */
.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)),
    url(https://www.iiserpune.ac.in/images/slideshow/20211222-01.jpg);
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: white;
  text-align: center;
  padding: 12rem 2rem 8rem;
  margin-top: 70px;
}
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: -2;
}

/* dark + tint overlay, updated for better visibility */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5); /* Significantly darker overlay to ensure text readability */
  z-index: -1;
}
.hero-content {
  animation: fadeIn 1.5s ease-out;
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin-bottom: 2rem;
  font-size: 3rem;
  font-weight: 700;
  color: #ffffff; /* Explicit white for visibility against dark overlay */
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.institute-link {
  display: inline-block;
  color: #ffffff;
  text-decoration: none;
  border: 2px solid #ffffff;
  padding: 0.8rem 2rem;
  border-radius: 30px; /* Modern pill shape */
  transition: all 0.3s;
  margin-top: 1rem;
  font-weight: 600;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(5px);
}

.institute-link:hover {
  background: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(12, 140, 233, 0.4);
}

/* Content Wrapper */
.content-wrapper {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 2rem;
}

/* Animation Reveal Styling */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.cards-section .reveal:nth-child(2) {
  transition-delay: 0.2s;
}
.cards-section .reveal:nth-child(3) {
  transition-delay: 0.4s;
}

/* Profile Section */
.profile-section {
  text-align: center;
  margin-bottom: 4rem;
}

.profile-image-container {
  width: 200px;
  height: 200px;
  margin: 0 auto 2rem;
  overflow: hidden;
  border-radius: 50%;
  border: 4px solid var(--accent-color);
  box-shadow: 0 0 20px rgba(9, 132, 227, 0.2);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-section h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.profile-section h3 {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--secondary-text-color);
  margin-bottom: 1rem;
}

.social-links a {
  color: var(--secondary-text-color);
  font-size: 1.5rem;
  margin: 0 1rem;
  transition:
    color 0.3s,
    transform 0.3s;
}

.social-links a:hover {
  color: var(--accent-color);
  transform: scale(1.2);
}

/* Main Content */
.main-content {
  padding: 2rem 0;
}

.info {
  background: var(--surface-color);
  padding: 2rem 2rem 2rem 2.5rem;
  border-radius: 8px;
  margin-bottom: 3rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--accent-color);
  position: relative;
}

.info p {
  text-align: justify;
  font-size: 1.1rem;
  color: var(--primary-text-color);
}

.cards-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.card {
  background: var(--surface-color);
  border-radius: 8px;
  padding: 2rem;
  border-top: 4px solid var(--accent-color-dark);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s,
    border-color 0.3s,
    box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-10px);
  border-top-color: var(--accent-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.card h3 {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--primary-text-color);
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

.card i {
  color: var(--accent-color);
  transition: transform 0.3s;
}

.card:hover i {
  transform: rotate(-10deg);
}

.card ul {
  list-style: none;
}

.card li {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
  color: var(--secondary-text-color);
}

.card li::before {
  content: "»";
  color: var(--accent-color);
  position: absolute;
  left: 0;
  font-weight: bold;
  transition: transform 0.3s;
}

.card:hover li::before {
  transform: translateX(3px);
}

/* Hamburger & Media Queries */
.hamburger {
  display: none;
  cursor: pointer;
  border: none;
  background: none;
  z-index: 101;
}

.line {
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--primary-text-color);
  transition: all 0.3s;
  margin: 5px 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    right: -100%;
    top: 0;
    height: 100vh;
    width: 280px;
    flex-direction: column;
    background: var(--surface-color);
    padding-top: 5rem;
    padding-left: 2rem;
    transition: right 0.3s ease-in-out;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    right: 0;
  }

  .hamburger {
    display: block;
  }

  .hamburger.active .line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .line:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-dropdown {
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0 1rem;
    min-width: auto;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-dropdown.open .dropdown-menu {
    max-height: 200px;
  }

  .dropdown-menu a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .hero {
    padding: 10rem 1rem 6rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .cards-section {
    grid-template-columns: 1fr;
  }
}
