/* Constructor */
* {
  box-sizing: border-box;
}

:root {
  --white: hsl(0, 0%, 100%);
  --black: hsl(0, 0%, 10%);
  --light-blue: hsl(210, 100%, 50%);
  --dark-blue: hsl(270, 100%, 50%);
  --blue-gradient: linear-gradient(to right, var(--light-blue), var(--dark-blue));
}


/* General */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--black);
  margin: 16px;
}

.button-link {
  display: inline-block;
  background-color: var(--light-blue);
  color: var(--white);
  border-radius: 16px;
  text-decoration: none;
  padding: 8px 32px;
}

.button-link:hover {
  background-color: var(--dark-blue);
}

.bavel-animation {
  transition-duration: .2s;
}

.bavel-animation:hover {
  box-shadow: 4px 4px 4px 0 hsla(0, 0%, 0%, .25);
  transform: translate(-4px, -4px);
}


/* Navigation */
nav {
  position: relative;
  background-image: var(--blue-gradient);
  border-radius: 16px;
  padding: 0 32px;
}

nav a {
  display: inline-block;
  color: var(--white);
  font-weight: 700;
  line-height: 64px;
  letter-spacing: 2px;
  text-decoration: none;
  padding: 0 16px;
  transition-duration: .2s;
}

nav a:hover {
  color: var(--black);
}

.nav-logo {
  display: block;
  height: 64px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.dropmenu-icon {
  display: none;
  line-height: normal;
}

.dropmenu-icon i {
  font-size: 2em;
  line-height: 64px;
}

.menu {
  display: flex;
  justify-content: space-between;
}

.nav-text,
.nav-icon {
  display: flex;
  justify-content: space-between;
  width: 35%;
}

@media only screen and (max-width: 768px) {
  nav {
    height: 64px;
    overflow: hidden;
  }

  .nav-logo {
    left: 8px;
    transform: translateX(0);
  }

  .dropmenu-icon {
    display: block;
    position: absolute;
    right: 0;
  }

  .menu {
    display: block;
    margin-top: 64px;
  }

  .nav-text,
  .nav-icon {
    display: grid;
    width: auto;
  }

  .nav-text {
    grid-template-columns: 100%;
  }

  .nav-text a {
    text-align: center;
  }

  .nav-icon {
    grid-template-columns: auto auto auto auto;
  }
}


/* Header */
header {
  text-align: center;
  padding-top: 96px;
  padding-bottom: 192px;
}

header img {
  border: 8px solid var(--black);
  border-radius: 100%;
  width: 16em;
}

header h1 {
  font-size: 6em;
  font-family: 'Roboto Mono', monospace;
}

header p {
  margin-bottom: 48px;
}

@media only screen and (max-width: 768px) {
  header {
    padding-top: 48px;
  }
}


/* Section */
section {
  padding: 16px 0 128px;
  margin: 0 32px;
}

section h1 {
  background-image: var(--blue-gradient);
  color: var(--white);
  font-size: 1.75em;
  text-align: center;
  line-height: 48px;
  letter-spacing: 4px;
  border-radius: 16px;
  margin: 0 0 32px;
}

section .button {
  text-align: center;
}

#about > .container {
  display: grid;
  grid-template-areas: 'summary summary' 'skills skills' 'experiences education';
  margin: 0 32px;
}

#summary { grid-area: summary; }
#skills { grid-area: skills; }
#experiences { grid-area: experiences; }
#education { grid-area: education; }

#skills > .container {
  display: flex;
  flex-flow: row;
}

#projects > .container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#certificates > .container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

@media only screen and (max-width: 768px) {
  section {
    margin: 0;
  }

  #about > .container,
  #skills > .container,
  #projects > .container,
  #certificates > .container {
    display: block;
  }

  #projects > .container,
  #certificates > .container {
    margin: 0 32px;
  }
}


/* Article */
article {
  margin-bottom: 32px;
}

article > h2 {
  margin-top: 0;
  margin-bottom: .5em;
}

article p {
  line-height: 1.5em;
}

article section {
  width: 33.33%;
  padding-bottom: 0;
  margin: 0;
}

article > ul {
  list-style-type: none;
  border-left: solid 4px var(--black);
  padding-left: 12px;
  padding-right: 20px;
  margin: 0 0 32px 4px;
}

article > ul > li {
  margin-bottom: 16px;
}

article h3 {
  margin: 0;
}

article p {
  margin: 0 0 .5em;
}

article p span {
  color: hsl(0, 0%, 50%);
  font-size: .9em;
}

article > ul > li > ul {
  list-style-type: disc;
  padding-left: 18px;
}

@media only screen and (max-width: 768px) {
  article section {
    width: 100%;
  }
}


/* Card */
.card {
  border: solid 1px hsl(0, 0%, 90%);
  border-radius: 16px;
  margin: 0 32px 32px 0;
}

.card a {
  text-decoration: none;
  color: inherit;
}

.card-img {
  width: 100%;
  height: 128px;
  object-fit: cover;
  object-position: 50% 0%;
  border-radius: 16px 16px 0 0;
}

.card-detail {
  margin: 16px;
}

.card-detail h4,
.card-detail p {
  margin: 0;
}

.card-detail p {
  font-size: .9em;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  margin-top: 16px;
}

.card-tags span {
  display: inline-block;
  color: var(--light-blue);
  font-size: .75em;
  padding: 2px 8px;
  border: 1px solid var(--light-blue);
  border-radius: 8px;
  margin: 0 4px 4px 0;
}

#projects .card {
  width: 24%;
}

#projects .card-img {
  height: auto;
}

@media only screen and (max-width: 768px) {
  .card {
    margin: 0 0 16px;
  }

  #projects .card {
    width: auto;
  }
}


/* Footer */
footer {
  background-color: hsl(0, 0%, 30%);
  color: var(--white);
  border-radius: 17px;
  padding: 8px 32px;
  text-align: center;
}

footer p {
  font-size: .9em;
  margin: 0;
}