* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --primary: #4da6ff;
  --primary-dark: #1a78d4;
  --primary-light: #7ec4ff;
  --accent: #64d2ff;

  /* Dark Mode */
  --bg-dark: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.78);
  --text-muted: rgba(255, 255, 255, 0.55);
  --nav-bg: rgba(10, 10, 10, 0.95);

  /* Borders & Effects */
  --card-border: rgba(77, 166, 255, 0.15);
  --card-border-hover: rgba(77, 166, 255, 0.48);
  --glow: rgba(77, 166, 255, 0.3);
}
[data-theme="light"] {
  --primary: #1a78d4;
  --primary-light: #3b82f6;
  --accent: #1e40af;
  --bg-dark: #d0d0d0;
  --bg-card: #e0e0e0;
  --bg-card-hover: #d5d5d5;
  --text-primary: #1a1a1a;
  --text-secondary: rgba(0, 0, 0, 0.78);
  --text-muted: rgba(0, 0, 0, 0.58);
  --nav-bg: rgba(208, 208, 208, 0.97);
  --card-border: rgba(26, 120, 212, 0.22);
  --card-border-hover: rgba(26, 120, 212, 0.55);
  --glow: rgba(10, 50, 120, 0.45);
  --glow-strong: rgba(10, 60, 150, 0.65);
  --primary-glow: rgba(10, 60, 150, 0.4);
}
body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
/* ==================== NAVBAR ==================== */
.header {
  z-index: 1000;
}
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(77, 166, 255, 0.12);
  z-index: 1000;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary) !important;
  text-decoration: none;
  text-shadow: 0 0 10px var(--glow);
  letter-spacing: 0.5px;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
}
.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: rgba(77, 166, 255, 0.12);
}
/* Theme Toggle - Fixed & Beautiful */
.theme-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--card-border);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.theme-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.12);
  box-shadow: 0 0 20px rgba(77, 166, 255, 0.4);
}
.theme-btn img {
  width: 21px;
  height: 21px;
}
[data-theme="dark"] .theme-btn img {
  filter: brightness(0) invert(1);
}
/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.menu-toggle span {
  width: 26px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: 0.3s;
}
/* ==================== MAIN LAYOUT ==================== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
  flex: 1;
}
/* ==================== HERO ==================== */
.hero {
  min-height: min(62.5rem, 100svh);
  display: flex;
  align-items: center;
  padding: 130px 0 80px;
}
.hero-content {
  max-width: 720px;
}
h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.15;
}
.highlight {
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.4s ease;
  position: relative;
}
.highlight:hover {
  text-shadow: 0 0 16px rgba(77, 166, 255, 0.6);
}
.subtitle {
  font-size: 1.45rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.typed-text {
  color: var(--primary);
  font-weight: 600;
}
.cursor {
  animation: blink 1s infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
.description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 540px;
  line-height: 1.7;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}
.btn {
  padding: 14px 30px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.35s ease;
}
.primary-btn {
  background: linear-gradient(135deg, #3b82f6, var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 18px rgba(77, 166, 255, 0.28);
}
.primary-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(77, 166, 255, 0.38);
}
.secondary-btn {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--card-border);
}
.secondary-btn:hover {
  background: rgba(77, 166, 255, 0.12);
  border-color: var(--primary);
  color: var(--primary);
}
.social-links {
  display: flex;
  gap: 14px;
}
.social-link {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--card-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s ease;
}
.social-link:hover {
  background: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(77, 166, 255, 0.3);
}
/* ==================== SECTIONS ==================== */
.section {
  padding: 110px 0;
}
.section-header {
  text-align: center;
  margin-bottom: 70px;
}
.section-header h2 {
  font-size: 2.4rem;
  margin-bottom: 16px;
  font-weight: 600;
}
.underline {
  position: relative;
  width: 120px;
  height: 4px;
  background: var(--primary);
  border: none;
  overflow: visible; /*Enabled = Natural Shadow Look | Disabled = Simple Blue Underline*/
  border-radius: 4px;
  margin: 0 auto 12px;
}

.underline::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50%;
  width: 80%;
  height: 100%;
  box-shadow: 0 5px 15px 1px var(--primary);
  clip-path: inset(0px -40px -40px -40px);
}
/* ==================== ABOUT ==================== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: start;
}
.about-text h3 {
  font-size: 1.7rem;
  margin-bottom: 22px;
  color: var(--primary);
}
.about-text p {
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-size: 1.05rem;
  line-height: 1.8;
}
.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.about-card,
.skill-card,
.contact-item {
  background: var(--bg-card);
  border: 1.5px solid var(--card-border);
  border-radius: 16px;
  padding: 16px;
  transition: all 0.38s ease;
  cursor: default;
}
.about-card:hover,
.skill-card:hover,
.contact-item:hover {
  border-color: var(--card-border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}
.about-icon,
.contact-icon {
  width: 52px;
  height: 52px;
  background: rgba(77, 166, 255, 0.15);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.about-icon img,
.contact-icon img {
  width: 26px;
  height: 26px;
}
/* ==================== PROJECTS ==================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 28px;
}
.project-card {
  background: var(--bg-card);
  border: 1.5px solid var(--card-border);
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.4s ease;
}
.project-card:hover {
  border-color: var(--card-border-hover);
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
}
.project-image {
  width: 100%;
  height: auto;
  overflow: hidden;
  background: var(--bg-card-hover);
}
.project-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}
.project-card:hover .project-image img {
  transform: scale(1.08);
}
.project-info {
  padding: 26px;
}
.project-title {
  font-size: 1.28rem;
  margin-bottom: 10px;
  font-weight: 600;
}
.project-desc {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 18px;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.project-tags span {
  padding: 7px 15px;
  background: rgba(77, 166, 255, 0.1);
  border: 1px solid var(--card-border);
  border-radius: 25px;
  font-size: 0.82rem;
  color: var(--primary-light);
  transition: all 0.3s ease;
}
.project-tags span:hover {
  background: rgba(77, 166, 255, 0.22);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}
.project-divider {
  height: 1px;
  background: var(--text-muted);
  margin: 18px 0;
  opacity: 0.6;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s;
}
.project-link:hover {
  gap: 12px;
  text-shadow: 0 0 8px var(--primary);
}
.project-link svg {
  width: 18px;
  height: 18px;
}
/* ==================== SKILLS & CONTACT ==================== */
.skills-container {
  display: grid;
  gap: 60px;
}
.skill-category h3 {
  text-align: center;
  font-size: 1.35rem;
  margin-bottom: 36px;
  color: var(--text-secondary);
}
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}
.skill-card {
  width: 210px;
  text-align: center;
}
.skill-icon {
  margin-bottom: 14px;
}
.skill-icon img {
  width: 36px;
  height: 36px;
}
.skill-card span {
  font-weight: 600;
  font-size: 1.05rem;
}
/* Contact */
.contact-content {
  max-width: 600px;
}
.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}
.contact-info > p {
  color: var(--text-secondary);
  margin-bottom: 30px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid rgba(77, 166, 255, 0.15);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.contact-icon {
  width: 50px;
  height: 50px;
  background: rgba(77, 166, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-icon img {
  width: 24px;
  height: 24px;
}
.contact-item h4 {
  margin-bottom: 4px;
}
.contact-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
}
/* ==================== FOOTER ==================== */
.footer {
  text-align: center;
  padding: 70px 20px 50px;
  border-top: 1px solid rgba(77, 166, 255, 0.12);
  margin-top: auto;
}
.footer h3 {
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.footer-social {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 30px 0;
}
.copyright {
  font-size: 0.9rem;
  color: var(--text-muted);
}
/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
  .about-content {
    grid-template-columns: 1fr;
  }
  .about-cards {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 768px) {
  main {
    padding: 0 20px;
  }
  .nav-container {
    padding: 15px 20px;
  }
  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    flex-direction: column;
    padding: 80px 20px 30px;
    transform: translateY(-100%);
    opacity: 0;
    z-index: -1;
    transition: transform 0.35s ease, opacity 0.35s ease;
    gap: 12px;
  }
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    z-index: 1001;
  }
  .menu-toggle {
    display: flex;
    z-index: 1001;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-buttons .btn {
    text-align: center;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .skills-grid {
    gap: 20px;
  }
  .skill-card {
    width: calc(50% - 10px);
  }
}
