@media screen {
  #site-content {
    --environment-line: #c8d4cd;
    --environment-panel: rgb(255 255 255 / .48);
  }

  .intro-about, .professional-work, .contact-section, .site-footer {
    border-color: var(--environment-line);
  }

  .home-portrait {
    box-shadow: 0 16px 35px -27px rgb(23 51 49 / .72);
  }

  .project-section-heading h2, .notes-section > h2 {
    font-size: clamp(25px, 3.1vw, 33px);
    letter-spacing: -.045em;
  }

  .project-index {
    padding: 8px 10px;
    border: 1px solid var(--environment-line);
    border-radius: 16px;
    background: var(--environment-panel);
    box-shadow: 0 10px 24px -20px rgb(32 64 59 / .45);
  }

  .project-index a {
    border-radius: 9px;
  }

  .project-index a:hover, .project-index a:focus-visible {
    background: rgb(255 255 255 / .72);
    text-decoration: none;
  }

  .project-grid > .portfolio-project {
    box-shadow: 0 2px 4px -3px rgb(20 45 41 / .22), 0 22px 48px -33px rgb(20 45 41 / .50);
  }

  .notes-section {
    max-width: 940px;
    border-top: 1px solid var(--environment-line);
    border-bottom: 0;
  }

  .note-index {
    overflow: hidden;
    border: 1px solid var(--environment-line);
    border-radius: 16px;
    background: var(--environment-panel);
  }

  .note-index li + li {
    border-color: var(--environment-line);
  }

  .note-index a {
    padding-inline: clamp(14px, 3vw, 26px);
    transition: background-color 180ms var(--ease);
  }

  .note-index a:hover, .note-index a:focus-visible {
    background: rgb(255 255 255 / .60);
    text-decoration: none;
  }

  .note-index a:focus-visible {
    outline-offset: -4px;
  }

  @media (max-width: 680px) {
    .project-index {
      padding: 5px;
    }
  }
}

@media screen and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) and (animation-range: entry 0% entry 72%) {
    #site-content::after {
      content: '';
      position: fixed;
      inset: 0 0 auto;
      z-index: 10;
      height: 2px;
      pointer-events: none;
      background: linear-gradient(90deg, #43847d, #8ca06c);
      transform-origin: left;
      animation: environment-progress auto linear both;
      animation-timeline: scroll(root);
    }

    .project-grid > .portfolio-project:not(:focus-within, :target, [data-demo-open='true']) {
      animation: environment-card-entry auto ease-out both;
      animation-timeline: view();
      animation-range: entry 0% entry 72%;
    }

    @keyframes environment-progress {
      from { transform: scaleX(0); }
      to { transform: scaleX(1); }
    }

    @keyframes environment-card-entry {
      from { opacity: .74; translate: 0 18px; }
      to { opacity: 1; translate: 0 0; }
    }
  }
}
