:root {
  --black: #171321;
  --dkblue: #0d314b;
  --plum: #4b0d49;
  --hotmag: #ff17e4;
  --magenta: #e310cb;
  --aqua: #86fbfb;
  --white: #f7f8fa;
  --font-size: 1.3rem;
  --mono: "Oxygen mono", monospace;
  --sans: Oxygen, sans-serif;
}
html {
  box-sizing: border-box;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}

/* generic styles */
body {
  padding: 0;
  margin: 0;
  font-family: var(--sans);
  background-color: var(--black);
  color: var(--white);
  font-size: var(--font-size);
}
h1,
h2,
h3 {
  margin: 0;
}
a {
  color: var(--magenta);
}
a:hover {
  color: var(--hotmag);
  text-decoration: none;
}
a:focus-visible,
.button:focus-visible,
input:focus-visible,
textarea:focus-visible,
fieldset:focus-within {
  outline: 3px solid var(--aqua);
  outline-offset: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  transform: translateY(-200%);
  background-color: var(--white);
  color: var(--black);
  padding: 0.5rem 0.75rem;
  border-radius: 5px;
  font-family: var(--mono);
}
.skip-link:focus-visible {
  transform: translateY(0);
}

/* bg colour divs */
.section-dkblue {
  background-color: var(--dkblue);
}
.section-dkblue a {
  color: var(--aqua);
}
.section-dkblue a:hover {
  color: var(--white);
}
.section-plum {
  background-color: var(--plum);
}
.gradient {
  background: linear-gradient(
    90deg,
    rgba(255, 23, 228, 1) 0%,
    rgba(134, 251, 251, 1) 97%
  );
  height: 2px;
}

/* intro */
#intro {
  padding: 4rem 1rem 10rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
#intro p {
  font-size: 1rem;
  line-height: 1.5;
}
#intro .name {
  font-family: var(--mono);
  font-size: 1rem;
}
.name span {
  font-family: var(--sans);
  font-size: 4rem;
  color: var(--aqua);
  display: block;
  font-weight: 300;
}
#intro h2 {
  font-size: 4rem;
}

/* projects and games sections */
#projects,
#games {
  padding: 4rem 1rem;
}
#projects h2,
#games h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
}
#projects h3,
#games h3 {
  color: var(--aqua);
}
.project-type {
  font-family: var(--mono);
  font-size: 1rem;
  margin: 0;
}
#projects article,
#games article {
  display: grid;
  gap: 1rem;
  margin-bottom: 4rem;
}
#projects article .text,
#games article .text {
  position: relative;
  z-index: 1;
}
#projects article:last-child,
#games article:last-child {
  margin-bottom: 0;
}
#projects ul,
#games ul {
  display: flex;
  flex-flow: row wrap;
  gap: 1rem;
  justify-content: flex-start;
  padding: 0;
  margin: 1rem 0;
  list-style-type: none;
  font-family: var(--mono);
  font-size: 1rem;
}
.portfolio-image {
  width: 100%;
  border-top: 1px solid var(--aqua);
  border-left: 1px solid var(--aqua);
  border-radius: 25px;
  padding: 1rem;
  position: relative;
  z-index: 0;
  overflow: hidden;
  background-color: var(--black);
}
.portfolio-image img {
  display: block;
  width: 100%;
  border-radius: 12px;
}
.project-placeholder {
  display: grid;
  min-height: 16rem;
  place-items: center;
  border-top: 1px solid var(--aqua);
  border-left: 1px solid var(--aqua);
  border-radius: 25px;
  padding: 1rem;
  background-color: var(--black);
}
.project-placeholder span {
  display: grid;
  width: 100%;
  min-height: 12rem;
  place-items: center;
  border: 2px solid var(--aqua);
  border-radius: 10px;
  color: var(--aqua);
  font-family: var(--mono);
  font-size: 2rem;
  text-align: center;
}
.blackbox {
  padding: 1rem;
  border-radius: 10px;
  background-color: var(--black);
  color: var(--white);
  font-size: 1rem;
  line-height: 1.5;
}

/* video section */
#video {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1rem;
}
#video h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
#video p {
  max-width: 65ch;
  font-size: 1rem;
  line-height: 1.5;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1.5rem;
  padding: 0;
  margin: 3rem 0 0;
  list-style-type: none;
}
.video-grid a {
  display: block;
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--dkblue);
  border-radius: 5px;
  background-color: var(--dkblue);
  color: var(--white);
  text-decoration: none;
}
.video-grid a:hover {
  color: var(--aqua);
}
.video-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 5px;
}
.video-grid span {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.4;
}

/* contact section */
#contact {
  width: min(100%, 40rem);
  text-align: center;
  margin: 0 auto;
  padding: 3rem 1rem;
}
form {
  margin-top: 2rem;
  text-align: left;
}
.form-field {
  margin-bottom: 1.25rem;
}
label {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--mono);
  font-size: 1rem;
}
input,
textarea {
  width: 100%;
  border: 2px solid transparent;
  border-radius: 5px;
  padding: 0.75rem;
  font: inherit;
  background-color: var(--white);
  color: var(--black);
}
textarea {
  resize: vertical;
}
button {
  border: 0;
  cursor: pointer;
  font-size: 1rem;
}

/* navigation */
nav {
  font-family: var(--mono);
  font-size: 80%;
  padding: 1rem;
}
nav h1 a {
  font-family: var(--sans);
}
nav ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}
nav li:first-child {
  flex-basis: 100%;
  text-align: center;
}
nav [class*="fa-"] {
  font-size: 150%;
  color: var(--aqua);
}
nav h1 [class*="fa-"] {
  font-size: 100%;
  color: var(--aqua);
}
nav a {
  color: white;
  text-decoration: none;
  display: block;
}
nav a:hover,
nav [class*="fa-"]:hover {
  color: var(--magenta);
}
.button {
  background-color: var(--aqua);
  color: var(--black);
  padding: 0.5rem;
  border-radius: 5px;
  font-family: var(--mono);
  text-decoration: none;
}
.button:hover {
  color: var(--black);
  background-color: var(--white);
}
@media (min-width: 850px) {
  nav {
    max-width: 1200px;
    margin: 0 auto;
  }
  nav li:first-child {
    flex-basis: auto;
    text-align: left;
    margin-right: auto;
  }
  #projects,
  #games {
    max-width: 1200px;
    margin: 0 auto;
  }
  #projects article,
  #games article {
    grid-template-columns: repeat(10, 1fr);
    align-items: center;
  }
  #projects article .text,
  #games article .text {
    grid-column: 1 / 6;
    grid-row: 1 / 2;
    order: 2;
  }
  #projects article .portfolio-image,
  #games article .portfolio-image {
    grid-column: 5 / 11;
    grid-row: 1 / 2;
  }
  #projects article .project-placeholder,
  #games article .project-placeholder {
    grid-column: 5 / 11;
    grid-row: 1 / 2;
  }
  #projects .reverse .text,
  #games .reverse .text {
    grid-column: 6 / 11;
    text-align: right;
  }
  #projects .reverse .portfolio-image,
  #games .reverse .portfolio-image {
    grid-column: 1 / 7;
  }
  #projects .reverse .project-placeholder,
  #games .reverse .project-placeholder {
    grid-column: 1 / 7;
  }
  #projects .reverse ul,
  #games .reverse ul {
    justify-content: flex-end;
  }
}

/* footer */
footer {
  text-align: center;
  padding: 4rem 1rem;
}
footer h2 span:last-child {
  display: inline-block;
}
footer ul {
  list-style-type: none;
  padding: 0;
  margin: 2rem 0;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  gap: 3rem;
  font-size: 3rem;
}

@media (max-width: 600px) {
  .footer-separator {
    display: none;
  }
  footer h2 span:last-child {
    display: block;
    margin-top: 0.25rem;
  }
}
