:root {
  --background: #ffffff;
  --foreground: #0f172a;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --primary: #3b82f6;
  --primary-foreground: #f8fafc;
  --secondary: #f1f5f9;
  --secondary-foreground: #1e293b;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #f1f5f9;
  --accent-foreground: #1e293b;
  --destructive: #ef4444;
  --destructive-foreground: #f8fafc;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #3b82f6;
  --radius: 0.75rem;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.dark {
  --background: #0f172a;
  --foreground: #f8fafc;
  --card: #0f172a;
  --card-foreground: #f8fafc;
  --primary: #60a5fa;
  --primary-foreground: #1e293b;
  --secondary: #1e293b;
  --secondary-foreground: #f8fafc;
  --muted: #1e293b;
  --muted-foreground: #94a3b8;
  --accent: #1e293b;
  --accent-foreground: #f8fafc;
  --destructive: #7f1d1d;
  --destructive-foreground: #f8fafc;
  --border: #1e293b;
  --input: #1e293b;
  --ring: #3b82f6;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  padding-top: 5rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background-color: var(--background);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  z-index: 50;
}

.navbar-logo {
  font-size: 1.25rem;
  font-weight: 700;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links-container {
  display: none;
}

@media (min-width: 768px) {
  .nav-links-container {
    display: flex;
    gap: 1.5rem;
  }
}

.nav-link {
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--foreground);
  transition: background-color 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  background-color: var(--secondary);
}

.icon {
  width: 1.2rem;
  height: 1.2rem;
}

.icon-sun {
  display: none;
}

.icon-moon {
  display: block;
}

.dark .icon-sun {
  display: block;
}

.dark .icon-moon {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: 1px solid var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary);
  filter: brightness(0.9);
}

.btn-outline {
  background-color: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background-color: var(--secondary);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-icon:hover {
  background-color: var(--secondary);
}

.btn-full {
  width: 100%;
}

.btn .icon {
  margin-right: 0.5rem;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
}

/* Hero Section */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
  padding: 1rem 0;
  text-align: center;
}

.profile-image {
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary);
  margin-bottom: 2rem;
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-intro {
  font-size: 1.125rem;
  color: var(--muted-foreground);
}

.hero-name {
  font-size: 3rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.hero-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

/* Social Links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-link {
  color: var(--text-color);
  transition: 0.3s ease;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.social-link:hover {
  color: var(--hover-color);
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
  }
}

/* About Section */
.about-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

@media (min-width: 768px) {
  .about-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.about-text {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
  font-size: 1.125rem;
}

@media (min-width: 768px) {
  .about-text {
    text-align: left;
  }
}

/* Skills Section */
.skills-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .skills-container {
    grid-template-columns: 1fr 1fr;
  }
}

.skills-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border-radius: 9999px;
  font-size: 0.875rem;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--card);
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.project-image {
  height: 12rem;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-description {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.project-links {
  display: flex;
  gap: 0.75rem;
}

/* Contact Section */

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}


.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-label {
  font-weight: 500;
}

.contact-value {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Card */
.card {
  background-color: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-align: center;
}

/* Footer */
.footer {
  text-align: center;
  color: var(--muted-foreground);
  padding: 2rem 0;
  margin-top: 2rem;
}

/* Notification */
.notification {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  padding: 0.75rem 1.5rem;
  background-color: #333;
  color: #fff;
  border-radius: 0.5rem;
  z-index: 1000;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  text-align: center;
  max-width: 90%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.3s, transform 0.3s, background-color 0.2s;
}

.scroll-to-top:hover {
  background-color: var(--primary);
  filter: brightness(0.9);
}

.scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .notification {
    bottom: 9.375rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    max-width: 85%;
  }
}

/* Fade-in Animation Keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Base class for animated elements */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards;
}

/* Staggered animations for different sections */
.hero-section {
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

.hero-intro {
  opacity: 0;
  animation: fadeIn 0.6s ease-out 0.2s forwards;
}

.hero-name {
  opacity: 0;
  animation: fadeIn 0.6s ease-out 0.4s forwards;
}

.hero-title {
  opacity: 0;
  animation: fadeIn 0.6s ease-out 0.6s forwards;
}

.hero-buttons {
  opacity: 0;
  animation: fadeIn 0.6s ease-out 0.8s forwards;
}

.profile-image {
  opacity: 0;
  animation: fadeIn 0.8s ease-out 0.3s forwards;
}

/* Section animations */
.section-title {
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards;
}

/* Card animations */
.card {
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards;
}

/* Project card animations */
.project-card {
  opacity: 0;
  animation: fadeIn 0.7s ease-out forwards;
}

/* Apply different animation delays to cards */
#about .card:nth-child(1) {
  animation-delay: 0.2s;
}

#about .card:nth-child(2) {
  animation-delay: 0.4s;
}

#skills .card:nth-child(1) {
  animation-delay: 0.2s;
}

#skills .card:nth-child(2) {
  animation-delay: 0.4s;
}

/* Projects staggered delays */
#projects .project-card:nth-child(1) {
  animation-delay: 0.1s;
}

#projects .project-card:nth-child(2) {
  animation-delay: 0.3s;
}

#projects .project-card:nth-child(3) {
  animation-delay: 0.5s;
}

#projects .project-card:nth-child(4) {
  animation-delay: 0.7s;
}

/* Contact info fadeIn */
.contact-item {
  opacity: 0;
  animation: fadeIn 0.5s ease-out forwards;
}

.contact-item:nth-child(1) {
  animation-delay: 0.1s;
}

.contact-item:nth-child(2) {
  animation-delay: 0.3s;
}

.contact-item:nth-child(3) {
  animation-delay: 0.5s;
}

/* Scroll-triggered animations using Intersection Observer */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}