:root {
  /* Neon Colors */
  --neon-cyan: #00f0ff;
  --neon-pink: #ff006e;
  --neon-purple: #a855f7;
  --neon-green: #00ff88;
  --neon-blue: #0080ff;
  --neon-yellow: #ffea00;
  
  /* Dark Theme */
  --bg-primary: #0a0a0f;
  --bg-secondary: #121218;
  --bg-card: #1a1a24;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--neon-pink) 0%, var(--neon-blue) 100%);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* Offset untuk header sticky */
}

body {
  font-family: 'Rajdhani', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Orbitron', sans-serif;
}

/* Background Effects */
.cyber-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 240, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.gradient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(0, 240, 255, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 40% 20%, rgba(255, 0, 110, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  padding: 1.5rem 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-bracket {
  color: var(--neon-cyan);
  font-size: 2rem;
  text-shadow: 0 0 10px var(--neon-cyan);
}

.logo-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.logo-subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
  width: 100%;
}

.nav-link:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
}

.admin-link {
  background: var(--gradient-secondary);
  border-radius: 4px;
  padding: 0.5rem 1.5rem;
}

.admin-link::before {
  display: none;
}

/* Hero Section */
.hero {
  padding: 8rem 0 6rem;
  position: relative;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  font-size: 5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.glitch {
  display: block;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  animation: glitch 3s infinite;
}

@keyframes glitch {
  0%, 90%, 100% {
    transform: translate(0);
  }
  92% {
    transform: translate(-2px, 2px);
  }
  94% {
    transform: translate(2px, -2px);
  }
  96% {
    transform: translate(-2px, -2px);
  }
  98% {
    transform: translate(2px, 2px);
  }
}

.hero-subtitle {
  display: block;
  font-size: 2rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  letter-spacing: 4px;
}

.hero-description {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin: 2rem 0 3rem;
  line-height: 1.8;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-top: 4rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.stat-number {
  font-family: 'Orbitron', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* Projects Section */
.projects-section {
  padding: 2rem 0 6rem;
  min-height: 100vh;
}

.section-header {
  margin-bottom: 3rem;
  padding-top: 2rem;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  color: var(--text-primary);
}

.title-line {
  flex: 1;
  max-width: 200px;
  height: 2px;
  background: var(--gradient-primary);
}

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

.view-toggle {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-card);
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-btn:hover {
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.1);
}

.view-btn.active {
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.2);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.filter-group {
  display: flex;
  gap: 1rem;
}

.neon-select {
  background: var(--bg-card);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--text-primary);
  padding: 0.75rem 2.5rem 0.75rem 1.5rem;
  border-radius: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300f0ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.2rem;
}

.neon-select:hover,
.neon-select:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  transition: all 0.3s ease;
}

/* Labs Grid - Force 2 columns max for 4 labs (2x2) */
.labs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  transition: all 0.3s ease;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .labs-grid {
    grid-template-columns: 1fr;
  }
}

.projects-grid.list-view {
  grid-template-columns: 1fr;
}

/* Project Card */
.project-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

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

.project-card:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
  transform: translateY(-5px);
}

.project-thumbnail {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(168, 85, 247, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--neon-cyan);
  position: relative;
  overflow: hidden;
}

.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-thumbnail-placeholder {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  text-shadow: 0 0 20px var(--neon-cyan);
}

.featured-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gradient-secondary);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 15px rgba(255, 0, 110, 0.5);
}

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

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.project-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.project-category {
  display: inline-block;
  background: rgba(0, 240, 255, 0.1);
  color: var(--neon-cyan);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.project-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  background: rgba(168, 85, 247, 0.1);
  color: var(--neon-purple);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.project-lecturers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.lecturer-tag {
  background: rgba(255, 0, 110, 0.1);
  color: var(--neon-pink);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255, 0, 110, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.project-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-indicator.active {
  background: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green);
}

.status-indicator.maintenance {
  background: var(--neon-yellow);
  box-shadow: 0 0 10px var(--neon-yellow);
}

.status-indicator.archived {
  background: var(--text-secondary);
  box-shadow: 0 0 10px var(--text-secondary);
  animation: none;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.btn-view {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.btn-view:hover {
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
  transform: scale(1.05);
}

/* List View */
.projects-grid.list-view .project-card {
  display: flex;
  flex-direction: row;
}

.projects-grid.list-view .project-thumbnail {
  width: 300px;
  height: auto;
  min-height: 200px;
}

.projects-grid.list-view .project-content {
  flex: 1;
}

.projects-grid.list-view .project-description {
  -webkit-line-clamp: 2;
}

/* Loading */
.loading {
  text-align: center;
  padding: 4rem 0;
}

.loader {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(0, 240, 255, 0.1);
  border-top-color: var(--neon-cyan);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 1s linear infinite;
}

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

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(0, 240, 255, 0.2);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
}

.neon-text {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
}

/* Responsive - Large Screens (MacBook 16", iMac, etc) */
@media (min-width: 1680px) {
  .container {
    max-width: 1600px;
    padding: 0 3rem;
  }

  .hero-title {
    font-size: 6rem;
  }

  .hero-subtitle {
    font-size: 2.5rem;
  }

  .hero-description {
    font-size: 1.5rem;
  }

  .stat-number {
    font-size: 4rem;
  }

  .stat-label {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 3.5rem;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 2.5rem;
  }

  .project-title {
    font-size: 1.8rem;
  }

  .project-description {
    font-size: 1.1rem;
  }

  .project-category {
    font-size: 1rem;
  }

  .tag {
    font-size: 1rem;
    padding: 0.4rem 1rem;
  }

  .nav-link {
    font-size: 1.2rem;
  }

  .logo {
    font-size: 1.8rem;
  }

  .logo-bracket {
    font-size: 2.5rem;
  }

  .logo-subtitle {
    font-size: 1rem;
  }
}

/* Responsive - Tablet & Small Desktop */
@media (min-width: 769px) and (max-width: 1679px) {
  .container {
    max-width: 1400px;
  }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .header .container {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .logo {
    font-size: 1.2rem;
    width: 100%;
    justify-content: center;
  }

  .logo-bracket {
    font-size: 1.5rem;
  }
  
  .logo-subtitle {
    display: none;
  }

  .nav {
    width: 100%;
    justify-content: center;
    gap: 0.5rem;
  }

  .nav-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
    letter-spacing: 2px;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 1.8rem;
    gap: 1rem;
  }

  .title-line {
    max-width: 50px;
  }
  
  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .view-toggle {
    justify-content: center;
  }

  .filter-group {
    width: 100%;
  }

  .neon-select {
    width: 100%;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .projects-grid.list-view .project-card {
    flex-direction: column;
  }
  
  .projects-grid.list-view .project-thumbnail {
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
