/* ====== Cards Hover Animations ====== */

/* تأثير على كل الكروت (projects, tools, certs, skills, writeups) */
.item-card {
  transition: transform 0.18s ease-out,
              box-shadow 0.18s ease-out,
              border-color 0.18s ease-out,
              background 0.18s ease-out;
}

.item-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.95);
  border-color: rgba(110, 231, 183, 0.85);
  background: linear-gradient(145deg, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.96));
}

body.light .item-card:hover {
  box-shadow: 0 14px 40px rgba(148, 163, 184, 0.55);
  background: linear-gradient(145deg, #ffffff, #e5e7eb);
}

/* CTF cards - بدون لمعة */
.ctf-card-inner {
  transition: transform 0.25s ease-out;
  box-shadow: none !important;   /* ← حذف الglow */
}

.ctf-card:hover .ctf-card-inner {
  transform: rotateY(180deg);
  box-shadow: none !important;   /* ← حذف الglow */
}

/* ====== Mobile Navbar (Burger Menu) ====== */

.nav-toggle {
  display: none;
  margin-left: 6px;
  width: 32px;
  height: 26px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: var(--muted);
  transition: transform 0.2s ease-out, opacity 0.2s ease-out, background 0.2s ease-out;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 840px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    right: 16px;
    top: 50px;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
    display: none;
  }

  body.light .nav-links {
    background: rgba(248, 250, 252, 0.98);
  }

  body.nav-open .nav-links {
    display: flex;
  }
}

/* ====== Terminal-style Loader ====== */

.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #020617;
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas;
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* حذف أي لمعات */
.loader-inner {
  max-width: 480px;
  width: 90%;
  border-radius: 12px;
  padding: 16px 18px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: none !important;
}

/* العنوان */
.loader-title {
  font-size: 13px;
  color: #a5b4fc;
  margin-bottom: 6px;
}

/* النص */
.loader-log {
  font-size: 12px;
  line-height: 1.6;
  color: #9ca3af;
  white-space: pre-line;
}

/* كيرسر — بدون وميض */
.loader-log .cursor {
  display: inline-block;
  width: 8px;
  background: #22c55e;
  margin-left: 2px;
  opacity: 1 !important; /* ثابت */
  animation: none !important;  /* إلغاء الوميض */
}

/* تعطيل blink animation */
@keyframes blink { }

/* لما نخفيه */
.loader-hide {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}
