:root {
  --timeline-img-span: 7;
  --timeline-video-span: 3;

  --bg-color: black;
  --surface0: #1c1c1c;
  --surface1: #2a2a2a;
  --surface2: #3b3b3b;

  --line-color: white;
  --text-color: white;
  --accent-color: #d71921;
}
@font-face {
  font-family: geist-sans;
  src: url(../fonts/Geist-Regular.woff2);
}
@font-face {
  font-family: geist-pixel;
  src: url(../fonts/GeistPixel-Square.woff2);
}
@font-face {
  font-family: geist-mono;
  src: url(../fonts/GeistMono-Regular.woff2);
}
* {
  font-family: geist-sans;

  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  list-style: none;
  color: var(--text-color);

  scroll-behavior: smooth;
  transition: transform 0.3s ease-in-out;
}
a{
  color: var(--accent-color);
}
h1{
  font-family: geist-pixel;
  font-size: 5rem;
  text-align: center;
}
h2{
  font-family: geist-pixel;
  font-size: 3rem;
}
h3{
  font-family: geist-mono;
  font-size: 2rem;
}
h4{
  font-family: geist-mono;
  font-size: 1.5rem;
}
h5{
  font-family: geist-mono;
  font-size: 1rem;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2em;
  background-color: var(--bg-color);
}

.grain {
  position: fixed;
  object-fit: contain;
  z-index: -20;
  background-image: url(https://upload.wikimedia.org/wikipedia/commons/5/5c/Image_gaussian_noise_example.png);
  background-position: center center;
  top: -30rem;
  left: -30rem;
  opacity: 0.2;
  pointer-events: none;
  animation: noise 10ms infinite;
  width: calc(100vw + 60rem);
  height: calc(100vh + 60rem);
}
@keyframes noise {
  0%  { transform: translate3d(0,9rem,0) }
  10% { transform: translate3d(-1rem,-4rem,0) }
  20% { transform: translate3d(-8rem,2rem,0) }
  30% { transform: translate3d(9rem,-9rem,0) }
  40% { transform: translate3d(-2rem,7rem,0) }
  50% { transform: translate3d(-9rem,-4rem,0) }
  60% { transform: translate3d(2rem,6rem,0) }
  70% { transform: translate3d(7rem,-8rem,0) }
  80% { transform: translate3d(-9rem,1rem,0) }
  90% { transform: translate3d(6rem,-5rem,0) }
  to  { transform: translate3d(-7rem,0,0) }
}

main {
  max-width: 130em;

  padding-top: 10em;

  display: flex;
  flex-direction: column;
  gap: 10em;
  align-items: center;
}
header{
  width: 100%;
  padding: 4em;
}
.aboutMe-container{
  --imageHeight: 600px;
  --aboutMePadding: 1em;
  background-color: var(--surface0);
  border-radius: calc(15px + 1em);
  padding: var(--aboutMePadding);
  height: 600px;
  display: flex;
  gap: 2em;

  .aboutMe-image{
    height: calc(var(--imageHeight) - (var(--aboutMePadding) * 2));

    img{
      aspect-ratio: 1;
      height: 100%;
      object-fit: cover;
      border-radius: 15px;
    }
  }
  .aboutMe-text{
    display: flex;
    flex-direction: column;
    gap: 1em;
    padding: 1em;

    width: 30rem;
  }
}
.timeline-entry-contents img:hover{
  transform: scale(1.05);
  transition: transform 0.3s ease-in-out;
  z-index: 5;
  box-shadow: 0px 0px 100px 0px black;
}
.timeline-container{
  display: flex;
  flex-direction: column;
  gap: 3em;;

  h2{
    text-align: center;
  }
}
.timeline-content-container {
  max-width: 90vw;
  display: flex;
  flex-direction: row;
  align-items: end;
  

  
  #timeline-line{
    --timeline-line-width: 5px;

    height: 100%;
    align-self: flex-start;
    
    mask-image: linear-gradient(rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 1) 90%, rgba(255, 255, 255, 0) 100%);
    width: 10px;
    margin-left: var(--timeline-line-width);
    border-left: solid var(--line-color) var(--timeline-line-width);
    z-index: 0;
  }
  .timeline-media-container{
    display: flex;
    flex-direction: column;
    gap: 10em;

    .timeline-year {
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 5em;
      padding-left: 1em;
      
      h2 {
        text-align: left;
        position: sticky;
        top: 0px;
        font-size: 3rem;
      }
      .timeline-month {
        width: 100%;
        display: flex;
        gap: 1em;
        align-items: flex-start;
  
        h3 {
          font-size: 1.2em;
          height: 100%;
          width: 10rem;
  
          position: sticky;
          top: 3rem;
        }
        .timeline-entry-container {
          width: 100%;
          border-radius: 20px;
          display: flex;
          flex-direction: column;
          gap: 2em;
  
          .timeline-entry {
            border-radius: 15px;
            
            display: flex;
            flex-direction: column;
            gap: 1em;
  
            .timeline-entry-contents{  
              --timeline-entry-contents-gap: 0.5em;
  
              --timeline-img-width: calc((100% - (var(--timeline-entry-contents-gap) * (var(--timeline-img-span) - 1))) / var(--timeline-img-span));
              --timeline-video-width: calc((var(--timeline-img-width) * var(--timeline-video-span)) + (var(--timeline-entry-contents-gap) * (var(--timeline-video-span) - 1)));
  
              display: flex;
              flex-wrap: wrap;
              gap: var(--timeline-entry-contents-gap);
  
              img {
                border-radius: 10px;
                width: var(--timeline-img-width);
                aspect-ratio: 1;
                object-fit: cover;
              }
              video{
                border-radius: 10px;
                width: calc(var(--timeline-video-width));
              }
            }
          }
        }
      }
    }
  }
}

@media screen and (max-width: 1300px) {
  main{
    padding: 1em;
  }
  .aboutMe-container{
    padding: 1em;
    flex-direction: column;
    height: auto;
    width: 70vw;
    min-width: 20em;
    img{
      width: 100%;
    }
    .aboutMe-text{
      width: 100%;
    }
  }
  .timeline-entry-container{
    --timeline-img-span: 3;
  }
}

@media screen and (max-width: 600px) {
  h1{
    font-size: 3rem;
  }
  h2{
    font-size: 2rem;
  }
  .aboutMe-container{
    width: 90vw;
  }
  .aboutMe-image{
    display: none;
  }
  .aboutMe-text{
    font-size: 0.75rem;
    width: 100%;
  }
}