/* ===== GLOBAL STYLES ===== */
:root {
  --bg-color: #080808;
  --second-bg-color: #001005;
  --text-color: white;
  --main-color: #00ff51;
  --light-color: #f8f9fa;
  --dark-color: #212529;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
  font-family: "Poppins", sans-serif;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background 0.3s ease;
}

body.light-mode {
  --bg-color: #f8f9fa;
  --second-bg-color: #e9ecef;
  --text-color: #212529;
}

section {
  min-height: 100vh;
  padding: 10rem 9% 2rem;
}

.btn {
  display: inline-block;
  padding: 1rem 2.8rem;
  background-color: var(--main-color);
  box-shadow: 0 0 25px var(--main-color);
  border-radius: 3rem;
  font-size: 1.6rem;
  color: black;
  border: 2px solid transparent;
  font-weight: 600;
  transition: 0.3s ease-in-out;
  cursor: pointer;
}

.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px var(--main-color),
              0 0 50px var(--main-color),
              0 0 100px var(--main-color);
}

.heading {
  text-align: center;
  font-size: 5.6rem;
  margin: 5rem 0;
  color: var(--text-color);
}

.heading span {
  color: var(--main-color);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--main-color);
  color: var(--bg-color);
  padding: 1rem;
  z-index: 1000;
  font-size: 1.6rem;
}

.skip-link:focus {
  top: 0;
}

/* ===== LOADER ===== */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s, visibility 0.5s;
}

.loader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--main-color);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  will-change: transform;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* ===== HEADER & NAVIGATION ===== */
.header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  padding: 2rem 9%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

body.light-mode .header {
  background-color: rgba(248, 249, 250, 0.9);
}

@supports ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
  .header {
    background-color: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  body.light-mode .header {
    background-color: rgba(248, 249, 250, 0.7);
  }
}

.logo {
  font-size: 2.5rem;
  color: var(--text-color);
  font-weight: 800;
  cursor: pointer;
  transition: 0.3s ease;
}

.logo:hover {
  transform: scale(1.1);
}

.logo span {
  color: var(--main-color);
}

.navbar {
  display: flex;
}

.navbar a {
  font-size: 1.8rem;
  color: var(--text-color);
  margin-left: 4rem;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: 0.3s ease;
}

.navbar a:hover,
.navbar a.active {
  border-bottom: 3px solid var(--main-color);
  color: var(--main-color);
}

.theme-toggle {
  font-size: 2.4rem;
  color: var(--text-color);
  cursor: pointer;
  margin-left: 4rem;
  transition: 0.3s ease;
}

.theme-toggle:hover {
  color: var(--main-color);
  transform: rotate(30deg);
}

#menu-icon {
  font-size: 3.6rem;
  color: var(--main-color);
  display: none;
  cursor: pointer;
}

/* ===== HOME SECTION ===== */
.home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5rem;
}

.home .content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.home .content h1 {
  font-size: 5.6rem;
  font-weight: 700;
  margin-top: 1.5rem;
  line-height: 1.2;
}

.home .content h3 {
  font-size: 3.2rem;
  margin: 1rem 0;
}

.home .content h3 span {
  color: var(--main-color);
}

.home .content p {
  font-size: 1.6rem;
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: 2rem;
}

.home-img {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.home-img img {
  width: 32vw;
  border-radius: 50%;
  box-shadow: 0 0 25px var(--main-color);
  transition: 0.4s ease-in-out;
  animation: floatImage 4s ease-in-out infinite;
  will-change: transform;
}

@keyframes floatImage {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2.4rem);
  }
  100% {
    transform: translateY(0);
  }
}

.home-img img:hover {
  box-shadow: 0 0 25px var(--main-color),
              0 0 50px var(--main-color),
              0 0 100px var(--main-color);
}

.social-icons {
  display: flex;
  gap: 2rem;
  margin: 3rem 0;
}

.social-icons a {
  font-size: 3rem;
  padding: 1rem;
  background: transparent;
  border: 2px solid var(--main-color);
  border-radius: 50%;
  color: var(--main-color);
  transition: 0.3s ease;
}

.social-icons a:hover {
  color: var(--text-color);
  background-color: var(--main-color);
  transform: scale(1.2) translateY(-5px);
  box-shadow: 0 0 25px var(--main-color);
}

.btn-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.btn-group a:nth-of-type(2) {
  background-color: transparent;
  color: var(--main-color);
  border: 2px solid var(--main-color);
  box-shadow: none;
}

.btn-group a:nth-of-type(2):hover {
  background-color: var(--main-color);
  color: var(--bg-color);
}

/* ===== STATS SECTION ===== */
.stats {
  display: flex;
  justify-content: space-around;
  padding: 5rem 0;
  background-color: var(--second-bg-color);
}

.stat-box {
  text-align: center;
  padding: 2rem;
}

.stat-box i {
  font-size: 4rem;
  color: var(--main-color);
  margin-bottom: 1rem;
}

.stat-box .counter {
  font-size: 4rem;
  font-weight: 700;
  color: var(--main-color);
  margin: 1rem 0;
}

.stat-box p {
  font-size: 1.6rem;
  color: var(--text-color);
}

/* ===== ABOUT SECTION ===== */
.about {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5rem;
  background-color: var(--second-bg-color);
}

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

.about-img img {
  width: 32vw;
  border-radius: 50%;
  box-shadow: 0 0 25px var(--main-color);
  transition: 0.4s ease-in-out;
}

.about-img img:hover {
  box-shadow: 0 0 25px var(--main-color),
              0 0 50px var(--main-color),
              0 0 100px var(--main-color);
}

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

.about-content h2 {
  font-size: 5.6rem;
  line-height: 1.2;
}

.about-content p {
  font-size: 1.6rem;
  margin: 2rem 0 3rem;
  line-height: 1.6;
}

/* ===== SKILLS SECTION ===== */
.skills {
  background-color: var(--bg-color);
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: center;
}

.skills-category {
  flex: 1;
  min-width: 300px;
  background-color: var(--second-bg-color);
  padding: 3rem;
  border-radius: 2rem;
  box-shadow: 0 0 15px rgba(0, 255, 81, 0.1);
}

.skills-category h3 {
  font-size: 2.4rem;
  margin-bottom: 2rem;
  color: var(--main-color);
  text-align: center;
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-item i {
  font-size: 2.4rem;
  color: var(--main-color);
}

.skill-item span {
  font-size: 1.6rem;
  font-weight: 500;
}

.skill-bar {
  width: 100%;
  height: 1rem;
  background-color: var(--bg-color);
  border-radius: 1rem;
  overflow: hidden;
  margin-top: 0.5rem;
}

.skill-level {
  height: 100%;
  background-color: var(--main-color);
  border-radius: 1rem;
  transition: width 1.5s ease;
}

/* ===== SERVICES SECTION ===== */
.services {
  background-color: var(--bg-color);
}

.services h2 {
  margin-bottom: 5rem;
}

.services-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: center;
  gap: 2.5rem;
}

.service-box {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--main-color);
  height: 400px;
  border-radius: 3rem;
  cursor: pointer;
  border: 5px solid transparent;
  transition: 0.4s ease-in-out;
  color: black;
}

.service-box:hover {
  background-color: var(--second-bg-color);
  color: var(--text-color);
  border: 5px solid var(--main-color);
  transform: scale(1.03);
}

.service-info {
  display: flex;
  flex-direction: column;
  text-align: center;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

.service-info i {
  font-size: 6rem;
  margin-bottom: 2rem;
}

.service-info h4 {
  font-size: 2.8rem;
  margin: 2rem 0;
  font-weight: 800;
}

.service-info p {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.7;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio {
  background-color: var(--second-bg-color);
}

.portfolio-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.portfolio-box {
  position: relative;
  border-radius: 2rem;
  overflow: hidden;
  height: 300px;
  transition: 0.5s ease;
}

.portfolio-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s ease;
}

.portfolio-box:hover img {
  transform: scale(1.1);
}

.portfolio-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.1), var(--main-color));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 4rem;
  transform: translateY(100%);
  transition: 0.5s ease;
}

.portfolio-box:hover .portfolio-layer {
  transform: translateY(0);
}

.portfolio-layer h4 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

.portfolio-layer p {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

.tech-stack {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tech-stack span {
  background-color: rgba(0, 0, 0, 0.7);
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  font-size: 1.2rem;
}

.portfolio-layer a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 5rem;
  height: 5rem;
  background: var(--text-color);
  border-radius: 50%;
}

.portfolio-layer a i {
  font-size: 2rem;
  color: var(--bg-color);
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials {
  background-color: var(--bg-color);
}

.testimonial-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.testimonial-box {
  background-color: var(--second-bg-color);
  padding: 3rem;
  border-radius: 2rem;
  transition: 0.5s ease;
}

.testimonial-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 20px var(--main-color);
}

.client-info {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.client-info img {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--main-color);
}

.client-info h4 {
  font-size: 1.8rem;
}

.client-info span {
  font-size: 1.4rem;
  color: var(--main-color);
}

.testimonial-box p {
  font-size: 1.6rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.rating {
  color: var(--main-color);
  font-size: 1.8rem;
}

/* ===== CONTACT SECTION ===== */
.contact {
  background-color: var(--second-bg-color);
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 700px;
  margin: 1rem auto;
  text-align: left;
}

.input-group {
  display: flex;
  gap: 1.5rem;
}

.input-field {
  flex: 1;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--main-color);
}

.contact input,
.contact textarea,
.contact select {
  width: 100%;
  padding: 1.5rem;
  border-radius: 1rem;
  background-color: var(--bg-color);
  border: 2px solid var(--main-color);
  color: var(--text-color);
  font-size: 1.6rem;
  resize: none;
}

.contact .btn {
  width: fit-content;
  align-self: center;
  margin-top: 2rem;
}

.form-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.form-note {
  font-size: 1.4rem;
  color: var(--main-color);
}

/* ===== FOOTER ===== */
.footer {
  background-color: var(--bg-color);
  padding: 3rem 2rem;
  border-top: 1px solid var(--main-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-col h3 {
  font-size: 2rem;
  color: var(--main-color);
  margin-bottom: 1rem;
}

.footer-col p {
  font-size: 1.6rem;
  line-height: 1.6;
}
.footer-col p {
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--text-color); /* ✅ Add this */
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-col ul li {
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-col ul li i {
  color: var(--main-color);
}

.footer-col ul li a {
  color: var(--text-color);
  font-size: 1.6rem;
  transition: 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--main-color); /* optional hover color */
  text-decoration: underline;
}


.newsletter-form {
  display: flex;
  gap: 1rem;
}

.newsletter-form input {
  flex: 1;
  padding: 1rem;
  border-radius: 1rem;
  background-color: var(--second-bg-color);
  border: 1px solid var(--main-color);
  color: var(--text-color);
  font-size: 1.6rem;
}

.newsletter-form button {
  background-color: var(--main-color);
  color: var(--bg-color);
  border-radius: 1rem;
  padding: 0 1.5rem;
  cursor: pointer;
  transition: 0.3s ease;
}

.newsletter-form button:hover {
  transform: scale(1.1);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 255, 81, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-bottom p {
  font-size: 1.4rem;
  text-align: center;
}

.footer-legal {
  display: flex;
  gap: 2rem;
}

.footer-legal a {
  font-size: 1.4rem;
  color: var(--main-color);
  transition: 0.3s ease;
}

.footer-legal a:hover {
  text-decoration: underline;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-thumb {
  background: var(--main-color);
  border-radius: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

/* ===== BREAKPOINTS ===== */
@media (max-width: 1200px) {
  html {
    font-size: 55%;
  }
}

@media (max-width: 991px) {
  .header {
    padding: 2rem 3%;
  }
  
  section {
    padding: 10rem 3% 2rem;
  }
  
  .services {
    padding-bottom: 7rem;
  }
  
  .footer {
    padding: 2rem 3%;
  }
}

@media (max-width: 768px) {
  #menu-icon {
    display: block;
  }
  
  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 1rem 3%;
    background-color: var(--bg-color);
    border-top: .1rem solid rgba(231, 226, 226, 0.2);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
    display: none;
  }
  
  .navbar.active {
    display: flex;
    flex-direction: column;
  }
  
  .navbar a {
    display: block;
    font-size: 2rem;
    margin: 1.5rem 0;
  }
  
  .theme-toggle {
    margin-left: 0;
    margin-top: 1.5rem;
  }
  
  .home {
    flex-direction: column-reverse;
    text-align: center;
    gap: 3rem;
  }
  
  .home .content {
    align-items: center;
    text-align: center;
  }
  
  .home-img img {
    width: 60vw;
  }
  
  .about {
    flex-direction: column-reverse;
    text-align: center;
  }
  
  .about-content {
    text-align: center;
  }
  
  .about-img img {
    width: 60vw;
  }
  
  .services h2 {
    margin-bottom: 3rem;
  }
  
  .stats {
    flex-direction: column;
    gap: 3rem;
  }
  .stats {
  display: flex;      /* missing */
  justify-content: space-around;
  padding: 5rem 0;
  background-color: var(--second-bg-color);
}

  .input-group {
    flex-direction: column;
  }
}

@media (max-width: 450px) {
  html {
    font-size: 50%;
  }
  
  .home-img img,
  .about-img img {
    width: 80vw;
  }
  
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-group .btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 365px) {
  .home-img img,
  .about-img img {
    width: 90vw;
  }
  @media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
  }
}

  
  .footer {
    flex-direction: column-reverse;
  }
  
  .footer p {
    text-align: center;
    margin-top: 2rem;
  }
}