:root {
  color-scheme: light;
  --bg: #f7fcfa;
  --surface: #ffffff;
  --surface-soft: #edf7f3;
  --surface-deep: #dff2eb;
  --ink: #15312d;
  --muted: #687b77;
  --line: rgba(21, 49, 45, 0.12);
  --mint: #57d9b3;
  --mint-dark: #218b73;
  --sky: #7cc7f5;
  --peach: #ffb985;
  --purple: #9389ef;
  --shadow: 0 24px 60px rgba(31, 98, 82, 0.12);
  --radius-lg: 32px;
  --radius-md: 22px;
  --font-sans: "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 8% 4%, rgba(87, 217, 179, 0.12), transparent 24rem), var(--bg);
  font-family: var(--font-sans);
  line-height: 1.7;
  transition: color 220ms ease, background 220ms ease;
}

body.dark {
  color-scheme: dark;
  --bg: #10211f;
  --surface: #162c29;
  --surface-soft: #1a3430;
  --surface-deep: #21433c;
  --ink: #e8f7f2;
  --muted: #a6bbb5;
  --line: rgba(232, 247, 242, 0.12);
  --mint-dark: #72e3c2;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 20;
  top: 16px;
  display: grid;
  width: min(1160px, calc(100% - 32px));
  min-height: 66px;
  margin: 16px auto 0;
  padding: 10px 12px 10px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: 0 10px 35px rgba(31, 98, 82, 0.06);
  backdrop-filter: blur(16px);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.brand { display: inline-flex; width: fit-content; gap: 10px; align-items: center; font-weight: 700; letter-spacing: -0.02em; }
.brand-mark { display: grid; width: 38px; height: 38px; border-radius: 12px; background: var(--ink); color: var(--bg); font-family: var(--font-mono); font-size: 12px; place-items: center; }
.main-nav { display: flex; gap: 28px; color: var(--muted); font-size: 14px; font-weight: 500; }
.main-nav a { position: relative; padding: 8px 0; }
.main-nav a::after { position: absolute; right: 0; bottom: 4px; left: 0; height: 2px; border-radius: 2px; background: var(--mint); content: ""; transform: scaleX(0); transition: transform 180ms ease; }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }
.header-actions { display: flex; justify-self: end; gap: 8px; }
.theme-toggle, .nav-toggle { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-soft); cursor: pointer; transition: transform 180ms ease, background 180ms ease; }
.theme-toggle:hover { background: color-mix(in srgb, var(--mint) 20%, var(--surface)); transform: rotate(14deg); }
.nav-toggle { display: none; place-items: center; }
.nav-toggle span { display: block; width: 15px; height: 1.5px; margin: 3px auto; background: var(--ink); }

.section-shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.hero { display: grid; min-height: 690px; padding-block: 94px 100px; grid-template-columns: 1.06fr 0.94fr; gap: 78px; align-items: center; }
.eyebrow, .section-index { margin: 0 0 18px; color: var(--mint-dark); font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.eyebrow { display: flex; gap: 9px; align-items: center; letter-spacing: 0.04em; text-transform: none; }
.status-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--mint-dark); }
.status-dot::after { position: absolute; inset: -4px; border: 1px solid var(--mint-dark); border-radius: 50%; content: ""; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 0; transform: scale(.7); } 45% { opacity: .6; transform: scale(1); } }
.hero h1 { max-width: 760px; margin: 0; font-size: clamp(50px, 6vw, 78px); line-height: 1.12; letter-spacing: -0.055em; }
.hero h1 span { color: var(--mint-dark); }
.hero-lead { max-width: 640px; margin: 30px 0 0; color: var(--muted); font-size: clamp(17px, 2vw, 20px); line-height: 1.9; }
.highlight { color: var(--ink); background: linear-gradient(transparent 62%, rgba(87, 217, 179, .35) 0); font-weight: 600; }
.hero-actions { display: flex; margin-top: 36px; gap: 12px; flex-wrap: wrap; }
.button { display: inline-flex; min-height: 50px; padding: 0 22px; border: 0; border-radius: 14px; cursor: pointer; gap: 16px; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--ink); box-shadow: 0 12px 24px rgba(21, 49, 45, .16); color: var(--bg); }
.button-quiet { border: 1px solid var(--line); background: var(--surface); }

.hero-visual { position: relative; min-height: 460px; }
.orbit { position: absolute; border: 1px solid rgba(87, 217, 179, .26); border-radius: 50%; }
.orbit-one { inset: 0 10px 18px 8px; animation: orbit 18s linear infinite; }
.orbit-two { inset: 48px 58px; border-color: rgba(124, 199, 245, .32); animation: orbit 13s linear infinite reverse; }
@keyframes orbit { to { transform: rotate(360deg); } }
.note-stack { position: absolute; top: 50%; left: 50%; width: min(430px, 90%); height: 330px; transform: translate(-50%, -50%); }
.stack-card { position: absolute; width: 100%; height: 100%; padding: 34px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 28px; box-shadow: var(--shadow); }
.stack-card p { margin: 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; }
.stack-card span { position: absolute; right: 30px; bottom: 26px; font-family: var(--font-mono); font-size: 10px; }
.stack-main { z-index: 3; background: #173630; color: #def4ed; transform: rotate(1.8deg); }
.stack-main h2 { margin: 76px 0 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.45; letter-spacing: -.035em; }
.stack-main p, .stack-main span { color: #82baaa; }
.stack-back-one { z-index: 2; background: #bfeedd; color: #245c50; transform: translate(-22px, 12px) rotate(-5deg); }
.stack-back-two { z-index: 1; background: #dceef8; color: #2d607d; transform: translate(18px, -13px) rotate(6deg); }

.ticker { overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); }
.ticker-track { display: flex; width: max-content; padding: 16px 0; animation: ticker 24s linear infinite; align-items: center; }
.ticker span { margin-inline: 28px; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .12em; }
.ticker i { color: var(--mint); font-style: normal; }
@keyframes ticker { to { transform: translateX(-50%); } }

.content-section { padding-block: 118px; }
.section-heading { display: grid; margin-bottom: 48px; grid-template-columns: 1fr minmax(280px, 440px); gap: 40px; align-items: end; }
.section-heading h2, .about-copy h2 { margin: 0; font-size: clamp(38px, 5vw, 60px); line-height: 1.18; letter-spacing: -.045em; }
.section-heading > p { margin: 0; color: var(--muted); font-size: 15px; }
.section-more { display: flex; margin-top: 34px; justify-content: center; }

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.article-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); transition: transform 200ms ease, box-shadow 200ms ease; }
.article-card:hover { box-shadow: var(--shadow); transform: translateY(-5px); }
.article-visual { position: relative; display: grid; height: 220px; overflow: hidden; place-items: center; }
.visual-mint { background: #d9f6ec; }
.visual-sky { background: #deeffb; }
.visual-peach { background: #ffeadc; }
.visual-index { color: rgba(26, 73, 61, .12); font-family: var(--font-mono); font-size: 110px; font-weight: 500; letter-spacing: -.08em; }
.visual-lines { position: absolute; display: grid; width: 42%; gap: 9px; transform: rotate(-8deg); }
.visual-lines i { height: 7px; border-radius: 7px; background: rgba(21, 49, 45, .5); }
.visual-lines i:nth-child(2) { width: 70%; background: rgba(87, 217, 179, .9); }
.visual-lines i:nth-child(3) { width: 85%; }
.content-badge { position: absolute; top: 14px; right: 14px; padding: 4px 9px; border-radius: 99px; background: rgba(255, 255, 255, .76); color: #49635e; font-size: 9px; font-weight: 700; letter-spacing: .06em; }
.article-body { padding: 26px; }
.article-meta { display: flex; min-height: 18px; margin-bottom: 12px; color: var(--muted); font-size: 10px; justify-content: space-between; gap: 12px; }
.article-meta span { color: var(--mint-dark); font-weight: 700; }
.article-card h3 { margin: 0; font-size: 22px; line-height: 1.48; letter-spacing: -.028em; }
.article-card p { min-height: 68px; margin: 12px 0 16px; color: var(--muted); font-size: 13px; }
.tag-list { display: flex; margin: 0 0 18px; padding: 0; list-style: none; gap: 7px; flex-wrap: wrap; }
.tag-list li { padding: 5px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 10px; }
.text-link { color: var(--ink); font-size: 12px; font-weight: 700; }
.text-link span { display: inline-block; margin-left: 6px; transition: transform 160ms ease; }
.text-link:hover span { transform: translateX(4px); }
.muted-link { color: var(--muted); font-weight: 500; }

.portal-section { padding-block: 118px 130px; }
.portal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.portal-card { display: grid; min-height: 270px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); grid-template-columns: auto 1fr auto; gap: 18px; align-items: start; transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.portal-card:hover { border-color: rgba(87, 217, 179, .8); box-shadow: var(--shadow); transform: translateY(-5px); }
.portal-number { color: var(--mint-dark); font-family: var(--font-mono); font-size: 10px; }
.portal-card div { align-self: end; }
.portal-card p { margin: 0 0 8px; color: var(--muted); font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; }
.portal-card h3 { margin: 0 0 14px; font-size: 36px; letter-spacing: -.04em; }
.portal-card div > span { color: var(--muted); font-size: 12px; line-height: 1.7; }
.portal-card b { color: var(--mint-dark); font-size: 17px; font-weight: 500; transition: transform 180ms ease; }
.portal-card:hover b { transform: translate(3px, -3px); }

.projects-section { background: var(--surface-soft); }
.project-list { display: grid; gap: 14px; }
.project-card { display: grid; padding: 34px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); grid-template-columns: 56px 1fr auto; gap: 28px; align-items: center; transition: border-color 180ms ease, transform 180ms ease; }
.project-card:hover { border-color: rgba(87, 217, 179, .8); transform: translateX(5px); }
.project-number { color: var(--mint-dark); font-family: var(--font-mono); font-size: 11px; }
.project-kicker { margin: 0 0 4px; color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.project-copy h3 { margin: 0; font-size: 27px; letter-spacing: -.03em; }
.project-copy > p:not(.project-kicker) { max-width: 620px; margin: 8px 0 16px; color: var(--muted); font-size: 13px; }
.project-note { padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 10px; }
.project-note a { color: var(--ink); font-weight: 700; }
.project-note a:hover { color: var(--mint-dark); }
.project-note a span { margin-left: 4px; }

.about-section { padding-bottom: 130px; }
.about-card { display: grid; padding: clamp(28px, 5vw, 64px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); grid-template-columns: 220px 1fr; gap: 70px; align-items: center; }
.avatar-placeholder { display: grid; width: 200px; aspect-ratio: 1; border: 1px solid rgba(87, 217, 179, .55); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f2fff9, #c8eee1 55%, #9cd8c5); color: #2b806b; font-family: var(--font-mono); font-size: 26px; font-weight: 500; letter-spacing: .12em; place-items: center; }
.about-copy .about-intro { margin: 20px 0 10px; color: var(--ink); font-size: 20px; font-weight: 600; }
.about-copy > p:not(.section-index):not(.about-intro) { max-width: 720px; margin: 0; color: var(--muted); font-size: 14px; }
.contact-row { display: flex; margin-top: 28px; gap: 8px; flex-wrap: wrap; }
.contact-chip { display: inline-flex; min-height: 42px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); gap: 7px; align-items: center; color: var(--muted); font-size: 11px; }
button.contact-chip { cursor: pointer; }
a.contact-chip:hover { border-color: var(--mint); color: var(--ink); }
.contact-chip span { color: var(--ink); font-weight: 700; }

.page-hero { padding-block: 110px 70px; }
.page-hero h1 { margin: 0; font-size: clamp(64px, 10vw, 120px); line-height: 1; letter-spacing: -.07em; }
.page-hero > p:last-child { max-width: 560px; margin: 30px 0 0; color: var(--muted); font-size: 16px; }
.archive-section { padding-bottom: 120px; }
.filter-row { display: flex; padding-top: 26px; border-top: 1px solid var(--line); gap: 8px; flex-wrap: wrap; }
.filter { padding: 9px 16px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; transition: all 180ms ease; }
.filter.active, .filter:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.filter-result { margin: 14px 0 30px; color: var(--muted); font-family: var(--font-mono); font-size: 10px; }

.article-page { padding-block: 92px 130px; }
.article-header { max-width: 860px; margin: 0 auto 78px; text-align: center; }
.back-link { display: inline-block; margin-bottom: 44px; color: var(--muted); font-size: 12px; }
.back-link:hover { color: var(--mint-dark); }
.article-kicker { display: flex; margin-bottom: 18px; gap: 8px; justify-content: center; }
.article-kicker span, .article-kicker b { padding: 5px 10px; border-radius: 99px; background: var(--surface-deep); color: var(--mint-dark); font-size: 10px; }
.article-kicker b { background: #ffeadc; color: #9b5c34; }
.article-header h1 { margin: 0; font-size: clamp(44px, 7vw, 72px); line-height: 1.15; letter-spacing: -.055em; }
.article-header > p { max-width: 680px; margin: 24px auto 0; color: var(--muted); font-size: 16px; }
.article-info { display: flex; margin-top: 22px; color: var(--muted); gap: 18px; justify-content: center; font-family: var(--font-mono); font-size: 10px; }
.article-tags { margin-top: 18px; justify-content: center; }
.article-layout { display: grid; max-width: 980px; margin-inline: auto; grid-template-columns: 180px minmax(0, 720px); gap: 70px; align-items: start; }
.article-toc { position: sticky; top: 110px; padding: 18px 0; border-block: 1px solid var(--line); }
.article-toc > p { margin: 0 0 12px; color: var(--ink); font-size: 11px; font-weight: 700; }
.article-toc ol { margin: 0; padding: 0; list-style: none; }
.article-toc li { margin: 7px 0; }
.article-toc .toc-level-3 { padding-left: 12px; }
.article-toc a { color: var(--muted); font-size: 10px; line-height: 1.5; transition: color 160ms ease; }
.article-toc a:hover, .article-toc a.active { color: var(--mint-dark); }
.prose { min-width: 0; color: var(--ink); font-size: 16px; line-height: 2; }
.prose > p:first-child { margin-top: 0; }
.prose h2 { margin: 64px 0 18px; padding-top: 12px; font-size: 32px; line-height: 1.4; letter-spacing: -.035em; }
.prose h3 { margin: 42px 0 14px; font-size: 23px; letter-spacing: -.025em; }
.heading-anchor { margin-left: 9px; color: var(--mint); font-family: var(--font-mono); font-size: .55em; opacity: 0; transition: opacity 160ms ease; }
.prose h2:hover .heading-anchor, .prose h3:hover .heading-anchor { opacity: 1; }
.prose p, .prose li { color: color-mix(in srgb, var(--ink) 82%, var(--muted)); }
.prose a { color: var(--mint-dark); text-decoration: underline; text-decoration-color: rgba(87, 217, 179, .5); text-underline-offset: 4px; }
.prose blockquote { margin: 30px 0; padding: 18px 24px; border-left: 3px solid var(--mint); border-radius: 0 14px 14px 0; background: var(--surface-soft); }
.prose blockquote p { margin: 0; color: var(--muted); }
.prose img { display: block; margin: 34px auto; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-soft); }
.prose table { width: 100%; margin: 30px 0; border-collapse: collapse; font-size: 13px; }
.prose th, .prose td { padding: 12px 14px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--surface-soft); }
.code-shell { margin: 32px 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08); border-radius: 18px; background: #142d29; box-shadow: 0 16px 35px rgba(20, 45, 41, .14); }
.code-toolbar { display: flex; padding: 10px 15px; border-bottom: 1px solid rgba(255, 255, 255, .08); color: #829f97; align-items: center; justify-content: space-between; font-family: var(--font-mono); font-size: 9px; }
.copy-code { padding: 4px 8px; border: 0; border-radius: 7px; background: rgba(255, 255, 255, .07); color: #b9cec8; cursor: pointer; font-size: 9px; }
.code-shell pre { margin: 0; padding: 24px; overflow-x: auto; color: #d8ebe5; font-family: var(--font-mono); font-size: 13px; line-height: 1.8; }
.hljs-keyword, .hljs-attr { color: #c6a8ff; }
.hljs-string, .hljs-title { color: #7fe0ba; }
.hljs-number, .hljs-literal { color: #81ccff; }
.hljs-comment { color: #708c84; }
.article-pager { display: grid; max-width: 980px; margin: 90px auto 0; padding-top: 24px; border-top: 1px solid var(--line); grid-template-columns: 1fr 1fr; gap: 16px; }
.article-pager > * { display: grid; min-height: 100px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); align-content: center; }
.article-pager a:hover { border-color: var(--mint); }
.article-pager span span, .article-pager a span { color: var(--muted); font-size: 9px; }
.article-pager strong { margin-top: 4px; font-size: 13px; }
.article-pager .disabled { opacity: .5; }

.site-footer { display: grid; padding: 28px max(24px, calc((100vw - 1120px) / 2)); background: #102823; color: #88a29b; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; font-size: 10px; }
.site-footer p { margin: 0; }
.site-footer a { justify-self: end; color: #b6cec7; }
.toast { position: fixed; z-index: 40; right: 24px; bottom: 24px; padding: 12px 18px; border-radius: 12px; background: var(--ink); box-shadow: var(--shadow); color: var(--bg); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity 180ms ease, transform 180ms ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 650ms ease, transform 650ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .hero { min-height: auto; padding-top: 70px; grid-template-columns: 1fr; gap: 54px; }
  .hero-visual { min-height: 420px; }
  .article-grid { grid-template-columns: 1fr 1fr; }
  .portal-grid { grid-template-columns: 1fr; }
  .portal-card { min-height: 190px; }
  .article-card:first-child { grid-column: 1 / -1; }
  .project-card { grid-template-columns: 42px 1fr; }
  .project-note { display: none; }
  .about-card { grid-template-columns: 160px 1fr; gap: 40px; }
  .avatar-placeholder { width: 150px; }
  .article-layout { grid-template-columns: 1fr; }
  .article-toc { position: static; max-width: 720px; width: 100%; margin-inline: auto; }
}

@media (max-width: 650px) {
  .site-header { top: 8px; width: calc(100% - 16px); min-height: 58px; margin-top: 8px; grid-template-columns: 1fr auto; }
  .brand-mark { width: 34px; height: 34px; }
  .brand span:last-child { font-size: 13px; }
  .header-actions { grid-column: 2; }
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 64px; right: 0; left: 0; display: none; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); flex-direction: column; gap: 4px; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 12px; }
  .main-nav a::after { display: none; }
  .section-shell { width: min(100% - 28px, 1120px); }
  .hero { padding-block: 64px 74px; }
  .hero h1 { font-size: clamp(42px, 12vw, 58px); }
  .hero-lead { margin-top: 22px; }
  .hero-visual { min-height: 350px; }
  .note-stack { width: 88%; height: 280px; }
  .stack-card { padding: 26px; }
  .stack-main h2 { margin-top: 60px; font-size: 27px; }
  .content-section { padding-block: 84px; }
  .section-heading { grid-template-columns: 1fr; gap: 18px; margin-bottom: 34px; }
  .article-grid { grid-template-columns: 1fr; }
  .article-card:first-child { grid-column: auto; }
  .article-visual { height: 205px; }
  .project-card { padding: 24px 20px; grid-template-columns: 1fr; gap: 18px; }
  .project-number { display: none; }
  .about-card { padding: 28px 22px; grid-template-columns: 1fr; gap: 28px; }
  .avatar-placeholder { width: 110px; }
  .about-copy h2 { font-size: 38px; }
  .page-hero { padding-block: 76px 50px; }
  .page-hero h1 { font-size: 66px; }
  .article-page { padding-block: 64px 90px; }
  .article-header { margin-bottom: 50px; text-align: left; }
  .article-header h1 { font-size: 42px; }
  .article-header > p { font-size: 14px; }
  .article-kicker, .article-info, .article-tags { justify-content: flex-start; }
  .prose { font-size: 15px; }
  .prose h2 { font-size: 27px; }
  .article-pager { grid-template-columns: 1fr; margin-top: 60px; }
  .site-footer { grid-template-columns: 1fr auto; }
  .site-footer p:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
