/* Hallmark · pre-emit critique: P5 H4 E4 S5 R5 V5
 * genre: editorial · macrostructure: Marquee Hero · theme: reference-led black/lime
 * source: haoqi.design · nav: N9 edge-aligned · footer: Ft1 wordmark
 * audience: philosophy / creative work · purpose: read writing · KV: Pamela Tung MYmybO */
@import url('./tokens.css');
* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--color-paper); color: var(--color-ink); font: var(--text-body)/1.8 var(--font-body); -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; }
::selection { background: var(--color-accent); color: var(--color-paper); }
a { color: inherit; text-decoration: none; text-underline-offset: .25em; }
a, button { -webkit-tap-highlight-color: transparent; }
a:hover { color: var(--color-accent); }
a:focus-visible, button:focus-visible, canvas:focus-visible, summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 5px; }
a:active, button:active { opacity: .65; }
button { font: inherit; color: inherit; }
button:disabled, [aria-disabled='true'] { cursor: not-allowed; color: var(--color-muted); }
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { min-width: 0; overflow-wrap: anywhere; font-style: normal; }
.page { max-width: 1800px; margin-inline: auto; padding-inline: var(--page-gutter); }
.home-page .page { max-width: none; min-height: 100svh; padding-inline: 0; display: flex; flex-direction: column; }
.home-page main { flex: 1; }
.home-page .hero { min-height: calc(100svh - 128px); }
.home-page .site-header { position: absolute; inset: 0 var(--page-gutter) auto; z-index: 2; border-bottom: 0; text-shadow: 0 1px 12px #000; }
.home-page .site-footer { width: 100%; padding: .25rem var(--page-gutter) max(.25rem, env(safe-area-inset-bottom)); }
.home-page .work-links { padding: 0 0 1rem; scroll-margin-top: 0; }
.about-section { width: 100%; max-width: 1200px; margin-inline: auto; padding: 48px var(--page-gutter) clamp(3rem, 7vw, 6rem); }
.about-section h2 { margin-bottom: 2rem; color: var(--color-accent); font: 300 32px/1.2 var(--font-display); }
.about-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about-portrait { width: 100%; aspect-ratio: 1; }
.about-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.about-copy { font-size: 1rem; line-height: 2.1; }
.about-copy p + p { margin-top: 1.75rem; }
.about-copy .about-name { font-size: 20px; line-height: 1.6; }
.about-copy .about-name + p { margin-top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; z-index: 5; top: -5rem; padding: .5rem 1rem; background: var(--color-accent); color: var(--color-paper); }
.skip:focus { top: 1rem; color: var(--color-paper); }
.site-header { min-height: 88px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 1.5rem; border-bottom: 1px solid var(--color-rule); }
.home-link { display: flex; align-items: center; gap: .6rem; font: 300 1.05rem/1.3 var(--font-title); letter-spacing: .03em; }
.brand-lockup { position: relative; display: block; width: 240px; max-width: 100%; aspect-ratio: 7716 / 1694; }
.brand-lockup img { position: absolute; display: block; height: auto; }
.brand-symbol { left: 3.93987%; top: 17.4144%; width: 14.6579%; }
.brand-wordmark { left: 20.3992%; top: 11.2161%; width: 76.1900%; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0 clamp(1.5rem, 5vw, 5rem); margin-left: auto; font: .8rem/1.3 var(--font-label); }
.site-header a, .site-footer a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; max-width: 100%; }
.site-header nav a { gap: .7rem; }
[aria-current='page'] { color: var(--color-accent); text-decoration: underline; }
.hero { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 88px var(--page-gutter) 0; position: relative; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgb(0 0 0 / .85), rgb(0 0 0 / .55) 22%, transparent 42%, transparent 62%, rgb(0 0 0 / .75)); }
.hero-meta { display: flex; flex-direction: column; align-self: flex-end; max-width: 100%; gap: 8px; padding-block: 2rem; font-size: .8rem; line-height: 1.8; }
.research-field { font-family: var(--font-label); }
.kv-stage { position: absolute; inset: 0; z-index: -2; display: grid; align-items: center; background: #000; }
.kv-stage::after, .textured-page::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: url('./assets/kv-bubbles.jpg') center / cover no-repeat; opacity: .3; animation: texture-fade 12s ease-in-out infinite alternate; }
@keyframes texture-fade { from { opacity: .3; } to { opacity: .08; } }
.kv-stage::after { z-index: 1; }
.textured-page { isolation: isolate; min-height: 100svh; }
.textured-page::before { position: fixed; z-index: -1; }
#knot { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; opacity: 0; cursor: default; }
#knot:focus-visible { outline-offset: -5px; }
.is-rendered #knot { opacity: 1; }
.hero-baseline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; padding-block: 1.5rem; }
.hero-meta, .hero-baseline { text-shadow: 0 1px 12px #000; }
.hero-identity { min-width: 0; }
.hero-identity h1 { white-space: nowrap; font: 400 clamp(1.5rem, 3.8vw, 3.8rem)/3.05 var(--font-hero); letter-spacing: .03em; color: var(--color-accent); }
/* Glass layers adapted from Avaz Bokiev's Apple Liquid Glass UI (MIT). */
.music-player { position: relative; z-index: 3; flex: 0 1 32rem; width: 32rem; max-width: 100%; text-shadow: none; }
.music-trigger { position: relative; display: block; overflow: hidden; border-radius: .5rem; color: #fff; cursor: pointer; list-style: none; box-shadow: 0 6px 6px rgb(0 0 0 / .2), 0 0 20px rgb(0 0 0 / .1); transition: box-shadow .4s ease; }
.music-trigger::-webkit-details-marker { display: none; }
.music-trigger:hover { box-shadow: 0 8px 24px rgb(0 0 0 / .35), 0 0 20px rgb(255 255 255 / .12); }
.music-glass-filter, .music-glass-overlay, .music-glass-specular { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.music-glass-filter { z-index: 0; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); filter: url(#music-glass-distortion); isolation: isolate; }
.music-glass-overlay { z-index: 1; background: rgb(255 255 255 / .25); }
.music-glass-specular { z-index: 2; box-shadow: inset 1px 1px 0 rgb(255 255 255 / .75), inset 0 0 5px rgb(255 255 255 / .75); }
.music-content { position: relative; z-index: 3; display: flex; align-items: center; gap: 1rem; padding: .75rem 1.5rem .75rem .75rem; }
.music-cover { display: block; width: 80px; height: 80px; flex: 0 0 auto; object-fit: cover; border-radius: .5rem; }
.music-copy { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.music-title { font-size: 1.1rem; line-height: 1.5; white-space: nowrap; }
.music-service { font-size: .875rem; line-height: 1.5; color: rgb(255 255 255 / .7); }
.music-open-icon { flex: 0 0 auto; margin-left: auto; }
.music-filter-defs { position: absolute; overflow: hidden; pointer-events: none; }
.music-panel { position: fixed; z-index: 4; right: var(--page-gutter); bottom: max(2rem, env(safe-area-inset-bottom)); width: min(660px, calc(100vw - var(--page-gutter) * 2)); max-height: calc(100svh - 104px - max(2rem, env(safe-area-inset-bottom))); padding: .75rem; overflow-y: auto; overscroll-behavior: contain; border: 1px solid rgb(255 255 255 / .3); border-radius: 1.5rem; background: rgb(18 22 18 / .9); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: 0 18px 60px rgb(0 0 0 / .5); }
.music-panel-toolbar { position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; background: #121612; }
.music-close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.75rem; line-height: 1; cursor: pointer; }
.music-frame { display: block; width: 100%; max-width: 660px; height: 450px; border: 0; border-radius: .75rem; background: transparent; }
.music-external { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding-inline: .5rem; font-size: .75rem; }
.manifesto { padding-block: clamp(5rem, 10vw, 10rem); display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; border-top: 1px solid var(--color-rule); scroll-margin-top: 2rem; }
.section-label { font: .7rem/1.7 var(--font-label); color: var(--color-muted); text-transform: uppercase; letter-spacing: .06em; }
.manifesto p { max-width: 27em; font-size: clamp(1.25rem, 2.4vw, 2.4rem); line-height: 1.9; letter-spacing: -.025em; }
.work-links { padding-bottom: 6rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-bottom: 2rem; }
.section-heading h2 { font: 300 2rem/1.1 var(--font-display); color: var(--color-accent); }
.work-link-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.work-link-grid a { display: flex; align-items: center; justify-content: center; border-radius: 12px; background: rgb(11 13 11 / .72); transition: background var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); min-width: 0; min-height: clamp(72px, 11svh, 112px); padding: clamp(.75rem, 2vw, 1.5rem); text-shadow: 0 1px 12px #000; }
.work-link-grid a:hover { background: rgb(192 254 4 / .16); }
.work-type { font: 300 32px/1.2 var(--font-display); letter-spacing: -.04em; }
.site-footer { padding-block: 1.5rem; text-align: center; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem 1.5rem; font: .7rem/1.8 var(--font-label); color: var(--color-muted); }
.footer-signature { color: var(--color-accent); }
.works-main { min-height: 75svh; }
[data-protected-content], [data-protected-content] * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
[data-protected-content] img { -webkit-user-drag: none; }
.works-heading { padding-block: clamp(3rem, 7vw, 6rem) clamp(4rem, 8vw, 8rem); }
.works-heading h1 { font: 300 var(--text-title)/1.05 var(--font-display); letter-spacing: -.065em; margin-top: 1rem; }
.heading-period { color: var(--color-accent); }
.works-heading p { color: var(--color-muted); font-size: var(--text-small); margin-top: 1.5rem; }
.category-heading { padding-block: clamp(2rem, 5vw, 4rem) 2rem; }
.category-heading h1 { margin-top: 0; font-size: 32px; line-height: 1.2; letter-spacing: -.04em; color: var(--color-accent); }
.category-content { margin-bottom: clamp(4rem, 8vw, 7rem); }
.research-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-rule); }
.research-list h2 { font: inherit; }
.collection { scroll-margin-top: 3rem; margin-bottom: clamp(4rem, 8vw, 7rem); }
.collection h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem; font: 300 clamp(1.75rem, 3vw, 2.75rem)/1.4 var(--font-display); color: var(--color-accent); border-bottom: 1px solid var(--color-rule); padding-bottom: 1rem; }
.collection h2 span { font: .8rem/1.8 var(--font-body); color: var(--color-muted); }
.empty-state { padding-block: 2.5rem; color: var(--color-muted); font-size: .875rem; }
.paper-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: clamp(1rem, 5vw, 5rem); font-size: 18px; line-height: 1.9; padding-block: 2.5rem; border-bottom: 1px solid var(--color-rule); }
.paper-link > span:first-child { max-width: 35em; text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--color-muted); text-underline-offset: .3em; }
.paper-arrow { color: var(--color-accent); font-size: 1.5em; line-height: 1.3; transition: transform var(--dur-short) var(--ease-out); }
.paper-link:hover .paper-arrow { transform: translate(4px, -4px); }
.illustration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: clamp(1rem, 3vw, 3rem); }
.illustration-grid:empty { display: none; }
.illustration-grid img { width: 100%; height: auto; display: block; }
.illustration-grid figcaption { margin-top: 1rem; font-size: .875rem; }
.privacy-main { max-width: 52rem; }
.privacy-main .works-heading h1 { font-size: clamp(4rem, 10vw, 8rem); }
.privacy-main .collection h2 { margin-bottom: 1.5rem; font-size: 1.25rem; }
.policy-link { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; }
@media (max-width: 64rem) {
  .hero-baseline { flex-direction: column; align-items: stretch; gap: 1.5rem; }
  .music-player { align-self: flex-end; flex-basis: auto; }
}
@media (max-width: 47.99rem) {
  .home-page .hero { min-height: calc(100svh - 112px); }
  .about-section { padding-top: 32px; }
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .about-portrait { max-width: 200px; }
  .site-header { min-height: 80px; gap: 0 .75rem; padding-block: .5rem; }
  .home-link { font-size: .85rem; }
  .brand-lockup { width: 200px; }
  .site-header nav { justify-content: flex-end; gap: .5rem; margin-left: auto; font-size: .7rem; }
  .site-header nav a { gap: .35rem; }
  .hero { padding-top: 80px; }
  .hero-meta { padding-block: 1.5rem; font-size: .65rem; }
  .hero-identity h1 { font-size: clamp(1.125rem, 5.5vw, 2.5rem); }
  .music-content { gap: .75rem; padding: .75rem 1rem .75rem .75rem; }
  .music-cover { width: 56px; height: 56px; }
  .music-title { font-size: 1rem; }
  .music-service { font-size: .75rem; }
  .music-panel { max-height: calc(100svh - 120px - max(2rem, env(safe-area-inset-bottom))); }
  .music-frame { height: clamp(300px, calc(100svh - 266px), 450px); }
  .manifesto { grid-template-columns: 1fr; gap: 2rem; padding-block: 4.5rem; }
  .work-links { padding-bottom: 4rem; }
  .work-link-grid a { min-height: 64px; padding: 1rem .5rem; }
  .work-type { font-size: clamp(.75rem, 3.7vw, 1.5rem); }
  .illustration-grid { grid-template-columns: 1fr; }
  .footer-signature { display: none; }
  .paper-link { font-size: 14px; padding-block: 2rem; }
}
@media (max-width: 22rem) {
  .site-header { gap: 0 .5rem; }
  .site-header nav { font-size: .65rem; }
  .home-link { font-size: .78rem; gap: .3rem; }
}
@media (max-width: 47.99rem) and (max-height: 650px) {
  .hero-meta { padding-block: 1rem; }
  .hero-baseline { gap: 1rem; padding-block: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.writing-feed { max-width: 48rem; margin-inline: auto; display: grid; gap: 32px; }
.writing-post { padding: clamp(1.5rem, 4vw, 3rem); border-radius: 16px; background: #121612; }
.writing-date { display: block; color: var(--color-muted); font: .75rem/1.5 var(--font-label); margin-bottom: 1rem; }
.writing-post h2 { font: 500 clamp(1.25rem, 2vw, 1.5rem)/1.7 var(--font-body); }
.writing-excerpt { margin-top: 1.5rem; font-size: 1rem; line-height: 2.1; }
.writing-more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 1rem; color: var(--color-accent); font-size: .875rem; }
.post-main { max-width: 48rem; margin-inline: auto; padding-block: clamp(2.5rem, 6vw, 5rem); }
.post-heading { margin-bottom: 3rem; }
.post-heading h1 { font: 500 32px/1.6 var(--font-body); }
.post-body { font-size: 1rem; line-height: 2.2; }
.post-body p + p, .post-body blockquote + p { margin-top: 1.75rem; }
.post-body blockquote { margin: 2rem 0; padding: 1.5rem; background: #151b14; border-radius: 8px; }
.post-actions { margin-top: 3rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; }
.post-actions a { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-accent); font-size: .875rem; }

/* Language links remain native links, including when JavaScript is unavailable. */
.site-header .language-switcher { order: 1; flex-wrap: nowrap; gap: 8px; margin-left: auto; }
.site-header > nav:not(.language-switcher) { order: 2; margin-left: 0; }
.language-switcher a { justify-content: center; padding-inline: 8px; font: 400 13px/1.4 system-ui, sans-serif; border-radius: 6px; white-space: nowrap; }
.language-switcher a[aria-current='true'] { color: var(--color-accent); background: rgb(0 0 0 / .5); text-decoration: underline; text-underline-offset: 5px; }
.language-switcher a:hover { background: rgb(0 0 0 / .35); }
html:lang(ko) body { font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif; word-break: keep-all; overflow-wrap: anywhere; }
html:lang(ko) .work-type, html:lang(ko) .category-heading h1, html:lang(ko) .about-section h2 { font-family: inherit; font-weight: 300; }
.translation-notice { color: var(--color-muted); font-size: 14px; }
@media (max-width: 47.99rem) {
  .site-header .language-switcher { order: 3; flex: 0 0 100%; justify-content: flex-end; }
  .home-page .hero { padding-top: 124px; }
  .site-header .language-switcher a { min-height: 44px; }
  .site-header > nav:not(.language-switcher) { margin-left: auto; }
}
