@import "./about.css";
@import "./projects.css";
@import "./contact.css";

* {
  box-sizing: border-box;
}

:root {
  font-size: 21px;
}

body {
  --lighter: white;
  color: rgba(0, 0, 0, 0.6);

  height: 100vh;
  font-family: "Patrick Hand SC", "Segoe Ui";
  background-size: 20px 40px;
  background-image: repeating-linear-gradient(
    0deg,
    #70707020,
    #70707020 2px,
    #e5e5f720 2px,
    #e5e5f720
  );
}

body.dark {
  --lighter: color-mix(in srgb, black, steelblue 22%);
  color: rgba(255, 255, 255, 0.6);
  background-color: rgb(17, 22, 30);
  background-image: unset;
}

a {
  text-decoration: none;
  color: steelblue;
}

h1 {
  margin-top: 0;
}

p {
  margin: 0 0 0.75rem 0;
}

.layout {
  padding: 1rem 0;
  display: grid;
  grid-template-columns: 2fr 10fr;
  gap: 1rem;
  max-width: 800px;
  margin: auto;
}

nav {
  width: fit-content;
  margin: auto;
  position: sticky;
  top: 1.5rem;

  display: flex;
  flex-direction: column;
  gap: 1rem;

  button {
    padding: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    background-color: var(--lighter);

    font-family: inherit;
    font-size: 0.9rem;
    letter-spacing: 0.75px;
    font-weight: 700;
    color: inherit;

    z-index: 5;
    cursor: pointer;
    transition: 0.2s ease-in-out transform;

    &.active {
      border: 4px dashed steelblue;
      color: steelblue;
    }

    &:hover:not(.active) {
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
      transform: rotate(5deg);
    }
  }

  i {
    font-size: 2rem !important;
    inline-size: 100%;
  }
}

article {
  padding: 0.75rem;
  width: 100%;
  background-color: var(--lighter);
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.divider {
  opacity: 0.25;
  border-bottom: 8px dashed;
}

footer {
  display: grid;
  place-items: center;
  padding: 6rem 0;
}

@media screen and (max-width: 650px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 0.5rem;
  }

  nav {
    z-index: 5;
    padding: 0.25rem 1rem 0.5rem 0.5rem;
    position: fixed;
    top: unset;
    bottom: 0;
    left: 0;
    width: 100%;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    background-color: var(--lighter);

    flex-direction: row;
    gap: 0.5rem;
    justify-content: space-evenly;

    button {
      padding: 0;
      border: 0;
      font-size: 0.85rem;
      line-height: 0.75rem;

      &.active {
        border: unset;
      }

      &:hover:not(.active) {
        box-shadow: unset;
        transform: unset;
      }
    }

    i {
      font-size: 1.4rem !important;
    }
  }
}
