:root {
  --dark-grey: #333;
  --light-grey: #e9ecef;
  --lighter-grey: #f0f4f8;
  --red: #ff014f;
  --silver: #dce1e4;
}

/* Start @keyframes rules */

@keyframes slide {
  100% {
    top: -56px;
  }
}

@keyframes typing {
  40%,
  60% {
    left: calc(100% + 1px);
  }
}

/* End @keyframes rules */

.arc {
  background: #ecf0f3;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  height: 200px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-42%, -37%);
  width: 200px;
  z-index: 1;
}

.bio {
  margin-top: 0;
  max-width: 100%;
  text-align: justify;
}

body {
  background-color: var(--light-grey);
  color: var(--dark-grey);
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

.filter-button-active {
  border-bottom: 2px solid var(--red);
  color: var(--red);
}

footer {
  padding: 15px;
  text-align: center;
}

h1 {
  font-size: 1.5em;
  margin-bottom: 0;
  width: 100%;
}

h2 {
  margin-bottom: 0;
}

header {
  align-items: center;
  background-color: var(--light-grey);
  display: flex;
  justify-content: space-between;
  padding: 20px;
  position: fixed;
  transition: background-color 0.3s ease-in-out;
  width: 100vw;
  z-index: 2;
}

header.scrolled {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.hero {
  padding: 90px 20px 0;
}

.hero-img {
  border-radius: 0 0 69px 120px;
  max-width: 200px;
  position: relative;
  z-index: 1;
}

.hero-img-container {
  position: relative;
}

hr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
  margin-bottom: 0;
  width: 95%;
}

.logo {
  border: 2px solid var(--silver);
  border-radius: 50%;
  height: 48px;
}

nav {
  align-items: center;
  display: flex;
  font-size: 1.2rem;
  justify-content: space-between;
  width: calc(100% - 40px);
}

nav ul {
  display: none;
}

nav ul li a {
  color: var(--dark-grey);
  text-decoration: none;
}

.pagination {
  margin: 20px;
}

.portfolio-filters {
  line-height: 27px;
  word-spacing: 10px;
}

.filter-button:not(.filter-button-active):hover {
  cursor: pointer;
  opacity: 0.5;
}

.filter-button-active:hover {
  cursor: not-allowed;
}

.project-card {
  background-color: var(--lighter-grey);
  border-radius: 10px;
  /*  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);*/
  box-shadow: 20px 20px 60px #bebebe, -20px -20px 60px #ffffff;
  padding: 15px;
}

.project-card img {
  height: auto;
  width: 100%;
}

.project-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: 20px;
}

.projects {
  padding: 0 20px;
}

.red-text {
  color: var(--red);
}

section {
  align-items: center;
  display: flex;
  flex-direction: column;
}

.social-media-link {
  background: linear-gradient(145deg, #e2e8ec, #ffffff);
  border-radius: 6px;
  box-shadow: 5px 5px 15px #d1d9e6, -5px -5px 15px #ffffff;
  box-sizing: border-box;
  color: var(--red);
  display: inline-block;
  font-size: 14px;
  height: 60px;
  letter-spacing: 2px;
  line-height: 60px;
  list-style: none;
  margin: 10px;
  outline: none;
  position: relative;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: 0.4s;
  width: 60px !important;
}

.social-media-link:hover {
  background: linear-gradient(145deg, #ff014f, #d11414);
  transform: translateY(-5px);
}

.social-media-link:hover i {
  color: #fff;
}

.title {
  text-align: center;
}

#top-button.active {
  align-items: center;
  background-color: var(--light-grey);
  border-radius: 50%;
  bottom: 20px;
  color: var(--red);
  display: flex;
  font-size: 48px;
  justify-content: center;
  position: fixed;
  right: 20px;
  text-decoration: none;
  visibility: visible;
  width: 42px;
}

#top-button.active:hover {
  opacity: 0.8;
}

.typewriter-text {
  height: 28px;
  margin-top: 0;
  overflow: hidden;
  padding: 0;
}

.typewriter-text li {
  animation: slide 6s steps(2) infinite;
  position: relative;
  top: 0;
}

.typewriter-text li::after {
  animation: typing 3s steps(21) infinite;
  background-color: var(--light-grey);
  border-left: 2px solid var(--red);
  content: "";
  height: 100%;
  left: 0%;
  position: absolute;
  width: 100%;
}

.typewriter-text-wrapper {
  display: flex;
}

/* Breakpoints for larger screens */
@media (min-width: 481px) {
  .bio {
    max-width: 500px;
  }

  footer {
    padding: 20px;
  }

  h1 {
    font-size: 2.5em;
  }

  header {
    padding: 20px;
  }

  .hero {
    flex-direction: row-reverse;
    justify-content: space-around;
    padding: 50px 20px;
  }

  .project-card {
    padding: 20px;
  }

  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .projects {
    padding: 50px 20px;
  }
}

@media (min-width: 769px) {
  nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
  }
}
