:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --bg-2: #121214;
  --fg: #f3f1ec;
  --muted: #8d8a83;
  --faint: #55534f;
  --line: rgba(243, 241, 236, .09);
  --glow: 214 228 255;
  --warm: 255 214 170;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", "PingFang TC", "Noto Sans TC", sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Times New Roman", "Songti TC", serif;
  --pad: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --mx: 50%;
  --my: 40%;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 17px/1.6 var(--sans); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::after { /* film grain */
  content: ""; position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .045;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid rgb(var(--glow)); outline-offset: 4px; border-radius: 4px; }
::selection { background: rgb(var(--glow) / .3); }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; padding: 0; }
.zh { color: var(--muted); }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 200; padding: 10px 16px; background: var(--fg); color: var(--bg); border-radius: 999px; }
.skip:focus { top: 16px; }

/* Navigation */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad); padding-top: max(18px, env(safe-area-inset-top));
  transition: background .4s, border-color .4s, backdrop-filter .4s; border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgb(10 10 11 / .72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-color: var(--line); }
.nav-mark { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.02em; }
.nav-mark svg { width: 22px; height: 22px; }
.nav nav { display: flex; gap: clamp(16px, 3vw, 36px); font-size: 14px; color: var(--muted); }
.nav nav a { transition: color .25s; padding: 6px 0; }
.nav nav a:hover { color: var(--fg); }

/* Hero */
.hero {
  position: relative; min-height: 100svh; display: grid; place-content: center; justify-items: center; text-align: center;
  padding: 120px var(--pad) 96px; isolation: isolate; overflow: hidden;
}
.hero-light {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(38vmax 38vmax at var(--mx) var(--my), rgb(var(--glow) / .16), transparent 62%),
    radial-gradient(30vmax 26vmax at 70% 78%, rgb(var(--warm) / .07), transparent 70%);
  transition: background .2s linear;
}
.hero-rings {
  position: absolute; z-index: -1; width: min(130vmin, 1100px); top: 50%; left: 50%; translate: -50% -50%;
  fill: none; stroke: var(--fg); stroke-width: .6; opacity: .07;
  animation: spin 160s linear infinite;
}
.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: clamp(20px, 3vw, 36px); }
.wordmark {
  font: 500 clamp(64px, 15.5vw, 232px)/.9 var(--sans); letter-spacing: -.055em;
  display: flex; flex-wrap: wrap; justify-content: center;
  animation: focus 2.2s var(--ease) both;
}
.w-telos { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.035em; padding-right: .04em;
  background: linear-gradient(100deg, var(--fg) 30%, rgb(var(--glow)) 60%, var(--fg) 85%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 9s 2.2s ease-in-out infinite; }
.hero-sub { margin-top: clamp(28px, 4vw, 44px); font-size: clamp(19px, 2.2vw, 26px); letter-spacing: -.02em; }
.hero-sub-zh { margin-top: 8px; color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); letter-spacing: .04em; }
.scroll-cue { margin-top: clamp(48px, 8vh, 88px); width: 26px; height: 42px; border: 1px solid var(--faint); border-radius: 999px; display: grid; justify-items: center; padding-top: 8px; }
.scroll-cue span { width: 3px; height: 8px; border-radius: 3px; background: var(--fg); animation: cue 2.4s var(--ease) infinite; }

@keyframes focus {
  from { filter: blur(28px); opacity: 0; letter-spacing: .08em; transform: scale(1.04); }
  60% { opacity: 1; }
  to { filter: blur(0); opacity: 1; letter-spacing: -.055em; transform: none; }
}
@keyframes sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* Shared section */
section:not(.hero) { padding: clamp(96px, 14vw, 180px) var(--pad) 0; max-width: 1280px; margin: 0 auto; }
.label { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 24px; }
.section-head h2, .contact h2 { font-size: clamp(38px, 6.2vw, 84px); line-height: 1.02; letter-spacing: -.045em; font-weight: 500; }
.section-head .zh { margin-top: 18px; font-size: 17px; }
.section-head { margin-bottom: clamp(48px, 7vw, 88px); }

/* Work */
.feature { border-radius: 28px; background: linear-gradient(160deg, #18181b, #0f0f11 60%); border: 1px solid var(--line); overflow: hidden; position: relative; }
.feature::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(60% 80% at 85% 20%, rgb(var(--warm) / .10), transparent 70%); }
.feature-link { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 520px; }
.feature-copy { padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; position: relative; z-index: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: auto; }
.tags span { font-size: 12px; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.feature h3 { font-size: clamp(36px, 4.6vw, 60px); line-height: 1; letter-spacing: -.04em; font-weight: 500; margin-top: 48px; }
.feature-zh { font-size: 18px; color: var(--muted); letter-spacing: .1em; }
.feature-text { max-width: 44ch; color: #c9c6bf; }
.feature-text.zh { color: var(--muted); font-size: 15px; }
.feature-cta { margin-top: 16px; align-self: flex-start; display: inline-flex; gap: 10px; align-items: center; padding: 13px 22px; border-radius: 999px; background: var(--fg); color: var(--bg); font-weight: 600; font-size: 15px; transition: transform .4s var(--ease), box-shadow .4s; }
.feature-cta span { transition: transform .4s var(--ease); }
.feature-link:hover .feature-cta { box-shadow: 0 10px 40px rgb(var(--warm) / .25); }
.feature-link:hover .feature-cta span { transform: translateX(4px); }

.feature-art { position: relative; display: grid; place-items: center; min-height: 380px; perspective: 1200px; }
.press-sheet {
  width: min(78%, 360px); aspect-ratio: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 18px;
  background: #f5efe3; border-radius: 6px; box-shadow: 0 40px 80px rgb(0 0 0 / .55), 0 2px 0 rgb(255 255 255 / .4) inset;
  transform: rotateX(18deg) rotateZ(-8deg); transition: transform 1s var(--ease);
}
.feature-link:hover .press-sheet { transform: rotateX(8deg) rotateZ(-3deg) translateY(-6px); }
.press-sheet i { border-radius: 2px; background: #ebe3d3; position: relative; overflow: hidden; }
.press-sheet i::before, .press-sheet i::after { content: ""; position: absolute; inset: 0; opacity: 0; mix-blend-mode: multiply; }
.press-sheet i::before { background: #d9472f; }
.press-sheet i::after { background: #1f6fb5; }
/* red row 3 and blue column 3 print in; overlap darkens */
.press-sheet i:nth-child(n+11):nth-child(-n+15)::before { animation: ink 6s var(--ease) infinite; }
.press-sheet i:nth-child(5n+3)::after { animation: ink 6s 1.2s var(--ease) infinite; }
.press-sheet i:nth-child(13)::after { background: #6a3b86; mix-blend-mode: normal; }
.press-sheet i:nth-child(11)::before { animation-delay: 0s; } .press-sheet i:nth-child(12)::before { animation-delay: .08s; }
.press-sheet i:nth-child(13)::before { animation-delay: .16s; } .press-sheet i:nth-child(14)::before { animation-delay: .24s; } .press-sheet i:nth-child(15)::before { animation-delay: .32s; }
@keyframes ink { 0%, 8% { opacity: 0; transform: scale(1.4); } 16%, 82% { opacity: .92; transform: none; } 94%, 100% { opacity: 0; } }
.feature-icon { position: absolute; right: clamp(16px, 4vw, 48px); bottom: clamp(16px, 4vw, 48px); width: clamp(72px, 9vw, 112px); height: auto; border-radius: 24%; box-shadow: 0 18px 40px rgb(0 0 0 / .5); }

.upcoming { list-style: none; margin-top: 16px; border-top: 1px solid var(--line); }
.upcoming li { display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 16px; padding: 26px 8px; border-bottom: 1px solid var(--line); color: var(--muted); }
.u-num { font-variant-numeric: tabular-nums; color: var(--faint); }
.u-kind { color: var(--fg); font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -.03em; }
.u-state { font-size: 14px; display: inline-flex; align-items: center; gap: 10px; }
.u-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--warm)); box-shadow: 0 0 12px rgb(var(--warm)); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Meaning */
.entries { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.entry { background: var(--bg); padding: clamp(28px, 4.5vw, 56px); display: grid; gap: 10px; align-content: start; }
.entry dt { display: grid; gap: 8px; margin-bottom: 14px; }
.headword { font: italic 400 clamp(48px, 6.4vw, 88px)/1 var(--serif); letter-spacing: -.03em; }
.pron { font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.entry dd { font-size: clamp(18px, 1.8vw, 22px); letter-spacing: -.015em; }
.entry dd.zh { font-size: 16px; }

.principles { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: clamp(64px, 9vw, 120px); }
.principles li { border-top: 1px solid var(--line); padding-top: 24px; display: grid; gap: 10px; align-content: start; }
.p-num { font: italic 18px var(--serif); color: var(--muted); }
.principles h3 { font-size: 22px; font-weight: 500; letter-spacing: -.025em; }
.principles p { color: #bdbab3; }
.principles p.zh { color: var(--muted); font-size: 15px; }

/* Contact */
.contact { text-align: left; padding-bottom: clamp(80px, 12vw, 160px) !important; }
.contact h2 { font-size: clamp(48px, 9vw, 136px); }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(40px, 6vw, 64px); }
.contact-links a { border: 1px solid var(--line); border-radius: 999px; padding: 12px 20px; font-size: 15px; transition: background .3s, border-color .3s; }
.contact-links a:hover { background: var(--bg-2); border-color: var(--faint); }

.footer { max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding: 28px var(--pad) max(28px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer a:hover { color: var(--fg); }

/* Scroll reveal (only when JS is available) */
.js .reveal { opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; filter: none; }
.js .hero .reveal { transition-delay: .9s; }
.js .hero .hero-sub-zh { transition-delay: 1.05s; }
.js .hero .scroll-cue { transition-delay: 1.3s; }

@media (max-width: 860px) {
  .feature-link { grid-template-columns: 1fr; }
  .feature-art { order: -1; min-height: 320px; padding-top: 24px; }
  .feature h3 { margin-top: 8px; }
  .tags { margin-bottom: 8px; }
  .entries, .principles { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .nav nav { gap: 16px; }
  .nav-mark span { display: none; }
  .upcoming li { grid-template-columns: 44px 1fr; }
  .u-state { grid-column: 2; }
  .footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .press-sheet i:nth-child(n+11):nth-child(-n+15)::before, .press-sheet i:nth-child(5n+3)::after { opacity: .92; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
}
