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

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  background-color: var(--background);
  color: var(--foreground);
  min-height: 100dvh;
}

.page {
  max-width: var(--max-width);
  min-height: 100dvh;
  margin: 0 auto;
  padding-top: max(2rem, env(safe-area-inset-top));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: var(--rhythm-opens-the-page);
}

header .back {
  margin-right: auto;
  margin-left: -0.5rem;
}

[data-theme="dark"] .icon-moon,
[data-theme="light"] .icon-sun {
  display: none;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--rhythm-continues);
}

main > .stands-apart {
  margin-top: calc(var(--rhythm-stands-apart) - var(--rhythm-continues));
}

h1 {
  font-size: var(--text-display);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
  line-height: var(--leading-tight);
}

h2 {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  margin-bottom: var(--space-label);
}

.intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-within);
}

.tagline {
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
}

.bio {
  max-width: 52ch;
  font-size: var(--text-body);
  color: var(--muted-foreground);
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-within);
}

.project-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--reach);
  height: var(--reach);
  color: var(--primary);
  background-color: var(--muted);
  border-radius: var(--radius);
}

.project-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.project-name {
  font-family: var(--font-mono);
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
}

.project-desc {
  font-size: var(--text-sm);
  color: var(--muted-foreground);
}

.empty-state {
  font-size: var(--text-body);
  color: var(--muted-foreground);
}

.newsletter p {
  max-width: 52ch;
  font-size: var(--text-body);
  color: var(--muted-foreground);
  margin-bottom: var(--space-label);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.social-links {
  display: flex;
  gap: 0.25rem;
  margin-left: calc((var(--reach) - 20px) / -2);
}

footer {
  margin-top: var(--rhythm-stands-apart);
  padding-top: 1.5rem;
  border-top: var(--border-width) solid var(--border);
}

footer p {
  font-size: var(--text-xs);
  color: var(--muted-foreground);
}

.back-home {
  margin-top: 1.5rem;
}

.signals {
  display: flex;
  flex-direction: column;
  gap: var(--rhythm-continues);
}

.signals ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: var(--text-body);
}

.signals .count {
  font-family: var(--font-mono);
  color: var(--muted-foreground);
}

.prose {
  max-width: 60ch;
  color: var(--muted-foreground);
  font-size: var(--text-body);
  line-height: 1.7;
}

.prose h1 {
  color: var(--foreground);
  margin-bottom: 1.5rem;
}

.prose h2 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--foreground);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.prose h3 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--foreground);
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.prose p {
  margin-bottom: 1rem;
}

.prose ul {
  margin: 0 0 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.prose strong {
  color: var(--foreground);
  font-weight: var(--weight-semibold);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background-color: var(--card);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  padding: 0.1rem 0.35rem;
}

.prose a {
  color: var(--foreground);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 0.2em;
}

.prose a:hover {
  text-decoration-color: var(--primary);
}

@media (min-width: 480px) {
  .form-row {
    flex-direction: row;
  }
}

@media (prefers-reduced-motion: no-preference) {
  body {
    transition:
      background-color var(--duration-settle) var(--ease-out),
      color var(--duration-settle) var(--ease-out);
  }
}
