/* BODY */
@keyframes fade-in {
  from {
    opacity: 0;
  }
}

body {
  background-color: #f5f3ef;
  margin: 0;
  transition: background-color .3s;
}

.dim {
  background-color: #e4e0da;
}

.main-container {
  animation: fade-in .5s;
  margin: 15vh auto 0;
  max-width: 80ch;
  position: relative;
  width: 80vw;
}

/* HEADINGS */
h1,
h2,
h3,
h4 {
  color: #141f25;
  font-family: Montserrat, sans-serif;
}

h1,
.education > h2,
.work-life > h2,
.references > h2 {
  color: #486375;
  font-weight: 300;
  margin-top: 50px;
  text-align: center;
}

h1 {
  font-size: 250%;
  font-weight: 100;
  margin: 5vh 0;
}

.heading-4 {
  color: #486375;
  display: flex;
  font-family: Montserrat, sans-serif;
  font-weight: 500;
  justify-content: space-between;
  margin-top: -10px;
  text-align: left;
}

/* PARAGRAPHS and LIST ITEMS */
p, li {
  color: #393939;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 10pt;
}

p {
  text-align: justify;
}

li {
  text-align: left;
}

.education li {
  margin-bottom: 5px;
}

/* HEADER */
.header-placement {
  display: flex;
  justify-content: flex-end;
  max-width: inherit;
  position: absolute;
  right: clamp(-80px, -8.5vw, -40px);
  top: -10vh;
  width: inherit;
}

.language-switch {
  font: 10pt Montserrat, sans-serif;
  position: fixed;
  margin-top: 50px;
  margin-right: -8px;
  transition: all .3s ease-out;
  z-index: 20;
}

.language-switch * {
  color: #99afbd;
  margin: 1px;
  transition: all .3s;
}

.language-switch span {
  font-size: 18pt;
  font-weight: 100;
}

.language-switch.top-position {
  margin-right: 8px;
}

.language-switch.top-position span {
  transform: none !important;
}

.language-switch a.inactive:hover {
  color: #486375;
  font-weight: 600;
}

.language-switch a.active {
  cursor: default;
  font-weight: 600;
}

header {
  align-items: baseline;
  background-color: #99afbd;
  border-radius: 2px;
  box-shadow: 2px 2px 2px #abb7bb99;
  color: #fff;
  display: flex;
  font-family: Montserrat, sans-serif;
  font-weight: 300;
  justify-content: space-between;
  max-width: inherit;
  opacity: 1;
  padding: 5px clamp(40px, 8.5vw, 80px);
  position: fixed;
  transition: max-width .3s ease-out, background-color .3s;
  white-space: nowrap;
  width: inherit;
}

header span,
header a {
  opacity: 1;
  transition: opacity .5s .1s;
}

header .contact-details {
  font-size: 11pt;
}

header:hover,
.expanded-header {
  background-color: #7a9aaf;
}

.collapsed-header {
  max-width: 20px;
  padding: 5px 6px;
}

.collapsed-header span,
.collapsed-header a {
  opacity: 0;
  transition: opacity .1s;
  pointer-events: none;
}

.collapsed-header .E {
  opacity: 1;
  left: 4px;
  position: relative;
  transition: left .5s;
}

.cursor-blocker {
  width: 40px;
  height: 33px;
  z-index: 10;
  position: fixed;
  margin-right: -10px;
}

/* LINKS */
a {
  color: #486375;
  text-decoration: none;
}

p a:hover {
  text-decoration: underline;
}

p a:visited {
  color: #186786;
}

.linkedin {
  height: 18px;
}

.github.large-icon { 
  height: 25px;
  margin: -4px 0;
}

.github.small-icon {
  height: 18px;
  margin: -2px 0 1px 0;
}

.large-icon,
.small-icon {
position: relative;
bottom: -3px;
}

.small-icon {
  display: none;
}

header i:hover,
header a:hover {
  opacity: .75;
}

.tooltip {
  bottom: 1.2ch;
  font-size: 8pt;
  font-weight: 500;
  margin-bottom: -2ch;
  opacity: 0;
  pointer-events: none;
  position: relative;
  transition: opacity .3s;
  width: 0;
}

.tooltip.open {
  opacity: .9;
  transition: opacity .3s .2s;
}

.white {
  filter: sepia(200%) saturate(0%) brightness(250%);
}

/* SKILLS SECTION */
.skills {
  display: flex;
  justify-content: space-evenly;
}

.skills h3 {
  color: #486375;
  font-weight: 300;
  margin: 0 0 -10px 20px;
}

.skills > div {
  max-width: 27ch;
  width: fit-content;
}

.skills ul > ul {
  margin-left: -5ch;
}

.skills li {
  color: #141f25;
  font: 10pt Montserrat, sans-serif;
  font-weight: 700;
}

/* REFERENCES SECTION */
.references > div {
  display: flex;
  justify-content: space-evenly;
}

.references p {
  text-align: left;
}


/* FOOTER */
footer {
  bottom: 0;
  color: #557385;
  display: flex;
  font-family: Montserrat, sans-serif;
  font-weight: 300;
  justify-content: space-between;
  padding: 10vh 0 20px;
  position: relative;
  width: 100%;
}

footer .contact-details {
  font-size: 11pt;
  position: relative;
  top: 2px;
}

footer a {
  color: #13678b;
}

@supports (display: contents) {
  .footer-personal,
  .footer-links {
    display: contents;
  }
}

@supports not (display: contents) {
  .footer-personal,
  .footer-links {
    display: flex;
    justify-content: space-between;
  }

  .footer-personal,
  .footer-links,
  footer > .vertical-divider {
    flex: 1 1 auto
  }

  footer > .vertical-divider {
    text-align: center;
  }
}

/* WHEN LAUNGUAGE SWITCH TOUCHES WINDOW BORDER */
@media only screen and (max-width: 810px) and (min-width: 550px) {
  .language-switch.top-position {
    display: unset;
    margin-right: 12px;
  }

  .language-switch {
    display: flex;
    flex-direction: column;
    margin-right: 6px;
  }

  .language-switch span {
    transform: translate(2px, 8px) rotate(90deg) !important;
    margin: -10px 0;
  }
}

/* WHEN HORIZONTAL NAVBAR DOESN'T FIT */
@media only screen and (max-width: 700px) {
  .large-icon {
    display: none;
  }

  .small-icon {
    display: unset;
  }

  footer .linkedin {
    top: 2px;
  }

  .tooltip {
    position: initial;
  }

  .tooltip .long-version {
    display: none;
  }
}

/* SMALL SCREENS */
@media only screen and (max-width: 550px) {
  .main-container {
    margin-top: calc(80px + 10vh);
  }

  .cursor-blocker {
    top: 5vh;
    right: 5px;
  }

  /* LANGUAGE SWITCH */
  .language-switch {
    opacity: 1;
    top: calc(5vh + 5px);
    margin-right: 15px !important;
    right: 0;
    transition: opacity .3s .2s, margin .3s ease-out;
  }

  .language-switch * {
    color: white;
  }

  .collapsed.language-switch {
    pointer-events: none;
    display: inline;
    opacity: 0;
    transition: none;
  }

  /* HEADINGS */
  .heading-4 {
    max-width: 17ch;
    justify-content: start;
    flex-wrap: wrap;
  }

  /* HEADER and FOOTER */
  .header-placement {
    position: unset;
    max-width: 100%;
  }

  header,
  .collapsed-header {
    flex-direction: column;
    right: -2px;
    top: 5vh;
  }

  header {
    max-height: 8ch;
    padding-left: 90px;
    transition: max-width .2s ease-out, max-height .2s .2s ease-out;
  }

  .collapsed-header {
    max-height: 20px;
    transition: padding .2s .2s, max-width .2s .2s ease-out, max-height .2s ease-out;
  }

  header .vertical-divider,
  footer .vertical-divider {
    display: none;
  }

  header * {
    position: relative;
  }

  header .linkedin {
    bottom: -6px;
  }

  header .linkedin-github-divider {
    bottom: 18px;
    left: 26px;
  }

  header .github {
    bottom: 34px;
    left: 36px;
  }

  .download-divider {
    bottom: 59px;
    left: 60px;
  }

  i {
    fill: white;
    bottom: 77px;
    left: 71px;
  }
  
  .tooltip {
    height: 10px;
    width: 10px;
    left: 92px;
    bottom: 92px;
    position: relative;
  }

  .tooltip .long-version {
    display: initial;
  }
  
  .tooltip .long-version br {
    display: none;
  }
  
  .tooltip::selection {
    background: transparent;
  }

  footer {
    width: 100%;
    justify-content: space-between;
    align-items: flex-end;
  }

  .footer-personal {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-right: 10px;
  }

  .footer-links {
    display: inline;
    flex: none;
  }

  footer .linkedin {
    top: 3px;
  }

  /* SKILLS SECTION */
  .skills {
    flex-wrap: wrap;
    justify-content: space-between;
    padding-right: 20px;
  }

  .skills > div {
    max-width: unset;
  }

  .skills ul {
    display: grid;
    grid-template-columns: auto;
  }

  /* REFERENCES SECTION */
  .references > div {
    flex-direction: column;
    margin: 0 auto;
    width: fit-content;
  }
}