:root {
  --primary-color: #4facfe;
  --secondary-color: #00f2fe;
  --background-color: #f9f9f9;
  --text-color: #333;
  --card-background: white;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --nav-background: rgba(255, 255, 255, 0.8);
  --nav-text-color: #333;
  --footer-background: #333;
}

body.dark-mode {
  --primary-color: #9d72ff;
  --secondary-color: #6b4de6;
  --background-color: #1a1a1a;
  --text-color: #f0f0f0;
  --card-background: #2a2a2a;
  --shadow-color: rgba(255, 255, 255, 0.1);
  --nav-background: rgba(26, 26, 26, 0.8);
  --nav-text-color: #f0f0f0;
  --footer-background: #1a1a1a;
}

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

body {
    font-family: "Segoe UI", sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-color);
    transition: background-color 0.3s, color 0.3s;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--nav-background);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 10px var(--shadow-color);
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
}
.nav-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}
.nav-menu {
  display: flex;
  list-style: none;
  gap: 20px;
}
.nav-menu a {
  text-decoration: none;
  color: var(--nav-text-color);
  font-weight: 500;
  transition: color 0.3s;
}
.nav-menu a:hover {
  color: var(--primary-color);
}
.theme-toggle {
  background: none;
  border: none;
  color: var(--nav-text-color);
  font-size: 1.2rem;
  cursor: pointer;
}

header.hero {
    text-align: center;
    padding: 120px 20px 60px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    position: relative;
    overflow: hidden;
}
.hero-content {
  position: relative;
  z-index: 1;
}
header.hero h1 span {
    color: #ffeb3b;
}

main {
  padding-top: 60px;
}

section {
    padding: 60px 20px;
    max-width: 960px;
    margin: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s, transform 0.6s;
}
section.visible {
  opacity: 1;
  transform: translateY(0);
}

h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-color);
    font-size: 2.5rem;
}

/* Projects */
.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.project-card {
    padding: 25px;
    background: var(--card-background);
    border-radius: 15px;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: transform 0.3s, box-shadow 0.3s;
}
.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 20px var(--shadow-color);
}
.project-card h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}
.project-card .technologies {
  font-style: italic;
  color: #888;
  margin-top: 15px;
}
.project-links {
  margin-top: 20px;
}
.project-links a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
}
.project-links a i {
  margin-right: 5px;
}

/* Skills */
.skill-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}
.skill-category {
    background: var(--card-background);
    padding: 30px;
    border-radius: 15px;
    flex: 1;
    min-width: 250px;
    text-align: center;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: transform 0.3s;
}
.skill-category:hover {
  transform: scale(1.05);
}
.skill-category h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

/* Contact */
.contact form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 600px;
    margin: auto;
}
.contact input, .contact textarea {
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: var(--card-background);
    color: var(--text-color);
}
.contact button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}
.contact button:hover {
    background: var(--secondary-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    background: var(--footer-background);
    color: white;
    margin-top: 60px;
}
.social-links a {
  color: white;
  margin: 0 10px;
  font-size: 1.5rem;
  transition: color 0.3s;
}
.social-links a:hover {
  color: var(--primary-color);
}

/* Animations */
.fade-in {
  animation: fadeIn 1s ease-in-out forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
