/* Design tokens — inspired by oliur.com minimal personal site */
:root {
  --bg: #fbfbfb;
  --text: #666666;
  --text-dark: #171717;
  --text-heading: #262626;
  --text-muted: #737373;
  --text-faint: #a3a3a3;
  --link: #0f4bf1;
  --link-hover: #0a2f94;
  --surface: #f5f5f5;
  --surface-hover: #e5e5e5;
  --border: #e5e5e5;
  --font: "Instrument Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: 0.2s ease;
  --content: 640px;
  --page: 900px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  line-height: 1;
  background-color: var(--bg);
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(15, 75, 241, 0.15);
  color: var(--text-dark);
}

/* Link arrows — rotate on hover */
.link-arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34, 1.45, 0.64, 1);
  transform-origin: center;
}

a:hover .link-arrow,
a:focus-visible .link-arrow {
  transform: rotate(45deg);
}

a:hover .link-arrow--forward,
a:focus-visible .link-arrow--forward {
  transform: translateX(0.2em) rotate(-45deg);
}

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

  a:hover .link-arrow,
  a:focus-visible .link-arrow,
  a:hover .link-arrow--forward,
  a:focus-visible .link-arrow--forward {
    transform: none;
  }
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--ease);
}

a:hover,
a:active {
  color: var(--link-hover);
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500;
  color: var(--text-heading);
}

p {
  line-height: 1.6;
  margin: 0 0 1em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--text-dark);
  color: #fff;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.site-header {
  padding: 0 30px;
  margin-bottom: 40px;
}

.header-inner {
  display: flex;
  padding-top: 20px;
  max-width: var(--content);
  margin: 0 auto;
}

.case-study .header-inner,
.work-page .header-inner {
  max-width: var(--page);
}

.site-branding {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1.5rem;
}

.site-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dark);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

.site-title img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

.site-title:hover {
  color: var(--link);
}

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 0;
}

.main-navigation li {
  margin-right: 20px;
  font-size: 14px;
  font-weight: 600;
}

.main-navigation li:last-child {
  margin-right: 0;
}

.main-navigation a {
  color: var(--text-muted);
}

.main-navigation a:hover {
  color: var(--link);
}

/* Homepage content */
.homepage-content {
  flex: 1;
  padding: 0 30px;
  max-width: var(--content);
  margin: 0 auto;
  width: 100%;
}

.about {
  margin-top: 20px;
  max-width: 650px;
}

.about-headshot {
  position: relative;
  z-index: 1;
  width: 100px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}

/* iMessage-style hire CTA — tail via Samuel Kraft technique */
.imessage-bubble {
  --imessage-blue: #007aff;
  --imessage-blue-hover: #1a86ff;
  position: relative;
  display: inline-block;
  max-width: min(280px, calc(100% - 110px));
  margin: 0 0 2px;
  padding: 10px 14px 11px;
  background-color: var(--imessage-blue);
  color: #fff;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  transform-origin: left bottom;
  animation: imessage-pop 0.55s cubic-bezier(0.34, 1.45, 0.64, 1) 0.35s both;
  transition: background-color var(--ease);
}

.imessage-bubble:hover,
.imessage-bubble:active {
  color: #fff;
  background-color: var(--imessage-blue-hover);
}

.imessage-bubble:focus-visible {
  outline: 2px solid var(--imessage-blue);
  outline-offset: 3px;
}

.imessage-bubble::before,
.imessage-bubble::after {
  position: absolute;
  bottom: 0;
  height: 25px;
  content: "";
}

/* Colored bulge — inherits so hover color stays in sync with the bubble */
.imessage-bubble::before {
  left: -7px;
  width: 20px;
  background-color: inherit;
  border-bottom-right-radius: 16px 14px;
}

/* Page-bg cutout that carves the tear-drop curve */
.imessage-bubble::after {
  left: -26px;
  width: 26px;
  background: var(--bg);
  border-bottom-right-radius: 10px;
}

@keyframes imessage-pop {
  from {
    opacity: 0;
    transform: scale(0.72) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .imessage-bubble {
    animation: none;
  }
}

/* Chat thread: photo + stacked bubbles (work / case study CTAs) */
.imessage-thread {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.imessage-thread__bubbles {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.imessage-thread .imessage-bubble {
  max-width: min(320px, 100%);
  margin: 0;
}

.imessage-thread .imessage-bubble:nth-child(1) {
  animation-delay: 0.2s;
}

.imessage-thread .imessage-bubble:nth-child(2) {
  animation-delay: 0.38s;
}

.imessage-thread .imessage-bubble:nth-child(3) {
  animation-delay: 0.56s;
}

/* Stacked outgoing bubbles: only the last keeps the iMessage tail */
.imessage-thread .imessage-bubble:not(:last-child)::before,
.imessage-thread .imessage-bubble:not(:last-child)::after {
  content: none;
}

.imessage-thread .imessage-bubble:not(:last-child) {
  border-bottom-left-radius: 6px;
}

.imessage-thread .imessage-bubble:not(:first-child) {
  border-top-left-radius: 6px;
}

.imessage-bubble--static {
  cursor: default;
  pointer-events: none;
}

.imessage-bubble--static:hover,
.imessage-bubble--static:active {
  background-color: var(--imessage-blue);
}

.about .imessage-bubble {
  max-width: min(420px, 100%);
}

.about h1.imessage-bubble {
  color: #fff;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.35;
  margin: 0;
  padding-bottom: 11px;
}

.about p.imessage-bubble {
  color: #fff;
  font-size: 15px;
  margin: 0;
}

.section {
  margin-bottom: 100px;
}

.section-title {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 0 30px;
  letter-spacing: 0.01em;
}

/* Apps I made — shelf */
.apps-made {
  margin-bottom: 70px;
  max-width: 650px;
  overflow: visible;
}

.apps-made__title {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

.apps-made__intro {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  max-width: 36rem;
}

.apps-made__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 48px;
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1;
}

.apps-made__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.apps-made__dot {
  opacity: 0.7;
}

.apps-made__dock {
  display: flex;
  justify-content: center;
  width: calc(100% + 120px);
  max-width: calc(100vw - 24px);
  margin: 8px 0 48px;
  margin-left: -60px;
  overflow: visible;
  pointer-events: none;
}

.apps-made__dock .app-dock {
  pointer-events: auto;
}

.app-dock {
  --dock-base: 52px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: 10px 12px 12px;
  border-radius: 20px;
  position: relative;
  background: rgba(235, 235, 235, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 0.5px 0 rgba(0, 0, 0, 0.05),
    0 10px 28px rgba(0, 0, 0, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
}

.app-dock__item {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  width: var(--dock-slot, var(--dock-base));
  height: var(--dock-base);
  color: inherit;
  text-decoration: none;
  z-index: var(--dock-z, 1);
}

.app-dock__item:hover,
.app-dock__item:focus-visible {
  color: inherit;
}

.app-dock__separator {
  flex: 0 0 auto;
  align-self: center;
  width: 1px;
  height: calc(var(--dock-base) * 0.72);
  margin: 0 2px;
  border-radius: 1px;
  background: rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.app-dock.is-resetting .app-dock__item {
  transition:
    width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-dock.is-resetting .app-dock__item img {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-dock__item img {
  display: block;
  width: var(--dock-base);
  height: var(--dock-base);
  max-width: none;
  border-radius: 22.5%;
  object-fit: cover;
  aspect-ratio: 1;
  transform: scale(var(--dock-scale, 1));
  transform-origin: bottom center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

.app-dock__name {
  position: absolute;
  left: 50%;
  bottom: calc(var(--dock-base) * var(--dock-scale, 1) + 12px);
  transform: translateX(-50%) translateY(4px);
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(40, 40, 40, 0.88);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-dock__name::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(40, 40, 40, 0.88);
}

.app-dock__item:hover .app-dock__name,
.app-dock__item:focus-visible .app-dock__name {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.apps-made__more {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.apps-made__more a {
  color: var(--text-dark);
}

.apps-made__more a:hover {
  color: var(--link);
}

@media (max-width: 640px) {
  .apps-made__dock {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .app-dock {
    --dock-base: 48px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 10px;
    border-radius: 18px;
    max-width: 100%;
  }

  .app-dock__item {
    width: var(--dock-slot, var(--dock-base));
    height: var(--dock-slot, var(--dock-base));
    align-items: center;
    justify-content: flex-start;
  }

  .app-dock__item img {
    transform-origin: left center;
  }

  .app-dock__separator {
    width: calc(var(--dock-base) * 0.72);
    height: 1px;
    margin: 2px 0;
    align-self: flex-start;
  }

  .app-dock__name {
    left: calc(var(--dock-base) * var(--dock-scale, 1) + 12px);
    right: auto;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%) translateX(4px);
  }

  .app-dock__name::after {
    left: auto;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-top-color: transparent;
    border-right-color: rgba(40, 40, 40, 0.88);
  }

  .app-dock__item:hover .app-dock__name,
  .app-dock__item:focus-visible .app-dock__name {
    transform: translateY(-50%) translateX(0);
  }

  .apps-made__title {
    font-size: 22px;
  }
}

@media (max-width: 420px) {
  .app-dock {
    --dock-base: 44px;
    gap: 7px;
    padding: 10px 9px;
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-dock__item,
  .app-dock__name {
    transition: none;
  }
}

/* Work items (clients / approach) */
.work,
.other-stuff {
  margin-bottom: 70px;
  max-width: 650px;
  color: var(--text-muted);
}

.work a,
.other-stuff a,
.reviews a {
  color: var(--text-dark);
  transition: color var(--ease);
}

.work a:hover,
.other-stuff a:hover,
.reviews a:hover {
  color: var(--link);
}

.work-item {
  margin-bottom: 30px;
}

.work-item--app {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.work-item__icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 1px;
}

.work-item__body {
  min-width: 0;
}

.work-item h3 {
  margin: 0 0 5px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-dark);
}

.work-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Reviews */
.review-item {
  margin-bottom: 36px;
}

.review-item blockquote {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  font-style: normal;
}

.review-meta {
  margin: 0;
  font-size: 13px;
  color: var(--text-faint);
}

.more-link {
  margin-top: 10px;
}

.more-link a {
  color: var(--text-dark);
  font-weight: 600;
}

.more-link a:hover {
  color: var(--link);
}

/* Homepage footer */
.homepage-footer {
  margin-bottom: 60px;
}

.elsewhere {
  margin-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.elsewhere .btn,
.btn {
  display: inline-flex;
  align-items: center;
  background-color: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px 9px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background-color var(--ease), color var(--ease);
}

.elsewhere .btn:hover,
.btn:hover {
  background-color: var(--surface-hover);
  color: var(--text-dark);
}

.btn--primary {
  background-color: var(--link);
  color: #fff;
  padding: 10px 16px;
  font-size: 14px;
}

.btn--primary:hover {
  background-color: var(--link-hover);
  color: #fff;
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dark);
  padding: 9px 15px;
  font-size: 14px;
}

.btn--outline:hover {
  background: var(--surface);
  color: var(--text-dark);
}

.btn--link {
  background: transparent;
  color: var(--link);
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
}

.btn--link:hover {
  color: var(--link-hover);
  background: transparent;
}

.copyright {
  color: var(--text-faint);
  font-size: 13px;
  margin: 0;
}

/* Shared page chrome for work / case studies */
.page-content {
  flex: 1;
  padding: 0 30px 60px;
  max-width: var(--page);
  margin: 0 auto;
  width: 100%;
}

.container {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
}

.text-muted {
  color: var(--text-muted);
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  letter-spacing: 0.02em;
}

.page-header {
  margin-bottom: 2.5rem;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.3;
  margin: 0 0 0.75rem;
}

.page-header p {
  font-size: 15px;
  color: var(--text);
  max-width: 36rem;
  margin: 0;
}

/* Work index list */
.work-index__grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.work-card {
  display: block;
  padding: 0 0 30px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border);
  color: inherit;
}

.work-card:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.work-card:hover {
  color: inherit;
}

.work-card__row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.work-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.work-card__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.4;
}

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

.work-card__tagline {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}

.work-card__description {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.work-card__arrow {
  display: none;
}

.cs-cta {
  margin-top: 60px;
  padding: 0;
  background: transparent;
}

.cs-cta h2,
.cs-cta .section-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-dark);
  letter-spacing: normal;
}

.cs-cta p:not(.imessage-bubble),
.cs-cta .section-description {
  margin: 0 0 1.25rem;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.cs-cta .imessage-bubble,
.cs-cta .imessage-bubble:hover,
.cs-cta .imessage-bubble:active {
  margin: 0;
  color: #fff;
}

.cs-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-footer {
  padding: 0 30px 40px;
  max-width: var(--page);
  margin: 0 auto;
  width: 100%;
}

.site-footer .footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.site-footer .copyright {
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 1.25rem;
}

.footer-social a {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.footer-social a:hover {
  color: var(--link);
}

/* Case study */
.cs-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 2rem;
}

.cs-breadcrumb a {
  color: var(--text-muted);
}

.cs-breadcrumb a:hover {
  color: var(--link);
}

.cs-hero {
  margin-bottom: 60px;
}

.cs-hero__grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 800px) {
  .cs-hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
  }
}

.cs-hero__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cs-hero__icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.cs-hero__title {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.2;
}

.cs-hero__tagline {
  margin: 0.25rem 0 0;
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 400;
}

.cs-hero__lead {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 1.5rem;
}

.cs-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.cs-hero__visual {
  margin: 0;
}

.cs-hero__visual img {
  width: auto;
  max-width: min(100%, 18rem);
  max-height: 28rem;
  margin-inline: auto;
  object-fit: contain;
  border-radius: 8px;
}

.cs-hero__visual--landscape img {
  max-width: min(100%, 28rem);
  max-height: 16rem;
}

.cs-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 640px) {
  .cs-meta {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cs-meta dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.35rem;
}

.cs-meta dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
}

.cs-section {
  padding: 0 0 50px;
  margin-bottom: 20px;
}

.cs-section--alt {
  background: transparent;
}

.cs-section__grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .cs-section__grid {
    grid-template-columns: 0.9fr 1.3fr;
    gap: 2.5rem;
  }
}

.cs-section__label .section-title,
.cs-section__label h2 {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.4;
  margin: 0;
}

.cs-section__body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
}

.cs-section__body p {
  margin: 0 0 1rem;
}

.cs-section__body a {
  color: var(--link);
}

.cs-features {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.cs-features li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.65rem;
  line-height: 1.55;
  font-size: 14px;
  color: var(--text);
}

.cs-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cs-accent, var(--link));
}

.cs-gallery {
  padding: 10px 0 50px;
}

.cs-gallery .section-header {
  margin-bottom: 1.5rem;
}

.cs-gallery .section-header .section-title,
.cs-gallery h2 {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-dark);
  margin: 0;
}

.cs-gallery__grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 640px) {
  .cs-gallery__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cs-gallery__grid--wide {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .cs-gallery__grid--wide {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cs-gallery__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  text-align: center;
}

.cs-gallery__item img {
  width: auto;
  max-width: min(100%, 16rem);
  max-height: 32rem;
  object-fit: contain;
  border-radius: 8px;
}

.cs-gallery__grid--wide .cs-gallery__item img {
  max-width: 100%;
  max-height: 14rem;
}

.cs-gallery__item figcaption {
  margin-top: 0.6rem;
  font-size: 12px;
  color: var(--text-faint);
}

/* Reveal (subtle) */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 520px) {
  .site-header,
  .homepage-content,
  .page-content,
  .site-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .about-headshot {
    width: 84px;
  }

  .imessage-bubble {
    max-width: min(240px, calc(100% - 94px));
    font-size: 14px;
    padding: 9px 12px 11px;
  }

  .imessage-thread .imessage-bubble {
    max-width: min(260px, 100%);
  }

  .about .imessage-bubble {
    max-width: min(280px, 100%);
  }

  .about h1.imessage-bubble {
    font-size: 14px;
  }
}
