
* {
  margin: 0;
  padding: 0; /* ✅ Correct */
  box-sizing: border-box; /* ✅ Recommended for consistent spacing */
}
body {
  font-family: "Poppins", sans-serif;
  background-color: rgb(35, 35, 35);
  color: white;
  opacity: 0;
  transition: opacity 1s ease-in;
}

/* Container for consistent layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}
body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

body.fade-in {
  opacity: 1;
}

nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 5.3125rem;
  background-color: rgba(34, 34, 34, 0.536);
  padding: 0 2rem;
}
nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 2rem;
  align-items: center;
  margin: 0;
  padding: 0;
}
nav ul li {
  margin: 0;
  padding: 0;
}
nav ul li a {
  display: block; /* Change from inline-block to block */
  padding: 0.75rem 0.5rem;
  color: white;
  text-align: center;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
  line-height: 1.2;
}

nav ul li a:hover {
  color: rgb(178, 0, 0);
  font-size: 1.02rem;
  transform: scale(1.1);
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
  transition: all 0.3s ease;
}

.left {
  font-size: 1.7rem;
  font-family: "Playfair Display", serif;
}
.firstsection {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  text-align: center;
  padding-top: 6rem; /* Adjust for navbar */
  padding-bottom: 4rem;
}

.firstsection > div {
  width: 40%;
}
.firstpage {
  max-width: 800px;
  width: 100%;
  font-size: 3rem;
  line-height: 1.4;
  text-align: center;
  margin: 0 auto;
  padding: 2rem 1rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.firstpage.line {
  white-space: nowrap;
  overflow: hidden;
}
.purple {
  color: rgb(178, 0, 0);
  font-family: "Playfair Display", serif;
  font-weight: bold;
}
#element {
  color: rgb(178, 0, 0);
}
h1 {
  font-family: "Playfair Display", serif;
}

#element {
  white-space: nowrap;
  font-family: "Playfair Display", serif;
}
.redtext {
  color: rgb(178, 0, 0);
  transition: all 0.3s ease;
  cursor: default;
}
.redtext:hover {
  transform: scale(1.2);
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
}
.redtextnav {
  color: rgb(178, 0, 0);
  transition: all 0.3s ease;
  cursor: default;
}
.redtextnav:hover {
  transform: scale(1.2);
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
}
.secondsection,
.thirdsection,
.fourthsection {
  min-height: 100vh;
  padding-top: 6rem;
  flex-direction: column;
  justify-content: center;
}
.secondsection {
  width: 100%;
  margin: auto;
  background-color: rgb(32, 32, 32);
  color: white;
}
.heading h1 {
  font-size: 2rem;
  padding-left: 2rem;
  margin-bottom: 2.5rem;
  text-align: left;
  margin-left: 1.25rem;
}
.about-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.leftsection {
  flex: 1;
  font-size: 1rem;
  padding: 10px;
  padding-left: 3rem;
  text-align: left;
}
.rightsection img {
  width: 60%;
  max-width: 300px;
  height: auto;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}
@media (max-width: 768px) {
  .firstpage {
    font-size: 2rem;
  }
  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .rightsection img {
    width: 60%;
  }

  .leftsection {
    text-align: center;
  }
  nav ul li a {
    font-size: 1rem;
  }

  .heading h1 {
    text-align: center;
    margin-left: 0;
    font-size: 2rem;
  }
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .skill-card {
    height: auto;
    padding: 1.5rem 0.5rem;
  }
}
@media (min-width: 1440px) {
  .firstsection {
    margin-bottom: 8rem;
    padding: 2rem 0;
  }

  .secondsection {
    margin-top: 8rem;
    padding: 6rem 0;
  }

  .container {
    max-width: 1400px;
    padding: 0 4rem;
  }

  .about-container {
    gap: 4rem;
  }

  .heading h1 {
    margin-left: 2rem;
    font-size: 2.8rem;
  }

  .firstpage {
    font-size: 3rem;
  }
}
.thirdsection {
  padding-top: 6rem;
  width: 100%;
  margin: auto;
  background-color: rgb(35, 35, 35);
  color: white;
  text-align: center;
}
.thirdheading h1 {
  font-size: 2.5rem;
  text-align: center;
}
.thirdheading h3 {
  text-align: center;
  font-family: "Playfair Display", serif;
  color: rgb(178, 0, 0);
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1000px;
  margin: 2rem auto 0;
  padding: 1rem;
}

.skill-card {
  transform: translateZ(0);
  background-color: #1f1f1f;
  border-radius: 1rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  padding: 2rem 1rem;
  height: 150px; /* consistent height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 20px rgba(255, 0, 0, 0.4);
}

.skill-card img {
  width: 50px;
  height: 50px;
  margin-bottom: 1rem;
}

.skill-card p {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}
.fourthsection {
  padding-top: 6rem;
  width: 100%;
  margin: auto;
  background-color: rgb(32, 32, 32);
  color: white;
  height: 100vh;
  text-align: center;
}
.contact-container {
  max-width: 900px;
  margin: auto;
  padding: 2rem;
  border-radius: 12px;
}
form {
  display: flex;
  flex-direction: column;
}
form input,
form textarea {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: none;
  border-radius: 10px;
  background-color: white;
  color: black;
  resize: none;
}
form input::placeholder,
form textarea::placeholder {
  color: gray;
}
form button {
  padding: 1rem;
  background-color: rgb(178, 0, 0);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}
form button:hover {
  background-color: rgb(180, 0, 0);
}
.social-icons {
  position: fixed;
  top: 40%;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 999;
}

.social-btn {
  background-color: #e53935;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  text-align: center;
  line-height: 50px;
  font-size: 20px;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.social-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(255, 0, 0, 0.5);
  background-color: #d32f2f;
}
#custom-pointer {
  position: fixed;
  width: 10px;
  height: 10px;
  background-color: red;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}
.gesture-toggle {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  z-index: 10000;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: rgb(178, 0, 0);
}

input:checked + .slider:before {
  transform: translateX(26px);
}




