/*
=============== 
Fonts
===============
*/
@import url("https://fonts.googleapis.com/css?family=Open+Sans|Roboto:400,700&display=swap");
/*
=============== 
Variables
===============
*/

:root {
  /* dark shades of primary color*/
  --clr-primary-1: hsl(205, 86%, 17%);
  --clr-primary-2: hsl(205, 77%, 27%);
  --clr-primary-3: hsl(205, 72%, 37%);
  --clr-primary-4: hsl(205, 63%, 48%);
  /* primary/main color */
  --clr-primary-5: #49a6e9;
  /* lighter shades of primary color */
  --clr-primary-6: hsl(205, 89%, 70%);
  --clr-primary-7: hsl(205, 90%, 76%);
  --clr-primary-8: hsl(205, 86%, 81%);
  --clr-primary-9: hsl(205, 90%, 88%);
  --clr-primary-10: hsl(205, 100%, 96%);
  /* darkest grey - used for headings */
  --clr-grey-1: hsl(209, 61%, 16%);
  --clr-grey-2: hsl(211, 39%, 23%);
  --clr-grey-3: hsl(209, 34%, 30%);
  --clr-grey-4: hsl(209, 28%, 39%);
  /* grey used for paragraphs */
  --clr-grey-5: hsl(210, 22%, 49%);
  --clr-grey-6: hsl(209, 23%, 60%);
  --clr-grey-7: hsl(211, 27%, 70%);
  --clr-grey-8: hsl(210, 31%, 80%);
  --clr-grey-9: hsl(212, 33%, 89%);
  --clr-grey-10: hsl(210, 36%, 96%);
  --clr-white: #fff;
  --clr-red-dark: hsl(360, 67%, 44%);
  --clr-red-light: hsl(360, 71%, 66%);
  --clr-green-dark: hsl(125, 67%, 44%);
  --clr-green-light: hsl(125, 71%, 66%);
  --clr-secondary: hsla(182, 63%, 54%);
  --clr-black: #222;
  --ff-primary: "Roboto", sans-serif;
  --ff-secondary: "Open Sans", sans-serif;
  --transition: all 0.3s linear;
  --spacing: 0.25rem;
  --radius: 0.5rem;
  --light-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --dark-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  --max-width: 1170px;
  --fixed-width: 620px;
}
/*
=============== 
Global Styles
===============
*/
/* Creates smooth scrolling around the webpage. */
html {
  scroll-behavior: smooth;
}
*,
::after,
::before {
  margin: 0;
  /* Makes the icon slightly more spread from the my projects text */
  /* padding: 0; */
  box-sizing: border-box;
}
body {
  font-family: var(--ff-secondary);
  background: var(--clr-grey-10);
  color: var(--clr-grey-1);
  line-height: 1.5;
  font-size: 0.875rem;
}
ul {
  list-style-type: none;
}
a {
  text-decoration: none;
}
img:not(.logo) {
  width: 100%;
}

img {
  display: block;
}

h1,
h2,
h3,
h4 {
  letter-spacing: var(--spacing);
  text-transform: capitalize;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  font-family: var(--ff-primary);
}
h1 {
  font-size: 2.75rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.25rem;
}
h4 {
  font-size: 0.875rem;
  padding-bottom: 15px;
}
p {
  margin-bottom: 1.25rem;
  color: var(--clr-grey-5);
}
/* Above 800px ... */
@media screen and (min-width: 800px) {
  h1 {
    font-size: 4rem;
  }
  h2 {
    font-size: 2.5rem;
  }
  h3 {
    font-size: 1.75rem;
  }
  h4 {
    font-size: 1rem;
  }
  body {
    font-size: 1rem;
  }
  h1,
  h2,
  h3,
  h4 {
    line-height: 1;
  }
}
/*  global classes */

.btn {
  text-transform: uppercase;
  background: transparent;
  color: var(--clr-black);
  padding: 0.375rem 0.75rem;
  letter-spacing: var(--spacing);
  display: inline-block;
  transition: var(--transition);
  font-size: 0.875rem;
  border: 2px solid var(--clr-black);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  border-radius: var(--radius);
}
.btn:hover {
  color: var(--clr-white);
  background: var(--clr-black);
}
.btn-white {
  color: var(--clr-white);
  border-color: var(--clr-white);
  border-radius: 0;
  padding: 0.5rem 1rem;
  border-radius: 10px;
}
.btn:hover {
  background: var(--clr-white);
  color: var(--clr-primary-4);
}
.btn-white:hover {
  transform: scale(1.2);
}

.section {
  padding-bottom: 5rem;
}
.section-center {
  width: 95vw;
}
main {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
/*
=============== 
Scroll
===============
*/
/* navbar */
nav {
  padding: 1rem 1.5rem;
  background: var(--clr-white);
  text-align: center;
}
nav .links a:hover {
  color: var(--clr-primary-1);
  transform: scale(1.2);
}
/* fixed nav */
.fixed-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--clr-white);
  box-shadow: var(--light-shadow);
  z-index: 10;
}
.fixed-nav .links a {
  color: var(--clr-grey-1);
}
.fixed-nav .links a:hover {
  color: var(--clr-primary-4);
}

.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-toggle {
  font-size: 1.5rem;
  color: var(--clr-grey-1);
  background: transparent;
  border-color: transparent;
  transition: var(--transition);
  cursor: pointer;
}
.nav-toggle:hover {
  color: var(--clr-primary-4);
}

.links-container {
  height: 0; /* By default, we want to hide these links. */
  overflow: hidden;
  transition: var(--transition);
}

/* 
No height propertyin links, so we can target this specifically
 when using getBoundingClientRect().height
 */
.links a {
  background: var(--clr-white);
  color: var(--clr-grey-5);
  font-size: 1.1rem;
  text-transform: capitalize;
  letter-spacing: var(--spacing);
  display: block;
  transition: var(--transition);
  font-weight: bold;
  padding: 0.75rem 0;
}
.links a:hover {
  color: var(--clr-grey-1);
}

/* Above 800px... */
@media screen and (min-width: 800px) {
  nav {
    background: transparent;
  }
  .nav-center {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .nav-toggle {
    display: none;
  }
  .links-container {
    height: auto !important; /* Without impotant tag, the inline css added by the JS would override the external stylesheet style. */
    text-align: center;
    margin: 0 auto;
  }
  .links {
    display: flex;
  }
  .links a {
    background: transparent;
    color: var(--clr-white);
    font-size: 1.1rem;
    text-transform: capitalize;
    letter-spacing: var(--spacing);
    display: block;
    transition: var(--transition);
    margin: 0 1rem;
    font-weight: bold;
    padding: 0;
  }
  .links a:hover {
    color: var(--clr-white);
  }
}

.logo {
  height: 64px;
  width: 64px;
}

/* hero */
header {
  min-height: 100vh;
  background: linear-gradient(rgba(132, 226, 229, 0.5), rgba(0, 0, 0, 0.7)),
    url(./images/bg.png) center/cover no-repeat;
}
.banner {
  min-height: 100vh;
  display: grid;
  /* padding-top: 150px; */
  place-items: center;
  text-align: center;
  padding-bottom: 5em;
}
.newContainer h1 {
  text-transform: uppercase;
  color: var(--clr-white);
  font-family: "Great Vibes", cursive;
  font-family: "Montserrat", sans-serif;
}
.newContainer p {
  margin: 0 auto;
  margin-bottom: 1.25rem;
  font-size: 21px;
  color: var(--clr-white);
}
.newContainer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-left: 2rem;
  margin-right: 2rem;
  flex-direction: column;
}

.hero-picture {
  border-radius: 10%;
  max-width: 350px;
}
@media screen and (min-width: 800px) {
  .container p {
    font-size: 1.1rem;
  }
  .newContainer {
    font-size: 0.5rem;
  }
}

/* Fade-in title and picture */

.fade-in-image {
  animation: fadeIn 3.5s;
  -webkit-animation: fadeIn 3.5s;
  -moz-animation: fadeIn 3.5s;
  -o-animation: fadeIn 3.5s;
  -ms-animation: fadeIn 3.5s;
}
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

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

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

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

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

/* sections and title */
.title h2 {
  text-align: center;
  text-transform: uppercase;
  padding-top: 1em;
  padding-bottom: 2em;
}
.title span {
  color: var(--clr-primary-4);
}

.contactTitle h2 {
  text-align: center;
  text-transform: uppercase;
  padding-top: 2em;
  padding-bottom: 0;
}
.contactTitle span {
  color: var(--clr-primary-4);
}
#services {
  background: var(--clr-white);
}

/* About section */

.flex-container {
  display: flex;
  flex-wrap: wrap; /* Will wrap to next line if container can't contain all elements.*/
  justify-content: space-evenly; /* Will put space around each element, inc top / bottom of container. */
  padding-left: 4rem;
  padding-right: 4rem;
}

.about {
  background: var(--clr-white);
  text-align: center;
}
.about p {
  padding: 5px;
  color: var(--clr-primary-1);
}
.column {
  width: 30%;
  border-top: 1px solid #cdcdcd;
  box-shadow: 2px 5px 5px #888888;
  border-radius: 15px;
  padding: 1rem;
}

/* For screens < 800px, flex the box downwards. */
@media screen and (max-width: 1000px) {
  .flex-container {
    flex-direction: column;
    padding-left: 3em;
    padding-right: 3em;
  }
  .column {
    width: 100%;
    margin: 10px 0px 1em 0px;
  }
}
@media screen and (max-width: 800px) {
  .flex-container {
    flex-direction: column;
    padding-left: 2em;
    padding-right: 2em;
  }
}
/* Skills section */

.flex-container2 {
  display: flex;
  flex-wrap: wrap; /* Will wrap to next line if container can't contain all elements.*/
  justify-content: space-around; /* Will put space around each element, inc top / bottom of container. */
  width: 100%;
}

.flex-container2 > div {
  padding-bottom: 4rem;
  width: 25%;
}
.flex-container2 > h3 {
  font-size: 40rem;
}

@media screen and (max-width: 799px) {
  .flex-container2 {
    flex-direction: column;
  }
  .flex-container2 > div {
    padding-bottom: 4rem;
    width: 100%;
  }
}
.wrapper2 {
  background-color: #f5f5f5;
}

/* Custom icon colours */

#js-icon {
  color: #f6c700;
  text-align: center;
}
#html-icon {
  color: orangered;
}
#css3-icon {
  color: #2e8bc0;
}
#python-icon {
  color: green;
}
#java-icon {
  color: #ff4c4c;
}
#sql-icon {
  color: #d6b2ff;
}
#git-icon {
  color: #f34f29;
}
#stack-overflow-icon {
  color: #ff9900;
}
#react-icon {
  color: #61dbfb;
}

/* Icons */

.icon1 {
  text-align: center;
}

.spancss {
  font-size: 7.5em;
  padding-bottom: 1rem;
}

.icon h3 {
  text-align: center;
  padding-bottom: 1rem;
  color: #616161;
  font-size: 1.4rem;
}

/* > sign means it will target elements which are direct children of a prticular element. */

.icon1 > h3 {
  padding-top: 1rem;
  text-align: center;
  color: #616161;
  font-size: 14px;
}
.icon {
  padding-top: 1em;
}

/* Portfolio work */

.my-work {
  background: var(--clr-white);
  color: var(--clr-black);
  text-align: center;
  padding-bottom: 0;
}

.portfolio {
  display: grid;
  grid-template-columns: auto auto; /* Two columns */
  grid-template-rows: auto auto; /* Two rows */
  padding: 15%;
  gap: 2em 2rem;
  font-family: var(--ff-secondary);
  padding-top: 0%;
}
@media (max-width: 768px) {
  .portfolio {
    grid-template-columns: auto; /* One column when screen width is less than 768px */
    grid-template-rows: auto; /* One row when screen width is less than 768px */
  }
}

.portWrapper a {
  position: relative;
}
.portWrapper:hover {
  transition: all 500ms cubic-bezier(0.5, 0, 0.5, 1), opacity 250ms linear;
  opacity: 0.8;
  transform: scale(1.05);
  position: relative;
  z-index: 2;
}

.portfolio__image {
  display: flex;
  box-shadow: 2px 5px 5px #888888;
  width: 250px;
  height: 215px;
  object-fit: contain;
  border-top-right-radius: 15px;
  border-top-left-radius: 15px;
}

.portfolio-text {
  align-self: center;
  justify-self: center;
  background: var(--clr-primary-1);
  color: #f5f5f5;
  text-transform: uppercase;
  border-bottom-right-radius: 15px;
  border-bottom-left-radius: 15px;
  padding: 0.75rem 0.5rem;
  box-shadow: 2px 5px 5px #888888;
}

/* Lighthouse report */

.lighthouse-title h2 {
  text-align: center;
  text-transform: uppercase;
  padding-top: 1em;
  padding-bottom: 1em;
}
.lighthouse-title span {
  color: var(--clr-primary-4);
}
.lighthouse-report {
  margin: 0 auto;
  width: 30%;
}
.lighthouse-image {
  border-radius: 35px;
}

@media screen and (max-width: 1100px) {
  .lighthouse-report {
    width: 40%;
  }
}
@media screen and (max-width: 800px) {
  .lighthouse-report {
    width: 50%;
  }
}
@media screen and (max-width: 600px) {
  .lighthouse-report {
    width: 60%;
  }
}
@media screen and (max-width: 500px) {
  .lighthouse-report {
    width: 70%;
  }
}

/* CONTACT */

.contact {
  padding-bottom: 10px !important;
  background-color: white;
}

/* Form padding */
.containerform {
  display: flex;
  justify-content: center;
  padding-top: 20px;
  padding-left: 22%;
  padding-right: 22%;
}

.containerform {
  text-align: center;
  align-content: center;
  width: 100%;
  height: auto;
}

form {
  max-width: 500px;
  width: 70%;
  z-index: 2;
}

/* Form animations */

.formpadding span {
  position: absolute;
  background-color: #00a3a3;
  transition: transform 0.5s ease;
}

.bottom,
.top {
  height: 1.5px;
  left: 0;
  right: 0;
  transform: scaleX(0);
}

.left,
.right {
  width: 1.5px;
  top: 0;
  bottom: 0;
  transform: scaleY(0);
}

.bottom {
  bottom: 0;
  transform-origin: bottom right;
}

/* ~ Selects general siblings of .bottom element */

input:focus ~ .bottom,
textarea:focus ~ .bottom {
  transform-origin: bottom left;
  transform: scaleX(1);
}

.right {
  right: 0;
  transform-origin: top right;
}

input:focus ~ .right,
textarea:focus ~ .right {
  transform-origin: bottom right;
  transform: scaleY(1);
}

.top {
  top: 0;
  transform-origin: top left;
}

input:focus ~ .top,
textarea:focus ~ .top {
  transform-origin: top right;
  transform: scaleX(1);
}

.left {
  left: 0;
  transform-origin: bottom left;
}

input:focus ~ .left,
textarea:focus ~ .left {
  transform-origin: top left;
  transform: scaleY(1);
}

/* End form animations */

/* Below 800 px */
@media screen and (max-width: 800px) {
  form {
    width: 100%;
  }
}

/* Form padding inbetween the form elements */
.formpadding {
  position: relative;
  margin-top: 8px;
  margin-bottom: 15px;
}

input,
textarea {
  width: 6.5em;
  color: white;
  font-size: inherit;
  font-family: inherit;
  background-color: var(--clr-grey-1);
  padding: 0.35em 0.45em;
  border: 1px solid transparent;
  transition: background-color 0.3s ease-in-out;
}

input:-webkit-autofill,
textarea:-webkit-autofill {
  box-shadow: hsl(205, 90%, 76%) inset;
  -webkit-box-shadow: hsl(205, 90%, 76%) inset;
  transition: background-color 5000s ease-in-out 0s;
  -webkit-text-fill-color: hsl(209, 61%, 16%);
}

input:focus,
textarea:focus {
  outline: none;
}

label {
  color: hsl(209, 61%, 16%);
  font-size: 16px;
}

/* Style inputs with type="text", select elements and textareas */

input[type="text"],
select,
textarea {
  border-width: 0px;
  font-size: 16px;
  cursor: pointer;
  width: 100%; /* Full width */
  padding: 12px; /* Some padding */
  border-radius: 4px; /* Rounded borders */
  box-sizing: border-box; /* Make sure that padding and width stays in place */
  resize: vertical; /* Allow the user to vertically resize the textarea (not horizontally) */
}

input[type="email"],
select,
textarea {
  font-size: 16px;
  border-width: 0px;
  cursor: pointer;
  width: 100%; /* Full width */
  padding: 12px; /* Some padding */
  border-radius: 4px; /* Rounded borders */
  box-sizing: border-box; /* Make sure that padding and width stays in place */
  resize: vertical; /* Allow the user to vertically resize the textarea (not horizontally) */
}

/* Style the submit button with a specific background color etc */
input[type="submit"] {
  -webkit-appearance: none;
  cursor: pointer;
  display: inline-block;
  border: 0.1em solid #ffffff;
  background-color: var(--clr-primary-1);
  padding: 10px 30px;
  margin: 5px 0 0 0;
  box-sizing: border-box;
  text-decoration: none;
  width: 130px;
  color: #ffffff;
  text-align: center;
  transition: all 0.5s;
  font-size: 0.8em;
  border-radius: 10px;
}

/* When mouse hover, add a color change */
input[type="submit"]:hover {
  cursor: pointer;
  background-color: var(--clr-primary-4);
  transform: scale(1.2);
}

/* Footer */

footer {
  background: var(--clr-grey-1);
  padding: 2rem;
  text-align: center;
}
footer p,
footer a {
  color: var(--clr-white);
  letter-spacing: var(--spacing);
  margin-bottom: 0;
}

.footer-link:hover {
  text-decoration: underline;
}

/* 
=============================================
=============================================
=============================================
      Styling for animated footer links
=============================================
=============================================
=============================================
*/
.social-list {
  list-style: none;
  display: flex;
  justify-content: center;
  margin: 2em 0;
  padding: 0;
}
.social-list__item {
  margin: 0 0.5em;
  font-size: 2.25rem;
  transition: all 0.5s;
}
@media screen and (max-width: 700px) {
  .social-list__item {
    margin: 0;
  }
}
.social-list .social-list__item .social-list__link {
  width: 80px;
  height: 80px;
  background-color: #fff;
  line-height: 70px;
  font-size: 2.25rem;
  margin: 0 10px;
  display: block;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  border: 3px solid #fff;
  z-index: 1;
}

.social-list .social-list__item .social-list__link .icon3 {
  position: relative;
  color: #262626;
  transition: 0.5s;
  z-index: 3;
}

.social-list .social-list__item .social-list__link:hover .icon3 {
  color: #fff;
  transform: rotateY(360deg);
}

.social-list .social-list__item .social-list__link:before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0%;
  width: 100%;
  height: 100%;
  transition: 0.5s;
  z-index: 2;
}

/* footer icon not centered in it's container circle without this. */
.icon3 {
  position: absolute;
  top: 3%;
  left: 2.5%;
}

.social-list .social-list__item .social-list__link:hover:before {
  top: 0;
}

.social-list .social-list__item:nth-child(1) a:before {
  background: black;
}

.social-list .social-list__item:nth-child(2) a:before {
  background: indigo;
}

.social-list .social-list__item:nth-child(3) a:before {
  background: #0077b5;
}

/* 
======================================
    Styling for the arrow up button
======================================
*/
.top-link {
  font-size: 1.25rem;
  position: fixed;
  bottom: 3rem;
  right: 3rem;
  background: var(--clr-primary-4);
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--clr-white);
  animation: bounce 2s ease-in-out infinite;

  visibility: hidden; /* The link to top of page is hidden by default */
  z-index: -100;
}
.show-link {
  visibility: visible; /* Therefore must add show-link to the element class list at arbitrary scroll height to allow for visibility. */
  z-index: 100;
}

@keyframes bounce {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.5);
  }
  100% {
    transform: scale(1);
  }
}
