/* === Reset & Base Styles === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: auto;
}
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  background-color: #111;
  color: #eee;
  overflow-x: hidden;
  padding-top: 60px;
}
a {
  text-decoration: none;
  color: inherit;
}

/* === Preloader Styles === */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #111;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.loader {
  border: 6px solid #333;
  border-top: 6px solid #eee;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === Navigation Styles === */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 150;
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #222;
  padding: 15px 30px;
  border-bottom: 1px solid #333;
}
.logo {
  font-size: 1.5rem;
  font-weight: bold;
}
.nav-list {
  display: flex;
  list-style: none;
  align-items: center;
}
.nav-list li {
  margin-left: 25px;
}
.nav-link {
  color: #eee;
  transition: color 0.3s ease;
}
.blog-link{
  color:rgb(226, 70, 14);
  font-weight: bold;
}
.nav-link:hover {
  color: #aaa;
}
.close-icon {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  margin-right: auto;
  padding-left: 15px;
  color: #eee;
}

/* Mobile Menu Styles */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}
.menu-toggle .bar {
  height: 3px;
  width: 25px;
  background-color: #eee;
  margin: 4px 0;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    order: -1;
  }
  .nav-list {
    position: fixed;
    top: 0;
    left: -100%;
    height: 100%;
    width: 250px;
    background: #222;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    transition: left 0.3s ease;
    z-index: 150;
    padding: 60px 30px 30px;
  }
  .nav-list.active {
    left: 0;
  }
  .nav-list li {
    margin: 15px 0;
  }
  .nav-list.active .close-icon {
    display: block;
  }
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .section h2 {
    font-size: 2rem;
  }
}

/* === Section Styles === */
.section {
  padding: 80px 20px;
  background-color: #111;
}
.container {
  max-width: 1200px;
  margin: auto;
}
.section h2 {
  text-align: center;
  margin-bottom: 40px;
  color: #ccc;
}

/* Updated Hero Section */
.hero {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 40px 20px;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
  padding: 30px;
  background: rgba(17, 17, 17, 0.9);
  border-radius: 10px;
}

.profile-image {
  flex: 1;
  max-width: 400px;
  text-align: center;
}

.profile-image img {
  width: 100%;
  height: auto;
  max-width: 400px;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.15));
  animation: float 3s ease-in-out infinite;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
}
.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}
.btn {
  padding: 12px 25px;
  border: none;
  background-color: #444;
  color: #eee;
  cursor: pointer;
  border-radius: 4px;
  font-size: 1rem;
  transition: background 0.3s ease;
}
.btn:hover {
  background-color: #666;
}

/* === Projects Section === */
.projects .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}
.project-item {
  background: #222;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
  cursor: pointer;
}
.project-item:hover {
  transform: translateY(-5px);
}
.project-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.project-item h3,
.project-item p {
  padding: 15px;
  color: #eee;
}

/* === Modal Styles === */
.modal {
  display: none;
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(17,17,17,0.95);
  padding-top: 60px;
}
.modal-content {
  background: #222;
  margin: auto;
  padding: 20px;
  border: 1px solid #333;
  width: 90%;
  max-width: 800px;
  border-radius: 6px;
  position: relative;
}
.modal-content img {
  width: 100%;
  border-radius: 6px;
}
.modal-content h3,
.modal-content p {
  margin-top: 15px;
  color: #eee;
}
.close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #aaa;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}
.close:hover {
  color: #eee;
}

/* === Skills Section === */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  text-align: center;
}
.skill {
  background: #222;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}
.skill:hover {
  transform: translateY(-5px);
}
.skill h3 {
  margin-bottom: 10px;
  color: #eee;
}
.skill p {
  font-size: 0.9rem;
  color: #aaa;
}
.counter {
  font-size: 2rem;
  font-weight: bold;
  color: #eee;
  margin-bottom: 5px;
}

/* === Testimonials Section === */
.testimonials .carousel {
  position: relative;
  overflow: hidden;
  max-width: 800px;
  margin: auto;
  text-align: center;
}
.testimonial {
  opacity: 0;
  transition: opacity 0.5s ease;
  padding: 20px;
}
.testimonial.active {
  opacity: 1;
}
.testimonial p {
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 10px;
  color: #ccc;
}
.testimonial h4 {
  color: #aaa;
}

/* === Contact Section === */
#contact form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 600px;
  margin: auto;
}
#contact input,
#contact textarea {
  padding: 15px;
  border: 1px solid #444;
  border-radius: 4px;
  background: #111;
  color: #eee;
}
#contact button {
  align-self: flex-start;
}

/* === Footer === */
footer {
  background: #222;
  padding: 20px 30px;
  border-top: 1px solid #333;
  color: #aaa;
  text-align: center;
}

/* === Back to Top Button === */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #444;
  color: #eee;
  border: none;
  padding: 10px 15px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  font-size: 1.5rem;
  z-index: 100;
  transition: background 0.3s ease;
}
#backToTop:hover {
  background: #666;
}

/* === Animations === */
/* Floating Animation */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-container {
    flex-direction: column;
    text-align: center;
  }
  .hero-content {
    order: 1;
    width: 100%;
  }
  .profile-image {
    order: 2;
    max-width: 300px;
  }
  .hero-content h1 {
    font-size: 2.5rem;
  }
}

/* Add fade transition */
body {
  opacity: 1;
  transition: opacity 0.5s ease;
}
body.fade-out {
  opacity: 0;
}