@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;700&display=swap');

body,
html {
  margin: 0;
  padding: 0;
  background: #fff;
  min-height: 100vh;
}

body {
  color: #333;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
h4 {
  font-family: 'Comfortaa', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

a {
  color: #333;
}

a:hover {
  color: #000;
}

* {
  box-sizing: border-box;
}

header {
  grid-area: 1 / 1 / 2 / 6;
  padding: 1rem 2rem;
  text-align: center;
  font-family: sans-serif;
  font-size: 12px;
  color: #fff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
  background: linear-gradient(to right, #195c8c, #7f2e85);
}

header a {
  font-family: 'Comfortaa', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

header.no-bg {
  background: none;
}

.logo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  position: relative;
  text-decoration: none;
}

.logo img {
  width: 32px;
  height: 32px;
  margin-top: -6px;
  margin-bottom: -6px;
  margin-right: 7px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-sizing: content-box;
}

.logo img:hover {
  transition: all 0.5s ease-in-out;
  transform: rotate(360deg);
}

.links {
  position: absolute;
  left: 2rem;
}

.links a {
  margin-left: 1rem;
}

header h1,
header h2 {
  margin: 0;
  font-size: inherit;
}

header a,
header a:hover,
footer a,
footer a:hover {
  color: #fff;
}

header a:hover,
footer a:hover {
  text-decoration: none;
}

footer {
  grid-area: 5 / 1 / 6 / 6;
  padding: 1.5rem 0 0.5rem;
  text-align: center;
  font-size: 12px;
  color: #ccc;
  background: linear-gradient(to left, #195c8c, #7f2e85);
  font-family: 'Comfortaa', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.github {
  margin-right: 0.5em;
  white-space: nowrap;
}

.github:before {
  text-decoration: none;
  content: '';
  display: inline-block;
  margin-right: 5px;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  background: center center no-repeat
              url("data:image/svg+xml, %3Csvg width='1024' height='1024' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z' transform='scale(64)' fill='%23fff'/%3E%3C/svg%3E%0A");
  background-size: contain;
}

body > main,
body > section,
.no-flex {
  padding: 0 2rem;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.content,
.no-flex {
  position: relative;
}

.content > main,
.content > section,
.flex, .no-flex {
  width: 80vw;
  margin: 0 auto 1rem;
}

.carbon-pages {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem 0;
}

.carbon-pages #carbonads {
  align-self: flex-end;
}

#carbonads {
  max-width: 400px;
  --carbon-font-family: -apple-system, BlinkMacSystemFont,
    'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell,
    'Helvetica Neue', Helvetica, Arial, sans-serif;
  --carbon-font-size: 14px;
  --carbon-padding: 1.5ch;
  --carbon-max-char: 20ch;
  --carbon-bg-primary: hsl(0, 0%, 98%);
  --carbon-bg-secondary: hsl(0, 0%, 92%);
  --carbon-text-color: hsl(0, 0%, 20%);
  z-index: 10;
  font-size: var(--carbon-font-size);
  font-family: var(--carbon-font-family);
}

#carbonads > span {
  display: flex;
  flex-direction: column;
  min-inline-size: 130px;
  max-inline-size: calc(
    130px + var(--carbon-max-char) + 8ch
  );
  padding: var(--carbon-padding);
  gap: var(--carbon-padding);
  background-color: var(--carbon-bg-primary);
  box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.085),
    0 0 2px hsl(0deg 0% 0% / 0.085),
    0 0 4px hsl(0deg 0% 0% / 0.085),
    0 0 8px hsl(0deg 0% 0% / 0.085);
}

#carbonads a {
  color: var(--carbon-text-color);
  text-decoration: none;
}

#carbonads a:hover {
  color: var(--carbon-text-color);
}

#carbonads .carbon-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5ex;
}

#carbonads .carbon-img {
  flex: 0 0 130px;
}

#carbonads .carbon-img img {
  display: block;
}

#carbonads .carbon-text {
  flex-grow: 1;
  flex-basis: var(--carbon-max-char);
  line-height: 1.4;
  text-align: left;
}

#carbonads .carbon-poweredby {
  padding: 6px 8px;
  background: var(--carbon-bg-secondary);
  color: var(--carbon-text-color);
  font-weight: 600;
  font-size: 0.6em;
  line-height: 1.4;
  letter-spacing: 0.2ch;
  text-align: center;
  text-transform: uppercase;
}

@media (prefers-color-scheme: dark) {
  #carbonads {
    --carbon-bg-primary: hsl(0, 0%, 12%);
    --carbon-bg-secondary: hsl(0, 0%, 15%);
    --carbon-text-color: hsl(0, 0%, 90%);
  }
}

.flex {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: center;
}

.flex > * {
  width: 50%;
  padding: 2rem;
}

header, footer {
  width: 100%;
  box-shadow: none;
}

footer {
  margin-top: 5rem;
}

.hero {
  color: white;
  text-align: center;
  padding: 3rem 2rem 8vw;
  background-image: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 500 200'%3E%3Cpath d='M 0 50 C 150 150 300 0 500 80 L 500 0 L 0 0' fill='%2350A3F3'%3E%3C/path%3E%3Cpath d='M 0 50 C 150 150 330 -30 500 50 L 500 0 L 0 0' fill='%23A02DB5' opacity='0.8'%3E%3C/path%3E%3Cpath d='M 0 50 C 215 150 250 0 500 100 L 500 0 L 0 0' fill='%238124A3' opacity='0.1'%3E%3C/path%3E%3C/svg%3E%0A");
  background-size: 100%;
  background-repeat: no-repeat;
  margin: -56px 0 0;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

#waveform {
  height: 164px;
  min-width: 400px;
  flex: 1;
}

.description {
  font-family: 'Comfortaa', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  text-align: center;
  font-size: 1.5rem;
  padding: 2rem 0;
  width: 60%;
  margin: 0 auto;
  text-wrap: balance;
}

.text {
  font-size: 1.2rem;
}

.content h1 {
  font-size: 2.2rem;
}

.content h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

ul {
  list-style-type: none;
  padding: 0;
}

li {
  margin-bottom: 0.75rem;
  text-wrap: balance;
}

code {
  font-family: 'Menlo', 'Monaco', 'Roboto Mono', 'Cascadia', monospace;
}

pre {
  max-width: 100%;
  overflow: auto;
}

code s {
  color: #2E5B88;
  text-decoration: none;
}

code i {
  color: #633F82;
  font-style: normal;
}

code h {
  color: #777;
}

@media (max-width: 768px) {
  header {
    padding: 1rem;
  }

  .logo {
    justify-content: flex-start;
  }
  .links {
    position: static;
    white-space: nowrap;
  }
  .links a {
    margin-left: 0.4rem;
  }
  .links .github {
    margin-right: 0;
  }
  .links .github:before {
    display: none;
  }
  .hero {
    padding: 3rem 1rem 8vw;
    background: linear-gradient(to right, #195c8c, #7f2e85);
  }
  #waveform {
    min-width: 0;
  }
  .carbon-index {
    width: 100%;
  }
  .description {
    padding: 3rem 0 1rem;
    width: 90%;
  }

  body > main,
  body > section,
  .flex,
  .no-flex {
    width: 100vw;
  }
  .no-flex,
  .flex > * {
    width: 100%;
    padding: 0 1rem;
  }
}

@media (prefers-color-scheme: dark) {
  body,
  html {
    background: #1e1e1e;
    color: #fff;
  }

  a {
    color: #ddd;
  }

  a:hover {
    color: #fff;
  }

  code s {
    color: #9EA9C3;
  }

  code i {
    color: #AEA1C1;
  }

  code h {
    color: #999;
  }
}
