*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #f8fafc;
  color: #111827;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: page-out 300ms ease-in both;
}

::view-transition-new(root) {
  animation: page-in 300ms ease-out both;
}

@keyframes page-out {
  to {
    opacity: 0;
    transform: translateY(-16px);
  }
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.page-shell {
  width: min(920px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
  padding-top: 56px;
  padding-bottom: 56px;
}

.eyebrow {
  margin: 0 0 12px 0;
  color: #4c1d95;
  font-size: 0.84rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: 4rem;
  line-height: 0.95;
}

.lead {
  max-width: 720px;
  margin: 22px 0 34px 0;
  color: #334155;
  font-size: 1.15rem;
  line-height: 1.65;
}

.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 22px;
}

.project-card,
.detail-card {
  display: block;
  border: 2px solid #111827;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 0 #c4b5fd;
  color: inherit;
  padding: 26px;
  text-decoration: none;
}

.featured-card {
  view-transition-name: featured-card;
}

.muted-card {
  background: #eef2ff;
  box-shadow: 0 10px 0 #c7d2fe;
}

.project-kicker {
  display: block;
  margin-bottom: 14px;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.project-card h2,
.detail-card h2 {
  margin: 0 0 12px 0;
  font-size: 1.7rem;
}

.project-card p,
.detail-card p {
  color: #334155;
  line-height: 1.55;
}

.project-link,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 18px;
  border: 2px solid #111827;
  border-radius: 6px;
  background: #111827;
  color: #ffffff;
  font-weight: 800;
  padding: 0 14px;
  text-decoration: none;
}

.back-link {
  margin-top: 0;
  margin-bottom: 30px;
}

.project-card:focus-visible,
.back-link:focus-visible {
  outline: 4px solid #f0c040;
  outline-offset: 4px;
}

.detail-card {
  max-width: 720px;
}

pre {
  overflow-x: auto;
  border: 2px solid #111827;
  border-radius: 8px;
  background: #111827;
  color: #f8fafc;
  padding: 18px;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  h1 {
    font-size: 2.8rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}
