/* White, charcoal, and muted sage. Recolor the site from these variables. */
:root {
  --bg: #ffffff;
  --ink: #222a25;
  --muted: #5d6a63;
  --sage: #5e8a73;
  --sage-deep: #4d7460;
  --line: #e6ebe8;
  --soft: #f3f5f4;
  --surface: #ffffff;
  --overlay: rgba(94, 138, 115, 0.48);
  --sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Sitka Display", "Palatino Linotype", Palatino, Georgia, serif;
  --space: clamp(4.5rem, 9vw, 7.5rem);
  --wrap: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.25rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button,
.button,
input[type="submit"],
input[type="button"] {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--sage);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1;
  padding: 0.85rem 1.35rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.35s ease, color 0.35s ease;
}

button:hover,
.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
button:focus-visible,
.button:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible {
  background: var(--sage-deep);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
}

::selection {
  background: #d7e6de;
  color: var(--ink);
}

.wrap {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
}

.about .wrap,
.work .wrap,
.contact .wrap {
  text-align: center;
}

.section-label {
  margin: 0 0 1rem;
  color: var(--sage);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
.work-name {
  font-family: var(--serif);
  font-weight: 400;
  text-wrap: balance;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
  padding-block: 0.85rem;
}

.logo {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.35s ease;
}

.logo:hover,
.logo:focus-visible {
  color: var(--sage);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
}

.nav a {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-decoration: none;
  background-image: linear-gradient(var(--sage), var(--sage));
  background-repeat: no-repeat;
  background-size: 0 1px;
  background-position: 0 100%;
  transition: background-size 0.35s ease, color 0.35s ease;
}

.nav a:hover,
.nav a:focus-visible {
  background-size: 100% 1px;
}

.about {
  padding-top: clamp(4.5rem, 10vw, 7rem);
}

.about h1 {
  font-size: clamp(3.2rem, 8vw, 5.75rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.interests {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.04em;
}

.interests li:not(:last-child)::after {
  content: "·";
  margin-inline: 0.75rem;
  color: var(--sage);
}

.about-copy {
  max-width: 38rem;
  margin: 2rem auto 0;
  font-size: 1.15rem;
  line-height: 1.75;
  text-wrap: pretty;
}

.work {
  padding-top: var(--space);
}

.work h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.contact h2 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 32rem));
  justify-content: center;
  gap: 2.75rem 1.75rem;
  margin-top: 2.5rem;
}

.work-card {
  display: grid;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.work-media {
  position: relative;
  grid-area: 1 / 1;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.work-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.placeholder-badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 1;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.overlay {
  grid-row: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0.35rem;
  pointer-events: none;
}

.overlay span {
  color: var(--sage);
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.06em;
}

.work-name {
  grid-row: 2;
  margin-top: 0.95rem;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.contact {
  margin-top: var(--space);
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
  padding-bottom: clamp(4.5rem, 10vw, 7rem);
  border-top: 1px solid var(--line);
}

.email {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--ink);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.35s ease;
}

.email:hover,
.email:focus-visible {
  color: var(--sage);
}

.about,
.work,
.contact {
  animation: fade-up 0.8s ease both;
}

.work {
  animation-delay: 0.08s;
}

.contact {
  animation-delay: 0.14s;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  .overlay {
    grid-area: 1 / 1;
    z-index: 2;
    padding: 0.9rem;
    background: var(--overlay);
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  .overlay span {
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: var(--sage);
    color: #fff;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
  }

  .work-card:hover .overlay,
  .work-card:focus-visible .overlay {
    opacity: 1;
  }

  .work-card:hover .work-image,
  .work-card:focus-visible .work-image {
    transform: scale(1.04);
    filter: brightness(0.82);
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(var(--wrap), calc(100% - 2rem));
  }

  .header-inner {
    min-height: 3.75rem;
  }

  .nav {
    gap: 0.25rem 1rem;
  }

  .about h1 {
    font-size: clamp(2.7rem, 14vw, 3.6rem);
  }

  .about-copy {
    font-size: 17px;
    line-height: 1.6;
  }

  .about-lead {
    font-size: 19px;
    line-height: 1.6;
  }

  .about-copy p + p {
    margin-top: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .decor {
    --parallax-dots: 0;
    --parallax-lines: 0;
  }
}

/* Decorations. Retune placement, density, and parallax here. */
.decor {
  --parallax-dots: -0.05;
  --parallax-lines: -0.14;
  --dot-strength: 1;
  --line-strength: 0.88;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

main,
.contact {
  position: relative;
  z-index: 1;
}

.decor-dots,
.decor-lines {
  position: absolute;
  transform: translate3d(0, var(--shift, 0px), 0);
}

.decor-dots {
  --shift: var(--shift-dots, 0px);
  inset: -16vh 0;
}

.dot-patch {
  --dot-radius: 1.05px;
  --dot-space: 34px;
  --dot-opacity: 0.26;
  --ox: 0%;
  --oy: 40%;
  position: absolute;
  background-image: radial-gradient(
    circle,
    var(--sage) var(--dot-radius),
    transparent calc(var(--dot-radius) + 0.7px)
  );
  background-size: var(--dot-space) var(--dot-space);
  opacity: calc(var(--dot-opacity) * var(--dot-strength));
  -webkit-mask-image: radial-gradient(
    ellipse 130% 115% at var(--ox) var(--oy),
    #000 0%,
    rgba(0, 0, 0, 0.5) 16%,
    rgba(0, 0, 0, 0.16) 48%,
    transparent 78%
  );
  mask-image: radial-gradient(
    ellipse 130% 115% at var(--ox) var(--oy),
    #000 0%,
    rgba(0, 0, 0, 0.5) 16%,
    rgba(0, 0, 0, 0.16) 48%,
    transparent 78%
  );
}

.dot-patch::before {
  content: "";
  position: absolute;
  inset: -14%;
  background-image: radial-gradient(circle, var(--sage) 0.7px, transparent 1.35px);
  background-size: 42px 42px;
  background-position: 12px 8px;
  opacity: 0.8;
  -webkit-mask-image: radial-gradient(
    ellipse 145% 125% at var(--ox) var(--oy),
    transparent 0%,
    rgba(0, 0, 0, 0.7) 22%,
    rgba(0, 0, 0, 0.2) 58%,
    transparent 90%
  );
  mask-image: radial-gradient(
    ellipse 145% 125% at var(--ox) var(--oy),
    transparent 0%,
    rgba(0, 0, 0, 0.7) 22%,
    rgba(0, 0, 0, 0.2) 58%,
    transparent 90%
  );
}

.dot-patch-top {
  top: 4vh;
  left: -10vw;
  width: min(68vw, 820px);
  height: min(58vh, 640px);
  --ox: 4%;
  --oy: 32%;
}

.dot-patch-mid {
  top: 42vh;
  right: -12vw;
  width: min(62vw, 740px);
  height: min(52vh, 560px);
  --ox: 96%;
  --oy: 40%;
  --dot-space: 38px;
  --dot-opacity: 0.22;
}

.dot-patch-low {
  top: 102vh;
  left: -9vw;
  width: min(52vw, 600px);
  height: min(42vh, 440px);
  --ox: 8%;
  --oy: 68%;
  --dot-space: 40px;
  --dot-opacity: 0.2;
}

.decor-lines {
  --shift: var(--shift-lines, 0px);
  opacity: var(--line-strength);
}

.decor-lines-left {
  top: 2vh;
  left: -8vw;
  width: min(70vw, 860px);
  height: min(72vh, 760px);
}

.decor-lines-right {
  top: 30vh;
  right: -10vw;
  width: min(66vw, 800px);
  height: min(68vh, 700px);
}

.decor-lines-low {
  top: 104vh;
  left: -8vw;
  width: min(48vw, 520px);
  height: min(34vh, 340px);
  opacity: calc(var(--line-strength) * 0.7);
}

@media (max-width: 640px) {
  .decor {
    --parallax-dots: 0;
    --parallax-lines: 0;
    --dot-strength: 0.55;
    --line-strength: 0.58;
  }

  .dot-patch-top {
    top: 6vh;
    left: -46px;
    width: 250px;
    height: 280px;
  }

  .dot-patch-mid {
    top: 52vh;
    right: -54px;
    width: 230px;
    height: 250px;
  }

  .dot-patch-low {
    top: 112vh;
    left: -42px;
    width: 210px;
    height: 220px;
  }

  .decor-lines-left {
    top: 8vh;
    left: -28px;
    width: 250px;
    height: 280px;
  }

  .decor-lines-right {
    top: 54vh;
    right: -32px;
    width: 230px;
    height: 250px;
  }

  .decor-lines-low {
    top: 118vh;
    left: -24px;
    width: 190px;
    height: 150px;
  }
}
