:root {
  --bg: #f7f6f2;
  --ink: #16171a;
  --muted: #6a6b70;
  --rule: #d8d6cf;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "URW Palladio L", P052, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f11;
    --ink: #e8e6e0;
    --muted: #8b8c91;
    --rule: #2a2c30;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

/* Layout */

.page {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 90rem;
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 3rem) clamp(1.5rem, 6vw, 5rem);
}

main {
  align-self: center;
  max-width: 46rem;
  padding-block: clamp(4rem, 14vh, 9rem);
  animation: reveal 1.2s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

/* Header */

.wordmark {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
}

/* Content */

h1 {
  margin: 0 0 2rem;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5.6vw, 4.25rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lede {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  text-wrap: pretty;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 2.5rem;
  max-width: 34rem;
  margin-top: clamp(3rem, 9vh, 5rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.label {
  color: var(--muted);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.contact a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  transition: text-decoration-color 0.25s ease;
}

.contact a:hover {
  text-decoration-color: currentColor;
}

/* Footer */

footer {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

/* Motion */

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  main {
    animation: none;
  }
}
