:root {
  --ink: #171310;
  --paper: #FBF8F3;
  --stone: #6E635A;
  --rule: #E3DBD0;
  --signal: #B4472A;
  --surface: #F3EDE4;
  --display: "Fraunces", Georgia, serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F0EAE2;
    --paper: #121010;
    --stone: #9C9086;
    --rule: #2C2724;
    --signal: #E07A52;
    --surface: #1B1817;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
}
a { color: var(--signal); text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.intro, main, footer {
  max-width: 72rem;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.label {
  font: 500 13px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  margin: 0;
}

.intro { padding-top: clamp(3rem, 9vw, 7rem); padding-bottom: clamp(3rem, 7vw, 5rem); }
.intro h1 {
  font: 600 clamp(48px, 9vw, 88px)/1.05 var(--display);
  font-variation-settings: "opsz" 96, "SOFT" 20, "WONK" 1;
  letter-spacing: -0.02em;
  margin: 1rem 0 1.5rem;
}
.intro p { max-width: 34rem; margin: 0 0 1rem; }
.intro .lead { font-size: 21px; line-height: 1.45; }
.intro p:not(.lead):not(.label) { color: var(--stone); }

main > .label { padding-bottom: 1rem; border-bottom: 1px solid var(--rule); }

.work {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr));
  gap: 3.5rem 2rem;
}

.card h3 {
  font: 500 28px/1.15 var(--display);
  font-variation-settings: "opsz" 96, "SOFT" 20, "WONK" 1;
  letter-spacing: -0.01em;
  margin: 1.1rem 0 0.35rem;
}
.card .sum { margin: 0 0 0.6rem; }
.card .tags {
  font: 400 13px/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
  margin: 0;
}

/* The snapshot. The longer description sits on top of it and shows on hover or focus. */
.shot {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--rule);
  color: inherit;
  text-decoration: none;
}
.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.shot--pair { display: grid; grid-template-columns: 1fr 1fr; }
.shot--pair img + img { border-left: 1px solid var(--rule); }
.shot--type { display: grid; place-items: center; }
.shot .logo { display: contents; }
.shot .logo img {
  width: min(250px, 60%);
  height: auto;
  aspect-ratio: auto;
  margin: 1.5rem 0;
  grid-row: 1;
}

.report {
  font: 400 15px/1.2 var(--mono);
  color: var(--stone);
  border-collapse: collapse;
  min-width: 60%;
}
.report td { padding: 0.45rem 0; border-bottom: 1px solid var(--rule); }
.report td + td { text-align: right; color: var(--ink); padding-left: 2rem; }
@media (hover: none) {
  .report { margin: 1.5rem 0; font-size: 13px; }
}

.more {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--paper);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.more p { margin: 0; max-width: 34rem; }
.go {
  font: 500 13px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
}
.shot:hover .more,
.shot:focus-visible .more,
.shot:focus-within .more { opacity: 1; }

/* No hover on touch screens, so the description sits under the snapshot instead. */
@media (hover: none) {
  .shot { aspect-ratio: auto; overflow: visible; }
  .shot img { aspect-ratio: 16 / 10; height: auto; }
  .shot--type { min-height: 10rem; }
  .shot--type .more { grid-row: 2; }
  .more {
    position: static;
    opacity: 1;
    background: var(--surface);
    border-top: 1px solid var(--rule);
    padding: 1.1rem;
  }
  .shot--pair .more { grid-column: 1 / -1; }
}

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

.quote {
  margin: clamp(4rem, 10vw, 7rem) 0 0;
  padding: clamp(2rem, 6vw, 4rem) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.quote blockquote { margin: 0; }
.quote p {
  font: 400 clamp(28px, 4.5vw, 44px)/1.15 var(--display);
  font-variation-settings: "opsz" 96, "SOFT" 20, "WONK" 1;
  letter-spacing: -0.015em;
  max-width: 44rem;
  margin: 0 0 1.25rem;
}
.quote figcaption {
  font: 500 13px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  font-size: 15px;
  color: var(--stone);
}

.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 2.5rem clamp(2rem, 6vw, 5rem);
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--rule);
}
.contact-intro p { max-width: 26rem; color: var(--stone); margin: 0 0 1rem; }
.contact-intro .contact-title {
  font: 400 clamp(28px, 4vw, 40px)/1.15 var(--display);
  font-variation-settings: "opsz" 96, "SOFT" 20, "WONK" 1;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 1rem 0 1rem;
}
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.25rem; align-content: start; }
.contact-form .wide { grid-column: 1 / -1; }
.contact-form label { display: grid; gap: .45rem; font: 500 13px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--stone); }
.contact-form .optional { text-transform: none; letter-spacing: 0; font: 400 13px var(--body); display: inline; }
.contact-form input, .contact-form textarea {
  font: 400 17px/1.45 var(--body); color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule); border-radius: 2px;
  padding: .7rem .85rem; width: 100%; box-sizing: border-box;
}
.contact-form textarea { resize: vertical; min-height: 8rem; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; border-color: transparent; }
.contact-form ::placeholder { color: var(--stone); opacity: .7; }
.send { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; }
.send button {
  font: 500 15px/1 var(--body); color: var(--paper); background: var(--ink);
  border: 0; border-radius: 2px; padding: .95rem 1.6rem; cursor: pointer;
}
.send button:hover { background: var(--signal); }
.send button:disabled { opacity: .6; cursor: default; }
.status { margin: 0; color: var(--stone); font-size: 15px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 34rem) { .contact-form { grid-template-columns: 1fr; } }

/* The envelope: fixed bottom right, hidden over the bio and the form itself. */
.mail {
  position: fixed; right: max(1.25rem, env(safe-area-inset-right, 0px)); bottom: max(1.25rem, env(safe-area-inset-bottom, 0px)); z-index: 10;
  display: flex; align-items: center; gap: 0; height: 52px; padding: 0 15px;
  color: var(--paper); background: var(--ink); border-radius: 26px; text-decoration: none;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45);
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .3s, transform .3s, background .2s, gap .25s;
}
.mail.on { opacity: 1; transform: none; pointer-events: auto; animation: bob 3.2s ease-in-out .4s infinite; }
.mail span { font: 500 15px/1 var(--body); max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .3s; }
.mail:hover, .mail:focus-visible { background: var(--signal); gap: .6rem; animation-play-state: paused; }
.mail:hover span, .mail:focus-visible span { max-width: 7rem; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px) rotate(-3deg); } }
@media (prefers-reduced-motion: reduce) { .mail.on { animation: none; } .mail { transition: opacity .2s; } }

/* In each hover: the problem in italics, softer; the payoff in bold, full ink. */
.more em { font-style: italic; opacity: .78; }
.more strong { font-weight: 600; color: var(--ink); }

/* Phones: the description can't sit on the snapshot, so the card reads top to
   bottom as title, summary, tags, then the snapshot with its description. */
@media (hover: none) {
  .card { display: flex; flex-direction: column; }
  .card h3 { order: -3; margin-top: 0; }
  .card .sum { order: -2; }
  .card .tags { order: -1; margin-bottom: 1rem; }
}

/* Testimonials: italic and in curly quotes, so a client's words never read like my own copy. */
.quote p { font-style: italic; }
.quote p::before { content: "\201C"; }
.quote p::after { content: "\201D"; }
.quote p::before, .quote p::after { color: var(--signal); }

/* Every live project gets a visible way in, not only the hover. */
.card .try {
  display: inline-block;
  margin-top: 0.85rem;
  font: 500 13px/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
  text-decoration: none;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 3px;
}
.card .try::after { content: " \2192"; }
.card .try:hover { color: var(--ink); }
@media (hover: none) { .card .try { order: -1; margin: -0.4rem 0 1rem; align-self: flex-start; } }
