/* ==========================================================================
   1. GLOBAL VARIABLES & BASE STYLES
   Defines the theme colors, typography, and default body behavior.
   ========================================================================== */
:root {
  --radius: 20px;
  --bg-dark: #252525;
  --text-light: #e6e6e6;
  --accent: #5d97ed;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  margin: 0;
}

/* ==========================================================================
   2. REVEAL ANIMATIONS
   The "Swipe In" effect used when pages or items first load.
   ========================================================================== */
@keyframes swipeIn {
  0% {
    opacity: 0;
    transform: translateX(-30px);
    clip-path: inset(0 100% 0 0);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    clip-path: inset(0 0 0 0);
  }
}

.reveal-item {
  opacity: 0;
  animation: swipeIn 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  break-inside: avoid; /* Prevents items from breaking across columns in masonry */
}

/* ==========================================================================
   3. GALLERY TILES & HOVER EFFECTS
   Handles the image scaling, dark overlays, and centered captions.
   ========================================================================== */
.tile {
  position: relative;
  overflow: hidden;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16/9;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1), opacity 0.5s ease;
}

/* Dimming Overlay */
.tile-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.5s ease, background-color 0.3s ease;
  z-index: 1;
}

/* Caption (Unfolding Effect) */
.caption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -30%); /* Starts slightly lower */
  color: white;
  z-index: 2;
  text-align: center;
  width: 90%;
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.2, 1, 0.3, 1), opacity 0.5s ease;
}

/* Hover States for Tile Items */
.tile:hover img { transform: scale(1.1); opacity: 0.7; }
.tile:hover .tile-overlay { opacity: 1; background-color: rgba(0, 0, 0, 0.8) !important; }
.tile:hover .caption { transform: translate(-50%, -50%); opacity: 1; }

/* ==========================================================================
   4. NAVIGATION & BUTTONS
   Styles for the header links and the category filter buttons.
   ========================================================================== */
.nav-link { 
  color: var(--text-light) !important; 
  font-weight: 300 !important; 
  font-size: 0.85rem;
  transition: color 0.2s; 
}

.nav-link:hover, .nav-link.active { 
  color: var(--accent) !important; 
}

/* Category Filter Buttons  in the news page*/
.btn-filter {
  border: 1px solid rgba(134, 134, 134, 0.2);
  color: #ffffff;
  background: transparent;
  padding: 6px 20px;
  border-radius: 10px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.btn-filter:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }
.btn-filter.active { background: #fff; color: #000; border-color: #fff; }

/* ==========================================================================
   5. VIDEO & MISC UI ELEMENTS
   Play icons, sticky headers, and text formatting.
   ========================================================================== */
.video-wrapper {
  position: relative;
  cursor: pointer;
  transition: filter 0.3s ease;
}

.video-wrapper:hover .play-icon {
  transform: translate(-50%, -50%) scale(1.1);
  opacity: 1 !important;
}

.sticky-top { padding-top: 20px; }
.text-muted { color: #666 !important; letter-spacing: 0.1em; }
.container { max-width: 1200px; }

/* ==========================================================================
   6. RESPONSIVE DESIGN (MOBILE & DESKTOP)
   Adjusts layouts for different screen sizes.
   ========================================================================== */

/* Desktop Gap Adjustment */
@media (min-width: 1200px) {
  .header-right-section { gap: 60px; }
}

/* Mobile Dropdown Menu */
@media (max-width: 1199.98px) {
  .custom-dropdown.collapse.show, 
  .custom-dropdown.collapsing {
    display: block !important;
    position: absolute;
    top: 100%;
    right: 1.5rem;
    width: 220px;
    background: #2b2b2b !important;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    z-index: 9999;
  }

  .custom-dropdown .navbar-nav {
    flex-direction: column;
    gap: 1.2rem !important;
  }

  .custom-dropdown .nav-link {
    color: #fff !important; /* Adjusted for dark mobile menu */
  }
}

/* ==========================================================================
   6. sticky filter bar on scroll in the NEWS PAGE
   ========================================================================== */
.sticky-filter-wrapper {
  position: -webkit-sticky; /* Support for Safari */
  position: sticky;
  top: 0px; /* Adjust this if you have a fixed navbar (e.g., top: 70px) */
  z-index: 1000;
  background-color: var(--bg-dark); /* Matches your body background */
  padding-top: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

/* 1. The text under the images */
.project-description {
  font-size: 14px;         /* Size in pixels or rem */
  color: #b9b8b8;          /* Muted grey color */
  margin-top: 12px;        /* Space between tile and text */
  margin-bottom: 30px;     /* Space before the next row starts */
}

/* 2. Page Bottom Padding */
main.py-4 {
  padding-bottom: 80px !important; 
}






/* ==========================================================================
   7. styles of the TEACHING PAGE
   ========================================================================== */


/* Container for each course row */
.section-container {
    margin-bottom: 1.5rem; /* Space between different courses */
}

/* Left side: Role text */
.role-text {
    font-family: 'Helvetica', Arial, sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff; /* Adjust based on your background */
}

/* Right side: The main course title */
.entry-title {
    font-family: 'Helvetica', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    color: #ffffff;
    border: none; /* Ensures no default h2 borders interfere */
}

/* The Years/Dates */
.entry-years {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: .8rem;
    color: #ffffff;
}

/* The Professor/University details */
.entry-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #a0a0a0; /* Muted gray for a professional look */
    max-width: 600px;
}
