/* CSS Resets and Variables from the video */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  outline: none;
  border: none;
}

:root {
  /* Colors used in the video */
  --background-color: #0c0c0c;
  --second-bg-color: #171717;
  --text-color: #fff;
  --main-color: #ff9900;
  /* Orange/Yellow gradient starting color */
  --orange-red: #ff3300;
  /* Orange/Red gradient ending color */
}

html {
  /* 60% of default font size (10px if default is 16px) */
  font-size: 60%;
  overflow-x: hidden;
  /* Delete every overflow on the x-axis */
  scroll-behavior: smooth;
  /* Smooth transition between sections */
}

body {
  background: var(--background-color);
  color: var(--text-color);
  font-family: 'Poppins', sans-serif;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 2rem;
}

::-webkit-scrollbar-thumb {
  background: var(--main-color);
  border-radius: 2rem;
  border: 0.5rem solid var(--background-color);
}

/* Reusable Section Styling */
section {
  min-height: 100vh;
  padding: 10rem 15% 5rem;
  /* 10rem top/bottom, 15% sides */
}

/* Heading Style */
.heading {
  text-align: center;
  font-size: 8rem;
  margin-bottom: 5rem;
}

.heading span {
  color: var(--main-color);
}

/* Button Group Styling */
.button-group {
  display: flex;
  gap: 2rem;
  margin-top: 4rem;
}

/* Default Button Style */
.btn {
  display: inline-block;
  padding: 1rem 3rem;
  background: var(--main-color);
  border-radius: 4rem;
  box-shadow: 0 0 1rem var(--main-color);
  font-size: 1.8rem;
  color: var(--background-color);
  letter-spacing: 0.1rem;
  font-weight: 600;
  transition: 0.3s ease;
  cursor: pointer;
  text-wrap: nowrap;
}

.btn:hover {
  box-shadow: 0 0 2.5rem var(--main-color);
  transform: scale(1.05);
}

/* Secondary Button Style (for Contact Me button) */
.button-group .btn:nth-child(2) {
  background: var(--background-color);
  color: var(--main-color);
  border: 0.2rem solid var(--main-color);
  box-shadow: 0 0 1rem var(--main-color);
}

.button-group .btn:nth-child(2):hover {
  background: var(--main-color);
  color: var(--background-color);
}

/* --- HEADER STYLES --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2.5rem 15%;
  background: rgba(12, 12, 12, 0.3);
  /* Transparent background */
  backdrop-filter: blur(10px);
  /* Glass effect */
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

.logo {
  font-size: 3rem;
  color: var(--text-color);
  font-weight: 800;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.logo:hover {
  transform: scale(1.05);
}

/* Gradient Text Effect for Span in Logo */
.logo span {
  background-image: linear-gradient(to right, var(--main-color), var(--orange-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar a {
  font-size: 1.8rem;
  color: var(--text-color);
  font-weight: 500;
  margin-left: 3.5rem;
  transition: 0.3s ease-in-out;
  border-bottom: 0.2rem solid transparent;
  /* Transparent border for hover effect */
}

.navbar a:hover,
.navbar a.active {
  color: var(--main-color);
  border-bottom: 0.2rem solid var(--main-color);
}

.gradient-button {
  padding: 1rem 2rem;
  border-radius: 4rem;
  font-size: 1.8rem;
  letter-spacing: 0.1rem;
  cursor: pointer;
  color: var(--text-color);
  text-wrap: nowrap;
  background-image: linear-gradient(to right, var(--main-color), var(--orange-red));
  transition: 0.3s ease-in-out;
}

.gradient-button:hover {
  transform: scale(1.05);
}

#menu-icon {
  font-size: 3.5rem;
  color: var(--main-color);
  cursor: pointer;
  display: none;
  /* Hide by default on desktop */
}

/* --- HOME SECTION STYLES --- */
.home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.home-content {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.home-content h1 {
  font-size: 7rem;
  font-weight: 700;
  line-height: 1;
  margin-top: 2rem;
}

.home-content h1 span {
  color: var(--main-color);
}

.home-content h3 {
  font-size: 3rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
}

.home-content p {
  font-size: 1.5rem;
  line-height: 1.7;
}

/* Social Icons */
.social-icons a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background: transparent;
  border: 0.2rem solid var(--main-color);
  font-size: 2rem;
  border-radius: 50%;
  color: var(--main-color);
  margin: 3rem 0.5rem 0;
  transition: 0.3s ease-in-out;
}

.social-icons a:hover {
  background: var(--main-color);
  color: var(--text-color);
  box-shadow: 0 0 1rem var(--main-color);
  transform: translateY(-0.5rem) scale(1.1);
}

/* Home Image & Glow Effect */
.home-img img {
  width: 32vw;
  /* 32% of viewport width */
  border-radius: 50%;
  box-shadow: 0 0 2.5rem var(--main-color);
  transition: 0.3s ease-in-out;
}

.home-img img:hover {
  box-shadow: 0 0 5rem var(--main-color), 0 0 10rem var(--main-color);
  /* Spreads even more */
}

/* --- ABOUT SECTION STYLES --- */
.about {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  background: var(--second-bg-color);
}

.about-img img {
  width: 32vw;
  border-radius: 50%;
  box-shadow: 0 0 2.5rem var(--main-color);
  transition: 0.3s ease-in-out;
}

.about-img img:hover {
  box-shadow: 0 0 5rem var(--main-color), 0 0 10rem var(--main-color);
}

.about-content h2 {
  text-align: left;
}

.about-content h2 span {
  color: var(--main-color);
}

.about-content p {
  font-size: 1.8rem;
  line-height: 1.7;
  margin: 2rem 0 3rem;
}

/* --- SERVICES SECTION STYLES --- */
.services {
  background: var(--background-color);
}

.services-container {
  display: grid;
  /* Auto-fit grid trick: Min 300px, Max 1fr (takes remaining space) */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  justify-content: center;
}

.service-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 60rem;
  border-radius: 2rem;
  background: var(--main-color);
  cursor: pointer;
  transition: 0.3s ease-in-out;
  border: 0.2rem solid transparent;
}

.service-box:hover {
  background: var(--second-bg-color);
  border-color: var(--main-color);
  transform: scale(1.05);
}

.service-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5rem;
}

.service-box i {
  font-size: 8rem;
  color: var(--background-color);
  margin-bottom: 2rem;
  transition: 0.3s ease-in-out;
}

.service-box:hover i {
  color: var(--main-color);
}

.service-box h4 {
  font-size: 4rem;
  margin: 2rem 0;
  color: var(--background-color);
  transition: 0.3s ease-in-out;
}

.service-box:hover h4 {
  color: var(--text-color);
}

.service-box p {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.7;
  color: var(--background-color);
  transition: 0.3s ease-in-out;
}

.service-box:hover p {
  color: var(--text-color);
}

/* --- PROJECTS SECTION STYLES --- */
.projects {
  background: var(--second-bg-color);
}

.projects-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  justify-content: center;
  align-items: center;
}

.project-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--background-color);
  border-radius: 2rem;
  border: 0.2rem solid var(--main-color);
  padding: 5rem 2rem;
  gap: 2rem;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 0 1rem var(--main-color);
  transition: 0.3s ease-in-out;
}

.project-card:hover {
  box-shadow: 0 0 3rem var(--main-color);
  transform: scale(1.02);
}

.project-card img {
  max-width: 30rem;
  border-radius: 1rem;
  object-fit: cover;
}

.project-card h3 {
  font-size: 2.5rem;
}

.project-card p {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

/* --- TESTIMONIALS SECTION STYLES --- */
.testimonials {
  background: var(--background-color);
}

.testimonials-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
  justify-content: center;
  align-items: center;
}

.testimonial-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--second-bg-color);
  border-radius: 2rem;
  border: 0.2rem solid var(--main-color);
  padding: 5rem 2rem;
  gap: 2rem;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 0 1rem var(--main-color);
  transition: 0.3s ease-in-out;
}

.testimonial-box:hover {
  box-shadow: 0 0 3rem var(--main-color);
  transform: scale(1.02);
}

.testimonial-content p {
  font-size: 1.6rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.testimonial-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-info img {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 0.2rem solid var(--main-color);
}

.testimonial-info h4 {
  font-size: 1.8rem;
  color: var(--text-color);
  margin: 0;
}

/* --- CONTACT SECTION STYLES --- */
.contact {
  background: var(--background-color);
}

.contact form {
  display: flex;
  gap: 3rem;
  margin: 5rem auto;
  text-align: center;
}

.contact form .input-group {
  flex: 1 1 45rem;
  /* Allows groups to sit side-by-side */
}

.contact form .input-group .input-box {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  margin-bottom: 3rem;
}

.contact form input,
.contact form textarea {
  width: 100%;
  padding: 1.5rem;
  font-size: 1.8rem;
  color: var(--text-color);
  background: var(--background-color);
  border-radius: 1rem;
  border: 0.2rem solid var(--main-color);
  margin-bottom: 1.5rem;
  /* Space between inputs */
}

.contact form textarea {
  resize: none;
  /* Prevent resizing */
  height: 25rem;
}

/* Custom style for the submit button to match the rest of the buttons */
.contact form .btn {
  margin-top: 2rem;
  width: 50%;
}


/* --- FOOTER STYLES --- */
.footer {
  background: var(--second-bg-color);
  padding: 5rem 0;
}

.footer .social-icons {
  text-align: center;
}

.footer .list {
  text-align: center;
  margin: 2rem 0;
}

.footer .list li {
  display: inline-block;
  margin: 0 1.5rem;
}

.footer .list li a {
  font-size: 1.6rem;
  color: var(--text-color);
  border-bottom: 0.2rem solid transparent;
  transition: 0.3s ease-in-out;
}

.footer .list li a:hover {
  color: var(--main-color);
  border-bottom-color: var(--main-color);
}

.footer .copyright {
  text-align: center;
  font-size: 1.6rem;
  margin-top: 3rem;
}

/* --- MEDIA QUERIES (Responsiveness) --- */
@media (max-width: 1200px) {

  /* General padding reduction for smaller screens */
  .header {
    padding: 2rem 5%;
  }

  section {
    padding: 10rem 5%;
  }

  /* --- HEADER RESPONSIVENESS --- */
  #menu-icon {
    display: block;
    /* Show the menu icon */
  }

  .navbar {
    position: absolute;
    top: 100%;
    /* Position below the header */
    right: 0;
    width: 50%;
    padding: 1rem 3rem;
    background: rgba(12, 12, 12, 0.8);
    /* Transparent black */
    border-bottom-left-radius: 2rem;
    border-left: 0.2rem solid var(--main-color);
    border-bottom: 0.2rem solid var(--main-color);
    display: none;
    /* Hidden by default (for mobile) */
  }

  .navbar.active {
    display: block;
    /* Show when 'active' class is added by JS */
  }

  .navbar a {
    display: block;
    /* Make links block level to stack them */
    font-size: 2rem;
    margin: 2rem 0;
  }

  .gradient-button {
    display: none;
    /* Hide the button in the navbar for mobile */
  }

  /* --- HOME RESPONSIVENESS --- */
  .home {
    flex-direction: column-reverse;
    /* Image on top, content on bottom */
    text-align: center;
    gap: 5rem;
  }

  .home-content {
    align-items: center;
    /* Center content */
    text-align: center;
  }

  .home-img img {
    width: 56vw;
    /* Image gets bigger */
  }

  /* --- ABOUT RESPONSIVENESS --- */
  .about {
    flex-direction: column-reverse;
    /* Image on top, content on bottom */
    text-align: center;
  }

  .about-content h2 {
    text-align: center;
  }

  .about-img img {
    width: 52vw;
    /* Image size */
  }

  /* --- CONTACT RESPONSIVENESS --- */
  .contact form {
    flex-direction: column;
    /* Stack input groups */
  }

  .contact form .btn {
    width: 100%;
  }
}