/* Global styles */
@font-face {
  font-family: "Bubbleboddy Light";
  src: url("./assets/fonts/Bubbleboddy-Regular.ttf")
    format("truetype");
}

html {
  font-size: 62.5%;
  font-family: "Nunito", sans-serif;
  color: #381460;
  overflow-x: hidden;
  margin: -10px -10px;
  background: #fefefa;
  line-height: 1.8;
}

body {
  font-size: 1.8rem;
  margin-bottom: -10px;
}

p {
  text-align: left;
  width: 95%;
}

main {
  display: grid;
  grid-gap: 5%;
  grid-template-columns: 20% 75%;
  grid-template-areas: "side-section bod";
}

a {
  display: block;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
  color: #381460;
}

a:visited {
  color: #381460;
}

a:hover,
a:focus {
  color: #cc2014;
  text-decoration: underline;
}

button {
  display: block;
  background-color: transparent;
  border: none;
  cursor: pointer;
  pointer-events: auto;
}

div > section {
  margin: 15vh 0;
}

.box {
  padding: 2rem;
  border-radius: 0.5rem;
  padding-bottom: 5rem;
}

/* Page layout */
#bod {
  grid-area: bod;
  padding-right: 20vw;
  background-color: #fefefa;
}

/* Side area */

#side-section {
  display: flex;
  align-items: center;
  position: fixed;
  height: 101%;
  background-color: #fefefa;
}

#photo {
  display: inline-block;
  margin: auto;
  margin-left: 0;
  width: 15rem;
}

#photo-small-screen {
  display: none;
}

#name-area {
  display: grid;
  grid-template-columns: 2fr 1fr;
}

/* Navigation */

nav {
  font-family: "Asap", sans-serif;
  font-weight: 700;
  padding-top: 10%;
}

nav > h2 {
  font-size: 3rem;
  margin: 1rem 0;
}

#nav-box {
  padding: 4rem 3rem;
  margin-left: 2rem;
  box-shadow: 1rem 1rem 0 0rem #3c8368;
  border-radius: 0.5rem;
  background-color: #7eecc2;
}

nav > a {
  border-bottom: 0.3rem solid transparent;
  margin-bottom: 10%;
  letter-spacing: 0.1rem;
  width: 12rem;
  color: #381460;
}

nav > a:visited {
  color: #381460;
}

nav > a:hover,
nav > a:focus {
  color: #eb4034;
  background-color: #fefefa;
  text-decoration: none;
}

.focused-section-link {
  border-bottom: 0.3rem solid #381460;
  width: 12rem;
}

/* Main area */

#fixed-social-logos-container {
  display: flex;
  align-items: center;
  position: fixed;
  height: 101%;
  right: 0;
}

#fixed-social-logos {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#fixed-social-logos > a {
  margin: 5ch;
}

.section {
  scroll-margin-top: 5vh;
}

h1 {
  display: inline;
  font-size: 5rem;
  padding-right: 1ch;
}

h2 {
  font-size: 4rem;
  letter-spacing: 0.1rem;
}

h3,
h4 {
  font-size: 2.4rem;
  color: #381460;
  font-weight: "800";
  font-family: "Nunito", sans-serif;
}

.line {
  border-bottom: 0.5rem solid #eb7100;
  width: 30rem;
}

/* Main area - About */

#about-box {
  box-shadow: 1rem 1rem 0 0rem #312fac;
  background-color: #b5b5e6;
}

/* Main area - Skills and Experience */

#skills-box {
  box-shadow: 1rem 1rem 0 0rem #b43c3c;
  background-color: #f0b5b5;
}

h3.skills-heading {
  text-decoration: underline;
  cursor: pointer;
  pointer-events: auto;
}

h3.skills-heading:before {
  content: "\25BA";
  color: #381460;
  padding-right: 1ch;
  padding-left: 1.5ch;
  display: inline-block;
}

h3.expanded:before {
  content: "\25BC";
}

button.accordion {
  text-align: left;
  margin-left: 2em;
  text-indent: -2em;
}

.info {
  display: none;
}

#skills ul {
  padding-bottom: 1em;
}

ul#non-tech-skills > li,
#tech-skills > li {
  margin-left: 5%;
}

ul.accordion {
  margin-top: 0;
}

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

.experience ul {
  list-style-type: disc;
}

.experience li ul,
#volunteer-work li ul {
  padding-inline-start: 5%;
}

#volunteer-work {
  padding-inline-start: 0;
}

#volunteer-work > li {
  list-style-type: none;
}

/* Main area - Projects */

#projects-box {
  box-shadow: 1rem 1rem 0 0rem #0b92c7;
  background-color: #9ecfe2;
}

#project {
  padding-bottom: 1rem;
}

.project {
  border: solid 0.15rem #381460;
  border-radius: 0.5rem;
  margin-bottom: 3rem;
  padding: 1rem;
  padding-top: 0;
}

ul.project-tech li {
  display: inline;
  font-size: 2rem;
}

ul.project-tech {
  margin-top: -2.5rem;
  margin-left: -40px;
}

.card > p {
  text-align: justify;
}

.card > div > div > p {
  text-align: justify;
  padding-right: 1ch;
  flex-basis: 50%;
}

.show-more-button {
  font-family: "Nunito", sans-serif;
  font-size: 1.6rem;
  text-decoration: underline;
  font-size: 2rem;
  font-weight: bold;
  color: #381460;
  padding-left: 0;
}

button:hover {
  color: #cc2014;
  background: #fefefa;
}

.show-more-button:hover,
.show-more-button:focus {
  color: #cc2014;
  background: #fefefa;
}

#budding-more-info {
  display: flex;
}

.mobile-demo-card {
  margin-left: 2ch;
  margin-bottom: 4ch;
}

.mobile-gif {
  display: flex;
  height: 50%;
  width: 40%;
  box-shadow: -0.4rem -0.4rem 2rem 0 #949494;
  border-radius: 0.5rem;
  margin-bottom: 4ch;
  margin-left: 4ch;
  align-self: center;
}

.project-links > a {
  display: inline-block;
  margin-bottom: 2ch;
  font-weight: bold;
  font-size: 1.8rem;
  text-decoration: underline;
}

.desktop-gif {
  width: 100%;
  box-shadow: -0.4rem -0.4rem 2rem 0 #949494;
  border-radius: 0.5rem;
  margin: 2ch 0;
}

.project-links {
  display: flex;
  justify-content: space-around;
}

/* Main area - Blog */

/* #blog-box {
  box-shadow: 1rem 1rem 0 0rem #ffce54;
  background-color: #f1f19c;
} */

/* Main area - Contact */

#contact-box {
  box-shadow: 1rem 1rem 0 0rem #831876dc;
  background-color: #dbb1d6;
}

#contact-social-logos {
  display: none;
}

.logo {
  display: block;
  height: 5rem;
  margin-top: -6rem;
  opacity: 0;
  position: relative;
  fill: #381460;
}

.logo:hover {
  fill: #eb4034;
}

form {
  margin: 4rem auto;
  width: 75%;
}

.screen-reader-only {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

label {
  font-family: "Asap", sans-serif;
  font-weight: bold;
  height: 2rem;
}

input {
  display: block;
  padding: 1ch;
  margin-bottom: 5%;
  font-family: "Nunito", sans-serif;
  font-size: 1.8rem;
  color: #381460;
  width: 70%;
  background-color: #fefefa;
  border: 0.1rem solid #381460;
  border-radius: 0.5rem;
}

textarea {
  color: #381460;
  font-family: "Nunito", sans-serif;
  font-size: 1.8rem;
  resize: none;
  padding: 0.5em;
  background-color: #fefefa;
  border: 0.1rem solid #381460;
  width: 100%;
  height: 10em;
  box-sizing: border-box;
  border-radius: 0.5rem;
}

.invalid-name,
.invalid-email,
.invalid-message {
  color: #8c1d2a;
  display: none;
  text-align: left;
}

#submitted-message {
  display: none;
  text-align: center;
  margin-right: 0;
}

form button {
  background-color: #381460;
  padding: 2rem;
  font-size: 2rem;
  border-radius: 2rem;
  font-family: "Asap", sans-serif;
  color: #fafad2;
  display: block;
  margin: 5% auto;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: #381460;
  transition: background-color 5000s ease-in-out 0s;
}

form button:hover,
form button:focus {
  background-color: #fefefa;
  color: #d82518;
  font-weight: bold;
  border: solid 2px #381460;
}

/* Footer */

footer {
  left: 0;
  bottom: 0;
  height: 15rem;
  width: 100vw;
  text-align: center;
  background: inherit;
}

footer > p {
  font-size: 1.6rem;
  color: #381460;
  padding-top: 5rem;
  text-align: center;
}

footer > p > a {
  display: inline;
  text-decoration: underline;
}

#scroll-top-button {
  display: none;
}

/* MEDIA QUERIES */

@media (max-width: 1050px) {
  /*Main area - About */
  #photo {
    margin: auto;
  }

  #name-area {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 950px) {
  /*Global styles*/
  html {
    padding: 0;
  }

  .line {
    margin: auto;
  }

  /* Page layout */
  #wrapper {
    position: absolute;
    width: auto;
    overflow-x: hidden;
    margin: 0;
    display: grid;
    grid-template-columns: 100%;
    grid-auto-rows: max-content;
    grid-gap: 0;
    grid-template-areas: "side-section" "main";
    margin-bottom: -10px;
    padding: 0;
  }

  main {
    grid-area: main;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #bod {
    padding-right: 0;
    width: 90%;
    padding-top: 0;
  }

  /* Header and navigation */

  #side-section {
    display: flex;
    position: static;
    grid-area: side-section;
    font-size: 1.8rem;
    width: 101%;
    padding: 0;
    border-right: 0;
  }

  nav {
    width: 100%;
    padding: 1ch 0;
    text-align: center;
    margin-left: 0px;
    flex-wrap: wrap;
    flex: 1 0 auto;
    margin-top: 1ch;
  }

  #nav-box {
    padding: 4rem 3rem;
    margin-left: 2rem;
    box-shadow: 0 0 0 0 #3c8368;
    border-radius: 0.5rem;
    background-color: #7eecc2;
    margin: auto;
    width: 80%;
  }

  nav > a {
    display: inline;
    padding: 0 2ch;
    border-left: solid 2px #381460;
  }

  nav > a:hover,
  nav > a:focus {
    background-color: #fefefa;
  }

  .focused-section-link {
    border: none;
  }

  /* Main area - About */

  div#about > section {
    margin-top: 2ch;
  }

  #name-area {
    display: block;
    width: 100%;
  }

  #photo {
    display: none;
  }

  #photo-small-screen {
    display: block;
    width: 15rem;
    margin: auto;
    padding: 1ch;
  }

  h1 {
    margin: 0;
    display: block;
    padding-right: 0;
  }

  h1,
  h2 {
    text-align: center;
  }

  p#blurb {
    padding: 0;
    width: auto;
    text-align: center;
  }

  /* Main area - Skills and Experience */

  h3.skills-heading {
    text-indent: -1.5em;
    margin-left: 1ch;
  }

  .experience {
    padding-inline-start: 10%;
  }

  /* Main area - Projects */

  #budding-more-info {
    display: block;
  }

  #budding-more-info > p {
    padding: 0;
  }

  .project-links,
  .project-links > a {
    display: block;
    text-align: center;
  }

  .mobile-gif {
    width: 40vw;
    margin: auto;
    margin-top: 4ch;
    margin-bottom: 4ch;
  }

  .desktop-gif {
    width: 100%;
  }

  .desktop-demo-card {
    height: 30vh;
  }

  /* Main area - Contact */

  #contact > section > p {
    text-align: center;
  }

  #fixed-social-logos {
    display: none;
  }

  #contact-social-logos {
    display: flex;
    padding: 7rem 15% 0;
    justify-content: space-between;
  }

  .logo {
    height: 4rem;
  }

  form {
    width: 60%;
    margin: auto;
    margin-top: 1ch;
    padding-top: 10%;
    padding-bottom: 10%;
  }

  /* Footer */

  footer {
    display: block;
    padding-bottom: 3rem;
    width: 100%;
  }

  footer > p {
    margin: auto;
    padding-top: 10%;
    width: 70%;
  }

  #scroll-top-button {
    display: block;
    height: 4rem;
    width: 4rem;
    position: fixed;
    bottom: 3vh;
    right: 5vw;
    z-index: 99;
    border-radius: 50%;
    outline: none;
    background-color: #381460;
    color: white;
    cursor: pointer;
    font-size: 2.5rem;
    padding: 0px;
  }

  #scroll-top-button:hover,
  #scroll-top-button:focus {
    background-color: #381460;
  }
}

@media (max-width: 400px) {
  /* Header and navigation */

  #nav-box {
    padding: 0;
  }

  nav > a {
    margin-bottom: 2%;
    display: block;
    width: auto;
    border: none;
  }

  #side-section {
    flex-wrap: wrap;
  }

  .focused-section-link {
    width: auto;
  }

  /* Main area - Contact */

  form {
    width: 70%;
  }

  input {
    width: 90%;
  }
}
