* {
  margin: 0;
  padding: 0;

  box-sizing: border-box;
}

html {
  font-size: 62.5%;
}

:root {
  --color-prim: #ffce29;
  --color-sec: #252525;
  --color-border: #dddddd;
  --font-color: #000000;
}

body {
  width: 100%;
  display: flex;
  flex-grow: 1;
  flex-shrink: 0;
  flex-wrap: nowrap;
  border: 4rem solid var(--color-border);
  border-right: none;
  overflow-wrap: break-word;
  font-family: Bahnschrift, sans-serif;

  color: var(--font-color);
  line-height: 7rem;
  letter-spacing: -0.1rem;
  background-color: white;
  /* overflow: clip; */
}

header {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100vh;
  /* width: 15vw; */
  max-width: 15vw;
  position: sticky;
  top: 2px;
}

.nav {
  background-color: var(--color-bg-sec);
  display: flex;
  flex: 1;
  flex-direction: column;
  width: inherit;
  height: 100vh;
}

.face-img {
  width: inherit;
  height: auto;
}

.nav-links {
  font-family: Bahnschrift SemiBold, sans-serif;
  flex: inherit;
  list-style-type: none;
  display: flex;
  flex-direction: column;
  justify-items: center;
  box-shadow: none;
  border: none;
}

.name-box {
  font-size: 3.8rem;
  text-align: center;
  border: 2px solid var(--color-sec);
  border-bottom: none;
  background-color: var(--color-sec);
  color: white;
  padding: 1.5rem 0;
}

.name-box:link {
  color: #fff;
  text-decoration-line: none;
}

.name-box:visited {
  color: #fff;
  text-decoration-line: none;
}

.name-box:hover {
  text-decoration: underline;
  opacity: 1;
}

.nav-item {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  flex: inherit;
  font-size: 2.8rem;
  border: 2px solid var(--color-border);
  border-bottom: none;
  padding: 2rem 0;
}

.nav-item--selected .nav-item-arrow {
  width: 0;
  height: 0;
  border-top: 2rem solid transparent;
  border-bottom: 2rem solid transparent;

  border-left: 2rem solid var(--color-prim);

  z-index: -1;
  grid-row: 1;
  grid-column: 1;
  align-self: center;
  justify-self: end;

  position: absolute;

  right: 0;
  transform: translate(100%, 0);
}

.nav-item-layout {
  grid-row: 1;
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  /* padding: 2rem; */
}

.nav-item-label-box {
  line-height: 2rem;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  gap: 1rem;
}

.nav-item a {
  flex: inherit;
  width: 100%;
  height: 100%;
  z-index: 9;
}

.nav-item-icon {
  max-width: 3.2rem;
}

.nav-item-label-box > span {
  text-align: center;
  line-height: 1.2;
}

.nav-item a:link {
  color: var(--font-color);
  text-decoration-line: none;
}

.nav-item a:visited {
  color: var(--font-color);
  text-decoration-line: none;
}

.nav-item a:hover {
  text-decoration: underline;
  opacity: 1;
}

.nav-item--selected {
  background-color: var(--color-prim);
  z-index: 0;
  border-radius: 0;
  border: none;
}

main {
  width: auto;
  flex-grow: 1;
  flex-shrink: 1;
  display: flex;
  flex-direction: column;
  gap: 20rem;
  padding: 6rem 4rem;
}

h3 {
  font-size: 3.2rem;
  margin-right: 2rem;
}

p,
h4,
li {
  font-size: 2.8rem;
}

.name {
  display: block;
  align-self: center;
  text-align: center;
  padding: 16rem 0 2rem 0;
  font-size: 12rem;
  font-weight: normal;
  max-width: fit-content;
}

.section-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  margin-top: 3em;
  margin-bottom: 9em;
  padding-top: 1em;
  padding-bottom: 0.5em;
  padding-right: 0.5em;
}

.title-style {
  width: 5rem;
  height: 2rem;
  margin-bottom: 2rem;
  background-color: var(--color-prim);
}

.section-title {
  font-size: 6rem;

  justify-self: end;
  text-align: center;
}

.personal-info {
  text-align: center;
  display: flex;
  flex-direction: column;

  align-items: stretch;
  /* line-height: 2; */
}

.personal-info .section-title {
  text-align: center;
  border: none;
  margin-top: 0;
  flex: 1;
}

.vertical-seperator {
  width: 2px;
  background-color: rgb(206, 206, 206);
  justify-self: center;
  grid-column: 2;
}

.section-content {
  display: grid;
  grid-template-columns: 1fr minmax(1px, 120px) 2fr;
  grid-template-rows: auto;
  align-content: stretch;
  align-items: stretch;
  justify-content: start;
  row-gap: 1rem;
}

.personal-info-box {
  row-gap: 0;
}

.section-content h3,
h4 {
  text-align: end;
}

.section-content p {
  text-align: start;
}

.section-content li {
  margin-left: 1em;
}

/* This monstrosity is caused by my attempt to implement a seperator using CSS grid
   instead of Flexbox. Lesson learned, won't do it again. Still stupid that it doesn't
   work the way I expected it to do. 
   If you add another sub-section, you need to increment the corresponding span.
*/

.personal-info .section-content .vertical-seperator {
  grid-row: span 5;
}

.work-experience .section-content .vertical-seperator {
  grid-row: span 3;
}

.education .section-content .vertical-seperator {
  grid-row: span 2;
}

.software-skills .section-content .vertical-seperator {
  grid-row: span 3;
}

.misc-skills .section-content .vertical-seperator {
  grid-row: span 1;
}

.work-title {
  font-weight: 600;
  font-style: italic;
  font-size: 3rem;
}

.programming-langs,
.software-skills-frameworks,
.software-skills-misc,
.languages {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  justify-content: space-evenly;
  justify-items: start;
  align-items: center;
  row-gap: 2rem;
  column-gap: 2rem;
}

.software-skills-margin {
  margin-top: 10rem;
}

.software-skills p,
.misc-skills p {
  font-size: 3.2rem;
}

.devicon {
  width: 6rem;
  margin-left: 2rem;
}

.devicon-laminas {
  width: 18rem;
}

.rating {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 2rem;
}

.rating-dot {
  border: none;
  background-color: #b9b9b9;
  opacity: 0.7;
  height: 1.6rem;
  width: 1.6rem;
  border-radius: 50%;
}

.rating-dot--active {
  opacity: 1;
  background-color: red;
}

.languages {
  grid-template-columns: 1fr 1fr;
}

footer {
  flex-shrink: 1;
  background-color: var(--color-border);
}

.social-media-links-box {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  position: sticky;
  top: 2px;
}

.social-media-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20vh;
  width: 10rem;
  padding: 2rem 2rem;
  background-color: var(--color-prim);
  border: 2px solid var(--color-border);
}

.social-media-icon {
  width: 4rem;
  height: 4rem;
  vertical-align: middle;
}

.gitlab-icon {
  width: 7rem;
  height: 7rem;
}

.disabled-anchor {
  pointer-events: none;
}

.disabled-anchor > * {
  opacity: 0.5;
}

[data-tooltip] {
  position: relative;
  --scale: 0.8;
}

[data-tooltip]::after {
  --scale: inherit;
  content: attr(data-tooltip);
  position: absolute;
  /* bottom: -0.5em; */
  left: -0.5em;
  top: 50%;
  transform: translateX(-50%) translate(-50%) scale(var(--scale));
  background: rgba(0, 0, 0, 0.75);
  font-size: 2rem;
  white-space: nowrap;
  padding: 0.1rem 0.75rem;
  border-radius: 4px;
  font-weight: 500;
  color: rgb(255, 255, 255);
  opacity: 0;
  transition: ease 0.3s all;
  transition-delay: 300ms;
}

[data-tooltip]:hover::after {
  --scale: 1;
  opacity: 1;
}

@media (max-width: 100rem) {
  html {
    font-size: 50%;
  }
}

@media (max-width: 80rem) {
  .nav-item {
    font-size: 2rem;
  }
}

@media (max-width: 50rem) {
  header {
    display: none;
  }
}

@media (max-height: 65rem) {
  .nav-item {
    font-size: 2rem;
    padding: 1rem 0;
  }
  .nav-item-label-box {
    gap: 0.1rem;
  }
}

@media (max-height: 50rem) {
  .nav-item {
    font-size: 0;
  }
  .nav-item-icon {
    max-width: 4rem;
  }
}
