:root {
  color-scheme: light;
  --background: #f7f5f0;
  --holder: #ebe3d6;
  --line: #d8cdbf;
  --muted: #7a6a5f;
  --plum: #7b3f68;
  --plum-hover: #5f2f50;
  --text: #24150f;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: inherit;
}

.site-header {
  padding: 24px 24px 18px;
}

h1,
.site-header a {
  margin: 0;
  color: var(--plum);
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  text-decoration: none;
}

.archive-layout {
  display: grid;
  gap: 32px;
  grid-template-columns: 132px minmax(0, 920px);
  align-items: start;
  padding: 0 24px 40px;
}

.site-menu {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.site-menu a {
  color: #000000;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 400;
  text-decoration: none;
}

.site-menu a:hover,
.site-menu a:focus-visible,
.site-menu a[aria-current="page"] {
  color: var(--plum);
}

.landing-stage {
  align-items: start;
  display: flex;
  justify-content: center;
  width: 100%;
}

.landing-slideshow {
  aspect-ratio: 4 / 3;
  display: grid;
  max-width: 680px;
  width: 100%;
}

.landing-slide {
  grid-area: 1 / 1;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  position: relative;
  transition: opacity 1.8s ease;
  width: 100%;
}

.landing-slide.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.landing-image {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.photo-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
}

.photo-card {
  margin: 0;
}

.photo-media {
  aspect-ratio: 4 / 3;
  display: grid;
  position: relative;
}

.photo-holder {
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: contain;
  width: 100%;
}

.photo-media .photo-holder {
  grid-area: 1 / 1;
  height: 100%;
}

.book-back {
  opacity: 0;
}

.photo-card:hover .book-back,
.photo-card:focus-within .book-back {
  animation: reveal-back-cover 3.6s ease both;
}

@keyframes reveal-back-cover {
  0%,
  100% {
    opacity: 0;
  }

  35%,
  62% {
    opacity: 1;
  }
}

figcaption {
  min-height: 1.2rem;
  padding-top: 6px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 300;
  text-align: center;
}

.portfolio-page {
  color: #17171a;
}

.portfolio-content {
  font-size: 0.84rem;
  line-height: 1.6;
  max-width: 720px;
  padding-bottom: 48px;
  width: 100%;
}

.portfolio-content a {
  color: var(--plum);
  font-weight: 600;
  text-decoration: none;
}

.portfolio-content a:hover,
.portfolio-content a:focus-visible {
  color: var(--plum-hover);
}

.portfolio-intro {
  padding-bottom: 42px;
}

.portfolio-name {
  color: #17171a;
  display: block;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0 0 10px;
}

.portfolio-role {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 18px;
}

.portfolio-summary {
  font-size: 0.92rem;
  margin: 0;
  max-width: 650px;
}

.portfolio-capabilities {
  font-size: 0.82rem;
  margin: 16px 0 0;
  max-width: 680px;
}

.portfolio-contact {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0 7px;
  margin: 18px 0 0;
}

.portfolio-pending {
  color: var(--muted);
}

.portfolio-section {
  border-top: 1px solid var(--line);
  padding: 34px 0 48px;
}

.portfolio-section > h2 {
  font-size: 0.86rem;
  font-weight: 700;
  margin: 0 0 20px;
}

.work-row,
.writing-row {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.work-row:last-child,
.writing-row:last-child {
  border-bottom: 1px solid var(--line);
}

.work-row h3,
.writing-row h3,
.case-study-block h3 {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
}

.work-row h3 span,
.writing-row h3 span {
  font-weight: 400;
}

.work-row p,
.writing-row p,
.case-study-block p {
  margin: 5px 0 0;
}

.work-row .work-role {
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 2px;
}

.work-links {
  font-size: 0.76rem;
}

.section-more {
  font-size: 0.76rem;
  margin: 16px 0 0;
}

.section-intro {
  margin: -4px 0 22px;
  max-width: 680px;
}

.section-intro p {
  margin: 6px 0 0;
}

.section-intro .work-role {
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 0;
}

.back-to-top {
  align-items: center;
  background: rgb(247 245 240 / 94%);
  border: 1px solid var(--line);
  border-radius: 4px;
  bottom: max(16px, env(safe-area-inset-bottom));
  color: var(--text);
  cursor: pointer;
  display: grid;
  font: inherit;
  font-size: 0.9rem;
  height: 34px;
  justify-items: center;
  padding: 0;
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  width: 34px;
  z-index: 10;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  border-color: var(--plum);
  color: var(--plum);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 2px;
}

.back-to-top[hidden] {
  display: none;
}

.case-study-block {
  margin-top: 28px;
}

.case-study-block:first-of-type {
  margin-top: 0;
}

.case-study-block ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.case-study-block li + li {
  margin-top: 5px;
}

.performance-list,
.youtube-metrics {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 12px 0 0;
}

.performance-list div,
.youtube-metrics div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.performance-list dt,
.youtube-metrics dt {
  color: var(--plum);
  font-size: 1.2rem;
  font-weight: 700;
}

.performance-list dd,
.youtube-metrics dd {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
  margin: 3px 0 0;
}

.youtube-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-note,
.methodology-note {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.video-example {
  margin-top: 18px;
}

.video-example iframe {
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
  width: 100%;
}

.video-example p {
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 7px;
}

.video-example p strong {
  color: #17171a;
}

.short-form-work {
  margin-top: 34px;
}

.sample-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 14px 0;
}

.sample-row:last-child {
  border-bottom: 1px solid var(--line);
}

.sample-row h4 {
  font-size: 0.78rem;
  margin: 0;
}

.sample-row p {
  color: var(--muted);
  font-size: 0.68rem;
  margin: 2px 0 0;
}

.sample-row .sample-result {
  color: var(--plum);
  font-size: 0.76rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
}

.methodology-note {
  border-top: 1px solid var(--line);
  margin: 32px 0 0;
  padding-top: 12px;
}

.journal-entry {
  width: 100%;
}

.carousel {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 26px minmax(0, 480px) 26px;
  max-width: 556px;
  width: 100%;
}

.carousel-slide {
  margin: 0;
  min-width: 0;
}

.carousel-image {
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: contain;
  width: 100%;
}

.carousel-button {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  color: #000000;
  cursor: pointer;
  display: grid;
  font: inherit;
  font-size: 0.86rem;
  height: 26px;
  justify-items: center;
  padding: 0;
  width: 26px;
}

.carousel-button:hover,
.carousel-button:focus-visible {
  color: var(--plum);
}

.carousel-button[hidden],
.carousel[hidden] {
  display: none;
}

@media (max-width: 700px) {
  .archive-layout {
    gap: 28px;
    grid-template-columns: 1fr;
  }

  .landing-stage {
    justify-content: start;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-content {
    max-width: 100%;
  }

  .portfolio-name {
    font-size: 1.7rem;
  }

  .performance-list,
  .youtube-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sample-row {
    align-items: start;
    gap: 5px;
    grid-template-columns: 1fr auto;
  }

  .sample-row > div {
    grid-column: 1 / -1;
  }

  .carousel {
    gap: 8px;
    grid-template-columns: 22px minmax(0, 1fr) 22px;
    max-width: 100%;
  }

  .carousel-button {
    font-size: 0.78rem;
    height: 22px;
    width: 22px;
  }
}

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