:root {
  --bg: #f3f0ea;
  --bg-accent: #e8e4db;
  --ink: #1a1a18;
  --muted: #5c5a54;
  --line: #d4d0c6;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", "Helvetica Neue", sans-serif;
  --space: clamp(1.25rem, 4vw, 2.5rem);
  --max: 42rem;
  --max-wide: 68rem;
  --card: #faf8f4;
  --card-media: #ddd8ce;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, #ddd8ce 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, #e4e0d6 0%, transparent 45%),
    var(--bg);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--muted);
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: var(--space);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo:hover {
  color: var(--ink);
}

.nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  font-size: 0.9375rem;
}

.nav a {
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  text-decoration: underline;
}

main {
  flex: 1;
  width: 100%;
  max-width: calc(var(--max) + var(--space) * 2);
  margin: 0 auto;
  padding: calc(var(--space) * 1.75) var(--space);
}

main.main-wide {
  max-width: calc(var(--max-wide) + var(--space) * 2);
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.lede {
  color: var(--muted);
  max-width: 32rem;
  margin-bottom: 2.5rem;
}

.work-gallery {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  overflow: hidden;
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}

.project-card:hover {
  color: inherit;
  border-color: var(--muted);
  transform: translateY(-2px);
}

.project-card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.project-card__media {
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(145deg, transparent 40%, rgb(0 0 0 / 0.04) 100%),
    var(--card-media);
}

.project-card:nth-child(2) .project-card__media {
  background:
    linear-gradient(145deg, transparent 40%, rgb(0 0 0 / 0.04) 100%),
    #d2cfc4;
}

.project-card:nth-child(3) .project-card__media {
  background:
    linear-gradient(145deg, transparent 40%, rgb(0 0 0 / 0.04) 100%),
    #c9c4b8;
}

.project-card:nth-child(4) .project-card__media {
  background:
    linear-gradient(145deg, transparent 40%, rgb(0 0 0 / 0.04) 100%),
    #d8d3c7;
}

.project-card:nth-child(5) .project-card__media {
  background:
    linear-gradient(145deg, transparent 40%, rgb(0 0 0 / 0.04) 100%),
    #cec9bd;
}

.project-card:nth-child(6) .project-card__media {
  background:
    linear-gradient(145deg, transparent 40%, rgb(0 0 0 / 0.04) 100%),
    #c4bfb2;
}

.project-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.1rem 1.15rem;
}

.work-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.work-meta {
  color: var(--muted);
  font-size: 0.875rem;
}

.prose p + p {
  margin-top: 1rem;
}

.resume-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.resume-item h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.resume-item .meta {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0.2rem 0 0.5rem;
}

.site-footer {
  padding: var(--space);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 520px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .work-gallery {
    grid-template-columns: 1fr;
  }
}
