/* =========================================================
   Jenna Costigan — Personal Site
   Stylesheet: design tokens, base, components, sections,
   case-study layout, responsive rules.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --color-bg: #faf6f0;
  --color-surface: #f1e9dc;
  --color-surface-strong: #e8dcc8;
  --color-accent: #c26a4a;
  --color-accent-strong: #a8553a;
  --color-text: #3b2a1e;
  --color-text-muted: #7a6957;
  --color-rule: rgba(59, 42, 30, 0.12);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Type scale — every font size on the site comes from these steps */
  --text-xs: 0.75rem;                          /* eyebrows, tags, meta labels */
  --text-sm: 0.9rem;                           /* captions, small links, fine print */
  --text-base: 1rem;                           /* body copy */
  --text-md: clamp(1.05rem, 1.4vw, 1.2rem);    /* ledes, intro paragraphs, roles */
  --text-lg: clamp(1.2rem, 1.8vw, 1.4rem);     /* h3, card titles */
  --text-xl: clamp(1.5rem, 3vw, 2rem);         /* h2, section headings */
  --text-2xl: clamp(1.8rem, 4vw, 2.6rem);      /* h1, page titles */

  --max-width: 1100px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(56px, 9vw, 96px);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-soft: 0 1px 2px rgba(59, 42, 30, 0.04), 0 8px 24px rgba(59, 42, 30, 0.06);

  --transition: 200ms ease;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  /* Render the whole site at 90% scale — the design reads better slightly smaller */
  zoom: 0.9;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

a:hover,
a:focus-visible {
  color: var(--color-accent-strong);
  border-bottom-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

p {
  margin: 0 0 1em 0;
}

ul,
ol {
  padding-left: 1.1em;
  margin: 0 0 1em 0;
}

li {
  margin-bottom: 0.35em;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--color-text);
  line-height: 1.12;
  margin: 0 0 0.4em 0;
}

h1 {
  font-size: var(--text-2xl);
  font-weight: 400;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-xl);
}

h3 {
  font-size: var(--text-lg);
}

h4 {
  font-size: var(--text-base);
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 1.25em 0;
  display: inline-block;
}

.lede {
  font-family: var(--font-display);
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-text-muted);
  font-weight: 400;
  max-width: none;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

section {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--color-rule);
}

section:first-of-type {
  border-top: none;
}

#work,
#experience,
#contact {
  scroll-margin-top: 88px;
}

html.is-section-entry {
  visibility: hidden;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.section-head p {
  max-width: none;
  color: var(--color-text-muted);
  margin: 0;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 240, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--color-rule);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.nav__brand {
  font-family: var(--font-display);
  font-size: var(--text-md);
  color: var(--color-text);
  border-bottom: none;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav__brand:hover {
  color: var(--color-accent-strong);
  border-bottom: none;
}

.nav__list {
  display: flex;
  gap: 32px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav__list a {
  color: var(--color-text);
  font-size: var(--text-sm);
  border-bottom: 1px solid transparent;
}

.nav__list a:hover,
.nav__list a:focus-visible {
  color: var(--color-accent-strong);
  border-bottom-color: var(--color-accent);
}

/* CSS-only mobile menu (checkbox hack) */
.nav__toggle,
.nav__toggle-label {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(48px, 8vw, 88px);
  padding-bottom: var(--section-y);
  border-top: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.hero__title {
  margin-bottom: 24px;
}

.hero__title em {
  font-style: italic;
  color: var(--color-accent);
  font-weight: 400;
}

.hero__sub {
  font-family: var(--font-display);
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  max-width: 62ch;
}

/* Arch-shaped "gallery mat" frame around the portrait */
.hero__media {
  --arch-radius: 999px 999px var(--radius-lg) var(--radius-lg);
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 340px;
  justify-self: center;
  padding: 14px;
  border-radius: var(--arch-radius);
  border: 1px solid var(--color-rule);
  background:
    radial-gradient(120% 80% at 30% 20%, rgba(194, 106, 74, 0.18), transparent 60%),
    linear-gradient(160deg, var(--color-surface-strong), var(--color-surface));
  position: relative;
  box-shadow: var(--shadow-soft);
}

/* Offset terracotta keyline echoing the arch, behind the frame */
.hero__media::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(194, 106, 74, 0.45);
  border-radius: var(--arch-radius);
  transform: translate(14px, 14px);
  z-index: -1;
  pointer-events: none;
}

.hero__media:empty::after {
  content: "Photo";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  opacity: 0.6;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: calc(999px - 14px) calc(999px - 14px) calc(var(--radius-lg) - 6px) calc(var(--radius-lg) - 6px);
  border: 1px solid rgba(194, 106, 74, 0.25);
}

/* ---------- Experience credits ---------- */
.experience-credits {
  list-style: none;
  padding: 0;
  margin: 0;
}

.experience-credits li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: baseline;
  padding: 24px 0;
  border-top: 1px solid var(--color-rule);
  margin: 0;
}

.experience-credits li:last-child {
  border-bottom: 1px solid var(--color-rule);
}

.experience-credits__role {
  font-family: var(--font-display);
  font-size: var(--text-md);
  color: var(--color-text);
  font-weight: 500;
  line-height: 1.4;
}

.experience-credits__company {
  color: var(--color-accent);
  font-family: var(--font-body);
  font-weight: 400;
  margin-left: 4px;
}

.experience-credits__company::before {
  content: " — ";
  color: var(--color-text-muted);
  margin-right: 2px;
}

.experience-credits__year {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.experience-aside {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-top: 24px;
}

.experience-aside a {
  color: var(--color-text);
  border-bottom: 1px solid var(--color-rule);
}

.experience-aside a:hover {
  color: var(--color-accent-strong);
  border-bottom-color: var(--color-accent);
}

/* ---------- Work / portfolio ---------- */
.work__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.work-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  transition: transform var(--transition);
  text-decoration: none;
  color: inherit;
  border-bottom: none;
}

.work-card:hover {
  transform: translateY(-3px);
  border-bottom: none;
}

.work-card:hover .work-card__title {
  color: var(--color-accent-strong);
}

.work-card__cover {
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow-soft);
}

.work-card__cover--terracotta {
  background:
    radial-gradient(100% 80% at 70% 30%, rgba(255, 240, 220, 0.4), transparent 60%),
    linear-gradient(140deg, #d68063, #a8553a);
}

.work-card__cover--sage {
  background:
    radial-gradient(100% 80% at 30% 30%, rgba(255, 250, 230, 0.4), transparent 60%),
    linear-gradient(140deg, #a8b69a, #6f8a6b);
}

.work-card__cover--clay {
  background:
    radial-gradient(100% 80% at 50% 30%, rgba(255, 245, 225, 0.5), transparent 60%),
    linear-gradient(140deg, #d9b08c, #a37a52);
}

.work-card__cover--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-card__cover--tcu {
  background-color: #ead8b9;
  background-image: url("../assets/tcu-portfolio-cover.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.work-card__tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(250, 246, 240, 0.9);
  color: var(--color-text);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
}

.work-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  margin: 0 0 6px 0;
  transition: color var(--transition);
}

.work-card__outcome {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin: 0;
}

/* ---------- Contact ---------- */
.contact {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 64px) clamp(28px, 6vw, 56px);
  text-align: center;
}

.contact__title {
  font-size: var(--text-2xl);
  margin-bottom: 28px;
}

.contact__title em {
  font-style: italic;
  color: var(--color-accent);
}

.contact__lede {
  max-width: 60ch;
  margin: 0 auto 28px auto;
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-size: var(--text-md);
  line-height: 1.5;
}

.contact__socials {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: var(--text-sm);
}

.contact__socials a {
  color: var(--color-text);
  border-bottom: 1px solid var(--color-rule);
  padding-bottom: 2px;
}

.contact__socials a:hover {
  color: var(--color-accent-strong);
  border-bottom-color: var(--color-accent);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-rule);
  padding: 32px 0 40px 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.site-footer__inner {
  text-align: center;
}

.site-footer__inner p {
  margin: 0;
}

/* =========================================================
   Case study page layout
   ========================================================= */

.case-study .hero {
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(24px, 4vw, 40px);
}

.case-study .hero h1 {
  margin-bottom: 14px;
}

.case-study .hero .lede {
  margin-bottom: 0;
  max-width: 72ch;
}

.case-study__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: 20px;
  border-bottom: 1px solid transparent;
}

.case-study__back:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-rule);
}

.meta-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.meta-value {
  margin: 0;
  font-size: var(--text-base);
  color: var(--color-text);
}

.case-study__body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  padding: var(--section-y) 0;
  border-top: 1px solid var(--color-rule);
}

.case-study__body.case-study__body--single {
  grid-template-columns: 1fr;
  border-top: 1px solid var(--color-rule);
  padding: clamp(28px, 4vw, 44px) 0 0;
}

.case-study__body.case-study__body--single section {
  padding-bottom: 0;
}

.case-study__body.case-study__body--single h2 {
  margin-bottom: 10px;
}

.case-study__body.case-study__body--single section > p:first-of-type {
  margin-bottom: 28px;
  color: var(--color-text-muted);
}

.case-study__body.case-study__body--single .case-study__visual {
  margin: 0 0 20px 0;
}

.case-study__gallery {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 44px);
  padding-bottom: clamp(28px, 4vw, 44px);
}

.case-study__gallery-row {
  display: grid;
  gap: clamp(28px, 4vw, 44px);
  align-items: start;
}

.case-study__gallery-row:has(.case-study__project-links) {
  align-items: stretch;
}

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

.case-study__gallery-row--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.case-study__gallery-item {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.case-study__gallery-item:has(.case-study__project-links) {
  height: 100%;
}

.case-study__gallery-item .case-study__visual {
  margin: 0;
}

.case-study__gallery-item:has(.case-study__project-links) .case-study__visual {
  flex-shrink: 0;
}

.case-study__gallery-item .case-study__caption,
.case-study__body.case-study__body--single .case-study__gallery-item .case-study__caption {
  margin: 0;
}

.case-study__gallery-item:has(.case-study__project-links) .case-study__caption {
  flex: 1 1 auto;
}

.case-study__gallery-item:has(.case-study__project-links) .case-study__project-links {
  margin-top: auto;
  margin-bottom: 0;
}

.case-study__project-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 12px 0 0;
  font-size: var(--text-sm);
}

.case-study__project-links a {
  color: var(--color-text);
  border-bottom: 1px solid var(--color-rule);
  padding-bottom: 2px;
}

.case-study__project-links a:hover {
  color: var(--color-accent-strong);
  border-bottom-color: var(--color-accent);
}

.case-study__project-links span {
  color: var(--color-text-muted);
}

.case-study__carousel {
  position: relative;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  background: var(--color-surface-strong);
}

.case-study__carousel-viewport {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.case-study__carousel-track {
  display: flex;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-study__carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  display: none;
}

.case-study__carousel-slide.is-active {
  display: block;
}

.case-study__carousel-open {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  display: block;
}

.case-study__carousel-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.case-study__carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(250, 246, 240, 0.92);
  color: var(--color-text);
  font-size: var(--text-sm);
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: background var(--transition), color var(--transition);
}

.case-study__carousel-btn:hover {
  background: var(--color-bg);
  color: var(--color-accent-strong);
}

.case-study__carousel-btn[data-carousel-btn="prev"] {
  left: 12px;
}

.case-study__carousel-btn[data-carousel-btn="next"] {
  right: 12px;
}

.case-study__carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 8px;
}

.case-study__carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(250, 246, 240, 0.45);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.case-study__carousel-dot.is-active {
  background: var(--color-bg);
  transform: scale(1.15);
}

.case-study__lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(59, 42, 30, 0.9);
}

.case-study__lightbox[hidden] {
  display: none;
}

.case-study__lightbox-scroll {
  height: 100%;
  overflow: auto;
  padding: 72px 56px 32px;
  -webkit-overflow-scrolling: touch;
}

.case-study__lightbox-image {
  display: block;
  width: auto;
  max-width: min(920px, 100%);
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.case-study__lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(250, 246, 240, 0.92);
  color: var(--color-text);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.case-study__lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(250, 246, 240, 0.92);
  color: var(--color-text);
  font-size: var(--text-sm);
  cursor: pointer;
}

.case-study__lightbox-nav--prev {
  left: 20px;
}

.case-study__lightbox-nav--next {
  right: 20px;
}

.case-study__reels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 44px);
  align-items: start;
}

.case-study__reel-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  color: inherit;
  border-bottom: none;
  transition: transform var(--transition);
}

.case-study__reel-card:hover {
  color: inherit;
  transform: translateY(-2px);
}

.case-study__reel-preview {
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
}

.case-study__reel-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.case-study__reel-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(59, 42, 30, 0.12);
  z-index: 1;
  transition: background var(--transition);
}

.case-study__reel-card:hover .case-study__reel-preview::before {
  background: rgba(59, 42, 30, 0.24);
}

.case-study__body.case-study__body--single .case-study__reel-card .case-study__caption {
  margin: 0 0 36px 0;
}

.case-study__body.case-study__body--single .case-study__caption {
  margin: 0 0 36px 0;
}

.case-study__body.case-study__body--single ~ .case-study__nav {
  padding: 28px 0 32px;
}

.case-study .container > .case-study__nav:first-child:last-child {
  padding: 28px 0 32px;
}

.case-study__body section {
  padding: 0 0 56px 0;
  border-top: none;
}

.case-study__body section:last-child {
  padding-bottom: 0;
}

.case-study__body h2 {
  font-size: var(--text-xl);
  margin-bottom: 16px;
}

.case-study__sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

.case-study__sidebar ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.case-study__sidebar a {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  border-bottom: none;
  letter-spacing: 0.04em;
}

.case-study__sidebar a:hover {
  color: var(--color-accent-strong);
}

.case-study__visual {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  margin: 24px 0 8px 0;
  position: relative;
  box-shadow: var(--shadow-soft);
}

.case-study__visual::after {
  content: "Photo";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250, 246, 240, 0.8);
}

.case-study__visual--a {
  background: linear-gradient(135deg, #d68063, #a8553a);
}

.case-study__visual--b {
  background: linear-gradient(135deg, #a8b69a, #6f8a6b);
}

.case-study__visual--c {
  background: linear-gradient(135deg, #d9b08c, #a37a52);
}

.case-study__visual--d {
  background: linear-gradient(135deg, #c89e7a, #8a6244);
}

.case-study__visual--photo {
  overflow: hidden;
  background: var(--color-surface);
}

.case-study__visual--photo::after {
  content: none;
}

.case-study__visual--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.case-study__visual--contain img {
  object-fit: contain;
}

.case-study__visual--liquid-death {
  background-color: #f2eee7;
}

.case-study__caption {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin: 0 0 32px 0;
}

.case-study__results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 12px 0 0 0;
}

.case-study__result {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 24px;
}

.case-study__result strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-accent);
  margin-bottom: 4px;
  font-weight: 500;
}

.case-study__result span {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.case-study__nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 48px 0;
  border-top: 1px solid var(--color-rule);
  flex-wrap: wrap;
}

.case-study__nav a {
  color: var(--color-text);
  border-bottom: none;
}

.case-study__nav a span {
  display: block;
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.case-study__nav a strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-md);
}

.case-study__nav a:hover strong {
  color: var(--color-accent-strong);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__media {
    order: -1;
    max-width: 300px;
    justify-self: start;
  }

  .work__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .experience-credits li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .case-study__body {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .case-study__sidebar {
    position: static;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-rule);
    margin-bottom: 24px;
  }

  .case-study__sidebar ol {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
  }

  .case-study__results {
    grid-template-columns: 1fr;
  }

  .case-study__reels {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }

  .case-study__reel-card {
    flex: 0 0 min(280px, 72vw);
    scroll-snap-align: center;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding-top: 20px;
    padding-bottom: 36px;
  }

  .hero__grid {
    grid-template-columns: auto 1fr;
    column-gap: 28px;
    row-gap: 6px;
    align-items: start;
  }

  .hero__grid > div:first-child {
    display: contents;
  }

  .hero__media {
    grid-column: 1;
    grid-row: 2;
    order: unset;
    max-width: 180px;
    padding: 8px;
    margin-top: 12px;
  }

  .hero__grid .eyebrow {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-bottom: 0;
    letter-spacing: 0.1em;
    font-size: clamp(0.625rem, 2.6vw, 0.75rem);
    line-height: 1.2;
  }

  .hero__title {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    padding-left: 6px;
    margin-top: 8px;
    margin-bottom: 0;
    font-size: clamp(1.35rem, 5.5vw, 1.75rem);
  }

  .hero__sub {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 36px;
    margin-bottom: 0;
    font-size: inherit;
  }

  #work {
    padding-top: 36px;
  }

  .hero__media::before {
    transform: translate(8px, 8px);
  }

  .case-study__gallery-row--2,
  .case-study__gallery-row--3 {
    grid-template-columns: 1fr;
  }

  .case-study__lightbox-scroll {
    padding: 64px 16px 24px;
  }

  .case-study__lightbox-nav--prev {
    left: 12px;
  }

  .case-study__lightbox-nav--next {
    right: 12px;
  }

  .nav__toggle-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--color-text);
  }

  .nav {
    position: relative;
    padding: 12px 0;
  }

  .nav__toggle-label span,
  .nav__toggle-label span::before,
  .nav__toggle-label span::after {
    content: "";
    display: block;
    width: 22px;
    height: 1.5px;
    background: currentColor;
    position: relative;
    transition: transform var(--transition);
  }

  .nav__toggle-label span::before {
    position: absolute;
    top: -6px;
  }

  .nav__toggle-label span::after {
    position: absolute;
    top: 6px;
  }

  .nav__list {
    position: absolute;
    top: 100%;
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    flex-direction: column;
    gap: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-rule);
    padding: 0 var(--gutter);
    max-height: 0;
    overflow: hidden;
    transition: max-height 280ms ease, padding 280ms ease;
  }

  .nav__list a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-rule);
    width: 100%;
  }

  .nav__list li:last-child a {
    border-bottom: none;
  }

  .nav__toggle:checked ~ .nav__list {
    max-height: 180px;
    padding: 4px var(--gutter) 8px;
  }

  .section-head {
    flex-direction: column;
    gap: 12px;
  }

  .contact__lede {
    font-size: inherit;
  }

  .experience-credits li {
    padding: 18px 0;
    gap: 4px;
  }

  .experience-credits__role {
    font-size: inherit;
  }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto;
  }
}
