/* Fonts */
@font-face {
    font-family: 'space-grotesk';
    src: url(./space-grotesk/space-grotesk-v21-latin-regular.woff2) format('woff2'),
    url(./space-grotesk/space-grotesk-v21-latin-regular.woff) format('woff'),
    url(./space-grotesk/space-grotesk-v21-latin-regular.ttf) format('truetype');
}

@font-face {
    font-family: "jetbrains-mono";
    src: url(./jetbrains-mono-font/jetbrains-mono-v23-latin-regular.woff2) format('woff2'),
    url(./jetbrains-mono-font/jetbrains-mono-v23-latin-regular.woff) format('woff'),
    url(./jetbrains-mono-font/jetbrains-mono-v23-latin-regular.ttf) format('woff');
}

/* universal reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


body {
  background-color: #fff;
  color: #504935;
  margin: 0;
  padding: 0;
  font-family: 'space-grotesk';
  line-height: 1.5;
  font-size: 1.2rem;
  /* overflow: hidden; */ /* nothing will scroll, 
  even if it should. It will look like everything is stuck. */
  /* min-height: 100vh; */
}

/* Dark theme override */
body.dark-theme {
  background-color: #121212;
  color: #B1AEA5;
}

/* Force text in other elements to inherit or override */
body.dark-theme header,
body.dark-theme main,
body.dark-theme section,
body.dark-theme footer,
body.dark-theme a,
body.dark-theme .mobile-nav {
  color: #B1AEA5;
}

/* Mobile structure */
.container {
  max-width: 1280px;
  width: 100%;
  display: block;
}

header, main, section, footer {
  color: #504935;
  text-align: center;
}

h3 {
  padding-bottom: 0.5rem;
  font-size: 1.13rem;
  text-align: center;
}

header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1;
}

.header .container {
  background-color: #46433B;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  width: 30px;
  height: 25px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  order: 3;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background-color: #B1AEA5;
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* Transform hamburguer menu to X when open */
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Nav links (mobile menu) */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  height: 100vh;
  background-color: #504935;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: right 0.4s ease;
}


.mobile-nav.open {
  right: 0;
}

.mobile-nav a {
  color: #B1AEA5;
  font-size: 1.5rem;
  text-decoration: none;
}

#hero-name a {
  text-decoration: none;
  font-size: 1.5rem;
  color: #B1AEA5;
  order: 1;
  cursor: pointer;
}

.nav-links {
  display: none;
}

#theme-toggle {
  order: 2;
  background-color: #46433B;
  border: none;
  width: auto;
  cursor: pointer;
}

#moon-logo {
  height: auto;
  width: 100%;
}

#sun-logo {
  display: none;
  height: auto;
  width: 100%;
}

/* Main Section, about and tools/technologies */
main {
  padding: 3rem 0px 2rem;
}

main .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

#typewriter {
  padding: 2rem 0;
  height: 4rem;
  font-family: "jetbrains-mono";
  font-size: 1.5rem;
}

.first-section {
 display: flex;
 flex-direction: column;
}

.intro {
  display: none;
}

.intro-luis {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#profile-picture {
  width: min(60%, 300px);
  height: auto;
}

#about {
  order: 1;
  justify-items: center;
  align-items: center;
  padding-bottom: 1rem;
}

.intro-luis {
  order: 2;
}

.tech-section {
  height: auto;
  order: 3;
  display: block;
  background-color: #46433B;
  color: #B1AEA5;
  align-content: center;
  padding: 1% 32px;
}

.tech-section h3 {
  padding-top: 1rem;
}

.tech-icons {
  display: flex;
  justify-content: space-around;
  width: 100%;
  height: auto;
  padding: 1rem 0px;
}

.icon img {
    width: 3rem;
    height: auto;
    object-fit: contain;
}

/* Experience and education */
.experience, .education {
  justify-items: center;
  align-items: center;
  padding: 1rem 0;
}

.divider {
  background-color: #504935;
  height: 1.5px;
  width: 100%;
}

ul {
  list-style: none;
  text-align: center;
}

.item {
padding: 0.5rem 0;
}


.education-list li::before {
  content: "> ";
  color: #504935;
  font-weight: bold;
  display: none;
}

.certification-list li::before {
  content: "";
  color: #504935;
  font-weight: bold;
  list-style:inside;
}

/* Projects */
#projects {
  background-color: #46433B;
  color: #B1AEA5;
  padding: 1rem 0;
}

.project-list li {
  line-height: 2;
}

.project-list a {
  text-decoration: none;
  color: #B1AEA5;
}

.project-list a:hover {
  text-decoration: underline;
}

.project-list a:active {
  color: #fff;
}


/* Get in touch/Social media */
#contact {
  text-align: center;
  font-size: 1.2rem;
  padding: 1rem 0;;
}

.get-in-touch {
  padding: 1rem 0;
}

.email a {
  color:#46433B;
  text-decoration: underline;
}

.email a:hover {
  text-decoration: none;
  color: #696cf5;
}

.social-media {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 100%;
  height: auto;
  padding: 1rem 0px;
  overflow: hidden;
}


.social-icon {
    width: 3rem;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 8px; /* space between icons */
}

.social-icon img {
    width: 3rem;
    height: auto;
    object-fit: contain;
}

.cat-coding {
  text-align: center;
  padding: 1rem 0;
}

.cat-coding img {
  width: 40%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Footer */
.footer {
  height: auto;
  background-color: #46433B;
  color: #B1AEA5;
  text-align: center;
  padding: 1% 32px;
}

.footer p {
  text-align: center;
}

/* Media queries */

@media only screen and (min-width: 500px) {
  body {
  font-size: 1.3rem;
}
  .container {
  text-align: justify;
}

  header, main, section, footer {
  text-align: justify;
}
  .social-media {
  text-align: center;
}
  .email {
    text-align: center;;
  }

  .tech-icons {
  display: flex;
  justify-content: space-evenly;
  width: 100%;
  height: auto;
  padding: 1rem 0px;
}

}


/* Tablets */
@media only screen and (min-width: 768px) {

  main .container #intro {
  display: inline-block;
  gap: 1rem;
}

 #about, .intro-luis, .tech-section {
  order: 1;

}

.tech-icons {
  display: flex;
  justify-content: space-evenly;
  width: 100%;
  height: auto;
  padding: 1rem 0px;
}

}

@media only screen and (min-width: 900px) and (max-width: 1150px) {

  main {
  margin-right: 4rem;
} 

  .first-section {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-content: stretch;
  }

  .intro-luis p {
    padding-right: 3rem;
  }

  .about-tech {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* Ensures children have equal height */
    width: 100%;
    height: auto;
  }

  #about, .tech-section {
    flex: 1 1 0;
    min-width: 0;
  }

  #about {
    margin-top: 2rem;
    width: 100%;
    height: auto;
    text-align: center;
}

  .experience-education .container {
    display: flex;
    align-items: stretch;
    margin-bottom: 2rem;
  }

  .experience, .education {
    width: 50%;
    margin: 0 2%;
  }

  .divider {
    background-color: #504935;
    width: 1.5px;
    align-self: stretch;
    height: auto;
  }

  #contact .container {
    display: flex;
    margin-bottom: 2rem;
  }

  .get-in-touch, .social-media {
    width: 50%;
    margin: 0 2%;
  }

}

/* Large screens/ Desktops */

@media only screen and (min-width: 1150px) {

  .container {
    max-width: 100%;
    width: 100%;
  }
  .hamburger, .mobile-nav {
    display: none;
  }

  .navbar {
    padding-left: 20rem;
  }

  .nav-links {
    display: flex;
    gap: 2rem;
  }

  .nav-links a {
    color: #B1AEA5;
    text-decoration: none;
  }

  .nav-links a:hover {
  text-decoration: underline;
}

  .nav-links a:active {
  color: #fff;
}

  main {
  margin-top: 4rem;
} 

  .first-section {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-content: stretch;
  }

  .intro-luis p {
    padding-right: 3rem;
  }

  .about-tech {
    display: flex;
    flex-direction: column;
    align-items: stretch; /* Ensures children have equal height */
    width: 100%;
    height: auto; 
    margin: 0 1rem;
  }

  #about, .tech-section {
    flex: 1 1 0;
    min-width: 0;
  }

  #about {
    margin-top: 2rem;
    width: 100%;
    height: auto;
    text-align: center;
  
}

  .experience-education .container {
    display: flex;
    align-items: stretch;
    margin-bottom: 2rem;
  }

  .experience, .education {
    width: 50%;
    margin: 0 2%;
  }

  .divider {
    background-color: #504935;
    width: 1.5px;
    align-self: stretch;
    height: auto;
  }

    #contact .container {
    display: flex;
    margin-bottom: 2rem;
  }

  .get-in-touch, .social-media {
    width: 50%;
    margin: 0 2%;
  }

}
