* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
   overflow-x: hidden;
  background: #0f172a;
  color: #fff;
}

html {
  scroll-behavior: smooth;
}


/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 15px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  transition: 
    background 0.4s ease,
    box-shadow 0.4s ease,
    padding 0.4s ease;
  z-index: 1000;
}


#navbar.scrolled {
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
  padding: 10px 60px;
}


.logo {
  font-size: 24px;
  font-weight: bold;
  color: #38bdf8;
}

.nav-links a {
  margin-left: 25px;
  color: #fff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 30px;
  transition: 0.3s;
}

.nav-links a:hover {
  background: linear-gradient(45deg, #38bdf8, #9333ea);
}

.nav-links {
  display: flex;
  align-items: center;
}


/* ===== HAMBURGER MENU ===== */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 5px;
  transition: 0.4s;
}

/* Active hamburger animation */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}


/* ===== SECTIONS ===== */
.section {
  min-height: 100vh;
  scroll-margin-top: 90px;
  padding: 120px 8%;
  text-align: center;
}


.section-title {
  font-size: 40px;
  margin-bottom: 40px;
  color: #38bdf8;
}

/* ===== HOME ===== */
.home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-content {
  max-width: 50%;
  text-align: left;
}

.home-content h1 span {
  color: #38bdf8;
}

.home-buttons {
  margin-top: 20px;
}

.btn {
  padding: 12px 28px;
  margin-right: 15px;
  border-radius: 30px;
  background: linear-gradient(45deg, #38bdf8, #9333ea);
  color: #fff;
  text-decoration: none;
  transition: 0.3s;
}

.btn:hover {
  transform: scale(1.1);
}

.secondary {
  background: transparent;
  border: 2px solid #38bdf8;
}

.social-icons {
  margin-top: 25px;
}

.social-icons a {
  font-size: 28px;
  margin-right: 20px;
  color: #38bdf8;
  transition: 0.3s;
}

.social-icons a:hover {
  color: #9333ea;
  transform: scale(1.3);
}

/* ===== PROFILE IMAGE ===== */
.profile-3d {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  padding: 8px;
  background: linear-gradient(135deg, #38bdf8, #9333ea);
  box-shadow:
    0 15px 40px rgba(0,0,0,0.6),
    0 0 25px rgba(56,189,248,0.35);
  animation: float 4.5s ease-in-out infinite, glow 6s ease-in-out infinite;

}

.profile-3d img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}


.profile-3d:hover {
  box-shadow:
    0 30px 60px rgba(0,0,0,0.9),
    0 0 30px rgba(56,189,248,0.6);
}

/* ===== ABOUT SECTION ===== */
.about-container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text p {
  margin-bottom: 18px;
  line-height: 1.7;
  color: #cbd5f5;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s ease forwards;
}

.about-text p:nth-child(2) { animation-delay: 0.2s; }
.about-text p:nth-child(3) { animation-delay: 0.4s; }
.about-text p:nth-child(4) { animation-delay: 0.6s; }

.about-highlights {
  display: grid;
  gap: 25px;
}

.highlight-box {
  background: linear-gradient(145deg, #020617, #0f172a);
  padding: 30px;
  border-radius: 22px;
  text-align: center;
  box-shadow:
    0 20px 50px rgba(0,0,0,0.6),
    0 0 20px rgba(56,189,248,0.2);
  transition: transform 0.4s ease;
}

.highlight-box:hover {
  transform: translateY(-10px) scale(1.05);
}

.highlight-box h3 {
  font-size: 40px;
  color: #38bdf8;
}

.highlight-box span {
  color: #94a3b8;
}

/* Fade-up animation */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 900px) {
  .about-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
}


/* ===== SKILLS ===== */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 25px;
}

.skill {
  background: #1e293b;
  padding: 25px;
  border-radius: 20px;
  transition: 0.4s;
}

.skill i {
  font-size: 40px;
  color: #38bdf8;
}

.skill:hover {
  transform: scale(1.1);
  background: linear-gradient(45deg, #38bdf8, #9333ea);
}

/* ===== PROJECTS ===== */
.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.project-card {
  background: #1e293b;
  padding: 30px;
  border-radius: 20px;
  text-decoration: none;
  color: #fff;
  transition: 0.4s;
}

.project-card:hover {
  transform: scale(1.08);
  background: linear-gradient(45deg, #38bdf8, #9333ea);
}

/* ===== Project Button ===== */
.project-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 22px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;

  color: #fff;
  background: linear-gradient(135deg, #38bdf8, #6366f1);

  transition: 0.3s ease;
  box-shadow: 0 0 0 rgba(56,189,248,0.6);
}

/* Hover animation */
.project-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 18px rgba(56,189,248,0.8);
}

/* Click effect */
.project-btn:active {
  transform: scale(0.95);
}

@media (max-width: 600px) {
  .project-btn {
    text-align: center;
  }
}



/* ===== CONTACT SECTION ===== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  margin-top: 40px;
}

/* Left info card */
.contact-info {
  text-align: left;
  animation: fadeSlideLeft 1s ease forwards;
}

.contact-info h3 {
  font-size: 28px;
  margin-bottom: 15px;
  color: #38bdf8;
}

.contact-info p {
  color: #cbd5f5;
  line-height: 1.6;
}

.contact-email {
  margin-top: 20px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #38bdf8;
}

/* Contact form card */
.contact-form {
  background: linear-gradient(145deg, #020617, #0f172a);
  padding: 40px;
  border-radius: 25px;
  box-shadow:
    0 30px 60px rgba(0,0,0,0.7),
    0 0 25px rgba(56,189,248,0.3);
  animation: float 4.5s ease-in-out infinite;
}

/* Inputs */
.input-group {
  position: relative;
  margin-bottom: 30px;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 2px solid #334155;
  border-radius: 12px;
  color: #fff;
  outline: none;
  transition: 0.3s;
}

.input-group textarea {
  resize: none;
  height: 120px;
}

.input-group label {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  transition: 0.3s;
  background: #020617;
  padding: 0 6px;
}

/* Floating label effect */
.input-group input:focus,
.input-group textarea:focus {
  border-color: #38bdf8;
}

.input-group input:focus + label,
.input-group textarea:focus + label,
.input-group input:valid + label,
.input-group textarea:valid + label {
  top: -8px;
  font-size: 12px;
  color: #38bdf8;
}

/* Button */
.contact-btn {
  width: 100%;
  cursor: pointer;
}

.contact-btn:hover {
  transform: scale(1.05);
}

.contact-form.shake {
  animation: shake 0.4s;
}

/* Animations */
@keyframes fadeSlideLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive */
@media (max-width: 900px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .contact-info {
    text-align: center;
  }
}

/* ===== Loading Spinner ===== */
.contact-btn {
  position: relative;
  overflow-x: hidden;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top: 3px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
  margin: auto;
}

.contact-btn.loading .btn-text {
  display: none;
}

.contact-btn.loading .spinner {
  display: inline-block;
}

.contact-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

/* Spinner animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


.form-message {
  margin-top: 15px;
  font-size: 16px;
  opacity: 0;
  transition: 0.4s;
}

.form-message.success {
  color: #22c55e;
  opacity: 1;
}

.form-message.error {
  color: #ef4444;
  opacity: 1;
}

/* Shake animation for error */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-6px); }
}




/* ===== FOOTER POLISH ===== */
.footer {
  background: linear-gradient(145deg, #020617, #020617);
  padding: 35px;
  text-align: center;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.6);
  animation: footerUp 1s ease forwards;
}

.footer p {
  margin: 8px 0;
  color: #94a3b8;
  transition: 0.3s;
}

.footer p:hover {
  color: #38bdf8;
  text-shadow: 0 0 12px rgba(56,189,248,0.7);
}

/* Footer entrance */
@keyframes footerUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.cursor {
  color: #38bdf8;
  font-weight: bold;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes glow {
  0% {
    box-shadow:
      0 15px 40px rgba(0,0,0,0.6),
      0 0 20px rgba(56,189,248,0.3);
  }
  50% {
    box-shadow:
      0 25px 60px rgba(0,0,0,0.8),
      0 0 35px rgba(147,51,234,0.5);
  }
  100% {
    box-shadow:
      0 15px 40px rgba(0,0,0,0.6),
      0 0 20px rgba(56,189,248,0.3);
  }
}

/* ===== RESPONSIVE FIX ===== */
@media (max-width: 1024px) {
  .home-content {
    max-width: 55%;
  }
}


@media (max-width: 600px) {
  .section {
    padding: 100px 5%;
  }

  h1 {
    font-size: 30px;
  }

  h3 {
    font-size: 20px;
  }

  p {
    font-size: 15px;
  }

  .btn {
    padding: 10px 22px;
    font-size: 14px;
  }

  .profile-3d {
    width: 190px;
    height: 190px;
  }

  .contact-form {
    animation: none;
  }
}

@media (max-width: 900px) {

  /* Navbar */
  .hamburger {
    display: flex;
    position: relative;
    z-index: 1300;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: #020617;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;

    transform: translateY(-100%);
    transition: transform 0.4s ease;
    z-index: 1200;
  }

  .nav-links.active {
    transform: translateY(0);
  }

  .nav-links a {
    font-size: 22px;
  }

  /* Sections */
  .section {
    padding: 110px 6%;
  }

  /* Home */
  .home {
    flex-direction: column-reverse;
    text-align: center;
    gap: 40px;
    justify-content: center;
  }

  .home-content {
    max-width: 100%;
    text-align: center;
  }

  .home-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
  }

  .social-icons {
    justify-content: center;
  }

  .profile-3d {
    width: 220px;
    height: 220px;
  }

  .section-title {
    font-size: 32px;
  }

  /* Contact */
  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .contact-info {
    text-align: center;
  }
}
