/* CJ Huang — site styles. Black, white, starlight blue. */
:root {
  --bg: #000; --fg: #fff; --text: #D4D4D4; --soft: #BDBDBD; --muted: #9A9A9A; --dim: #8A8A8A; --faint: #6E6E6E;
  --line: #1F1F1F; --accent: #9DB8FF;
  --sans: 'Inter', 'Noto Sans TC', system-ui, sans-serif;
  --wrap: 1360px; --pad: 40px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-weight: 300; -webkit-font-smoothing: antialiased; }
a { color: var(--fg); }
a:hover { color: var(--soft); }
h1, h2, h3, p { margin: 0; font-weight: 300; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }
.eyebrow { font-size: 12px; font-weight: 400; letter-spacing: .32em; color: var(--accent); text-transform: uppercase; }
.caps { font-size: 11px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .faint { color: var(--faint); } .soft { color: var(--soft); } .accent { color: var(--accent); }

/* header */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 3; }
.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 22px; }
.brand { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; font-size: 15px; font-weight: 600; letter-spacing: .42em; }
.nav-links { display: flex; flex-wrap: wrap; gap: 4px; }
.nav-links a { min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; text-decoration: none; font-size: 12px; font-weight: 500; letter-spacing: .16em; border-bottom: 1px solid transparent; }
.nav-links a[aria-current="page"] { border-bottom-color: var(--fg); }

/* hero */
.hero { position: relative; overflow: hidden; min-height: 600px; display: flex; align-items: flex-end; }
.hero.home { min-height: max(860px, 100vh); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero .fade { position: absolute; left: 0; right: 0; bottom: 0; height: 60%; background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.9)); pointer-events: none; }
.hero-content { position: relative; width: 100%; padding-top: 200px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 24px; }
.hero.home .hero-content { padding-bottom: 96px; gap: 28px; }
.hero h1 { font-size: clamp(56px, 8.5vw, 124px); line-height: .94; letter-spacing: -.045em; }
.hero.home h1 { font-size: clamp(64px, 11vw, 168px); line-height: .92; }
.hero .lead { max-width: 600px; font-size: 19px; line-height: 1.6; color: var(--text); }
.hero.home .lead { font-size: 20px; max-width: 560px; }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn { min-height: 52px; min-width: 200px; padding: 0 28px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font: 600 12px var(--sans); letter-spacing: .2em; border: 1.5px solid var(--fg); color: var(--fg); background: transparent; cursor: pointer; transition: background .2s, color .2s; }
.btn:hover { background: var(--fg); color: #000; }
.btn-white { background: var(--fg); color: #000; }
.btn-white:hover { background: transparent; color: var(--fg); }

/* sections */
.section { border-top: 1px solid var(--line); }
.section > .wrap { padding-block: 120px; display: flex; flex-direction: column; gap: 48px; }
.section.tight > .wrap { padding-top: 40px; border: 0; }
.section.tight { border-top: 0; }
h2.big { font-size: clamp(36px, 4.4vw, 60px); line-height: 1.02; letter-spacing: -.035em; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { border-top: 1px solid var(--line); }
.row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 48px; padding: 36px 0; text-decoration: none; }
a.row:hover .row-title { color: var(--accent); }
.row-title { font-size: clamp(24px, 2.6vw, 36px); line-height: 1.12; letter-spacing: -.025em; transition: color .2s; }
.row-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.row-side { flex: 1 1 160px; display: flex; flex-direction: column; gap: 8px; }
.row-lead { flex: 0 0 140px; }
.row p { font-size: 16px; line-height: 1.6; color: var(--soft); max-width: 680px; }
.cols { display: grid; gap: 48px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.cols.four { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 40px; }
.col { display: flex; flex-direction: column; gap: 16px; padding-top: 24px; border-top: 1px solid var(--fg); }
.col h3 { font-size: 28px; letter-spacing: -.02em; }
.col p { font-size: 16px; line-height: 1.65; color: var(--soft); }

/* home */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.fact { padding: 48px 0; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.fact b { font-size: 44px; font-weight: 300; letter-spacing: -.03em; }
.panel { border-bottom: 1px solid var(--line); min-height: 620px; display: flex; align-items: flex-end; }
.panel .wrap { width: 100%; padding-block: 120px 88px; display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: flex-end; justify-content: space-between; }
.panel-main { flex: 999 1 620px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.panel h2 { font-size: clamp(44px, 6vw, 88px); line-height: .98; letter-spacing: -.04em; }
.panel p { max-width: 560px; font-size: 18px; line-height: 1.6; color: var(--soft); }
.panel-side { flex: 1 1 280px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.panel-side span { font-size: 13px; line-height: 1.7; color: var(--muted); letter-spacing: .04em; }
.stack li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 40px; padding: 26px 0; border-top: 1px solid var(--line); }
.stack .n { flex: 0 0 48px; font-size: 13px; color: var(--faint); letter-spacing: .1em; }
.stack .name { flex: 1 1 420px; font-size: clamp(26px, 3vw, 40px); letter-spacing: -.02em; }
.stack .tools { font-size: 13px; color: var(--muted); letter-spacing: .06em; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 64px; }
.split > div { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.split h2 { font-size: 40px; line-height: 1.12; letter-spacing: -.02em; }

/* about */
.profile { display: flex; flex-wrap: wrap; gap: 48px 80px; align-items: flex-start; }
.photo { flex: 0 0 300px; max-width: 100%; height: 380px; border: 1px solid #2A2A2A; display: grid; place-items: center; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.profile-text .statement { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.4; letter-spacing: -.01em; }
.profile-text p { font-size: 17px; line-height: 1.7; color: var(--soft); max-width: 640px; }
.meta { display: flex; flex-wrap: wrap; gap: 28px; color: var(--muted); }
.when { flex: 0 0 140px; font-size: 32px; letter-spacing: -.02em; color: var(--dim); }
.end-cta { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-end; justify-content: space-between; }
.end-cta > div:first-child { flex: 1 1 480px; display: flex; flex-direction: column; gap: 20px; }

/* teaching */
.path { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: baseline; font-size: clamp(20px, 2vw, 28px); letter-spacing: -.01em; }
.path li:not(:last-child)::after { content: "→"; color: var(--accent); margin-left: 22px; }

/* filters */
.filters { display: flex; flex-wrap: wrap; }
.filter { min-height: 44px; padding: 0 2px; margin-right: 22px; background: none; border: 0; border-bottom: 1px solid transparent; cursor: pointer; font: 500 12px var(--sans); letter-spacing: .18em; color: var(--dim); }
.filter[aria-pressed="true"], .filter:has(input:checked) { color: var(--fg); border-bottom-color: var(--fg); }
.filter input { position: absolute; opacity: 0; pointer-events: none; }
.filter:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.filter:hover { color: var(--fg); }
[hidden] { display: none !important; }

/* forms */
label.field { display: flex; flex-direction: column; gap: 10px; flex: 1 1 240px; }
.field input, .field textarea { min-height: 52px; padding: 10px 2px; background: transparent; border: 0; border-bottom: 1px solid #5A5A5A; color: var(--fg); font: 300 20px var(--sans); border-radius: 0; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field textarea { resize: vertical; }
.contact { display: flex; flex-wrap: wrap; gap: 64px 96px; }
.contact > div { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.contact form { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.contact form .btn { align-self: flex-start; }
.links a { min-height: 72px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; text-decoration: none; }
.links a span:first-child { font-size: 24px; letter-spacing: -.01em; }
.links a span:last-child { font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.fields { display: flex; flex-wrap: wrap; gap: 32px; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { margin-bottom: 14px; color: var(--muted); }
.signup .fields { flex: 1 1 460px; align-items: flex-end; gap: 16px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { padding-block: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 11px; letter-spacing: .18em; color: var(--dim); }
.site-footer a { text-decoration: none; color: var(--dim); }
.site-footer a:hover { color: var(--fg); }

@media (max-width: 700px) {
  :root { --pad: 22px; }
  .section > .wrap { padding-block: 80px; gap: 36px; }
  .hero-content { padding-top: 170px; }
  .panel { min-height: 0; }
  .panel .wrap { padding-block: 88px 64px; }
  .btn { min-width: 0; }
  .nav-links a { padding: 0 9px; }
}

/* cosmic scale label, zoom links, cosmic address */
.scale { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; color: var(--muted); margin-top: 4px; }
.scale .here { color: var(--fg); }
.zoom a { display: block; text-decoration: none; }
.zoom .wrap { padding-block: 96px !important; flex-direction: row !important; flex-wrap: wrap; gap: 24px 48px !important; align-items: flex-end; justify-content: space-between; }
.zoom .wrap > div { flex: 999 1 560px; display: flex; flex-direction: column; gap: 18px; }
.zoom-title { font-size: clamp(36px, 5vw, 72px); line-height: 1.02; letter-spacing: -.04em; transition: color .2s; }
.zoom a:hover .zoom-title { color: var(--accent); }
.zoom-go { font-size: 12px; font-weight: 600; letter-spacing: .2em; }
.address-head { display: flex; flex-wrap: wrap; gap: 24px 64px; align-items: flex-end; justify-content: space-between; }
.address-head > div { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.address-head p { max-width: 420px; font-size: 16px; line-height: 1.65; }
.address a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 40px; padding: 22px 0; text-decoration: none; }
.address .n { flex: 0 0 48px; font-size: 13px; letter-spacing: .1em; color: var(--faint); }
.address .name { flex: 1 1 380px; font-size: clamp(22px, 2.4vw, 32px); letter-spacing: -.02em; transition: color .2s; }
.address a:hover .name { color: var(--accent); }
.address .size { flex: 1 1 260px; color: var(--muted); letter-spacing: .12em; font-size: 12px; }
.address .go { flex: 0 0 120px; font-weight: 600; }

/* sound toggle */
.sound { min-height: 44px; margin-left: 10px; padding: 0 14px; display: inline-flex; align-items: center; gap: 10px; background: none; border: 1px solid #3A3A3A; border-radius: 999px; color: var(--muted); font: 500 11px var(--sans); letter-spacing: .16em; cursor: pointer; transition: color .2s, border-color .2s; }
.sound:hover, .sound[aria-pressed="true"] { color: var(--fg); border-color: var(--fg); }
.sound .bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.sound .bars i { display: block; width: 2px; height: 3px; background: currentColor; }
.sound[aria-pressed="true"] .bars i { animation: eq 1.1s ease-in-out infinite; }
.sound[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: -.3s; }
.sound[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: -.6s; }
.sound[aria-pressed="true"] .bars i:nth-child(4) { animation-delay: -.9s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
@media (prefers-reduced-motion: reduce) { .sound[aria-pressed="true"] .bars i { animation: none; height: 8px; } }
