/* ============================================
   NEXUS — Animations (Win95 Style)
   ============================================ */

/* ── Loader ── */

.loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__inner {
  text-align: center;
}

.loader__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.15em;
  margin-bottom: var(--space-lg);
}

.loader__bar {
  width: 200px;
  height: 16px;
  background: #000000;
  border: 3px solid;
  border-color: #000000 #505050 #505050 #000000;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.loader__progress {
  height: 100%;
  width: 0%;
  background: var(--win95-blue);
  transition: width 0.1s linear;
}

.loader__status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ── Section Reveal ── */

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0.05s; }
.reveal--delay-2 { transition-delay: 0.1s; }
.reveal--delay-3 { transition-delay: 0.15s; }
.reveal--delay-4 { transition-delay: 0.2s; }

/* ── Typing Cursor ── */

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

.typing-cursor::after {
  content: '_';
  color: var(--primary);
  animation: blink 0.8s step-end infinite;
}

/* ── CTF Filter ── */

.ctf-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
}

.ctf-filter.active {
  background: var(--win95-blue);
  border-color: var(--primary);
  color: #FFFFFF;
}

/* ── Projects Grid ── */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: var(--space-lg);
}

/* ── Research Grid ── */

.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: var(--space-lg);
}

/* ── Footer ── */

.footer {
  padding: var(--space-3xl) 0 var(--space-xl);
  background: var(--bg-secondary);
  border-top: 3px solid;
  border-color: #505050 #000000 #000000 #505050;
}

.footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-xl);
}

.footer__links {
  display: flex;
  gap: var(--space-lg);
}

.footer__link {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  transition: color var(--duration-fast);
}

.footer__link:hover {
  color: var(--primary);
}

.footer__social {
  display: flex;
  gap: var(--space-sm);
}

.footer__social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-tertiary);
  background: var(--surface-1);
  border: 3px solid;
  border-color: #505050 #000000 #000000 #505050;
  transition: all var(--duration-fast);
}

.footer__social-link:hover {
  background: var(--surface-2);
  color: var(--primary);
}

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

@media (max-width: 767px) {
  .footer__top {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}
