/* universal styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
:root {
    --primary-color: #c7e5eb;
    --secondary-color: #000528;
    --hightlight: #f6ff00;
}
/* page animation */
@keyframes pageFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* run only once on load */
body.portfolio.page-loaded {
  animation: pageFadeIn 0.8s ease-out both;
}
html{
  scroll-behavior: smooth !important;
}
body {
  position: relative;
}


.portfolio {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  color: var(--secondary-color);
}
/* navbar */
nav {
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 40px;
  background-color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}
.navbar.shrink{
  padding: 10px 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.nav-left {
  display: flex;
  gap: 20px;
  justify-content: flex-start;
  flex-shrink: 1;
  flex-grow: 0;
  margin-left: 20px;
}
.nav-right {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  flex-grow: 1;
}

.menu-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

/* navbar-left */
.nav-links-left {
  position: relative;
  display: inline-block;
  color: var(--secondary-color);
  text-decoration: none;
  margin: 0 10px;
  font-weight: 700;
  font-size: 25px;
  transition: transform 0.2s ease;
  padding: 6px 10px;
  z-index: 1;
}

.nav-links-left:hover {
  color: var(--secondary-color);
}

.nav-links-left::after {
  content: '';
  position: absolute;
  bottom: .6em; 
  left: 50%;
  transform: translateX(-50%) translateY(0);
  height: 9px;
  border-radius: 6px;                        
  width: 100%;
  align-self: center;
  background-color: #f6ff00;   
  transition: all 0.2s ease;        
  z-index: -1;
}
.nav-links-left:hover::after {
  height: 65%;
  transform: translateX(-50%) translateY(6px);
  border-radius: 6px;
}
/* navbar-right */
.nav-links-right {
  position: relative;
  color: var(--secondary-color);
  text-decoration: none;
  margin: 0 8px;
  font-weight: 700;
  font-size: 17px;
}
.nav-links-right::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 2px;
  width: 0;
  background-color: black;
  transition: all 0.3s ease;
}
.nav-links-right:hover::after {
  width: 100%
}
.nav-links-left,
.nav-links-right {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

/* headers */
h1 {
  font-size: 30px;
  font-weight: 800;
  color: var(--secondary-color);
  max-width: 700px;
  margin: 0 auto;
  word-spacing: 5px;
  line-height: 35px;
}
h2 {
  font-size: 50px;
  color: var(--secondary-color);
  margin-bottom: 20px;
  line-height: 1.6;
  text-align: center;
  max-width: 90%;
  margin: 0 auto;
}
/* intro */
.intro {
  text-align: center;
  margin: 60px 20px;
}

.profile-pic {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 5px solid #0c1c33;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}
#intro{
  scroll-margin-top: 200px;
}
/* about */
.about {
  background: var(--primary-color);
  padding: 40px 20px;
  margin: 80px auto;
  height: 500px;
  border-radius: 6px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
}
/* in case you forget the password its 8d9f13f3893eeb0ba2d4bdd2dea628c80de7c3db3f5fe0cf28091dfb2e1fc172 */
.about-txt {
  max-width: 90%;
  margin: 0 auto;
  font-size: 23px;
  font-weight: 600;
  line-height: 50px;
  color: var(--secondary-color);
}
#aboutMe {
  scroll-margin-top: 100px;
}
/* skills */
.skills {
  padding: 40px 20px;
  margin: 80px auto;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
  border-radius: 6px;
}
.skills-txt {
  max-width: 90%;
  margin: 0 auto;
  font-size: 20px;
  font-weight: 600;
  line-height: 50px;
  color: var(--secondary-color);
}
#skills {
  scroll-margin-top: 100px;
}

/* coursework */
.coursework {
  background: var(--primary-color);
  padding: 40px 20px;
  margin: 80px auto;
  height: 500px;
  border-radius: 6px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
}
.coursework h2 {
  font-size: 40px;
  margin-bottom: 40px;
  font-weight: 800;
}
.projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}
.project-link {
  text-decoration: none;
  color: var(--secondary-color);
  transition: transform 0.3s ease;
  border-radius: 15px;
}
.project-link:hover {
  transform: scale(1.03);
}
.project {
  background: linear-gradient(to top, #a0eec0, #ffffff);
  color: #000;
  width: 100%;
  max-width: 375px;
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-40px);
  transition: all 0.6s ease-out;
}
.project.animate {
  opacity:1;
  transform: translateY(0);
}
.project-link:nth-child(2) .project {
  background: linear-gradient(to top, #c2b2f0, #ffffff);
}

.project-link:nth-child(3) .project {
  background: linear-gradient(to top, #99c8ff, #ffffff);
}
.project-link:nth-child(4) .project {
  background: linear-gradient(to top, #d2e04e, #ffffff);
}

.project img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 15px;
}

.project h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 10px 0;
}

.project p {
  font-size: 1rem;
  font-weight: 600;
}
#coursework {
  scroll-margin-top: 100px;
}

/* Responsive Design */
.logo-box {
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
  color: var(--secondary-color);
  border: 3px solid #111;
  padding: 10px 15px;
  border-radius: 6px;
  transition: background 0.4s, color 0.3s;
  display: inline-block;
}

.logo-box:hover {
  background-color: var(--secondary-color);
  color: white;
}
.logo-container {
  display: flex;
  align-items: center;
  width: 100%;
}



.menu-toggle-label {
  font-size: 24px;
  cursor: pointer;
  display: none;
}

#menu-btn {
  display: none;
}


/* Phones (max width: 600px) */
@media (max-width: 600px) {
  html, body {
  overflow-x: hidden;
}
  nav#mainNavbar {
    background-color: transparent;

  }
  .logo-box {
    display: none;
  }
  
  #menu-btn {
    position: fixed !important;
    top: 20px;
    left: 20px;
    z-index: 10001 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 900;
    background-color: rgb(245, 243, 242);
    color: black;
    border: 2px solid black;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }

  .menu-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100dvw;
    height: 100dvh;
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    padding-top: 70px;
    margin-left: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 999;
  }
  .mobile-logo {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--secondary-color);
  text-decoration: none;
  border: 3px solid #111;
  padding: 12px 18px;
  border-radius: 6px;
  margin-bottom: 20px;
  }

  .menu-links.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .menu-links.inactive {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
  }

  .menu-links.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .menu-links.closing {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
  }

  .menu-toggle:checked ~ .menu-links {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-left {
    display: flex;
    flex-direction: column;
    align-items: center;   /* ensures center alignment */
    justify-content: center;
    width: 100%;
    gap: 16px;
    padding: 0;
    margin: 0 auto;
    margin-bottom: 0;
    text-align: center;    /* makes text align with center if inline-block */
  }
  .nav-right a {
    display: block;
    margin-top: 0px;
    text-align: center;
  }
  .nav-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding-top: 0
  }

  .nav-links-right {
    display: flex;
    align-items: center;
    font-size: 18px;
    padding: 4px 0;
    color: var(--secondary-color);
  }
  .nav-links-left {
    font-size: 22px;
    font-weight: 800;
    padding: 10px 0;
    margin: 0;
    text-align: center;
    display: block;
  }
  .navbar.shrink {
  padding: 10px 16px !important;
  box-shadow: none !important;
  }


  h1 {
    font-size: 22px;
    line-height: 30px;
    padding: 0 10px;
  }

  h2 {
    font-size: 28px;
    line-height: 1.4;
  }

  .intro {
    margin: 30px 10px;
  }

  .profile-pic {
    width: 220px;
    height: 220px;
  }

  .about,
  .skills,
  .coursework {
    padding: 30px 15px;
    margin: 0px auto;
    height: auto;
  }

  .about-txt,
  .skills-txt {
    font-size: 18px;
    line-height: 36px;
  }

  .project {
    max-width: 80%;
    margin: 0 auto;
  }

  .projects {
    gap: 20px;
  }
}

/* menu animations */
.menu-links {
  transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
  will-change: transform, opacity, max-height;
}

.menu-links.show {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
}

.menu-links.closing {
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}
footer {
  text-align: center;
  padding: 20px;
  font-size: 16px;
}

footer p {
  margin: 0 auto;
  max-width: 90%;
}
