/* || VARIABLES */
:root {
  --navBarFontSize: 20px;
  --regTextLGFontSize: 16px;
  --regTextXXSFontSize: 13px;
  --colorPrimary: #292929;
  --colorSecondary: white;
  --colorAccent: yellow;
  --sectionHeaderFontSize: 33px;
}


/* || KEYFRAMES */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes photograph {
  to {
    opacity: 1;
    transform: rotate(7deg);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-300px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(300px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}


/* || FONTS */

@font-face {
  font-family: hanken;
  src: url(/fonts/Hanken-Light.ttf);
}


/* || Scrollbar styling */

::-webkit-scrollbar {
  width: 12px;
  background-color: rgba(0, 0, 0, 0);
}

::-webkit-scrollbar-thumb {
  background-color: black;
  border: 3px solid #292929;
  border-radius: 10px;
}

::-webkit-scrollbar-track {
  background-color: #292929;
}


/* || Tag styling */

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background-color: var(--colorPrimary);
  font-size: var(--regTextLGFontSize);
  font-family: hanken;
  overflow-x: inherit;
  -webkit-font-smoothing: antialiased;
}

featured-project-card {
  font-size: var(--regTextLGFontSize);
  margin: 0 auto 50px auto;
}

featured-project-card:last-child {
  margin-bottom: 0;
}

footer {
  margin: 0;
  color: var(--colorSecondary);
  background-color: black;
  text-align: center;
}

footer > p {
  margin-bottom: 0;
}

nav-bar {
  font-size: var(--navBarFontSize);
}

section:first-of-type {
  max-height: 100vh;
}

section:not(:first-of-type) {
  color: var(--colorSecondary);
  padding: 70px 0;
}

section:nth-of-type(3) {
  background-color: #202020;;
}

signed-photograph {
  opacity: 0;
  transform: rotate(30deg);
}

signed-photograph[style^="animation-play-state: running;"] {
  animation-name: photograph;
  animation-duration: 3.5s;
  animation-fill-mode: forwards;
}


/* || ID's */

#aboutContent {
  display: flex;
  padding: 0 25px 100px 25px;
  flex-direction: column-reverse;
  align-items: center;
  row-gap: 50px;
}

#footerLinks {
  display: flex;
  justify-content: center;
}

#footerLinks > a {
  width: 20px;
  height: 20px;
  padding: 10px;
  margin: 15px 15px 0 15px;
  color: inherit;
  border: solid 3px var(--colorSecondary);
  transition: color 0.5s, border-color 0.5s;
}

#footerLinks > a:hover {
  color: var(--colorAccent);
  border-color: var(--colorAccent);
}

#home {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

#resume {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#resume::before {
  content: '';
  width: 75%;
  height: 1px;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0), white, rgba(0, 0, 0, 0));
}

#resume > a {
  box-sizing: border-box;
  width: 6rem;
  height: 6rem;
  padding: 1.5rem;
  border-radius: 50%;
  color: inherit;
  background-color: black;
  transition: transform 0.2s linear;
}

#resume > a:hover {
  transform: scale(1.1);
}

#webgl {
  display: block;
  max-width: 100%;
  max-height: 100%;
  outline: none;
}

#webglContainer {
  grid-row: 1 / -1;
  grid-column: 1 / -1;
  opacity: 0.3;
}

#welcomeButton {
  color: black;
  background-color: transparent;
  border: 1px solid black;  
  outline: none;
  letter-spacing: 1px;
  cursor: pointer;
  font-size: 1.2rem;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

#welcomeButtonContainer {
  position: relative;
  opacity: 0;
  transform: rotateZ(-30deg);
}

#welcomeButtonContainer::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 100%;
  height: 100%;
  content: '';
  background-color: #ffe54c;
  z-index: -1;
  transition: 0.2s;
}

#welcomeButtonContainer:hover::after {
  top: 0;
  left: 0;
}

#welcomeSection {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  row-gap: 15%;
  z-index: 1;
}

#welcomeSection > * {
  align-self: center;
}

#welcomeText {
  position: relative;
  right: 100%;
  width: 80%;
  margin: 0;
  color: var(--colorSecondary);
  text-align: center;
  font-size: 1.2rem;
}


/* ||  CLASSES */

.fadeIn {
  animation: fadeIn 0.5s paused;
}

.sectionContent {
  padding: 0 25px;
}

.sectionContent > .centerHorizontal {
  max-width: 1000px;
  margin: 0 auto;
}

.sectionHeading {
  margin: 0;
  text-align: center;
  color: white;
  line-height: 1;
  font-size: var(--sectionHeaderFontSize);
}

.sectionHeading + div {
  width: 70px;
  height: 4px;
  margin: 25px auto 75px auto;
  background-color: white;
}

.slideInLeft {
  animation: slideInLeft 0.5s paused;
}

.slideInRight {
  animation: slideInRight 0.5s paused;
}


/* || MEDIA QUERIES */

/* Phones */
@media screen and (min-width: 480px) {

  #aboutContent {
    padding: 0 50px 100px 50px;
  }

  #welcomeButton {
    font-size: 4vw;
  }

  #welcomeButtonContainer::after {
    top: 5px;
    left: 5px;
  }

  #welcomeText {
    font-size: 5vw;
  }

  .sectionContent {
    padding: 0 50px;
  }

}

/* Portrait tablets & large phones */
@media screen and (min-width: 600px) {

  :root {
    --sectionHeaderFontSize: 47px;
  }

  section:not(:first-of-type) {
    padding: 100px 0 130px 0;
  }

  #welcomeButton {
    padding: 5px 20px;
    font-size: 3.5vw;
  }

  .sectionHeading + div {
    margin-bottom: 100px;
  }

}

/* Landscape tablets */
@media screen and (min-width: 768px) {

  :root  {
    --regTextLGFontSize: 18px;
    --navBarFontSize: 24px;
  }

  featured-project-card {
    margin-bottom: 70px;
  }

  #aboutContent {
    flex-direction: row-reverse;
    column-gap: 50px;
    padding: 0 25px 100px 35px;
  }

  #aboutContent > div:first-child {
    align-self: flex-start;
  }

  .sectionContent {
    padding: 0 100px;
  }

}

/* Laptops */
@media screen and (min-width: 1024px) {

  :root {
    --navBarFontSize: 28px;
  }

  signed-photograph {
    align-self: unset;
  }

  #aboutContent {
    flex-direction: row;
    padding: 0 10px 100px 50px;
  }

  #aboutContent > div:first-child {
    align-self: unset;
  }

  #aboutDescription {
    line-height: 1.3;
  }

  #webglContainer {
    grid-column: 2 / -1;
    position: relative;
    right: 25vw;
    opacity: unset;
  }

  #welcomeButton {
    font-size: 1.75rem;
  }

  #welcomeButtonContainer::after {
    top: 7px;
    left: 7px;
  }

  #welcomeSection {
    grid-column: 1 / 2;
  }

  #welcomeText {
    font-size: 1.75rem;
  }

  .sectionContent {
    padding: 0 150px;
  }
  
}

/* Large laptops & desktops */
@media screen and (min-width: 1280px) {

  :root {
    --regTextLGFontSize: 20px;
  }
  nav-bar {
    font-size: 33px;
  }

  #aboutContent {
    column-gap: 0;
    padding: 0 0 100px 0;
  }

  #aboutContent > * {
    width: 50%;
  }

  #aboutDescription {
    box-sizing: border-box;
    padding-right: 10%;
    line-height: 1.5;
  }

  #welcomeButton {
    padding: 10px 40px;
  }

  #welcomeText {
    right: 50vw;
    font-size: max(2.3rem, 2vw);
    max-width: 50%;
  }

}