@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/vzen-plex-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #080807;
  --foreground: #f2f1ed;
  --page-x: clamp(1.5rem, 3.35vw, 4rem);
  --page-y: clamp(1.5rem, 3.2vw, 3.5rem);
  background: var(--background);
  color: var(--foreground);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
}

:root[data-theme="light"] {
  color-scheme: light;
  --background: #f2f1ed;
  --foreground: #171717;
}

/* A blocked/disabled script still follows system appearance. Explicit choices win. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --background: #f2f1ed;
    --foreground: #171717;
  }

  :root:not([data-theme]) .wordmark::after {
    opacity: 1;
  }

  :root:not([data-theme]) .wordmark__fallback {
    opacity: 0;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  color: var(--foreground);
}

:root[data-theme-interactive="true"],
:root[data-theme-interactive="true"] body {
  transition:
    background-color 220ms ease,
    color 220ms ease;
}

.home {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  padding:
    max(var(--page-y), env(safe-area-inset-top))
    max(var(--page-x), env(safe-area-inset-right))
    max(var(--page-y), env(safe-area-inset-bottom))
    max(var(--page-x), env(safe-area-inset-left));
}

.wordmark {
  grid-column: 1 / 4;
  grid-row: 1;
  position: relative;
  width: clamp(7rem, 9.2vw, 9.5rem);
  aspect-ratio: 180.773 / 49.826;
  display: block;
}

.wordmark::after {
  position: absolute;
  inset: 0;
  content: "";
  background: url("assets/vzen-dark.svg?v=20261104") center / contain no-repeat;
  opacity: 0;
  pointer-events: none;
}

.wordmark__fallback {
  display: block;
  width: 100%;
  height: auto;
}

:root[data-theme-interactive="true"] .wordmark::after,
:root[data-theme-interactive="true"] .wordmark__fallback {
  transition: opacity 180ms ease;
}

:root[data-theme="light"] .wordmark::after {
  opacity: 1;
}

:root[data-theme="light"] .wordmark__fallback {
  opacity: 0;
}

.theme-toggle {
  grid-column: 12;
  grid-row: 1;
  align-self: start;
  justify-self: end;
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  place-items: center;
  margin: -12px -12px 0 0;
  padding: 0;
  border: 0;
  color: var(--foreground);
  background: transparent;
  opacity: 0.72;
  cursor: pointer;
  appearance: none;
  transition:
    color 220ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.theme-toggle[hidden] {
  display: none;
}

.theme-toggle__icon {
  grid-area: 1 / 1;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.theme-toggle__icon--moon {
  display: none;
}

:root[data-theme="light"] .theme-toggle__icon--moon {
  display: block;
}

:root[data-theme="light"] .theme-toggle__icon--sun {
  display: none;
}

.theme-toggle:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  opacity: 1;
  outline: 1px solid var(--foreground);
  outline-offset: 4px;
}

.claim {
  grid-column: 1 / 12;
  grid-row: 2;
  align-self: end;
  max-width: 17em;
  margin: clamp(4rem, 10vh, 8rem) 0 clamp(5rem, 14vh, 10rem);
  font-size: clamp(3.5rem, 5.25vw, 6.5rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.052em;
  text-wrap: balance;
}

.claim__line {
  display: block;
}

.email-action {
  grid-column: 12;
  grid-row: 3;
  justify-self: end;
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  place-items: center;
  margin: -12px -12px -12px 0;
  color: var(--foreground);
  opacity: 0.72;
  text-decoration: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.email-action svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.email-action:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.email-action:focus-visible {
  opacity: 1;
  outline: 1px solid var(--foreground);
  outline-offset: 4px;
}

@media (max-width: 47.99rem) {
  .home {
    grid-template-columns: 1fr;
  }

  .wordmark,
  .claim,
  .email-action {
    grid-column: 1;
  }

  .theme-toggle {
    grid-column: 1;
  }

  .wordmark {
    width: clamp(6.5rem, 30vw, 7.5rem);
  }

  .claim {
    max-width: 100%;
    margin-bottom: clamp(4.5rem, 13vh, 7rem);
    font-size: clamp(2.6rem, 11.5vw, 4rem);
    line-height: 1.02;
    letter-spacing: -0.048em;
    text-wrap: pretty;
  }

  .claim__line {
    display: inline;
  }

  .claim__line + .claim__line::before {
    content: "";
  }

  .email-action {
    justify-self: end;
  }
}

@media (max-height: 36rem) {
  .claim {
    margin-bottom: clamp(2.5rem, 8vh, 4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root[data-theme-interactive="true"],
  :root[data-theme-interactive="true"] body,
  :root[data-theme-interactive="true"] .wordmark::after,
  :root[data-theme-interactive="true"] .wordmark__fallback,
  .email-action,
  .theme-toggle {
    transition: none;
  }

  .email-action:hover,
  .theme-toggle:hover {
    transform: none;
  }
}

/* The reference layout, with a second compact top-right control. */
[hidden] { display: none !important; }
.page-controls {
  grid-column: 10 / -1;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  display: flex;
  gap: 8px;
  margin: -12px -12px 0 0;
}
.page-controls .theme-toggle { margin: 0; }
.language-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--foreground);
  opacity: .72;
  cursor: pointer;
  appearance: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.language-toggle:hover { opacity: 1; transform: translateY(-1px); }
.language-toggle:focus-visible { opacity: 1; outline: 2px solid var(--foreground); outline-offset: 4px; }
.theme-toggle:focus-visible, .email-action:focus-visible { outline-width: 2px; }
:root:lang(zh) .claim {
  font-family: "Noto Serif SC", serif;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.35;
}
@media (max-width: 47.99rem) {
  .page-controls { grid-column: 1; }
  :root:lang(zh) .claim { font-size: clamp(2.1rem, 8.8vw, 4rem); text-wrap: balance; }
}
@media (prefers-reduced-motion: reduce) {
  .language-toggle { transition: none; }
  .language-toggle:hover { transform: none; }
}

/* Locally hosted Chinese glyph ranges; requested only when Chinese is visible. */
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("assets/vzen-noto-serif-sc-105-400.woff2") format("woff2");
  unicode-range: U+6E5B;
}
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("assets/vzen-noto-serif-sc-108-400.woff2") format("woff2");
  unicode-range: U+6670;
}
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("assets/vzen-noto-serif-sc-112-400.woff2") format("woff2");
  unicode-range: U+67D3;
}
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("assets/vzen-noto-serif-sc-115-400.woff2") format("woff2");
  unicode-range: U+4E14,U+5BCC;
}
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("assets/vzen-noto-serif-sc-116-400.woff2") format("woff2");
  unicode-range: U+50CF,U+5411,U+8FBE;
}
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("assets/vzen-noto-serif-sc-117-400.woff2") format("woff2");
  unicode-range: U+521B,U+5B57,U+5BB9,U+5C06,U+5F71,U+6001,U+611F,U+6E05,U+7CBE,U+8F6C;
}
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("assets/vzen-noto-serif-sc-118-400.woff2") format("woff2");
  unicode-range: U+4E0E,U+4E3A,U+4EEC,U+4F5C,U+5185,U+5236,U+529B,U+52A8,U+5316,U+610F,U+6211,U+6570,U+65B9,U+8868;
}
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("assets/vzen-noto-serif-sc-119-400.woff2") format("woff2");
  unicode-range: U+3001,U+3002,U+6709,U+7684;
}
