/*
Theme Name:   Gareth Davies
Theme URI:    http://gareth.dk/
Description:  Personal theme for Gareth's portfolio
Author:       Gareth Davies
Author URI:   http://gareth.dk/
Template:     basically-bootstrap-5
Version:      1.0.0
Domain Path: /languages/
Text Domain:  garethdavies
*/

/* * imports */

@font-face {
  font-family: "IBM_Plex_Mono_Regular";
  src: url("/wp-content/themes/gareththeme/assets/fonts/IBM_Plex_Mono/IBMPlexMono-Regular.ttf")
    format("truetype");
  font-weight: medium;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "IBM_Plex_Mono_Extra_Light";
  src: url("/wp-content/themes/gareththeme/assets/fonts/IBM_Plex_Mono/IBMPlexMono-ExtraLight.ttf")
    format("truetype");
  font-weight: lighter;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Caprasimo";
  src: url("/wp-content/themes/gareththeme/assets/fonts/Caprasimo/Caprasimo-Regular.ttf")
    format("truetype");
  font-weight: bolder;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "IBM_Plex_Mono_Thin";
  src: url("/wp-content/themes/gareththeme/assets/fonts/IBM_Plex_Mono/IBMPlexMono-Thin.ttf")
    format("truetype");
  font-weight: light;
  font-style: normal;
  font-display: block;
}

/* * variables */

:root {
  --heading-font: "Caprasimo";
  --subheading-font: "IBM_Plex_Mono_Thin";
  --readable-font: "IBM_Plex_Mono_Extra_Light";
  --readable-italic-font: "IBM_Plex_Mono_Extra_Light_Italic";

  --bg-yellow: linear-gradient(
    var(--gradient-direction),
    rgb(207, 139, 3) 0%,
    rgba(255, 194, 36, 1) 50%
  );

  --gradient-direction: "0deg";

  --yellow: #ffc224;
  --orange: #f77b15;
  --dark-orange: #e06501;
  --darkGrey: #212020;
  --black: #000;
  --silver: #f1ebf3;
  --white: #fff;

  --spacing: 5rem;
}

/* * global */

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  scroll-behavior: auto;
}

body {
  background: linear-gradient(0deg, #282841 50%, var(--black) 90%);
  padding: 0 5rem;
  cursor: url("/wp-content/themes/gareththeme/assets/graphics/Cursor/Arrow.png"),
    auto;
}

#viewfinder {
  height: 109.5vh;
  width: 105vw;
  border: 4.3vw var(--black) solid;
  border-top-width: 4vw;
  border-radius: 5vw;
  position: fixed;
  left: -2.75vw;
  top: -1.5vw;
  z-index: 10;
  pointer-events: none;
  user-select: none;
  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -o-user-select: none;
}

h1 {
  font-family: var(--heading-font);
  font-size: 4.6vw;
  display: block;
  color: var(--black);
  line-height: 85%;
  letter-spacing: 0.05rem;
  /* text-transform: uppercase; */
}

h2 {
  font-family: var(--readable-font);
  font-size: 3.89vw;
  display: block;
  color: var(--black);
  line-height: 85%;
  text-transform: uppercase;
}

a,
.projectLink {
  text-decoration: none;
  font-family: var(--heading-font);
  font-size: 1rem;
  color: var(--silver);
}

.projectLink {
  text-align: end;
}

a:hover {
  cursor: url("/wp-content/themes/gareththeme/assets/graphics/Cursor/Pointer.png"),
    pointer;
  color: var(--orange);
}

p {
  font-family: var(--readable-font);
  font-size: 1rem;
  color: var(--black);
  margin-bottom: 0;
}

.homePatchRemoveMe {
  font-family: var(--heading-font);
  font-size: 2rem;
  color: var(--silver);
  position: fixed;
  top: 2rem;
  left: 3rem;
  max-width: 7ch;
}

.homePatchRemoveMe:hover {
  color: var(--dark-orange);
}

footer {
  border-top: 1px black solid;
  background: var(--bg-yellow);
  margin-top: 7rem;
  height: 12rem;
  width: 100vw;
  margin-left: -5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

footer > div {
  height: 100%;
  display: flex;
  align-items: center;
  column-gap: 2rem;
  justify-content: space-around;
  padding: 0 2rem;
}

/* * landing layout */

#heroGrid {
  background-color: #000;
  margin-top: 0vh;
  display: flex;
  flex-direction: row;
  width: 96.5vw;
  height: 97vh;
  align-items: center;
  justify-content: space-around;
  padding: 1vw 0.5vw 0;
  margin-left: -4vw;
  border-bottom: 0.5px solid var(--black);
}

#heroGrid > * {
  width: calc(100% / 3);
  text-align: center;
  display: flex;
  align-items: center;
  height: 100%;
}

#heroGrid > * > div {
  display: flex;
  justify-content: center;
}

#nameCell {
  display: flex;
  flex-direction: row;
  align-content: center;
  justify-content: center;
  border-right: 0.5px solid black;
  border-left: 0.5px solid black;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  height: 100%;
  background: var(--bg-yellow);
}

#nameCell > div {
  width: 100%;
  height: fit-content;
}

#photoCell {
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow-y: hidden;
  background: var(--bg-yellow);
  border-right: 0.5px solid black;
  border-left: 0.5px solid black;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

#photoCell * {
  width: 90%;
  margin-bottom: -1rem;
}

#heroShot {
  mix-blend-mode: multiply;
  opacity: 0.9;
  min-width: 300px;
  filter: drop-shadow(-122px 44px 5px rgba(0, 0, 0, 0.3));
}

#jobCell {
  background: var(--bg-yellow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 0.5px solid black;
  border-left: 0.5px solid black;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

#jobCell > div {
  display: flex;
  flex-direction: column;
}

#spacer {
  background: var(--black);
  color: var(--silver);
  font-family: var(--heading-font);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  width: 100%;
}

#jobCell h2 {
  margin-bottom: 0;
}

#jobCell span {
  letter-spacing: 1rem;
  font-size: clamp(1rem, calc(0.5rem + 0.06 * (100vw - 892px)), 5rem);
  line-height: clamp(50%, calc(2% + 0.1 * (100vw - 892px)), 85%);
}

#jobCell div:nth-child(1) h2:nth-child(2) span {
  letter-spacing: 0.6rem;
}
/* * about me */

#aboutMe {
  display: block;
  background-color: var(--black);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 10vh;
  margin-left: -5rem;
}

#aboutMe > div {
  display: flex;
  gap: 1rem;
  overflow-x: hidden;
}

#aboutMe p {
  display: block;
  text-transform: capitalize;
  color: var(--silver);
  margin: 0;
  white-space: nowrap;
  width: fit-content;
  animation-name: marqueeLine;
  animation-duration: 30s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

/* *project container styling */

.projectTitle {
  font-family: "Caprasimo";
  color: var(--black);
  transition: all 0.2s;
}

.projectTitle:hover {
  color: var(--dark-orange);
}

.linkIcon {
  height: 2vw;
}

.label {
  height: 2rem;
  display: flex;
  padding: 0 1rem;
  justify-content: center;
  align-items: center;
  width: fit-content;
  border-radius: 0.25rem;
}

.roleLabel {
  background-color: var(--black);
}

.roleLabel * {
  display: block;
  color: var(--orange);
  text-transform: uppercase;
  font-weight: bold;
}

.techLabel {
  background-color: var(--silver);
}

.techLabel > * {
  color: var(--dark-orange);
}

.descriptionLabel {
  padding-top: 0.3rem;
  border-top: 2px black solid;
  border-left: 2px solid black;
  border-right: 2px solid black;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-top: auto;
  margin-bottom: -2.5px;
  background-color: var(--silver);
}

.projectSummary {
  border: solid 2px black;
  border-bottom-right-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  padding: 1rem;
  background-color: var(--silver);
  width: fit-content;
}

.projectSummary p {
  max-width: 80ch;
}

/* *project container layout */

#projectsList {
  position: relative;
  padding-top: 4rem;
  height: 80vh;
}

#recent {
  color: var(--silver);
  width: fit-content;
  transform: rotate(270deg);
  margin-left: -6rem;
  margin-top: 40vh;
}

#thankyou {
  color: var(--silver);
  width: 100%;
  text-align: center;
}

.projectContainer {
  transform: scale(0.9);
  box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.5);
  top: 6rem;
  display: flex;
  height: 450px;
  position: relative;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  column-gap: 2rem;
  border: 2px solid var(--black);
  border-radius: 1rem;
  padding: 2rem 1rem;
  background: var(--bg-yellow);
  z-index: 10;
}

.projectContainer:nth-child(3) {
  top: calc(var(--spacing) * 2);
  z-index: 9;
}

.projectContainer:nth-child(4) {
  top: calc(var(--spacing) * 3);
  z-index: 8;
}

.projectLeft {
  width: 45%;
  padding: 2rem 0;
  height: 450px;
}

.projectLeft > .videoContainer {
  min-height: 24rem;
  max-height: 90%;
  padding: 1rem 0;
  width: 100%;
  border-radius: 1rem;
  border: var(--black) 4px solid;
  display: grid;
  place-content: center;
  align-items: center;
  background-color: var(--black);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Cdefs%3E%3Cpattern id='p' width='100' height='100' patternUnits='userSpaceOnUse' patternTransform='scale(0.05)'%3E%3Cpath data-color='outline' fill='none' stroke='%23F77B11' stroke-width='50.4' d='M49 49h2v2h-2z'%3E%3C/path%3E%3C/pattern%3E%3C/defs%3E%3Crect fill='url(%23p)' width='100%25' height='100%25'%3E%3C/rect%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.projectLeft > .videoContainer > video {
  max-height: 85%;
  height: fit-content;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  border: 2px solid black;
  background-color: black;
  overflow: hidden;
}

.externalLink {
  display: flex;
  align-items: center;
  width: 95%;
  justify-content: end;
  margin-top: 1rem;

  column-gap: 0.5rem;
}

.externalLink > img {
  height: 2rem;
}

.projectRight {
  width: 50%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: auto;
}

.titleBox {
  grid-column: 1 / -2;
  grid-row: 1 / 2;
}

.roleBox {
  grid-column: 2 / -1;
  grid-row: 1 / 2;
  display: flex;
  flex-direction: row;
  justify-content: end;
  gap: 0.5rem;
}

.descriptionLabel {
  grid-column: 1 / 2;
  grid-row: 3 / 4;
  height: calc(100% + 2px);
  z-index: 9;
}

.techContainer {
  justify-content: flex-end;
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.projectSummary {
  grid-column: 1 / -1;
  grid-row: 4/ 5;
}

/* * post template */

.projectExposure {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
}

.projectExposure h2 {
  color: var(--dark-orange);
}

.projectExposure .projectType {
  color: var(--silver);
}

.projectExposure > .projectRight {
  height: 50%;
  width: 60%;
}

.projectExposure > .projectLeft {
  width: 80%;
  height: 80%;
}

.projectExposure .techContainer {
  grid-column: 1 / 3;
  margin: 1rem 0;
}

.projectExposure .roleBox {
  flex-direction: column;
  justify-content: space-between;
  align-items: end;
}

.projectExposure a {
  display: block;
}

.projectStory {
  grid-column: 1 / -1;
}

.projectDescription {
  border: solid 2px black;
  border-radius: 0.5rem;
  padding: 1rem;
  background-color: var(--silver);
  width: fit-content;
}

/* * keyframes */

@keyframes marqueeLine {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

/* * media queries */

@media screen and (max-width: 892px) {
  body {
    padding: 0 1rem;
    background: var(--yellow);
  }

  h2 {
    font-size: 2rem;
  }

  header {
    display: none;
  }

  footer {
    margin: 15rem 0 0 -1rem;
  }

  #viewfinder {
    display: none;
  }

  #nav {
    margin-bottom: 2rem;
  }

  #heroGrid {
    flex-direction: column;
    justify-content: center;
    height: 100vh;
    margin-top: 0;
    width: 100%;
    margin-left: 0;
    background-color: inherit;
  }

  #heroGrid > * {
    width: 100%;
    min-height: 15vh;
    border: none;
    background-color: inherit;
  }

  #nameCell h1 {
    font-size: 3rem;
  }

  #nameCell {
    background: inherit;
  }

  #photoCell {
    order: 3;
    width: 100%;
    overflow-y: hidden;
  }

  #photoCell div {
    max-height: 100%;
    background-color: inherit;
  }

  #heroShot {
    border-bottom: 0;
  }

  #photoCell div img {
    object-fit: contain;
    filter: initial;
  }

  #spacer {
    margin: 0.5rem 0;
  }

  #jobCell span {
    letter-spacing: rem;
    font-size: 1.8rem;
    line-height: 0.5rem;
  }

  #projectsList {
    gap: 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: max-content;
  }

  #aboutMe {
    width: 100vw;
    padding: 4rem 2rem;
    height: fit-content;
    margin: 0 0 0 -1rem;
  }

  #recent {
    display: none;
  }

  .homePatchRemoveMe {
    right: 0;
    left: auto;
    color: var(--black);
    background-color: var(--dark-orange);
    padding: 1rem;
    border: 1px solid black;
    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
  }

  #thankYou {
    display: none;
  }

  .titleBox {
    grid-column: 1 / -1;
  }

  .projectContainer {
    position: relative;
    flex-direction: column;
    height: auto;
    transform: scale(1);
    justify-content: initial;
    align-items: initial;
  }

  .roleBox {
    grid-column: 1 / -2;
    grid-row: 2 / 3;
    height: 100%;
    flex-direction: row;
    justify-content: start;
    align-items: center;
  }

  .main-content-default {
    margin-top: 25vh;
  }

  .projectExposure > .projectRight {
    row-gap: 0.5rem;
    width: 100%;
  }

  .projectLeft {
    height: fit-content;
    padding: 0;
    width: 100%;
    margin-bottom: 1rem;
  }

  .projectLeft > .videoContainer {
    height: fit-content;
    min-height: 0;
    overflow: hidden;
  }

  .techContainer {
    grid-row: 3 / 4;
    grid-column: 1 / -1;
  }

  video {
    max-width: 100%;
  }

  .descriptionLabel {
    grid-row: 4 / 5;
    transform: translateY(0.5rem);
  }

  .projectSummary,
  .descriptionLabel {
    display: none;
  }

  /*   transform: scale(0.9);
  box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.5);
  top: 6rem;
  display: flex;
  height: 450px;
  position: relative;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  column-gap: 2rem;
  border: 2px solid var(--black);
  border-radius: 1rem;
  padding: 2rem 1rem;
  background: var(--bg-yellow);
  z-index: 10; */

  .projectRight {
    width: 100%;
    margin-bottom: 0.5rem;
    max-height: 200px;
  }

  .projectExposure > .projectRight {
    max-height: fit-content;
    grid-template-columns: 1fr;
  }

  .projectExposure > .projectLeft {
    width: 100%;
  }

  #thankyou {
    display: none;
  }
}
