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

:root {
  --acm-blue: #0055A4;
  --acm-light-blue: #3E8EDE;
  --bg-dark: #0f172a;
  --bg-darker: #020617;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --accent-gradient: linear-gradient(135deg, #0055A4 0%, #0099ff 100%);
  --button-hover-gradient: linear-gradient(135deg, #0099ff 0%, #0055A4 100%);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  color: #fff;
}

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

ul {
  list-style: none;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* --- Removed glowing lines --- */

/* Glassmorphism Classes */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

/* Navbar */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
  padding: 1rem 0;
  /* Matching the provided image slightly by making the header slightly lighter but still dark mode suitable, or full transparent until scroll */
}

header.scrolled {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(15px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
}

.acm-logo-shape {
  width: 36px;
  height: 36px;
  background-color: var(--acm-light-blue);
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.acm-logo-inner {
  transform: rotate(-45deg);
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 1.5px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acm-logo-text-img {
  font-size: 10px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links li a {
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  position: relative;
  color: var(--text-secondary);
}

.nav-links li a:hover, .nav-links li a.active {
  color: white;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--acm-light-blue);
  transition: width 0.3s ease;
}

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

.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-family: 'Poppins', sans-serif;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 85, 164, 0.4);
}

.btn-primary:hover {
  background: var(--button-hover-gradient);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 85, 164, 0.6);
}

.btn-nav {
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  background: #1d4ed8; 
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border-radius: 20px;
}

.btn-nav:hover {
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.6);
  color: white;
}

/* Sections */
section {
  padding: 8rem 0 4rem;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: radial-gradient(circle at top right, #001a4d, var(--bg-dark) 40%, var(--bg-darker));
  overflow: hidden;
}

.code-bg {
  position: absolute;
  right: -5%;
  top: 20%;
  font-family: monospace;
  font-size: 14rem;
  color: rgba(255, 255, 255, 0.02);
  transform: rotate(-10deg);
  z-index: 0;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
}

.hero h1 {
  font-size: 4.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #fff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInDown 1s ease;
}

.hero p {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  animation: fadeInUp 1s ease 0.2s;
  animation-fill-mode: both;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  animation: fadeInUp 1s ease 0.4s;
  animation-fill-mode: both;
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid var(--acm-light-blue);
}

.btn-secondary:hover {
  background: rgba(93, 173, 226, 0.1);
  box-shadow: 0 0 15px rgba(93, 173, 226, 0.4);
}

/* Section Headings */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 30%;
  width: 40%;
  height: 4px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

/* About Section */
.about {
  background-color: var(--bg-darker);
  position: relative;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.about-image {
  position: relative;
}

.about-glass-card {
  padding: 3rem;
  position: relative;
  z-index: 2;
  text-align: center;
}

.about-blob {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 300px;
  height: 300px;
  background: var(--acm-blue);
  filter: blur(80px);
  z-index: 1;
  opacity: 0.5;
  border-radius: 50%;
}

/* Cards (Activities, Events, Team) */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  padding: 2.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-color: rgba(93, 173, 226, 0.3);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--acm-light-blue);
  display: inline-block;
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 12px;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-secondary);
  flex-grow: 1;
}

/* Stats */
.stats {
  position: relative;
  padding: 6rem 0;
  text-align: center;
  background: var(--bg-dark);
}

.stats::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at center, rgba(0, 85, 164, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.stats-grid {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
}

.stat-item {
  padding: 2rem;
  min-width: 200px;
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Footer */
footer {
  background-color: var(--bg-darker);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--glass-border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: var(--text-secondary);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--glass-bg);
  transition: all 0.3s ease;
  font-size: 1.2rem;
  border: 1px solid var(--glass-border);
}

.social-links a:hover {
  background: var(--acm-light-blue);
  color: #fff;
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
}

/* Event Specific Styles */
.page-header {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top right, #001a4d, var(--bg-dark) 80%);
  text-align: center;
  padding-top: 8rem;
}

.event-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Inter', sans-serif;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--acm-blue);
  border-color: var(--acm-blue);
}

.event-card {
  padding: 0;
  overflow: hidden;
}

.event-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.event-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.event-date {
  font-size: 0.9rem;
  color: var(--acm-light-blue);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.event-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
}

/* Team Styles */
.team-member {
  text-align: center;
  padding: 2.5rem 1rem;
}

.team-img-wrapper {
  width: 160px;
  height: 160px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  padding: 4px;
  background: var(--accent-gradient);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 85, 164, 0.3);
}

.team-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg-dark);
}

.team-role {
  color: var(--acm-light-blue);
  font-weight: 500;
  margin-bottom: 1rem;
}

.team-social {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
}

.team-social a {
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: color 0.3s;
}

.team-social a:hover {
  color: white;
}

/* Gallery Styles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 85, 164, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay i {
  font-size: 2.5rem;
  color: white;
}

/* Upcoming Event Specific */
.upcoming-hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
}

.upcoming-details {
  margin-top: 2rem;
  display: flex;
  gap: 2rem;
  justify-content: center;
  color: var(--text-secondary);
}

.upcoming-details div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.countdown {
  display: flex;
  gap: 2rem;
  margin: 3rem 0;
  justify-content: center;
}

.time-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 1.5rem 1rem;
  border-radius: 16px;
  min-width: 110px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.time-box .num {
  font-size: 3.5rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  color: transparent;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  line-height: 1;
}

.time-box .text {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 992px) {
  .about-content {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 3.5rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 250px;
    background: var(--bg-darker);
    flex-direction: column;
    justify-content: center;
    transition: right 0.3s ease;
    border-left: 1px solid var(--glass-border);
  }
  .nav-links.active {
    right: 0;
  }
  
  .hamburger {
    display: block;
    cursor: pointer;
    z-index: 1001;
  }
  
  .hamburger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px;
    transition: all 0.3s ease;
  }
  
  .hamburger.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  
  .hamburger.toggle .line2 {
    opacity: 0;
  }
  
  .hamburger.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
  }
  
  .hero h1 {
    font-size: 2.8rem;
  }
  .countdown {
    gap: 1rem;
    flex-wrap: wrap;
  }
  .time-box {
    min-width: 80px;
    padding: 1rem;
  }
  .time-box .num {
    font-size: 2.5rem;
  }
  .upcoming-details {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
}

@media (min-width: 769px) {
  .hamburger {
    display: none;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Global Loader */
.loader-wrapper {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: var(--bg-darker);
}

.loader-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* perfectly centers content */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.laptop-icon {
  width: 140px;
  height: auto;
  overflow: visible; /* Absolutely vital for infinite SVG drawing */
  transform-origin: center center;
}

.loading-bar-container {
  width: 200px;
  height: 4px;
  background: var(--glass-border);
  border-radius: 4px;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 85, 164, 0.6);
}

.loading-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-secondary);
  letter-spacing: 2px;
}

/* ---- Loader Fact Ticker ---- */
.loader-fact {
  max-width: 340px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--acm-light-blue);
  line-height: 1.6;
  letter-spacing: 0.3px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  min-height: 2.8em; /* prevents layout jump between facts */
}

.loader-fact.visible {
  transform: translateY(0);
}

/* ---- Global Scroll Reveal Animations (Block Slide Reveal) ---- */
.reveal-item {
    position: relative;
    overflow: hidden; 
    visibility: hidden; /* Hides content but preserves layout space */
}

/* Show content halfway through the block slide */
.reveal-item.visible {
    animation: make-visible 0s forwards 0.4s;
}

/* The sliding blue block */
.reveal-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--acm-light-blue); /* Blue slide out color */
    visibility: visible; /* Force block to be visible while parent is hidden */
    transform: scaleX(0);
    transform-origin: left;
    z-index: 10;
    pointer-events: none; 
}

/* Trigger block animation */
.reveal-item.visible::after {
    animation: block-slide 0.8s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes make-visible {
    to { visibility: visible; }
}

@keyframes block-slide {
    0% { transform: scaleX(0); transform-origin: left; }
    50% { transform: scaleX(1); transform-origin: left; }
    50.1% { transform: scaleX(1); transform-origin: right; }
    100% { transform: scaleX(0); transform-origin: right; }
}
/* ---- Rolling Text Hover Effect ---- */
.text-roll {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    line-height: 1.2;
    position: relative;
}

.text-top,
.text-bot {
    display: block;
    transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
    will-change: transform;
}

.text-bot {
    position: absolute;
    top: 100%;
    left: 0;
    white-space: nowrap;
}

/* On hover: slide top text out upward, bottom text rolls in from below */
a:hover .text-top,
button:hover .text-top {
    transform: translateY(-100%);
}

a:hover .text-bot,
button:hover .text-bot {
    transform: translateY(-100%);
}
