/* ---------- Design tokens ---------- */
:root {
  --bg: #FFFFFF;
  --text: #1A1A1A;
  --text-muted: #6B6B6B;
  --text-faint: #9A9A9A;
  --accent-pink: #D4537E;
  --accent-purple: #7F77DD;
  --border: #E3E1DB;
  --placeholder: #E4E0D7;
  --placeholder-border: #D3CDBF;
  --ruler-tick: #999999;
  --ruler-bg: #FFFFFF;

  --max-width: 1200px;
  --cs-max-width: 1440px;
  --gutter: 32px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------- Reset ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Custom cursor ---------- */
body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button {
  cursor: none;
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-pink);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.16s ease, width 0.18s ease, height 0.18s ease,
    padding 0.18s ease, border-radius 0.18s ease, background-color 0.18s ease;
}

.cursor-dot.is-visible {
  opacity: 1;
}

.cursor-dot.is-hovering {
  opacity: 0.2;
}

.cursor-dot.is-card-hovering {
  width: auto;
  height: auto;
  min-width: 132px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--accent-pink);
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cursor-label {
  display: none;
  color: #FFFFFF;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.cursor-dot.is-card-hovering .cursor-label {
  display: inline-block;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1, h2, h3, p {
  margin: 0;
}

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

/* ---------- Ruler ---------- */
.ruler {
  width: 100%;
  height: 28px;
  background: var(--ruler-bg);
  border-bottom: 1px solid #ECECEC;
  overflow: hidden;
  position: relative;
}

.ruler svg {
  display: block;
  width: 100%;
  height: 28px;
}

.ruler line {
  stroke: var(--ruler-tick);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.ruler text {
  fill: var(--ruler-tick);
  font-family: var(--font);
  font-size: 9px;
}

/* ---------- Layout helpers ---------- */
.nav-inner,
.hero,
.projects,
.footer-inner {
  max-width: var(--cs-max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Nav ---------- */
.nav {
  padding-top: 28px;
  padding-bottom: 28px;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.brand-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: color 0.15s ease;
}

.brand-name:hover {
  color: var(--accent-pink);
}

.brand-role {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 28px;
  padding-top: 2px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--accent-pink);
}

.back-home {
  display: block;
  margin-bottom: 48px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.back-home:hover {
  color: var(--accent-pink);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 16px;
  padding-bottom: 24px;
}

.hero-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-greeting {
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 700px;
}

.hero-greeting-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid var(--border);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.hero-greeting-link:hover {
  color: var(--accent-pink);
  border-color: var(--accent-pink);
}

.hero-image-wrap {
  flex: 0 0 auto;
  width: 150px;
  aspect-ratio: 1 / 1;
  margin-right: 220px;
  border-radius: 8px;
  overflow: hidden;
}

.hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
}

.hook {
  margin-top: 16px;
  max-width: 1120px;
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hook-line {
  display: block;
}

.hook-line + .hook-line {
  margin-top: 14px;
}

.hook-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}

.hook-link:hover {
  border-bottom-color: currentColor;
}

.accent-pink {
  color: var(--accent-pink);
}

.accent-purple {
  color: var(--accent-purple);
}

/* ---------- Projects ---------- */
.projects {
  padding-bottom: 96px;
}

.project-group {
  padding-top: 18px;
}

.group-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 32px;
}

.card {
  display: block;
  transition: transform 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
}

.card-image-wrap {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.18s ease;
}

.card:hover .card-image-wrap {
  border-color: var(--accent-pink);
}

.card-image {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  background: var(--placeholder);
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover .card-image {
  transform: scale(1.05);
}

.card-meta {
  margin-top: 20px;
}

.card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}

.card-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.card-year {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-faint);
}

.card-desc {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 640px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 40px;
  padding-bottom: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-name {
  font-size: 15px;
  font-weight: 700;
}

.footer-email {
  margin-top: 6px;
  font-size: 14px;
}

.footer-email a:hover {
  color: var(--accent-pink);
}

.footer-right {
  display: flex;
  gap: 24px;
}

.footer-right a {
  font-size: 14px;
  font-weight: 500;
}

.footer-right a:hover {
  color: var(--accent-pink);
}

.footer-copy {
  max-width: var(--cs-max-width);
  margin: 24px auto 0;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- Case study ---------- */
.cs-notice {
  padding: 40px 0 0;
}

.cs-notice-box {
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.7;
}

.cs-acknowledgement {
  padding: 20px 0 0;
}

.cs-acknowledgement p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

.cs-layout {
  max-width: var(--cs-max-width);
  margin: 0 auto;
  padding: 40px var(--gutter) 0;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.cs-toc {
  position: sticky;
  top: 48px;
  align-self: start;
  min-width: 0;
}

.cs-toc nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cs-toc a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.cs-toc a:hover {
  color: var(--text);
}

.cs-toc a.is-active {
  color: var(--accent-pink);
  font-weight: 600;
}

.cs-content {
  min-width: 0;
}

.cs-domains {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.cs-domains .cs-pill {
  margin-bottom: 0;
}

.cs-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.cs-tagline {
  margin-top: 20px;
  font-size: 20px;
  color: var(--text-muted);
}

.cs-header-media {
  display: block;
  width: 100%;
  margin-top: 40px;
  aspect-ratio: 16 / 9;
  background: var(--placeholder);
  border: 1px solid var(--placeholder-border);
  border-radius: 8px;
  object-fit: contain;
}

img.cs-header-media,
video.cs-header-media {
  aspect-ratio: auto;
  height: auto;
}

.cs-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 32px;
  margin-top: 64px;
  padding-top: 32px;
  padding-bottom: 56px;
  border-top: 1px solid var(--border);
}

.cs-meta-item dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.cs-meta-item dd {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}

.cs-section {
  padding: 100px 0;
}

.cs-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-pink);
  margin-bottom: 16px;
}

.cs-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 20px;
}

.cs-domains .cs-pill {
  background: rgba(212, 83, 126, 0.08);
  border: 1px solid rgba(212, 83, 126, 0.35);
  color: var(--accent-pink);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 10px 24px;
  margin-bottom: 0;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cs-domains .cs-pill:hover {
  background: var(--accent-pink);
  border-color: var(--accent-pink);
  color: #FFFFFF;
}

.cs-heading {
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.cs-body {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

.cs-body + .cs-body {
  margin-top: 18px;
}

.cs-link {
  display: inline-block;
  margin-top: 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--text);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.cs-link:hover {
  color: var(--accent-pink);
  border-color: var(--accent-pink);
}

.cs-note {
  margin-top: 12px;
  font-size: 14px;
  font-style: italic;
  color: var(--text-faint);
}

.cs-image {
  display: block;
  width: 100%;
  margin-top: 48px;
  aspect-ratio: 3 / 2;
  background: var(--placeholder);
  border: 1px solid var(--placeholder-border);
  border-radius: 8px;
  object-fit: contain;
}

/* Real screenshots/video: size to their own natural ratio so nothing is ever cropped */
img.cs-image,
video.cs-image {
  aspect-ratio: auto;
  height: auto;
}

.cs-image-half {
  width: 50%;
}

.cs-video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 8px;
  overflow: hidden;
  background: var(--placeholder);
}

.cs-video-embed-landscape {
  aspect-ratio: 16 / 9;
}

.cs-video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.cs-subhead {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 56px;
}

.cs-pair-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 40px;
  align-items: start;
}

.cs-pair {
  margin: 0;
}

.cs-pair-image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--placeholder);
  border: 1px solid var(--placeholder-border);
  border-radius: 8px;
  object-fit: contain;
}

img.cs-pair-image,
video.cs-pair-image {
  aspect-ratio: auto;
  height: auto;
}

.cs-pair figcaption {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-faint);
  font-style: italic;
}

.cs-pair-caption-top figcaption {
  margin-top: 0;
  margin-bottom: 12px;
}

.cs-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
  align-items: start;
}

.cs-gallery-3 {
  grid-template-columns: repeat(3, 1fr);
}

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

.cs-gallery-image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--placeholder);
  border: 1px solid var(--placeholder-border);
  border-radius: 8px;
}

img.cs-gallery-image,
video.cs-gallery-image {
  aspect-ratio: auto;
  height: auto;
}

.cs-figure {
  margin-top: 48px;
}

.cs-figure-caption {
  margin-top: 12px;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
}

.cs-figure-caption strong {
  color: var(--text);
}

.cs-quote {
  margin: 48px 0 0;
  padding-left: 28px;
  border-left: 2px solid var(--text);
}

.cs-quote p {
  font-size: 22px;
  font-style: italic;
  line-height: 1.5;
  color: var(--text);
}

.cs-quote cite {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-style: normal;
  color: var(--text-faint);
}

.cs-callout {
  margin-top: 48px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.cs-subblock-title {
  margin-top: 48px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cs-subblock-title + .cs-body {
  margin-top: 16px;
}

.cs-kept-cut {
  margin-top: 14px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
  font-size: 15px;
  font-style: italic;
  color: var(--text-faint);
}

.cs-list {
  list-style: none;
  margin-top: 20px;
  padding: 0;
}

.cs-list li {
  position: relative;
  padding-left: 20px;
  margin-top: 10px;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.65;
}

.cs-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--text-faint);
}

.cs-list li strong {
  color: var(--text);
  font-weight: 600;
}

.cs-list li em {
  color: var(--text);
  font-style: italic;
}

.cs-two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-top: 36px;
}

.cs-col-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.cs-col p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.65;
}

.cs-project-nav {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 96px;
  margin-bottom: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.cs-nav-btn {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.cs-nav-btn:hover {
  border-color: var(--accent-pink);
  transform: translateY(-2px);
}

.cs-nav-next {
  align-items: flex-end;
  text-align: right;
  margin-left: auto;
  justify-content: center;
}

.cs-nav-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.cs-nav-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ---------- About page ---------- */
.about-content {
  max-width: var(--cs-max-width);
  margin: 0 auto;
  padding: 64px var(--gutter) 120px;
}

.about-heading {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.about-intro {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 48px;
  align-items: start;
}

.about-portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--placeholder);
  border: 1px solid var(--placeholder-border);
  border-radius: 8px;
  object-fit: cover;
}

.about-body {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

.about-intro .about-body {
  margin-top: 0;
}

.about-body + .about-body {
  margin-top: 28px;
}

/* ---------- Playground ---------- */
.playground-intro {
  max-width: 780px;
  margin: 0 auto;
  padding: 64px var(--gutter) 0;
}

.playground-lead {
  margin-top: 24px;
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 640px;
}

.playground-lead a {
  color: var(--text);
  border-bottom: 1px solid var(--text);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.playground-lead a:hover {
  color: var(--accent-pink);
  border-color: var(--accent-pink);
}

.bento {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px var(--gutter) 120px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  grid-auto-flow: dense;
  gap: 20px;
}

.tile {
  position: relative;
  grid-column: span 1;
  grid-row: span 1;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.tile--wide {
  grid-column: span 2;
}

.tile--tall {
  grid-row: span 2;
}

.tile--feature {
  grid-column: span 2;
  grid-row: span 2;
}

.tile-media {
  position: absolute;
  inset: 0;
  background: var(--placeholder);
  border: none;
}

@media (prefers-reduced-motion: no-preference) {
  .tile-media {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .tile:hover .tile-media {
    transform: scale(1.06);
  }
}

.tile-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  font-size: 13px;
  font-weight: 500;
  color: #FFFFFF;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tile:hover .tile-caption {
  opacity: 1;
}

.playground-dropdown {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter) 120px;
}

.dropdown {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px;
}

.dropdown[open] {
  padding-bottom: 32px;
}

.dropdown-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  list-style: none;
}

.dropdown-summary::-webkit-details-marker {
  display: none;
}

.dropdown-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.dropdown-hint {
  font-size: 13px;
  color: var(--text-faint);
}

.dropdown-icon {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.dropdown[open] .dropdown-icon {
  transform: rotate(-135deg);
}

.dropdown-content {
  margin-top: 28px;
}

.dropdown-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.dropdown-gallery-image {
  aspect-ratio: 3 / 4;
  background: var(--placeholder);
  border: 1px solid var(--placeholder-border);
  border-radius: 8px;
}

.dropdown-caption {
  margin-top: 20px;
  font-size: 14px;
  font-style: italic;
  color: var(--text-faint);
  max-width: 640px;
}

/* Viking Festival before/after: keep each pair and the remaining-pages
   gallery on one row at every viewport, so the comparison stays side by side */
#before-after .cs-pair-grid {
  grid-template-columns: repeat(2, 1fr);
}

#before-after .cs-gallery-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ReCo Digital: keep before/after pairs side by side at every viewport */
#reco-homepage .cs-pair-grid,
#sun-health-clinic .cs-pair-grid {
  grid-template-columns: repeat(2, 1fr);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-intro {
    align-items: flex-start;
  }

  .cs-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .cs-toc {
    position: static;
    margin-bottom: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
  }

  .cs-toc nav {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 22px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cs-toc a {
    white-space: nowrap;
  }

  .cs-two-col {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }

  .about-intro {
    grid-template-columns: 1fr;
  }

  .dropdown-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 20px;
  }

  .nav {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .nav-inner {
    flex-direction: column;
    gap: 20px;
  }

  .nav-links {
    gap: 20px;
    flex-wrap: wrap;
  }

  .nav-links a,
  .footer-right a {
    display: inline-block;
    padding: 10px 0;
  }

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

  .hero-intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .hero-image-wrap {
    width: 160px;
    margin-right: 0;
  }

  .card-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .project-list {
    grid-template-columns: 1fr;
  }

  .bento {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
  }

  .tile--wide,
  .tile--feature {
    grid-column: span 1;
  }

  .tile--tall,
  .tile--feature {
    grid-row: span 1;
  }

  .dropdown-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .dropdown {
    padding: 20px;
  }

  .project-group {
    padding-top: 48px;
  }

  .footer-inner {
    flex-direction: column;
  }

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

  .cs-pair-grid {
    grid-template-columns: 1fr;
  }

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

  .cs-section {
    padding: 72px var(--gutter);
  }

  .cs-quote p {
    font-size: 20px;
  }

  .cs-callout {
    font-size: 20px;
  }

  .cs-project-nav {
    flex-direction: column;
  }

  .cs-nav-next {
    align-items: flex-start;
    text-align: left;
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .cs-meta {
    grid-template-columns: 1fr;
  }

  .cs-image-half {
    width: 100%;
  }

  .cs-gallery,
  .cs-gallery-2,
  .cs-gallery-3 {
    grid-template-columns: 1fr;
  }
}
