/* SITE FONTS */
@font-face {
  font-family: "Univers LT Std";
  src: url("fonts/subset-UniversLTStd.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Univers LT Std";
  src: url("fonts/subset-UniversLTStd-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* PAGE COLORS AND SPACING */
:root {
  color-scheme: light;
  --paper: #f5f5f2;
  --ink: #111;
  --line: #84847c;
  --lavender: #cdb6e8;
  --gutter: clamp(1rem, 4vw, 4rem);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.45 "Univers LT Std", Arial, sans-serif;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

/* TOP BAR */
.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem var(--gutter);
  font-size: .9rem;
}
.masthead strong { letter-spacing: .04em; }
.archive-link { text-align: right; text-underline-offset: .18em; }

/* LOGO, MISSION, AND SUPPORT */
.intro {
  max-width: 48rem;
  margin-inline: var(--gutter);
  padding-block: clamp(1.2rem, 4vw, 4rem) clamp(2.8rem, 8vw, 7rem);
}
.logo { width: clamp(6.7rem, 15vw, 11rem); }
.mission {
  max-width: 34ch;
  margin: clamp(1.4rem, 3vw, 2.5rem) 0 1.5rem;
  font-size: clamp(1.4rem, 2.7vw, 2.5rem);
  font-weight: 700;
  line-height: 1.13;
  text-wrap: pretty;
}
.support-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .6rem 1.3rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}
.support-button:hover { background: var(--lavender); color: var(--ink); }

/* RECENT PROJECTS AND HEADING ANIMATION */
.projects {
  margin: 0 0 clamp(2rem, 4vw, 4rem);
}
.projects h2 {
  --heading-shift: clamp(.75rem, 4.4vw, 3.125rem);
  width: clamp(15rem, 40vw, 34rem);
  max-width: calc(100% - 2 * var(--gutter));
  margin: 0 auto clamp(1.4rem, 4vw, 3.2rem);
}
@media (prefers-reduced-motion: no-preference) {
  .projects h2 {
    animation: recent-projects 5s ease-in-out infinite;
  }
}
@keyframes recent-projects {
  from { transform: translateX(calc(-1 * var(--heading-shift))); }
  to { transform: translateX(var(--heading-shift)); }
}
.project-scroll {
  display: grid;
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  grid-auto-columns: clamp(17rem, 42vw, 37rem);
  gap: clamp(1.25rem, 4vw, 3.5rem);
  overflow-x: auto;
  padding: .25rem var(--gutter) 1.3rem;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  scrollbar-color: var(--line) var(--paper);
}
.project-scroll:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
.project {
  display: block;
  min-width: 0;
  scroll-snap-align: start;
  text-align: center;
  text-decoration: none;
  font-size: clamp(1rem, 1.8vw, 1.4rem);
}
.project img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  cursor: url("images/project-cursor.png") 20 12, default;
}
.project-art img { object-fit: contain; }
.project span {
  display: block;
  margin-top: .55rem;
}
.project:hover span { text-decoration: underline; text-underline-offset: .15em; }

/* FOOTER */
.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-items: start;
  align-items: baseline;
  column-gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(1.25rem, 2.5vw, 2rem) var(--gutter);
  background: var(--lavender);
}
.footer-details { display: grid; gap: .6rem; }
.footer-credit { margin: 0; text-wrap: pretty; }
.site-footer a {
  padding-block: .2rem;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
.site-footer a:hover { text-decoration-thickness: 2px; }
.footer-signup { justify-self: end; font-weight: 700; }
.footer-email {
  margin: 0;
  font-size: .9rem;
  overflow-wrap: anywhere;
}

/* PHONE LAYOUT */
@media (max-width: 650px) {
  :root { --gutter: clamp(1.25rem, 6vw, 2rem); }
  .masthead { align-items: center; padding-block: .3rem; }
  .archive-link { padding-block: .75rem; }
  .intro { padding-block: 1.5rem clamp(3.25rem, 15vw, 4rem); }
  .logo {
    width: clamp(6.25rem, 27vw, 7.75rem);
    margin-inline-start: -.875rem;
  }
  .mission {
    margin-block: 1.25rem 1.375rem;
    font-size: clamp(1.1875rem, 5.5vw, 1.4rem);
    line-height: 1.26;
    text-wrap: balance;
  }
  .projects { margin-bottom: 2.25rem; }
  .projects h2 { margin-bottom: 1.125rem; }
  .project-scroll {
    grid-auto-columns: 82%;
    gap: 1.5rem 1rem;
    padding-block: 0 .75rem;
    overscroll-behavior-inline: contain;
  }
  .project { text-align: left; line-height: 1.3; }
  .project-art img { object-position: left center; }
  .project span { margin-top: .625rem; }
  .site-footer {
    grid-template-columns: minmax(0, 1fr);
    padding-block: .875rem;
  }
  .footer-details { display: none; }
  .site-footer .footer-signup { justify-self: start; padding-block: .7rem; }
}
