﻿/* =====================================================
   Theme Variables
====================================================== */
:root {
  --bg: #06060b;
  --bg2: #0b0715;
  --purple: #8b5cf6;
  --purple-2: #6d28d9;
  --glass: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
}

/* =====================================================
   Base
====================================================== */
html { scroll-behavior: smooth; }

body {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background:
    radial-gradient(1200px 600px at 15% 10%, rgba(123, 97, 255, 0.25), transparent 60%),
    radial-gradient(900px 500px at 85% 20%, rgba(139, 92, 246, 0.22), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  color: #eaeaf2;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Grid overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

/* =====================================================
   Background Effects
====================================================== */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.8);
  animation: star-fall var(--fall-duration, 12s) linear infinite;
  animation-delay: var(--fall-delay, 0s);
}

.glow {
  position: fixed;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, rgba(139, 92, 246, 0) 70%);
  filter: blur(20px);
  border-radius: 999px;
  z-index: 0;
  transition: transform 0.2s ease-out;
}

.glow.glow-left { left: -120px; top: 120px; }
.glow.glow-right { right: -160px; top: 260px; }

/* =====================================================
   Components
====================================================== */
.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.card {
  background: rgba(14, 12, 24, 0.7);
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 25px 50px rgba(0,0,0,0.45), 0 0 25px rgba(139, 92, 246, 0.25);
}

/* Team card background image */
.card-team-bg {
  background-image:
    linear-gradient(180deg, rgba(6, 6, 11, 0.75), rgba(6, 6, 11, 0.85)),
    url("Screenshot 2026-02-01 221041.png");
  background-size: cover;
  background-position: center;
}

.card-team-bg-2 {
  background-image:
    linear-gradient(180deg, rgba(6, 6, 11, 0.75), rgba(6, 6, 11, 0.85)),
    url("Screenshot 2026-02-01 221059.png");
  background-size: cover;
  background-position: center;
}

.card-team-bg-3 {
  background-image:
    linear-gradient(180deg, rgba(6, 6, 11, 0.75), rgba(6, 6, 11, 0.85)),
    url("Screenshot 2026-02-01 221132.png");
  background-size: cover;
  background-position: center;
}

.card-team-bg-4 {
  background-image:
    linear-gradient(180deg, rgba(6, 6, 11, 0.75), rgba(6, 6, 11, 0.85)),
    url("Screenshot 2026-02-01 221115.png");
  background-size: cover;
  background-position: center;
}

/* Team icon glow */
.team-icon {
  text-shadow:
    0 0 12px rgba(139, 92, 246, 0.8),
    0 0 26px rgba(139, 92, 246, 0.6);
}

/* =====================================================
   Skills Flip Cards
====================================================== */
.skill-card {
  position: relative;
  perspective: 1000px;
  min-height: 220px;
}

.skill-inner {
  position: relative;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.9s ease;
}

.skill-card:hover .skill-inner {
  transform: rotateY(180deg);
}

.skill-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}

.skill-back {
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.skill-card .skill-back.card:hover {
  transform: rotateY(180deg) translateY(-6px);
}

.skill-back-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: var(--purple);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 14px rgba(139, 92, 246, 0.5);
  line-height: 1;
  opacity: 0;
  transform: translateY(4px) scale(0.96);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.skill-back-icon svg {
  width: 1em;
  height: 1em;
}

.skill-card:hover .skill-back-icon {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Mobile menu */
.menu-toggle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.menu-toggle {
  display: inline-flex;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 12px 24px rgba(0,0,0,0.35);
}

.menu-icon {
  width: 20px;
  height: 14px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background: #eaeaf2;
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
  will-change: max-height, opacity, transform;
  width: auto;
  left: auto;
  right: auto;
  transform: translateY(-8px);
}

.mobile-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  max-height: 360px;
}


.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

.badge {
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.45);
  color: #c4b5fd;
}

.section {
  position: relative;
  z-index: 1;
  scroll-margin-top: 120px;
}

.active-link {
  color: #c4b5fd !important;
}

@keyframes star-fall {
  from { transform: translateY(0); }
  to { transform: translateY(120vh); }
}

/* =====================================================
   Scroll Reveal
====================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s ease, transform 1s ease;
  will-change: opacity, transform;
}

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

/* =====================================================
   Works Page
====================================================== */
.work-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.work-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 25px 50px rgba(0,0,0,0.45), 0 0 25px rgba(139, 92, 246, 0.25);
}

.work-image {
  position: relative;
  overflow: hidden;
  background: rgba(139, 92, 246, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 14rem;
}

.work-image img {
  width: 100%;
  height: 14rem;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.work-card:hover .work-image img {
  transform: scale(1.05);
}

/* placeholder style when no image src is set */
.work-image img[src=""] {
  visibility: hidden;
}

.work-image img[src=""] + .work-placeholder,
.work-image img[src=""]::after {
  content: "";
}

/* =====================================================
   Responsive Tweaks
====================================================== */
@media (max-width: 1024px) {
  main {
    padding-top: 10rem;
  }
}

@media (max-width: 768px) {
  main {
    padding-top: 8rem;
  }

  #about,
  #skills,
  #works,
  #team,
  #contact {
    margin-top: 5rem !important;
  }

  .section {
    scroll-margin-top: 90px;
  }

  .card {
    padding: 1.25rem;
  }

  .team-icon {
    font-size: clamp(2.75rem, 10vw, 4.5rem) !important;
  }
}

@media (max-width: 480px) {
  main {
    padding-top: 7rem;
  }

  #about,
  #skills,
  #works,
  #team,
  #contact {
    margin-top: 4rem !important;
  }

  .section {
    scroll-margin-top: 80px;
  }
}
