/**
@credit for colors
https://www.freecodecamp.org/news/create-a-portfolio-website-using-html-css-javascript/
**/

/*
===============================================================================
=== variables
===============================================================================
 */

:root {
  --black: #191d2b;
  --gunmetal: #2a2e35;
  --yellow: #f3d68a;
  --orange: #d24f46;
  --go-green: #27ae60;
  --cultured: #f8f8f8;
  --color-grey-1: #dbe1e8;
  --color-grey-2: #b2becd;
  --color-grey-3: #6c7983;
  --color-grey-4: #454e56;
  --color-grey-5: #2a2e35;
  --font-size: 1.3rem;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Poppins', sans-serif;
}

/*
===============================================================================
=== border-box
===============================================================================
 */

html {
  box-sizing: border-box;
}

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

/*
===============================================================================
=== generic styles
===============================================================================
 */

body {
  padding: 0;
  margin: 0;
  font-family: var(--sans);
  background-color: var(--black);
  color: var(--cultured);
  font-size: var(--font-size);
}

h1,
h2,
h3 {
  margin: 0;
}

a {
  color: var(--orange);
}

a:hover {
  color: var(--yellow);
  text-decoration: none;
}

img {
  width: 100%;
}

/*
===============================================================================
=== background color divs 
===============================================================================
 */

.gradient {
  background: linear-gradient(90deg, var(--black) 0%, var(--go-green) 100%);
  height: 2px;
}

/*
===============================================================================
=== header
===============================================================================
 */

.page-header {
  display: flex;
  width: 100%;
  /* justify-content: space-between; */
  align-items: center;
  flex-wrap: wrap;
  row-gap: 1rem;
  padding: 1rem 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
}

.page-header a {
  color: var(--cultured);
  display: block;
}

.page-header svg {
  display: block;
  color: var(--go-green);
  width: 24px;
  height: 24px;
}

.page-header a:hover,
.page-header svg:hover {
  color: var(--orange);
}

.page-header__logo {
  display: flex;
  align-items: center;
  font-family: var(--sans);
}

.page-header__logo a {
  text-decoration: none;
}

.page-header__logo img {
  display: block;
  width: 48px;
  margin-right: 0.5rem;
}

/*
===============================================================================
=== navigation
===============================================================================
 */

.navbar {
  display: none;
  flex-flow: column wrap;
  align-items: flex-end;
  flex: 1 0 100%;
  gap: 2rem;
}

.navbar--mobile {
  display: flex;
}

.navigation-list {
  margin: 0;
  padding: 0;
  list-style-type: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.navigation-list__item {
  text-decoration: none;
  font-size: 1rem;
}

.navigation-list__item--active {
  text-decoration: underline;
}

.navigation-list__item--active:hover {
  text-decoration: underline;
}

.button {
  background-color: var(--orange);
  color: var(--cultured);
  padding: 0.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-family: var(--mono);
  transition: background-color 1s;
}

.button:hover {
  color: var(--cultured);
  background-color: var(--yellow);
}

.hamburger-button {
  cursor: pointer;
  margin-left: auto;
}

.hamburger-button__bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: all 0.3s ease;
  border-radius: 3px;
  background-color: var(--go-green);
}

.hamburger-button.active .hamburger-button__bar:nth-child(2) {
  opacity: 0;
}
.hamburger-button.active .hamburger-button__bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger-button.active .hamburger-button__bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/*
===============================================================================
=== intro styles
===============================================================================
 */

#intro {
  padding: 3rem 1rem 6rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

#intro p {
  font-size: 1rem;
  line-height: 1.5;
}

#intro .name {
  font-family: var(--mono);
  font-size: 1rem;
}

.name span {
  font-family: var(--sans);
  font-size: 3rem;
  color: var(--go-green);
  display: block;
  font-weight: 300;
}

#intro h2 {
  font-size: 2rem;
}

/*
===============================================================================
=== projects section
===============================================================================
 */

#projects {
  padding: 4rem 1rem;
}

#projects h2 {
  font-size: 2rem;
  margin-bottom: calc(2.5rem * 1.5);
}

#projects h3 {
  color: var(--go-green);
}

#projects h4 {
  font-size: 1rem;
  font-family: var(--mono);
  margin: 0;
}

.blackbox {
  padding: 1rem;
  border-radius: 10px;
  color: var(--cultured);
  background-color: var(--gunmetal);
  font-size: 1rem;
  line-height: 1.5;
}

#projects ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-flow: row wrap;
  justify-content: flex-start;
  gap: 1rem;
  font-size: 1rem;
}

#projects img {
  margin: 2rem 0 4rem 0;
  padding: 1rem;
  border-left: 1px solid var(--go-green);
  border-top: 1px solid var(--go-green);
  border-radius: 25px;
}

/*
===============================================================================
=== contact section
===============================================================================
 */

input,
textarea {
  border-radius: 30px;
  font-weight: inherit;
  font-size: inherit;
  font-family: inherit;
  padding: 0.8rem 1.1rem;
  margin-top: 0.8rem;
  outline: none;
  border: none;
  background-color: var(--color-grey-5);
  width: 100%;
  color: var(--cultured);
  resize: none;
}

.button-contact,
.button-contact:link,
.button-contact:visited {
  display: inline-block;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  border: 1px solid var(--go-green);
  background-color: var(--black);
  color: inherit;
  transition: background-color 1s;
  margin-right: auto;
}

.button-contact:hover,
.button-contact:focus {
  cursor: pointer;
  background-color: var(--go-green);
}

#contact {
  padding: 4rem 1rem;
}

#contact h2 {
  font-size: 2.5rem;
  margin-bottom: calc(2.5rem * 1.5);
}

#contact h3 {
  color: var(--go-green);
}

#contact h4 {
  font-size: 1rem;
  font-family: var(--mono);
  margin: 0;
}

#contact ul {
  list-style-type: none;
  padding: 1rem 0;
  margin: 0;
  display: flex;
  flex-flow: column wrap;
  justify-content: center;
  gap: 1rem;
  font-size: 1.2rem;
}

#contact form {
  padding: 1rem 0;
  display: flex;
  flex-flow: column wrap;
  flex: 1 1 300px;
  justify-content: center;
  gap: 1rem;
  font-size: 1.2rem;
  max-width: 850px;
}

.error-message {
  color: red;
  font-size: 0.8em;
  margin-left: 1rem;
}

/*
===============================================================================
=== footer section
===============================================================================
 */

footer {
  text-align: center;
  padding: 4rem 0;
}

footer ul {
  list-style-type: none;
  padding: 0;
  margin: 2rem 0;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  gap: 3rem;
  font-size: 3rem;
}

footer svg {
  width: 48px;
  height: 48px;
}

/*
===============================================================================
=== slide-show
===============================================================================
 */

.mySlides {
  display: none;
}

/* Slideshow container */
.slideshow-container {
  /* max-width: 1000px; */
  /* position: relative; */
  margin: auto;
}

.active {
  background-color: #717171;
}

/* Fading animation */
.fade {
  animation-name: fade;
  animation-duration: 3.5s;
}

@keyframes fade {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}

/*
===============================================================================
=== media queries
===============================================================================
 */

@media (min-width: 412px) {
  .page-header {
    font-size: 1rem;
  }

  .name span {
    font-size: 4rem;
  }

  #intro h2 {
    font-size: 3rem;
  }

  #projects h2 {
    font-size: 2.5rem;
  }
}

@media (min-width: 850px) {
  .page-header {
    max-width: 1200px;
    margin: 0 auto;
  }

  .page-header__logo {
    padding-top: 0;
  }

  .navbar {
    display: flex;
    flex-direction: row;
    justify-content: right;
    flex: auto;
  }

  .hamburger-button {
    display: none;
  }

  .navigation-list {
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
  }

  article {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
  }
  #projects,
  #contact {
    max-width: 1200px;
    margin: 0 auto;
  }
  #projects img {
    grid-column: 1/6;
    grid-row: 1/2;
  }

  #projects .slideshow-container {
    grid-column: 1/6;
    grid-row: 1/2;
  }

  .text {
    grid-column: 5/11;
    grid-row: 1/2;
    order: 2;
    text-align: right;
    z-index: 100;
  }
  #projects ul {
    justify-content: flex-end;
  }
  #projects .reverse .text {
    grid-column: 1/7;
    order: 2;
    text-align: left;
  }
  #projects .reverse img {
    grid-column: 6/11;
    grid-row: 1/2;
  }
  #projects .reverse ul {
    justify-content: flex-start;
  }
}
