/* Reset basic styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Body */
body {
  font-family: 'Poppins', sans-serif;
  background-color: #121212;
  color: #ffffff;
  line-height: 1.6;
}

/* Loading Screen Wrapper */
#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #121212;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: Arial, sans-serif;
  z-index: 9999;
}

/* Loader Styling */
.loader {
  position: relative;
  transform: rotateZ(45deg);
  perspective: 1000px;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  color: #c0450c;
}

.loader:before,
.loader:after {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform: rotateX(70deg);
  animation: spin 1s linear infinite;
  box-sizing: border-box;
}

.loader:after {
  color: #624b97;
  transform: rotateY(70deg);
  animation-delay: 0.4s;
}

/* Spinner Animation */
@keyframes spin {
  0%, 100% {
    box-shadow: 0.2em 0 0 0 currentColor;
  }
  12% {
    box-shadow: 0.2em 0.2em 0 0 currentColor;
  }
  25% {
    box-shadow: 0 0.2em 0 0 currentColor;
  }
  37% {
    box-shadow: -0.2em 0.2em 0 0 currentColor;
  }
  50% {
    box-shadow: -0.2em 0 0 0 currentColor;
  }
  62% {
    box-shadow: -0.2em -0.2em 0 0 currentColor;
  }
  75% {
    box-shadow: 0 -0.2em 0 0 currentColor;
  }
  87% {
    box-shadow: 0.2em -0.2em 0 0 currentColor;
  }
}

/* Optional: Loading Text */
#loading p {
  margin-top: 1em;
  font-size: 1.1em;
  letter-spacing: 1px;
}
/* Hero Section */
#hero {
  height: 100vh;
  width: 100%;
  background: url('assets/images/background.jpg') no-repeat center center/cover;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* Darker overlay for better text visibility */
#hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* <- increased from 0.4 to 0.6 */
  z-index: 1;
}

/* Make sure hero content is above the overlay */
.hero-content {
  position: relative;
  z-index: 2;
}

/* Profile picture styling */
.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 4px solid white;
}

/* Heading styling with shadow */
h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8); /* <- added text shadow */
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8); /* <- added text shadow */
}

/* Button styling */
.btn {
  background-color: #00bcd4;
  padding: 10px 20px;
  color: #fff;
  text-decoration: none;
  border-radius: 25px; /* <- slightly rounder button */
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #0288d1;
}

/* About Section */
#about {
  padding: 50px 20px;
  text-align: center;
  background-color: #1e1e1e;
}

/* Portfolio Section */
#portfolio {
  padding: 50px 20px;
  text-align: center;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Ensure responsive grid */
  gap: 20px;
  margin-top: 30px;
}

.portfolio-item {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #222;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.portfolio-item video {
  width: 100%;
  border-radius: 10px;
  margin-top: 20px;
  max-height: 300px;
}

/* Image Gallery Styling */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Two images side by side */
  gap: 10px;
  margin-bottom: 20px;
  width: 100%;
}

.gallery-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover; /* Ensures image covers area without distortion */
  border-radius: 8px;
  transition: transform 0.3s ease-in-out;
}

.gallery-image:hover {
  transform: scale(1.05); /* Slight zoom effect on hover */
}

/* Video Gallery Styling */
.video-gallery {
  width: 100%;
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.video-gallery video {
  width: 100%;
  max-height: 300px;
  border-radius: 8px;
  object-fit: cover;
}

video {
  width: 48%;
  border-radius: 8px;
}

/* Scroll to Top Button */
#scrollTopBtn {
  display: none; /* Initially hidden */
  position: fixed;
  bottom: 30px; /* Distance from the bottom */
  right: 30px;  /* Distance from the right */
  z-index: 9999; /* Ensure button stays on top */
  width: 60px;  /* Set a fixed width for the round button */
  height: 60px; /* Set a fixed height for the round button */
  border-radius: 50%; /* Makes the button round */
  font-size: 28px; /* Increase font size for the icon */
  border: none;
  outline: none;
  background-color: #00bcd4; /* Background color */
  color: white;
  display: flex; /* Flexbox for centering the icon */
  justify-content: center; /* Center the icon horizontally */
  align-items: center; /* Center the icon vertically */
  cursor: pointer;
  transition: background-color 0.3s ease; /* Smooth background color change on hover */
}

#scrollTopBtn:hover {
  background-color: #0288d1; /* Change color on hover */
}

/* Optional: Add an icon for the scroll-to-top button */
#scrollTopBtn::before {
  content: '↑'; /* Use an arrow symbol or add any icon */
  font-size: 30px; /* Adjust icon size */
  font-weight: bold;
}

/* My Socials Section */
#my-socials {
  padding: 50px 20px;
  background-color: #121212; /* Slightly darker than #1e1e1e for contrast */
  text-align: center;
  color: #ffffff;
  border-top: 2px solid #00bcd4;
}

#my-socials h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  font-weight: bold;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.social-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.social-button {
  background-color: #00bcd4;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 188, 212, 0.3);
}

.social-button:hover {
  background-color: #0288d1;
  transform: scale(1.05);
}

.social-button:active {
  background-color: #004c8c;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  #contact h2 {
    font-size: 1.5rem;
  }

  .social-links a {
    font-size: 1rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .profile-pic {
    width: 120px;
    height: 120px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr; /* Stack portfolio items in one column */
  }

  .image-gallery {
    grid-template-columns: repeat(2, 1fr); /* Show two images side by side */
  }

  .video-gallery {
    flex-direction: column; /* Stack videos vertically */
  }

  video {
    width: 100%; /* Full-width videos on smaller screens */
  }
}

@media screen and (max-width: 480px) {
  .btn {
    padding: 8px 16px;
  }

  .portfolio-item {
    padding: 15px;
  }

  #scrollTopBtn {
    width: 50px;
    height: 50px;
    font-size: 24px; /* Smaller button on smaller screens */
  }
}
