/* Root Colors */
:root {
  --accent: #00FF7F;
  --accent-dark: #00cc66;
  --text-primary: #fff;
  --text-secondary: #ccc;
  --text-muted: #777;
  --text-alt: #aaa;
  --bg-main: #0f0f15;
  --bg-dark: #111;
  --bg-section: #1a1a2f;
  --bg-gradient-start: #1a1a2f;
  --bg-gradient-end: #0f0f15;
  --input-bg: rgba(255, 255, 255, 0.05);
  --border-color: #333;
  --hover-opacity: 0.85;
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-main);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  z-index: 1000;
  background: linear-gradient(90deg, rgba(15, 15, 21, 0.95), rgba(15, 15, 21, 0.95));
  border-bottom: 1px solid var(--border-color);
}

header h1 {
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--accent);
}

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: 0.3s;
}

nav a:hover {
  color: var(--accent);
}

/* Hero Section */
#hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  padding: 0 20px;
  overflow: hidden;
}

#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

#hero-content {
  position: relative;
  z-index: 1;
}

#hero img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-15px);
  }
}

#hero h2 {
  font-size: 3rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

#hero p {
  font-size: 1.2rem;
  color: var(--text-alt);
  max-width: 600px;
}

/* Section Styles */
section {
  padding: 100px 50px;
  text-align: center;
}

#about {
  padding-top: 120px;
}

h3 {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 20px;
}

#about p {
  color: var(--text-alt);
  font-size: 1.05rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Projects */
#projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.project-card {
  background: var(--bg-section);
  border-radius: 25px;
  overflow: hidden;
  width: 300px;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  text-decoration: none;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 255, 127, 0.4);
}

.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.project-card .project-info {
  padding: 20px;
}

.project-card h4 {
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 10px;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Contact */
#contact {
  background: linear-gradient(135deg, var(--bg-main), var(--bg-section));
}

#contact form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 500px;
  margin: 0 auto;
}

#contact input,
#contact textarea {
  padding: 15px;
  border-radius: 15px;
  border: none;
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: 1rem;
  resize: none;
}

#contact input::placeholder,
#contact textarea::placeholder {
  color: var(--text-alt);
}

#contact button {
  padding: 15px;
  border: none;
  border-radius: 15px;
  background: var(--accent);
  color: var(--bg-main);
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}

#contact button:hover {
  opacity: var(--hover-opacity);
}

/* Footer */
footer {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
  background: var(--bg-dark);
}

/* Ensure things look better on smaller screens */
@media(max-width:768px) {
  /* Center header */
  header {
    flex-direction: column;
    gap: 10px;
  }
  /* Center nav bar */
  nav {
    justify-content: center;
  }

  /* Stack and center cards */
  #projects {
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
  }
}

/* misc */

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--bg-main);
  border-top: 2px solid transparent;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}