/* Remove Browser Defaults */
* {
  margin: 0;
  padding: 0;
  list-style: none;
  text-decoration: none;
}

/* Variables */
:root {
  --60-colour: #333;
  --30-colour: #5A5A5A;
  --10-colour: #8F6CEB;
  --glass-colour: #5A5A5A40;
  --hero-bg: url("../images/Hero Contour Graphic.svg");
  --footer-bg: url("../images/Footer Contour Graphic.svg");
  --portfolio-bg: url("../images/Portfolio Contour Graphic.svg");
  --cursor-opacity: 0;
  --cursor-size: 0;
}

/* Selection Colour */
::-moz-selection {
  color: #333;
  background: white;
}

::selection {
  color: #333;
  background: white;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 5px var(--30-colour);
  box-shadow: inset 0 0 5px var(--30-colour);
  border-radius: 50px;
}

::-webkit-scrollbar-thumb {
  background: var(--10-colour);
  border-radius: 50px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--30-colour);
}

/* Custom Cursor */
#custom-cursor {
  height: 20px;
  width: 20px;
  border: 2px solid white;
  border-radius: 50px;
  mix-blend-mode: difference;
  pointer-events: none;
  position: fixed;
  z-index: 100;
  top: 0;
  opacity: 0;
  -webkit-transition: opacity, background 0.2s;
  -o-transition: opacity, background 0.2s;
  transition: opacity, background 0.2s;
}

#custom-cursor::before {
    content: "";
  border-radius: 50%;
  background: white;
  position: absolute;
  top: 8px;
  left: 8px;
  width: 4px;
  height: 4px;
  -webkit-transition: opacity 0.2s;
  -o-transition: opacity 0.2s;
  transition: opacity 0.2s;
}

#custom-cursor::after {
  content: "";
  border-radius: 50%;
  top: -12px;
  left: -12px;
  position: absolute;
  border: 2px solid white;
  width: 40px;
  height: 40px;
  opacity: var(--cursor-opacity);
  transform: scale(var(--cursor-size));
  -webkit-transition: opacity, transform 0.2s;
  -o-transition: opacity, transform 0.2s;
  transition: opacity, transform 0.2s;
}

/* Main Fonts */
html {
  /* 1rem = 10px */
  font-size: 62.5%;
}

body {
  min-height: 100vh;
  font-family: "Poppins", "Arial", sans-serif;
  font-size: 1.8rem;
  color: white;
  background-image: -o-linear-gradient(#333, black);
  background-image: -webkit-gradient(linear, left top, left bottom, from(#333), to(black));
  background-image: linear-gradient(#333, black);
}

body:hover #custom-cursor {
  opacity: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Source Code Pro", "Courier New", monospace;
  font-weight: 600;
  color: white;
}

p {
  margin: auto;
  max-width: 1200px;
}

a {
  font-size: 2rem;
  color: white;
  -webkit-transition: 0.2s ease-in-out;
  -o-transition: 0.2s ease-in-out;
  transition: 0.2s ease-in-out;
}

a:hover {
  color: var(--10-colour);
}

a:active {
  color: var(--30-colour);
}

.content {
  padding-top: 120px;
}

/* Header */
header {
  width: 100%;
  position: fixed;
  background-color: #33333340;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow: hidden;
  z-index: 2;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

#shrink {
  height: 120px;
  -webkit-transition: 0.2s ease-in-out;
  -o-transition: 0.2s ease-in-out;
  transition: 0.2s ease-in-out;
}

header .container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  padding-bottom: 0;
  width: 95%;
  max-width: 1920px;
  height: 100%;
  -webkit-transition: 0.2s ease-in-out;
  -o-transition: 0.2s ease-in-out;
  transition: 0.2s ease-in-out;
}

/* Desktop Header */
header nav {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  width: 100%;
  height: 100%;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

header nav ul {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  text-align: center;
  max-height: 150px;
}

#logo-img {
  vertical-align: middle;
  height: 80px;
  margin-right: 25px;
  -webkit-transition: 0.2s ease-in-out;
  -o-transition: 0.2s ease-in-out;
  transition: 0.2s ease-in-out;
}

header nav li {
  height: 100%;
  padding-left: 40px;
  font-size: 2rem;
  font-weight: 600;
}

header nav span {
  vertical-align: middle;
}

/* Mobile Header & Menu */
#logo {
  display: none;
}

#hamburger {
  margin: auto 0;
  display: none;
  z-index: 2;
}

#hamburger div {
  width: 40px;
  height: 3px;
  background-color: white;
  margin: 5px 0;
  -webkit-transition: 0.4s;
  -o-transition: 0.4s;
  transition: 0.4s;
  z-index: 2;
}

.mobile-menu {
  left: 50%;
  right: 50%;
  top: 50%;
  bottom: 50%;
  margin: -50vh -50vw -50vh -50vw;
  display: none;
  position: fixed;
  background-color: var(--glass-colour);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.mobile-menu li {
  margin: 1em 0;
}

.mobile-menu li a {
  font-size: 2.4rem;
  font-weight: 600;
}

.open .bar1 {
  -webkit-transform: rotate(-45deg) translate(-5px, 5px);
  -ms-transform: rotate(-45deg) translate(-5px, 5px);
  transform: rotate(-45deg) translate(-5px, 6px);
}

.open .bar2 {
  opacity: 0;
}

.open .bar3 {
  -webkit-transform: rotate(45deg) translate(-5px, -5px);
  -ms-transform: rotate(45deg) translate(-5px, -5px);
  transform: rotate(45deg) translate(-5px, -6px);
}

.open .mobile-menu {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  text-align: center;
}

button {
  all: unset;
  font-family: "Poppins", "Arial", sans-serif;
  font-size: 2rem;
  font-weight: 500;
  color: white;
  text-align: center;
  border: solid 4px var(--10-colour);
  padding: 6px 16px;
  border-radius: 10px;
  background-color: var(--10-colour);
  display: inline-block;
  -webkit-transition: 0.2s ease-in-out;
  -o-transition: 0.2s ease-in-out;
  transition: 0.2s ease-in-out;
}

button.alt {
  background-color: var(--30-colour);
  border-color: var(--30-colour);
}

button:hover {
  background-color: transparent;
}

button:active {
  color: var(--10-colour);
}

section {
    width: 70%;
    max-width: 1600px;
    margin: 6em auto 0 auto;
    padding-bottom: 6em;
}

section h1 {
    font-size: 5rem;
}

section h2 {
    font-size: 4rem;
}

section p {
    margin-top: 1em;
}

#portfolio {
    background:var(--portfolio-bg) no-repeat top;
    background-size: cover;
}

#portfolio .grid-container {
    row-gap: 45px;
}

.label1 {
    background-color: var(--10-colour);
    color: white;
}

.label2 {
    background-color: #FFC107;
    color: white;
}

.label3 {
    background-color: #03A9F4;
    color: white;
}

.label4 {
    background-color: #4CAF50;
    color: white;
}

.label5 {
    background-color: #CD5C5C;
    color: white;
}

.modal {
  display: none;
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: #00000070;
}

.modal-content {
  text-align: left;
  margin: 8% auto auto;
  padding: 50px;
  width: 40%;
  max-width: 960px;
  position: relative;
}

.modal-content h1 {
    font-size: 3.5rem;
}

.modal-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

.modal-close {
  position: absolute;
  top: 5px;
  right: 20px;
  font-size: 4rem;
  font-weight: bold;
  color: white;
  transition: 0.2s;
}

.modal-close:hover {
  color: var(--10-colour);
}

.container {
  height: auto;
  width: 70%;
  max-width: 1200px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  flex-wrap: wrap;
  justify-content: space-between;
  align-content: space-between;
  margin: auto;
  padding-bottom: 15vh;
}

.grid-container {
    max-width: 1200px;
    width: 100%;
    margin-top: 1em;
    padding-bottom: 0;
}

.column {
  -ms-flex-preferred-size: 30%;
  flex-basis: 30%;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.column .container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -ms-flex-pack: distribute;
  justify-content: space-around;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
  row-gap: 20px;
  padding: 2.5em 0;
}

.glass {
  background-color: var(--glass-colour);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: solid 1px var(--30-colour);
  border-radius: 10px;
  -webkit-box-shadow: 0 5px 10px 5px #1a1a1a;
  box-shadow: 0 5px 10px 5px #1a1a1a;
  transition: box-shadow 0.2s ease-in-out;
}

.glass:hover, .glass:focus {
  box-shadow: 0 0 10px 5px #8F6CEB;
}

#hero {
  width: 70%;
  max-width: 1200px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
  margin: 15vh auto 5em auto;
  gap: 15px;
}

#hero-image {
  background: var(--hero-bg) no-repeat top;
  height: 800px;
  width: 100%;
  max-width: 3440px;
  margin-top: 100px;
  position: absolute;
  z-index: -1;
}

#hero h1 {
  font-size: 6rem;
}

#hero div {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 30px;
}

#intro {
    font-size: 2rem;
    max-width: 960px;
}

.accent-graphic {
  background: url("../images/Accent Contour Graphic.svg") no-repeat top;
  height: 500px;
  width: 100%;
  max-width: 600px;
  position: absolute;
  z-index: -1;
}

.socials {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  gap: 30px;
}

.socials a {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  width: 50px;
  height: 50px;
  font-size: 3rem;
  text-align: center;
  border: solid 4px var(--10-colour);
  border-radius: 10px;
  background-color: var(--10-colour);
}

.socials a:hover {
  background-color: transparent;
}

footer {
  padding: 14em 0 1em 0;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--footer-bg) no-repeat top content-box;
  background-size: 100%;
  z-index: -1;
}

footer .container {
  padding: 12em 0 4em 0;

}

footer .container p {
  margin-left: 0;
}

#footer-box {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 25px;
  text-align: center;
  max-width: 650px;
  margin: -8em auto;
  padding: 40px;
}


@keyframes fade-slide-in {
  from {
    opacity: 0;
    transform: translate(0, 10vh);
  }
  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

.fade-slide-in {
  animation: fade-slide-in 0.5s;
  animation-play-state: paused;
  /*opacity: 0;
  transform: translate(0, 10vh);
  transition: opacity 0.5s, transform 0.5s, box-shadow 0.2s;
  */
}

.fade-slide-in.visible {
  animation-play-state: running;
  /*
  opacity: 1;
  transform: translate(0, 0)
  */
}

.fade-slide-in-delay {
  animation: fade-slide-in 0.5s;
}

.fade-slide-in-delay:nth-of-type(2) {
  animation-delay: 0.3s;
  animation-fill-mode: backwards;
}

.fade-slide-in-delay:nth-of-type(3) {
  animation-delay: 0.6s;
  animation-fill-mode: backwards;
}

/* Mobile View */
@media only screen and (max-width: 900px) {
  :root {
    --hero-bg: url("../images/Accent Contour Graphic.svg");
  }

    body {
        font-size: 1.6rem;
    }
    
  header {
    background-color: var(--60-colour);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  #shrink {
    height: 60px;
  }

  header .container {
    width: 100vw;
    max-width: 900px;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
  }

  header nav {
    display: none;
  }

  #hamburger {
    display: block;
    position: fixed;
    z-index: 2;
    right: 30px;
  }

  #logo {
    display: block;
    position: fixed;
    top: 10px;
    bottom: 10px;
    left: 30px;
    z-index: 2;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p {
    max-width: 85%;
  }

  h1 {
    margin-top: 20px;
    font-size: 3.5rem;
  }

  h2 {
    margin-bottom: 0;
  }

  h5 {
    font-size: 1.12rem;
  }

  p {
    font-size: 1.6rem;
  }

  button {
    font-size: 1.8rem;
  }

  .column {
    -ms-flex-preferred-size: 100%;
    flex-basis: 100%;
    margin: 25px 20px;
  }

  .content {
    padding-top: 60px;
  }
  
  .modal-content {
    margin: 20% auto;
    width: 75%;
    padding: 30px;
  }
  
  .modal-content h1 {
      font-size: 2.5rem;
      margin-left: 0;
  }
  
  .modal-content p {
      max-width: 100%;
  }
  
  section {
      width: 100%;
      margin-top: 2em;
  }
  
  section h1 {
      font-size: 3.5rem;
      margin-left: 0.5em;
  }
  
  section h2 {
      font-size: 3rem;
      margin-left: 0.5em;
  }
  
  #hero {
      width: 80%;
    margin-top: 3em;
    margin-bottom: 3.5em;
  }
  
  #hero-image {
      background-size: cover;
      max-height: 500px;
      margin-top: 0;
    }

  #hero h1 {
    font-size: 4.5rem;
  }

  #hero div {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 20px;
  }
  
  #portfolio .grid-container {
    row-gap: 0;
  }
    
  .container {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
  }

  .column .container {
    padding: 2em 0;
  }

  footer::before {
    -webkit-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    transform: rotate(90deg);
    background-position: 0;
    background-size: cover;
    height: 150%;
    width: 150%;
    top: 0;
  }

  footer .container {
    align-content: center;
    gap: 20px;
    padding: 11em 0 3em 0;
  }

  footer .container p {
    margin: auto;
  }

  footer h5 {
    margin: auto;
  }

  #footer-box {
    padding: 40px 30px;
    max-width: 70%;
    gap: 20px;
  }

  #footer-box p {
    max-width: none;
  }

  #footer-box h3 {
    max-width: none;
  }
}