@import url('https://fonts.googleapis.com/css2?family=Anuphan:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --white: #ffffff;
  --ink: #111111;
  --gray: #f4f4f4;
  --gray-2: #e8e8e8;
  --muted: #6b6b6b;
  --line: #111111;
  --line-soft: rgba(17, 17, 17, 0.12);
  --accent: #e10600;
  --accent-ink: #ffffff;
  --font: 'Anuphan', sans-serif;
  --display: 'Space Grotesk', 'Anuphan', sans-serif;
  --mono: 'IBM Plex Mono', 'Anuphan', monospace;
  --max: 1120px;
  --nav-h: 64px;
  --demo-h: 48px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --header-offset: calc(var(--demo-h) + var(--nav-h));
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.mono {
  font-family: var(--mono);
  font-feature-settings: 'ss01' on;
  letter-spacing: 0.02em;
}

/* ——— Demo bar ——— */
.demo-bar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--demo-h);
  padding: 0.55rem 1rem;
  background: var(--ink);
  color: var(--white);
  font-size: 0.78rem;
}

.demo-bar strong {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.demo-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.demo-bar__actions a {
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 0.72rem;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.demo-bar__actions a:hover {
  border-color: var(--white);
}

.demo-bar__actions a.is-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: var(--demo-h);
  z-index: 70;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(8px);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.site-header.is-solid {
  border-bottom-color: var(--line-soft);
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.04);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 1rem;
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
}

.brand small {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav a {
  font-size: 0.88rem;
  font-weight: 500;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav a:hover::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink);
  padding: 0.4rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  cursor: pointer;
}

/* ——— Hero ——— */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: calc(100svh - var(--header-offset));
  border-bottom: 1px solid var(--ink);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.25rem;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background:
    linear-gradient(180deg, var(--white) 0%, var(--gray) 100%);
  position: relative;
}

.hero__copy::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  animation: bar-in 0.9s var(--ease) 0.15s forwards;
}

.brand-mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(4.5rem, 14vw, 9.5rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--ink);
  animation: type-in 0.85s var(--ease) both;
}

.brand-mark--sm {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 0.9;
  animation: none;
}

.hero h1 {
  font-family: var(--font);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.1vw, 1.55rem);
  line-height: 1.35;
  max-width: 22ch;
  animation: fade-up 0.7s var(--ease) 0.2s both;
}

.hero__lead {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 34ch;
  animation: fade-up 0.7s var(--ease) 0.32s both;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
  animation: fade-up 0.7s var(--ease) 0.44s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--ink);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn--ink {
  background: var(--ink);
  color: var(--white);
}

.btn--ink:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn--line {
  background: transparent;
}

.btn--line:hover {
  background: var(--ink);
  color: var(--white);
}

.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn--accent:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.hero__media {
  position: relative;
  overflow: hidden;
  background: var(--gray);
  min-height: 280px;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: media-settle 1.4s var(--ease) 0.1s both;
}

.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(17, 17, 17, 0.06) 0%, transparent 18%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 47px,
      rgba(17, 17, 17, 0.04) 47px,
      rgba(17, 17, 17, 0.04) 48px
    );
}

/* ——— Sections ——— */
.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  border-bottom: 1px solid var(--line-soft);
}

.section__head {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem 2rem;
  align-items: end;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--ink);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.eyebrow .mono {
  color: var(--accent);
  margin-right: 0.35rem;
}

.section__head h2,
.about__left h2,
.contact__info h2 {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section__head > p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 36ch;
  justify-self: end;
}

/* ——— Portfolio frames — Swiss 3-col bento ——— */
.portfolio {
  background: var(--gray);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.portfolio .section__head {
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.portfolio-bleed {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, minmax(180px, 22vw));
  gap: 0.5rem;
}

.portfolio-cell {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  min-height: 0;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.portfolio-cell.is-in {
  opacity: 1;
  transform: none;
}

/* Explicit placement — no holes */
.portfolio-cell:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
.portfolio-cell:nth-child(2) { grid-column: 3; grid-row: 1; }
.portfolio-cell:nth-child(3) { grid-column: 3; grid-row: 2; }
.portfolio-cell:nth-child(4) { grid-column: 1; grid-row: 3; }
.portfolio-cell:nth-child(5) { grid-column: 2; grid-row: 3; }
.portfolio-cell:nth-child(6) { grid-column: 3; grid-row: 3; }
.portfolio-cell:nth-child(7) { grid-column: 1 / 3; grid-row: 4; }
.portfolio-cell:nth-child(8) { grid-column: 3; grid-row: 4; }

.portfolio-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.18) contrast(1.05);
  transition: transform 0.7s var(--ease), filter 0.4s;
}

.portfolio-cell:hover img {
  transform: scale(1.05);
  filter: grayscale(0) contrast(1.08);
}

.portfolio-cell figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.9rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: #fff;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.portfolio-cell figcaption .mono {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.15rem;
}

/* ——— Archive index ——— */
.archive {
  background: var(--white);
}

.archive__layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem 2rem;
  align-items: stretch;
}

.index-list {
  border-top: 1px solid var(--ink);
}

.index-row {
  display: grid;
  grid-template-columns: 3.2rem 1.2fr 1fr auto;
  gap: 0.75rem 1rem;
  align-items: baseline;
  padding: 1.05rem 0.35rem;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.index-row:hover,
.index-row.is-active,
.index-row:focus-visible {
  background: var(--gray);
  outline: none;
}

.index-row.is-active .index-row__num,
.index-row:hover .index-row__num {
  color: var(--accent);
}

.index-row__num {
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s var(--ease);
}

.index-row__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.index-row__meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.index-row__cat {
  font-size: 0.82rem;
  font-weight: 500;
  text-align: right;
}

.preview-pane {
  position: sticky;
  top: calc(var(--header-offset) + 1rem);
  align-self: start;
  background: var(--gray);
  border: 1px solid var(--ink);
  min-height: 320px;
}

.preview-pane__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--gray-2);
}

.preview-pane__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.35s var(--ease), transform 0.55s var(--ease);
}

.preview-pane__frame img.is-active {
  opacity: 1;
  transform: scale(1);
}

.preview-pane__caption {
  padding: 0.75rem 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-top: 1px solid var(--ink);
}

/* ——— Case strip ——— */
.cases {
  background: var(--gray);
}

.case-strip {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--ink);
}

.case-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  border-bottom: 1px solid var(--ink);
  background: var(--white);
}

.case-row--flip .case-row__media {
  order: 2;
}

.case-row--flip .case-row__body {
  order: 1;
}

.case-row__media {
  overflow: hidden;
  min-height: 260px;
  border-right: 1px solid var(--ink);
}

.case-row--flip .case-row__media {
  border-right: none;
  border-left: 1px solid var(--ink);
}

.case-row__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.case-row:hover .case-row__media img {
  transform: scale(1.03);
}

.case-row__body {
  padding: clamp(1.35rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  justify-content: center;
}

.case-row__id {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.case-row__body h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  letter-spacing: -0.02em;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.meta-grid dt {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.meta-grid dd {
  font-size: 0.92rem;
  font-weight: 500;
}

.case-row__body > p:last-child {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 38ch;
}

/* ——— About ——— */
.about {
  background: var(--white);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--ink);
}

.about__left {
  padding-top: 1.5rem;
}

.about__lead {
  margin-top: 1.25rem;
  font-size: 1.05rem;
  max-width: 32ch;
  color: var(--ink);
}

.about__right {
  border-left: 1px solid var(--ink);
  padding: 1.5rem 0 0 2rem;
}

.approach-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.approach-list li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.approach-list li:first-child {
  border-top: 1px solid var(--line-soft);
}

.approach-list .mono {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  padding-top: 0.15rem;
}

.approach-list h3 {
  font-family: var(--font);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.approach-list p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ——— Rates table ——— */
.rates {
  background: var(--white);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ink);
}

.rates-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: var(--white);
}

.rates-table th,
.rates-table td {
  padding: 0.95rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.rates-table thead th {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--white);
  border-bottom: none;
}

.rates-table tbody tr:last-child td {
  border-bottom: none;
}

.rates-table tbody tr {
  transition: background 0.2s var(--ease);
}

.rates-table tbody tr:hover {
  background: var(--gray);
}

.rates-table td:first-child {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
}

.rates-table td:nth-child(2) {
  font-family: var(--display);
  font-weight: 600;
}

.rates-table td:last-child {
  font-weight: 600;
  white-space: nowrap;
}

.rates-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ——— Contact ——— */
.contact {
  background: var(--gray);
}

.contact__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem 3rem;
  align-items: start;
  border-top: 1px solid var(--ink);
  padding-top: 2rem;
}

.contact__info > p:not(.eyebrow) {
  margin-top: 0.85rem;
  color: var(--muted);
  max-width: 34ch;
}

.contact-meta {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-meta div {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line-soft);
}

.contact-meta dt {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.contact-meta dd {
  font-size: 0.98rem;
  font-weight: 500;
}

.contact-form {
  display: grid;
  gap: 0.9rem;
  background: var(--white);
  border: 1px solid var(--ink);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
}

.contact-form label span {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  border-radius: 0;
  padding: 0.65rem 0;
  outline: none;
  transition: border-color 0.2s var(--ease);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-bottom-color: var(--accent);
}

.contact-form textarea {
  resize: vertical;
  min-height: 110px;
}

.contact-form .btn {
  margin-top: 0.35rem;
  justify-self: start;
  cursor: pointer;
}

/* ——— Footer ——— */
.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: 2.5rem 0 2rem;
}

.site-footer__inner {
  display: grid;
  gap: 1.5rem;
}

.site-footer .brand-mark {
  color: var(--white);
  margin-bottom: 0.35rem;
}

.site-footer__brand p:last-child {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.site-footer__links a {
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.site-footer__links a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.site-footer__copy {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* ——— Motion ——— */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

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

@keyframes type-in {
  from {
    opacity: 0;
    transform: translateY(0.35em);
    letter-spacing: 0.12em;
  }
  to {
    opacity: 1;
    transform: none;
    letter-spacing: -0.04em;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bar-in {
  to {
    transform: scaleX(1);
  }
}

@keyframes media-settle {
  from {
    transform: scale(1.1);
    opacity: 0.65;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@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;
  }

  .hero__media img,
  .brand-mark,
  .hero h1,
  .hero__lead,
  .btn-row {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero__copy::before {
    transform: scaleX(1);
  }
}

/* ——— Responsive ——— */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero__copy {
    min-height: auto;
    padding-top: 2.5rem;
    padding-bottom: 2rem;
  }

  .hero__media {
    min-height: 48vw;
    max-height: 420px;
  }

  .section__head {
    grid-template-columns: 1fr;
  }

  .section__head > p {
    justify-self: start;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: none;
    grid-auto-rows: minmax(180px, 36vw);
  }

  .portfolio-cell:nth-child(1) { grid-column: 1 / 3; grid-row: auto; }
  .portfolio-cell:nth-child(2),
  .portfolio-cell:nth-child(3),
  .portfolio-cell:nth-child(4),
  .portfolio-cell:nth-child(5),
  .portfolio-cell:nth-child(6),
  .portfolio-cell:nth-child(7),
  .portfolio-cell:nth-child(8) {
    grid-column: auto;
    grid-row: auto;
  }

  .portfolio-cell:nth-child(1) {
    min-height: 240px;
  }

  .archive__layout {
    grid-template-columns: 1fr;
  }

  .preview-pane {
    position: relative;
    top: 0;
    order: -1;
  }

  .preview-pane__frame {
    aspect-ratio: 16 / 10;
  }

  .index-row {
    grid-template-columns: 2.5rem 1fr;
    grid-template-rows: auto auto;
  }

  .index-row__meta {
    grid-column: 2;
  }

  .index-row__cat {
    display: none;
  }

  .case-row,
  .case-row--flip {
    grid-template-columns: 1fr;
  }

  .case-row--flip .case-row__media,
  .case-row--flip .case-row__body {
    order: unset;
  }

  .case-row__media,
  .case-row--flip .case-row__media {
    border: none;
    border-bottom: 1px solid var(--ink);
    aspect-ratio: 16 / 10;
    min-height: 0;
  }

  .about__grid,
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .about__right {
    border-left: none;
    border-top: 1px solid var(--ink);
    padding: 1.5rem 0 0;
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--ink);
    padding: 0.5rem 1rem 1rem;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .nav a::after {
    display: none;
  }

  .demo-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header {
    position: sticky;
  }

  .site-header__inner {
    position: relative;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(210px, 52vw);
  }

  .portfolio-cell:nth-child(n) {
    grid-column: 1;
    grid-row: auto;
  }
}
