/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* ===== THEME COLORS ===== */
:root {
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --bg-dark: #0f172a;
  --card-dark: #1e293b;
  --text-light: #e2e8f0;
}

/* ===== BODY ===== */
html {
  overflow-x: hidden;
}

body {
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

/* LIGHT MODE */
body.light-mode {
  background: #f8fafc;
  color: #0f172a;
}

/* ===== SCROLL PROGRESS ===== */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: var(--primary);
  z-index: 9999;
}

/* ===== NAVBAR ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #020617, #0f172a);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transform: translateY(0);
  transition: transform 0.35s ease;
}

header.hide-nav {
  transform: translateY(-100%);
}

body.light-mode header {
  background: rgba(142, 153, 163, 0.658);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 8%;
  position: relative;
  z-index: 1001;
  transition: padding 0.3s ease;
}

.navbar.shrink {
  padding: 8px 8%;
}

.logo {
  color: var(--primary);
  font-weight: 600;
}

.navbar a,
.nav-links a,
.navbar a:link,
.navbar a:visited,
.navbar a:hover,
.navbar a:active {
  text-decoration: none !important;
  color: inherit;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 25px;
}

.nav-links a {
  position: relative;
  font-weight: 500;
  transition: 0.3s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 2px;
  background: var(--primary);
  transition: 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links .active {
  color: var(--primary);
}

.theme-item button {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

/* ===== MOBILE MENU TOGGLE ===== */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  height: 3px;
  width: 25px;
  background: currentColor;
  margin: 4px 0;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.menu-toggle.active .bar:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* ===== HERO ===== */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 80px 8%;
  gap: 40px;
  flex-wrap: wrap;
  overflow: hidden;
}

.hero-content {
  flex: 1;
}

.hero h1 {
  font-size: 42px;
}

.hero h1 span {
  color: var(--primary);
}

.hero h2 {
  margin: 10px 0;
  font-weight: 400;
}

.hero p {
  margin-top: 10px;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* ===== HERO IMAGE ===== */
.hero-image img {
  width: 300px;
  border-radius: 50%;
  border: 4px solid var(--primary);
  animation: floatUpDown 3s ease-in-out infinite;
}

@keyframes floatUpDown {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0);
  }
}

/* ===== SECTIONS ===== */
section {
  padding: 60px 8%;
}

/* ===== HIGHLIGHTS ===== */
.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}

.highlight-card {
  background: var(--card-dark);
  padding: 25px;
  border-radius: 12px;
  transition: 0.3s;
  border: 1px solid transparent;
}

body.light-mode .highlight-card {
  background: #ffffff;
}

.highlight-card:hover {
  transform: translateY(-5px);
  border: 1px solid var(--primary);
}

/* ===== WHAT I DO ===== */
.what-i-do h2 {
  margin-bottom: 30px;
}

/* ===== LEARNING ===== */
.learning {
  text-align: center;
}

/* ===== BUTTONS ===== */
.btn {
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.primary {
  background: var(--primary);
  color: #fff;
}

.primary:hover {
  background: var(--primary-dark);
}

.secondary {
  border: 1px solid var(--primary);
  color: var(--primary);
}

.secondary:hover {
  background: var(--primary);
  color: #fff;
}

/* ===== ABOUT SECTION ===== */
.about {
  padding: 90px 8%;
}

.about-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  flex-wrap: wrap;
}

.about-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.about-image img {
  width: 320px;
  border-radius: 20px;
  border: 3px solid var(--primary);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
  transition: 0.3s;
  opacity: 0;
  transform: scale(0.9);
  animation: fadeZoom 0.9s ease forwards;
}

.about-image img:hover {
  transform: scale(1.03);
}

.about-content {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-content h1 {
  font-size: 38px;
  margin-bottom: 20px;
  line-height: 1.2;
}

.about-content p {
  margin-bottom: 15px;
  opacity: 0.9;
}

.about-details {
  margin-top: 25px;
  display: grid;
  gap: 12px;
}

.about-details div {
  background: var(--card-dark);
  padding: 12px 15px;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  transition: 0.3s;
}

.about-details div:hover {
  transform: translateX(5px);
}

body.light-mode .about-details div {
  background: #ffffff;
}

.about-buttons {
  margin-top: 30px;
}

/* ===== ABOUT EXTRA ===== */
.about-extra {
  margin-top: 50px;
  padding: 0 8%;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
}

.about-extra h2 {
  font-size: 26px;
  margin-bottom: 15px;
  color: var(--primary);
}

.about-extra p {
  margin-bottom: 12px;
  opacity: 0.9;
}

.about-extra ul {
  padding-left: 20px;
}

.about-extra ul li {
  margin-bottom: 8px;
  opacity: 0.9;
}

/* ===== TOOLS ===== */
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.tools span {
  display: inline-block;
  background: var(--card-dark);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  cursor: default;
}

.tools span:hover {
  transform: translateY(-6px) scale(1.05);
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  padding: 5px 10px;
  border-radius: 8px;
}

body.light-mode .tools span {
  background: #ffffff;
}

/* ===== FOOTER ===== */
footer {
  background: linear-gradient(135deg, #020617, #0f172a);
  color: #cbd5f5;
  padding: 60px 20px 25px;
  margin-top: 50px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

footer::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 250px;
  height: 250px;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.15),
    transparent 70%
  );
  filter: blur(60px);
  z-index: 0;
}

/* Light mode footer — same dark background on ALL screen sizes */
body.light-mode footer {
  background: linear-gradient(135deg, #020617, #0f172a);
  color: #cbd5f5;
}

footer h3 {
  color: #ffffff;
  margin-bottom: 15px;
  font-size: 18px;
  letter-spacing: 0.5px;
  text-align: center;
}

footer h3.con {
  text-align: left;
}

body.light-mode footer h3 {
  color: #ffffff;
}

.footer-container {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.footer-container h3.con {
  text-align: left !important;
}

.footer-contact p {
  font-size: 14px;
  margin-bottom: 10px;
  opacity: 0.85;
  transition: 0.3s;
}

.footer-contact p:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.footer-contact i {
  margin-right: 10px;
  color: var(--primary);
}

.footer-mail {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
}

.footer-mail:hover {
  color: var(--primary);
  text-decoration: underline;
}

body.light-mode .footer-mail:hover {
  color: var(--primary);
}

.footer-social a {
  display: inline-block;
  margin-right: 14px;
  font-size: 26px;
  color: #94a3b8;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  color: var(--primary);
  transform: translateY(-4px) scale(1.1);
}

body.light-mode .footer-social a {
  color: #94a3b8;
}

body.light-mode .footer-social a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 15px;
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.7;
  letter-spacing: 0.3px;
}

body.light-mode .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 25px;
  right: 25px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.whatsapp-float img {
  width: 35px;
  height: 35px;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* ===== ANIMATION SYSTEM ===== */
.animate {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  will-change: opacity, transform;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeZoom {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.delay-1 {
  animation-delay: 0.1s;
}
.delay-2 {
  animation-delay: 0.2s;
}
.delay-3 {
  animation-delay: 0.3s;
}
.delay-4 {
  animation-delay: 0.4s;
}

/* ===== TYPEWRITER ===== */
.slide-in-h1 {
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  opacity: 1;
  animation: typewriter 3s steps(30) 0.3s infinite alternate;
}

@keyframes typewriter {
  0% {
    width: 0;
  }
  100% {
    width: 100%;
  }
}

/* ===== TABLET: 769px – 1024px ===== */
@media (max-width: 1024px) {
  header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
  }

  .hero {
    padding: 60px 6%;
    gap: 30px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .about {
    padding: 70px 6%;
  }

  .about-container {
    gap: 40px;
  }

  .navbar {
    padding: 15px 5%;
  }

  .highlights {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== MOBILE: ≤ 768px ===== */
@media (max-width: 768px) {
  header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
  }

  body {
    padding-top: 70px;
  }

  body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    touch-action: none;
  }

  /* Navbar */
  .menu-toggle {
    display: flex;
    position: relative;
    z-index: 1005;
  }

  .theme-item {
    position: absolute;
    top: 25px;
    left: 20px;
    z-index: 1003;
  }

  .theme-item button {
    font-size: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
  }

  /* Full screen menu */
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    display: none;
    z-index: 1004;
  }

  body.light-mode .nav-links {
    background: rgba(255, 255, 255, 0.98);
  }

  .nav-links.active {
    display: flex;
    animation: menuFade 0.3s ease;
  }

  .nav-links a {
    font-size: 22px;
    font-weight: 500;
  }

  @keyframes menuFade {
    from {
      opacity: 0;
      transform: scale(1.05);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  /* Hero */
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 25px;
  }

  .hero-image {
    order: -1;
  }

  .hero-content {
    order: 1;
  }

  .hero-image img {
    width: 220px;
  }

  .hero-buttons {
    justify-content: center;
    gap: 10px;
  }

  /* Highlights */
  .highlights {
    grid-template-columns: 1fr;
  }

  /* About */
  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .about-image img {
    width: 230px;
  }

  .about-extra {
    padding: 0 5%;
    text-align: center;
  }

  .about-details {
    text-align: left;
  }

  .tools {
    justify-content: center;
  }

  /* Footer */
  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-container h3.con {
    text-align: center !important;
  }

  .footer-contact {
    text-align: center;
  }

  .footer-contact p:hover {
    transform: none;
  }

  /* WhatsApp */
  .whatsapp-float {
    z-index: 10;
  }

  .nav-links.active ~ .whatsapp-float {
    display: none;
  }

  .slide-in-h1 {
    display: inline-block; /* <-- Add this */
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    animation: typing 8s steps(25, end) infinite;
  }

  @keyframes typing {
    0% {
      width: 0;
    }

    40% {
      width: 15ch;
    }

    60% {
      width: 15ch;
    }

    100% {
      width: 0;
    }
  }
}

/* ===== SMALL PHONES: ≤ 480px ===== */
@media (max-width: 480px) {
  header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero h2 {
    font-size: 16px;
  }

  .hero-image img {
    width: 180px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  section {
    padding: 40px 5%;
  }

  .about {
    padding: 50px 5%;
  }

  .about-image img {
    width: 190px;
  }

  .about-content h1 {
    font-size: 28px;
  }

  .logo {
    font-size: 15px;
  }

  .footer-container {
    gap: 25px;
  }

  .footer-social a {
    font-size: 22px;
    margin-right: 10px;
  }
}
