@import url('https://fonts.googleapis.com/css2?family=Copse&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* CSS Variables */

:root {
  --header-height: 3rem;
  --nav-width: 324px;

  --font-medium: 500;
  --font-semi-bold: 600;
  --font-bold: 700;

  --first-color: #004225;
  --first-color-dark: #002613;
  --first-color-darken: #00120A;
  --text-color: #54423D;
  --first-color-light: #EAE7E6;
  --first-color-lighten: #FFFAFA;

  --body-font: 'Poppins', sans-serif;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;


  --mb-1: .5rem;
  --mb-2: 1rem;
  --mb-3: 1.5rem;
  --mb-4: 2rem;
  --mb-5: 2.5rem;

  --z-fixed: 100;
}

@media screen and (min-width: 768px) {
  :root {
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }
}

*, ::before, ::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: var(--header-height) 0 0 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  background-color: var(--first-color-lighten);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, p {
  margin: 0;
}

h3 {
  font-weight: var(--font-semi-bold);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--text-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.section {
  padding: 4rem 0 2rem;
}

.section-title {
  font-size: var(--h1-font-size);
  color: var(--first-color);
  margin-bottom: var(--mb-3);
  text-align: center;
}

.section-subtitle {
  display: block;
  font-size: var(--small-font-size);
  color: var(--first-color-darken);
  text-align: center;
  font-weight: var(--font-bold);
  margin-bottom: .25rem;
}

.bd-grid {
  max-width: 1024px;
  display: grid;
  grid-template-columns: 100%;
  column-gap: 2rem;
  width: calc(100% - 2rem);
  margin-left: var(--mb-2);
  margin-right: var(--mb-2);
}

.l-header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: var(--first-color-lighten);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}

/* Navigation */

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 90%;
  height: 100vh;
  padding: 3rem;
  display: flex;
  align-items: center;
  background-color: var(--first-color);
  transition: .5s;
}

.nav__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  color: var(--first-color-lighten);
  cursor: pointer;
}

.nav__item {
  margin-bottom: var(--mb-4);
}

.nav__link {
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--first-color-lighten);
  font-weight: var(--font-bold);
  transition: .3s;
}

.nav__link:hover {
  color: var(--text-color);
}

.nav__toggle {
  color: var(--first-color-dark);
  font-size: 1.3rem;
  cursor: pointer;
}

.show {
  left: 0;
}

/* Home */

.home__container {
  height: calc(100vh - var(--header-height));
  align-items: center;
}

.home__data {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: max-content;
  text-align: center;
}

.home__img {
  /* padding-top: 1.3rem;
  padding-left: .8rem; */
  width: 250px;
  height: 250px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: var(--mb-2);
}

/* .home__img img {
  width: 155px;
} */

.home__title {
  font-size: var(--h1-font-size);
  color: var(--first-color);
  font-weight: var(--font-semi-bold);
}

.home__profession {
  font-size: var(--font-medium);
  color: var(--first-color-dark);
  margin-bottom: var(--mb-5);
}

.home__social {
  margin-bottom: 5rem;
}

.home__social-link {
  display: inline-flex;
  background-color: var(--first-color);
  color: var(--first-color-lighten);
  font-size: 1.5rem;
  border-radius: 50%;
  padding: .40rem;
  margin: 0 var(--mb-1);
  transition: .3s;
}

.home__social_link:hover {
  background-color: var(--first-color-dark);
}

.home__button {
  padding: 0.75rem !important;
}

/* Buttons */

.button {
  display: inline-block;
  background-color: var(--first-color);
  color: var(--first-color-lighten);
  padding: 1rem 2rem;
  font-weight: var(--font-semi-bold);
  border-radius: .5rem;
  transition: .3s;
}

.button:hover {
  background-color: var(--first-color-dark);
}

.button__light {
  background-color: var(--first-color-lighten);
  color: var(--first-color);
}

.button__light:hover {
  color: var(--first-color-lighten);
}

/* About */

/* .about__container {
  row-gap: 2rem;
} */

.about__data {
  text-align: justify;
  margin: 5%;
}

.about__description {
  margin-bottom: var(--mb-4);
}

/* Projects */

/* Projects */
.projects__subtitle {
  text-align: center;
  margin-bottom: var(--mb-3);
}

/* Projects Grid Layout */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin: 0 auto;
}

.projects__item {
  cursor: pointer;
}

.projects__img {
  position: relative;
  overflow: hidden;
  border-radius: .5rem;
  height: 200px; /* Control the height of project cards */
}

.projects__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projects__data {
  position: absolute;
  bottom: -100%;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 66, 37, 0.7);
  border-radius: .5rem;
  transition: .3s;
  padding: 1rem;
}

.projects__title {
  font-size: var(--h2-font-size);
  color: var(--first-color-lighten);
  margin-bottom: 0.5rem;
  text-align: center;
}

.projects__view-details {
  background-color: var(--first-color-lighten);
  color: var(--first-color);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
}

.projects__view-details:hover {
  background-color: #f0f0f0;
}

.projects__img:hover .projects__data {
  bottom: 0;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal__content {
  background-color: #fff;
  margin: 10vh auto;
  padding: 1.5rem;
  border-radius: 0.5rem;
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideIn 0.3s;
}

@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: #aaa;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

.modal__close:hover {
  color: #000;
}

.modal__header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.modal__header h2 {
  margin: 0;
  color: var(--first-color);
}

.modal__image {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  max-height: 300px;
  object-fit: cover;
}

.modal__description {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.modal__tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background-color: #edf2f7;
  color: #4a5568;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
}

.modal__highlights {
  margin-bottom: 1.5rem;
}

.highlight-item {
  padding-left: 1.25rem;
  position: relative;
  margin-bottom: 0.5rem;
}

.highlight-item:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--first-color);
}

.modal__links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.modal__link {
  display: inline-flex;
  align-items: center;
  background-color: var(--first-color);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s;
}

.modal__link:hover {
  background-color: var(--first-color-dark);
}

.projects__details-btn {
  margin-top: 1rem;
  background-color: white;
  color: var(--first-color);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
}

.projects__details-btn:hover {
  background-color: #f0f0f0;
}

@media screen and (max-width: 768px) {
  .projects__grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .modal__content {
    width: 95%;
    margin: 5vh auto;
  }

  /* New styles for mobile */
  .modal__links {
    flex-wrap: wrap;
  }

  .modal__link {
    margin-bottom: 0.5rem;
  }
}

/* .projects__container {
  justify-items: center;
  row-gap: 2rem;
}

.projects__subtitle {
  text-align: center;
  margin-bottom: var(--mb-3);
}

.projects__img {
  position: relative;
  overflow: hidden;
  border-radius: .5rem;
  margin-bottom: 20px;
}

.projects__data {
  position: absolute;
  bottom: -100%;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 66, 37, 0.7);
  border-radius: .5rem;
  transition: .3s;
}

.projects__link {
  display: inline-flex;
  font-size: 1.5rem;
  background-color: var(--first-color-lighten);
  color: var(--first-color);
  padding: .25rem;
  border-radius: 25rem;
  margin-bottom: var(--mb-2);
}

.projects__title {
  font-size: var(--h2-font-size);
  color: var(--first-color-lighten);
}

.projects__img:hover .projects__data {
  bottom: 0;
} */


/* Skills */

.skills__container {
  padding: 20px;
  width: 100%;
  margin: 0 auto;
}

.skills__content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.skills-item {
  /* padding: 20px; */
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 calc(33.333% - 30px);
  max-width: calc(33.333% - 30px);
  box-sizing: border-box;
  white-space: nowrap;
}

.skills-item i {
  font-size: 3rem;
  color: #004d40;
  margin-bottom: 10px;
}

.skills-item div {
  font-size: 0.9em;
  color: #333;
  margin-top: 10px;
}

@media (min-width: 650px) {
  .skills-item {
    flex: 1 1 calc(20% - 30px);
    max-width: calc(20% - 30px);
  }
}

@media (min-width: 900px) {
  .skills-item {
    flex: 1 1 calc(16.666% - 40px);
    max-width: calc(16.666% - 40px);
  }
}

/* Contact */
.contact__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 3rem;
  text-align: center;
  margin: 0 auto;
}

.contact__inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.5rem;
  width: 100%;
  max-width: 600px;
}

.contact__input,
.contact__textarea {
  width: 100%;
  padding: 1rem;
  outline: none;
  border: none;
  background-color: var(--first-color-light);
  font-size: var(--normal-font-size);
  margin-bottom: var(--mb-2);
  border-radius: .5rem;
}

.contact ::placeholder {
  color: var(--first-color-dark);
  font-family: var(--body-font);
  font-weight: var(--font-medium);
}

.contact__button {
  margin-top: 10px;
  outline: none;
  border: none;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  cursor: pointer;
}

/* Footer */

.footer {
  background-color: var(--first-color-darken);
  color: var(--first-color-lighten);
  text-align: center;
  padding: 0.5rem;
}

.footer__title {
  font-size: var(--h1-font-size);
  margin-bottom: var(--mb-2);
}

.footer__description {
  margin-bottom: var(--mb-2);
}

.footer__social {
  margin-bottom: 2rem;
}

.footer__link {
  display: inline-flex;
  /* background-color: var(--first-color); */
  color: var(--first-color-lighten);
  font-size: 2.5rem;
  /* border-radius: 50%; */
  padding: .40rem;
  margin: 0 var(--mb-1);
  transition: .3s;
}

.footer__link:hover {
  background-color: var(--first-color-lighten);
  color: var(--first-color);
}

.footer__copy {
  font-size: var(--smaller-font-size);
}

/* Media Queries */

@media screen and (min-width:768px) {
  .home_button {
    width: initial;
  }

  .nav__menu {
    width: var(--nav-width);
  }

  /* .about__container, */
  .services__container,
  .works__container,
  .contact__container,
  .contact__inputs {
    grid-template-columns: repeat(2,1fr);
  }

  .about__data {
    text-align: initial;
  }

  .about__description {
    margin-bottom: var(--mb-5);
  }

  .project {
    background: none;
  }

  .project__container {
    background-color: var(--first-color);
    grid-template-columns: 2fr 1.2fr;
    padding: 0 2rem;
    border-radius: .5rem;
  }

  .project__data {
    padding: 3rem 0;
  }

  .project__title, .project__data {
    text-align: initial;
  }

  .project__img {
    width: 230px;
    align-self: flex-end;
  }

  .contact__inputs {
    display: grid;
    column-gap: 1.5rem;
  }

  .contact__info {
    padding-left: 3rem;
  }

  .footer {
    background: none;
  }

  .footer__container {
    background-color: var(--first-color-darken);
    padding: 1.5rem 0;
    border-radius: .5rem;
  }

  .skills__container,
  .skills__content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }
}

@media screen and (min-width: 1024px) {
  body {
    margin: 0;
    padding-left: var(--nav-width);
  }

  .l-header {
    width: 0;
  }

  .nav__toggle,
  .nav__logo,
  .nav__close {
    display: none;
  }

  .nav__menu {
    left: 0;
  }

  .home__container {
    height: 100vh;
  }

  .section {
    padding: 3rem 0 2rem;
  }

  .bd-grid {
    margin-left: auto;
    margin-right: auto;
  }

  .services__container,
  .works__container {
    grid-template-columns: repeat(3,1fr);
  }

  /* .about__container,
  .about__data {
    justify-content: center;
    margin-left: 10%;
    margin-right: 10%;
  } */

  .skills__container,
  .skills__content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }
}