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

:root {
  --bg-color: #0a0a0a;
  --second-bg-color: #1a1a1a;
  --text-color: #ffffff;
  --main-color: #00a3ff;
  --gradient-1: linear-gradient(135deg, #00a3ff 0%, #00ffa3 100%);
  --gradient-2: linear-gradient(135deg, #00ffa3 0%, #00a3ff 100%);
}

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

body {
  background: var(--bg-color);
  font-family: "Inter", sans-serif;
  color: var(--text-color);
}

html::-webkit-scrollbar {
  width: 0.8rem;
}

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

html::-webkit-scrollbar-thumb {
  background: var(--gradient-1);
}

/* preloader */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  z-index: 1000;
  opacity: 1;
  transition: opacity 1s ease;
  flex-direction: column;
}

#loader.fade {
  opacity: 0;
  pointer-events: none;
}

#loader p {
  font-size: 1rem;
}

#content {
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease;
}

#content.visible {
  visibility: visible;
  opacity: 1;
}

.header {
  position: fixed;
  top: 0;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  left: 0;
  width: 100%;
  padding: 3rem 9%;
  filter: drop-shadow(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  height: 60px;
  border-bottom: 1px solid rgba(0, 163, 255, 0.1);
}

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

.navbar a:hover,
.navbar a.active {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#menu-icon {
  font-size: 3.6rem;
  color: var(--main-color);
  display: none;
  cursor: pointer;
  position: absolute;
  right: 5%;
  transition: transform 0.3s ease;
  z-index: 1000;
}

#menu-icon:hover {
  transform: scale(1.1);
}

@media (max-width: 995px) {
  #menu-icon {
    display: block;
  }

  .navbar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    padding: 8rem 2rem;
    transition: 0.5s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-left: 2px solid var(--main-color);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  }

  .navbar.active {
    right: 0;
  }

  .navbar a {
    display: block;
    margin: 1.5rem 0;
    font-size: 2rem;
    text-align: left;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    color: var(--text-color);
  }

  .navbar a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0.2;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
  }

  .navbar a:hover::before,
  .navbar a.active::before {
    width: 100%;
    opacity: 0.2;
  }

  .navbar a:hover,
  .navbar a.active {
    transform: translateX(10px);
  }
}

@media (max-width: 768px) {
  .home {
    flex-direction: column;
    text-align: center;
    padding: 12rem 5% 5rem;
  }

  .home-content {
    order: 2;
    margin-top: 3rem;
  }

  .home-img {
    order: 1;
  }

  .img-box {
    width: 300px;
    height: 300px;
  }

  .tech-stack {
    margin-top: 2rem;
  }

  .project-container {
    grid-template-columns: 1fr;
  }

  .project-box {
    height: 300px;
  }

  .footer-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .title {
    font-size: 3.2rem;
  }

  .profession {
    font-size: 2rem;
  }

  .img-box {
    width: 250px;
    height: 250px;
  }

  .skill-box {
    padding: 1.5rem;
  }

  .skill-box h3 {
    font-size: 1.6rem;
  }

  .skill-box ul li {
    font-size: 1.4rem;
  }

  .contact-form .input-box input {
    width: 100%;
  }

  .btn {
    width: 100%;
  }
}

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

.home {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 100vh;
  padding: 12rem 10% 5rem;
  overflow: hidden;
}

.home-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(0, 163, 255, 0.15) 0%,
    rgba(0, 0, 0, 0) 50%
  );
}

.home-content {
  position: relative;
  flex: 1;
  max-width: 600px;
  z-index: 1;
}

.text-animate {
  margin-bottom: 3rem;
}

.subtitle {
  font-size: 2rem;
  font-weight: 500;
  color: #ccc;
  margin-bottom: 1rem;
}

.title {
  font-size: 5.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profession {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 2.4rem;
}

.profession-name {
  color: var(--main-color);
  font-weight: 600;
}

.description {
  font-size: 1.8rem;
  line-height: 1.7;
  color: #ccc;
  margin-bottom: 4rem;
}

.cta-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.social-links {
  display: flex;

  gap: 2rem;
}

.social-btn {
  width: 4.5rem;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 2rem;
  color: #fff;
  transition: 0.3s;
  background: rgba(0, 163, 255, 0.1);
}

.social-btn:hover {
  background: var(--gradient-1);
  border-color: transparent;
  transform: translateY(-5px);
}

.action-btns {
  display: flex;
  gap: 2rem;
}

.primary-btn,
.secondary-btn {
  padding: 1.5rem 3rem;
  font-size: 1.6rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: 8px;
  transition: 0.3s;
}

.primary-btn {
  background: var(--gradient-1);
  color: #fff;
}

.secondary-btn {
  border: 2px solid transparent;
  background: linear-gradient(var(--second-bg-color), var(--second-bg-color))
      padding-box,
    var(--gradient-1) border-box;
  color: var(--main-color);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 163, 255, 0.3);
}

.home-img {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.img-box {
  position: relative;
  width: 380px;
  height: 380px;
  margin-bottom: 1rem;
}

.img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  box-shadow: 0 0 30px rgba(0, 163, 255, 0.2);
}

.img-bg {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  background: linear-gradient(45deg, transparent, var(--main-color));
  animation: rotateShape 10s linear infinite;
  z-index: -1;
}

.tech-stack {
  position: relative;
  bottom: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.tech-item {
  width: 4rem;
  height: 4rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--main-color);
  animation: float 3s ease-in-out infinite;
}

.tech-item:nth-child(2) {
  animation-delay: 0.5s;
}
.tech-item:nth-child(3) {
  animation-delay: 1s;
}
.tech-item:nth-child(4) {
  animation-delay: 1.5s;
}

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

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Responsive Design for Home Section */
@media (max-width: 1200px) {
  .home {
    padding: 12rem 5% 5rem;
  }

  .img-box {
    width: 340px;
    height: 340px;
  }
}

@media (max-width: 991px) {
  .home {
    flex-direction: column;
    text-align: center;
    gap: 5rem;
  }

  .home-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    order: 2;
  }

  .home-img {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .title {
    font-size: 4.5rem;
  }

  .profession {
    justify-content: center;
  }

  .social-links {
    justify-content: center;
  }

  .tech-stack {
    position: relative;
    bottom: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .img-box {
    margin-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  .title {
    font-size: 3.8rem;
  }

  .profession {
    font-size: 2rem;
  }

  .action-btns {
    flex-direction: column;
  }

  .img-box {
    width: 300px;
    height: 300px;
  }
}

@media (max-width: 520px) {
  .title {
    font-size: 3.2rem;
  }

  .img-box {
    width: 260px;
    height: 260px;
  }
}

/* Common section styling */
.heading {
  text-align: center;
  font-size: 4.5rem;
  margin-bottom: 5rem;
  padding-top: 2rem;
}

.heading span {
  background: var(--gradient-2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Skills Section */
.skills-section {
  padding: 6rem 2rem;
  background: var(--bg-color);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  padding: 2rem;
}

.skill-box {
  cursor: default;
  background: var(--second-bg-color);
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 20px rgba(0, 163, 255, 0.05);
  transition: transform 0.3s ease;
}

.skill-box:hover {
  transform: translateY(-8px);
}

.skill-box h3 {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 3rem;
  margin-bottom: 2rem;
  text-align: center;
}

.skill-box ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 0;
  list-style: none;
}

.skill-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.icon-wrapper {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
  overflow: hidden;
}

.icon-wrapper img {
  max-width: 70%;
  max-height: 70%;
  transition: opacity 0.3s ease;
}

.icon-label {
  position: absolute;
  margin-top: 0.6rem;
  font-size: 1.2rem;
  color: var(--main-color);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-icon:hover .icon-label {
  opacity: 1;
}

.skill-icon:hover .icon-wrapper img {
  opacity: 0;
}

.skill-icon:hover .icon-wrapper {
  transform: scale(1.15);
  background: rgba(0, 163, 255, 0.05);
}

@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

/* Projects Section */
.project-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.project-box {
  border-radius: 1.5rem;
  overflow: hidden;
  display: flex;
  height: 400px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 163, 255, 0.1);
}

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

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

.project-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9),
    rgba(0, 163, 255, 0.1)
  );
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 0 4rem;
  opacity: 1;
  transform: translateY(100%);
  transition: opacity 0.5 ease-in-out;
  transition: 0.5s ease;
}

.project-box:hover .project-info {
  transform: translateY(0);
}

.project-info h3 {
  font-size: 2.6rem;
  margin-bottom: 1rem;
}

.project-info p {
  font-size: 1.6rem;
  margin: 1rem 0;
}

.project-links a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  background: var(--text-color);
  border-radius: 50%;
  margin: 0 0.5rem;
}

.project-links a i {
  font-size: 2rem;
  color: var(--second-bg-color);
}

.hide {
  display: none !important;
  opacity: 0;
}

.pro-button {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Contact Section */
.contact-info {
  max-width: 70rem;
  margin: 1rem auto;
  text-align: center;
  margin-bottom: 3rem;
}

.contact-info h3 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.contact-info p {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.contact-form {
  max-width: 70rem;
  margin: 1rem auto;
  text-align: center;
  margin-bottom: 3rem;
}

.contact-form .input-box {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.contact-form .input-box input,
.contact-form textarea {
  width: 100%;
  padding: 1.5rem;
  font-size: 1.6rem;
  color: var(--text-color);
  background: linear-gradient(145deg, var(--second-bg-color), #1f1f1f);
  border-radius: 0.8rem;
  margin: 0.7rem 0;
  border: 1px solid rgba(0, 163, 255, 0.1);
}

.contact-form .input-box input {
  width: 49%;
}

.contact-form textarea {
  resize: none;
}

.contact-form .input-box input:focus,
.contact-form textarea:focus {
  border-color: var(--main-color);
  box-shadow: 0 0 10px rgba(0, 163, 255, 0.2);
}

/* Button Styling */
.btn {
  cursor: pointer;
  display: inline-block;
  padding: 1.2rem 2.8rem;
  background: var(--gradient-1);
  border-radius: 4rem;
  box-shadow: 0 0 1rem var(--main-color);
  font-size: 1.6rem;
  color: var(--text-color);
  letter-spacing: 0.1rem;
  font-weight: 600;
  margin: 2rem 0;
  transition: 0.5s ease;
  border: none;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 163, 255, 0.3);
}

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3rem 9%;
  background: linear-gradient(to right, var(--second-bg-color), #1f1f1f);
  border-top: 1px solid rgba(0, 163, 255, 0.1);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-text p {
  font-size: 1.6rem;
  color: #ccc;
}

.footer-text p:first-child {
  font-size: 2rem;
  font-weight: 600;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.footer-links a,
.social-links a {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 2rem;
  color: var(--text-color);
  transition: all 0.4s ease-in;
}

.footer-links a:hover,
.social-links a:hover {
  background: var(--gradient-1);
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 163, 255, 0.3);
}

@media (max-width: 768px) {
  .footer {
    padding: 2rem 5%;
  }

  .footer-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

/* Responsive Design Additions */
@media (max-width: 1024px) {
  .project-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .contact-form .input-box input {
    width: 100%;
  }

  .skill-container {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 3rem;
  }

  .project-container {
    grid-template-columns: 1fr;
  }

  section {
    padding: 8rem 4% 5rem;
  }

  .home {
    padding-top: 10rem;
  }
}

/* Popup Styles */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.popup.active {
  display: flex;
}

.popup-content {
  background: var(--second-bg-color);
  padding: 3rem;
  border-radius: 1rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
  border: 2px solid var(--main-color);
  animation: popupIn 0.3s ease-out;
}

.popup-content i {
  font-size: 5rem;
  color: var(--main-color);
  margin-bottom: 2rem;
}

.popup-content h2 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.popup-content p {
  font-size: 1.6rem;
  margin-bottom: 2rem;
  color: #ccc;
}

.popup-close {
  background: var(--main-color);
  color: var(--text-color);
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: 0.3s;
}

.popup-close:hover {
  transform: scale(1.05);
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading Animation Styles */
.loading-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.loading-popup.active {
  display: flex;
}

.loading-content {
  background: var(--second-bg-color);
  padding: 3rem;
  border-radius: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.loading-content p {
  font-size: 1.8rem;
  color: var(--text-color);
}

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

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

/* Disable form while loading */
.contact-form.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Update submit button styles */
.contact-form .btn {
  position: relative;
  overflow: hidden;
}

.contact-form .btn.loading {
  color: transparent;
}

.contact-form .btn.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid transparent;
  border-top: 3px solid var(--text-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
