* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style-type: none;
  text-decoration: none;
}

body {
  font-family: 'Inter', sans-serif;
}

:root {
  --main_title_color: white;
  --main_title_size: clamp(3.5rem, 8vw, 4.5rem);
  --h3_font_size: 2.5rem;
  --h3_font_color: #003049;
  --h4_font_size: clamp(1.5rem, 8vw, 2rem);
  --h4_font_color: white;
  --h5_font_size: clamp(1.25rem, 4vw, 1.5rem);
  --tags_font_size: 0.9rem;
  --tags_font_color: white;
  --regular_text_font_size: clamp(1rem, 3vw, 1.25rem);
  --regular_text_font_color: white;
  --button_font_size: 1.06rem;
  --button_font_color: white;
  --list_item_font_size: 1.38rem;
  --list_item_font_color: white;
  --rubik_font_style: 'Rubik', sans-serif;
}

/* Basic text styling */
.text_styles h1 {
  font-size: var(--main_title_size);
  color: var(--main_title_color);
  font-family: var(--rubik_font_style);
  margin-bottom: 2rem;
}

.text_styles h3 {
  font-size: var(--h3_font_size);
  color: var(--h3_font_color);
  font-family: var(--rubik_font_style);
}

.text_styles h4 {
  font-size: var(--h4_font_size);
  color: var(--h4_font_color);
  font-weight: normal;
}

.text_styles h5 {
  font-size: var(--h5_font_size);
  color: white;
  font-weight: normal;
}

.text_styles p {
  font-size: var(--regular_text_font_size);
  color: var(--regular_text_font_color);
}

.text_styles ul li {
  font-size: var(--list_item_font_size);
  color: var(--list_item_font_color);
}

.text_styles a {
  font-size: var(--button_font_size);
  color: var(--button_font_color);
}

.skills.text_styles ul li {
  font-size: var(--list_item_font_size);
  color: var(--list_item_font_color);
}

/* Web page Header CSS Styles */

.nav-bar {
  display: flex;
  position: relative;
  justify-content: space-between;
  align-items: center;
  background-color: #022435;
  padding: 0 2rem;
  z-index: 1;
}

.nav_title {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 1rem;
}

.nav_title * {
  color: white;
  display: block;
}

.nav_title.active {
  display: none;
}

.nav_title:hover {
  transform: translateY(-5px);
  transition: transform 0.3s;
  transition-timing-function: ease-out;
}

#mail-icon {
  margin-left: 1rem;
}

.nav-item a:hover #mail-icon {
  transition: transform 1s;
  transition-timing-function: ease-in-out;
  transform: rotate(360deg);
}

.nav-menu {
  display: none;
  flex-direction: column;
  padding: 0;
  width: 80%;
  height: 100vh;
  margin: 3rem auto;
  text-align: left;
}

.nav-menu.active {
  display: flex;
}

.nav-item {
  list-style: none;
}

.nav-item a {
  font-size: 1.5rem;
  font-weight: bold;
  display: block;
  color: white;
  padding: 1.5rem;
}

.nav-item a:hover {
  background-color: #003a57;
  transform: translateY(-5px);
  transition: transform 0.3s;
  transition-timing-function: ease-out;
  box-shadow: 0 0.5em 0.5em -0.4em #26aa5b;
}

.toggle-button {
  position: absolute;
  right: 2rem;
  top: 1rem;
  height: 2rem;
}

.close-button {
  position: absolute;
  display: none;
  right: 2rem;
  top: 1rem;
  height: 2rem;
}

.hide {
  display: none;
}

.show {
  display: flex;
}

.toggle-button:hover {
  transform: translateY(-5px);
  transition: transform 0.3s;
  transition-timing-function: ease-out;
}

/**** Media Query ****/
@media (min-width: 768px) {
  .nav-menu {
    display: flex;
    flex-direction: row;
    height: fit-content;
    width: auto;
    margin: 0;
  }

  .nav-menu li {
    text-align: center;
    border-bottom: none;
  }

  .nav-item a {
    font-size: 1rem;
    font-weight: normal;
  }

  .toggle-button {
    display: none;
  }

  .close-button {
    display: none;
  }
}

/****** Hero Section ********/

.background {
  background-color: #003049;
  background-image: url("../images/Main_Background.svg");
  background-size: contain;
  background-repeat: no-repeat;
  height: fit-content;
  overflow: hidden;
  position: relative;
}

.main-section {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 8rem 1rem;
  position: relative;
}

#Social_Media_Icons {
  display: flex;
  flex-direction: row;
  margin-top: 1rem;
  width: 20px;
  justify-content: flex-start;
  gap: 2rem;
}

#Social_Media_Icons a {
  width: 20px;
}

#hero_image {
  max-width: 50%;
  position: absolute;
  bottom: 50%;
  left: 60%;
}

#down-arrow {
  animation: bounce 1.65s infinite;
  position: absolute;
  top: 80%;
  left: 50%;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0); /* No vertical movement at these keyframes */
  }

  40% {
    transform: translateY(-20px); /* Bounce up by 20 pixels at 40% keyframe */
  }

  60% {
    transform: translateY(-10px); /* Bounce up by 10 pixels at 60% keyframe */
  }
}

/************** Media Queries *************/
@media (min-width: 768px) {
  .main-section {
    flex-direction: row;
    align-items: center;
  }

  #hero_image {
    position: initial;
  }

  #Social_Media_Icons {
    display: flex;
    flex-direction: column;
    order: -1;
    margin-right: 3rem;
    justify-content: space-around;
    height: 200px;
  }
}

/* PROJECTS SECTION - GRID LAYOUT */

.my_work {
  padding: 8.13rem 1rem;
}

.works_title {
  display: flex;
  flex-direction: column;
  margin-bottom: 3.25rem;
  text-align: center;
}

#top_line {
  display: block;
  width: 100%;
  border-bottom: solid 2px #091e42;
  margin: 4rem auto;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(327px, 1fr));
  grid-gap: 2rem;
}

.project-button {
  background-color: #06a646;
  padding: 0.75rem;
  font-weight: bold;
  display: block;
  width: fit-content;
  border-radius: 5%;
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-button:hover {
  box-shadow: 0 0.5em 0.5em -0.4em #06a646;
  transform: translateY(-0.2em);
  cursor: pointer;
}

/* Featured project card */
.featured_project {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

#featured_img {
  width: 100%;
  margin-bottom: 2rem;
}

.main_card {
  width: 100%;
  order: 1;
  margin: 0 auto;
  max-height: 423px;
  min-height: 405px;
}

.main_card p {
  margin-bottom: 2rem;
  color: #091e42;
}

.main_card h3 {
  font-family: var(--rubik_font_style);
  margin-bottom: 1rem;
}

#tags_featured {
  display: flex;
  flex-direction: row;
  justify-content: left;
  margin-bottom: 2rem;
}

#tags_featured > li {
  padding: 8px;
  color: #091e42;
  border: solid 1px #091e42;
  margin-right: 5px;
}

@media (min-width: 768px) {
  .my_work {
    padding: 8.13rem 4rem;
  }

  .featured_project {
    flex-direction: row;
  }

  .main_card {
    width: 40%;
  }

  #featured_img {
    max-width: 50%;
    margin-bottom: 0;
  }

  .works_title {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    text-align: left;
  }

  #top_line {
    width: 62%;
    margin: 0;
  }
}

/* Regular cards */

.card_content {
  background: linear-gradient(to right bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
  padding: 8rem 1rem 1rem 1rem;
}

.card_content > h4 {
  font-weight: bold;
  font-family: var(--rubik_font_style);
  margin-bottom: 1rem;
}

.card_content > p {
  margin-bottom: 2rem;
}

.card_content > ul {
  display: flex;
  flex-direction: row;
  justify-content: left;
  margin-bottom: 2rem;
}

/* stylelint-disable-next-line no-descending-specificity */
.tags {
  background-color: rgba(255, 255, 255, 0.24);
  padding: 8px;
  margin-right: 5px;
}

.popup_container {
  position: fixed;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  top: 8%;
  height: fit-content;
  width: 100%;
  margin: 0;
  padding: 2rem;
  background: white;
}

.popup_header {
  order: -1;
  width: 100%;
}

.popup_header h4,
.popup_header h3 {
  font-family: var(--rubik_font_style);
  color: #091e42;
  margin-bottom: 1rem;
}

.popup_header ul {
  display: flex;
  flex-direction: row;
  justify-content: left;
  margin-bottom: 2rem;
}

.popup_header .tags {
  color: #091e42;
}

/* stylelint-disable-next-line no-descending-specificity */
.popup_container li {
  padding: 8px;
  border: solid 1px #091e42;
  margin-right: 5px;
}

.popup_container > img {
  width: 100%;
  order: -1;
  height: 300px;
}

.popup_info {
  width: 100%;
  margin-top: 2rem;
}

/* stylelint-disable-next-line no-descending-specificity */
.popup_info a {
  display: inline-block;
  margin-right: 1rem;
}

.popup_info p {
  color: #091e42;
  margin-bottom: 2rem;
}

#close_btn {
  width: 50px;
  height: 50px;
  position: absolute;
  top: 2%;
  right: 2%;
}

#close_btn:hover {
  cursor: pointer;
}

@media (min-width: 768px) {
  .popup_container {
    flex-direction: row;
    width: 90%;
    margin: 0 5%;
  }

  .popup_container > img {
    width: 50%;
  }

  .popup_info {
    width: 50%;
    padding: 0 1rem;
    margin-top: 0;
  }

  .popup_info a {
    margin-right: 0.5rem;
  }
}

/* ABOUT SECTION */
#About {
  background: linear-gradient(90deg, rgba(0, 48, 73, 1) 0%, rgba(0, 68, 103, 1) 35%, rgba(2, 26, 38, 1) 100%);
  height: fit-content;
  padding: 8.13rem 1rem;
  overflow: hidden;
}

.about_text {
  width: 100%;
}

#resume_button {
  margin-top: 2rem;
  position: absolute;
}

#about_image {
  margin-left: 50%;
}

#skills {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: space-around;
}

#skills img {
  margin-right: 0.5rem;
}

#skills h4 {
  font-weight: bold;
}

#skills ul {
  margin-bottom: 2rem;
}

#skills li {
  margin-bottom: 2rem;
  text-align: center;
}

.line {
  display: block;
  width: 100%;
  margin: 8rem 0;
  border-bottom: solid 2px white;
}

@media (min-width: 768px) {
  #About {
    padding: 8.13rem 4rem;
  }

  .about_container {
    display: flex;
    flex-direction: row;
  }

  .about_text {
    width: 50%;
  }

  #about_image {
    width: 50vw;
    margin-right: -15%;
    margin-left: 1rem;
  }

  #skills {
    flex-direction: row;
    align-content: center;
    text-align: center;
    margin-top: 8rem;
  }

  #skills li {
    text-align: left;
  }
}

/* CONTACT ME SECTION */

.contact_container {
  padding: 8.13rem 1rem;
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 2rem;
  height: fit-content;
}

.contact_container h3 {
  text-align: center;
  margin-top: 6rem;
}

#contact_form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 3rem;
}

#contact_form * {
  font-size: 1rem;
  border: none;
  border-bottom: solid 1px #979493;
  padding: 1rem;
}

#contact_form input:hover {
  box-shadow: 0 0.9em 0.8em -0.4em #06a646;
}

#text_box {
  border: none;
  background-color: #fbf8f7;
  height: 200px;
}

#contact_button {
  background-color: #f55800;
  padding: 0.75rem;
  font-weight: bold;
  display: block;
  width: fit-content;
  border-style: none;
  margin-inline: auto;
  font-size: var(--button_font_size);
  color: var(--button_font_color);
  border-radius: 5%;
  transition: transform 0.2s, box-shadow 0.2s;
}

#contact_button:hover {
  background-color: rgba(255, 255, 255, 0);
  color: #f55800;
  border: 2px solid #f55800;
  box-shadow: 0 0.5em 0.5em -0.4em #f55800;
  transform: translateY(-0.2em);
  cursor: pointer;
}

.btnsGroup {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  border-bottom: none;
}

.btnsGroup button {
  color: white;
}

@media (min-width: 768px) {
  .contact_container {
    grid-template-columns: repeat(2, 1fr);
    padding: 8.13rem 4rem;
  }

  .contact_container h3 {
    text-align: left;
  }

  #contact_button {
    margin-inline: 0;
  }
}

#footer_icons {
  color: #1c1a19;
  text-align: center;
  margin: 1rem 0;
}

#footer_icons a {
  margin-right: 1rem;
}
