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

:root {
  --bg-dark: #e6e6fc;
  --bg-light: #ffffff;
  --card-bg: #eaf0fc;
  --card-border: #dfdfff;
  --text-primary: #000000;
  --text-secondary: #555555;
  --accent-blue: #6366f1;
  --accent-purple: #7c3aed;
  --accent-pink: #8b5cf6;
  --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  --transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Globals */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #ffffff;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 20px;
}

nav .logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: var(--transition);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-blue);
  transition: var(--transition);
}

nav a:hover,
nav a.active {
  color: var(--accent-blue);
}

nav a.active::after,
nav a:hover::after {
  width: 100%;
}

/* Page Container */
.page {
  display: none;
  min-height: 100vh;
  padding-top: 80px;
  animation: fadeIn 0.6s ease-out;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section Styling */
section {
  padding: 5rem 0;
}

section.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(99, 102, 241, 0.08));
}

h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
  display: inline-block;
  width: 100%;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--gradient-primary);
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
  text-align: center;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.btn-outline:hover {
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 2rem;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card .btn {
  margin-top: auto;
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-blue);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

.card h3 {
  margin-top: 1rem;
}

.stats-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25) !important;
}

/* Grid Systems */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Profile Section */
.profile-hero {
  text-align: center;
}

.profile-image {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  margin: 0 auto 2rem;
  border: 3px solid var(--accent-blue);
  object-fit: cover;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.social-links a {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  transition: var(--transition);
  font-size: 1.2rem;
}

.social-links a:hover {
  background: var(--accent-blue);
  color: var(--bg-dark);
  transform: translateY(-5px);
  border-color: var(--accent-blue);
}

/* Project Card */
.project-card .project-image {
  width: 100%;
  height: 130px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.project-card.compact-image .project-image {
  height: 100px;
}

.project-card .badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-blue);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.5rem;
  margin-bottom: 1rem;
}

.project-card .links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.project-card a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  font-size: 0.95rem;
}

.project-card a:hover {
  color: var(--accent-pink);
}

/* Skill Card */
.skill-card {
  text-align: center;
}

.skill-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--accent-blue);
}

.skill-bar {
  width: 100%;
  height: 4px;
  background: var(--card-bg);
  border-radius: 2px;
  margin-top: 1rem;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 2px;
  animation: fillBar 1.5s ease-out forwards;
}

@keyframes fillBar {
  from { width: 0; }
  to { width: var(--skill-level); }
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-blue), transparent);
}

.timeline-item {
  margin-bottom: 2.5rem;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-blue);
  box-shadow: 0 0 0 4px var(--card-bg);
}

.timeline-item h3 {
  margin-bottom: 0.25rem;
}

.timeline-date {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: rgba(99, 102, 241, 0.05);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* Footer */
footer {
  background: rgba(224, 224, 255, 0.5);
  border-top: 1px solid var(--card-border);
  padding: 3rem 0;
  text-align: center;
  color: var(--text-secondary);
}

footer p {
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  nav ul {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  section {
    padding: 3rem 0;
  }

  .profile-image {
    width: 120px;
    height: 120px;
  }

  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  nav .logo {
    font-size: 1.2rem;
  }

  nav ul {
    gap: 0.8rem;
    font-size: 0.8rem;
  }

  .container {
    padding: 0 15px;
  }

  .card {
    padding: 1.5rem;
  }

  .profile-image {
    width: 100px;
    height: 100px;
  }

  .social-links {
    gap: 1rem;
  }

  .social-links a {
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }
}
