@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');

:root { color-scheme: light; --paper: #f3f6f7; --surface: #ffffff; --ink: #171c20; --muted: #59656d; --body-copy: #34424b; --cyan: #33d6ce; --lime: #c9ee78; --blue: #2860e1; --action: #2860e1; --action-hover: #1c47ae; --on-action: #ffffff; --on-accent: #171c20; --band: #2860e1; --on-band: #ffffff; --line: #c8d0d5; --art-line: #171c20; --error: #b02020; --scrim: #171c2099; --rule: 2px solid var(--ink); }
:root[data-theme="dark"] { color-scheme: dark; --paper: #101213; --surface: #1a1e21; --ink: #edf3f5; --muted: #a1adb5; --body-copy: #c0cbd0; --cyan: #45d8ce; --lime: #b8dd72; --blue: #84a6ff; --action: #315ec6; --action-hover: #3d68cc; --band: #182b2b; --on-band: #edf3f5; --line: #3a444a; --error: #ff969b; --scrim: #000000b3; --rule: 2px solid var(--line); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; background: var(--paper); }
body { display: block; width: min(1440px, calc(100% - 64px)); height: auto; min-height: 0; margin: 16px auto; overflow: auto; background: var(--paper); color: var(--ink); font: 15px/1.8 'Space Grotesk', 'Noto Sans SC', sans-serif; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button { color: inherit; cursor: pointer; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
[hidden] { display: none !important; }
::selection { background: var(--lime); color: var(--on-accent); }
.page-width { width: 100%; margin: 0; }
.skip-link { position: fixed; top: -100px; left: 24px; z-index: 200; background: var(--lime); color: var(--on-accent); padding: 12px; border: 3px solid var(--ink); }
.skip-link:focus { top: 10px; }
.site-header { display: flex; align-items: stretch; justify-content: space-between; min-height: 92px; border-bottom: var(--rule); }
.wordmark { display: flex; align-items: center; padding: 18px 40px; font-size: 40px; font-weight: 700; line-height: 1; }
.brand-dot { color: var(--cyan); }
.site-header nav { display: flex; align-items: stretch; margin-left: auto; }
.theme-toggle { align-self: center; display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; margin: 0 24px 0 8px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); }
.theme-toggle:hover { background: var(--surface); color: var(--blue); }
.theme-toggle .lucide { width: 18px; height: 18px; }
.theme-toggle .theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-icon-light { display: block; }
.site-header nav a, .site-header nav button { display: flex; align-items: center; justify-content: center; min-width: 138px; padding: 20px 26px; border: 0; border-radius: 0; background: transparent; font-weight: 500; font-size: 14px; }
.site-header nav a:hover, .site-header nav button:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 7px; }
.hero { position: relative; display: flex; min-height: 530px; border-bottom: var(--rule); isolation: isolate; }
.hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; width: 50%; padding: 64px 0 64px 8%; }
.hero-kicker { font-size: 13px; color: var(--muted); margin: 0 0 30px; }
h1 { margin: 0; font-size: 76px; font-weight: 800; line-height: 1.25; }
h1 > span { display: block; margin-top: 23px; font-size: 23px; font-weight: 500; line-height: 1.5; }
.hero-description { margin: 32px 0 0; color: var(--muted); font-size: 15px; line-height: 2; }
.composition { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
#gesture-paint { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.section { padding: 44px 6%; border-bottom: var(--rule); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
h2 { margin: 0; font-size: 32px; line-height: 1.4; font-weight: 600; }
.section-english { display: inline-block; margin-left: 22px; color: var(--muted); font-size: 13px; font-weight: 400; vertical-align: middle; }
.blog-tools { display: flex; align-items: center; gap: 20px; }
.quiet-link { display: inline-flex; align-items: center; gap: 18px; background: transparent; color: inherit; border: 0; border-radius: 0; padding: 10px 0; font-size: 13px; }
.quiet-link:hover { color: var(--blue); }
.quiet-link .lucide, .search-field .lucide { width: 18px; height: 18px; flex: 0 0 18px; }
#refresh-posts { width: 40px; height: 40px; justify-content: center; }
#refresh-posts:disabled { opacity: .4; cursor: wait; }
.search-field { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.search-field input { width: 130px; min-width: 0; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; padding: 7px 0; background: transparent; color: var(--ink); font-size: 12px; }
.content-status { padding: 38px 0 10px; color: var(--muted); font-size: 14px; }
.post-list:not(:empty) { margin-top: 28px; border-top: 2px solid var(--ink); }
.post-row { display: grid; width: 100%; grid-template-columns: 30px minmax(0, 1fr) 100px 24px; align-items: center; gap: 24px; padding: 26px 0; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); }
.post-row:last-child { border-bottom: 0; }
.post-row:hover .post-title { color: var(--blue); }
.post-index, .post-date { font-size: 12px; color: var(--muted); }
.post-title { display: block; font-size: 19px; font-weight: 500; overflow-wrap: anywhere; }
.post-excerpt { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 13px; margin-top: 8px; }
.post-arrow { justify-self: end; font-size: 22px; }
.about-section { padding: 0; }
.about-layout { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); }
.about-heading { padding: 54px 17%; }
.about-heading .section-english { display: block; margin: 12px 0 0; color: var(--ink); }
.about-copy { padding: 52px 10%; }
.about-copy p { color: var(--muted); font-size: 14px; margin: 0 0 20px; line-height: 1.95; }
.about-copy .about-intro { color: var(--ink); font-size: 22px; font-weight: 500; }
.email-link { display: flex; justify-content: space-between; gap: 12px; width: fit-content; max-width: 100%; margin-top: 28px; font-size: 14px; border-bottom: 1px solid var(--ink); }
.email-link:hover { color: var(--blue); }
.playground-section { padding-block: 36px; }
.solar-system { width: 100%; height: min(820px, 85vh); min-height: 360px; margin-top: 28px; background: #090b0b; color: white; }
.guestbook-section { background: var(--band); color: var(--on-band); border-top-left-radius: 70% 64px; padding-top: 24px; }
.guestbook-layout { display: flex; justify-content: space-between; align-items: stretch; }
.guestbook-layout h2 { padding: 50px 6%; font-size: 28px; align-self: center; }
.primary-link { display: inline-flex; align-items: center; justify-content: center; align-self: center; gap: 32px; margin-right: 6%; padding: 18px 28px; border: 0; border-radius: 0; background: var(--paper); color: var(--ink); font-size: 15px; font-weight: 500; }
.primary-link:hover { background: var(--lime); color: var(--on-accent); }
.primary-link span { font-size: 24px; }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; padding: 24px 6%; font-size: 12px; color: var(--muted); }
.site-footer > span { margin-right: auto; }
.site-footer a:hover { color: var(--blue); }
html:has(#article-dialog[open]) { overflow: hidden; }
.article-dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 80px 48px 96px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-gutter: stable; background: var(--surface); color: var(--ink); border: 0; border-radius: 0; }
.article-dialog > :not(.dialog-close) { width: min(100%, 960px); margin-inline: auto; }
.article-dialog::backdrop, #comment-box::backdrop { background: var(--scrim); }
.dialog-close { position: fixed; z-index: 1; right: max(24px, env(safe-area-inset-right)); top: max(16px, env(safe-area-inset-top)); width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 28px; }
.dialog-close:hover { color: var(--blue); }
.eyebrow { font-size: 12px; color: var(--muted); margin: 0 0 20px; }
#article-title { overflow-wrap: anywhere; }
#article-content { white-space: normal; overflow-wrap: anywhere; line-height: 1.95; color: var(--body-copy); margin-top: 28px; }
#article-content.is-plain-text { white-space: pre-wrap; }
#article-content > :first-child { margin-top: 0; }
#article-content > :last-child { margin-bottom: 0; }
#article-content :is(h1, h2, h3, h4, h5, h6) { color: var(--ink); font-weight: 600; line-height: 1.5; margin: 1.6em 0 .6em; }
#article-content h1 { font-size: 28px; }
#article-content h2 { font-size: 24px; }
#article-content h3 { font-size: 20px; }
#article-content :is(h4, h5, h6) { font-size: 17px; }
#article-content :is(p, ul, ol, blockquote, pre, table) { margin: 0 0 1.2em; }
#article-content :is(ul, ol) { padding-left: 1.6em; }
#article-content li { margin-block: .3em; }
#article-content li > :is(ul, ol) { margin-bottom: 0; }
#article-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
#article-content blockquote { margin-left: 0; padding: 8px 20px; border-left: 3px solid var(--cyan); background: var(--paper); color: var(--muted); }
#article-content blockquote > :last-child { margin-bottom: 0; }
#article-content code { font-family: Consolas, 'Cascadia Code', monospace; font-size: .88em; padding: .15em .35em; background: var(--paper); border: 1px solid var(--line); border-radius: 3px; }
#article-content pre { max-width: 100%; overflow-x: auto; padding: 18px; border: 1px solid var(--line); background: var(--paper); border-radius: 4px; line-height: 1.65; white-space: pre; overflow-wrap: normal; }
#article-content pre code { padding: 0; border: 0; background: transparent; border-radius: 0; }
#article-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
#article-content :is(th, td) { padding: 10px 14px; border: 1px solid var(--line); }
#article-content th { background: var(--paper); color: var(--ink); }
#article-content img { display: block; max-width: 100%; height: auto; margin-block: 20px; }
#article-content hr { margin-block: 28px; border: 0; border-top: 1px solid var(--line); }
#article-content input[type="checkbox"] { accent-color: var(--blue); margin-right: 6px; }
.info-box { position: fixed; max-height: 85dvh; overflow-y: auto; background: #101416; color: #fff; border: 2px solid var(--line); border-radius: 0; }
#comment-box { inset: 0; transform: none; margin: auto; width: min(600px, calc(100% - 32px)); height: min(720px, 88dvh); max-height: 88dvh; background: var(--surface); border: 2px solid var(--line); border-radius: 0; padding: 28px; color: var(--ink); box-shadow: none; backdrop-filter: none; }
#comment-box:not([open]) { display: none !important; }
#comment-header { border-bottom: 2px solid var(--line); }
#comment-header h2 { font-size: 24px; font-weight: 600; }
#close-comment-box { color: var(--ink); }
#comment-list { min-height: 60px; }
#comment-form { flex-shrink: 0; }
#comment-name, #comment-email, #comment-input { background: var(--paper); color: var(--ink); border: 1px solid var(--muted); border-radius: 0; }
#comment-name::placeholder, #comment-email::placeholder, #comment-input::placeholder { color: var(--muted); }
#comment-input { max-height: 150px; }
#submit-comment { background: var(--action); color: var(--on-action); border-radius: 0; }
#submit-comment:hover { background: var(--action-hover); }
.comment { border-bottom-color: var(--line); }
.comment-author { color: var(--blue); }
.comment-time, .comment-email, .comment-status { color: var(--muted); }
.comment-status.is-error { color: var(--error); }
.comment-meta { flex-wrap: wrap; gap: 4px 12px; }
.comment-content { overflow-wrap: anywhere; }
@media (min-width: 1600px) { .hero { min-height: 580px; } }
@media (max-width: 1000px) {
    body { width: calc(100% - 32px); margin-block: 16px; }
    .hero { min-height: 470px; }
    .hero-copy { padding: 48px 0 48px 6%; }
    h1 { font-size: 60px; }
    h1 > span { font-size: 20px; }
    .site-header nav a, .site-header nav button { min-width: 115px; padding-inline: 20px; }
    .about-heading { padding-inline: 15%; }
    .section-english { display: block; margin: 8px 0 0; }
}
@media (max-width: 640px) {
    body { width: calc(100% - 20px); margin-block: 10px; }
    .site-header { min-height: 68px; }
    .wordmark { padding: 12px 16px; font-size: 30px; }
    .site-header nav { flex: 1; justify-content: flex-end; }
    .site-header nav a, .site-header nav button { min-width: 0; padding: 12px; font-size: 12px; }
    .theme-toggle { margin: 0 6px 0 0; flex-basis: 40px; width: 40px; height: 40px; }
    .hero { display: block; min-height: 0; padding-bottom: 180px; }
    .hero-copy { width: 100%; padding: 34px 24px; }
    .hero-kicker { font-size: 11px; margin-bottom: 28px; }
    h1 { font-size: 46px; }
    h1 > span { font-size: 17px; margin-top: 22px; }
    .hero-description { font-size: 12px; margin-top: 26px; }
    .composition { top: auto; height: 180px; }
    .section { padding: 30px 24px; }
    h2 { font-size: 26px; }
    .section-heading { align-items: flex-start; gap: 16px; flex-wrap: wrap; }
    .section-english { font-size: 12px; margin-top: 6px; }
    .blog-tools { width: 100%; gap: 16px; }
    .search-field { flex: 1; }
    .search-field input { width: 100%; }
    .post-row { grid-template-columns: 22px minmax(0, 1fr) 20px; gap: 12px; padding-block: 22px; }
    .post-title { font-size: 17px; }
    .post-date { grid-column: 2; grid-row: 2; }
    .post-arrow { grid-column: 3; grid-row: 1; }
    .about-section { padding: 0; }
    .about-layout { grid-template-columns: 1fr; }
    .about-heading { padding: 28px 24px 0; }
    .about-copy { padding: 30px 24px; }
    .about-copy .about-intro { font-size: 20px; }
    .playground-section .section-heading { flex-wrap: nowrap; align-items: center; }
    .playground-section h2 { font-size: 22px; }
    #universe-toggle { font-size: 12px; flex-shrink: 0; gap: 8px; }
    .guestbook-layout { flex-direction: column; }
    .guestbook-layout h2 { padding: 34px 24px 24px; align-self: auto; font-size: 24px; }
    .primary-link { align-self: flex-start; margin: 0 24px 30px; padding: 16px 24px; justify-content: space-between; }
    .site-footer { gap: 16px; padding: 22px 24px; font-size: 11px; }
    .article-dialog { padding: max(76px, env(safe-area-inset-top)) 20px max(48px, env(safe-area-inset-bottom)); }
    .dialog-close { right: max(12px, env(safe-area-inset-right)); top: max(12px, env(safe-area-inset-top)); }
    #comment-box { padding: 20px; }
}
@media (max-width: 360px) {
    .site-header nav a, .site-header nav button { padding-inline: 8px; font-size: 11px; }
    .hero-copy { padding-inline: 18px; }
    h1 { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}