:root {
  --clr-background: #000101;
  --clr-text: #e8ffff;
  --clr-primary: #007f5f;
  --clr-secondary: #2b9348;
  --clr-accent-rich: #dddf00;
  --clr-accent-dull: #ffff3f;
}

html {
  color: var(--clr-text);
  background: var(--clr-background);
  font-family: system-ui, sans-serif;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

.page-link {
  position: relative;
  top: -8vh;
}

/* -----Main Content----- */
main {
  position: relative;
  margin: 0 1% 0 31%;
  padding: 0 1% 0 1%;
}

main::after {
  content: "";
  position: absolute;
  top: 10svh;
  left: 0;
  height: 98%;
  width: 2px;
  background: var(--clr-text);
  z-index: 998;
}

@media only screen and (max-width: 1000px) {
  main {
    margin: 0 1% 0 1%;
    padding: 0 1% 0 1%;
  }

  main::after {
    display: none;
  }
}

/* -----About Section----- */
.about {
  isolation: isolate;
  position: relative;
}

.about::after {
  content: "";
  position: absolute;
  top: 60%;
  left: -150%;
  width: 230%;
  min-height: 30%;
  transform: skewX(-8deg) rotate(-8deg);
  background: linear-gradient(
    to right,
    var(--clr-primary) 50%,
    transparent 50%
  );
  z-index: -1;
  animation: slide-in 2s ease-out 1 forwards;
}

.about-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.about-slogan {
  margin-inline: 0.6rem;
  margin-top: -4rem;
  color: hsl(0 0 100% / 0);
  background-image: linear-gradient(
    170deg,
    var(--clr-text) 30%,
    var(--clr-primary)
  );
  background-clip: text;
  font-size: 1.125rem;
  font-style: italic;
}

.about-grid-wrapper {
  padding-top: 20svh;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  gap: 3rem;
}

.about-text {
  margin-top: 5svh;
  padding: 1rem;
  border: 5px solid var(--clr-primary);
  border-radius: 3px 25px 25px 3px;
  background-color: var(--clr-background);
}

.about img {
  position: relative;
  max-height: 80svh;
}

@media only screen and (max-width: 1000px) {
  .about-grid-wrapper {
    padding-top: 5svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
  }

  .about-grid-wrapper h2 {
    width: 100%;
    margin-top: 5svh;
    padding: 0.4rem;
    border-radius: 5px 20px 5px 20px;
    background: color-mix(in srgb, var(--clr-primary) 75%, transparent);
  }

  .about img {
    position: relative;
    max-height: 35svh;
    border: 5px solid color-mix(in srgb, var(--clr-text) 10%, transparent);
    border-radius: 5px;
  }
}

/* -----Projects Section----- */
.projects {
  margin: 20svh 0;
}

.projects h2 {
  margin-bottom: 1.2em;
  padding: 0.4rem;
  border-radius: 5px 20px 5px 20px;
  background: color-mix(in srgb, var(--clr-secondary) 75%, transparent);
}

.projects-grid-wrapper {
  display: grid;
  grid-template: 1fr 1fr / 1fr 1fr;
  gap: 1rem;
}

.project.inactive {
  --trans: all 0.25s;
  --desc-fs: 0rem;
  --title-pos-top: calc(100% - 6rem);
  --title-clr: var(--clr-background);
  --img-pos-top: 0%;
  --img-pos-left: 0%;
  --img-width: 100%;
  --img-brdr: 5px solid transparent;
  cursor: pointer;
  position: relative;
  border: 2px solid transparent;
  border-radius: 20px;
  opacity: 0.7;
  transition: var(--proj-trans);
}

.project.active {
  --trans: all 0.25s;
  --desc-fs: clamp(0.7rem, 5vw + 1rem, 1.1rem);
  --title-pos-top: 35%;
  --title-clr: var(var(--clr-text));
  --img-pos-top: -20%;
  --img-pos-left: 20%;
  --img-width: 60%;
  --img-brdr: 5px solid var(--clr-background);
  cursor: pointer;
  position: relative;
  border-radius: 20px;
  background: linear-gradient(
    160deg,
    transparent,
    color-mix(in srgb, var(--clr-text) 10%, transparent)
  );
  opacity: 0.7;
  transition: var(--trans);
}

.project:hover {
  opacity: 1;
}

.project-title {
  position: absolute;
  top: var(--title-pos-top);
  left: 1rem;
  color: var(--title-clr);
  font-size: clamp(1.5rem, 4vw + 1rem, 3rem);
  font-weight: bold;
  transition: var(--trans);
}

.project-image {
  position: relative;
  top: var(--img-pos-top);
  left: var(--img-pos-left);
  width: var(--img-width);
  border: var(--img-brdr);
  border-radius: 20px;
  object-fit: cover;
  transition: var(--trans);
}

.project-description {
  padding-block: 0.5rem;
  padding-inline: 1rem;
  font-size: var(--desc-fs);
  transition: var(--trans);
}

@media only screen and (max-width: 1000px) {
  .projects {
    margin: 10svh 0;
  }

  .projects-grid-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .project.inactive {
    --trans: all 0s;
    --title-fs: clamp(1.5rem, 4vw + 1rem, 3rem);
    opacity: 1;
  }

  .project.active {
    --trans: all 0s;
    --desc-fs: clamp(0.7rem, 5vw + 1rem, 1.1rem);
    --title-pos-top: 0;
    --title-clr: var(--clr-background);
    --title-fs: 0;
    --img-pos-top: -20%;
    --img-pos-left: 0%;
    --img-width: 100%;
    --img-brdr: 5px solid var(--clr-background);
    cursor: pointer;
    position: relative;
    border-radius: 20px;
    background: linear-gradient(
      160deg,
      transparent,
      color-mix(in srgb, var(--clr-text) 10%, transparent)
    );
    opacity: 1;
    transition: var(--trans);
  }

  .project-title {
    font-size: var(--title-fs);
    transition: all 0s;
  }
}

/* -----Contact Section----- */
.contact {
  margin-block: 20svh 15svh;
}

.contact h2 {
  width: fit-content;
  margin-bottom: -1.5rem;
  margin-left: 6%;
  padding-inline: 1rem;
  font-size: clamp(1.5rem, 4vw + 1rem, 4rem);
  background: var(--clr-background);
}

.contact form {
  min-height: 70svh;
  margin-inline: 2%;
  border: 6px solid var(--clr-accent-rich);
  border-radius: 35px;
  padding-top: 3.5rem;
  padding-bottom: 2rem;
  padding-inline: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
}

.contact .labelled-input {
  width: 100%;
  padding-block: 2%;
  padding-inline: 10%;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.contact label {
  font-size: clamp(1rem, 2vw + 1rem, 1.5rem);
  font-weight: bold;
}

.contact input {
  width: 80%;
  padding-block: 0.05rem;
  padding-inline: 0.4rem;
  border-radius: 5px;
  min-height: 1rem;
  font-weight: bold;
}

.contact .message {
  min-height: 10rem;
  width: 80%;
  padding-block: 0.05rem;
  padding-inline: 0.4rem;
  border-radius: 5px;
  font-weight: normal;
}

.contact .submit-message {
  height: 2.5rem;
  min-width: 25%;
  margin-top: 1rem;
  padding: 0.1rem 0.5rem 2.3rem 0.5rem;
  border: 2px solid color-mix(in srgb, var(--clr-background) 40%, transparent);
  border-radius: 20px;
  background: var(--clr-accent-rich);
  font-size: 1.5rem;
  font-weight: bold;
  transition: all 0.2s;
}

.contact .submit-message:hover {
  min-width: 30%;
  border: 2px solid var(--clr-accent-rich);
  color: var(--clr-text);
  background: var(--clr-background);
}

@media only screen and (max-width: 1000px) {
  .contact {
    margin-block: 10svh 5svh;
  }

  .contact .labelled-input {
    width: 100%;
    padding-block: 2%;
    padding-inline: 10%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .contact input {
    width: 100%;
  }

  .contact .message {
    width: 100%;
  }
}

/* -----Footer----- */
footer {
  margin: 0 2% 0 32%;
}

.footer-info {
  margin-bottom: 5svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
  color: color-mix(in srgb, var(--clr-text) 75%, transparent);
  font-size: 1.125rem;
}

.footer-info li {
  display: flex;
  align-items: center;
}

.social-link {
  margin-bottom: 3rem;
  margin-left: 15%;
  align-self: flex-start;
}

.footer-info a {
  margin-left: 1rem;
  color: var(--clr-text);
  font-size: 1.25rem;
}

.footer-info a:hover {
  color: var(--clr-primary);
}

.footer-info img {
  width: 3rem;
  filter: invert(1);
}

.ell {
  position: relative;
  top: 85%;
  left: 0;
  text-align: center;
  font-style: italic;
}

@media only screen and (max-width: 1000px) {
  footer {
    margin: 0 2% 0 2%;
    text-align: center;
  }
}

/* -----Utility Classes----- */
strong {
  font-weight: bold;
}

.clr-primary {
  color: var(--clr-primary);
}

.clr-secondary {
  color: var(--clr-secondary);
}

.clr-accent-dull {
  color: var(--clr-accent-dull);
}

.clr-accent-rich {
  color: var(--clr-accent-rich);
}

.brdr-b-primary {
  border-bottom: 2px solid var(--clr-primary);
}

.brdr-b-secondary {
  border-bottom: 2px solid var(--clr-secondary);
}

.brdr-b-accent-dull {
  border-bottom: 2px solid var(--clr-accent-dull);
}

.brdr-b-accent-rich {
  border-bottom: 2px solid var(--clr-accent-rich);
}

.section-header {
  position: relative;
  margin: 0 0 20svh 0;
  text-align: center;
  line-height: 1;
  font-size: clamp(4rem, 4vw + 1rem, 8rem);
  font-weight: bold;
  transition: all 0.25s;
}

/* -----Animations----- */
@keyframes progress {
  to {
    width: 91.5%;
  }
}

@keyframes slide-in {
  to {
    top: 50%;
    left: -10%;
  }
}

@keyframes parallax {
  to {
    transform: translateY(30%);
  }
}

@keyframes color-reveal {
  to {
    background-size: 100% 100%;
  }
}
