:root {
  --bg: #ffffff;
  --text: #000000;
  --dim: #666666;
  --border: #e0e0e0;
}

* {
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  margin: 0;
  // for 320 => 1rem
  padding: 5vw;
  line-height: 1.6;
  background-color: var(--bg);
  color: var(--text);
  font-family: Menlo, Courier, monospace;

  > section {
    width: 100%;
    max-width: 720px;

    > header {
      display: flex;
      flex-flow: column;
      gap: 2rem;
      border-bottom: 2px solid var(--text);
      padding-bottom: 1.5rem;
      margin-bottom: 2.5rem;

      > section {
        &:first-child {
          display: flex;
          justify-content: flex-start;
          align-items: center;
          gap: 2rem;
          width: 100%;

          > section {
            display: flex;
            flex-flow: column;
            gap: 0;

            > h1 {
              display: flex;
              align-items: center;
              gap: 0.5rem;
              font-size: x-large;
              margin: 0;
              letter-spacing: -0.5px;

              > span {
                width: 0.5rem;
                height: 1.2rem;
                background: var(--text);
                vertical-align: middle;
                animation: blink 1s infinite;
              }

              @keyframes blink {
                0%,
                100% {
                  opacity: 1;
                }
                50% {
                  opacity: 0;
                }
              }
            }

            > p {
              font-size: small;
              color: var(--dim);

              > a {
                color: var(--dim);
              }
            }
          }
        }

        &:nth-child(2) {
          margin: 0;

          > a {
            color: var(--text);
            text-decoration: none;
            border: 1px solid var(--text);
            padding: 0.25rem 0.375rem 0.25rem 0.5rem;
            font-size: small;
            margin-right: 10px;
            transition: all 0.2s;

            @media (hover: hover) {
              &:hover {
                background: var(--text);
                color: var(--bg);
              }
            }
          }
        }
      }
    }

    > section {
      margin-bottom: 50px;

      > strong {
        display: block;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--border);
        font-size: medium;
      }

      > section {
        position: relative;
        padding-left: 20px;
        border-left: 1px solid var(--text);
        margin-left: 5px;

        > div {
          position: relative;
          margin-bottom: 2rem;

          &::before {
            content: "";
            position: absolute;
            left: -1.5rem;
            top: 0.5rem;
            width: 0.5rem;
            height: 0.5rem;
            background: var(--text);
            border-radius: 50%;
          }

          > a:first-child,
          > p:first-child {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-weight: bold;
            font-size: small;

            > strong {
              font-size: medium;
              color: var(--text);
            }

            &[data-tag="FEAT"] > span.tag {
              background: #2563eb;
            }

            &[data-tag="FIX"] > span.tag {
              background: #dc2626;
            }

            &[data-tag="UPDATE"] > span.tag {
              background: #7c3aed;
            }

            &[data-tag="ADD"] > span.tag {
              background: #059669;
            }

            &[data-tag="REMOVE"] > span.tag {
              background: #9ca3af;
            }

            &[data-tag="REFACTOR"] > span.tag {
              background: #d97706;
            }

            &[data-tag="PERF"] > span.tag {
              background: #0891b2;
            }

            &[data-tag="STYLE"] > span.tag {
              background: #6b7280;
            }

            &[data-tag="DOC"] > span.tag {
              background: #64748b;
            }

            &[data-tag="TEST"] > span.tag {
              background: #0d9488;
            }

            &[data-tag="CHORE"] > span.tag {
              background: #78716c;
            }

            &[data-tag="SECURITY"] > span.tag {
              background: #b45309;
            }

            &[data-tag="BREAKING"] > span.tag {
              background: #7f1d1d;
              color: #fca5a5;
            }

            &[data-tag="RELEASE"] > span.tag {
              background: #166534;
              color: #bbf7d0;
            }

            > span {
              text-decoration: none;

              &.date {
                font-weight: 400;
                font-size: small;
                color: var(--dim);
              }

              &.tag {
                background: #000;
                color: #fff;
                font-size: x-small;
                padding: 0.125rem 0.5rem;
              }
            }
          }

          p:nth-child(2) {
            margin-top: 0.25rem;
            font-size: small;
            color: var(--text);
          }

          > a {
            &,
            * {
              text-decoration: none;
            }

            strong {
              text-decoration: underline;
            }
          }
        }
      }
    }

    > footer {
      margin-top: 5rem;
      padding-top: 1rem;
      border-top: 1px solid var(--border);
      font-size: small;
      color: var(--dim);
    }
  }
}
