:root {
  --bg: #0d1117;
  --card: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #a78bfa;
  --accent-lt: #1e1030;
  --header-bg: #161b22;
  --header-fg: #e6edf3;
}

html {
  box-sizing: border-box;
  overflow-x: hidden;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

* {
  font-family: "Lato", sans-serif;
  color: var(--text);
}

body {
  margin: 10px 0 0 0;
  background-color: var(--bg);
  overflow-x: hidden;
  padding-top: 60px;

  background-image: url("../img/bg-atmosphere.svg");
  background-size: cover;
  background-repeat: no-repeat;
}

main {
  margin: 0 auto;
  max-width: 95vw;
}

/* ---------- Navbar ---------- */

/* Class Note: This nav took a long time to figure out. For the hamburger menu, I originally used AI 
* but rebuilt it by hand once I spent a day learning it. I took a lot of visual inspiration from the navbar
* over at https://few.io. My menu popout was originally a slide-out, but I couldn't get it
* looking the way I wanted it to so just went to a simple fade-in positioned between the nav
* and the rest of the content with a background blur. */

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

  background: rgba(32, 37, 44, 0.6);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(155, 155, 155, 0.4);
  border-radius: 5px;
  padding: 0 1rem;
  width: 95vw;
  margin: 1vh auto;

  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 48px;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  max-height: 20px;
}

.nav-logo img:hover {
  transform: scale(1.2);
  transition: 0.3s ease;
}

.nav-menu {
  display: flex;
  flex-direction: column;

  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100dvh;
  justify-content: center;
  align-items: center;
  background: rgba(32, 37, 44, 0.9);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(155, 155, 155, 0.4);
  padding: 0 0;
  list-style: none;
  margin: 0;
  border-radius: 0 0 10px 10px;
  visibility: hidden;

  opacity: 0;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  z-index: 98;
}

.nav-menu.open {
  visibility: visible;
  opacity: 1;
}

.nav-menu a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--text);
  text-decoration: none;
  text-align: center;
  font-size: 2rem;
  font-weight: 500;
  font-variant: small-caps;
  line-height: 2.5;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle:hover {
  transform: scale(1.2);
  transition: 0.3s ease;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: all 0.3s ease;
}

/* ---------- Body ---------- */
header.primary {
  position: relative;
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  padding: 0px 0px;
  text-align: center;
  margin-bottom: 10px;
}

header.primary::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--muted) 20%,
    var(--muted) 80%,
    transparent
  );
}

header.primary h1 {
  font-size: 2rem;
  margin-bottom: 0;
  font-variant: small-caps;
}

header.primary h2 {
  font-size: 1rem;
}

h3 {
  text-align: center;
  font-variant: small-caps;
}

h3.questionnaire {
  font-size: 1rem;
  font-variant: small-caps;
  text-align: center;
  margin: 35px auto 0px auto;
}

.paragraph-block {
  font-size: 1.1rem;
  line-height: 1.5;
  text-align: justify;
  padding: 5px 15px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
  margin-top: 30px;
  width: 100%;
}

p.questionnaire-block {
  margin-top: 15px;
}

.content {
  border-radius: 5px;
  padding: 5px 0px;
  text-align: center;
}

.content * {
  font-size: 1.2rem;
  list-style-type: none;
  padding: 0px;
}

.content ul {
  display: grid;
  /* I was having issues with the squares growing/shrinking unevenly. minmax allows these squares to
* be responsive and all grow uniformly. I honestly don't completely understand it just yet, but I think
* it actually adjusts the size of the grid tracks themselves. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto;
  gap: 2rem;
  margin: 0 4vw;
}

.content ul li {
  display: flex;
  justify-content: center;
  align-items: center;

  text-decoration: none;
  background-color: rgba(22, 27, 34, 0.6);
  border-radius: 3px;
  border: 1px solid var(--border);
  aspect-ratio: 1;

  box-shadow: inset 0 0 25px rgba(167, 139, 250, 0.16);
  background-image: url("../img/bg-circuit.svg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

.content ul li:active {
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
  transform: scale(0.97);
}

.content ul li a {
  display: flex;
  justify-content: center;
  align-items: center;
  font-variant: small-caps;
  text-decoration: none;
  background-color: rgba(22, 27, 34, 0.3);
  font-size: clamp(1.2rem, 5vw, 2.5rem);
  width: 100%;
  height: 100%;
  margin: 0 0;
  padding: 1rem;
}

#projects {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  margin-top: 10px;
}

#projects h3 {
  font-size: 1.4rem;
}

#gridlab ul {
}

footer {
  margin: 5vh 0 1vh;
  text-align: center;
  font-variant: small-caps;
}

/* ------------ Resume Page ------------ */

h1#resume-name,
h2 {
  text-align: center;
  font-variant: small-caps;
  margin-bottom: 10px;
}

h2 {
  color: var(--accent);
}

section#external-links {
  display: flex;
  justify-content: center;
  gap: 40px;
  position: relative;
  padding-bottom: 10px;
}

/* Had to look this up, it's to get the fade-out effect on the "border" lines. */
section#external-links::after,
section#information::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--muted) 20%,
    var(--muted) 80%,
    transparent
  );
}

section#information {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 3px 3vw;
  font-variant: small-caps;
}

section#information p {
  margin: 0;
  color: var(--muted);
}

p#intro {
  font-size: 1.1rem;
  line-height: 1.5;
  text-align: justify;
  padding: 5px 15px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
  margin-bottom: 30px;
  width: 100%;
}

#skills {
  display: none;
}

#skills ul {
  list-style-type: none;
  text-align: center;
  padding-left: 0;
  line-height: 1.5;
}

.job-infoblock,
.certification {
  border: 1px solid transparent;
  margin: 0vh 1vw;
  padding: 8px 0 0;
  border-radius: 5px;
  /* background-color: var(--card-light);
  box-shadow: 0px 0px 8px #000 inset; */
}

.certification {
  max-width: 80%;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
  margin: 2vh auto;
}

.job-company,
.cert-name {
  margin: 0;
  padding: 0 3vw;
  font-size: 1.3rem;
  font-variant: small-caps;
  text-align: center;
}

.job-title,
.job-location,
.job-dates,
.issuer,
.cert-dates {
  margin: 0 0 3px;
  padding: 0 3vw;
  font-weight: 300;
  text-align: center;
}

.job-location,
.job-dates {
  display: none;
}

.job-description {
  position: relative;
  margin: 0px 2vw 30px;
  padding: 5px 15px;
  font-size: 1.1rem;
  text-align: justify;
  font-weight: 400;
  line-height: 1.5;

  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
}

.hidden {
  display: none;
}

iframe {
  margin-top: 50px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  width: 100%;
  height: 100vh;
}

/* ---------- Media Queries ---------- */

/* 768px */
@media screen and (min-width: 48rem) {
  /* -------- Navbar -------- */

  /* -------- Index Page -------- */

  /* Set these all on clamps but honestly not sure if they're working. */
  header.primary h1,
  #projects h3,
  #gridlab h3 {
    font-size: clamp(1.4rem, 6vw, 2.5rem);
  }

  header.primary h2,
  h3.questionnaire {
    font-size: clamp(1rem, 6vw, 1.7rem);
  }

  .content ul {
    align-items: start;
    grid-template-columns: repeat(4, 1fr);
    margin: 0 auto;
    max-width: 80rem;
  }

  .content ul li {
    overflow: hidden;
  }

  .content ul li a {
    font-size: clamp(1rem, 3vw, 2.5rem);
  }

  /* ---------- Resume ---------- */
  .resume-info-top {
    width: 98%;
    margin: 0 auto;
    position: relative;
    display: grid;
    padding-bottom: 1rem;
    grid-template-columns: 3fr 3fr;
    grid-template-rows: auto;
    grid-template-areas:
      "resumename resumename"
      "ext-links ext-links"
      "information information"
      "intro extrainfo";
  }

  .resume-info-top::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
      to right,
      transparent,
      var(--muted) 20%,
      var(--muted) 80%,
      transparent
    );
  }

  #skills {
    grid-area: skills;
  }

  #resume-name {
    grid-area: resumename;
  }

  #external-links {
    grid-area: ext-links;
  }

  #external-links a img {
  }

  #external-links a img:hover {
    transform: scale(1.3);
    transition: ease 0.2s;
  }

  p#intro {
    grid-area: intro;
    padding: 5px 15px;
    margin: 2vh 2vw 30px;
  }

  #information {
    grid-area: information;
  }

  .hidden {
    display: block;
  }

  #expanded-info {
    grid-area: extrainfo;
    padding: 0 3vw;
    margin-top: 1em;

    & dl {
      display: grid;
      grid-template-columns: 1fr 6fr;
      grid-template-rows: auto;
      font-size: 0.9rem;
      line-height: 1.5;
    }

    & dt {
      font-weight: 600;
      font-variant: small-caps;
    }

    & dd {
      margin-right: 0;
      margin-bottom: 1vh;
      text-align: end;
    }
  }

  .job-infoblock {
    border: 0;
    margin: 0;
    padding: 0;
    border-radius: 0px;
    background-color: transparent;
    box-shadow: none;

    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;

    .job-location,
    .job-dates {
      display: inline-block;
    }

    & h3,
    & .job-location {
      text-align: start;
    }

    & .job-title {
      font-weight: 600;
      font-variant: small-caps;
    }

    & .job-title,
    & .job-dates {
      text-align: end;
    }
  }

  #certifications {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 20px;

    & h2 {
      grid-area: 1 / 1 / 2 / 3;
    }
  }

  .certification {
    max-width: 480px;
    margin: 2vh auto;
    padding: 1vh 0;

    & h3 {
      text-align: center;
    }

    & p {
      text-align: center;
    }
  }

  .paragraph-block {
    max-width: 65vw;
    margin: 40px auto 0;
    font-size: 1.3rem;
  }
}

@media screen and (min-width: 64rem) {
  /* -------- Index Page -------- */

  #projects ul li:hover,
  #gridlab ul li:hover {
    transform: scale(1.02);
    transition: 0.3s ease;
    background-color: rgba(200, 200, 200, 0.1);
  }

  /* ---------- Resume ---------- */
  h1#resume-name,
  h2 {
    font-size: 3rem;
  }

  h1#resume-name:hover {
    transform: scale(1.02);
    color: var(--accent);
    transition: 0.3s ease;
  }

  .resume-main {
    margin: 3vh auto;
    max-width: 98vw;
  }

  .resume-info-top {
    width: 98vw;
    position: relative;
    padding-bottom: 1rem;
  }

  #information {
    font-size: 1.3rem;
  }

  p#intro {
    margin: 2vh 0 2vh 2vw;
    font-size: 1.5rem;
  }

  section#external-links {
    gap: 65px;
  }

  #external-links img {
    transform: scale(1.5);
  }

  #expanded-info {
    & dt {
      font-size: 1.5rem;
    }

    & dd {
      font-size: 1.5rem;
    }
  }

  .resume-info-top::after {
    height: 0px;
  }

  .job-infoblock {
    border: 0;
    margin: 0;
    padding: 0;
    border-radius: 0px;
    background-color: transparent;
    box-shadow: 0;
  }

  .job-company,
  .job-title,
  .cert-name {
    font-size: 2rem;
  }

  .job-description,
  .job-location,
  .job-dates,
  .issuer,
  .cert-dates {
    font-size: 1.5rem;
  }

  p#intro:hover,
  .job-description:hover,
  .certification:hover {
    transform: scale(1.02);
    transition: 0.3s ease;
  }

  .paragraph-block {
    margin-top: 50px;
    font-size: 1.5rem;
  }
}

@media screen and (min-width >=80rem) {
}

@media screen and (min-width >=96rem) {
}
