:root {
  /* --primary: #5cdb95; */
  --primary: #4664db;
  --primary-dark: #3a499d;
  --primary-light: #5c77e4;
  --secondary: #4d5ebd;
  --white: #fff;
  --black: #000;
  --header-height: 75px;
  --hero-height: calc(100vh - var(--header-height));
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: "Open Sans", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--secondary);
  background-color: var(--primary);
  overflow-x: hidden;
}

ul {
  list-style: none;
}

a,
a:visited {
  color: var(--primary-light);
  text-transform: uppercase;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

a:hover {
  color: var(--primary-dark);
}

.active {
  color: var(--primary-dark) !important;
}

.button {
  background-color: transparent;
  border: 2px solid var(--white);
  border-radius: 0;
  box-sizing: border-box;
  color: var(--white);
  cursor: pointer;
  display: inline-block;
  float: right;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 0;
  outline: none;
  overflow: visible;
  padding: 1.25em 2em;
  position: relative;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  transition: all 0.3s ease-in-out;
  user-select: none;
  font-size: 13px;
}
.button.alternate {
  color: var(--primary);
  border: 2px solid var(--primary);
}

.button::before {
  content: " ";
  width: 1.5625rem;
  height: 2px;
  background: var(--white);
  top: 50%;
  left: 1.5em;
  position: absolute;
  transform: translateY(-50%);
  transform-origin: center;
  transition: background 0.3s linear, width 0.3s linear;
}

.button.alternate::before {
  background: var(--primary) !important;
}

.button .text {
  font-size: 1.125em;
  line-height: 1.33333em;
  padding-left: 2em;
  display: block;
  text-align: left;
  transition: all 0.3s ease-in-out;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
}

.button.alternate .text {
  color: var(--primary) !important;
}

.button .top-key {
  height: 2px;
  width: 1.5625rem;
  top: -2px;
  left: 0.625rem;
  position: absolute;
  background: var(--primary);
  transition: width 0.5s ease-out, left 0.3s ease-out;
}

.button.alternate .top-key {
  background: var(--white) !important;
}

.button .bottom-key-1 {
  height: 2px;
  width: 1.5625rem;
  right: 1.875rem;
  bottom: -2px;
  position: absolute;
  background: var(--primary);
  transition: width 0.5s ease-out, right 0.3s ease-out;
}

.button.alternate .bottom-key-1 {
  background: var(--white) !important;
}

.button .bottom-key-2 {
  height: 2px;
  width: 0.625rem;
  right: 0.625rem;
  bottom: -2px;
  position: absolute;
  background: var(--primary);
  transition: width 0.5s ease-out, right 0.3s ease-out;
}

.button.alternate .bottom-key-2 {
  background: var(--white) !important;
}

.button:hover {
  color: white;
  background: var(--primary-light);
}

.button.alternate:hover {
  color: var(--primary);
  background: var(--white) !important;
}

.button:hover::before {
  width: 0.9375rem;
  background: white;
}

.button.alternate:hover::before {
  background: var(--primary) !important;
}

.button:hover .text {
  color: white;
  padding-left: 1.5em;
}

.button.alternate:hover .text {
  color: var(--primary) !important;
}

.button:hover .top-key {
  left: -2px;
  width: 0px;
}

.button:hover .bottom-key-1,
.button:hover .bottom-key-2 {
  right: 0;
  width: 0;
}

header {
  position: fixed;
  top: 5%;
  left: 10%;
  width: 80%;
  z-index: 100;
  background-color: var(--white);
  border-radius: 1rem;
  padding: 0.5rem;
  transition: all 0.3s ease-in-out;
}

.scroll header {
  top: 0;
  width: 100%;
  left: 0;
  border-radius: 0;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5);
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  width: 80%;
  margin: 0 auto;
  height: var(--header-height);
}

header nav .logo {
  font-size: 1.5em;
  font-weight: bold;
  height: 50px;
}

header nav .logo svg {
  width: auto;
  height: 50px;
  stroke: var(--primary-light);
  fill: var(--primary-light);
  transition: all 0.3s ease-in-out;
  cursor: pointer;
}

header nav .logo svg:hover {
  stroke: var(--primary-dark);
  fill: var(--primary-dark);
}

header nav ul {
  display: flex;
  gap: 1rem;
}

.hero {
  display: flex;
  height: 100vh;
  position: relative;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.3) !important;
}

.hero .background {
  position: absolute;
  bottom: 0;
  right: 10%;
  z-index: 1;
  width: 400px;
  height: fit-content;
  opacity: 0;
  object-fit: cover;
  animation: fadeIn 3s ease-in-out 1s forwards;
}

.hero .background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero .inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero .title {
  font-size: 3em;
  margin-bottom: 1rem;
  position: relative;
  width: fit-content;
  color: #fff;
  z-index: 2;
  text-transform: uppercase;
}

.hero .title:before,
.hero .title:after {
  content: "";
  background: #fff;
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
}

.hero .title:before {
  top: 0;
  animation: animateWidth 1s ease-in-out;
}

.hero .title:after {
  bottom: 0;
  animation: animateWidthBackwards 1s ease-in-out;
}

.hero .fade-in {
  opacity: 0;
  animation: fadeIn 3s ease-in-out 1s forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.hero .subtitle {
  margin-bottom: 2rem;
  color: #fff;
  text-transform: uppercase;
  max-width: 30ch;
  text-align: center;
}

.hero .hero-image {
  width: auto;
  height: 100%;
  object-fit: cover;
  margin-top: -2rem;
}

.hero .buttons {
  display: flex;
  gap: 1rem;
}

.container {
  width: 100vw;
  margin: 0 auto;
  padding: 2rem;
  scroll-margin-top: var(--header-height);
}

.container .inner {
  width: 80%;
  margin: 0 auto;
}

.accent-bg {
  background-color: var(--white);
}

#about .inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#about h2 {
  font-size: 2rem;
  font-weight: bold;
  text-transform: uppercase;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-lists {
  display: flex;
  flex-direction: row;
  gap: 2rem;
}

.about-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-list h3 {
  font-size: 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
  position: relative;
}

.about-list h3:before,
.about-list h3:after {
  content: "";
  background: var(--primary);
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
}

.about-list ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

#projects h2 {
  font-size: 2rem;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.projects-list {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.project {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
  background-color: var(--primary);
  color: var(--white);
  padding: 1rem;
}

.project img {
  flex-grow: 1;
  object-fit: cover;
}

.project h3,
.project p {
  margin: 0;
}

.project .buttons {
  margin-top: auto;
}

.project .buttons {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  color: var(--white);
  align-items: center;
  justify-content: space-between;
}

.project .buttons .icon {
  height: fit-content;
  display: block;
}

.project .buttons .icon i {
  color: var(--white);
  font-size: 3rem;
  transition: all 0.3s ease-in-out;
}

.project .buttons .icon i:hover {
  color: var(--primary-dark);
}

.project img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease-in-out;
}

.project img:hover {
  opacity: 0.8;
}

.project h3 {
  font-size: 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
  position: relative;
}

.project .button {
  width: fit-content;
}

#contact .inner {
  width: 80%;
  margin: 0 auto;
  color: var(--white);
}

#contact a {
  color: var(--white);
  transition: all 0.3s ease-in-out;
}

#contact a:hover {
  color: var(--primary-light);
}

#contact h2 {
  font-size: 2rem;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.contact-container {
  display: flex;
  flex-direction: row;
  gap: 2rem;
}

.contact-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-info ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-info ul li {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

.contact-info ul li i {
  font-size: 1.5rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

form .button {
  width: fit-content;
  align-self: flex-end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group input,
.form-group textarea {
  padding: 1rem;
  border: 2px solid var(--primary);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border: 2px solid var(--primary-dark);
}

.form-group textarea {
  resize: vertical;
  min-height: 200px;
}

.form-group label {
  font-weight: bold;
  text-transform: uppercase;
}

footer {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  color: var(--primary);
  background-color: var(--white);
  justify-content: center;
  align-items: center;
  position: relative;
  height: fit-content;
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.3);
}

footer .left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

footer .buttons {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
}

footer .buttons .dice {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
}

footer .buttons .dice img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

footer .buttons .dice a {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
}

footer .right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

footer .right div {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
}

footer .right i {
  font-size: 2rem;
}

.divider {
  width: 2px;
  height: 100px;
  background-color: var(--primary);
}

@keyframes animateWidth {
  0% {
    width: 0;
  }
  100% {
    width: 100%;
  }
}

@keyframes animateWidthBackwards {
  0% {
    width: 0;
    left: 100%;
  }
  100% {
    width: 100%;
    left: 0;
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes rollDice {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.dice:hover img {
  animation: rollDice 2s infinite;
}

/* Laptop and below */
@media (max-width: 1200px) {
  .hero .inner {
    align-items: flex-start;
    margin-left: 10vw;
  }

  .container .inner,
  #contact .inner {
    width: 100%;
  }
  .container {
    padding-right: 3rem;
  }
}

/* Laptop and below */
@media (max-width: 900px) {
  .hero .inner {
    margin-left: 5vw;
  }

  .projects-list {
    grid-template-columns: 1fr;
  }

  .contact-container {
    flex-direction: column;
  }
}

/* Tablets and below */
@media (max-width: 768px) {
  .hero .inner {
    margin-left: 0;
    align-items: center;
  }

  .hero .background {
    display: none;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
  }

  footer .divider {
    display: none;
  }

  .hero .inner {
    max-width: 90vw;
    margin: 1rem auto;
  }

  .menu-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 1rem;
    z-index: 100;
  }

  .menu-icon .bar {
    width: 1.5rem;
    height: 2px;
    background-color: var(--primary);
    transition: all 0.3s ease-in-out;
  }

  .menu-icon.active .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .menu-icon.active .bar:nth-child(2) {
    opacity: 0;
  }

  .menu-icon.active .bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }

  body:not(.scroll) header nav ul {
    top: -35%;
    left: -12.5%;
  }

  header nav ul {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
  }

  header nav ul.show {
    visibility: visible;
    opacity: 1;
  }
}

/* Mobile and below */
@media (max-width: 480px) {
  .container {
    width: 100%;
  }
}

@media (max-width: 375px) {
  footer .right a {
    font-size: 0.75rem;
  }
}
