:root {
  --bg: #28292B;
  --text: #E2E2E2;
  --muted: #a6a6b3;
  --brand: #AF1329;
  --accent: #E0A02F;
  --panel: #28292B;
  --panel-border: #3a3a3e;
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, Helvetica, sans-serif;
  line-height: 1.5
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 600
}

.logo {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  transition: opacity 0.3s ease;
}

.logo:hover {
  opacity: 0.8;
}

.logo-img {
  height: 40px;
  width: auto;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(40, 41, 43, 0.85);
  backdrop-filter: saturate(120%) blur(12px);
  border-bottom: 1px solid rgba(175, 19, 41, 0.2);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 1px 0 rgba(175, 19, 41, 0.1) inset;
  transition: all 0.3s ease;
}

.site-header.scrolled {
  background: rgba(15, 15, 18, .95);
  backdrop-filter: saturate(120%) blur(16px);
  border-bottom: 1px solid rgba(175, 19, 41, 0.4);
  box-shadow: 
    0 6px 30px rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(224, 160, 47, 0.15) inset,
    0 -1px 20px rgba(175, 19, 41, 0.1) inset;
}


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

.logo {
  font-weight: 700
}

.nav {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap
}

.nav a {
  color: var(--text);
  text-decoration: none;
  opacity: .9;
  transition: all 0.2s ease;
  padding: 6px 12px;
  border-radius: 6px;
  position: relative;
  font-weight: 500;
}

.nav a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav a:hover {
  opacity: 1;
  color: var(--brand);
  background: rgba(175, 19, 41, 0.08);
  transform: translateY(-1px);
}

.nav a:hover::before {
  width: 80%;
}

.nav a.active {
  opacity: 1;
  color: var(--brand);
  background: rgba(175, 19, 41, 0.12);
  font-weight: 600;
}

.nav a.active::before {
  width: 80%;
}

.nav a:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  transition: color 0.3s ease;
}

.menu-toggle:hover {
  color: var(--brand);
}

.menu-toggle:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .nav {
    position: fixed;
    top: 65px;
    right: -100%;
    width: 280px;
    max-width: 85%;
    height: calc(100vh - 65px);
    background: rgba(28, 29, 31, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    gap: 0;
    padding: 1.5rem 0;
    transition: right 0.3s ease;
    overflow-y: auto;
    border-left: 1px solid rgba(175, 19, 41, 0.3);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
  }
  
  .nav.active {
    right: 0;
  }
  
  .nav > a,
  .nav > .has-submenu,
  .nav > div {
    width: 100%;
  }
  
  .nav a {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
  }
  
  .nav a:hover {
    background: rgba(175, 19, 41, 0.15);
    transform: translateX(-4px);
  }
  
  .nav a::before {
    display: none;
  }
  
  /* Mobile submenu styles */
  .nav .has-submenu {
    display: block;
    width: 100%;
  }
  
  .nav .has-submenu > li {
    display: block;
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .submenu {
    position: static;
    display: block;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
  }
  
  .submenu li {
    width: 100%;
  }
  
  .submenu li a {
    padding: 0.75rem 1.5rem 0.75rem 2.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
  }
}

/* Container to anchor the submenu */
.nav .has-submenu {
  position: relative;
  display: inline-flex; /* so spacing matches your anchors */
  align-items: center;
  /* padding-bottom: 2px; tiny cushion so borders touch cleanly */
}

/* Submenu panel */
.submenu {
  position: absolute;
  top: 100%; /* keep attached to trigger */
  left: 0;
  min-width: 200px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #000; /* black panel */
  border: 1px solid rgba(255,255,255,0.14); /* subtle light border on black */
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(255,255,255,0.10); /* small white shadow */
  display: none;
  z-index: 10;
}

/* Submenu items */
.submenu li a {
  display: block;
  padding: 8px 12px;
  color: #fff;
  opacity: 1;                /* ensure full opacity in panel */
  border-radius: 0;          /* flat items inside the panel */
  transform: none;           /* disable lift effect in panel */
}

/* Don’t draw the gradient underline inside the dropdown */
.submenu a::before { display: none; }

/* Hover/keyboard show */
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu {
  display: block;
}

/* Hover in submenu: soft white highlight, keep white text */
.submenu li a:hover,
.submenu li a:focus-visible {
  background: rgba(255,255,255,0.10);
  color: #fff;
  outline: none;
}

/* Cancel the hover "lift" on the trigger so there's no hover gap */
.has-submenu > a:hover {
  transform: none;
}

/* Keep the trigger flat while the submenu is open or focused */
.has-submenu:hover > a,
.has-submenu:focus-within > a {
  transform: none;
}

/* Mobile: make submenu inline so it doesn't overflow */
@media (max-width: 720px) {
  .submenu {
    position: static;
    box-shadow: none;
    border: none;
    display: none; /* still hidden until focus/hover */
    padding: 4px 0;
  }
  .has-submenu:hover > .submenu,
  .has-submenu:focus-within > .submenu {
    display: block;
  }
}

.btn {
  background: var(--brand);
  color: #fff;
  border: 0;
  padding: 12px 28px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  background: #c91636;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(175, 19, 41, 0.4);
}

.btn:active {
  transform: translateY(0);
}

.btn-discord {
  background: #2d2d30;
  border: 2px solid #5865F2;
}

.btn-discord:hover {
  background: #5865F2;
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

.btn-email {
  background: #2d2d30;
  border: 2px solid var(--brand);
}

.btn-email:hover {
  background: var(--brand);
  box-shadow: 0 6px 20px rgba(175, 19, 41, 0.4);
}

.btn-github {
  background: #2d2d30;
  border: 2px solid #835da2;
}

.btn-github:hover {
  background: #835da2;
  border-color: #835da2;
  box-shadow: 0 6px 20px rgba(225, 228, 232, 0.3);
}

.btn-alt {
  background: #2a2a32;
}

.btn-alt:hover {
  background: #353540;
}

#bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

#bg-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* 16:9 aspect ratio */
  min-height: 100vh;
  min-width: 177.77vh; /* 16:9 aspect ratio */
  transform: translate(-50%, -50%) scale(1.46);
  pointer-events: none;
  filter: brightness(60%);
}

.hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  padding: 0;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9), 0 1px 4px rgba(0, 0, 0, 0.8);
  animation: fadeInUp 0.8s ease-out;
  padding: 0 20px;
  margin-top: -60px;
}

.hero-inner h1 {
  font-size: 4rem;
  margin-bottom: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.hero .quick-links {
  margin-top: 8px;
  display: flex;
  gap: 16px;
  justify-content: center;
  font-size: 0.95rem;
}

.hero .quick-links a {
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

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

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 200px rgba(0, 0, 0, 0.7);
  z-index: 1;
  pointer-events: none;
}

.section {
  padding: 64px 0;
  position: relative;
  background: var(--bg);
}

/* Alternating section backgrounds
.section:nth-child(even) {
  background: linear-gradient(135deg, #2d2e31 0%, #2a2b2e 100%);
}

.section:nth-child(odd) {
  background: linear-gradient(135deg, var(--bg) 0%, #25262a 100%);
} */

/* Subtle separator between sections */
.section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(175, 19, 41, 0.3) 20%, rgba(224, 160, 47, 0.4) 50%, rgba(175, 19, 41, 0.3) 80%, transparent 100%);
  pointer-events: none;
  z-index: 10;
}

/* Hide separator on last section */
.section:last-child::after {
  display: none;
}

/* Uniform crosshatch pattern for all sections */
.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.10;
  pointer-events: none;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(175, 19, 41, 0.4) 35px, rgba(175, 19, 41, 0.4) 36px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(224, 160, 47, 0.3) 35px, rgba(224, 160, 47, 0.3) 36px);
}

/* Add complementary patterns to specific sections */
#board::before {
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(175, 19, 41, 0.4) 35px, rgba(175, 19, 41, 0.4) 36px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(224, 160, 47, 0.3) 35px, rgba(224, 160, 47, 0.3) 36px),
    radial-gradient(circle at 15% 20%, rgba(175, 19, 41, 0.08) 0%, transparent 40%);
}

#events::before {
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(175, 19, 41, 0.4) 35px, rgba(175, 19, 41, 0.4) 36px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(224, 160, 47, 0.3) 35px, rgba(224, 160, 47, 0.3) 36px),
    repeating-linear-gradient(90deg, transparent, transparent 100px, rgba(224, 160, 47, 0.15) 100px, rgba(224, 160, 47, 0.15) 101px);
}

#research::before {
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(175, 19, 41, 0.4) 35px, rgba(175, 19, 41, 0.4) 36px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(224, 160, 47, 0.3) 35px, rgba(224, 160, 47, 0.3) 36px),
    radial-gradient(circle at 85% 80%, rgba(224, 160, 47, 0.06) 0%, transparent 35%);
}

#contact::before {
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(175, 19, 41, 0.4) 35px, rgba(175, 19, 41, 0.4) 36px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(224, 160, 47, 0.3) 35px, rgba(224, 160, 47, 0.3) 36px),
    repeating-linear-gradient(0deg, transparent, transparent 150px, rgba(175, 19, 41, 0.12) 150px, rgba(175, 19, 41, 0.12) 151px);
}

.section .container {
  position: relative;
  z-index: 1;
}

/* Section typography */
.section h2 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section-intro {
  margin-bottom: 2.5rem;
}

.section-actions {
  text-align: center;
  margin: 2rem 0;
}

.lead {
  font-size: 1.25rem;
  line-height: 1.7;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2rem;
  color: var(--text);
}

/* About section specific styling */
.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.about-column h3 {
  color: var(--brand);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.about-column p {
  line-height: 1.7;
  color: var(--text);
}

/* Board grid - ensure uniform card sizes */
.board-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.board-grid .card {
  width: 100%;
  max-width: 350px;
  flex: 0 0 auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px
}

/* Card styles with hover effects */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card .card-inner {
  transition: border-color 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
}

.card:hover .card-inner {
  border-color: var(--brand) !important;
}

.advisor-card {
  grid-column: 1 / -1;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* Git section styling */
.git-cta {
  text-align: center;
  margin-top: 2rem;
  font-weight: 500;
  color: var(--text);
}

/* Research section styling */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.research-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.research-item:hover {
  border-color: var(--brand);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(175, 19, 41, 0.15);
}

.research-item h3 {
  color: var(--brand);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.research-item p {
  line-height: 1.6;
  color: var(--text);
}

.cta-section {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem;
  background: rgba(175, 19, 41, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(175, 19, 41, 0.2);
}

.cta-section h3 {
  color: var(--brand);
  margin-bottom: 0.5rem;
}

.cta-section p {
  margin-bottom: 1.5rem;
  color: var(--text);
}

.cta-section .btn {
  margin-top: 1rem;
}

/* Services section styling */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.service-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  text-align: center;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(224, 160, 47, 0.15);
}

.service-card h3 {
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.service-card .section-actions {
  margin-top: 1.5rem;
}

/* Photo gallery styling */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.filter-btn:hover {
  background: rgba(175, 19, 41, 0.1);
  border-color: var(--brand);
  color: var(--brand);
}

.filter-btn.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

#photoGallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  opacity: 1 !important;
  transform: none !important;
}

#photoGallery img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.05);
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  background: rgba(40, 41, 43, 0.5);
}

#photoGallery img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(175, 19, 41, 0.2);
  border-color: var(--brand);
}

@media (max-width: 768px) {
  #photoGallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  #photoGallery img {
    height: 200px;
  }
}

.site-footer {
  padding: 24px 0;
  color: var(--muted);
  text-align: center
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px
}

.modal[aria-hidden="false"] {
  display: flex
}

.modal-dialog {
  background: var(--panel);
  border: 1px solid #24242b;
  border-radius: 16px;
  padding: 20px;
  max-width: 520px;
  width: 100%
}

.modal-close {
  position: absolute;
  margin-top: -8px;
  margin-right: -8px;
  top: 8px;
  right: 8px;
  font-size: 20px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0
}

input,
textarea,
select {
  background: #0f0f12;
  border: 1px solid #2a2a32;
  border-radius: 10px;
  color: var(--text);
  padding: 10px
}

textarea {
  min-height: 120px;
  resize: vertical
}

.form-status {
  margin-top: 10px;
  font-size: .95rem;
  color: var(--muted)
}

.muted {
  color: var(--muted)
}

/* Events Section */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 24px
}

.event-card {
  background: var(--panel);
  border: 1px solid #24242b;
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.2s ease
}

.event-card:hover {
  transform: translateY(-2px)
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px
}

.event-title {
  margin: 0;
  font-size: 1.1em;
  font-weight: 600;
  color: var(--text)
}

.event-author {
  background: var(--brand);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8em;
  font-weight: 500
}

.event-details {
  margin-bottom: 12px
}

.event-date {
  color: #4ade80;
  font-weight: 500;
  margin-bottom: 4px
}

.event-location {
  color: var(--muted);
  font-size: 0.9em
}

.event-description {
  color: var(--muted);
  font-size: 0.95em;
  line-height: 1.4;
  margin-bottom: 16px
}

.event-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px
}

.event-link:hover {
  text-decoration: underline
}

.no-events,
.error-message {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px
}

.no-events a:not(.btn),
.error-message a:not(.btn) {
  color: var(--brand);
  text-decoration: none
}

.no-events a:not(.btn):hover,
.error-message a:not(.btn):hover {
  text-decoration: underline
}

/* Git Resources Section */
.git-resources {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 24px 0
}

.git-commands code {
  background: #2a2a32;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: 'Courier New', monospace
}

.git-commands ul,
.git-links ul {
  list-style: none;
  padding: 0
}

.git-commands li,
.git-links li {
  margin: 12px 0;
  padding: 8px 0;
  border-bottom: 1px solid #2a2a32
}

.git-links a {
  color: var(--brand);
  text-decoration: none
}

.git-links a:hover {
  text-decoration: underline
}

/* Research Section */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 24px 0
}

.research-item {
  background: var(--panel);
  border: 1px solid #24242b;
  border-radius: 12px;
  padding: 20px
}

.research-item h3 {
  margin: 0 0 12px;
  color: var(--text)
}

.research-item p {
  color: var(--muted);
  margin: 0;
  line-height: 1.5
}

.cta-section {
  text-align: center;
  margin-top: 40px;
  padding: 32px;
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid #24242b
}

.cta-section h3 {
  margin: 0 0 16px;
  color: var(--text)
}

.cta-section p {
  color: var(--muted);
  margin: 0 0 24px
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .git-resources {
    grid-template-columns: 1fr
  }

  .research-grid {
    grid-template-columns: 1fr
  }

  .hero-inner h1 {
    font-size: 2rem;
  }

  .hero-inner p {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .site-header .container {
    padding: 12px 16px;
  }
  
  .logo-img {
    height: 32px;
  }
}

/* Loading & Empty States */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton {
  background: linear-gradient(90deg, #17171c 25%, #24242b 50%, #17171c 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state h3 {
  color: var(--text);
  margin-bottom: 12px;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Focus states for accessibility */
*:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Improve form accessibility */
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-color: var(--brand);
}

/* Image loading fade-in */
img {
  animation: fadeIn 0.3s ease-in;
}

/* Lightbox Modal */
#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

#lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  z-index: 10000;
  transition: color 0.3s ease;
  user-select: none;
  line-height: 1;
}

.lightbox-close:hover {
  color: var(--brand);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 35px;
  font-weight: bold;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 4px;
  user-select: none;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--brand);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .lightbox-img {
    max-width: 95%;
    max-height: 80vh;
  }
  
  .lightbox-prev,
  .lightbox-next {
    font-size: 25px;
    padding: 12px 16px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
  
  .lightbox-close {
    top: 15px;
    right: 15px;
    font-size: 30px;
  }
  
  .lightbox-counter {
    bottom: 20px;
    font-size: 14px;
    padding: 8px 16px;
  }
}

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

/* Discord Widget - Compact Floating */
.discord-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.discord-widget.scrolled {
  transform: scale(0.85);
  opacity: 0.7;
}

.discord-widget:hover.scrolled {
  transform: scale(1);
  opacity: 1;
}

.discord-widget-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 24px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  font-size: 0.813rem;
  font-weight: 600;
}

.discord-widget-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(88, 101, 242, 0.5), 0 3px 6px rgba(0, 0, 0, 0.3);
  color: white;
}

.discord-widget-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.discord-widget-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.discord-widget-stats {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1;
}

.stat-line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stat-dot.online {
  background: #43B581;
  box-shadow: 0 0 6px rgba(67, 181, 129, 0.6);
}

.stat-dot.total {
  background: rgba(255, 255, 255, 0.6);
}

.stat-value {
  font-size: 0.813rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Loading animation */
.loading-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 1px;
  background: white;
  border-radius: 50%;
  animation: loading-pulse 1.4s infinite ease-in-out;
}

.loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes loading-pulse {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .discord-widget {
    bottom: 1rem;
    right: 1rem;
  }
  
  .discord-widget.scrolled {
    transform: scale(0.8);
    opacity: 0.6;
  }
  
  .discord-widget-link {
    padding: 0.45rem 0.65rem;
    gap: 0.4rem;
  }
  
  .discord-widget-icon svg {
    width: 18px;
    height: 18px;
  }
  
  .stat-value {
    font-size: 0.75rem;
  }
  
  .stat-dot {
    width: 5px;
    height: 5px;
  }
}

/* ===== PROJECTS SECTION STYLES ===== */

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

/* Project Card */
.project-card {
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-6px);
}

.project-card-inner {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.75rem;
  padding-top: 3rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s ease;
}

.project-card:hover .project-card-inner {
  border-color: var(--brand);
  box-shadow: 0 12px 30px rgba(175, 19, 41, 0.2);
}

/* GitHub Stars Badge */
.project-stars {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(224, 160, 47, 0.15);
  border: 1px solid rgba(224, 160, 47, 0.3);
  color: var(--accent);
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 2;
  transition: all 0.3s ease;
}

.project-card:hover .project-stars {
  background: rgba(224, 160, 47, 0.25);
  border-color: var(--accent);
  transform: scale(1.05);
}

.project-stars svg {
  width: 16px;
  height: 16px;
}

/* Project Card Content */
.project-title {
  color: var(--text);
  font-size: 1.4rem;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  line-height: 1.3;
}

.project-author {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1rem 0;
  font-weight: 500;
}

.project-description {
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 1.25rem 0;
  flex-grow: 1;
}

/* Project Tags */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.project-tag {
  background: rgba(175, 19, 41, 0.15);
  border: 1px solid rgba(175, 19, 41, 0.3);
  color: var(--brand);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.project-tag:hover {
  background: rgba(175, 19, 41, 0.25);
  border-color: var(--brand);
}

/* Project Footer */
.project-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.project-link:hover {
  color: var(--accent);
  gap: 0.75rem;
}

.project-link svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.project-link:hover svg {
  transform: scale(1.1);
}

/* ===== Resources Section ===== */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.resource-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.resource-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--brand));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.resource-card:hover::before {
  transform: scaleX(1);
}

.resource-card:hover {
  border-color: var(--brand);
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(175, 19, 41, 0.2);
}

.resource-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(224, 160, 47, 0.15), rgba(175, 19, 41, 0.15));
  border: 2px solid rgba(224, 160, 47, 0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.resource-card:hover .resource-icon {
  background: linear-gradient(135deg, rgba(224, 160, 47, 0.25), rgba(175, 19, 41, 0.25));
  border-color: var(--accent);
  transform: scale(1.05);
}

.resource-icon svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.resource-card h3 {
  color: var(--text);
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.resource-card p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  font-size: 0.95rem;
}

.resource-category {
  display: inline-block;
  background: rgba(224, 160, 47, 0.15);
  color: var(--accent);
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1rem;
  border: 1px solid rgba(224, 160, 47, 0.2);
}

.resource-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  margin-top: auto;
  padding: 0.75rem 1.25rem;
  background: rgba(175, 19, 41, 0.1);
  border-radius: 8px;
  text-align: center;
  justify-content: center;
}

.resource-link:hover {
  background: var(--brand);
  color: white;
  gap: 0.75rem;
}

.resource-link svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.resource-link:hover svg {
  transform: translateX(2px);
}

/* Projects Page Specific Styles */
.hero-small {
  height: 50vh;
  min-height: 400px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1d 0%, #28292B 50%, #1a1a1d 100%);
}

/* Animated gradient background */
.hero-small::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(175, 19, 41, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(224, 160, 47, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 50% 30%, rgba(175, 19, 41, 0.2) 0%, transparent 40%);
  animation: gradientShift 15s ease infinite;
  z-index: 0;
}

@keyframes gradientShift {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(5%, 5%) rotate(120deg);
  }
  66% {
    transform: translate(-5%, 5%) rotate(240deg);
  }
}

/* Floating particles effect */
.hero-small::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20% 30%, rgba(224, 160, 47, 0.4), transparent),
    radial-gradient(2px 2px at 60% 70%, rgba(175, 19, 41, 0.4), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 80% 10%, rgba(224, 160, 47, 0.3), transparent),
    radial-gradient(2px 2px at 90% 60%, rgba(175, 19, 41, 0.3), transparent),
    radial-gradient(1px 1px at 33% 80%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 15% 90%, rgba(224, 160, 47, 0.3), transparent);
  background-size: 200% 200%, 200% 200%, 300% 300%, 250% 250%, 200% 200%, 300% 300%, 250% 250%;
  background-position: 0% 0%, 40% 40%, 80% 80%, 10% 90%, 90% 10%, 50% 50%, 70% 30%;
  animation: particlesFloat 20s linear infinite;
  z-index: 1;
  opacity: 0.6;
}

@keyframes particlesFloat {
  0% {
    background-position: 0% 0%, 40% 40%, 80% 80%, 10% 90%, 90% 10%, 50% 50%, 70% 30%;
  }
  100% {
    background-position: 100% 100%, 140% 140%, 180% 180%, 110% 190%, 190% 110%, 150% 150%, 170% 130%;
  }
}

/* Geometric pattern overlay */
.hero-small .hero-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(175, 19, 41, 0.03) 35px, rgba(175, 19, 41, 0.03) 36px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(224, 160, 47, 0.03) 35px, rgba(224, 160, 47, 0.03) 36px),
    repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(255, 255, 255, 0.02) 50px, rgba(255, 255, 255, 0.02) 51px);
  z-index: -1;
  animation: patternSlide 30s linear infinite;
}

@keyframes patternSlide {
  0% {
    background-position: 0 0, 0 0, 0 0;
  }
  100% {
    background-position: 100px 100px, -100px 100px, 50px 0;
  }
}

/* Glowing orbs */
.hero-small .hero-inner::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: 
    radial-gradient(circle at center, rgba(175, 19, 41, 0.15) 0%, transparent 60%),
    radial-gradient(circle at center, rgba(224, 160, 47, 0.1) 20%, transparent 70%);
  z-index: -1;
  animation: orbitPulse 8s ease-in-out infinite;
  filter: blur(40px);
}

@keyframes orbitPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.9;
  }
}

.hero-small .hero-inner {
  margin-top: 0;
  position: relative;
  z-index: 2;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 1rem;
  font-weight: 400;
}

/* Search and Filter Controls */
.projects-controls {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.search-box {
  position: relative;
  margin-bottom: 1.25rem;
}

.search-box svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  background: rgba(15, 15, 18, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(175, 19, 41, 0.1);
}

.search-box input::placeholder {
  color: var(--muted);
}

.projects-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.projects-filters label {
  color: var(--text);
  font-weight: 500;
  margin: 0;
  flex-direction: row;
  gap: 0.5rem;
  align-items: center;
}

.projects-filters select {
  background: rgba(15, 15, 18, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text);
  padding: 0.625rem 2rem 0.625rem 0.875rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 4L6 8L10 4' stroke='%23a6a6b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  min-width: 180px;
}

.projects-filters select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(175, 19, 41, 0.1);
}

.projects-filters select:hover {
  border-color: rgba(175, 19, 41, 0.5);
}

/* Projects Stats */
.projects-stats {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}

.empty-state h3 {
  color: var(--text);
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}

.empty-state p {
  font-size: 1.05rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .projects-controls {
    padding: 1rem;
  }
  
  .projects-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .projects-filters label {
    justify-content: space-between;
  }
  
  .projects-filters select {
    width: 100%;
    min-width: unset;
  }
  
  .project-card-inner {
    padding: 1.5rem;
    padding-top: 2.75rem;
  }
  
  .project-title {
    font-size: 1.25rem;
  }
  
  .hero-small {
    height: 40vh;
    min-height: 300px;
  }
  
  .hero-small .hero-inner h1 {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .project-stars {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
  
  .project-stars svg {
    width: 14px;
    height: 14px;
  }
}
