:root {
  --zai-canvas: #ffffff;
  --zai-surface: #ffffff;
  --zai-soft: #f5f5f7;
  --zai-soft-strong: #e8e8ed;
  --zai-ink: #1d1d1f;
  --zai-body: #424245;
  --zai-muted: #6e6e73;
  --zai-subtle: #86868b;
  --zai-line: #d2d2d7;
  --zai-red: #ff3b30;
  --zai-red-soft: #ffe5e3;
  --zai-grid-canvas: #f7f7f8;
  --zai-grid-line: rgb(29 29 31 / 4.5%);
  --zai-grid-size: clamp(36px, 4vw, 52px);
  --zai-wide: 1240px;
  --zai-reading: 720px;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--zai-canvas);
  color: var(--zai-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 55vh;
}

a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 160ms ease;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--zai-red);
  outline-offset: 4px;
}

::selection {
  background: var(--zai-red-soft);
  color: var(--zai-ink);
}

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

figure {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

figcaption,
.wp-element-caption {
  margin-top: 0.75rem;
  color: var(--zai-muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

p,
li {
  letter-spacing: 0.005em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: -0.025em;
  text-wrap: balance;
}

hr.wp-block-separator {
  width: 100%;
  border-top: 1px solid var(--zai-line);
  opacity: 1;
}

.wp-site-blocks {
  min-height: 100vh;
}

:where(
  .zai-home-hero,
  .zai-grid-surface,
  .zai-article-header,
  .zai-about-hero,
  .zai-about-panel
) {
  position: relative;
  isolation: isolate;
  background-color: var(--zai-grid-canvas);
}

:where(
  .zai-home-hero,
  .zai-grid-surface,
  .zai-article-header,
  .zai-about-hero,
  .zai-about-panel
)::before,
:where(
  .zai-home-hero,
  .zai-grid-surface,
  .zai-article-header,
  .zai-about-hero,
  .zai-about-panel
)::after {
  position: absolute;
  z-index: 0;
  content: "";
  pointer-events: none;
}

:where(
  .zai-home-hero,
  .zai-grid-surface,
  .zai-article-header,
  .zai-about-hero,
  .zai-about-panel
)::before {
  inset: 0 calc(50% - 50vw) 12%;
  background-color: var(--zai-grid-canvas);
  background-image:
    linear-gradient(var(--zai-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--zai-grid-line) 1px, transparent 1px);
  background-size: var(--zai-grid-size) var(--zai-grid-size);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 46%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 46%, transparent 100%);
}

:where(
  .zai-home-hero,
  .zai-grid-surface,
  .zai-article-header,
  .zai-about-hero,
  .zai-about-panel
)::after {
  top: 0;
  bottom: 30%;
  left: 18%;
  width: 1px;
  background-image: linear-gradient(
    to bottom,
    rgb(255 59 48 / 0%) 6%,
    rgb(255 59 48 / 24%) 28%,
    rgb(255 59 48 / 0%) 100%
  );
}

:where(
  .zai-home-hero,
  .zai-grid-surface,
  .zai-article-header,
  .zai-about-hero,
  .zai-about-panel
) > * {
  position: relative;
  z-index: 1;
}

.wp-block-post-content > p,
.wp-block-post-content > ul,
.wp-block-post-content > ol {
  line-height: 1.95;
}

.wp-block-post-content > h2 {
  margin-top: 3.8rem;
  margin-bottom: 1.3rem;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.wp-block-post-content > h3 {
  margin-top: 2.8rem;
  margin-bottom: 1rem;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.wp-block-post-content strong {
  color: var(--zai-ink);
  font-weight: 650;
}

.wp-block-post-content mark {
  padding: 0 0.08em;
  background: transparent;
  box-shadow: inset 0 -0.32em 0 var(--zai-red-soft);
  color: inherit;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
