
/* --- CSS VARIABLES & BASIC SETUP --- */
:root {
  --bg: #04060c;
  --primary: #5865f2;
  --primary-light: #7983f3;
  --accent-gradient: linear-gradient(45deg, #5865f2, #00f5a7);
  --glass-bg: rgba(15, 20, 43, 0.5);
  --text: #e6f1ff;
  --subtext: #8892b0;
  --border: rgba(136, 146, 176, 0.2);
  --shadow: rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* --- MOVING BLUR BALL BACKGROUND --- */
.blur-ball-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}
.blur-ball {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}
.blur-ball:nth-child(1) {
  width: 200px;
  height: 200px;
  background-color: var(--primary);
  animation: move-ball-1 10s infinite alternate ease-in-out;
}
.blur-ball:nth-child(2) {
  width: 200px;
  height: 200px;
  background-color: #00f5a7;
  animation: move-ball-2 10s infinite alternate ease-in-out;
}

@keyframes move-ball-1 {
  0%   { transform: translate(10vw, 10vh); }
  40%  { transform: translate(40vw, 30vh); }
  70%  { transform: translate(60vw, 60vh); }
  100% { transform: translate(70vw, 80vh); }
}

@keyframes move-ball-2 {
  0%   { transform: translate(80vw, 20vh); }
  30%  { transform: translate(60vw, 40vh); }
  60%  { transform: translate(40vw, 60vh); }
  100% { transform: translate(20vw, 70vh); }
}

/* --- HEADER & NAVIGATION --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 5%;
  z-index: 1000;
  background: rgba(4, 6, 12, 0.5);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  gap: 2.5rem;
}
nav a {
  color: var(--subtext);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
  padding: 0.3rem 0;
}
nav a:hover {
  color: var(--text);
}
nav a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gradient);
  transition: width 0.3s;
}
nav a:hover::after {
  width: 100%;
}

/* --- GENERAL SECTION STYLING --- */
section {
  padding: 6rem 10% 4rem;
}
h1, h2, h3 {
  color: var(--text);
}
h2 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  text-align: center;
  margin-bottom: 3rem;
}

/* --- HERO SECTION --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.hero img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin-bottom: 1.4rem;
  border: 3px solid var(--primary);
  box-shadow: 0 0 30px rgba(88, 101, 242, 0.5);
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin-bottom: 1rem;
}
.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 1rem;
  color: var(--subtext);
  max-width: 650px;
  margin: 0 auto 2.5rem;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 14px 32px;
  background: var(--primary);
  color: white;
  font-weight: bold;
  font-size: 1.1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.3s, background-color 0.3s;
}
.cta:hover {
  transform: translateY(-3px);
  background-color: var(--primary-light);
}


/* --- Main Grid Layout --- */
.grid {
    display: grid;
    /* This is the responsive magic! It creates columns that automatically adjust. */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* --- General Card Styling (Applies to both sections) --- */
.card, .project-card {
    background: var(--glass-bg); /* Using your theme variable */
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px 0 var(--shadow);
    transition: transform 0.3s, border-color 0.3s;
    overflow: hidden; /* Important for child elements */
}

.card:hover, .project-card:hover {
    transform: translateY(-8px); /* A nice lift effect */
    border-color: var(--primary); /* Using your theme variable */
}


/* --- SKILLS Section Specifics --- */
.skills .card {
    padding: 2rem;
    text-align: center;
}

.skills .card i {
    font-size: 2.5rem; /* Makes the icons stand out */
    color: var(--primary-light); /* Using your theme variable */
    margin-bottom: 1rem;
}

.skills .card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}


/* --- PROJECTS Section Specifics --- */
.project-card {
    display: flex; /* Allows for better internal layout */
    flex-direction: column;
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* Prevents image distortion */
    border-bottom: 1px solid var(--border);
}

.project-card .project-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Ensures the info section fills the card height */
}

.project-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.project-card p {
    color: var(--subtext);
    flex-grow: 1; /* Pushes the tech tags and links to the bottom */
}

.project-card .project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.project-card .project-tech span {
    background: rgba(88, 101, 242, 0.1);
    color: var(--primary-light);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.project-card .project-links {
    padding-top: 1.5rem;
}

.project-card .project-links a {
    color: var(--subtext);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.project-card .project-links a:hover {
    color: var(--primary);
}

.project-card .project-links a i {
    margin-right: 0.5rem;
}

/* --- PROJECTS --- */
.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}
.project-info {
  padding: 1.5rem;
}
.project-info h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}
.project-tech span {
  background: rgba(88, 101, 242, 0.1);
  color: var(--primary-light);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
}
.project-links a {
  color: var(--subtext);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}
.project-links a:hover {
  color: var(--primary);
}

/* --- CONTACT --- */
.contact {
  text-align: center;
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 2rem 5%;
  border-top: 1px solid var(--border);
  color: var(--subtext);
}
.social-links {
  margin-bottom: 1rem;
}
.social-links a {
  color: var(--subtext);
  font-size: 1.5rem;
  margin: 0 0.75rem;
  transition: color 0.3s;
}
.social-links a:hover {
  color: var(--primary);
}

.card::before, .project-card::before {
    content: "";
    position: absolute;
    /* Uses the variables from the JS */
    top: var(--mouse-y, 0);
    left: var(--mouse-x, 0);
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(88, 101, 242, 0.2) 0%, transparent 80%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.3s, height 0.3s, opacity 0.3s;
    pointer-events: none; /* Allows you to click through the effect */
}

.card:hover::before, .project-card:hover::before {
    opacity: 1;
    width: 400px;
    height: 400px;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  section {
    padding: 4rem 5%;
  }
  nav ul {
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero {
    padding-top: 8rem;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
