/* ==========================================================
   RESET
========================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.7;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #09090d;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

img {
  display: block;
  max-width: 100%;
}

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

ul {
  list-style: none;
}

section {
  padding: 100px 25px;
}

.container {
  width: min(100%, var(--container));
  margin: auto;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  letter-spacing: 2px;
}

h2 {
  font-size: 2.3rem;
  margin-bottom: 30px;
}

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

/* ==========================================================
   ACCESSIBILITY
========================================================== */

a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--system);
  outline-offset: 4px;
}

button {
  font-family: inherit;
}
/* ==========================================================
   LAYOUT
========================================================== */

header {
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(12px);
  background: rgba(10, 10, 15, .82);
  border-bottom: 1px solid var(--border);
}

.navbar {
  max-width: 1240px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: rgb(99, 4, 201);
}

.logo span {
  color: var(--system);
}

.navbar ul {
  display: flex;
  gap: 35px;
}

.navbar a {
  position: relative;
  transition: var(--transition);
}

.navbar a:hover {
  color: var(--system);
}

.navbar a.active {
  color: var(--primary-light);
}

/* HERO */

.hero {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 700px;
  z-index: 10;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  margin: 20px 0;
}

.hero-text {
  font-size: 1.2rem;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  margin-top: 40px;
}

.panel {
  background: var(--bg-secondary);
  margin: 80px auto;
  width: min(1100px, 92%);
  padding: 50px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

footer {
  text-align: center;
  padding: 60px;
  color: var(--text-secondary);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 28px;
  height: 2px;
  background: var(--system);
  box-shadow: var(--glow-cyan);
}
/* ==========================================================
   COMPONENTS
========================================================== */

/* PAGE HEADER */

.page-header {
  text-align: center;
  max-width: 800px;
  margin: auto;
}

.page-header h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  margin: 20px 0;
}

/* FILTER */

.filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 50px;
}

.filter-btn {
  font-family: var(--font-mono);
  padding: 10px 20px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: .25s;
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--system);
  border-color: var(--system);
  box-shadow: var(--glow-purple);
}

/* CARD GRID */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

/* PROJECT CARD */

.cyber-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 30px;
  position: relative;
  overflow: hidden;
  transition: .3s;
}

.cyber-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-light);
  box-shadow: var(--glow-purple);
}

.cyber-card h3 {
  color: white;
  margin-bottom: 15px;
}

.cyber-card .category {
  color: var(--system);
  font-family: var(--font-mono);
  font-size: .8rem;
}

.cyber-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: var(--system);
  transition: .4s;
}

.cyber-card:hover::before {
  left: 100%;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag {
  font-size: .75rem;
  padding: 5px 10px;
  border: 1px solid rgba(0, 240, 255, .3);
  color: var(--system);
  font-family: var(--font-mono);
}

.card-link {
  display: inline-block;
  margin-top: 25px;
  color: var(--primary-light);
  font-family: var(--font-mono);
}

/* ==========================================================
   PROJECT DETAIL
========================================================== */

.detail-header {
  margin-bottom: 40px;
}

.detail-header h2 {
  color: white;
  margin-top: 20px;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin: 40px 0;
}

.detail-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border: 1px solid var(--border);
  transition: .3s;
}

.detail-gallery img:hover {
  transform: scale(1.03);
  border-color: var(--system);
  box-shadow: var(--glow-purple);
}

/* SYSTEM STATUS */

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.status-grid div {
  background: var(--bg-card);
  padding: 20px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  color: var(--system);
}

.status-grid span {
  display: block;
  color: var(--text-secondary);
  font-size: .75rem;
  margin-bottom: 10px;
}

/* ==========================================================
   GALLERY SYSTEM
========================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: .4s;
}

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

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .9));
  font-family: var(--font-mono);
  color: var(--system);
}

/* LIGHTBOX */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .92);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: .3s;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 90%;
  max-height: 75vh;
  border: 1px solid var(--system);
  box-shadow: var(--glow-purple);
}

#close-lightbox {
  position: absolute;
  top: 30px;
  right: 40px;
  background: none;
  border: none;
  font-size: 3rem;
  color: white;
  cursor: pointer;
}

#lightbox-title {
  margin-top: 25px;
  font-family: var(--font-mono);
  color: var(--system);
}

#prev-image,
#next-image {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 4rem;
  cursor: pointer;
  font-family: var(--font-heading);
}

#prev-image {
  left: 30px;
}

#next-image {
  right: 30px;
}

#prev-image:hover,
#next-image:hover {
  color: rgba(0, 238, 255, 0.413);
  text-shadow: var(--glow-cyan);
}

/* ==========================================================
   HUD PANEL
========================================================== */

.hud-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 40px;
}

.hud-panel div {
  background: rgba(19, 18, 26, .7);
  border: 1px solid rgba(187, 0, 255, 0.25);
  padding: 15px;
  font-family: var(--font-mono);
  color: var(--system);
}

.hud-panel span {
  display: block;
  font-size: .7rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ==========================================================
   UNIVERSAL ITEM LOGO
========================================================== */

.item-logo {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

.item-logo img {
  max-width: 90px;
  max-height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(0, 240, 255, .5));
  transition: .3s;
}

.cyber-card:hover .item-logo img {
  transform: scale(1.15);
  filter: drop-shadow(0 0 25px var(--system));
}

.detail-logo {
  width: 140px;
  height: 140px;
  margin-bottom: 30px;
}

.detail-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 30px var(--primary-light));
}
/* ==========================================================
   ANIMATIONS
========================================================== */

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: .15; }
  50% { transform: scale(1.25); opacity: .28; }
}

@keyframes blinkLabel {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

@keyframes noiseMove {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 2%); }
  50% { transform: translate(2%, -1%); }
  75% { transform: translate(-1%, 1%); }
  100% { transform: translate(0, 0); }
}

@keyframes glitchOne {
  0%, 100% { clip-path: inset(0 0 0 0); transform: none; }
  20% { clip-path: inset(15% 0 60% 0); transform: translate(-3px); }
  45% { clip-path: inset(65% 0 10% 0); transform: translate(4px); }
}

@keyframes glitchTwo {
  0%, 100% { clip-path: inset(0); transform: none; }
  30% { clip-path: inset(40% 0 30% 0); transform: translate(3px); }
  70% { clip-path: inset(5% 0 75% 0); transform: translate(-3px); }
}
/* ==========================================================
   CYBER EFFECTS
========================================================== */

/* ---------- Hintergrund ---------- */

body {
  position: relative;
  background:
    radial-gradient(circle at top, rgba(75, 19, 135, .18), transparent 45%),
    #0A0A0F;
}

/* ---------- CRT Scanlines ---------- */

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .12;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(255, 255, 255, .04) 4px
  );
}

/* ---------- Noise ---------- */

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: .035;
  background-image: url("https://grainy-gradients.vercel.app/noise.svg");
  animation: noiseMove .25s infinite;
}

/* ---------- Vignette ---------- */

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle, transparent 45%, rgba(0, 0, 0, .45));
  z-index: 9997;
}

/* ---------- HERO GRID ---------- */

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 240, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, .05) 1px, transparent 1px);
  background-size: 70px 70px;
  opacity: .25;
  transform: perspective(800px) rotateX(78deg) scale(2);
  transform-origin: bottom;
}

/* ---------- Neon Glow ---------- */

.hero::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: #4B1387;
  filter: blur(160px);
  opacity: .18;
  animation: pulseGlow 7s infinite ease-in-out;
}

/* ---------- HUD Corners ---------- */

.panel {
  position: relative;
}

.panel::before {
  content: "";
  position: absolute;
  width: 25px;
  height: 25px;
  left: -1px;
  top: -1px;
  border-left: 2px solid var(--system);
  border-top: 2px solid var(--system);
}

.panel::after {
  content: "";
  position: absolute;
  width: 25px;
  height: 25px;
  right: -1px;
  bottom: -1px;
  border-right: 2px solid var(--system);
  border-bottom: 2px solid var(--system);
}

/* ---------- Hero Titel ---------- */

.hero h1 {
  color: white;
  text-shadow:
    0 0 5px #fff,
    0 0 20px var(--primary),
    0 0 45px var(--primary-light);
}

/* ---------- System Label ---------- */

.system-label {
  display: inline-block;
  font-family: var(--font-mono);
  color: var(--system);
  border: 1px solid rgba(234, 0, 255, 0.4);
  padding: 8px 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  animation: blinkLabel 2s infinite;
}

/* ---------- Buttons ---------- */

.btn-primary {
  padding: 16px 34px;
  background: var(--primary);
  border: 1px solid var(--primary-light);
  color: white;
  transition: .25s;
  box-shadow: var(--glow-purple);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.btn-secondary {
  padding: 16px 34px;
  border: 1px solid var(--system);
  color: var(--system);
  transition: .25s;
}

.btn-secondary:hover {
  box-shadow: var(--glow-cyan);
}

/* ---------- Glitch ---------- */

.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
}

.glitch::before {
  left: 2px;
  color: #00F0FF;
  opacity: .7;
  animation: glitchOne 2.5s infinite;
}

.glitch::after {
  left: -2px;
  color: #FF2E63;
  opacity: .6;
  animation: glitchTwo 3s infinite;
}

/* ==========================================================
   BOOT SCREEN
========================================================== */

.boot-screen {
  position: fixed;
  inset: 0;
  background: #050507;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--glow-cyan);
  transition: .7s;
}

.boot-content {
  width: 80%;
  max-width: 500px;
}

.boot-text {
  line-height: 2;
  text-shadow: var(--glow-cyan);
}

.boot-screen.hide {
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================
   CYBER RAIN SYSTEM
========================================================== */

.rain-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: .35;
}

.rain-layer span {
  position: absolute;
  top: -200px;
  width: 2px;
  height: 180px;
  background: linear-gradient(transparent, var(--system));
  animation: rainFall linear infinite;
}

.rain-layer span:nth-child(1) { left: 10%; animation-duration: 3s; }
.rain-layer span:nth-child(2) { left: 22%; animation-duration: 5s; }
.rain-layer span:nth-child(3) { left: 35%; animation-duration: 4s; }
.rain-layer span:nth-child(4) { left: 48%; animation-duration: 6s; }
.rain-layer span:nth-child(5) { left: 60%; animation-duration: 3.5s; }
.rain-layer span:nth-child(6) { left: 72%; animation-duration: 5.5s; }
.rain-layer span:nth-child(7) { left: 84%; animation-duration: 4.5s; }
.rain-layer span:nth-child(8) { left: 95%; animation-duration: 6s; }

@keyframes rainFall {
  from { transform: translateY(-300px); }
  to { transform: translateY(120vh); }
}
/* ==========================================================
   RESPONSIVE SYSTEM
========================================================== */

/* Tablets */
@media (max-width: 900px) {
  .navbar {
    padding: 15px 20px;
  }

  .navbar ul {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(10, 10, 15, .96);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transform: translateX(100%);
    transition: .35s ease;
  }

  .navbar ul.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .panel {
    padding: 30px;
  }
}

/* Smartphones */
@media (max-width: 600px) {
  section {
    padding: 70px 18px;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero-text {
    font-size: 1rem;
  }

  .panel h2 {
    font-size: 1.8rem;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }

  .hero-buttons {
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .hud-panel {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================
   SOCIAL LINKS
========================================================== */

.connect-panel > p {
  max-width: 600px;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 35px;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: .25s;
}

.social-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: var(--system);
  transition: .4s;
}

.social-card:hover::before {
  left: 100%;
}

.social-card:hover {
  transform: translateY(-4px);
  border-color: var(--system);
  box-shadow: var(--glow-purple);
}

.social-tag {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--system);
  border: 1px solid rgba(208, 0, 255, 0.4);
  position: relative;
}

.social-tag img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.social-tag-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: 1px;
  color: var(--system);
}

.social-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
  min-width: 0;
}

.social-name {
  font-family: var(--font-heading);
  color: white;
  letter-spacing: 1px;
}

.social-handle {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-card:hover .social-tag {
  border-color: var(--system);
  box-shadow: var(--glow-purple);
}

.social-arrow {
  font-size: 1.8rem;
  color: var(--primary-light);
  transition: .25s;
}

.social-card:hover .social-arrow {
  transform: translateX(4px);
  color: var(--system);
}
