/* 
fonts
font-family: 'Graduate', cursive;
font-family: 'Raleway', sans-serif;
font-family: 'Montserrat', sans-serif;
 */

body {
  margin: 0;
  box-sizing: border-box;
  font-size: 1rem;
}

img {
  display: block;
  width: 100%;
}

a:focus {
  border-color: #3dccc7;
}

/* =================
    Buttons
================= */
.btn {
  font-family: "Raleway", sans-serif;
  font-size: 1.125rem;
  font-weight: 800;
  text-decoration: none;
  padding: 0.75em 1.8em;
  color: #000;
  justify-self: start;
  margin-bottom: 2em;
  border: none;
}

.btn-primary {
  background: #3dccc7;
}

.btn-primary:hover,
.btn-primary:focus {
  /* background: #dc758f; */
  background: #f6ae2d;
}

.btn-square {
  display: inline;
  padding: 0.2em;
  margin: 0.2em;
}

.btn-expand {
  display: flex;
  justify-content: flex-start;
  overflow: hidden;
}
.btn-expand img {
  display: inline;
}

.btn-expand::after {
  content: attr(data-hover);
  padding: 0 0px;
  text-overflow: clip;
  white-space: nowrap;
  width: 0px;
}
.btn-expand:hover::after,
.btn-expand:focus::after {
  width: 100%;
}

/* =================
    Typography
================= */

h1,
h2,
h3,
p {
  margin-top: 0;
}

p,
a {
  font-family: "Montserrat", sans-serif;
  line-height: 1.5;
  font-weight: 400;
}

/* sections */
.section-title {
  font-family: "Raleway", sans-serif;
  font-size: 2.25rem;
}

/* nav */
.logo-text {
  font-family: "Graduate", cursive;
  font-size: 3rem;
  letter-spacing: -7px;
}
.nav-link {
  font-family: "Raleway", sans-serif;
  font-weight: 400;
  font-size: 3rem;
  text-transform: uppercase;
  color: #000;
  text-decoration: none;
}

/* hero */
.hero-title {
  font-family: "Raleway", sans-serif;
  font-weight: 800;
  font-size: 3rem;
}
.hero-subtitle {
  font-family: "Montserrat", sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
}

/* project-components */
.project-title {
  font-family: "Raleway", sans-serif;
  font-weight: 400;
  font-size: 2.25rem;
}
.project-date {
  font-family: "Raleway", sans-serif;
  font-weight: 800;
  font-size: 0.75rem;
  color: #d0d0d0;
}

.project-desc {
  font-size: 0.875rem;
}

.stack-item {
  display: inline;
  border: 2px solid #3dccc7;
  border-radius: 3px;
  padding: 0.2em 0.4em;
}

/* about me */
.attrs-text {
  font-family: "Raleway", sans-serif;
  font-weight: 400;
  font-size: 1.5rem;
}
.about-text {
  font-size: 1.5rem;
}

/* contact */
.contact-email {
  font-family: "Raleway", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5em;
  opacity: 0.5;
}
.contact-cv {
  font-family: "Raleway", sans-serif;
  font-weight: 800;
  text-decoration: underline;
}
.contact-bg-text {
  font-family: "Raleway", sans-serif;
  font-size: 4em;
  font-weight: 800;
  color: #3dccc7;
  opacity: 0.2;
  margin: 0;
  /* text-align: center; */
}

/* forms */
.contact-form label {
  font-family: "Montserrat", sans-serif;
  line-height: 1.5;
  font-weight: 400;
}

@media (min-width: 768px) {
  .nav-link {
    font-size: 1.5rem;
  }
  .attrs-text {
    font-weight: 800;
  }
  .skills-stack {
    font-size: 2rem;
  }
  .contact-bg-text {
    font-size: 6rem;
    line-height: 1.1;
    text-align: right;
  }
}

/* =================
    Layout
================= */
section {
  padding-top: 75px;
}
.grid-2 {
  display: grid;
  grid-template-columns: minmax(1em, 1fr) minmax(0, 475px) minmax(0, 475px) minmax(
      1em,
      1fr
    );
}
.grid-projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 2em;
}
.grid-3 {
  grid-template-columns:
    minmax(1em, 1fr) minmax(0, 400px) minmax(0, 400px) minmax(0, 266px)
    minmax(1em, 1fr);
}

.grid-2 * {
  grid-column: 2 /-2;
}

/* nav bar */
header {
  margin-top: 0.5em;
  grid-auto-flow: dense;
  position: fixed;
  width: 100%;
}

.logo-filler {
  background: #3dccc7;
  grid-column: 1;
  width: 100%;
}
.logo-text {
  grid-column: 2;
  background: #3dccc7;
  justify-self: start;
  padding-right: 10px;
  line-height: 1.2;
  margin-bottom: 0;
}
/* mobile nav */
.nav-links {
  grid-column: 3;
  background: #fff;
  display: flex;
  justify-content: space-around;
  flex-direction: column;
  align-items: center;
  position: fixed;
  height: 100vh;
  width: 100vw;
  left: 100%;
  transform: translateX(0);
  transition: transform 200ms ease-in-out;
  z-index: 1;
}
.nav-open {
  grid-column: 3;
  justify-self: end;
  font-size: 3rem;
  line-height: 1.2;
  background: #fff;
  margin-bottom: 0;
  padding: 0 20px 0 10px;
  cursor: pointer;
  position: absolute;
  transform: translateX(-57px);
}
.nav-open-filler {
  background: #fff;
  grid-column: 4;
  width: 100%;
  height: 100%;
  z-index: 2;
}
.nav-exit {
  position: absolute;
  font-size: 3em;
  top: 50px;
  right: 0;
  margin: 0.5em;
  line-height: 0.8;
  cursor: pointer;
}

.nav-active {
  transform: translateX(-100%);
}
.nav-links.nav-active {
  padding-top: 50px;
  margin-top: -50px;
}
.nav-open.nav-active {
  visibility: hidden;
}

/* desktop nav */
@media (min-width: 768px) {
  .nav-links {
    flex-direction: row;
    position: static;
    height: inherit;
    width: inherit;
    justify-content: space-around;
    width: 80%;
    justify-self: right;
    transform: translateX(0);
    transition: transform 200ms;
  }
  .nav-link {
    overflow: hidden;
  }
  .nav-link span {
    position: relative;
    display: inline-block;
    transition: transform 0.15s;
  }
  .nav-link span::before {
    position: absolute;
    top: 100%;
    content: attr(data-hover);
    display: block;
    font-weight: 800;
  }
  .nav-link:hover span,
  .nav-link:focus span {
    transform: translateY(-100%);
  }
  .nav-exit {
    display: none;
  }
  .nav-open {
    transform: translateX(0px);
    padding: 0 20px 0 10px;
    grid-column: 5;
    justify-self: start;
    position: static;
    visibility: hidden;
  }
  .nav-filler {
    position: absolute;
  }
  /* scroll logic */
  html:not([data-scroll="0"]) .nav-links {
    transform: translateX(100%);
  }
  html:not([data-scroll="0"]) .nav-open {
    transform: translateX(-57px);
    visibility: visible;
    transition: 100ms ease-in;
  }
  html:not([data-scroll="0"]) .nav-links.nav-active {
    transform: translateX(0);
  }
  html:not([data-scroll="0"]) .nav-open.nav-active {
    transform: translateX(0);
    visibility: hidden;
    transition: 100ms ease-in;
  }
}

/* hero */
.hero {
  height: 100vh;
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.hero-subtitle {
  margin-bottom: 1.5em;
  max-width: 400px;
  justify-self: start;
}
.hero-img {
  display: none;
}

@media (min-width: 768px) {
  /* .hero {
    grid-template-columns:
      minmax(1em, 1fr) minmax(0, 300px) minmax(0, 300px) minmax(0, 300px)
      minmax(1em, 1fr);
    grid-auto-flow: dense;
  } */
  .hero {
    background-color: #fff;
    background-image: url(../img/hero.svg);
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 50%;
  }

  .hero-title,
  .hero-subtitle {
    grid-column: 2;
  }
}

/* project component */
.projects {
  background-image: url(../img/background-accent.svg);
  background-repeat: no-repeat;
  background-position: center top;
  padding-bottom: 6em;
}
.project-component {
  margin: 2em 0;
  padding: 2em 0;
  background: #f9fdfd;
  grid-column: 1 / span 2;
}
.project-img {
  margin-bottom: 1em;
}
.project-title {
  margin-bottom: 0px;
}
.stack-item {
  line-height: 2.25;
}
.project-link-img {
  width: 28px;
}
.project-links {
  display: flex;
}
.project-links:first-child {
  margin-left: 0;
}

@media (min-width: 768px) {
  .projects {
    background-image: url(../img/background-accent-wide.svg);
  }
  .project-component {
    grid-column: span 1;
  }
}

/* about */
.about {
  background-color: #cdf2f1;
  background-image: url(../img/background-accent-bottom.svg);
  padding-bottom: 6em;
  background-position: bottom center;
  background-repeat: no-repeat;
}

.attrs {
  margin: 3em 0;
}
.attrs-item {
  display: flex;
  margin-bottom: 0.4em;
}
.attrs-text {
  margin-left: 0.3em;
  margin-bottom: 0;
}
.attrs-img {
  width: 36px;
}
.about-text {
  margin-bottom: 2em;
}
.about-img {
  width: 30%;
  justify-self: center;
  margin: 2em 0;
}
.skills-stack {
  margin-bottom: 1.5em;
}

@media (min-width: 768px) {
  .about {
    grid-auto-flow: dense;
    background-position: bottom right;
  }
  .attrs {
    display: flex;
    justify-content: space-around;
  }
  .attrs-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .attrs-img {
    width: 48px;
    margin-bottom: 1em;
  }

  .attrs-text::after {
    content: "";
    display: block;
    height: 2px;
    width: 100px;
    background: #3dccc7;
    margin: 5px auto 0;
  }
  .skills-stack {
    margin-bottom: 1em;
  }

  .about-text {
    grid-column: 2;
    align-self: center;
  }
  .about-img {
    grid-column: 3;
    width: 100%;
  }
}
/* contact */
.contact {
  background: #f2f5f5;
}
.contact-form {
  background: #f2f5f5;
  display: grid;
}
.contact-form input,
.contact-form textarea {
  border: 1px solid #d0d0d0;
  border-radius: 3px;
  padding: 0.5em 1em;
  font-size: 1.25rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  margin-bottom: 0.5em;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #3dccc7;
}
.contact-form input {
}
.contact-form button {
  justify-self: right;
}

.contact-form textarea {
  resize: none;
  height: 60px;
}
.contact-links {
  display: flex;
  flex-direction: column;
}
.contact-socials {
  width: 30%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.contact-social-img {
  width: 36px;
  opacity: 0.5;
}

@media (min-width: 768px) {
  .contact {
    padding-bottom: 2em;
  }
  .contact-form {
    grid-column: 2;
  }
  .contact-form .btn {
    margin-bottom: 0;
  }
  .contact-links {
    grid-column: 3;
    justify-content: space-between;
    align-items: flex-end;
  }
  .contact-socials {
    margin-top: auto;
  }
  .contact-bg-text {
    line-height: 0.8;
  }
}
