/* ============================================================
   styles.css — custom styling layered on top of Tailwind.
   Tailwind utility classes live in the HTML; reusable component
   classes, animations, and decorative elements live here.
   ============================================================ */

:root {
  --brand: #1c66f1;
  --brand-light: #59a6ff;
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
}

/* ---------- Decorative background ---------- */
.bg-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(120px);
  opacity: 0.35;
}
.bg-blob--one {
  top: -10%;
  left: -5%;
  width: 45rem;
  height: 45rem;
  background: radial-gradient(circle at center, #1c66f1, transparent 70%);
}
.bg-blob--two {
  bottom: -15%;
  right: -10%;
  width: 40rem;
  height: 40rem;
  background: radial-gradient(circle at center, #7c3aed, transparent 70%);
}
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* ---------- Text helpers ---------- */
.text-gradient {
  background: linear-gradient(120deg, var(--brand-light), #a78bfa 60%, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Nav ---------- */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: #fff;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-light);
  transition: width 0.25s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* ---------- Section headings ---------- */
.section-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand-light);
}
.section-title {
  margin-top: 0.75rem;
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
}

/* ---------- Cards ---------- */
.card {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

/* ---------- Project cards ---------- */
.project-card {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.55);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(89, 166, 255, 0.4);
  box-shadow: 0 20px 40px -20px rgba(28, 102, 241, 0.5);
}
.project-thumb {
  display: grid;
  place-items: center;
  height: 9rem;
  background-image: linear-gradient(135deg, var(--tw-gradient-from), var(--tw-gradient-to));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease;
}
.project-card:hover .project-thumb {
  transform: scale(1.04);
}
.project-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  color: var(--brand-light);
  background: rgba(28, 102, 241, 0.15);
  border: 1px solid rgba(89, 166, 255, 0.25);
  white-space: nowrap;
}
.project-link {
  color: var(--brand-light);
  transition: color 0.2s ease, transform 0.2s ease;
}
.project-link:hover {
  color: #fff;
}

/* ---------- Tags ---------- */
.tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  border-radius: 0.5rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .animate-float,
  .animate-fade-up {
    animation: none !important;
  }
}

/* ---------- Custom scrollbar ---------- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #020617;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}
