/*
-Table of contents-

1. Global

2. Typography

3. Components
  3.1 Hero
  3.2 Navbar
  3.3 Button
  3.4 About
  3.5 Skills
  3.6 Gallery
  3.7 Modal
  3.8 Tag
  3.9 Footer

4. Utilities

5. Animations

6. Responsive Design

1em = 16px
1rem = 10px
*/

/* 1. GLOBAL */

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

html {
  font-size: 37.5%; /* 1rem = 6px */

  scroll-behavior: smooth;
  scroll-padding: 10rem;
}

body {
  /* Variables */
  --colour-dark: #444;
  --colour-light: #eee;
  --colour-gray-light: #ccc;
  --colour-primary: #29648a;
  --colour-primary-dark: #25274d;
  --colour-primary-light: #2e9cca;
  --colour-background: #2a343e;

  --font-heading: "Raleway", sans-serif;
  --font-paragraph: "Lato", sans-serif;

  --background-gradient: linear-gradient(
    rgba(33, 66, 66, 0.65),
    rgba(33, 47, 59, 0.65)
  );

  --box-shadow: rgba(0, 0, 0, 0.2) 0px 12px 28px 0px,
    rgba(0, 0, 0, 0.1) 0px 2px 4px 0px,
    rgba(255, 255, 255, 0.05) 0px 0px 0px 1px inset;

  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  line-height: 1.7;
  color: var(--colour-light);
  background-color: var(--colour-background);
  font-weight: 300;

  overflow-x: hidden;
}

hr {
  width: 20rem;
}

.container {
  max-width: 85vw;
  margin: 0 auto;
}

.section {
  margin-top: 8rem;
}

/* 2. Typography */

.heading {
  font-family: var(--font-heading);
  font-weight: 300;
}

.heading-primary {
  font-size: 6rem;
}

.heading-secondary {
  font-size: 4rem;
}

h3 {
  font-family: var(--font-heading);
  font-size: 4rem;
  letter-spacing: 3px;
}

p {
  font-family: var(--font-paragraph);
  font-size: 3rem;
  letter-spacing: 1px;
}

/* 3. Components */

/* 3.1 Hero */
.hero {
  background-image: linear-gradient(
      to right,
      rgba(33, 47, 59, 75%),
      rgba(33, 66, 66, 75%)
    ),
    url("images/background-blurred.jpg");
  background-position: center;
  background-size: cover;
  height: 100vh;
}

/* 3.2 Navbar */

.navbar {
  position: sticky;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  font-family: var(--font-paragraph);
  text-transform: uppercase;
  font-size: 2.4rem;
}

.navbar ul {
  display: flex;
  list-style-type: none;
  overflow: hidden;
}

.navbar li {
  margin: 0 2rem;
  text-align: center;
}

.navbar li::after {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  background: var(--colour-light);
  transition: all 0.3s;
}

.navbar li:hover::after {
  width: 100%;
}

.navbar li a {
  color: var(--colour-light);
  text-decoration: none;
}
/* 3.3 Button */

.btn {
  position: relative;
  font-size: 2.5rem;
  font-family: var(--font-paragraph);

  color: var(--colour-light);
  text-decoration: none;
  text-transform: uppercase;

  background-color: transparent;
  outline: none;
  z-index: 1;
  border-radius: 3px;
  padding: 15px 30px;
  border: 3px solid transparent;
  box-shadow: none;
  transition: color 0.5s, transform 0.2s, background-color 0.2s;
}

.btn::after,
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 3px;
}

.btn::before {
  border: 3px solid var(--colour-primary-light);
  transition: opacity 0.3s, border 0.3s;
}

.btn.btn-secondary::before {
  border: 3px solid var(--colour-background);
}

.btn:hover::before {
  opacity: 0;
}

.btn::after {
  background-color: transparent;
  border: 3px solid #fff;
  opacity: 0;
  z-index: -1;
  transform: scaleX(1.15) scaleY(1.4);
  transition: transform 0.3s, opacity 0.3s;
}

.btn.btn-secondary::after {
  border: 3px solid #5e5e5e;
}

.btn:hover::after {
  opacity: 1;
  transform: scaleX(1) scaleY(1);
}

.btn:active {
  transform: translateY(3px);
}

.btn:hover {
  color: var(--colour-light);
}

.btn.btn-secondary:hover {
  color: var(--colour-background);
}

.btn .arrow {
  transform: rotate(-45deg);
  -webkit-transform: rotate(-45deg);
}

.btn:hover .arrow {
  transform: rotate(45deg);
  -webkit-transform: rotate(45deg);
}

.arrow {
  border: solid var(--colour-light);
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 5px;
  margin-left: 8px;
  margin-bottom: 3px;
  transform-origin: 70% 80%;
  transition: color 0.5s, transform 0.2s, background-color 0.2s;
}

.down {
  transform: rotate(45deg);
  -webkit-transform: rotate(45deg);
}

/* 3.4 About section */

.about {
  flex: 1;
  flex-direction: column;
}

.portrait {
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  margin-top: 1rem;
}

.about__left {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 3rem;
}

.about__right {
  flex: 1 1;
  text-align: left;
}

.about__right p {
  margin-bottom: 3rem;
}

/* 3.5 Skills section */

.skills__container {
  display: flex;
  flex-direction: column;
}

.skills__left {
  flex: 1 1 40%;
  text-align: left;
}

.skills__right {
  flex: 1 1 60%;
}

.skills__list {
  list-style-type: none;
  font-size: 3rem;
  margin-top: 4rem;
}

.skills__list li {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.skills__list li p {
  flex: 1 0 35%;
  display: inline;
  text-align: center;
}

.skill-bar {
  flex: 1 0 65%;
  width: 100%;
  height: 1px;
  margin: 0 3rem;
  background-image: linear-gradient(
    120deg,
    var(--colour-primary-light),
    var(--colour-primary-light)
  );
  background-repeat: no-repeat;
  background-position: 0 88%;
}

.skill-bar::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 65%;
  height: 1px;
  background-image: linear-gradient(120deg, #828282, #828282);
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 100% 100%;
}

/* 3.6 Gallery */

.gallery__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gallery__item {
  list-style-type: none;
}

.gallery__item--img {
  width: 80vw;
  height: 45vw;
  image-rendering: optimizeQuality;
  margin-top: 2.5rem;
  margin-left: 1rem;
  margin-right: 1rem;
  box-shadow: rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;

  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.gallery__item--img:hover {
  transform: scale(1.05);
  filter: brightness(100%);
}

/* 3.7 Modal */

/* Modal wrapper and background */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0, 0, 0); /* Fallback color */
  background-color: rgba(0, 0, 0, 0.6);
}

/* Modal Content */
.modal-content {
  background-color: #eff1f6;
  margin: auto;
  padding: 2rem;
  border: 1px solid #333;
  width: fit-content;
  max-width: 80vw;
  color: #333;
  border-radius: 0.5rem;
  box-shadow: var(--box-shadow);
}

/* The Close Button */
.close {
  color: #aaaaaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  margin-right: 1.5rem;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.modal-title {
  font-size: 3.5rem;
  font-family: var(--font-heading);
  letter-spacing: 3px;
  text-align: center;

  margin-bottom: 2rem;
  margin-top: 3rem;
}

.modal-tags {
  display: flex;
  justify-content: center;
  margin-bottom: 4rem;
}

.modal-content-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.modal-image {
  width: 90%;
  height: auto;
  margin-bottom: 4rem;
  box-shadow: var(--box-shadow);
  border-radius: 0.5rem;
}

.modal-paragraph {
  margin: 0 5rem 0 3rem;
  max-width: 60rem;
}

.modal-button {
  margin-top: 5rem;
  margin-bottom: 3rem;
  text-align: center;
}

.modal-button a {
  color: var(--colour-dark);
}

/* 3.8 Tag */

.tag {
  font-size: 2rem;
  font-family: var(--font-paragraph);
  padding: 0 1.5rem;
  box-shadow: var(--box-shadow);
  /* border: 1px solid #2222; */
  border-radius: 2rem;
  color: var(--colour-light);
  margin: 0 0.5rem;
  transition: opacity 0.3s ease-in-out;
  cursor: default;
}

.tag:hover {
  opacity: 0.7;
}

.tag-purple {
  background-color: #9b59b6;
}

.tag-blue {
  background-color: #3498db;
}

/* 3.9 Footer */

.footer {
  width: 100vw;
  background-color: #2d2d2d;
  padding: 5rem 0 2rem 0;
  margin-top: 6rem;
}

.footer .container {
  align-items: center;
  flex-direction: column;
}

.footer-column {
  width: 30rem;
  margin-bottom: 3rem;
}

.footer-title {
  color: #666;
  font-size: 4rem;
  font-family: var(--font-heading);
}

.footer-list {
  margin-top: 2rem;
}

.footer-item {
  list-style: none;
  font-size: 3rem;
  font-family: var(--font-paragraph);
}

.footer-item a {
  color: var(--colour-light);
  text-decoration: none;
  transition: all 0.25s ease-in-out;
}

.footer-item a:hover {
  color: var(--colour-primary-light);
}

.footer hr {
  width: 100%;
  margin-top: 5rem;
  border: none;
  border-bottom: 1px solid #666;
}

.footer .copyright {
  font-size: 2.5rem;
  font-family: var(--font-paragraph);
  margin-top: 2rem;
}

/* 4. Utilities */

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
  height: inherit;
}

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

.text-centre {
  text-align: center;
}

.mt-1 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 3rem;
}

.mt-5 {
  margin-top: 5rem;
}

.ml-3 {
  margin-left: 3rem;
}

.darken {
  filter: brightness(50%);
}

.d-flex {
  display: flex;
}

/* 5. Animations */

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

.fadeIn {
  animation: fadeIn 0.3s ease-in-out;
}

/* 6. Responsive Design */

@media all and (min-width: 37.5em) {
  /* Portrait tablets - 600px+ */
  .navbar li {
    margin: 0 3rem;
  }

  .container {
    max-width: 90vw;
  }

  .skills__list li p {
    flex: 1 0 25%;
  }

  .skill-bar {
    flex: 1 0 75%;
  }

  .skill-bar::before {
    width: 75%;
  }

  .gallery__list {
    flex-direction: row;
  }

  .gallery__item--img {
    width: 40rem;
    height: 23rem;
  }

  .footer .container {
    flex-direction: row;
    justify-content: center;
    align-items: baseline;
  }

  .modal-image {
    width: 75%;
  }
}

@media all and (min-width: 56.25em) {
  /* Landscape tablets - 900px+ */
  html {
    font-size: 50%; /* 1rem = 8px */
  }

  .arrow {
    padding: 6px;
    margin-bottom: 4px;
  }

  .footer-title {
    font-size: 3.5rem;
  }

  .footer-item {
    font-size: 2.4rem;
  }

  .footer .copyright {
    font-size: 2.2rem;
  }

  .modal-content-container {
    flex-direction: row;
  }

  .modal-image {
    width: 40rem;
    height: 23rem;
    margin: 0 3rem 0 5rem;
  }
}

@media all and (min-width: 75em) {
  /* Desktops - 1200px+ */
  html {
    font-size: 62.5%; /* 1rem = 10px */
  }

  p {
    font-size: 2.4rem;
  }

  .container {
    max-width: 108rem;
  }

  .arrow {
    padding: 7px;
    margin-bottom: 5px;
  }

  .about {
    flex-direction: row;
  }

  .about__left {
    flex-grow: 0;
    margin-right: 10rem;
    margin-bottom: 0;
  }

  .portrait {
    margin-top: 2rem;
  }
}

@media all and (min-width: 125em) {
  /* Big desktops - 1800px+ */

  .container {
    max-width: 120rem;
  }
}

/* Modal Content
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background-color: #eff1f6;
  margin: auto;
  padding: 2rem;
  border: 1px solid #333;
  width: fit-content;
  color: #333;
  border-radius: 0.5rem;
  box-shadow: var(--box-shadow);
}

.close {
  color: #aaaaaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  margin-right: 1.5rem;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.modal-title {
  font-size: 3.5rem;
  font-family: var(--font-heading);
  letter-spacing: 3px;
  text-align: center;

  margin-bottom: 2rem;
  margin-top: 3rem;
}

.modal-tags {
  display: flex;
  justify-content: center;
  margin-bottom: 4rem;
}

.modal-image {
  width: 40rem;
  height: 23rem;
  margin: 0 3rem 0 5rem;
  box-shadow: var(--box-shadow);
}

.modal-paragraph {
  margin: 0 5rem 0 3rem;
  max-width: 60rem;
}

.modal-button {
  margin-top: 5rem;
  margin-bottom: 3rem;
  text-align: center;
}

.modal-button a {
  color: var(--colour-dark);
} */
