:root {
  --border: 1px solid;
  --font: 'Rubik', sans-serif;
  --radius: 1rem;
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --fcc-accent: #feac32;
  --main-accent: #ff14af;
  --top-accent: #0f766e;
  --fcc-bg: #1b1b32;
  --main-bg: #eee;
  --top-bg: #111827;
  --fcc-fg: #f5f6f7;
  --main-fg: #1a1a1a;
  --top-fg: #d1d5db;
  scroll-behavior: smooth;
  scrollbar-width: thin;

  --box-shadow: 0 0 2px 1px;
  --tile-shadow: 0 0 1rem 0;
}

body {
  accent-color: var(--main-accent);
  background: var(--main-bg);
  color: var(--main-fg);
  font-family: var(--font);
  user-select: none;
}

a {
  color: currentColor;
  font-weight: bold;
  text-decoration: none;
  transition: var(--transition);
}

@media (hover: hover) {
  nav, footer {
    & a:hover {
      color: var(--main-accent);
    }
  }
}

nav {
  align-items: center;
  background: var(--main-fg);
  border-bottom: var(--border) var(--main-bg);
  display: flex;
  height: max-content;
  justify-content: space-evenly;
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  z-index: 1;

  & a {
    color: var(--main-bg);
  }
}

#welcome-section {
  align-items: center;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  justify-content: center;
  text-align: center;

  & h1 {
    display: inherit;
    flex-direction: column;

    & span {
      font-style: italic;
      font-weight: normal;
    }
  }

  & p {
    font-size: 1.375rem;
    margin: 0 1rem;
    max-width: 22rem;
  }

  & img {
    border-radius: 100%;
    box-shadow: var(--box-shadow) var(--main-fg);
    height: 8rem;
    width: 8rem;
  }
}

main {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  justify-content: center;
  padding: 3rem 1rem;
  scroll-margin-top: 3rem;
  text-align: center;

  & h2 {
    font-weight: normal;
    margin: 0;
  }

  & div {
    display: inherit;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: center;
    max-width: 95%;
  }
}

.project-tile {
  align-items: center;
  border-radius: var(--radius);
  box-shadow: var(--box-shadow) var(--fcc-fg);
  display: inherit;
  flex-direction: column;
  height: 30rem;
  justify-content: space-between;
  padding: 0.625rem 1.25rem;
  width: 21.5rem;

  & header {
    & h3 {
      font-size: 1.25rem;
    }

    & p {
      font-size: 1.125rem;

      & span {
        font-weight: bold;
      }
    }
  }

  & figure {
    align-items: center;
    display: inherit;
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
    padding: 2rem;

    & a {
      border: var(--border) currentColor;
      border-radius: var(--radius);
      color: var(--fcc-accent);
      font-size: 1.25rem;
      padding: 0.5rem 0.625rem;
      width: 9rem;

      @media (hover: hover) {
        &:hover {
          background: var(--fcc-accent);
          color: var(--fcc-bg);
        }
      }
    }

    & div {
      align-items: center;
      display: inherit;
      flex-direction: column;
      gap: 0.75rem;
      justify-content: center;
      min-width: fit-content;

      & a {
        color: currentColor;

        @media (hover: hover) {
          &:hover {
            background: var(--fcc-fg);
            color: var(--fcc-bg);
          }
        }
      }
    }
  }
}

.all-button {
  border: var(--border) currentColor;
  border-radius: var(--radius);
  color: currentColor;
  font-size: 1.25rem;
  padding: 0.5rem 0.625rem;
  width: 9rem;

  @media (hover: hover) {
    &:hover {
      background: var(--fcc-fg);
      color: var(--fcc-bg);
    }

    &.top:hover {
      background: var(--top-fg);
      color: var(--top-bg);
    }
  }
}

#projects {
  background: var(--fcc-bg);
  box-shadow: var(--tile-shadow) var(--fcc-bg);
  color: var(--fcc-fg);

  & h2 {
    @media (hover: hover) {
      & a:hover {
        color: var(--fcc-accent);
      }
    }
  }
}

#projects-top {
  background: var(--top-bg);
  box-shadow: var(--tile-shadow) var(--top-bg);
  color: var(--top-fg);

  & h2 {
    @media (hover: hover) {
      & a:hover {
        color: var(--top-accent);
      }
    }
  }

  & .project-tile {
    box-shadow: var(--box-shadow) var(--top-fg);

    & figure {
      & a {
        color: var(--top-accent);

        @media (hover: hover) {
          &:hover {
            background: var(--top-accent);
            color: var(--top-bg);
          }
        }
      }

      & div {
        & a {
          color: currentColor;

          @media (hover: hover) {
            &:hover {
              background: var(--top-fg);
              color: var(--top-bg);
            }
          }
        }
      }
    }
  }
}

footer {
  align-items: center;
  display: flex;
  flex-direction: column;
  font-size: 1.25rem;
  gap: 1rem;
  justify-content: center;
  padding: 3rem 1rem;
}
