:root {
  --ink: #F2F3F5;
  --navy: #1C2B4B;
  --paper: #0F141F;
  --muted: #98A0AB;
  --line: #232936;
  --focus: #8EA6D4;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; }

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding-inline: 28px;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  background: var(--navy);
}

/* Header */
.site-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 28px;
}

.wordmark {
  text-decoration: none;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.wordmark strong { font-weight: 800; }

.wm-8, .wm-inf, .wm-full, .wm-last {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  transition: max-width 0.45s ease, opacity 0.45s ease;
}

.wm-8, .wm-last { max-width: 1em; }

.wm-inf, .wm-full { max-width: 0; opacity: 0; }

.wordmark.open .wm-8, .wordmark.open .wm-last { max-width: 0; opacity: 0; }

.wordmark.open .wm-full { max-width: 5.5em; opacity: 1; }

.wordmark.inf .wm-8 { max-width: 0; opacity: 0; }

.wordmark.inf .wm-inf { max-width: 1em; opacity: 1; }

.lang button {
  background: none;
  border: 0;
  padding: 2px 4px;
  font: inherit;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  cursor: pointer;
}

.lang button[aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.lang-sep { color: var(--line); }

/* Hero — the numeronym, at poster scale */
.hero {
  min-height: calc(100vh - 96px);
  min-height: calc(100svh - 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 48px 72px;
}

.nm {
  font-size: clamp(1.9rem, 9.2vw, 8.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  white-space: nowrap;
}

.nm-anim { display: inline-block; line-height: 1.1; }

.seg {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.1;
  --w: 1.1em;
}

.seg.mid {
  max-width: var(--w);
  animation: fold 0.45s cubic-bezier(0.5, 0, 0.2, 1) forwards;
  animation-delay: calc(0.9s + var(--i) * 0.07s);
}

/* 22s cycle: M8M → Minimalism → M∞M → Minimalism → M8M */
.seg.eight {
  max-width: 0;
  opacity: 0;
  animation:
    unfold 0.5s cubic-bezier(0.5, 0, 0.2, 1) 1.2s forwards,
    eight-cycle 22s ease-in-out 4.2s infinite;
}

.seg.breath {
  max-width: 0;
  opacity: 0;
  --w: 5.6em;
  animation: breathe-in 22s ease-in-out 4.2s infinite;
}

.seg.inf {
  max-width: 0;
  opacity: 0;
  --w: 1.2em;
  animation: inf-cycle 22s ease-in-out 4.2s infinite;
}

.seg.mlast {
  animation: breathe-out 22s ease-in-out 4.2s infinite;
}

@keyframes breathe-in {
  0%, 15% { max-width: 0; opacity: 0; }
  19%, 31% { max-width: var(--w); opacity: 1; }
  35%, 47% { max-width: 0; opacity: 0; }
  51%, 63% { max-width: var(--w); opacity: 1; }
  67%, 100% { max-width: 0; opacity: 0; }
}

@keyframes breathe-out {
  0%, 15% { max-width: var(--w); opacity: 1; }
  19%, 31% { max-width: 0; opacity: 0; }
  35%, 47% { max-width: var(--w); opacity: 1; }
  51%, 63% { max-width: 0; opacity: 0; }
  67%, 100% { max-width: var(--w); opacity: 1; }
}

@keyframes eight-cycle {
  0%, 15% { max-width: var(--w); opacity: 1; }
  19%, 63% { max-width: 0; opacity: 0; }
  67%, 100% { max-width: var(--w); opacity: 1; }
}

@keyframes inf-cycle {
  0%, 31% { max-width: 0; opacity: 0; }
  35%, 47% { max-width: var(--w); opacity: 1; }
  51%, 100% { max-width: 0; opacity: 0; }
}

.seg.labs {
  font-weight: 400;
  max-width: 0;
  opacity: 0;
  --w: 3.6em;
  animation: unfold 0.6s cubic-bezier(0.5, 0, 0.2, 1) forwards;
  animation-delay: 1.4s;
}

@keyframes fold {
  to { max-width: 0; opacity: 0; }
}

@keyframes unfold {
  to { max-width: var(--w); opacity: 1; }
}

.tagline {
  margin-top: 30px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadein 0.6s ease forwards;
  animation-delay: 1.7s;
}

.intro {
  margin-top: 30px;
  max-width: 44ch;
  font-size: 1.125rem;
  text-wrap: balance;
  opacity: 0;
  animation: fadein 0.6s ease forwards;
  animation-delay: 1.9s;
}

@keyframes fadein {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .seg.mid { display: none; }
  .seg.eight, .seg.labs { animation: none; max-width: none; opacity: 1; }
  .seg.breath { animation: none; }
  .seg.inf { animation: none; }
  .seg.mlast { animation: none; }
  .wm-8, .wm-inf, .wm-full, .wm-last { transition: none; }
  .tagline, .intro { animation: none; opacity: 1; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Sections — label rail on the left, content on the right */
.apps, .phil {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: start;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 6px;
}

/* Scroll reveal */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* Apps */
.app-list { list-style: none; padding: 0; }

.app {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 24px;
  align-items: center;
  padding-block: 32px;
  border-top: 1px solid var(--line);
}

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

.app-icon {
  width: 64px;
  height: 64px;
  display: block;
}

.app-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.app-info p {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-top: 2px;
}

.status {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Philosophy */
.phil { padding-block: 128px 144px; }

.phil-p {
  margin-top: 26px;
  max-width: 56ch;
  line-height: 1.8;
  text-wrap: pretty;
}

.lq {
  margin-bottom: 48px;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.la {
  display: block;
  margin-top: 14px;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* Footer */
.site-foot {
  max-width: 1044px;
  width: calc(100% - 56px);
  padding-inline: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-block: 36px 48px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.site-foot a { color: var(--ink); text-underline-offset: 3px; }

.place {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

/* 404 */
.err { padding-block: 120px; }

.err .tagline, .err .intro { animation: none; opacity: 1; }

/* Narrow screens */
@media (max-width: 860px) {
  .apps, .phil { grid-template-columns: 1fr; gap: 0; }
  .eyebrow { margin-bottom: 20px; padding-top: 0; }
  .phil { padding-block: 96px 104px; }
}

@media (max-width: 480px) {
  .app {
    grid-template-columns: 48px 1fr;
    gap: 16px;
    padding-block: 26px;
  }
  .app-icon { width: 48px; height: 48px; }
  .app-info h3 { font-size: 1.0625rem; }
  .status { grid-column: 2; }
}
