@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@300;400;600&display=swap");
@import url(https://fonts.googleapis.com/css?family=VT323);
*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  font-family: "Roboto Mono", monospace;
  box-sizing: border-box;

  --primary-color: #2c3333;
  --secondary-color: #395b64;
  --accent-1: #a5c9ca;
  --accent-2: #e7f6f2;

  --neutral-1: black;
  --neutral-2: white;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* Navbar styles */

header {
  display: flex;
  align-items: center;
  justify-content: center;

  max-width: 100vw;
  background-color: var(--primary-color);
}

a {
  font-size: 14px;
  text-decoration: none;
}

h1 {
  font-family: 'VT323', Courier;
}

.navbar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 1rem;
  width: 90%;
}

.nav-logo {
  grid-column: 1;
}

.nav-logo > h1 {
  font-size: 30px;
  font-family: 'VT323', Courier;
  color: var(--accent-1);
}

.primary-nav {
  display: flex;
  list-style: none;
  gap: 16px;

  grid-column: 2;
  justify-self: end;
}

.mobile-nav-toggle {
  display: none;
  cursor: pointer;
}

.nav-link:link,
.nav-link:visited {
  font-size: 30px;
  font-family: 'VT323', Courier;

  color: var(--accent-2);

  transition: 300ms ease-in-out;
}

.nav-link:hover {
  font-weight: 600;
  color: var(--accent-1);
}

@media only screen and (max-width: 35em) {
  .primary-nav {
    position: fixed;
    inset: 0 0 0 0;
    flex-direction: column;

    padding: min(30vh, 6rem) 2rem;
    background-color: var(--primary-color);

    z-index: 9999;

    transform: translateX(100%);
    transition: transform 350ms ease-out;
  }

  .nav-link:link,
  .nav-link:visited {
    font-size: 20px;
    color: var(--accent-1);
  }

  .primary-nav[data-visible="true"] {
    transform: translateX(0%);
  }

  .mobile-nav-toggle[aria-expanded="true"] {
    background: url(./assets/icons/mobile-icon-exit.svg) center center no-repeat;
  }

  .mobile-nav-toggle {
    display: block;
    position: absolute;
    background: url(./assets/icons/mobile-icon.svg) center center no-repeat;

    width: 1.25rem;
    aspect-ratio: 1;

    border: none;

    top: 1.4rem;
    right: 2.5rem;
    z-index: 10000;

    transition: 250ms ease-in-out;
  }
}

/* Section styles */

section {
  display: flex;
  align-items: center;
  justify-content: center;

  max-width: 100vw;
  position: relative;
}

/* HERO */
#hero {
  background-color: var(--primary-color);
  border-bottom: 4px solid var(--secondary-color);
  
}

.hero-container {
  display: flex;
  flex-direction: column;
  gap: 16px;

  padding: 2.2rem;
  width: 90%;
  height: 350px;

  animation: fade-in 500ms linear forwards;
}

.hero-text-container > h2 {
  font-size: 30px;
  font-family: 'VT323', Courier;

  color: var(--accent-1);
}

.hero-text-container > p {
  font-size: 25px;
  font-family: 'VT323', Courier;

  color: var(--accent-2);
}

.hero-button {
  align-self: flex-start;

  font-size: 17px;
  font-family: 'VT323', Courier;
  padding: 1em;
  color: var(--accent-2);
  background-color: transparent;

  border: 1px solid var(--accent-2);
  box-shadow: 4px 4px 0px var(--accent-1);

  transition: 300ms ease-in-out;
}

.hero-button:hover {
  background-color: var(--accent-2);
  color: var(--primary-color);
  box-shadow: 6px 6px 0px var(--secondary-color);
}

/* ABOUT */

#about {
  padding: 2rem;
  margin-top: 36px;
  animation: fade-in 500ms linear forwards;
}

.wave-asset {
  width: 100%;
  position: absolute;

  top: 0;
  left: 0;
}

.about-container {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 90%;
  z-index: 999;
}

.about-card,
.portfolio-card,
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 16px;

  border: 1px solid var(--secondary-color);
  background-color: var(--neutral-2);

  width: 100%;
  padding: 1rem;

  box-shadow: 4px 4px 0px var(--accent-1);
}

.about-content,
.portfolio-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.about-content > h2,
.about-content > h3 {
  color: var(--primary-color);
}

.about-content > p {
  font-size: 12px;
}

.tech-stack-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  place-items: center;
}

.tech-stack {
  --size: 30px;
  width: var(--size);
  aspect-ratio: 1;
}


/* Portfolio container */

#portfolio {
  padding: 2rem;
  animation: fade-in 500ms linear forwards;
}

.portfolio-container {
  width: 90%;
  z-index: 999;
}

.project-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.portfolio-content > h2 {
  color: var(--primary-color);
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 4px;

  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--accent-1);
}

.project-card > h3 {
  color: var(--secondary-color);
}

.project-card > h5 {
  color: var(--secondary-color);
  opacity: 0.5;
}

.project-card > p {
  font-size: 13px;
  width: 100%;
  /* display: -webkit-box; */
  /* -webkit-box-orient: vertical; */
  /* -webkit-line-clamp: 3; */
  /* overflow: hidden; */
}

.project-img {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
}

.project-card-links {
  align-self: flex-end;

  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-icons {
  --size: 20px;
  width: var(--size);
  aspect-ratio: 1;
}

.project-card-links > a {
  display: flex;
  align-items: center;

  font-size: 10px;
  gap: 4px;
}

.project-card-links > a:link,
.project-card-links > a:visited {
  color: var(--primary-color);
}

/* CONTACT */
#contact {
  padding: 2rem;
  animation: fade-in 500ms linear forwards;
}

.contact-container {
  width: 90%;
  z-index: 999;
}

.contact-card {
  width: 100%;
  gap: 12px;
}
.contact-card > h2 {
  color: var(--primary-color);
}

.contact-card > p {
  font-size: 12px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-links > a {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-links > a:link,
.contact-links > a:visited {
  color: var(--secondary-color);
}

.contact-icons {
  --size: 20px;
  width: var(--size);
  aspect-ratio: 1;
}

/* extras */
.section-highlight {
  font-size: 4rem;
  font-weight: 600;
  opacity: 0.5;
  color: var(--accent-1);

  position: absolute;
  top: 0;
  left: 100px;
}

/* footer */
footer {
  display: flex;
  align-items: center;
  justify-content: center;

  max-width: 100vw;
  background-color: var(--secondary-color);
  min-height: 150px;
}

.footer-content {
  text-align: center;
  font-size: 12px;
  width: 90%;

  color: var(--accent-2);
}

.footer-content > a {
  text-decoration: underline;
}

.footer-content > a:link,
.footer-content > a:visited {
  color: var(--accent-2);
}

/* media queries */

@media only screen and (max-width: 35em) {
  .hero-container {
    padding: 1rem;
    height: 250px;
  }
  .project-container {
    grid-template-columns: 1fr;
  }
  .tech-stack-grid {
    width: 100%;
  }
  .section-highlight {
    font-size: 3.5rem;
    top: -16px;
    left: 6vw;
  }
  
}

@media only screen and (min-width: 35em) {
  .hero-container {
    height: 250px;
  }
  .about-container,
  .portfolio-container,
  .contact-container {
    width: 75%;
  }

  .about-card,
  .portfolio-card {
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 20px;
  }

  .section-highlight {
    top: -26px;
    left: 10vw;
  }
}

@media only screen and (min-width: 768px) {
  .nav-logo > h1 {
    font-size: 36px;
  }

  /* hero */
  .hero-container {
    height: 350px;
  }

  .hero-text-container > p {
    font-size: 29px;
  }

  .hero-text-container > h2 {
    font-size: 66px;
  }

  .hero-button {
    font-size: 23px;
  }

  /* about */
  .about-card {
    gap: 40px;
  }

  .about-content > h2 {
    font-size: 32px;
  }

  .about-content > h3 {
    font-size: 24px;
  }

  .about-content > p {
    font-size: 16px;
  }

  .tech-stack-section {
    align-self: flex-start;
    margin-top: 8px;
  }

  .tech-stack {
    --size: 40px;
    width: var(--size);
    aspect-ratio: 1;
  }

  /* portfolio */
  .portfolio-content > h2 {
    font-size: 32px;
  }
  .project-card > h3 {
    font-size: 24px;
  }

  .project-card > h5,
  .project-card > p {
    font-size: 16px;
  }

  .project-card-links > a {
    font-size: 16px;
  }

  /* contacts */
  .contact-card > h2 {
    font-size: 32px;
  }

  .contact-card > p {
    font-size: 16px;
  }

  .contact-links > a {
    font-size: 16px;
  }
  .footer-content,
  .footer-content > a {
    font-size: 16px;
  }
}

@media only screen and (min-width: 1024px) {
  .section-highlight {
    top: -26px;
    left: 10vw;
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
