@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --accent-color: #4B9CD3;
  --dark-bg: #3E4751;
  --light-bg: #f8f9fa;
  --text-color: #333;
  --card-hover-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-color);
  background-color: var(--light-bg);
  overflow-x: hidden;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-glow {
  0% {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
  }

  50% {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 2px 2px 4px rgba(0, 0, 0, 0.9);
  }

  100% {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 1s ease-out forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.hover-glow:hover {
  color: #4B9CD3 !important;
  text-shadow: 0 0 15px rgba(75, 156, 211, 0.8);
  transition: all 0.3s ease;
  cursor: default;
}

/* Navigation Hover Effects */
/* Navigation Hover Effects */
/* Navigation Hover Effects */
.navbar-nav .nav-link {
  color: #effcfc !important;
  /* Force white text */
  --bs-nav-link-color: #effcfc;
  /* Bootstrap 5.3 override */
  transition: color 0.3s ease, transform 0.2s ease;
  position: relative;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.navbar-nav .nav-link:hover {
  color: var(--accent-color) !important;
  --bs-nav-link-hover-color: var(--accent-color);
  /* Bootstrap 5.3 override */
  transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: 5px;
  left: 50%;
  background-color: var(--accent-color);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-radius: 2px;
  /* z-index removed to avoid stacking context hiding behind navbar background */
}

.navbar-nav .nav-link:hover::after {
  width: 80%;
  left: 10%;
}

/* Dropdown Menu Premium Styling */
.dropdown-menu {
  background-color: var(--dark-bg);
  border: none;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  margin-top: 10px;
  overflow: hidden;
}

.dropdown-item {
  color: #effcfc !important;
  transition: all 0.2s ease;
  padding: 10px 20px;
}

.dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--accent-color) !important;
  transform: translateX(5px);
}

.dropdown-item svg {
  transition: transform 0.2s;
}

.dropdown-item:hover svg {
  transform: scale(1.2);
}

/* Utilities */
.bgf {
  background: var(--accent-color);
}

.bgg {
  background: var(--dark-bg);
}

#login {
  background-image: url(login.jfif);
  background-size: cover;
  background-position: center;
}

/* Typography Enhancements */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  color: #2c3e50;
}

/* Card Improvements */
.card {
  border: none;
  border-radius: 12px;
  background: #fff;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow) !important;
}

.card-body svg {
  transition: transform var(--transition-speed) ease;
}

.card:hover .card-body svg {
  transform: scale(1.1);
  color: var(--primary-color);
}

/* Buttons */
.btn {
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.btn-danger {
  background-color: #dc3545;
  border: none;
}

.btn-danger:hover {
  background-color: #bb2d3b;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Sidebar & Navigation */
.fixed-sidebar {
  position: sticky;
  top: 20px;
  height: max-content;
}

/* Conflicting nav-link styles removed to prioritize the main navbar styles above */

/* Custom Animation Classes */
/* Hover Lift Utility */
.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
  cursor: pointer;
}

.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, visibility;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: none;
}

/* Existing Custom Classes Preserved/Tweaked */
#image {
  height: 150px;
  width: 150px;
  border: 2px solid #eee;
  object-fit: cover;
  border-radius: 50%;
}

.hover {
  background: #E51A0D;
  color: #fff;
  transition: background 0.3s;
}

.hover:hover {
  background: #05A948;
  color: #fff;
}

.ql-align-justify {
  text-align: justify;
}

/* Pagination */
.pagination a {
  color: #fff;
  float: left;
  padding: 8px 16px;
  text-decoration: none;
  background: var(--primary-color);
  border-radius: 8px;
  margin: 0 2px;
  transition: background 0.2s;
}

.pagination a.active {
  background-color: #198754;
  color: white;
}

.pagination a:hover:not(.active) {
  background-color: #000;
}

/* Table/Grid headers */
.bg-dark {
  background-color: #212529 !important;
}

/* Fix Hero Section Text Visibility */
.about-hero h1,
.about-hero h2,
.about-hero h3,
.about-hero p,
.about-hero .lead {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  /* Improve contrast/readability */
}

/* Merged into main block above */

/* Navbar Text Responsiveness */
/* Ticker/Scroll Box Styles */
.ticker-container {
  height: 750px;
  /* specific height for scroll area */
  overflow: hidden;
  position: relative;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
}

.ticker-content {
  animation: scrollVertical 20s linear infinite;
  padding: 10px;
}

.ticker-container:hover .ticker-content {
  animation-play-state: paused;
}

@keyframes scrollVertical {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-100%);
  }
}

.ticker-item {
  background: #fff;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border-left: 3px solid transparent;
  transition: transform 0.2s;
}

.ticker-item:hover {
  transform: translateX(5px);
  background: #fcfcfc;
}

.ticker-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.badge-book {
  background: #ffc107;
  color: #000;
}

.badge-blog {
  background: #dc3545;
  color: #fff;
}

.badge-intern {
  background: #198754;
  color: #fff;
}

.badge-project {
  background: #0dcaf0;
  color: #000;
}

.ticker-item.book {
  border-left-color: #ffc107;
}

.ticker-item.blog {
  border-left-color: #dc3545;
}

.ticker-item.intern {
  border-left-color: #198754;
}

.ticker-item.project {
  border-left-color: #0dcaf0;
}

@media (min-width: 992px) and (max-width: 1450px) {

  /* Hide text when zoomed in past ~125% on 1080p/1440p screens */
  /* effective width < 1450px implies high zoom or small screen */
  .nav-text {
    display: none;
  }
}

@media (min-width: 1451px) {

  /* Visible at ~125% zoom (1536px) and out */
  .nav-text {
    display: inline-block;
    font-size: 1rem;
  }
}

@media (min-width: 1700px) {
  .nav-text {
    font-size: 1.1rem;
  }
}

@media (min-width: 1920px) {
  .nav-text {
    font-size: 1.25rem;
    /* Max size at 100% zoom */
  }
}

/* --- Mobile Responsiveness Enhancements --- */
@media (max-width: 768px) {
  .display-3 {
    font-size: 2.5rem !important;
    /* Smaller hero text on mobile */
  }

  .container-fluid[style*="height: 85vh"] {
    height: 60vh !important;
    /* Reduce hero height on mobile */
  }

  .card-body {
    padding: 1.25rem !important;
  }

  .mb-5 {
    margin-bottom: 2rem !important;
    /* Reduce large gaps */
  }

  .mt-5 {
    margin-top: 2rem !important;
  }
}

/* --- Performance Enhancements --- */
html {
  scroll-behavior: smooth;
  /* Smooth scrolling */
}

/* Content Visibility for Rendering Performance */
/* Note: content-visibility can cause scrollbar jumping if size is not well defined, 
   but it improves initial render speed significantly for long pages. */
.card,
.ticker-container,
.fade-in-section {
  content-visibility: auto;
  contain-intrinsic-size: 0 300px;
}

/* Reduce Paint Operations */
.hover-card,
.hover-glow {
  will-change: transform;
  backface-visibility: hidden;
  /* Promotes to composite layer */
}

/* --- Modern UI Enhancements --- */

/* 1. Premium Pastel Gradients */
.bg-gradient-premium-blue {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
}

.bg-gradient-premium-green {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%) !important;
}

.bg-gradient-premium-orange {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%) !important;
}

.bg-gradient-premium-purple {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%) !important;
}

.bg-gradient-premium-red {
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%) !important;
}

.bg-gradient-premium-teal {
  background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%) !important;
}

.bg-gradient-premium-info {
  background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%) !important;
}

/* 2. Soft Shadows & Card Lift */
:root {
  --card-hover-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  /* Softer, larger spread */
}

.card {
  border: none;
  border-radius: 16px;
  /* Slightly more rounded */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  /* Extremely subtle default shadow */
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow) !important;
}

/* 3. Modern Buttons */
.btn {
  padding: 10px 22px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border-radius: 50px;
  /* Pill shape is trending */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  /* Subtle depth */
  transition: all 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  border: none;
}

.btn-success {
  background: linear-gradient(135deg, #198754 0%, #146c43 100%);
  border: none;
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
  border: none;
}

/* 4. Sidebar Link Tabs */
.sidebar-link-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
  color: #495057;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.sidebar-link-tab:hover {
  background: #f8f9fa;
  color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateX(5px);
}

/* 5. Proctoring Box Polish */
.proctoring-box {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe3e3 100%);
  border-left: 5px solid #dc3545;
  transition: all 0.3s ease;
}

.proctoring-box:hover {
  background: linear-gradient(135deg, #ffe3e3 0%, #ffc9c9 100%);
}

/* Hero Overlay Enhancement */
.hero-overlay-gradient {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.6) 100%);
}