:root {
  --red: #d84321;
  --green: #78c42d;
  --yellow: #fcba04;
  --blue: #1da1f2;
  --purple: #f94a76;
  --aqua: #30d1f2;
  --orange: #fe8019;
  --grey: #6d7381;

  --bright-red: #db5343;
  --bright-green: #84c940;
  --bright-yellow: #fcc01a;
  --bright-blue: #31a9f3;
  --bright-purple: #f95882;
  --bright-aqua: #42d5f3;
  --bright-orange: #fe8b2d;
  --bright-grey: #777e8d;

  --dark-0: #373a41;
  --dark-1: #41454d;
  --dark-2: #4c515a;
  --dark-3: #575c67;
  --dark-4: #626874;

  --light-0: #f2f3f4;
  --light-1: #d9dbdf;
  --light-2: #c1c4cb;
  --light-3: #a8acb6;
  --light-4: #8f9fa1;

  --background: #343536;

  --profile-base: 300px;
  --profile-width: calc(var(--profile-base) + 16px);
  --profile-height: 400px;
  --content-width: 900px;
  --content-gap: 80px;

  --scroll-top: 0;

  font-family: "M PLUS Rounded 1c", sans-serif;
  background-color: var(--background);
}

h1, h2, p {
  margin: 0;
}

body {
  position: absolute;
  margin: 0;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

.background {
  position: fixed;
  top: 0;
  left: 0;
  width: calc(50% + var(--profile-width) - 0.5 * (var(--content-width) - var(--content-gap)));
  height: 100vh;
  background-image: url("background.jpeg");
  background-size: cover;
  background-position: center;
  z-index: -10;
}

.background:after {
  content: '';
  width: 400px;
  height: 100vh;
  position: absolute;
  top: 0;
  right: 0;
  background-image: linear-gradient(90deg,rgba(255,255,255,0),var(--background));
}

.content {
  box-sizing: border-box;
  width: 100%;
  height: auto;
  min-height: var(--profile-height);
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 80px;
  display: flex;
  align-items: top;
  justify-content: flex-start;
  gap: var(--content-gap);
}

.profile {
  box-sizing: border-box;
  padding: 8px;
  width: var(--profile-width);
  height: var(--profile-height);
  border-radius: 4px;
  background-color: var(--light-1);
  flex-shrink: 0;
  clip-path: inset(0 0 0 0);
  margin-top: 200px;
}

.profile .layer {
  width: 100vw;
  height: calc(300px + var(--profile-height));
  top: 0;
  left: 0px;
  pointer-events: none;
  position: fixed;
}

.profile .layer.colour {
  background-image: linear-gradient(180deg,rgba(0, 0, 0, 1) 0%, rgba(131, 58, 180, 1) 15%, rgba(253, 29, 29, 1) 50%, rgba(252, 176, 69, 1) 85%, rgba(201, 16, 16, 1) 97%, rgba(0, 0, 0, 1) 100%);
  mix-blend-mode: color-dodge;
}

.profile .layer.specular {
  background-image: linear-gradient(-120deg,rgba(255,255,255,0.6),rgba(255,255,255,0) 70%);
}

.profile .layer.mask {
  background-image: radial-gradient(circle at bottom left, #aaa, #000 50%);
  mix-blend-mode: multiply;
}

.profile .avatar {
  width: var(--profile-base);
  height: var(--profile-base);

  box-shadow: 0px 6px 5px 0px rgba(0,0,0,0.25) inset;
  -webkit-box-shadow: 0px 6px 5px 0px rgba(0,0,0,0.25) inset;
  -moz-box-shadow: 0px 6px 5px 0px rgba(0,0,0,0.25) inset;

  background-image: url("profile.jpeg");
  background-size: 300px 300px;
  margin-bottom: 8px;
}

.swatch {
  width: var(--profile-base);
  display: flex;
  flex-direction: row;
  align-items: top;
  justify-content: space-between;
}

.patch {
  display: block;
  height: 22px;
  width: 16px;
  flex-shrink: 0;
}

.patch.red {
  background-color: var(--red);
}

.patch.green {
  background-color: var(--green);
}

.patch.yellow {
  background-color: var(--yellow);
}

.patch.blue {
  background-color: var(--blue);
}

.patch.purple {
  background-color: var(--purple);
}

.patch.aqua {
  background-color: var(--aqua);
}

.patch.orange {
  background-color: var(--orange);
}

.patch.grey {
  background-color: var(--grey);
}

.name {
  margin: 0;
  font-size: 12pt;
  white-space: nowrap;
  font-weight: 400;
}

.patches {
  display: flex;
  flex-direction: row;
}

.tagline {
  font-weight: 300;
  font-size: 11pt;
}

.gh-link {
  float: right;
  margin-top: 4px;
}

.info {
  color: var(--light-1);
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 80px;
}

.info h1 {
  font-size: 18pt;
  font-weight: 500;
  margin-top: 12px;
}

.info h2 {
  font-size: 12pt;
  font-weight: 500;
}

.info p {
  font-size: 10pt;
  margin-top: 8px;
  margin-bottom: 8px;
}

.mono {
  font-family: monospace;
  font-size: 10pt;
  font-weight: normal;
}

a, a:visited {
  color: var(--blue);
  cursor: pointer;
  transition: color 100ms;
}

a:hover {
  color: var(--bright-blue);
}

.info .copyright {
  font-size: 8pt;
  font-weight: 100;
}

.item {
  margin-top: 8px;
  margin-bottom: 8px;
  background-color: #3A3B3C;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 200ms, filter 200ms;
}

.item:hover {
  filter: drop-shadow(0px 5px 10px rgba(0,0,0,0.2));
  background-color: #454647;
}

.item .who {
  font-weight: 100;
  font-size: 10pt;
  font-style: italic;
}

.item .title {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: auto;
  gap: 10px;
  justify-content: space-between;
}

.item .title .links {
  margin-top: 4px;
  white-space: nowrap;
}

.item p {
  margin: 0;
}

@media only screen and (max-width: 1024px) {
  .background {
    width: 100%;
    height: var(--profile-height);
    background-position: center;
    opacity: calc(1 - (var(--scroll-top) / 500));
  }

  .background:after {
    width: 100%;
    height: 100%;
    bottom: 0;
    left: 0;
    background-image: linear-gradient(180deg, rgba(255,255,255,0), var(--background));
  }

  .content {
    flex-direction: column;
    align-items: center;
    padding-left: 30px;
    padding-right: 30px;
    gap: 40px;
  }

  .info {
    max-width: 600px;
    padding-top: 0px;
  }

  .profile .layer.specular {
    background-image: linear-gradient(-120deg,rgba(255,255,255,0.6),rgba(255,255,255,0) 30%);
  }

  .profile .layer.mask {
    background-image: radial-gradient(circle at top, #aaa, #000 50%);
  }
}
