/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.4.14,
* Autoprefixer: v10.4.7
* Browsers: last 4 version
*/

/* || Variables */
:root {
  /* COLORS */
  --BGCOLOR: #bac8ce;
  --ALTBGCOLOR: #fbfaf8;
  --TEXTCOLOR: #22223b;
  --BUTTONS: #e7ecee;
  --ACCENT: #5f849c;
  /* FONTS */
  --TITLEFONT: 'Raleway', sans-serif;
  --TEXTFONT: 'Crimson Text', serif;
}

* {
  margin: 0;
  padding: 0;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

html {
  font-size: 16px;
}

/* SECTIONS */
section {
  position: relative;
  margin-bottom: 2rem;
  background-color: var(--ALTBGCOLOR);
  border-radius: 5px;
}

body {
  font-family: var(--TEXTFONT);
  color: var(--TEXTCOLOR);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--BGCOLOR);
  margin: 20px;
  text-align: left;
}

footer {
  background-color: var(--ALTBGCOLOR);
}

div {
  background-color: var(--ALTBGCOLOR);
}

h1 {
  font-family: var(--TITLEFONT);
  font-size: 30px;
  margin-bottom: 1rem;
}

h2 {
  font-family: var(--TITLEFONT);
  font-size: 24px;
}

h3 {
  font-family: var(--TITLEFONT);
  font-size: 18px;
}

a:link {
  color: var(--TEXTCOLOR);
  text-decoration: none;
}

a:visited { /* pseudo class */
  color: var(--TEXTCOLOR);
}

a:hover, a:focus {
  color: var(--ACCENT);
  text-decoration: none;
}

a:active {
  color: var(--TEXTCOLOR);
}

hr {
  background-color: white;
}

table {
  margin: 30px;
  display: block;
}

table, th, td {
  border: 1px solid black;
  border-collapse: collapse;
}

th, td {
  padding: 5px;
}

input, textarea {
  width: 90%;
  padding: 5px;
  border: 1px solid var(--BUTTONS);
  border-radius: 8px;
}

button, .button {
  border: none;
  display: inline-block;
  font-family: 0.9em;
  background-color: var(--BUTTONS);
  color: white;
  text-decoration: none;
  padding: 5px;
  margin-right: 10px;
  border-radius: 3px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.3);
  -webkit-transition: 0.4s opacity;
  -o-transition: 0.4s opacity;
  transition: 0.4s opacity;
}

a:hover, a:focus, .button:hover, .button:focus {
  cursor: pointer;
  opacity: 0.8;
}

ul { list-style-type: none; }

li { text-decoration: none; }

/** START 
/* navbar links: top and bottom borders go out
/* inspired by Evyatar Da's codepen https://codepen.io/EvyatarDa/pen/waKXMd
*/
li.container {
  font-family: var(--TEXTFONT);
  margin: 0 auto;
  padding: 15px;
  text-align: right;
}

li.container a {
  color: fff;
  text-decoration: none;
  font: 18px var(--TEXTFONT);
  margin: 0;
  padding: 10px;
  position: relative;
  z-index: 0;
}

.bgcol {
  background: var(--ALTBGCOLOR);
}

li.twolines a:before, li.twolines a:after {
  position: absolute;
  left: 0px;
  width: 100%;
  height: 2px;
  background: var(--BUTTONS);
  content: "";
  opacity: 0;
  -webkit-transition: all 0.4s;
  -o-transition: all 0.4s;
  transition: all 0.4s;
}

li.twolines a:before {
  top: 0px;
  -webkit-transform: translateY(10px);
      -ms-transform: translateY(10px);
          transform: translateY(10px);
}

li.twolines a:after {
  bottom: 0px;
  -webkit-transform: translateY(-10px);
      -ms-transform: translateY(-10px);
          transform: translateY(-10px);
}

li.twolines a:hover:before, li.twolines a:hover:after {
  opacity: 1;
  -webkit-transform: translateY(0px);
      -ms-transform: translateY(0px);
          transform: translateY(0px);
}
/* END top and bottom borders go out */

.button__secondary {
  background-color: var(--BUTTONS);
  color: black;
}

/* Header */
.page-header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
}

.header-content {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 1rem;
  background-color: var(--ALTBGCOLOR);
  border-radius: 5px;
}

.page-header__item {
  -webkit-box-flex: 0;
      -ms-flex: 0 1 auto;
          flex: 0 1 auto;
  margin-right: 1rem;
}

/* NAVIGATION */
.main-navigation {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  margin-top: 1rem;
}

.navigation-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
}

.navigation-list__item {
  margin-right: 1rem;
}

.navigation-list li {
  display: inline-block;
  margin-left: 15px;
}

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

.navigation-list a:before, .navigation-list a:after {
  position: absolute;
  opacity: 0;
  width: 0%;
  height: 2px;
  content: '';
  background: #FFF;
  -webkit-transition: all 0.3s;
  -o-transition: all 0.3s;
  transition: all 0.3s;
}

.navigation-list a:before {
  left: 0px;
  top: 0px;
}

.navigation-list a:after {
  right: 0px;
  bottom: 0px;
}

.navigation-list a:hover:before, .navigation-list a:hover:after {
  opacity: 1;
  width: 100%;
}

/* SECTIONS */

.profile-container,
.projects-container,
.skills-container,
.contact-container {
  padding: 1rem;
  background-color: var(--BGCOLOR);
}

/* ABOUT */

#about {
  scroll-margin-top: 70px;
}

.profile-container {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 4rem;
  margin: 2rem 0;
}

#about-picture {
  max-width: 700px;}

.about-info {
  display: inline-block;
  margin: 2rem;
  padding: 4rem 10rem 2rem 4rem;
  line-height: 1.8rem;
  font-size: 1.1rem;
  border-radius: 5px;
}

.profile-portrait {
  float: left;
  border-radius: 50%;
  width: 250px;
  height: auto;
  margin: 10px 40px 10px 10px;
  -webkit-box-shadow: 5px 5px 20px var(--ACCENT);
          box-shadow: 5px 5px 20px var(--ACCENT);
}

.links {
  margin: 3rem 0;
}


/* start grid fallback for old browsers */
.project-list__item, .skills-list__item, .about-info {
  display: inline-block;
  margin-bottom: 2rem;
}
/* end grid fallback for old browsers */

/* SKILLS */

.skills-container h1 {
  margin-bottom: 2rem;
}

.skills-list {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr 20px 1fr 20px 1fr 20px 1fr;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-gap: 20px;
  background-color: var(--BGCOLOR);
  margin: 0 0 20px 0;
}

.skills-list__item {
  background-color: var(--ALTBGCOLOR);
  grid-gap: 5px;
  padding: 10px;
  border-radius: 5px;
}

@supports (display: grid) {
  .skills-list {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr 20px 1fr 20px 1fr 20px 1fr;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-gap: 20px;
    margin: 0;
  }
}

/* PROJECTS */

.projects-container h1 {
  margin-bottom: 2rem;
}

.project-list {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr 20px 1fr 20px 1fr;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 20px;
  background-color: var(--BGCOLOR);
  margin: 0 0 20px 0;
}

.project-list__item {
  background-color: var(--ALTBGCOLOR);
  grid-gap: 5px;
  padding: 10px;
  border-radius: 5px;
}

.project-list__item:last-child {
  -ms-grid-column: 3;
  grid-column: 3/3;
  -ms-grid-row: 1;
  -ms-grid-row-span: 2;
  grid-row: 1/ span 2;
  /* in long form this would be: ;
  grid-column-start: 3;
  grid-column-end: 3;w
  grid-row-start: 1;
  grid-row-end: 3;
  */
}

#projects .project-list__item img {
  width: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  height: 165px;
  border-radius: 5px 5px 0px 0px;
}

.project-link {
  padding: 0.5rem;
  margin-top: 1rem;
}

@supports (display: grid) {
  .project-list {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr 20px 1fr 20px 1fr;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 20px;
    margin: 0;
  }
}

/* FOOTER */

.page-footer {
  text-align: center;
  /* display: flex;
  justify-content: space-between;
  align-items: center; */
  padding: 1rem;
  background-color: var(--ALTBGCOLOR);
  border-radius: 5px;

}

.span {
  background-color: var(--ALTBGCOLOR);
}

.profile, .about, .experience, .contact {
  /* max-width: 700px; */
  min-height: 300px;
  padding: 10px;
  margin: 10px auto;
}

.contact {
  text-align: center;
}

.contact-form {
  display: block;
  width: 420px;
  margin: 20px auto;
  padding: 5px;
  -webkit-box-shadow: 5px 5px 20px var(--ACCENT);
          box-shadow: 5px 5px 20px var(--ACCENT);
}

/* MEDIA */

@media all and (max-width: 750px) {
  .profile-container {
    padding: 3rem;
    margin: 1rem 0;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
  }
  .about-info {
    margin-bottom: 1rem;
    padding: 2rem;
  }
}

@media all and (max-width: 420px) {
  .profile-container {
    padding: 2rem;
  }
  .about-info {
    margin: 1rem 0;
    padding: 1rem;
  }
}

@media all and (max-width: 500px) {
  .project-list {
    -ms-grid-columns: 1fr;
    grid-template-columns: 1fr;
  }
}

@media all and (min-width: 500px) and (max-width: 750px) {
  .project-list {
    -ms-grid-columns: 1fr 20px 1fr;
    grid-template-columns: 1fr 1fr;
  }
}

@media all and (max-width: 750px) {
  /* shared code */
  .main-navigation {
    margin-top: 1rem;
  }
  .header-content {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
  }
  .navigation-list {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
  }
  .navigation-list__item {
    margin-right: 0;
  }
  .project-list {
    grid-gap: 10px;
  }
  .project-list__item:last-child {
    grid-column: auto / auto;
    grid-row: auto / auto;
  }
}

@media all and (max-width: 420px) {
  .page-header {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
  }
  .main-navigation {
    margin-top: 1rem;
  }
  .page-header__item img {
    max-height: 4em;
  }
}