:root {
  --ink: #090c15;
  --slate: #4b5563;
  --warm: #b97530;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ink);
  color: #fff;
  font-family: "Inter", sans-serif;
  margin: 0;
}

.display-font {
  font-family: "Cormorant", serif;
}

.site-shell {
  margin-inline: auto;
  max-width: 1140px;
  padding-inline: 15px;
}

.hero-heading {
  font-size: clamp(3.25rem, 6vw, 4.5rem);
  letter-spacing: -1px;
  line-height: 0.93;
}

.section-heading {
  font-size: clamp(2.65rem, 5vw, 3.45rem);
  line-height: 1;
}

.projects-section {
  overflow: hidden;
}

.projects-heading-row {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.project-constellation {
  height: 780px;
  margin-top: 2rem;
  position: relative;
}

.constellation-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  inset: 0;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%);
  pointer-events: none;
  position: absolute;
}

.constellation-path {
  fill: none;
  height: 100%;
  inset: 0;
  overflow: visible;
  pointer-events: none;
  position: absolute;
  stroke: rgba(188, 199, 220, 0.2);
  stroke-dasharray: 3 8;
  stroke-width: 1;
  width: 100%;
}

.constellation-path circle {
  fill: var(--ink);
  stroke: rgba(255, 255, 255, 0.65);
  stroke-dasharray: none;
}

.project-node {
  --node-accent: #a8b8c5;
  background:
    radial-gradient(circle at 92% 100%, color-mix(in srgb, var(--node-accent) 12%, transparent), transparent 42%),
    rgba(9, 12, 21, 0.94);
  border: 1px solid rgba(151, 163, 184, 0.28);
  min-height: 250px;
  padding: 1.65rem 1.75rem 1.5rem;
  position: absolute;
  width: 47%;
}

.project-node::before,
.project-node::after {
  content: "";
  height: 18px;
  pointer-events: none;
  position: absolute;
  width: 18px;
}

.project-node::before {
  border-left: 2px solid var(--node-accent);
  border-top: 2px solid var(--node-accent);
  left: -1px;
  top: -1px;
}

.project-node::after {
  border-bottom: 2px solid var(--node-accent);
  border-right: 2px solid var(--node-accent);
  bottom: -1px;
  right: -1px;
}

.project-node-rbooks {
  --node-accent: #7ba2a5;
  left: 0;
  top: 0;
}

.project-node-alearning {
  --node-accent: #a9a6dc;
  right: 0;
  top: 162px;
}

.project-node-watchen {
  --node-accent: #fb8c6d;
  left: 17%;
  top: 500px;
}

.project-meta {
  color: #8d96a8;
  display: flex;
  font-size: 0.65rem;
  justify-content: space-between;
  letter-spacing: 0.16em;
  position: relative;
  text-transform: uppercase;
  z-index: 1;
}

.project-meta span:first-child {
  align-items: center;
  display: flex;
  gap: 0.55rem;
}

.project-meta i {
  background: var(--node-accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--node-accent);
  display: inline-block;
  height: 5px;
  width: 5px;
}

.project-number {
  color: rgba(255, 255, 255, 0.045);
  font-family: "Cormorant", serif;
  font-size: 6.5rem;
  font-weight: 600;
  line-height: 1;
  position: absolute;
  right: 1rem;
  top: 1.7rem;
}

.project-logo-frame {
  align-items: center;
  display: flex;
  height: 74px;
  margin: 1.25rem 0 0.75rem;
  position: relative;
  z-index: 1;
}

.project-logo {
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
}

.project-logo-rbooks,
.project-logo-alearning {
  width: 235px;
}

.project-logo-watchen {
  width: 250px;
}

.project-description {
  color: #d5d9e1;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 380px;
  min-height: 2.75rem;
  position: relative;
  z-index: 1;
}

.project-link {
  align-items: center;
  color: #fff;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-top: 1.15rem;
  position: relative;
  text-decoration: none;
  z-index: 1;
}

.project-link > span:first-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  padding-bottom: 2px;
}

.project-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 6px;
}

.fade-up {
  animation: fade-up 650ms ease-out both;
}

.fade-up-delay {
  animation: fade-up 650ms 120ms ease-out both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.terms-copy p,
.terms-copy li {
  line-height: 1.5;
}

.terms-copy p {
  margin-bottom: 1rem;
}

.terms-copy ul {
  list-style: disc;
  margin: 0 0 1rem 2.5rem;
}

.terms-copy a {
  text-decoration: underline;
}

.terms-copy .subheading {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.2rem;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--ink);
}

::-webkit-scrollbar-thumb {
  background: #fff;
  border-radius: 16px;
}

@media (max-width: 767px) {
  .site-shell {
    padding-inline: 31px;
  }

  .hero-heading {
    font-size: 3.25rem;
  }

  .projects-heading-row {
    align-items: start;
    display: block;
    margin-bottom: 2rem;
  }

  .project-constellation {
    display: grid;
    gap: 1rem;
    height: auto;
    margin-top: 0;
    padding-left: 13px;
  }

  .project-constellation::before {
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.2) 8%, rgba(255, 255, 255, 0.2) 92%, transparent);
    content: "";
    left: 0;
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
  }

  .constellation-grid,
  .constellation-path {
    display: none;
  }

  .project-node,
  .project-node-rbooks,
  .project-node-alearning,
  .project-node-watchen {
    left: auto;
    min-height: 0;
    padding: 1.4rem;
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
  }

  .project-node::before {
    border-radius: 50%;
    border: 2px solid var(--ink);
    background: var(--node-accent);
    box-shadow: 0 0 10px var(--node-accent);
    height: 7px;
    left: -17px;
    top: 31px;
    width: 7px;
  }

  .project-number {
    font-size: 5.25rem;
  }

  .project-description {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-up,
  .fade-up-delay {
    animation: none;
  }

}
