@layer components {
.post-list {
  padding: 4rem 0 7rem;

  :where(header) {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    position: relative;

    &::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 1px;
      background: linear-gradient(to right, var(--ink) 0%, var(--ink) 40%, oklch(from var(--ink) l c h / 0) 100%);
    }

    :where(h1) {
      font-family: var(--serif);
      font-size: 3.2rem;
      font-weight: 500;
      line-height: 1.02;
      letter-spacing: -0.025em;
      color: var(--ink);
      margin: 0 0 1.2rem -0.04em;
      text-wrap: balance;

      @media (max-width: 640px) { font-size: 2.4rem; }
    }
  }
}

.post-item {
  display: grid;
  grid-template-columns: 2.8rem 1fr;
  gap: 0 1.8rem;
  padding: 2.4rem 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;

  &:hover :where(h2) { color: var(--accent); }

  &:first-of-type .post-item-body :where(h2) { font-size: 2rem; }

  [aria-hidden] {
    position: absolute;
    right: -0.1em;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--mono);
    font-size: 9rem;
    font-weight: 600;
    color: var(--ink);
    opacity: 0.03;
    line-height: 1;
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.04em;

    @media (max-width: 640px) { font-size: 6.5rem; }
  }

  .post-item-num {
    font-family: var(--mono);
    font-size: 0.66rem;
    color: var(--accent);
    letter-spacing: 0.04em;
    font-weight: 600;
    padding-top: 0.3rem;
    border-top: 2px solid var(--accent);
    z-index: 1;
    align-self: start;
  }

  .post-item-body {
    z-index: 1;

    :where(time) {
      font-family: var(--mono);
      font-size: 0.66rem;
      color: var(--ink-faint);
      letter-spacing: 0.04em;
      display: block;
      margin-bottom: 0.6rem;
    }

    :where(h2) {
      font-size: 1.5rem;
      font-weight: 500;
      line-height: 1.25;
      color: var(--ink);
      margin: 0 0 0.55rem;
      transition: color 0.2s;
      text-wrap: pretty;
    }

    :where(p) {
      font-size: 0.88rem;
      color: var(--ink-muted);
      line-height: 1.72;
      font-style: italic;
      margin: 0;
    }

    :where(span) {
      font-family: var(--mono);
      font-size: 0.63rem;
      color: var(--ink-faint);
      display: block;
      margin-top: 0.6rem;
    }
  }
}

}
