/* --- reset --- */
:root {
  --space: 2rem;
  --space-xs: calc(var(--space) / 3);
  --space-sm: calc(var(--space) / 2);
  --space-md: calc(var(--space) * 2);

  --color-dark: #333;
  --color-light: white;

  --radius: 0.125rem;
  --mobile-header-height: 70px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none;
}


/* --- general --- */

body {
  font-family: Montserrat, sans-serif;
  font-size: 1.25rem;
  line-height: 1.4;
}



/* --- header --- */

#main-header {
  display: flex;
  padding: var(--space);
  background: var(--color-dark);
  color: var(--color-light);
  height: auto;
}

#avatar {
  width: 475px;
  margin-right: 85px;
}

  #avatar img{
    border: solid 5px #fff;
    border-radius: 100%;
    max-width: 150px;
    float: left;
    margin: 0 30px 0 30px;
  }

  #avatar h1, #avatar h2{
    margin: 0;
  }

  #avatar h1 {
    margin-top: 20px;
    font-weight: 600;
  }

  #avatar h2{
    font-weight: 400;
    font-size: 1rem;
  }

.stat {
  width: 190px;
  text-align: center;
  font-weight: 300;
  font-size: 1rem;
  padding: 0px 30px;
}

  .stat p {
    margin: 0
  }

  .stat span{
    display: block;
    font-size: 1.5rem;
    font-weight: 500;
    border-bottom: solid 0.5px #f5f5f5;
    padding: 0 0 20px 0;
    margin-bottom: 20px;
  }

.toggler, .hamburger {
  display: none;
}


/* --- Document --- */

#doc {
  display: flex;
  flex-wrap: wrap;
  margin: 0 auto;
  padding: 0 var(--space);
  /* min-width: 1028px; */
  margin-bottom: calc(var(--space-md) * -1);
  margin-left: calc(var(--space-sm) * -1);
}

#main-nav {
  --offset: var(--space);
  flex-grow: 1;
  flex-basis: 250px;
  align-self: start;
  position: sticky;
  padding-top: 30px;
  top: var(--offset);
  margin: 0 var(--space-sm);
  height: auto;
}

#main-content {
  flex-basis: 0;
  flex-grow: 999;
  /* min-width: 40%; */
  background-color: #f5f5f5;
  padding: 20px 30px 15px 30px;
  color: #2a2e34;
  border: solid 0.5px #e0e0e0;
  border-width: 0 0.5px;
}

/* --- Side Navigation --- */
#main-nav ul {
  font-family: Montserrat, sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  color: #30a2df;
}

#main-nav ul li {
  list-style-type: decimal;
  font-weight: 400;
}

#main-nav ul ul {
  padding: 0 0 0 15px;
}

#main-nav ul ul li {
  list-style-type:disc;
}

#main-nav ul li a{
  color: #30a2df;
  text-decoration: none;
  display: block;
  padding-bottom: 15px;
}

#main-nav ul li a:hover {
  text-decoration: underline;
  color: #2978a3;
}


/* --- Main Content --- */

#main-content > * + * {
  margin-top: var(--space-xs);
}

#main-content section {
  padding: 1px 0;
  max-width: 800px;
}

#main-content h1{
  font-weight: 700;
  font-size: 1.1em;
  color: #2a2e34;
}

#main-content h1{
  font-weight: 700;
  font-size: 1em;
}

#main-content h2{
  font-weight: 700;
  font-size: 0.8em;
  margin: 20px 0 3px 0;
  color: #5a5c60;
}

#main-content h2 + p{
  margin-top: 0;
}

#main-content p, #main-content ul li{
  font-size: 0.8em;
  font-weight: 400;
  line-height: 1.7em;
}

#main-content .content {
  padding-left: 10px;
}

#main-content ul{
  padding-left: 25px;
}

#main-content ul li{
  margin-bottom: 5px;
}


/* --- Small Screens --- */
@media only screen and (max-width: 1000px) {
  #main-header {
    padding: 15px;
  }
  
  #avatar {
    width: auto;
    text-align: right;
    display: block;
    width: 100%;
    margin-right: 10px;
  }

  #avatar img {
    width: 80px;
    border-width: 3px;
  }

  #avatar h1 {
    margin-top: 10px;
    font-size: 25px;
  }

  .stat {
    display: none;
  }
}




/* --- Mobile --- */
@media only screen and (max-width: 675px) {
  body {
    padding-top: 65px;
    height: auto;
  }

  #doc {
    display: block;
    min-width: 0;
    max-width: none;
    padding: 0;
    margin: 0px auto;
    position: relative;
    height: 100%;
  }

  #main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    height: var(--mobile-header-height);
    padding: 10px 30px 0 0;
  }

    #avatar img, .stat {
      display: none;
    }

    #avatar {
      margin: 0;
    }

    #avatar h1 {
      margin-top: 0px;
      font-size: 20px;
      font-weight: 600;
      display: block;
    }

    #avatar h2{
      display: block;
      font-weight: 400;
      font-size: 15px;
      margin-left: 20px;
      margin-bottom: 5px;
    }

  #main-nav {
    left: -300px;
    position: fixed;
    background: #fff;
    top: var(--mobile-header-height);
    bottom: 0;
    margin: 0;
    padding: 0 20px 0 0;
    --offset: none;
    z-index: 1;
    transition: all 0.4s ease;
  }

  #main-content{
    min-width: 0;
    max-width: none;
    width: 100%;
    position: relative;
    filter: none;
    transition: all  0.4s ease;
  }

  #main-content section {
    padding: 1px 0;
    max-width: none;
  }

  #main-content .content {
    padding-left: 0;
  }

  /* --- Menu adjustments --- */
  .toggler{
    display: inline;
    z-index:2;
    height: 50px;
    width: 50px;
    position: absolute;
    top: 0px;
    left: 0px;
    cursor: pointer;
    opacity: 0;
    background: var(--color-light);
  }

  .hamburger { 
    position: absolute;
    top: 15px;
    left: 10px;
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .hamburger > div{
    position: relative;
    top: 0;
    left: 0;
    background: #fff;
    height: 2px;
    width: 60%;
    transition: all  0.4s ease;
  }
  .hamburger > div::before,
  .hamburger > div::after{
      content: '';
      position: absolute;
      top: -10px;
      background: #fff;
      width: 100%;
      height: 2px;
      transition: all  0.4s ease;
  }
  .hamburger > div::after{
      top: 10px;
  }

  .toggler:checked + .hamburger > div{
    background: var(--color-dark);
  }

  .toggler:checked + .hamburger > div::before{
    top: 0;
    transform: rotate(45deg);
    background: #fff;
  }

  .toggler:checked + .hamburger > div::after{
    top: 0;
    transform: rotate(135deg);
    background: #fff;
  }

  
  #main-header:has(> .toggler:checked) + #doc > #main-nav{
    left: 0;
  }

  #main-header:has(> .toggler:checked) + #doc #main-content{
    filter: blur(2px);
  }
}


@media only screen and (max-width: 520px) {
  #main-header {
    height: 65px;
  }

  .hamburger {
    top: 10px;
  }

  #main-nav {
    top: 65px;
  }

  #avatar {
    line-height: 1
  }

  #avatar h1 {
    margin-top: 5px;
    font-size: 15px;
    font-weight: 600;
  }

  #avatar h2{
    display: inline-block;
    font-weight: 400;
    font-size: 12px;
    margin-left: 20px;
  }
}