@import url('https://fonts.googleapis.com/css2?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&family=Source+Serif+4:ital,opsz,wght@0,8..60,200..900;1,8..60,200..900&display=swap');
:root {
    --primary-color: #11121a;
    --secondary-color: #1c1d26;
    --hover-color: #272832;
    --accent-color: #0071FF;
    --accent-color-transparent: rgba(0, 113, 255, 0.1);
    --text-color: #c9c9c9;
}
.lightmode {
    --primary-color: #f0f0f0;
    --secondary-color: #ffffff;
    --hover-color: #e0e0e0;
    --accent-color: #0044ff;
    --accent-color-transparent: rgba(0, 60, 255, 0.1);
    --text-color: #11121a;
}
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html{
    font-family: Poppins, 'Segoe UI', sans-serif;
    scroll-behavior: smooth;
}
body{
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--primary-color);
    color: var(--text-color);
}
main{
  padding: min(5em, 7%);
}
main p{
    margin-top: .35em;
}
footer{
    background: var(--secondary-color);
    color: var(--text-color);
    text-align: center;
    padding: 1rem 0;
    bottom: 0;
    width: 100%;
}
h2{
  margin-bottom: 1em;
  font-size: 2em;
}

/* navigation bar*/
/* original is from Coding2Go: https://youtu.be/m7YDWNz65iI*/
nav{
  background-color: var(--primary-color);
  border-bottom:  1px solid var(--hover-color);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-name{
  font-weight: bold;
}
nav ul{
  list-style: none;
  display: flex;
}
nav .home-li{
  margin-right: auto ;
}
nav li{
  display: flex;
  align-items: center;
}
nav a{
  display: flex;
  text-decoration: none;
  color: var(--text-color);
  padding: 1em 2em;
  position: relative;
  overflow: hidden;
}
nav a::after, nav a::before{
  content: '';
  position: absolute;
  height: 0;
  bottom: 0;
  left: 0;
}
nav a::after{
  width: 300%;
  background: linear-gradient(to right, var(--accent-color) 35%, var(--accent-color-transparent) 50%, var(--accent-color) 65%);
  transition: height 150ms ease;
  animation: slide 2.5s infinite ease-in-out;
  animation-play-state: paused;
}
@keyframes slide {
  0% {Left: -200%;}
  100% {left: 0;}
}
nav a::before{
  width: 100%;
  background-color: var(--accent-color-transparent);
  transition: height 150ms ease;
}
nav a:hover::after{
  height: 2px;
  animation-play-state: running;
}
nav a:hover::before{
  height: 100%;
}
nav a.active-link{
  border-bottom: 2px solid var(--text-color);
}
.language{
  font-family: Poppins, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 1em;
  height: 100%;
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: var(--text-color);
  padding: 1em 2em;
  cursor: pointer;
  position: relative;
  overflow: hidden;

  .lang-text{
    display: none;
  }
}
.language::after, .language::before{
  content: '';
  position: absolute;
  height: 0;
  bottom: 0;
  left: 0;
}
.language::after{
  width: 300%;
  background: linear-gradient(to right, var(--accent-color) 35%, var(--accent-color-transparent) 50%, var(--accent-color) 65%);
  transition: height 150ms ease;
  animation: slide 2.5s infinite ease-in-out;
  animation-play-state: paused;
}
.language::before{
  width: 100%;
  background-color: var(--accent-color-transparent);
  transition: height 150ms ease;
}
.language:hover::after{
  height: 2px;
  animation-play-state: running;
}
.language:hover::before{
  height: 100%;
}

#open-sidebar-button{
  display: none;
  background: none;
  border: none;
  padding: 1em 2em;
  margin-left: auto;
  cursor: pointer;

  svg{
    fill: var(--text-color);
  }
  
}
#close-sidebar-button{
  display: none;
  background: none;
  border: none;
  padding: 1em;
  cursor: pointer;

  svg{
    fill: var(--text-color);
  }
}

#overlay{
  background: rgba(0, 0, 0, 0.5);
  position: fixed;
  inset:0;
  z-index: 9;
  display: none;
}

#theme-switch{
  height: 50px;
  width: 50px;
  margin: 0 2em 0 1.5em;
  border-radius: 50%;
  background-color: var(--secondary-color);
  border: 1px solid var(--hover-color);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;

  svg{
    fill: var(--text-color);

    ~:last-child{
      display: none;
    }
  }
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
#theme-switch::after, #theme-switch::before{
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: conic-gradient(from var(--angle), transparent 0deg, var(--accent-color) 90deg, transparent 90deg, transparent 180deg, var(--accent-color) 270deg, transparent 270deg);
  z-index: -1;
  border-radius: 50%;
  padding: 0;
  animation: 3s spin infinite linear;
  animation-play-state: paused;
}

.lightmode #theme-switch svg:first-child{
  display: none;
}
.lightmode #theme-switch svg:last-child{
  display: block;
}

#theme-switch:hover{
  background-color: var(--hover-color);
  transition: background-color 150ms ease;

  svg{
    fill: var(--accent-color);
    transition: fill 150ms ease;
  }
}
#theme-switch:hover::after, #theme-switch:hover::before{
  padding: 3px;
  animation-play-state: running;
}
#theme-switch:hover:before{
  filter: blur(1.5em);
}
@keyframes spin {
  from {
    --angle: 0deg;
  }
  to {
    --angle: 360deg;
  }
}

@media screen and (max-width: 785px) {
  #open-sidebar-button{
    display: block;
    position: sticky;
    top: 0;
  }
  #close-sidebar-button{
    display: block;
  }
  nav{
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: min(15em, 100%);
    z-index: 10;
    border-left: 1px solid var(--hover-color);
    transition: right 300ms ease-out;
  }
  nav.show{
    right: 0;
  }
  nav.show ~ #overlay{
    display: block;
  }
  nav ul{
    width: 100%;
    flex-direction: column; 
  }
  nav a{
    width: 100%;
    padding-left: 2.5em;
  }
  nav a.active-link{
    border-bottom: none;
  }
  nav .home-li{
    margin-right: unset;
  }
  .language{
    width: 100%;
    padding-left: 2.5em;
    justify-content: flex-start;
  }
  #theme-switch{
    margin: 1em 2.5em;
    position: absolute;
    top: 0;
    right: 0;
    width: 3em;
    height: 3em;
  }
}

/* presentation*/
.presentation{
  display: flex;
  justify-content: space-around;
  align-items: center;
  align-content: center;

  gap: 2em;
  z-index: auto
}
.profile-pic {
  flex-shrink: 0;
  display: flex;
  border-radius: 50%;
  min-width: 200px; /* Set a width */
  height: 200px; /* Set a height */
  box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.315); /* Subtle shadow */
  justify-content: center;
  align-items: center;
}
.description{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  align-content: center;
  background-color: var(--secondary-color);
  padding: 1em;
  border-radius: 10px;
  z-index: 1;
}
.description .resume-btn{
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--secondary-color);
  text-decoration: none;
  color: var(--text-color);
  margin-top: 2em;
  padding: 0.9em 1em;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
  position: relative;

  svg{
    margin-right: 0.5em;
  }
}
.description .resume-btn::after, .description .resume-btn::before{
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  z-index: -1;
  background-image: conic-gradient(from var(--angle), transparent 0deg, var(--accent-color) 90deg, transparent 90deg, transparent 180deg, var(--accent-color) 270deg, transparent 270deg);
  border-radius: 12px;
  transition: background-color 150ms ease;
  animation: 3s spin infinite linear;
  animation-play-state: paused;
}
.description .resume-btn:hover{
  background-color: var(--hover-color);
  transition: background-color 150ms ease;

  svg{
    fill: var(--accent-color);
    transition: fill 150ms ease;
  }
}
.description .resume-btn:hover::before{
  filter: blur(1.5em);
  opacity: 0.5;
}
.description .resume-btn:hover::after, .description .resume-btn:hover::before{
  width: 100%;
  height: 100%;
  padding: 2px;
  animation-play-state: running;
  transition: padding 350ms ease;
}


@media screen and (max-width: 785px) {
  .presentation{
    flex-direction: column;
    align-items: center;
  }
  .profile-pic {
    min-width: 200px; /* Set a width */
    height: 200px; /* Set a height */
  }
}





/* skills */
.skills{
  margin: auto;
  text-align: center;
  padding-top: 3em;
}
.skills-container{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
}
.skill-box{
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 0.5em;
  width: 100%;
}
.skill-box svg{
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin-right: 1em;
  fill: var(--text-color);
}
.skill-description{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  color: var(--text-color);
}
.skill-bar-container{
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 0.5em;
}
.skill-bar{
  width: 100%;
  height: 10px;
  background-color: var(--secondary-color);
  border-radius: 3px;
  overflow: hidden;
}
.skill-progress{
  height: 100%;
  background-color: var(--accent-color);
  width: 0; /* Set this dynamically with JavaScript */
  transition: width 500ms ease;
}
.skill-value{
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  margin-left: 1em;
  color: var(--text-color);
  font-weight: bold;
}




/* projects */
/* inspiration: https://hugo.fyi/# */
.projects{
  margin: auto;
  text-align: center;
  padding-top: 3em;
}
.project-grid-container{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  grid-auto-rows: 450px;
  grid-gap: 3em;
  width: auto;
}
.card{
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  background-color: var(--secondary-color);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-color);

  img{
    top: 0;
    width: 100%;
    height: 100%;
    max-height: 350px;
    object-fit: cover;
    margin-bottom: 10px;
  }
  h3{
    font-size: 1.5em;
    margin-bottom: 5px;
    margin-left: 10px;
  }
}
.card:hover{
  background-color: var(--hover-color);
  transition: background-color 150ms ease;
  transform: scale(1.05);
  transition: transform 150ms ease;

  h3{
    color: var(--accent-color);
    transition: color 150ms ease;
  }
}


/* Contact */

.contact{
  margin: auto;
  text-align: center;
  padding-top: 3em;
  z-index: auto;
}
.contact-container{
  display: flex;
  align-items: flex-start;
  justify-content: space-evenly;
  gap: 2em;
}
.socials-container{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2em;
}

.mail-form{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  max-width: 500px;
  background-color: var(--secondary-color);
  padding: 2em;
  border-radius: 10px;
  z-index: 1;
}
.mail-form input, .mail-form textarea{
  width: 100%;
  padding: 0.5em;
  margin-bottom: 1em;
  border: none;
  border-radius: 5px;
  background-color: var(--primary-color);
  color: var(--text-color);
}
.mail-form textarea{
  resize: vertical;
}
.mail-form input:focus, .mail-form textarea:focus{
  outline: none;
  box-shadow: 0 0 5px var(--accent-color);
  transition: box-shadow 150ms ease;
}
.mail-form button{
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--secondary-color);
  color: var(--text-color);
  padding: 1em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  position: relative;
}
.mail-form button::after, .mail-form button::before{
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  z-index: -1;
  background-image: conic-gradient(from var(--angle), transparent 0deg, var(--accent-color) 90deg, transparent 90deg, transparent 180deg, var(--accent-color) 270deg, transparent 270deg);
  border-radius: 12px;
  transition: background-color 150ms ease;
  animation: 3s spin infinite linear;
  animation-play-state: paused;
}
.mail-form button:hover{
  background-color: var(--hover-color);
  transition: background-color 150ms ease;
}
.mail-form button:hover::before{
  filter: blur(1.5em);
  opacity: 0.5;
}
.mail-form button:hover::after, .mail-form button:hover::before{
  width: 100%;
  height: 100%;
  padding: 2px;
  animation-play-state: running;
  transition: padding 350ms ease;
}