html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}
:root {
  --bg-color: #e9f2eb;
  --text-color: #231f20;
  --secondary-text-color: #5b7161;
  --element-color: #7e9e86;
}

body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  text-decoration: none;
  font-family: "Open Sans", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
}

::-webkit-scrollbar {
  width: 20px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--element-color);
}

::-webkit-scrollbar-track {
  background-color: var(--bg-color);
}

h2 {
  font-size: 4.5rem;
  text-align: center;
}

span {
  color: var(--secondary-text-color);
}

nav {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  padding: 2rem 5%;
  margin-bottom: 200px;
  background: var(--bg-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}

nav i {
  font-size: 3rem;
  color: var(--secondary-text-color);
  display: none !important;
}

.logo {
  width: 100px;
}

.logo:hover,
.logo:active,
.logo:focus {
  transform: scale(1.1);
}

nav li {
  list-style-type: none;
  display: inline-block;
}

nav a {
  font-size: 1.2rem;
  color: var(--text-color);
  margin-left: 4rem;
  font-weight: 500;
  text-decoration: none;
  transition: 0.3s ease-in-out;
}

nav a:hover,
nav a:focus,
nav a:active {
  color: var(--secondary-text-color);
  transition: 0.3s ease-in-out;
}

section {
  min-height: 100vh;
  padding: 5rem 10%;
  scroll-margin-top: 120px;
}

#home {
  scroll-margin-top: 120px;
  margin-top: 200px;
  padding-top: 200px;
  padding: 5rem 10%;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15rem;
}

.hero img {
  width: 32vw;
  margin-left: 10%;
}

.hello {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  margin-right: 10%;
}

.hello h1 {
  font-size: 6rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.25rem;
  line-height: 1;
}

.hello h3 {
  margin: 0;
  font-size: 3rem;
}

.hello p {
  font-size: 1.5rem;
  line-height: 1.8rem;
}

.socials {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  padding: 1rem;
}

.socials i {
  border-radius: 50%;
  color: var(--element-color);
  transition: 0.3s ease-in-out;
}

.socials i:hover,
.socials i:focus,
.socials i:active {
  color: var(--secondary-text-color);
  transform: scale(1.1);
  transition: 0.3s ease-in-out;
}

.about {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10rem;
}

.about img {
  width: 32vw;
}

.about h2 {
  font-size: 4.5rem;
  text-align: left;
  margin-bottom: 0.5rem;
}

.about p {
  font-size: 1.5rem;
  line-height: 1.8rem;
  text-align: left;
  margin-top: 0;
  margin-bottom: 3rem;
}

.btn {
  font-size: 1rem;
  padding: 0.5rem 1.5rem;
  background-color: var(--secondary-text-color);
  border-radius: 3rem;
  color: var(--bg-color);
  border: 2px solid transparent;
  font-weight: 600;
  transition: 0.3s ease-in-out;
  text-decoration: none;
}

.btn:hover,
.btn:focus,
.btn:active {
  background-color: var(--element-color);
  transition: 0.3s ease-in-out;
}

.projects .container {
  margin: 0 5%;
}

.projects .row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.projects .row .project-card {
  flex: 1;
}

.project-card {
  position: relative;
  overflow: hidden;
}

.projects .row .project-card img {
  width: 100%;
  display: block;
  transition: 0.3s ease;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(35, 31, 32, 0.7); /* dark overlay */
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: 0.3s ease;
}

.overlay h4 {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
}

.project-card:hover .overlay {
  opacity: 1;
}

.projects .row iframe {
  width: calc(50% - 10px);
  aspect-ratio: 16/9;
  height: auto;
  border: none;
}

.contact {
  min-height: auto;
}

.contact .container {
  display: flex;
  justify-content: center;
  column-gap: 200px;
}

.contact .row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.contact .block {
  display: block;
  text-align: center;
}

.contact i {
  font-size: 3rem;
  color: var(--secondary-text-color);
  transition: 0.3s ease-in-out;
  text-align: center;
}

.contact i:hover,
.contact i:focus,
.contact i:active {
  color: var(--element-color);
  transform: scale(1.1);
  transition: 0.3s ease-in-out;
}

.contact p {
  font-size: 1.5rem;
  text-align: center;
}

.contact a {
  color: var(--text-color);
  text-decoration: none;
  transition: 0.3s ease-in-out;
}

.contact a:hover,
.contact a:focus,
.contact a:active {
  color: var(--secondary-text-color);
}

.footer {
  padding: 50px 0;
  text-align: center;
  margin: 0;
}

footer .socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  font-size: 4rem;
  padding: 1rem;
  margin: 0;
}

footer .socials i {
  align-items: center;
}

.footer ul {
  text-align: center;
  font-size: 1.8rem;
  list-style-type: none;
}

footer li {
  list-style-type: none;
  display: inline-block;
  justify-content: center;
  text-align: center;
  font-size: 1.2rem;
  text-decoration: none;
  transition: 0.3s ease-in-out;
  padding-right: 3rem;
}

footer a {
  list-style-type: none;
  color: var(--text-color);
  transition: 0.3s ease-in-out;
  text-decoration: none;
}

footer a:hover,
footer a:focus,
footer a:active {
  color: var(--secondary-text-color);
}

footer p {
  text-align: center;
  margin-top: 40px;
  font-size: 16px;
}

/* Media Queries Start */

@media (max-width: 1285px) {
  nav i {
    display: block !important;
  }

  .menu {
    position: absolute;
    top: 100%;
    right: 5%;
    width: 50%;
    margin-top: 0;
    padding: 1rem 3rem;
    background: var(--bg-color);
    border-bottom-left-radius: 2rem;
    border-left: 2px solid var(--element-color);
    border-bottom: 2px solid var(--element-color);
    display: none;
  }

  .menu a {
    display: block;
    font-size: 1.5rem;
    margin: 1rem 0;
  }

  .menu.active {
    display: block;
  }

  .hero {
    flex-direction: column;
    justify-content: center;
    margin: 5rem 5%;
    gap: 5rem;
    align-items: center;
    text-align: center;
  }

  .hero img {
    width: 56vw;
    margin: 0rem;
    margin-top: 150px;
  }

  .hello {
    align-items: center;
    text-align: center;
    margin: 0;
  }

  .about {
    flex-direction: column;
    text-align: center;
  }

  .about h2 {
    text-align: center;
    margin: 2rem 0;
  }

  .about p {
    text-align: center;
  }

  .about img {
    width: 52vw;
  }

  .projects .container {
    max-width: 1200px;
    margin: 0 5%;
  }

  .projects .row img {
    width: calc(33.333% - 13.33px);
  }

  .projects .row iframe {
    width: calc(50% - 10px);
    aspect-ratio: 16/9;
    height: auto;
    padding: 0;
  }
}

@media (max-width: 1040px) {
  .projects .container {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .projects .row {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 0; /* remove this */
  }

  .projects .row .project-card {
    padding-bottom: 1rem;
    width: 100%;
  }

  .projects .row iframe {
    margin-bottom: 1rem;
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
  }

  .contact .container {
    flex-direction: column;
    align-items: center;
    gap: 50px;
  }
}

@media (max-width: 600px) {
  .logo {
    width: 50px;
    padding-left: 2%;
  }

  .hello h1 {
    font-size: 4rem;
  }

  .hello h3 {
    font-size: 2rem;
  }

  .about h2 {
    font-size: 3rem;
  }

  h2 {
    font-size: 3rem;
    text-align: center;
  }

  nav {
    padding: 2rem 2%;
  }

  nav .logo {
    width: 100px;
  }

  .menu {
    right: 5%;
    padding: 1rem 4rem;
  }

  .hero img {
    margin-top: 100px;
  }

  section {
    margin-top: -150px;
  }

  .hello p {
    font-size: 1rem;
    line-height: 1.5rem;
  }

  .about p {
    font-size: 1rem;
    line-height: 1.5rem;
    text-align: center;
    margin-top: 0;
    margin-bottom: 3rem;
  }

  .btn {
    font-size: 1rem;
    padding: 0.5rem 1.5rem;
  }

  .about img {
    margin-top: -50px;
  }

  .projects .container {
    margin: 0 5%;
  }

  .projects .row {
    display: flex;
    flex-direction: column;
  }

  .projects .row .project-card {
    width: 100%;
  }

  .projects .row iframe {
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
  }

  .contact .container {
    flex-direction: column;
    align-items: center;
  }

  .contact .container p {
    font-size: 1rem;
  }

  .footer .socials {
    font-size: 3rem;
  }

  .footer ul {
    font-size: 1rem;
  }

  .footer ul li {
    font-size: 1rem;
    padding-right: 1.5rem;
  }
}
