/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Play", sans-serif;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  overflow-x: hidden;
  background: linear-gradient(90deg, #0735a1, #c1076a);
  background-size: cover;
}

/* Header */
header {
  width: 100%;
  display: flex;
  background: linear-gradient(90deg, #0735a1, #c1076a);
  color: rgb(240, 232, 220);
  position: fixed;
  top: 0;
  left: 0;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  transition: top 0.3s ease-in-out;
  z-index: 1000;
}

/* Logo & Image */
header .image {
  width: 25%;
  float: left;
  display: flex;
  width: 100px;
}

.image img {
  margin: auto;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

header h1 {
  float: left;
  width: 50%;
  color: rgb(240, 232, 220);
  text-align: center;
}

/* Navigation */
.navlinks {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 60%;
  margin-right: 22px;
}

.navlinks nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.navlinks nav ul li {
  position: relative;
  margin: 0 20px;
}

.navlinks nav ul li a {
  color: #f4f4f9;
  text-decoration: none;
  font-size: 1.375rem;
  padding: 22px 10px;
  display: inline-block;
  position: relative;
  transition: transform 0.3s ease, z-index 0.3s ease;
  z-index: 1;
}

.navlinks nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #00e1ff;
  transition: width 0.3s ease;
}

.navlinks nav ul li:hover a {
  color: #00e1ff;
  z-index: 10;
  transform: scale(1.1);
}

.navlinks nav ul li a:hover::after {
  width: 100%;
}

/* Dropdown Menu */
.navlinks .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  border-radius: 5px;
  padding: 10px 0;
  min-width: 200px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  background: rgba(0, 0, 0, 0.8);
}

.navlinks .has-submenu:hover .submenu {
  display: block;
}

.navlinks .submenu li {
  list-style: none;
}

.navlinks .submenu li a {
  color: #ffffff;
  padding: 10px 15px;
  border-radius: 5px;
  display: block;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.navlinks .submenu li a:hover {
  background-color: #c1076a;
  color: #00e1ff;
}

/* Social Media Buttons */
.social-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  align-items: center;
}

.social-buttons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: transform 0.3s ease-out;
}

.social-buttons a:hover {
  transform: scale(1.1);
}

.social-buttons a .bxl-github {
  font-size: 35px;
}

.social-buttons a .bxl-linkedin {
  font-size: 35px;
  color: #0077b5;
}

.social-buttons a:hover .bxl-linkedin {
  color: #005582;
}

/* Titles */
.title h2 {
  margin-top: 0;
  text-align: center;
  color: rgb(240, 232, 220);
  font-weight: bold;
  font-size: 3em;
  margin-bottom: 20px;
}

/* Main Section */
main {
  margin-top: 80px;
  padding: 20px;
}

/* Hamburger Menu */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  cursor: pointer;
  z-index: 1000;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #f4f4f9;
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

/* Hamburger Menu Animation */
.hamburger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Responsive Design */

/* Tablet (768px and below) */
@media (max-width: 768px) {
  .hamburger-menu {
    display: flex;
  }

  header {
    flex-direction: row;
    /* Align items in a row */
    justify-content: space-between;
    /* Add space between logo, name, and menu */
    padding: 10px;
    height: auto;
  }

  .image {
    margin-left: 0;
    width: auto;
    /* Adjust image width to fit */
  }

  header h1 {
    font-size: 1.5em;
  }

  .navlinks {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    /* Align menu to the left */
    width: auto;
    position: fixed;
    top: 80px;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
    z-index: 999;
  }

  .navlinks.active {
    align-items: center;
    display: flex;
    width: 80%;
  }

  .navlinks nav ul {
    flex-direction: row;
    /* Align menu items in a row */
  }

  .navlinks nav ul li {
    margin: 0;
  }

  .navlinks .submenu {
    position: relative;
    box-shadow: none;
  }

  .social-buttons {
    margin-top: 20px;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .hamburger-menu {
    display: flex;
  }

  header {
    flex-direction: row;
    justify-content: space-between;
    padding: 10px;
    height: auto;
  }

  .image {
    margin-left: 0;
    width: 60px;
  }

  header h1 {
    font-size: 1.5em;
    text-align: left;
  }

  .navlinks {
    display: none;
    /* Hide the navigation initially */
    flex-direction: column;
    align-items: flex-start;
    width: auto;
    position: fixed;
    top: 80px;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
    z-index: 999;
    transition: transform 0.3s ease-in-out;
  }

  .navlinks.active {
    display: flex;
    width: 80%;
    align-items: center;
  }

  .navlinks nav ul {
    flex-direction: column;
    
    align-items: center;
  }

  .navlinks nav ul li {
    margin: 0;
  }

  .navlinks .submenu {
    position: relative;
    box-shadow: none;
  }

  .social-buttons {
    align-items: center;
    margin-top: 20px;
  }

  .social-buttons a {
    width: 30px;
    height: 30px;
  }

  .social-buttons a .bxl-github,
  .social-buttons a .bxl-linkedin {
    align-items: center;
    font-size: 20px;
  }

  .title h2 {
    font-size: 1.5em;
  }

  main {
    padding: 10px;
  }

  .hamburger-menu {
    width: 25px;
    height: 15px;
  }

  .hamburger-menu span {
    height: 2px;
  }
}