@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("assets/atkinson-hyperlegible-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("assets/atkinson-hyperlegible-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #1d1d1f;
  --text: #d9d8d5;
  --heading: #f5f4f0;
  --muted: #9c9b97;
  --hairline: rgba(255, 255, 255, 0.14);
  --serif: "Iowan Old Style", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Grain + vignette, fixed behind all content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    url("assets/noise.svg") repeat,
    radial-gradient(120% 100% at 50% 0%, #2a2a2e 0%, #1d1d1f 50%, #131315 100%);
  background-size: 240px 240px, cover;
}

a {
  color: var(--heading);
}

a:focus-visible {
  outline: 2px solid var(--heading);
  outline-offset: 3px;
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.wordmark {
  display: flex;
  align-items: center;
}

.wordmark-logo {
  display: block;
  height: 2.25rem;
  width: auto;
  filter: invert(1);
}

/* Burger menu (CSS-only, via <details>) */

.menu {
  position: relative;
}

.menu summary {
  list-style: none;
  cursor: pointer;
  display: block;
  color: var(--heading);
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu summary svg {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
}

.menu .icon-close,
.menu[open] .icon-burger {
  display: none;
}

.menu[open] .icon-close {
  display: block;
}

.menu-panel {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  z-index: 10;
  min-width: 12rem;
  padding: 0.5rem;
  background: #2a2a2c;
  border: 1px solid var(--hairline);
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
}

.menu-panel a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
  padding: 0.6rem 0.9rem;
  border-radius: 0.5rem;
  white-space: nowrap;
}

.menu-panel a:hover {
  color: var(--heading);
  background: rgba(255, 255, 255, 0.06);
}

.menu-panel .menu-lang {
  margin-top: 0.5rem;
  border-top: 1px solid var(--hairline);
  border-radius: 0 0 0.5rem 0.5rem;
  padding-top: 0.85rem;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  align-items: center;
  gap: 3rem;
  max-width: 68rem;
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
}

.hero-quote p {
  font-family: var(--serif);
  font-size: 1.625rem;
  line-height: 1.45;
  color: var(--heading);
  text-align: right;
  text-wrap: balance;
}

.hero-quote cite {
  display: block;
  margin-top: 1.75rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted);
  text-align: right;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1);
  border-radius: 1rem;
}

/* Sections */

.section {
  max-width: 36rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  text-align: center;
}

.section h2 {
  font-size: 1.25rem;
  color: var(--heading);
  margin-bottom: 1.25rem;
}

.project-card {
  position: relative;
  display: block;
  width: fit-content;
  margin: 0 auto;
  border-radius: 1rem;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.project-shot {
  display: block;
  width: 100%;
  max-width: 26rem;
  height: auto;
  border-radius: 1rem;
}

.project-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  height: auto;
}

.project-card:hover {
  transform: translateY(-4px);
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5));
}

.project-card:active {
  transform: translateY(-1px) scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .project-card {
    transition: none;
  }

  .project-card:hover,
  .project-card:active {
    transform: none;
  }
}

.support-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--heading);
  text-decoration: none;
  font-size: 0.9375rem;
}

.button:hover {
  border-color: var(--heading);
}

/* Legal pages */

.legal {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.legal h1 {
  font-size: 1.5rem;
  color: var(--heading);
  margin-bottom: 1.5rem;
}

.legal h2 {
  font-size: 1.0625rem;
  color: var(--heading);
  margin: 2rem 0 0.5rem;
}

.legal p {
  margin: 0.5rem 0;
}

.legal a {
  color: var(--text);
}

/* Footer */

.site-footer {
  max-width: 68rem;
  margin: 4rem auto 0;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
}

.footer-nav a {
  color: var(--muted);
}

.footer-nav a:hover {
  color: var(--heading);
}

/* Responsive */

@media (max-width: 48rem) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 3rem;
    padding-bottom: 3.5rem;
  }

  .hero-photo {
    order: -1;
  }

  .hero-quote p,
  .hero-quote cite {
    text-align: center;
  }
}
