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

/* CSS Variables for Design System - Light Theme Only */
:root {
  --background: 0 0% 100%;
  --foreground: 220 27% 4%;
  --card: 0 0% 100%;
  --card-foreground: 220 27% 4%;
  --popover: 0 0% 100%;
  --popover-foreground: 220 27% 4%;
  --primary: 263 85% 60%;
  --primary-foreground: 0 0% 100%;
  --secondary: 220 27% 96%;
  --secondary-foreground: 220 27% 4%;
  --muted: 220 27% 96%;
  --muted-foreground: 220 27% 30%;
  --accent: 32 95% 62%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 100%;
  --border: 220 27% 90%;
  --input: 220 27% 90%;
  --ring: 263 85% 60%;
  --radius: 0.75rem;
  
  /* Custom KIT-Idea Hack theme */
  --gradient-primary: linear-gradient(135deg, hsl(263, 85%, 60%), hsl(280, 85%, 65%));
  --gradient-secondary: linear-gradient(135deg, hsl(32, 95%, 62%), hsl(45, 90%, 55%));
  --gradient-hero: linear-gradient(135deg, hsl(263, 85%, 60%), hsl(280, 85%, 65%), hsl(32, 95%, 62%));
  --glow-primary: 0 0 40px hsl(263, 85%, 60%, 0.2);
  --glow-accent: 0 0 30px hsl(32, 95%, 62%, 0.3);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  padding-top: 80px; /* Add padding to account for fixed navigation bar */
}

/* Utility classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Layout utilities */
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

/* Display utilities */
.flex { display: flex; }
.hidden { display: none; }
.grid { display: grid; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Flexbox utilities */
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

/* Spacing utilities */
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-20 { margin-bottom: 5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-xl { font-size: 1.25rem; }
.text-4xl { font-size: 2.25rem; }
.text-6xl { font-size: 3.75rem; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-mono { font-family: 'Courier New', monospace; }
.leading-tight { line-height: 1.25; }

/* Color utilities */
.text-primary { color: hsl(var(--primary)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.bg-gradient-primary { background: var(--gradient-primary); }
.bg-clip-text { background-clip: text; }
.text-transparent { color: transparent; }

/* Border utilities */
.border { border: 1px solid hsl(var(--border)); }
.border-border { border-color: hsl(var(--border)); }
.rounded-lg { border-radius: 0.5rem; }

/* Background utilities */
.bg-card { background-color: hsl(var(--card)); }
.bg-card\/50 { background-color: hsl(var(--card) / 0.5); }
.backdrop-blur-sm { backdrop-filter: blur(4px); }

/* Overflow utilities */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

/* Width utilities */
.w-16 { width: 4rem; }
.w-32 { width: 8rem; }
.w-64 { width: 16rem; }
.min-w-full { min-width: 100%; }

/* Z-index utilities */
.z-10 { z-index: 10; }

/* Responsive utilities */
@media (max-width: 768px) {
  .md\:text-6xl { font-size: 3.75rem; }
}

/* Hover utilities */
.hover\:bg-muted\/50:hover { background-color: hsl(var(--muted) / 0.5); }

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(255, 255, 255, 0.9) 50%, 
    rgba(255, 255, 255, 0.95) 100%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  width: 100%;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.logo:hover {
  transform: scale(1.02);
}

.logo-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.logo:hover .logo-img {
  transform: scale(1.1) rotate(5deg);
  filter: brightness(1.2) contrast(1.2);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  margin: 0;
}

.logo-subtitle {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
  margin: 0;
}

.nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  padding: 0.75rem 1.5rem;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 0.875rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  overflow: hidden;
  z-index: 1;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    hsl(var(--primary) / 0.15), 
    hsl(var(--accent) / 0.1),
    hsl(var(--primary) / 0.1));
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0.875rem;
  transform: scale(0.8);
  z-index: -1;
}

.nav-link:hover {
  color: hsl(var(--foreground));
  transform: translateY(-2px) scale(1.02);
  text-shadow: 0 0 20px hsl(var(--primary) / 0.3);
}

.nav-link:hover::before {
  opacity: 1;
  transform: scale(1);
  box-shadow: 
    0 4px 20px hsl(var(--primary) / 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-primary {
  position: relative;
  padding: 0.875rem 2rem;
  background: var(--gradient-primary);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 0.875rem;
  border: none;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px hsl(var(--primary) / 0.3);
  text-decoration: none;
  display: inline-block;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px hsl(var(--primary) / 0.4);
}

.btn-primary:hover::before {
  left: 100%;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 0.25rem;
}

.mobile-menu-toggle span {
  width: 1.5rem;
  height: 2px;
  background: hsl(var(--foreground));
  transition: all 0.3s ease;
  border-radius: 1px;
}

/* Problem Statements Section - Modern Layout */
.problems-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, 
    hsl(var(--secondary) / 0.1) 0%, 
    hsl(var(--background)) 50%, 
    hsl(var(--secondary) / 0.1) 100%);
  contain: layout style paint;
}

/* Background Shapes */
.problems-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.problem-shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg, 
    rgba(69, 183, 209, 0.1) 0%, 
    rgba(255, 107, 107, 0.1) 50%, 
    rgba(78, 205, 196, 0.1) 100%);
  animation: problemFloat 25s ease-in-out infinite;
}

.problem-shape-1 {
  width: 400px;
  height: 400px;
  top: 5%;
  left: -15%;
  animation-delay: 0s;
}

.problem-shape-2 {
  width: 300px;
  height: 300px;
  top: 50%;
  right: -10%;
  animation-delay: 8s;
}

.problem-shape-3 {
  width: 200px;
  height: 200px;
  bottom: 10%;
  left: 10%;
  animation-delay: 16s;
}

.problem-shape-4 {
  width: 350px;
  height: 350px;
  top: 20%;
  right: 20%;
  animation-delay: 24s;
}

@keyframes problemFloat {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg) scale(1);
    opacity: 0.3;
  }
  50% { 
    transform: translateY(-40px) rotate(180deg) scale(1.1);
    opacity: 0.6;
  }
}

/* Disable heavy animations on mobile for better performance */
@media (max-width: 768px) {
  .problem-shape {
    animation: none !important;
  }
  
  .problems-section {
    background: hsl(var(--background)) !important;
  }
  
  .problems-bg-shapes {
    display: none !important;
  }
}

/* Hero Section */
.problems-hero {
  position: relative;
  z-index: 2;
}

.problems-title-wrapper {
  position: relative;
  margin-bottom: 2rem;
}

.problems-title-accent {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, 
    hsl(var(--primary)), 
    hsl(var(--accent)));
  border-radius: 2px;
  animation: problemAccentGlow 3s ease-in-out infinite;
}

@keyframes problemAccentGlow {
  0%, 100% { 
    width: 80px;
    opacity: 1;
  }
  50% { 
    width: 150px;
    opacity: 0.8;
  }
}

/* Animation Classes */
.problems-title,
.problems-subtitle {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.problems-title {
  animation: slideInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s forwards;
}

.problems-subtitle {
  animation: slideInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
}

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

.problems-section.animate .problems-title,
.problems-section.animate .problems-subtitle {
  opacity: 1;
  transform: translateY(0);
}

/* Table Styles */
.problems-section table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 3px solid hsl(var(--primary) / 0.3);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.problems-section th {
  background: rgba(255, 255, 255, 0.1);
  color: hsl(var(--foreground));
  font-weight: 600;
  text-align: left;
  padding: 0.75rem;
  border-bottom: 2px solid hsl(var(--primary) / 0.4);
  border-right: 1px solid hsl(var(--border) / 0.3);
}

.problems-section th:last-child {
  border-right: none;
}

.problems-section td {
  padding: 0.75rem;
  border-bottom: 1px solid hsl(var(--border) / 0.4);
  border-right: 1px solid hsl(var(--border) / 0.2);
  vertical-align: top;
}

.problems-section td:last-child {
  border-right: none;
}

.problems-section tbody tr:hover {
  background-color: hsl(var(--muted) / 0.3);
  transition: background-color 0.2s ease;
}

.problems-section tbody tr:last-child td {
  border-bottom: none;
}

/* Mentor column styling */
.problems-section td:last-child {
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid hsl(var(--primary) / 0.2);
}

.problems-section th:last-child {
  background: rgba(255, 255, 255, 0.15);
  border-left: 2px solid hsl(var(--primary) / 0.3);
}

/* Mentor info styling */
.mentor-info {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
  padding: 0.5rem;
  border: 1px solid hsl(var(--primary) / 0.2);
}

.mentor-name {
  margin-bottom: 0.25rem;
}

.mentor-contact {
  line-height: 1.4;
}

/* Special badge for Open Category */
.special-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ff6b6b, #ffa500);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 0.3rem;
  margin-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
  animation: specialGlow 2s ease-in-out infinite alternate;
}

@keyframes specialGlow {
  0% {
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
  }
  100% {
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.5), 0 0 12px rgba(255, 107, 107, 0.2);
  }
}

/* Mentor group separation lines */
.problems-section tbody tr[data-mentor-group] {
  position: relative;
}

.problems-section tbody tr[data-mentor-group]:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    hsl(var(--primary) / 0.3) 20%, 
    hsl(var(--primary) / 0.6) 50%, 
    hsl(var(--primary) / 0.3) 80%, 
    transparent 100%);
  z-index: 1;
}

/* Add thicker separation for mentor group boundaries */
.problems-section tbody tr[data-mentor-group="boundary"] {
  border-bottom: 3px solid hsl(var(--primary) / 0.4) !important;
}

.problems-section tbody tr[data-mentor-group="boundary"]::after {
  display: none;
}

/* Footer Styles */
.footer {
  background: linear-gradient(135deg, 
    hsl(var(--background)) 0%, 
    hsl(var(--secondary) / 0.8) 50%, 
    hsl(var(--background)) 100%);
  border-top: 1px solid hsl(var(--border) / 0.5);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.footer-content {
  position: relative;
  z-index: 2;
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  padding: 4rem 0;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.footer-logo-text {
  display: flex;
  flex-direction: column;
}

.footer-logo-title {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  margin: 0;
}

.footer-logo-subtitle {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
  margin: 0;
}

.footer-description {
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
  font-size: 1rem;
  max-width: 400px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-column-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin: 0;
  position: relative;
}

.footer-column-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
}

.footer-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 0;
}

.footer-link::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
  border-radius: 1px;
}

.footer-link:hover {
  color: hsl(var(--primary));
  padding-left: 12px;
}

.footer-link:hover::before {
  width: 8px;
}

.footer-bottom {
  border-top: 1px solid hsl(var(--border) / 0.3);
  padding: 2rem 0;
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright {
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: hsl(var(--muted-foreground));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.footer-social-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: hsl(var(--primary) / 0.3);
  color: hsl(var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .header-content {
    padding: 0.75rem 0;
  }
  
  .logo-title {
    font-size: 1.25rem;
  }
  
  .problems-title {
    font-size: 2.5rem;
  }
  
  .problems-subtitle {
    font-size: 1.125rem;
  }
  
  .problems-section table {
    font-size: 0.875rem;
  }
  
  .problems-section th,
  .problems-section td {
    padding: 0.75rem 0.5rem;
  }
  
  .problems-section th:first-child,
  .problems-section td:first-child {
    width: 3rem;
    min-width: 3rem;
  }
  
  .problems-section th:nth-child(2),
  .problems-section td:nth-child(2) {
    width: 5rem;
    min-width: 5rem;
  }
  
  .problems-section th:nth-child(3),
  .problems-section td:nth-child(3) {
    width: 8rem;
    min-width: 8rem;
  }
  
  .problems-section th:last-child,
  .problems-section td:last-child {
    min-width: 12rem;
  }
  
  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0;
  }
  
  .footer-brand {
    text-align: center;
    align-items: center;
  }
  
  .footer-description {
    text-align: center;
    max-width: 100%;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .footer-column {
    align-items: center;
  }
  
  .footer-column-title::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .problems-section table {
    font-size: 0.8rem;
  }
  
  .problems-section th,
  .problems-section td {
    padding: 0.5rem 0.25rem;
  }
  
  .problems-section th:first-child,
  .problems-section td:first-child {
    width: 2.5rem;
    min-width: 2.5rem;
  }
  
  .problems-section th:nth-child(2),
  .problems-section td:nth-child(2) {
    width: 4rem;
    min-width: 4rem;
  }
  
  .problems-section th:nth-child(3),
  .problems-section td:nth-child(3) {
    width: 6rem;
    min-width: 6rem;
  }
  
  .problems-section th:last-child,
  .problems-section td:last-child {
    min-width: 10rem;
  }
  
  .problems-title {
    font-size: 2rem;
  }
  
  .problems-subtitle {
    font-size: 1rem;
  }
}
