/* ============= Global Styles ============= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  scroll-behavior: smooth; /* Smooth scrolling */
  /* list-style: none;  */
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: black;
}

/* Use flexbox for vertical layout of body */
body {
  display: flex;
  flex-direction: column;
}


/* =============== 3D Ball Animation =============== */
/* Full-screen canvas for background animation */
canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* Place canvas behind other elements */
}
 
/* Content container positioned above the canvas */
.content-container {
  position: relative;
  z-index: 1; /* Ensure content is above the canvas */
  flex: 1;
  pointer-events: none; /* Prevent interactions */
}


/* =============== Navbar Styles =============== */
/* Fixed header at the top */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000; 
  background-color: transparent;
  padding: 0 2rem;
}

/* Logo styling */
.logo {
  font-family: "Bruno Ace SC", sans-serif;
  color: whitesmoke;
  font-size: 2.5rem;
}

/* li {
  list-style: none;
} */

/* Link styling */
a {
  text-decoration: none;
  color: whitesmoke; 
  font-size: 0.9rem;
  font-family: "Open Sans", sans-serif;
  font-weight: 300;
}
/* Navbar layout and interactive elements */
.navbar{
  width:100%;
  height:100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  pointer-events: auto;
}
.navbar .logo a {
  background: none;
  padding: 0;
  border: none;
  outline: none;
  border-radius: 0;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.navbar .links a,
.navbar .action_btn {
  color: whitesmoke;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
}

/* Hover effect for navbar links */
.navbar .links a:hover,
.navbar .action_btn:hover {
  transform: scale(1.5);
  
}
.navbar .action_btn:hover {
  transform: translateY(-50%) scale(1.5);
  
}

/* Toggle button for mobile view */
.navbar .toggle_btn{
  color: whitesmoke;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}
/* Dropdown Menu for Small Screens */
.dropdown_menu {
  display: none;
  position:absolute;
  right:2rem;
  top:60px;
  height: 0;
  width: 300px;
  background: rgba(84, 84, 84, 0.9);
  border-radius: 5px;
  overflow: hidden;
  transition: height 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
}
.dropdown_menu.open{
  height: 130px; /* Expanded height */
}
.dropdown_menu li{
  padding: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* Basic Section Styles */
section {
  min-height: auto;
  padding: 8rem 12%;
  width: 100%;
  position: relative;
}


/* =============== Intro Section =============== */
/* Centering content in the viewport */
.intro {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100vh); 
}

.intro .intro-container {
  display: flex;
  flex-direction: column;
  align-items: center; 
  justify-content: center; 
  gap: 1rem;
}

h3 {
  margin: 0px;
  color: transparent;
  font-size: 7rem;
  font-family: "Open Sans", sans-serif;  
  font-weight: bold;
  text-shadow: 0 4px 4px rgba(0, 0, 0, .25);
  text-transform: uppercase;
  text-align: center;
}

/* Text animation in the intro */
/* open source from css-text-animations https://codepen.io/SomeonePerson/pen/zYmvONQ */
#metal {background-image: url("https://images.unsplash.com/photo-1612058237353-6213b412a1c4?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=870&q=80");
  background-size: contain;
  background-clip: text;
  -webkit-background-clip: text;
  animation-name: metal;
  animation-duration: 10s;
  animation-iteration-count: infinite;}
/* Animation keyframes for #metal */
@keyframes metal {
  0% {
    background-position: 0 0;
  }
  50% {
    background-position: 200px;
  }
  100% {
    background-position: 0 0;
  }
}
  
 

/* ====================about section==================== */
#box {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
/* Centering content and applying a glassmorphism effect */
.box-section-container {
  position: relative;
  background-color: rgba(255, 255, 255, 0.1);
  height: 85vh;
  width: 85%;
  border-radius: 0;
  border: 1px solid rgb(255, 255, 255);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 80px; 
}

/* About Navbar styling */
nav {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 30px;
  animation: topIn 1s ease-out forwards;
  opacity: 0;
  animation-delay: 0.6s;
}

/* Navbar link styling */
nav a.nav-items {
  position: relative;
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
  font-weight: 300;
}
/* Hover effect for navbar links */
nav a.nav-items:hover {
  border-bottom-color: currentColor;
}
/* Active link styling */
nav a.nav-items.active {
  color: grey;
  border-bottom-color: grey;
}

/* Content container styling */
.content-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
}

/* Hiding elements */
.hidden {
  display: none;
}

/* EXPOLRE Content styling */
#about-content {
  font-family: "Open Sans", sans-serif;
  font-size: 2.5rem; 
  font-weight: 400; 
  color: hsl(230, 100%, 95%);
  text-align: center;
  width: 80%;
  line-height: 1.5;
  letter-spacing: 1px;
  animation: bottomIn 1s ease-out forwards, lights 5s 750ms linear infinite;
}

/* Styling for the about content text */
#about-content span {
  color: white;
  font-weight: 600;
}

/* SKILL Grid styling */
.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 60px;
  justify-items: center;
  align-items: center;
  width: 80%;
}
.grid-container img {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

/* Animation for showing content */
.show {
  animation: bottomIn 1s ease-out forwards;
  opacity: 0;
}
/* Animation keyframes for bottomIn */
@keyframes bottomIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0%);
    opacity: 1;
  }
}
@keyframes topIn {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0%);
    opacity: 1;
  }
}
/* Text animation for #about-content */
/*  open source from css-text-animationshttps://codepen.io/zastrow/pen/PoJmzGJ */
@keyframes lights {
  0% {
    color: hsl(230, 40%, 80%);
    text-shadow:
      0 0 1em hsla(320, 100%, 50%, 0.2),
      0 0 0.125em hsla(320, 100%, 60%, 0.3),
      -1em -0.125em 0.5em hsla(40, 100%, 60%, 0),
      1em 0.125em 0.5em hsla(200, 100%, 60%, 0);
  }
  30% { 
    color: hsl(230, 80%, 90%);
    text-shadow:
      0 0 1em hsla(320, 100%, 50%, 0.5),
      0 0 0.125em hsla(320, 100%, 60%, 0.5),
      -0.5em -0.125em 0.25em hsla(40, 100%, 60%, 0.2),
      0.5em 0.125em 0.25em hsla(200, 100%, 60%, 0.4);
  }
  40% { 
    color: hsl(230, 100%, 95%);
    text-shadow:
      0 0 1em hsla(320, 100%, 50%, 0.5),
      0 0 0.125em hsla(320, 100%, 90%, 0.5),
      -0.25em -0.125em 0.125em hsla(40, 100%, 60%, 0.2),
      0.25em 0.125em 0.125em hsla(200, 100%, 60%, 0.4);
  }
  70% {
    color: hsl(230, 80%, 90%);
    text-shadow:
      0 0 1em hsla(320, 100%, 50%, 0.5),
      0 0 0.125em hsla(320, 100%, 60%, 0.5),
      0.5em -0.125em 0.25em hsla(40, 100%, 60%, 0.2),
      -0.5em 0.125em 0.25em hsla(200, 100%, 60%, 0.4);
  }
  100% {
    color: hsl(230, 40%, 80%);
    text-shadow:
      0 0 1em hsla(320, 100%, 50%, 0.2),
      0 0 0.125em hsla(320, 100%, 60%, 0.3),
      1em -0.125em 0.5em hsla(40, 100%, 60%, 0),
      -1em 0.125em 0.5em hsla(200, 100%, 60%, 0);
  }
}

/* =================== Project Section ===================== */
/* Project button styling */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
/* Styling individual project cards */
.grid-card {
  font-family: "Open Sans", sans-serif;
  border: 1px solid white;
  border-radius: 0;
  padding: 3rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: baseline;
  justify-content: left;
  transition: 0.2s ease-in-out;
  cursor: pointer;
}
/* Hover effects for project cards */
.grid-card:hover {
  transform: scale(1.02);
  background-color: white;
  color: black;
}
.grid-card i {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.grid-card span {
  font-size: 1.5rem;
  font-weight: 500;
  background-clip: text;
  color: transparent;
}

/* Projects container styling */
.projects {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center; 
  padding-top: 200px;
}

/* Projects grid styling */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.project-card {
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
  border: 1px solid white;
  border-radius: 0;
  cursor: pointer;
  transition: 0.3s ease-in-out;
  color: white; 
  height: 600px; /* fixed height */
}
.project-card:hover {
  background-color: white;
  color: black;
  transform: translateY(-10px) scale(1.02);
}
.project-card:hover .btn {
  border: 2px solid white;
  color: black;
}
.project-card:hover .btn:hover{
  border: 2px solid white;
  background-color: white;
  color: black;
}
.project-card img {
  width: 100%;
  height: 300px; 
  border-radius: 0;
  object-fit: cover; 
}
.project-card h3 {
  font-weight: 500;
  font-size: 1.5rem;
  color: inherit;
  overflow: hidden;
  min-height: 80px; 
}

/* ==================== Footer section ===================== */
footer {
  padding: 20px;
  text-align: center;
  font-family: "Open Sans", sans-serif;
  color: grey;
  font-size: 0.7rem;
}

/*=================== responsive design ====================*/
/* Navbar adjustments for larger screens */
@media (min-width: 1030px) {
  .navbar {
    /* position: relative;
    display: flex; */
    align-items: center;
    justify-content: center; 
  }
  .navbar .links {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 2rem;
  }
  .navbar .action_btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
  }
}

/* Adjustments for medium-sized screens */
@media (max-width: 1030px) {
  .navbar .toggle_btn {
    display: block; 
  }
  .navbar .links,
  .navbar .action_btn {
    display: none; 
  }
  .dropdown_menu {
    display: block;
    left: 2rem;
    top:80px;  
    width: unset;
  }
  h3 {
    font-size: 5rem;
  }
  .intro {
    display: flex; 
    align-items: center;
    justify-content: center;
    height: calc(100vh); 
    padding: 0; 
  }
  .intro-container {
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center; 
    gap: 1rem;
  }
    #about-content {
    font-size: 2rem;
  }
  /* SKILL Grid styling */
  .grid-container img {
    width: 150px;
    height: 150px;
  }
  .grid-container {
    grid-gap: 40px;
  }
  #about-content {
    font-size: 2rem; 
  }
  .projects {
      padding-top: 100px; 
  }
}

/* Layout changes for small (mobile) screens */
@media (max-width: 768px) {
  .intro {
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(100vh); /* Full viewport height */
    padding: 0; 
  }
  .intro-container {
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center; 
    gap: 1rem;
  }
  h3 {
    font-size: 3.5rem; /* Smaller headings */
  }
  .grid {
    grid-template-columns: repeat(1, 1fr);
  }
  #about-content {
    font-size: 1.6rem; 
  }
  /* Adjusting image size for mobile */
  .grid-container img {
    width: 100px;
    height: 100px; 
  }
  .grid-container {
    grid-template-columns: 1fr;
    grid-gap: 40px;
  }
  .box-section-container {
    width: 90%;
  }
  .projects {
    padding-top: 100px; 
  }
  .project-card {
    height: 500px;
  }
  .project-card h3 {
    font-size: 1rem;
  }

}