/*init*/
*,
*:before,
*:after {
  box-sizing: border-box;
}

body {
  background-color: white;
  color: #1a1a1a;
  font-family: "Bitter", serif;
  font-feature-settings: "liga", "kern";
  font-size: 1.2em;
  font-weight: 400;
  line-height: 1.6em;
  margin: 0 auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  padding: 0;
}

.wrapper {
  width: 1024px;
  margin: 0 auto;
  max-width: 100%;
  padding-top: 120px;
}

.section {
  margin-bottom: 50px;
}

/*type*/
a {
  color: #353535;
  -webkit-text-decoration-color: #353535;
          text-decoration-color: #353535;
}

h1,
h2,
h4 {
  margin-top: 1em;
}

h1,
h2,
h4 {
  color: #353535;
}

h1,
h2 {
  margin-top: 0.6em;
  margin-bottom: 0.6em;
}

h1 {
  font-size: 2em;
  line-height: 1.4em;
  text-align: left;
}

h2 {
  font-size: 2.3em;
  line-height: 1.4em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
  margin-top: 60px;
}

h4 {
  font-size: 1.8em;
  line-height: 1.4em;
  margin-bottom: 0;
}

p,
ul {
  margin-bottom: 1em;
}

p:last-child,
ul:last-child {
  margin-bottom: 0;
}

ul {
  padding-left: 0;
}

strong {
  font-weight: 700;
}

small {
  font-size: 1em;
}

.menu {
  position: fixed;
  display: flex;
  flex-direction: row;
  gap: 0 60px;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
  background-color: white;
  width: 100vw;
  height: 80px;
  z-index: 1000;
  box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, 0.4);
  transition: all .2s ease;
}

.menu.scrolled {
  height: 40px;
}

.menuitem {
  cursor: pointer;
  font-weight: bold;
  font-size: 20px;
  transition: all .2s ease;
}

.menu.scrolled .menuitem {
  font-size: 14px;
}

.menuitem:hover {
  text-decoration: underline;
}

/*elements*/
.card {
  position: relative;
  border-radius: 4px;
  padding: 40px 20px;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
  cursor: pointer;
  user-select: none;
}
.card:hover, .visual:hover {
  background: radial-gradient(circle farthest-corner at center center,
        rgb(255, 255, 255),
        rgb(248, 248, 248)) no-repeat;
}

.close {
  position: absolute;
  top: 0;
  right: 0;
  cursor: pointer;
  height: 40px;
  width: 40px;
  background-image: url(../images/close.svg);
  background-repeat: no-repeat;
  background-size: 20px;
  background-position: center;
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin: 10vh auto;
  max-width: 600px;
  max-height: 80vw;
  width: 90vw;
  max-height: 80vh;
  overflow: auto;
  background-color: white;
  border: 1px solid #ccc;
  padding: 40px;
  z-index: 100;
  text-align: center;
  cursor: default;
  user-select: auto;
  overflow: auto;
}

.popup:hover {
  background: inherit;
}

.popup ul {
  text-align: left;
  padding: 10px 30px;
}

.popup.show {
  display: block;
}

.hide {
  display: none;
}

.show {
  display: block;
}

.subsection {
  overflow: hidden;
  transition: 1s ease max-height, 1s ease margin,
    1s ease opacity;
}

.collapse {
  max-height: 0;
  margin: 0;
  opacity: 0;
}

.expand {
  max-height: 400px;
  margin: 20px 0;
  opacity: 1;
}

[data-reveal] {
  opacity: 0;
  transition: opacity 1s ease;
}
.reveal {
  opacity: 1;
}

.expander {
  height: 80px;
  cursor: pointer;
  background-image: url(../images/caret.svg);
  background-repeat: no-repeat;
  background-position: top center;
  background-size:70px;
  align-self: center;
  transition: all 0.3s;
  margin-top: 30px;
}

.expander:hover {
  background-size: 90px;
}

.expand + .expander {
  transform: rotate(180deg);
}

.card h4 {
  font-size: 1.2em;
  margin-top: 16px;
}
.card p {
  font-size: 1em;
}

.list {
  grid-template-columns: 1fr;
  row-gap: 0.75rem;
}

.listitem {
  background-position: left center;
  background-repeat: no-repeat;
  background-size: 1.125rem;
  list-style: none;
  padding-left: 1.875rem;
}

.item-check {
  background-image: url(https://res.cloudinary.com/uisual/image/upload/assets/icons/check.svg);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background-color: rgba(255, 255, 255, 0.7);
}

/*images*/
img,
svg {
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
}

.portfolioimage {
  cursor: pointer;
}

.profile-logo {
  height: auto;
  max-width: 190px;
}
.codepen {
  transform: scale(3);
}
.github {
  transform: translateY(-6px);
}
.popup-image {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin: 70px auto;
  height: auto;
  width: auto;
  max-width: 80vw;
  max-height: 80vh;
  -o-object-fit: contain;
     object-fit: contain;
  border: 1px solid #999999;
  box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
  padding: 18px;
  background-color: white;
  z-index: 10;
}

/*sections*/
.hero {
  display: grid;
  -moz-column-gap: 20px;
       column-gap: 20px;
  grid-template-columns: repeat(2, 1fr);
  justify-items: center;
  margin-bottom: 100px;
}
.hero h1 {
  text-align: right;
  margin-top: 2.6em;
}
.hero .profilepic {
  border: 1px solid #333333;
  margin-left: 20px;
  width: auto;
  max-height: 563px;
  border-radius: 4px;
  box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
  background-image: url(../images/pic.jpg);
  background-repeat: no-repeat;
  background-size: 100%;
  transition: all 0.2s;
  overflow: hidden;
}
.hero .profilepic:hover {
  box-shadow: rgb(100, 100, 111) 0px 7px 29px 0px;
}
.hero .profilepic img {
  border-radius: 4px;
  transition: all 0.2s;
  transition-timing-function: ease-in-out;
  border-radius: 4px;
}
.hero .profilepic img:hover {
  transform: scale(1.08);
  transform-origin: bottom left;
}
.content {
  position: relative;
}
.titles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.titles .card {
  text-align: center;
  border: 0.0625rem solid #d4d4d4;
}

.profiles {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.links {
  display: grid;
  grid-template-columns: repeat(2, minmax(100px, 400px));
  grid-gap: 50px;
  align-items: center;
  justify-content: center;
}

.project {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 20px;
  gap: 20px;
}
.project .visual {
  text-align: center;
  border: 0.0625rem solid #d4d4d4;
  padding: 16px 16px 6px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.project .visual h4 {
  font-size: 1em;
  margin-top: 0;
  justify-self: center;
}
.project.articles .visual h4 {
   height: 60px;
 }
.project .visual a {
  font-size: 0.7em;
  line-height: 1em;
}
.project .visual img {
  border: 1px solid #d4d4d4;
}
.project .text {
  grid-column: 1/span 3;
}

.articles .visual,
.sideprojects .visual {
  cursor: pointer;
}

.project.twoby2 {
  grid-template-columns: repeat(2, 1fr);
  -moz-column-gap: 100px;
       column-gap: 100px;
}
.project.twoby2 .text {
  grid-column: 1/span 2;
}

/*Media Queries*/
@media screen and (max-width: 1100px) {
  .section {
    margin-left: 20px;
    margin-right: 20px;
  }
  .hero h1 {
    font-size: 1.8em;
  }
  .titles {
    grid-template-columns: repeat(2, 1fr);
  }
  .links {
    grid-template-columns: repeat(2, minmax(100px, 400px));
  }
  .project {
    grid-template-columns: repeat(2, 1fr);
  }
  .project .text {
    grid-column: 1/span 2;
  }
  .project.twoby2,
  .project.articles {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 40px;
  }
  .project.twoby2 .text,
  .project.articles .text {
    grid-column: 1/span 2;
  }
  .menuitem {
    font-size: 16px;
  }
}
@media screen and (max-width: 800px) {
  .menu {
    height: 40px;
    padding-left: 10px;
    padding-right: 10px;
    gap: 0 15px;
  }
}
@media screen and (max-width: 600px) {
  .hero h1 {
    font-size: 1.4em;
    margin-top: 1.6em;
  }
  .titles {
    grid-template-columns: repeat(1, 1fr);
  }
  .menu {
    gap: 0 10px;
  }
  .menuitem {
    font-size: 12px;
  }
}
@media screen and (max-width: 500px) {
  .hero {
    grid-template-columns: 1fr;
    margin-bottom: 40px;
  }
  .hero .profilepic {
    width: 50vw;
  }
  .hero h1 {
    text-align: center;
  }
  .menu {
    display: none;
  }
  .wrapper {
    padding-top: 16px;
  }
  .profile-logo {
    max-width: 80vw;
  }
  .codepen {
    transform: scale(2);
  }
  .github {
    transform: translateY(15px);
  }
  [alt="linkedin profile"] {
    margin-bottom: -100px;
  }
}
@media screen and (max-width: 430px) {
  .menu .menuitem {
    font-size: 12px;
  }
  .expander {
    height: 75px;
  }
  .project, .project.twoby2,
  .project.articles {
    grid-template-columns: 1fr;
    column-gap: 20px;
  }
  .project .text,
  .project.twoby2 .text,
  .project.articles .text {
      grid-column: 1/span 1;
  }
}