html { color-scheme: only light; }
* { box-sizing: border-box; }

body {
  font-family: "Lato", Verdana, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #111;
  background: #fff;
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: #cfcfcf;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
a:hover { text-decoration-color: currentColor; }
a.blue { color: #1a5fd0; text-decoration: none; }
a.blue:hover { text-decoration: underline; }
a.blue.underline { text-decoration: underline; text-decoration-color: currentColor; }
p { margin: 0 0 12px; }

header.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 44px;
}
header.site .name { font-size: 20px; text-decoration: none; }
header.site nav { display: flex; gap: 20px; }
header.site nav a { text-decoration: none; }
header.site nav a:hover { text-decoration: underline; }
header.site nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: currentColor; }

h1 { font-size: 22px; font-weight: 400; margin: 0 0 6px; }
h2 { font-size: 18px; font-weight: 400; margin: 44px 0 12px; }

.sub { color: #666662; margin: 0 0 10px; }
.credits { font-size: 14px; margin: 0 0 4px; }

.feature { margin-top: 18px; }
.feature a { text-decoration: none; }
.feature a:hover { text-decoration: underline; }

.entry { margin: 0 0 16px; }
.entry .title { display: block; }
.entry .desc { display: block; color: #555; font-size: 15px; line-height: 1.5; }

.year { font-size: 14px; color: #555; margin: 28px 0 12px; }
.year:first-of-type { margin-top: 0; }
.more-link { margin-top: 20px; }

figure { margin: 4px 0 20px; }
figure img { display: block; width: 100%; height: auto; }
figcaption { margin-top: 8px; text-align: center; }

.intro { display: flex; gap: 36px; align-items: flex-start; }
.intro-text { flex: 1; min-width: 0; }
.headshot { width: 170px; height: auto; flex-shrink: 0; }
.links { display: flex; gap: 14px; margin: 2px 0 0; font-size: 13px; }
.links a { color: #777; text-decoration: none; }
.links a:hover { color: #000; }

.home-h { margin: 56px 0 0; font-size: 16px; color: #111; }
.home-work .card .title { font-size: 15px; }
.home-work + .home-work { margin-top: 260px; padding-left: 0; }
.home-work .more-arrow { align-self: flex-start; font-size: 14px; text-decoration: none; margin-top: 4px; }
.home-work .more-arrow:hover { text-decoration: underline; }
.home-work { margin-top: 14px; padding-left: 28px; display: flex; flex-direction: column; gap: 14px; }
.card.box { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; align-items: center; }
.card.box .text { grid-column: 2; }
.card.box:not(:has(.thumb)) { display: block; }
.card.box .thumb { width: 120px; aspect-ratio: 4 / 3; object-fit: cover; margin: 0; }
.card.box .thumb.burn { margin: 0; }
.chart { margin: 28px 0; }
.bars { display: grid; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 210px minmax(0, 1fr) 36px; align-items: center; gap: 12px; font-size: 14px; }
.bar-track { height: 12px; }
.bar { display: block; height: 100%; background: #9a9a9a; }
.bar-n { text-align: right; font-variant-numeric: tabular-nums; }
.chart figcaption.center { text-align: center; color: inherit; font-size: 16px; }
.chart figcaption { text-align: left; font-size: 14px; color: #555; margin-top: 12px; }

@media (max-width: 600px) {
  .bar-row { grid-template-columns: 130px minmax(0, 1fr) 30px; font-size: 13px; }
}

.section-label {
  text-align: right;
  font-size: 15px;
  color: #555;
  border-bottom: 1px solid #e6e6e6;
  padding-bottom: 6px;
  margin: 40px 0 20px;
}
.section-label:first-of-type { margin-top: 0; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
.card { display: block; text-decoration: none; color: inherit; }
.card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 10px; }
.grid .card {
  background: #fff;
  padding: 14px 14px 16px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}
.marquee { aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 10px; }
.marquee .track { display: flex; height: 100%; width: max-content; animation: marquee 12s linear infinite; }
.card .marquee .track img { height: 100%; width: auto; aspect-ratio: auto; margin: 0; object-fit: initial; }
@keyframes marquee { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .marquee .track { animation: none; } }

/* Before and after imagery on the wildfire card. The post-fire image sweeps in over the pre-fire image. Pure CSS, loops every 5s. */
.burn { position: relative; aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 10px; }
.card .burn img { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; aspect-ratio: auto; object-fit: cover; }
.burn .post {
  -webkit-mask-image: linear-gradient(to right, #000 45%, transparent 55%); mask-image: linear-gradient(to right, #000 45%, transparent 55%);
  -webkit-mask-size: 250% 100%; mask-size: 250% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: burn 5s ease-in-out infinite;
}
@keyframes burn {
  0%, 10% { -webkit-mask-position: 100% 0; mask-position: 100% 0; opacity: 1; }
  40%, 82% { -webkit-mask-position: 0 0; mask-position: 0 0; opacity: 1; }
  94% { -webkit-mask-position: 0 0; mask-position: 0 0; opacity: 0; }
  95% { -webkit-mask-position: 100% 0; mask-position: 100% 0; opacity: 0; }
  100% { -webkit-mask-position: 100% 0; mask-position: 100% 0; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .burn .post { animation: none; -webkit-mask-image: none; mask-image: none; } }

/* Animated chat on the assistant card. Pure CSS, loops every 10s. */
.chat {
  aspect-ratio: 4 / 3; min-height: 0; overflow: hidden; margin-bottom: 10px; padding: 8px 6px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 0;
  font-size: 10px; line-height: 1.25;
}
.chat .msg {
  position: relative; max-width: 90%; padding: 0 7px; margin-top: 0; border-radius: 10px;
  box-sizing: border-box; max-height: 0; overflow: hidden; flex-shrink: 0;
  opacity: 0; animation-duration: 10s; animation-iteration-count: infinite; animation-timing-function: ease-out;
}
.chat .me { align-self: flex-end; background: #0b84fe; color: #fff; border-bottom-right-radius: 3px; }
.chat .ai { align-self: flex-start; background: #e9e9eb; color: #000; border-bottom-left-radius: 3px; }
.chat .txt { opacity: 0; animation: inherit; }
.chat .dots {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 3px;
  opacity: 0; animation-duration: 10s; animation-iteration-count: infinite;
}
.chat .dots i { width: 5px; height: 5px; border-radius: 50%; background: #8e8e93; animation: blink 1s infinite; }
.chat .dots i:nth-child(2) { animation-delay: .2s; }
.chat .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .35; } 40% { opacity: 1; } }

.chat .m1 { animation-name: m1; }
.chat .a1 { animation-name: a1; }
.chat .a1 .dots { animation-name: a1d; }
.chat .a1 .txt { animation-name: a1t; }
.chat .m2 { animation-name: m2; }
.chat .a2 { animation-name: a2; }
.chat .a2 .dots { animation-name: a2d; }
.chat .a2 .txt { animation-name: a2t; }

@keyframes m1 { 0% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: 0; transform: translateY(6px) scale(.96); } 4%, 90% { opacity: 1; max-height: 80px; padding-top: 4px; padding-bottom: 4px; margin-top: 4px; transform: none; } 95%, 100% { opacity: 0; max-height: 80px; padding-top: 4px; padding-bottom: 4px; margin-top: 4px; } }
@keyframes a1 { 0%, 9% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: 0; transform: translateY(6px) scale(.96); } 13%, 90% { opacity: 1; max-height: 80px; padding-top: 4px; padding-bottom: 4px; margin-top: 4px; transform: none; } 95%, 100% { opacity: 0; max-height: 80px; padding-top: 4px; padding-bottom: 4px; margin-top: 4px; } }
@keyframes a1d { 0%, 9% { opacity: 0; } 11%, 26% { opacity: 1; } 27%, 100% { opacity: 0; } }
@keyframes a1t { 0%, 26% { opacity: 0; } 30%, 100% { opacity: 1; } }
@keyframes m2 { 0%, 36% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: 0; transform: translateY(6px) scale(.96); } 40%, 90% { opacity: 1; max-height: 80px; padding-top: 4px; padding-bottom: 4px; margin-top: 4px; transform: none; } 95%, 100% { opacity: 0; max-height: 80px; padding-top: 4px; padding-bottom: 4px; margin-top: 4px; } }
@keyframes a2 { 0%, 44% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: 0; transform: translateY(6px) scale(.96); } 48%, 90% { opacity: 1; max-height: 80px; padding-top: 4px; padding-bottom: 4px; margin-top: 4px; transform: none; } 95%, 100% { opacity: 0; max-height: 80px; padding-top: 4px; padding-bottom: 4px; margin-top: 4px; } }
@keyframes a2d { 0%, 44% { opacity: 0; } 46%, 58% { opacity: 1; } 59%, 100% { opacity: 0; } }
@keyframes a2t { 0%, 58% { opacity: 0; } 62%, 100% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .chat .msg, .chat .txt { animation: none; opacity: 1; transform: none; max-height: none; }
  .chat .msg { padding: 4px 7px; margin-top: 4px; }
  .chat .dots { display: none; }
}

.card .course { display: block; font-size: 13px; color: #555; margin-bottom: 2px; }
.card .title { display: block; }
.card .desc { display: block; color: #555; font-size: 14px; line-height: 1.45; margin-top: 4px; }
.card:hover .title { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 600px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  body { padding: 32px 20px 64px; }
  .intro { flex-direction: column-reverse; gap: 20px; }
  .headshot { width: 140px; }
}

/* More page. */
.more .washi-photo { display: block; width: 300px; max-width: 100%; height: auto; margin: 8px 0 18px; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.32); }
.more .photo-row { display: flex; gap: 16px; margin: 8px 0 18px; }
.more .photo-row img { display: block; height: 300px; width: auto; min-width: 0; object-fit: cover; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.32); }
@media (max-width: 600px) { .more .photo-row img { height: auto; width: calc(50% - 8px); aspect-ratio: 3 / 4; } }
.more .fav-label { margin-top: 88px; font-size: 16px; }
.fav { display: flex; gap: 20px; align-items: flex-start; }
.fav .cover { width: 120px; height: auto; flex-shrink: 0; display: block; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.32); }
.more .more-h, .more .more-gap { margin-top: 72px; }
.videos { margin: 8px 0 32px; }
.grid.videos .card img { aspect-ratio: 16 / 9; }

/* Essays. Serif, book-style paragraphs with first-line indents and no gaps. */
.essay { font-family: "Times New Roman", Times, serif; font-size: 15px; line-height: 2.6; }
.essay h1 { font-family: "Times New Roman", Times, serif; font-size: 17px; font-style: italic; margin: 0 0 24px; }
.essay p { margin: 0; text-indent: 2em; }
.essay h1 + p { text-indent: 0; }
