:root {
  --page: #111110;
  --surface: #1b1b19;
  --image-placeholder: #292927;
  --line: #3a3a36;
  --text: #f0eee8;
  --muted: #aaa9a3;
  --purple-muted: #514664;
  --purple: #b495ee;
  --violet: #7454b8;
}

html {
  background: var(--page);
}

body {
  color: var(--text);
  background: var(--page);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.site-header,
main,
.site-footer {
  width: min(100% - 3rem, 72rem);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  min-height: 4.5rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.site-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--purple));
  content: "";
}

.wordmark {
  color: var(--text);
  font-family: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  text-decoration: none;
}

.wordmark:hover,
.wordmark:focus-visible {
  color: transparent;
  background: linear-gradient(90deg, #7c5ac2, #b495ee, #d6a8ee);
  background-clip: text;
  -webkit-background-clip: text;
}

.intro {
  padding: clamp(1.35rem, 3vw, 2.25rem) 0 clamp(1.75rem, 3.5vw, 2.75rem);
}

.intro p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr));
  gap: 1.5rem;
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

/* A single tile spans the grid; subsequent projects will form two columns. */
.project-card:only-child {
  grid-column: 1 / -1;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--purple-muted);
  transition: border-color 180ms ease;
}

.project-card--link {
  text-decoration: none;
}

.project-image {
  aspect-ratio: 5 / 2;
  background: var(--image-placeholder);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.project-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 200ms ease;
}

.project-image--in-memoriam img {
  object-position: center 50%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent);
}

.project-image--the-circle img {
  object-position: center 52%;
  filter: sepia(0.7) saturate(0.65) contrast(0.95) brightness(0.85);
}

.project-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
}

.project-type,
.play-time {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-type {
  margin-bottom: 0.75rem;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.project-description {
  max-width: 42rem;
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1rem;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.explore-link {
  color: var(--purple);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.placeholder-status {
  color: var(--muted);
  font-size: 0.78rem;
}

.explore-link span {
  display: inline-block;
  margin-left: 0.25em;
  transition: transform 150ms ease;
}

.explore-link:hover span,
.explore-link:focus-visible span {
  transform: translateX(0.2rem);
}

.site-footer {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--purple-muted);
  color: var(--muted);
  font-size: 0.72rem;
}

.site-footer p {
  margin: 0;
}

@media (min-width: 54rem) {
  .project-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 32rem) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 2rem, 72rem);
  }

  .project-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-image {
    aspect-ratio: 3 / 2;
  }
}

@media (hover: hover) {
  .project-card--link:hover {
    border-color: var(--purple);
  }

  .project-card--link:hover .project-image img {
    transform: scale(1.025);
  }
}

.project-card:focus-within {
  border-color: var(--purple);
}
