/* Let There Be — say it, and it exists.
   The joke is that these apps are spoken into being: described to AI, which writes the code.
   So the page looks like a quiet terminal: neutral surfaces, one lime accent, a blinking caret. */

:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --bg-2: #121214;
  --bg-3: #19191c;
  --text: #ededec;
  --muted: #a1a1a6;
  --faint: #63636a;
  --line: rgba(237, 237, 236, .09);
  --line-strong: rgba(237, 237, 236, .16);
  --dot: rgba(237, 237, 236, .11);
  --lime: #c4f04d;
  --accent: #c4f04d;
  --accent-soft: rgba(196, 240, 77, .1);
  --btn-bg: #ededec;
  --btn-ink: #0a0a0b;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);

  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, "PingFang SC", "Microsoft YaHei", monospace;
  --maxw: 1160px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #fafaf9;
    --bg-2: #ffffff;
    --bg-3: #f2f2f0;
    --text: #18181b;
    --muted: #5f5f66;
    --faint: #9a9aa1;
    --line: rgba(24, 24, 27, .09);
    --line-strong: rgba(24, 24, 27, .18);
    --dot: rgba(24, 24, 27, .12);
    --accent: #4a7a00;
    --accent-soft: rgba(110, 170, 0, .12);
    --btn-bg: #18181b;
    --btn-ink: #fafaf9;
    --shadow: 0 30px 70px -34px rgba(24, 24, 27, .35);
  }
}

html:lang(zh-Hant) {
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, "PingFang TC", "Microsoft JhengHei", monospace;
}
html:lang(ja) {
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans CJK JP", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Hiragino Sans", "Yu Gothic", monospace;
}
html:lang(ko) {
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Apple SD Gothic Neo", "Malgun Gothic", monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
img { display: block; }
h1, h2, h3, p, pre { margin: 0; }
h1, h2 { font-weight: 600; letter-spacing: -0.035em; line-height: 1.04; }
html:lang(zh-Hans) h1, html:lang(zh-Hans) h2,
html:lang(zh-Hant) h1, html:lang(zh-Hant) h2,
html:lang(ja) h1, html:lang(ja) h2,
html:lang(ko) h1, html:lang(ko) h2 { letter-spacing: 0; line-height: 1.24; }
html:lang(ja) h1, html:lang(ja) h2 { word-break: auto-phrase; }
html:lang(ko) h1, html:lang(ko) h2 { word-break: keep-all; }
::selection { background: var(--lime); color: #0a0a0b; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .container {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo img { border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.logo span { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  transition: color .2s;
}
.nav a:hover { color: var(--text); }

.lang { position: relative; }
.lang summary {
  display: flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  cursor: pointer;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
  user-select: none;
  transition: color .2s, border-color .2s;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { color: var(--text); border-color: var(--line-strong); }
.lang ul {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 172px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.lang li a {
  display: block;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 14px;
  text-decoration: none;
  color: var(--muted);
}
.lang li a:hover { background: var(--bg-3); color: var(--text); }
.lang li a[aria-current] { color: var(--accent); }

/* ---------- dotted backdrop ---------- */

.grid-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 30%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 80% at 70% 30%, #000 20%, transparent 75%);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  padding: 96px 0 104px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}
.chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.hero h1 {
  margin-top: 24px;
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  text-wrap: balance;
}
html:lang(zh-Hans) .hero h1, html:lang(zh-Hant) .hero h1,
html:lang(ja) .hero h1, html:lang(ko) .hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); }
.hero .lead { margin-top: 22px; }

.lead {
  max-width: 34em;
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  color: var(--muted);
  text-wrap: pretty;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: transform .15s, background .2s, border-color .2s;
}
.btn:hover { background: var(--bg-3); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--btn-bg);
  color: var(--btn-ink);
  border-color: transparent;
}
.btn.primary:hover { background: color-mix(in srgb, var(--btn-bg) 86%, var(--bg)); }
.btn.disabled { color: var(--muted); cursor: default; border-style: dashed; }
.btn.disabled:hover { background: none; }
.btn.disabled:active { transform: none; }

/* ---------- the terminal ---------- */

/* stays dark in both themes, like a real terminal window */
.term {
  --bg-2: #121214;
  --bg-3: #19191c;
  --text: #ededec;
  --muted: #a1a1a6;
  --faint: #63636a;
  --line: rgba(237, 237, 236, .09);
  --line-strong: rgba(237, 237, 236, .16);
  --accent: #c4f04d;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--bg-2);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 15px;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-3);
}
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.term-bar span { margin-left: auto; margin-right: auto; padding-right: 51px; font-size: 12px; color: var(--faint); }
.term-body { padding: 26px 24px 30px; min-height: 9.2em; }
.term-line { font-size: clamp(1.05rem, 1.7vw, 1.3rem); line-height: 1.5; }
.term-arg { color: var(--accent); }
.term-out {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  transition: opacity .3s, transform .3s;
}
.term-out.hidden { opacity: 0; transform: translateY(4px); }
.prompt-sign { color: var(--faint); }
.ok { color: var(--accent); }
.err { color: #ff6b6b; }
.dim { color: var(--muted); }
.caret {
  display: inline-block;
  width: .55em;
  height: 1.1em;
  margin-left: 3px;
  vertical-align: -.17em;
  background: var(--lime);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* gentle entrance */
.rise { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.rise-2 { animation-delay: .08s; }
.rise-3 { animation-delay: .16s; }
.rise-4 { animation-delay: .24s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------- sections ---------- */

.section { padding: 64px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.section-head p { color: var(--muted); font-size: 14.5px; text-align: right; }
.count { font-family: var(--mono); font-weight: 400; color: var(--faint); font-size: .95rem; margin-left: 10px; letter-spacing: 0; vertical-align: .35em; }

/* the work index */
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto 28px;
  grid-template-areas: "num main meta arrow";
  align-items: center;
  gap: 24px;
  padding: 24px 12px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  overflow: hidden;
  transition: background .25s;
}
.row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--mx, 30%) var(--my, 50%), var(--accent-soft), transparent 70%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.row:hover::before, .row:focus-visible::before { opacity: 1; }
.row-num {
  grid-area: num;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.row-main { grid-area: main; min-width: 0; }
.row-name {
  display: block;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.row:hover .row-name { transform: translateX(4px); }
.row-tagline { display: block; margin-top: 4px; color: var(--muted); font-size: 15px; }
.row-meta {
  grid-area: meta;
  font-family: var(--mono);
  color: var(--faint);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}
.row-arrow {
  grid-area: arrow;
  justify-self: end;
  color: var(--faint);
  font-size: 17px;
  transition: transform .3s, color .3s;
}
.row:hover .row-arrow { color: var(--accent); transform: translate(3px, -3px); }

/* still taking shape */
.wip-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.wip-item {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
}
.wip-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wip-name { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.wip-item p { color: var(--muted); margin-top: 6px; font-size: 15px; }
.wip-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.wip-item .row-meta { text-align: left; }
.wip-link {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 7px;
  transition: background .2s;
}
.wip-link:hover { background: var(--accent-soft); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-soft);
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1.6s steps(1) infinite;
}

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 56px;
  margin-top: 36px;
  align-items: start;
}
.statement { font-size: clamp(1.12rem, 1.7vw, 1.3rem); line-height: 1.7; text-wrap: pretty; }
.contact { margin-top: 24px; color: var(--muted); }
.contact strong { color: var(--text); font-weight: 500; margin-right: 8px; }

.origin {
  padding: 30px 30px 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-2);
}
.origin-label { font-family: var(--mono); font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.origin-term {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--bg-3);
  font-family: var(--mono);
  font-size: 14.5px;
  line-height: 1.8;
  white-space: pre-wrap;
}
.origin-body { margin-top: 20px; color: var(--muted); font-size: 15.5px; line-height: 1.8; }

/* ---------- product page ---------- */

.product-hero {
  position: relative;
  isolation: isolate;
  padding: 36px 0 64px;
}
.back {
  display: inline-flex;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color .2s;
}
.back:hover { color: var(--text); }
.product-index {
  margin-top: 64px;
  font-family: var(--mono);
  color: var(--faint);
  font-size: 12.5px;
}
.product-index b { font-weight: 500; color: var(--accent); margin-right: 4px; }
.product-cmd {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
}
.product-hero h1 { margin-top: 10px; font-size: clamp(2.6rem, 7vw, 5.2rem); max-width: 12em; }
.product-hero .lead { margin-top: 16px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 36px; }
.note { color: var(--faint); font-size: 14px; }

.product-body { padding-bottom: 24px; }
.film { margin-bottom: 56px; scroll-margin-top: 88px; }
.film video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: #000;
  box-shadow: var(--shadow);
}
.film video::cue { font-family: var(--sans); background: rgba(0, 0, 0, .6); }
.prose {
  max-width: 40em;
  display: grid;
  gap: 18px;
  font-size: clamp(1.08rem, 1.5vw, 1.2rem);
  line-height: 1.8;
  padding-top: 8px;
}
.product-body > section + section { margin-top: 80px; }
.features {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.features li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
}
.feature-num { font-family: var(--mono); color: var(--accent); font-size: 13px; line-height: 1.95; }
.features h3 { font-size: 16.5px; font-weight: 600; line-height: 1.5; letter-spacing: -0.01em; }
.features p { color: var(--muted); font-size: 15px; margin-top: 4px; }
.spec { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spec dt { font-family: var(--mono); color: var(--faint); font-size: 13px; }
.spec dd { margin: 0; }

/* ---------- footer & 404 ---------- */

.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: 64px;
  padding: 0 0 32px;
  border-top: 1px solid var(--line);
}
.footer-mark {
  margin: 40px 0 28px;
  font-size: clamp(3.4rem, 12.5vw, 10rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1;
  white-space: nowrap;
  color: transparent;
  background: linear-gradient(180deg, color-mix(in srgb, var(--text) 26%, transparent), transparent 92%);
  -webkit-background-clip: text;
          background-clip: text;
  user-select: none;
}
.footer-mark .caret { opacity: .5; vertical-align: -.08em; height: .82em; width: .42em; margin-left: .06em; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--mono);
  color: var(--faint);
  font-size: 12.5px;
}
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: var(--text); }

.notfound { position: relative; isolation: isolate; min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; padding: 64px 24px; }
.notfound .origin-term { text-align: left; border: 1px solid var(--line); }
.notfound h1 { font-size: clamp(3rem, 8vw, 5rem); margin-top: 28px; }
.notfound .lead { margin: 20px auto 0; line-height: 2.1; }
.notfound a { color: var(--accent); text-decoration: none; }

/* ---------- small screens ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .grid-bg {
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 60%, #000 15%, transparent 75%);
            mask-image: radial-gradient(ellipse 90% 70% at 50% 60%, #000 15%, transparent 75%);
  }
}

@media (max-width: 760px) {
  .container { padding: 0 20px; }
  .site-header .container { gap: 12px; height: 58px; }
  .nav { display: none; }
  .lang { margin-left: auto; }
  .hero { padding: 56px 0 64px; }
  .term { font-size: 14px; }
  .term-body { padding: 20px 18px 24px; min-height: 8.6em; }
  .section { padding: 48px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .section-head p { text-align: left; }
  .row {
    grid-template-columns: 30px minmax(0, 1fr) 18px;
    grid-template-areas: "num main arrow" ". meta .";
    gap: 8px 12px;
    padding: 20px 0;
  }
  .row-num { align-self: start; padding-top: 7px; }
  .row-meta { text-align: left; }
  .row:hover .row-name { transform: none; }
  .wip-list, .features { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; margin-top: 28px; }
  .origin { padding: 24px 20px 26px; }
  .product-index { margin-top: 44px; }
  .spec { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 380px) {
  .container { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
