/*
Theme Name: ZWD Portfolio
Theme URI: https://example.invalid/zwd-portfolio
Author: 钟伟达
Description: 面向 AI 应用交付与 FDE 求职场景的黑白编辑风区块主题。设计结构参考 Ollie 1.6.0。
Version: 1.0.0
Requires at least: 7.0
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zwd-portfolio
*/

:root {
  --zwd-ink: #111111;
  --zwd-muted: #666666;
  --zwd-paper: #f7f7f3;
  --zwd-line: #d8d8d2;
  --zwd-white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--zwd-ink);
  outline-offset: 4px;
}

.site-shell {
  max-width: 1440px;
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--zwd-line);
  background: color-mix(in srgb, var(--zwd-paper) 92%, transparent);
  backdrop-filter: blur(16px);
}

.site-header__inner,
.site-footer__inner {
  min-height: 76px;
}

.site-header .wp-block-site-title {
  letter-spacing: 0.08em;
}

.site-header .wp-block-navigation-item__content {
  position: relative;
  padding-block: 0.75rem;
  text-decoration: none;
}

.site-header .wp-block-navigation-item__content::after {
  position: absolute;
  right: 0;
  bottom: 0.4rem;
  left: 0;
  height: 2px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 160ms ease, transform 160ms ease;
}

.site-header .wp-block-navigation-item__content:hover::after,
.site-header .current-menu-item > .wp-block-navigation-item__content::after {
  opacity: 1;
  transform: scaleX(1);
}

.page-main {
  min-height: calc(100vh - 153px);
}

.editorial-section {
  border-top: 1px solid var(--zwd-line);
  padding-block: clamp(2.5rem, 5vw, 5rem);
}

.editorial-section:first-child {
  border-top: 0;
}

.section-kicker {
  margin: 0;
  color: var(--zwd-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero {
  min-height: min(680px, 78vh);
  padding-block: clamp(4rem, 10vw, 9rem);
}

.hero__name {
  margin: 0;
  font-size: clamp(3.5rem, 10vw, 8.5rem);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.hero__role {
  margin: 0.3em 0 0;
  font-size: clamp(2rem, 6vw, 5.5rem);
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 1;
}

.hero__lead {
  max-width: 760px;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--zwd-muted);
  font-size: clamp(1.05rem, 2vw, 1.4rem);
}

.wp-block-button .wp-block-button__link {
  min-width: 150px;
  border: 1px solid var(--zwd-ink);
  border-radius: 0;
  transition: background 160ms ease, color 160ms ease;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--zwd-ink);
  color: var(--zwd-paper);
}

.capability-grid,
.topic-grid,
.value-grid {
  gap: 0;
  border-top: 1px solid var(--zwd-line);
  border-bottom: 1px solid var(--zwd-line);
}

.capability-grid > .wp-block-column,
.topic-grid > .wp-block-column,
.value-grid > .wp-block-column {
  min-width: 0;
  border-left: 1px solid var(--zwd-line);
  padding: clamp(1.25rem, 3vw, 2.25rem);
}

.capability-grid > .wp-block-column:first-child,
.topic-grid > .wp-block-column:first-child,
.value-grid > .wp-block-column:first-child {
  border-left: 0;
}

.capability-index {
  color: var(--zwd-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.featured-projects,
.project-card-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  padding: 0;
  list-style: none;
  counter-reset: project-card;
}

.featured-project,
.project-card-grid > li {
  min-width: 0;
  margin: 0;
}

.project-card {
  position: relative;
  display: flex;
  min-height: 360px;
  flex-direction: column;
  border: 1px solid var(--zwd-line);
  background: transparent;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  counter-increment: project-card;
  transition: border-color 160ms ease, transform 160ms ease;
}

.project-card::before {
  display: block;
  margin-bottom: auto;
  color: var(--zwd-muted);
  content: counter(project-card, decimal-leading-zero);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 760;
  letter-spacing: -0.06em;
  line-height: 1;
}

.project-card:hover,
.project-card:focus-within {
  border-color: var(--zwd-ink);
  transform: translateY(-3px);
}

.project-card__title {
  margin-top: 2rem;
}

.project-card__title a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.project-card__title a:focus-visible {
  outline: 0;
}

.project-card:has(.project-card__title a:focus-visible) {
  outline: 3px solid var(--zwd-ink);
  outline-offset: 4px;
}

.project-card__excerpt {
  color: var(--zwd-muted);
}

.project-card__stack-label {
  box-sizing: border-box;
  width: 100%;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--zwd-line);
  color: var(--zwd-muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
}

.project-card .taxonomy-project_skill {
  position: relative;
  z-index: 2;
  margin-top: 0.5rem;
  font-size: 0.78rem;
}

.project-card .taxonomy-project_skill a {
  display: inline-block;
  margin: 0.2rem 0.35rem 0.2rem 0;
  border: 1px solid var(--zwd-line);
  padding: 0.25rem 0.55rem;
  text-decoration: none;
}

.project-card__link {
  margin-top: 1.5rem;
  font-weight: 650;
}

.transition-flow {
  align-items: stretch !important;
  gap: 0;
}

.transition-flow > .wp-block-column {
  position: relative;
  border-top: 1px solid var(--zwd-line);
  padding: 1.5rem clamp(1rem, 2vw, 2rem);
}

.transition-flow > .wp-block-column:not(:last-child)::after {
  position: absolute;
  top: 1.55rem;
  right: -0.6rem;
  z-index: 1;
  background: var(--zwd-paper);
  padding-inline: 0.25rem;
  content: "→";
  font-size: 1.35rem;
}

/* ── Project Archive: no hero, centered carousel ── */
body.post-type-archive-project .page-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 153px);
  padding: 0;
}

body.post-type-archive-project .project-archive-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1440px;
  border-top: 0;
  padding-block: 0;
}

body.post-type-archive-project .editorial-section {
  border-top: 0;
  padding-block: 0;
}

/* ── Infinite scroll carousel for project cards ── */
body.post-type-archive-project .project-carousel-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  margin-block: 0;
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
}

body.post-type-archive-project .project-carousel-track {
  display: flex;
  justify-content: center;
  width: max-content;
  gap: 1.5rem;
  margin: 0 auto;
}

body.post-type-archive-project .project-carousel-track.is-static {
  animation: none;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: calc(2 * clamp(340px, 28vw, 480px) + 1.5rem);
}

body.post-type-archive-project .project-carousel-track.is-scrolling {
  animation: project-scroll 60s linear infinite;
}

body.post-type-archive-project .project-carousel-track.is-scrolling:hover {
  animation-play-state: paused;
}

body.post-type-archive-project .project-card-grid.carousel-mode {
  display: flex !important;
  grid-template-columns: none !important;
  justify-content: center !important;
  align-items: flex-start !important;
  width: max-content !important;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

body.post-type-archive-project .project-card-grid.carousel-mode > li,
body.post-type-archive-project .project-card-grid.carousel-mode .project-card {
  flex: 0 0 auto;
  width: clamp(340px, 28vw, 480px);
  min-height: auto;
}

/* Duplicate set for seamless loop (injected by JS) */
body.post-type-archive-project .project-card-grid.carousel-mode .project-card--clone {
  /* same styling as original */
}

@keyframes project-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  body.post-type-archive-project .project-carousel-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
  }

  body.post-type-archive-project .project-card-grid.carousel-mode {
    flex-wrap: wrap !important;
    justify-content: center !important;
  }

  body.post-type-archive-project .project-card-grid.carousel-mode > li,
  body.post-type-archive-project .project-card-grid.carousel-mode .project-card {
    flex: 0 0 auto;
  }
}

/* Mobile: stack vertically instead of horizontal scroll */
@media (max-width: 720px) {
  body.post-type-archive-project .project-carousel-track {
    animation: none;
    flex-direction: column;
    align-items: center;
  }

  body.post-type-archive-project .project-card-grid.carousel-mode {
    flex-direction: column !important;
    align-items: center !important;
  }

  body.post-type-archive-project .project-card-grid.carousel-mode > li,
  body.post-type-archive-project .project-card-grid.carousel-mode .project-card {
    width: 100%;
    max-width: 480px;
  }
}

body.post-type-archive-project .project-archive-cta {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0 1.25rem clamp(2rem, 5vw, 4rem);
}

body.post-type-archive-project .project-archive-cta .wp-block-button__link {
  min-width: 150px;
  text-align: center;
}

/* Keep all four homepage destinations visible on mobile. */
@media (max-width: 768px) {
  .home .zwd-gallery-enhancement {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    overflow: visible;
    padding: 1rem 0;
    scroll-snap-type: none;
  }

  .home .zwd-gallery-card {
    width: 100%;
    min-width: 0;
    height: clamp(210px, 28svh, 240px);
    padding: 1rem;
    transform: none;
    scroll-snap-align: none;
  }

  .home .zwd-gallery-card strong {
    font-size: clamp(1.3rem, 6vw, 1.8rem);
  }
}

.page-hero {
  padding-block: clamp(4rem, 9vw, 8rem);
}

.page-hero h1 {
  max-width: 980px;
  margin-bottom: 0.35em;
  font-size: clamp(3rem, 8vw, 7rem);
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.page-hero p {
  max-width: 760px;
  color: var(--zwd-muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.resume-page {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(4rem, 8vw, 7rem);
}

.resume-page-hero {
  max-width: 780px;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

.resume-page-kicker,
.resume-page-section-index {
  margin: 0 0 0.8rem;
  color: var(--zwd-muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.resume-page-hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 4.75rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.resume-page-name {
  margin: 1.2rem 0 0.55rem;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 750;
}

.resume-page-lead {
  max-width: 680px;
  margin: 0 auto;
  color: var(--zwd-muted);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  line-height: 1.75;
}

.resume-page-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--zwd-line);
  border-bottom: 1px solid var(--zwd-line);
}

.resume-page-facts > div {
  padding: 1.25rem 1.5rem;
}

.resume-page-facts > div + div {
  border-left: 1px solid var(--zwd-line);
}

.resume-page-facts span,
.resume-page-facts strong {
  display: block;
}

.resume-page-facts span {
  margin-bottom: 0.38rem;
  color: var(--zwd-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.resume-page-facts strong {
  font-size: 0.92rem;
  line-height: 1.5;
}

.resume-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.85fr);
  gap: clamp(3rem, 7vw, 6.5rem);
  align-items: start;
}

.resume-page-side {
  padding-left: clamp(1.5rem, 3vw, 2.5rem);
  border-left: 1px solid var(--zwd-line);
}

.resume-page-section {
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.resume-page-section h2 {
  margin: 0 0 1.45rem;
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.resume-page-section > p:not(.resume-page-section-index) {
  margin: 0 0 0.85rem;
  color: #363636;
  line-height: 1.8;
}

.resume-page-entry,
.resume-page-project {
  padding-top: 1.4rem;
  border-top: 1px solid var(--zwd-line);
}

.resume-page-entry-head,
.resume-page-project-head {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}

.resume-page-entry h3,
.resume-page-project h3,
.resume-page-skill-group h3,
.resume-page-education h3 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.4;
}

.resume-page-org {
  margin: 0.15rem 0 0;
  color: var(--zwd-muted);
  font-size: 0.9rem;
}

.resume-page-entry time,
.resume-page-education time {
  color: var(--zwd-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.resume-page-entry ul,
.resume-page-project ul {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
}

.resume-page-entry li,
.resume-page-project li {
  margin-bottom: 0.5rem;
  color: #3f3f3f;
  line-height: 1.7;
}

.resume-page-project + .resume-page-project {
  margin-top: 2.4rem;
}

.resume-page-project-head > span {
  flex: 0 0 auto;
  border: 1px solid var(--zwd-line);
  padding: 0.28rem 0.55rem;
  color: var(--zwd-muted);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.05em;
}

.resume-page-project > p {
  margin: 0.8rem 0 0;
  color: #363636;
  line-height: 1.75;
}

.resume-page-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.15rem;
}

.resume-page-tags span {
  border: 1px solid var(--zwd-line);
  padding: 0.35rem 0.55rem;
  font-size: 0.72rem;
}

.resume-page-skill-group {
  padding: 1rem 0;
  border-top: 1px solid var(--zwd-line);
}

.resume-page-skill-group:last-child {
  border-bottom: 1px solid var(--zwd-line);
}

.resume-page-skill-group p,
.resume-page-education p {
  margin: 0.4rem 0 0;
  color: var(--zwd-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.resume-page-education {
  padding-top: 1.2rem;
  border-top: 1px solid var(--zwd-line);
}

.resume-page-education h3 {
  margin-top: 0.45rem;
}

.resume-page-education .resume-page-note {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--zwd-line);
  font-size: 0.82rem;
}

.resume-page-strengths {
  margin: 0;
  padding: 0;
  list-style: none;
}

.resume-page-strengths li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--zwd-line);
}

.resume-page-strengths li:last-child {
  border-bottom: 1px solid var(--zwd-line);
}

.resume-page-strengths strong,
.resume-page-strengths span {
  display: block;
}

.resume-page-strengths strong {
  font-size: 0.92rem;
}

.resume-page-strengths span {
  margin-top: 0.22rem;
  color: var(--zwd-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.resume-page-cta {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 0.5rem;
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-top: 1px solid var(--zwd-ink);
  border-bottom: 1px solid var(--zwd-line);
}

.resume-page-cta h2 {
  max-width: 720px;
  margin: 0 0 0.55rem;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.resume-page-cta > div > p:last-child {
  margin: 0;
  color: var(--zwd-muted);
}

.resume-page-cta > a {
  flex: 0 0 auto;
  font-weight: 750;
  text-decoration: none;
}

@media (max-width: 820px) {
  .resume-page-facts {
    grid-template-columns: 1fr;
  }

  .resume-page-facts > div + div {
    border-top: 1px solid var(--zwd-line);
    border-left: 0;
  }

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

  .resume-page-side {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 560px) {
  .resume-page {
    width: min(100% - 28px, 1180px);
    padding-top: 2.75rem;
  }

  .resume-page-entry-head,
  .resume-page-project-head,
  .resume-page-cta {
    display: block;
  }

  .resume-page-entry time,
  .resume-page-project-head > span {
    display: inline-block;
    margin-top: 0.65rem;
  }

  .resume-page-cta > a {
    display: inline-block;
    margin-top: 1.5rem;
  }
}

.timeline-row {
  border-top: 1px solid var(--zwd-line);
  padding-block: 1.6rem;
}

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

.project-single {
  max-width: 900px;
  margin-inline: auto;
  padding-block: clamp(4rem, 8vw, 8rem);
}

.project-single__meta {
  margin-bottom: 1rem;
  color: var(--zwd-muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-single .wp-block-post-title {
  margin-bottom: 0.35em;
  font-size: clamp(2.8rem, 5.5vw, 4rem);
  letter-spacing: -0.06em;
  line-height: 1;
  white-space: nowrap;
}

.project-single .wp-block-post-excerpt {
  color: var(--zwd-muted);
  font-size: 1.2rem;
}

.project-single .wp-block-post-content h2 {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--zwd-line);
}

.project-single__back {
  display: inline-block;
  margin-top: 4rem;
}

.contact-form {
  max-width: 860px;
}

.contact-page {
  width: min(980px, calc(100% - 40px));
  margin-inline: auto;
  padding: clamp(4rem, 9vw, 8rem) 0 clamp(4rem, 8vw, 7rem);
}

.contact-page-hero {
  max-width: 680px;
  margin: 0 auto clamp(3rem, 6vw, 5rem);
  text-align: center;
}

.contact-page-kicker {
  margin: 0 0 0.9rem;
  color: var(--zwd-muted);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.contact-page-hero h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(3rem, 6vw, 5rem);
  letter-spacing: -0.06em;
  line-height: 1;
}

.contact-page-hero p:last-child {
  margin: 0;
  color: var(--zwd-muted);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
}

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

.contact-page-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  min-height: 112px;
  border-bottom: 1px solid var(--zwd-line);
  padding: 1.4rem 0;
  color: var(--zwd-ink);
  text-decoration: none;
}

a.contact-page-item {
  transition: padding 180ms ease, background-color 180ms ease;
}

a.contact-page-item:hover {
  padding-inline: 1rem;
  background: #f2f2ef;
}

.contact-page-index {
  color: var(--zwd-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.contact-page-item p {
  margin: 0 0 0.25rem;
  color: var(--zwd-muted);
  font-size: 0.78rem;
}

.contact-page-item strong {
  overflow-wrap: anywhere;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  letter-spacing: -0.025em;
}

.contact-page-action {
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.contact-page-note {
  max-width: 620px;
  margin: 1.5rem 0 0;
  color: var(--zwd-muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

@media (max-width: 560px) {
  .contact-page {
    width: min(100% - 28px, 980px);
    padding-top: 3rem;
  }

  .contact-page-item {
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 96px;
  }

  .contact-page-action {
    display: none;
  }
}

.contact-form label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.85rem;
  font-weight: 650;
}

.contact-form input:not([type="checkbox"]),
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--zwd-line);
  border-radius: 0;
  background: var(--zwd-white);
  padding: 0.85rem 1rem;
  color: var(--zwd-ink);
  font: inherit;
}

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

.contact-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.contact-form input[type="submit"] {
  width: auto;
  min-width: 160px;
  border: 1px solid var(--zwd-ink);
  border-radius: 0;
  background: var(--zwd-ink);
  padding: 0.8rem 1.4rem;
  color: var(--zwd-paper);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}

.site-footer {
  border-top: 1px solid var(--zwd-line);
  color: var(--zwd-muted);
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .project-single .wp-block-post-title {
    white-space: normal;
  }

  .capability-grid,
  .topic-grid,
  .value-grid,
  .transition-flow {
    flex-wrap: wrap !important;
  }

  .capability-grid > .wp-block-column,
  .topic-grid > .wp-block-column,
  .value-grid > .wp-block-column,
  .transition-flow > .wp-block-column {
    flex-basis: 50% !important;
  }

  .capability-grid > .wp-block-column:nth-child(odd),
  .topic-grid > .wp-block-column:nth-child(odd),
  .value-grid > .wp-block-column:nth-child(odd) {
    border-left: 0;
  }

  .transition-flow > .wp-block-column:nth-child(2)::after {
    display: none;
  }
}

@media (max-width: 720px) {
  .site-header__inner {
    min-height: 64px;
  }

  .site-header .wp-block-navigation__responsive-container.is-menu-open {
    background: var(--zwd-paper);
    color: var(--zwd-ink);
  }

  .hero {
    min-height: auto;
  }

  .hero__name {
    font-size: clamp(3.4rem, 19vw, 5.5rem);
  }

  .hero__role {
    font-size: clamp(2rem, 11vw, 3.5rem);
  }

  .featured-projects,
  .project-card-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 320px;
  }

  .capability-grid > .wp-block-column,
  .topic-grid > .wp-block-column,
  .value-grid > .wp-block-column,
  .transition-flow > .wp-block-column {
    flex-basis: 100% !important;
    border-left: 0;
    border-top: 1px solid var(--zwd-line);
  }

  .capability-grid > .wp-block-column:first-child,
  .topic-grid > .wp-block-column:first-child,
  .value-grid > .wp-block-column:first-child {
    border-top: 0;
  }

  .transition-flow > .wp-block-column::after {
    display: none;
  }

  .contact-form__row {
    grid-template-columns: 1fr;
  }

  .site-footer__inner {
    align-items: flex-start !important;
    flex-direction: column;
    padding-block: 1.5rem;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
