/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* Dark Theme (Default) */
:root {
  --bg: #0f172a;
  --text: #f1f5f9;
  --accent: #38bdf8;
  --card-bg: #1e293b;
}

/* Light Theme */
.light-theme {
  --bg: #ffffff;
  --text: #1e293b;
  --accent: #007bff;
  --card-bg: #f1f1f1;
}

/* ✅ Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  padding: 0.8rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid rgba(0, 0, 255, 0.15);
  box-shadow: 0 3px 8px rgba(0, 0, 255, 0.15);
  flex-wrap: wrap;
}

/* Logo */
.logo {
  font-family: 'caveat', cursive;
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--accent);
}

/* Nav Menu */
.nav-menu {
  display: flex;
}

.nav-menu ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text);
  font-weight: 1000;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s;
}

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

/* Underline effect */
.nav-menu a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  background: var(--accent);
  left: 0;
  bottom: 0;
  border-radius: 2px;
  transition: width 0.9s ease;
}

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

/* Theme Toggle */
#theme-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.3s, color 0.3s;
}

#theme-toggle:hover {
  transform: rotate(20deg) scale(1.1);
  color: var(--accent);
}

/* Navbar Scroll Fix for Light Mode */
.navbar.scrolled {
  background: #1e293b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Light Theme before scroll */
.light-theme .navbar {
  background: #ffffff;
  border-bottom: 1px solid #ddd;
}

/* Light Theme when scrolled */
.light-theme .navbar.scrolled {
  background: #1e293b;
  /* dark background after scroll */
}

.light-theme .navbar.scrolled .nav-menu a {
  color: #ffffff !important;
  /* keep links visible */
}

.light-theme .navbar.scrolled .logo {
  color: #38bdf8;
  /* accent logo color */
}


/* ✅ Responsive Navbar */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }

  .logo {
    text-align: center;
    width: 100%;
    margin-bottom: 0.5rem;
  }

  #theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
  }

  .nav-menu {
    width: 100%;
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
  }

  .nav-menu ul {
    flex-direction: row;
    gap: 2rem;
  }
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem;
  background: var(--bg);
  color: var(--text);
  min-height: 90vh;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 0 auto;
  max-width: 1100px;
}

/* Hero content */
.hero-content h1 {
  flex: 1;
  min-width: 280px;
  animation: smoothUpDown 3s ease-in-out infinite;
}

@keyframes smoothUpDown {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }

  100% {
    transform: translateY(0);
  }
}

.hero-content h1 {
  font-family: "Cinzel", serif;
  font-size: 3.8rem;
  letter-spacing: 1px;
}

.hero-content span {
  color: var(--accent);
}

.hero-content p {
  margin-top: 0.5rem;
  font-size: 1.2rem;
}

.hero .btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.8rem 1.5rem;
  background: var(--accent);
  color: #000;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
}

.hero .btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Hero image */
.hero-img {
  flex: 1;
  min-width: 280px;
  text-align: center;
}

.hero-img img {
  width: 300px;
  max-width: 100%;
  border-radius: 12px;
  /* ✅ rectangle not circle */
  border: 6px solid var(--accent);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  object-fit: cover;
  transition: transform 0.3s, box-shadow 0.3s;
}

.hero-img img:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.8);
}

/* Responsive: small screens */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
    min-height: auto;
  }

  /* Image first on small screens */
  .hero-img {
    order: -1;
    margin-bottom: 1.5rem;
  }

  .hero-content {
    order: 1;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-img img {
    width: 350px;
  }
}

/* About Section */
.about {
  padding: 4rem 2rem;
  background: var(--card-bg);
  color: var(--text);
  border-radius: 12px;
  max-width: 1100px;
  margin: auto;
}

.about-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1100px;
  margin: auto;
}

.about-img {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-img img {
  width: 400px;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  object-fit: cover;
}

.about-text {
  flex: 1;
  text-align: left;
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.about-text p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Skills Section */
.skills {
  background: var(--bg);
  color: var(--text);
  text-align: center;
  padding: 4rem 2rem;
}

.skills h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.skills-category h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.skill-card {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  font-weight: 500;
  transition: transform 0.3s, background 0.3s, color 0.3s;
  cursor: default;
}

.skill-card:hover {
  transform: translateY(-6px);
  background: var(--accent);
  color: #000;
}

/* Projects */
#projects {
  padding: 60px 20px;
  background: #1f1f1f;
  color: #fff;
  text-align: center;
}

#projects h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #00bcd4;
}

.projects-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.project-card {
  background: #2a2a2a;
  border-radius: 15px;
  overflow: hidden;
  width: 300px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-card img {
  width: 100%;
  height: 250px;
  object-fit: fill;
}

.project-card h3 {
  margin: 15px 0;
  font-size: 1.5rem;
  color: #00bcd4;
}

.project-card p {
  padding: 0 15px;
  font-size: 1rem;
  color: #ccc;
}

.project-card a {
  display: inline-block;
  margin: 15px 0 20px;
  padding: 10px 20px;
  background: #00bcd4;
  color: #000;
  font-weight: bold;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.project-card a:hover {
  background: #008ba3;
  color: #fff;
}

/* Contact */
.contact {
  background: #0f172a;
  color: #ffff;
  text-align: center;
  padding: 4rem 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.8rem;
  border: none;
  border-radius: 8px;
  outline: none;
  background: var(--card-bg);
  color: var(--text);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #94a3b8;
}

.contact-form button {
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.contact-form button:hover {
  background: #0284c7;
  /* slightly darker shade for hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.contact-form button:active {
  transform: translateY(0);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}


.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-links a {
  padding: 0.6rem 1rem;
  background: var(--card-bg);
  border-radius: 8px;
  color: var(--text);
  transition: background 0.3s;
}

.contact-links a:hover {
  background: var(--accent);
  color: #000;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
}

/* Animations */
@keyframes slideUp {
  0% {
    transform: translateY(100px);
  }

  100% {
    transform: translateY(0);
  }
}


section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #0ff, transparent);
  transform: translateX(-50%);
}
