/* styles.css */
:root {
  --primary-color: #f97316; /* Orange color */
  --secondary-color: #fb923c;
  --accent-color: #fdba74;
  --text-dark: #212121; /* New dark grey text */
  --text-light: #e2e8f0;
  --bg-light: #f8fafc;
  --bg-dark: #121212; /* New darker background */
  --card-bg-light: #ffffff;
  --card-bg-dark: #1e1e1e; /* New card/navbar background */
  --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-dark: 0 4px 6px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

[data-theme="dark"] {
  --text-dark: #f7faf5;
  --text-light: #e2e8f0;
  --bg-light: #121212; /* Main background */
  --bg-dark: #121212;
  --card-bg-light: #222222; /* Slightly lighter card background */
  --card-bg-dark: #1e1e1e;
  --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.2);
  --shadow-dark: 0 4px 6px rgba(0, 0, 0, 0.3);
}

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

body {
font-family: 'Poppins', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  transition: var(--transition);
  line-height: 1.6;
  padding-top: 70px; /* Add padding to the top of the body to prevent content from being hidden under the fixed header */
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--card-bg-light);
  box-shadow: var(--shadow-light);
  z-index: 1000;
  transition: var(--transition);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  justify-content: flex-end; /* Right-align content within the header container */
}

.logo {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--primary-color);
  text-decoration: none;
  margin-right: auto; /* Pushes the logo to the left, and other items to the right */
}

.navbar ul {
  font-family: 'Poppins', sans-serif;
  display: flex;
  list-style: none;
}

.nav-link {
  margin: 0 15px;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

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

[data-theme="dark"] .hero-title {
  color: #1a202c;
}

.theme-toggle {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  position: fixed; /* Added for fixed positioning */
  bottom: 20px;   /* Added for bottom positioning */
  right: 20px;    /* Added for right positioning */
  z-index: 1001;  /* Ensure it's above other content and header */
  overflow: hidden; /* Hide the pseudo-element overflow */
}

.theme-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
  z-index: -1;
}

.theme-toggle:hover::before {
  width: 100%;
}

.theme-toggle i {
  font-size: 1.2rem;
  transition: transform 0.3s ease, color 0.3s ease;
  display: block;
  margin: 0;
  position: relative;
  z-index: 1;
}

.theme-toggle:hover i {
  color: white;
}

.toggle-text {
  display: none;
}

.hero {
  background-color: var(--bg-light);
  padding: 100px 0;
  position: relative;
  overflow: hidden;
  margin-top: 70px;
}

#rain-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero .about {
    position: relative;
    z-index: 2;
    padding: 0;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 15px 35px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(249, 115, 22, 0.2);
  animation: fadeInUp 1s ease 0.4s both;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(249, 115, 22, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.about {
  padding: 100px 0;
}

.section-header {
  font-family: 'Poppins', sans-serif;
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.5rem;
  color: var(--text-dark);
  position: relative;
  display: inline-block;
  margin-bottom: 15px;
}

.line {
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  margin: 0 auto;
  border-radius: 2px;
}

.about-content {
  display: flex;
  gap: 50px;
  align-items: center;
  flex-wrap: wrap;
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-text p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-dark);
}

.about-image {
  flex: 1;
  min-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px; /* Add perspective for 3D effect */
}

.image-frame {
  position: relative;
  padding: 15px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(249, 115, 22, 0.3);
  transform-style: preserve-3d; /* Preserve 3D transformations */
  transition: transform 0.1s; /* Faster transition for responsive feel */
}

.image-frame:hover {
  /* The hover effect will be handled by JavaScript */
}

.image-frame::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  border-radius: 25px;
  z-index: -1;
  filter: blur(10px);
  opacity: 0.3;
}

.image-frame img {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 15px;
  border: 5px solid white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.image-frame:hover img {
  transform: scale(1.03);
}

.skills {
  margin-top: 40px;
  padding: 30px;
  background-color: var(--card-bg-light);
  border-radius: 15px;
  box-shadow: var(--shadow-light);
}

.skills h3 {
  color: var(--text-dark);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.skills h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.tag {
  display: inline-block;
  background-color: #f9fafb;
  color: var(--text-dark);
  padding: 8px 15px;
  margin: 5px;
  border-radius: 50px;
  font-size: 0.9rem;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.tag:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.projects {
  padding: 60px 0;
  background-color: var(--bg-light);
}

.section-header h2 {
  color: var(--text-dark);
}

.project-card {
  background-color: var(--card-bg-light);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  margin-bottom: 30px;
  transform: translateY(0);
  opacity: 1;
}

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

.project-image {
  height: 250px;
  overflow: hidden;
}

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

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

.project-info {
  padding: 25px;
}

.project-info h3 {
  color: var(--text-dark);
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.project-info p {
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.project-tags span {
  background-color: var(--primary-color);
  color: white;
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--primary-color);
}

.contact {
  padding: 60px 0;
}

.contact-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.contact-info {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.contact-info h3 {
  color: var(--text-dark);
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.contact-info p {
  color: #6b7280;
  line-height: 1.7;
  margin-bottom: 30px;
}

.contact-details {
  margin-bottom: 30px;
  display: inline-block;
  text-align: left;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.contact-item i {
  font-size: 1.4rem;
  color: var(--primary-color);
  width: 40px;
  height: 40px;
  background-color: #fffbeb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-links {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.social-links a {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
}

.contact-form {
  flex: 1;
  min-width: 300px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: var(--card-bg-light);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.footer {
  background-color: var(--card-bg-light);
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid #333333;
  color: var(--text-dark); /* Changed to match navbar text color in light mode */
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05); /* Small shadow casting above */
}

.footer-links {
  margin-top: 20px;
}

.footer-links a {
  color: var(--text-light);
  margin: 0 15px;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

/* Responsive Design */
@media (max-width: 992px) {
  .about-content {
    flex-direction: column;
  }
  
  .hero-title {
    font-size: 2.3rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .contact-content {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    padding: 15px 0;
  }
  
  .navbar ul {
    margin: 20px 0;
    justify-content: flex-end; /* Right-align navbar links */
    width: 100%; /* Ensure it takes full width to align right */
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .project-info {
    padding: 20px;
  }
  
  .hero {
    padding: 140px 0 80px;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .tag {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .project-tags span {
    padding: 4px 10px;
    font-size: 0.8rem;
  }
  
  .image-frame img {
    width: 250px;
    height: 250px;
  }
}

