:root {
  --bg: #f4f2ec;
  --surface: #fbfaf6;
  --surface-2: #ece9e0;
  --text: #171714;
  --muted: #706e67;
  --line: #d8d4c8;
  --accent: #ff5a36;
  --accent-soft: #ffe0d8;
  --ink: #171714;
  --white: #fffdf8;
  --shadow: 0 18px 50px rgba(38, 35, 28, .08);
  --radius-lg: 34px;
  --radius-md: 22px;
}

:root.dark {
  --bg: #11110f;
  --surface: #191917;
  --surface-2: #22221e;
  --text: #f3f0e7;
  --muted: #aaa79e;
  --line: #33332e;
  --accent: #ff704f;
  --accent-soft: #49251d;
  --ink: #f3f0e7;
  --white: #11110f;
  --shadow: 0 18px 50px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  transition: background .25s ease, color .25s ease;
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
img { max-width: 100%; }
.container { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.nav-wrap { min-height: 74px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: baseline; font-size: 1.55rem; line-height: 1; font-weight: 900; letter-spacing: -.08em; text-decoration: none; }
.brand span { color: var(--accent); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav a { padding: 8px 12px; border-radius: 999px; color: var(--muted); font-size: .92rem; font-weight: 650; text-decoration: none; transition: background .2s, color .2s; }
.nav a:hover, .nav a:focus-visible { background: var(--surface-2); color: var(--text); outline: none; }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.language-select { max-width: 124px; height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .8rem; cursor: pointer; }
.language-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
html:lang(zh-Hans) body { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; background: var(--surface); cursor: pointer; transition: transform .2s, background .2s; }
.icon-button:hover { transform: translateY(-2px); background: var(--surface-2); }
.mobile-toggle { display: none; }

.hero { min-height: calc(100svh - 74px); display: flex; flex-direction: column; justify-content: center; padding-block: 88px 42px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr); gap: clamp(42px, 8vw, 100px); align-items: center; }
.eyebrow { margin: 0; letter-spacing: .16em; text-transform: uppercase; font-size: .73rem; line-height: 1.3; font-weight: 800; color: var(--muted); }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #45b86b; box-shadow: 0 0 0 5px color-mix(in srgb, #45b86b 14%, transparent); }
.hero h1 { margin: 17px 0 28px; max-width: 820px; font-size: clamp(3.8rem, 8.3vw, 7.5rem); line-height: .92; letter-spacing: -.075em; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-copy { max-width: 650px; margin: 0; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.2rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-stats { margin-top: 46px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero-stats div { padding: 18px 16px 18px 0; }
.hero-stats div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.hero-stats strong { display: block; font-size: 1.35rem; line-height: 1; letter-spacing: -.04em; }
.hero-stats span { display: block; margin-top: 7px; color: var(--muted); font-size: .7rem; line-height: 1.35; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 21px; border: 1px solid var(--line); border-radius: 999px; font-size: .92rem; font-weight: 750; text-decoration: none; transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button.primary { border-color: var(--text); background: var(--text); color: var(--bg); box-shadow: 0 10px 24px color-mix(in srgb, var(--text) 14%, transparent); }
.button.ghost { background: var(--surface); }
.hero-card { min-height: 410px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--text); color: var(--bg); display: flex; flex-direction: column; justify-content: space-between; transform: rotate(2deg); box-shadow: var(--shadow); }
.hero-card-top { display: flex; align-items: center; justify-content: space-between; font-size: .8rem; opacity: .74; }
.mini-label { margin: 0; letter-spacing: .14em; font-size: .67rem; font-weight: 850; }
.hero-card-quote { margin: 50px 0; max-width: 330px; font-size: clamp(1.65rem, 3vw, 2.55rem); line-height: 1.18; letter-spacing: -.04em; font-weight: 800; }
.hero-card-bottom { display: flex; flex-wrap: wrap; gap: 7px; }
.hero-card-bottom span { padding: 6px 9px; border: 1px solid color-mix(in srgb, var(--bg) 26%, transparent); border-radius: 999px; font-size: .72rem; }
.scroll-hint { margin-top: auto; padding-top: 55px; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .16em; }
.scroll-hint span { width: 36px; height: 1px; background: var(--muted); }

.section { padding-block: 112px; border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 36px; display: flex; align-items: end; justify-content: space-between; gap: 36px; }
h2 { margin: 9px 0 0; font-size: clamp(2.35rem, 5vw, 4.8rem); line-height: 1; letter-spacing: -.06em; }
.section-intro { max-width: 390px; margin: 0; color: var(--muted); }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filter-chip { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: .82rem; font-weight: 700; cursor: pointer; }
.filter-chip:hover, .filter-chip.active { background: var(--text); border-color: var(--text); color: var(--bg); }

.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.post-card { position: relative; min-height: 360px; padding: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .25s ease, border-color .25s ease; }
.post-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--text) 26%, var(--line)); }
.post-card.featured { grid-row: span 2; min-height: 736px; background: var(--accent-soft); }
.post-number { position: absolute; right: 20px; bottom: -30px; color: color-mix(in srgb, var(--text) 7%, transparent); font-size: clamp(7rem, 14vw, 12rem); line-height: 1; font-weight: 900; letter-spacing: -.08em; pointer-events: none; }
.post-meta { position: relative; display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: .76rem; }
.tag { padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; }
.post-card h3 { position: relative; max-width: 580px; margin: 56px 0 15px; font-size: clamp(1.55rem, 3vw, 2.5rem); line-height: 1.09; letter-spacing: -.045em; }
.post-card.featured h3 { margin-top: auto; font-size: clamp(2.2rem, 4vw, 4.4rem); }
.post-card p { position: relative; max-width: 560px; margin: 0 0 32px; color: var(--muted); }
.text-link { position: relative; align-self: flex-start; margin-top: auto; font-size: .9rem; font-weight: 800; text-decoration: none; }
.text-link span { display: inline-block; transition: transform .2s; }
.text-link:hover span { transform: translate(3px, -3px); }
.post-card[hidden] { display: none; }
.empty-state { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius-md); }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project-card { min-height: 390px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; }
.project-card-dark { background: var(--text); color: var(--bg); }
.project-icon { width: 60px; height: 60px; border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-size: 1.55rem; }
.project-card h3 { margin: 12px 0 10px; font-size: clamp(1.7rem, 3vw, 2.55rem); letter-spacing: -.04em; line-height: 1.1; }
.project-card p:not(.mini-label) { max-width: 480px; margin: 0; opacity: .68; }
.project-status { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; margin-top: 24px; font-size: .75rem; font-weight: 700; opacity: .72; }
.project-status i { width: 7px; height: 7px; border-radius: 50%; background: #45b86b; }
.project-foot { margin-top: 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.project-foot .project-status { margin-top: 0; white-space: nowrap; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tags span { padding: 5px 8px; border: 1px solid currentColor; border-radius: 999px; font-size: .65rem; line-height: 1; opacity: .55; }

.setup-panel { padding: clamp(28px, 5vw, 58px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--text); color: var(--bg); display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); gap: clamp(36px, 7vw, 88px); box-shadow: var(--shadow); }
.setup-intro { display: flex; flex-direction: column; align-items: flex-start; }
.setup-intro .mini-label { opacity: .6; }
.setup-intro h3 { margin: 18px 0 16px; max-width: 430px; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.02; letter-spacing: -.055em; }
.setup-intro > p:not(.mini-label) { margin: 0 0 28px; max-width: 520px; color: color-mix(in srgb, var(--bg) 65%, transparent); }
.setup-intro .text-link { margin-top: auto; }
.spec-grid { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid color-mix(in srgb, var(--bg) 22%, transparent); border-radius: 24px; overflow: hidden; background: color-mix(in srgb, var(--bg) 18%, transparent); }
.spec-grid div { min-height: 126px; padding: 20px; background: var(--text); }
.spec-grid div:last-child { grid-column: 1 / -1; }
.spec-grid dt { margin-bottom: 18px; color: color-mix(in srgb, var(--bg) 55%, transparent); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.spec-grid dd { margin: 0; font-size: clamp(1rem, 2vw, 1.35rem); font-weight: 750; line-height: 1.25; letter-spacing: -.025em; }

.about { display: grid; grid-template-columns: minmax(240px, .65fr) minmax(0, 1.35fr); gap: clamp(45px, 8vw, 110px); align-items: center; }
.portrait { aspect-ratio: 4/5; max-width: 380px; padding: 30px; border-radius: var(--radius-lg); background: var(--accent); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(-2deg); box-shadow: var(--shadow); }
.portrait span { font-size: clamp(7rem, 16vw, 11rem); line-height: .8; font-weight: 900; letter-spacing: -.1em; }
.portrait small { margin-top: 30px; font-weight: 800; letter-spacing: .18em; }
.about-copy .lead { max-width: 700px; margin: 28px 0 18px; color: var(--text); font-size: clamp(1.2rem, 2.1vw, 1.7rem); line-height: 1.5; font-weight: 650; }
.about-copy > p:not(.eyebrow, .lead) { max-width: 680px; color: var(--muted); }
.about-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.about-facts span { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .78rem; font-weight: 700; }

.note-section { padding-bottom: 120px; }
.note-card { padding: clamp(38px, 7vw, 80px); border-radius: var(--radius-lg); background: var(--text); color: var(--bg); }
.note-card .eyebrow { color: color-mix(in srgb, var(--bg) 64%, transparent); }
.note-card h2 { max-width: 760px; }
.note-card > p:not(.eyebrow) { max-width: 650px; margin: 24px 0 30px; color: color-mix(in srgb, var(--bg) 66%, transparent); }
.ghost-on-dark { border-color: color-mix(in srgb, var(--bg) 36%, transparent); background: transparent; color: var(--bg); }
.contact-line { margin-top: 30px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; }
.contact-email { color: var(--bg); font-size: clamp(1.15rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.035em; text-underline-offset: 5px; }
.contact-line .button { min-height: 42px; padding-inline: 16px; }
.social-links { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.social-links a { padding: 18px 20px; border: 1px solid color-mix(in srgb, var(--bg) 26%, transparent); border-radius: 18px; color: var(--bg); text-decoration: none; transition: transform .2s ease, background .2s ease; }
.social-links a:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--bg) 8%, transparent); }
.social-links span { display: block; margin-bottom: 5px; color: color-mix(in srgb, var(--bg) 58%, transparent); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.social-links strong { font-size: .95rem; }
.footer-meta a { color: inherit; text-underline-offset: 3px; }

.footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 180px; padding-block: 36px; display: flex; align-items: center; justify-content: space-between; gap: 30px; color: var(--muted); }
.footer-brand { color: var(--text); }
.footer-inner p { margin: 9px 0 0; font-size: .83rem; }
.footer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: .78rem; }

/* High-motion portfolio layer */
body { overflow-x: clip; position: relative; isolation: isolate; }
body::before {
  content: "";
  position: fixed;
  inset: -25vmax;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--pointer-x, 70%) var(--pointer-y, 20%), color-mix(in srgb, var(--accent) 12%, transparent), transparent 22%),
    radial-gradient(circle at 15% 78%, color-mix(in srgb, #7b8cff 8%, transparent), transparent 26%);
  filter: blur(10px);
  transition: background .3s ease;
}

.page-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 100;
  width: var(--page-progress, 0%);
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #ffb36b, #8f7cff);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 55%, transparent);
  pointer-events: none;
}
.cursor-glow, .cursor-dot { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 120; opacity: 0; }
.cursor-glow { width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent), transparent 68%); filter: blur(8px); mix-blend-mode: multiply; transition: opacity .2s ease; }
:root.dark .cursor-glow { mix-blend-mode: screen; }
.cursor-dot { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent); transition: width .18s ease, height .18s ease, margin .18s ease, opacity .2s ease; }
.cursor-dot.is-active { width: 18px; height: 18px; margin: -9px 0 0 -9px; }

.motion-ready .hero .eyebrow { animation: heroRise .7s cubic-bezier(.2,.8,.2,1) both; }
.hero h1 { overflow: visible; }
.hero-line { display: block; transform-origin: left bottom; }
.motion-ready .hero-line { animation: heroLineIn .9s cubic-bezier(.16,1,.3,1) both; }
.motion-ready .hero-line:nth-child(2) { animation-delay: .1s; }
.motion-ready .hero-copy { animation: heroRise .75s .22s cubic-bezier(.2,.8,.2,1) both; }
.motion-ready .hero-actions { animation: heroRise .75s .3s cubic-bezier(.2,.8,.2,1) both; }
.motion-ready .hero-stats { animation: heroRise .75s .38s cubic-bezier(.2,.8,.2,1) both; }
.motion-ready .hero-card { animation: heroCardIn 1s .18s cubic-bezier(.16,1,.3,1) both, heroFloat 6s 1.2s ease-in-out infinite; }
.hero-card { position: relative; overflow: hidden; }
.hero-card::after {
  content: "";
  position: absolute;
  inset: -40% -80%;
  background: linear-gradient(110deg, transparent 42%, color-mix(in srgb, var(--bg) 12%, transparent) 49%, transparent 56%);
  transform: translateX(-38%) rotate(8deg);
  animation: cardSweep 6s 1.5s ease-in-out infinite;
  pointer-events: none;
}
.status-dot { animation: statusPulse 2s ease-in-out infinite; }
.scroll-hint span { animation: scrollHint 1.8s ease-in-out infinite; transform-origin: left; }

.motion-strip { width: 100%; overflow: hidden; border-block: 1px solid var(--line); background: var(--text); color: var(--bg); transform: rotate(-1deg) scale(1.015); }
.motion-track { width: max-content; display: flex; align-items: center; gap: 28px; padding: 12px 0; font-size: clamp(.76rem, 1.4vw, 1rem); font-weight: 900; letter-spacing: .22em; animation: marqueeMove 24s linear infinite; }
.motion-track span { white-space: nowrap; }
.motion-track i { color: var(--accent); font-style: normal; }

.reveal-item { opacity: 0; translate: 0 62px; scale: .975; filter: blur(10px); transition: opacity .8s cubic-bezier(.16,1,.3,1), translate .9s cubic-bezier(.16,1,.3,1), scale .9s cubic-bezier(.16,1,.3,1), filter .8s ease; transition-delay: var(--reveal-delay, 0ms); }
.reveal-item.is-visible { opacity: 1; translate: 0 0; scale: 1; filter: blur(0); }

.tilt-card { --tilt-x: 0deg; --tilt-y: 0deg; --lift: 0px; --glow-x: 50%; --glow-y: 50%; transform: perspective(1000px) translate3d(0, var(--lift), 0) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); transform-style: preserve-3d; will-change: transform; transition: transform .18s ease, border-color .25s ease; }
.tilt-card::before { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; background: radial-gradient(circle at var(--glow-x) var(--glow-y), color-mix(in srgb, var(--accent) 15%, transparent), transparent 32%); opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.tilt-card:hover::before { opacity: 1; }
.tilt-card > * { position: relative; z-index: 1; }
.post-card.tilt-card:hover, .project-card.tilt-card:hover, .capability-card.tilt-card:hover { --lift: -8px; }
.hero-card.tilt-card { transform: perspective(1100px) translate3d(0, var(--hero-shift, 0px), 0) rotate(2deg) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); }

.magnetic { --mag-x: 0px; --mag-y: 0px; transform: translate3d(var(--mag-x), var(--mag-y), 0); will-change: transform; }
.magnetic:hover { transform: translate3d(var(--mag-x), calc(var(--mag-y) - 2px), 0) scale(1.025); }

.nav a.active { background: var(--text); color: var(--bg); }
.site-header { transition: min-height .25s ease, box-shadow .25s ease, background .25s ease; }
.site-header.is-scrolled { box-shadow: 0 12px 35px color-mix(in srgb, var(--text) 7%, transparent); }
.brand { transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.brand:hover { transform: rotate(-8deg) scale(1.08); }

.featured-project { position: relative; overflow: hidden; padding: clamp(28px, 5vw, 58px); border: 1px solid var(--line); border-radius: clamp(26px, 4vw, 42px); background: var(--text); color: var(--bg); box-shadow: var(--shadow); isolation: isolate; }
.featured-project::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(circle at 78% 12%, color-mix(in srgb, var(--accent) 36%, transparent), transparent 24%), linear-gradient(145deg, transparent 35%, color-mix(in srgb, #8275ff 12%, transparent)); }
.featured-project::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .13; background-image: linear-gradient(color-mix(in srgb, var(--bg) 40%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--bg) 40%, transparent) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(to bottom, #000, transparent 82%); }
.project-beam { position: absolute; z-index: 0; width: 38%; height: 160%; top: -30%; right: 5%; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 18%, transparent), transparent); filter: blur(18px); transform: rotate(16deg) translateX(100%); animation: projectBeam 7s ease-in-out infinite; pointer-events: none; }
.featured-project-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.featured-project h3 { margin: 12px 0 0; font-size: clamp(3rem, 8vw, 7.4rem); line-height: .86; letter-spacing: -.075em; }
.featured-project-lead { max-width: 850px; margin: 38px 0 28px; color: color-mix(in srgb, var(--bg) 72%, transparent); font-size: clamp(1.05rem, 2vw, 1.35rem); }
.project-repo-button { border-color: color-mix(in srgb, var(--bg) 36%, transparent); color: var(--bg); background: color-mix(in srgb, var(--bg) 7%, transparent); flex: none; }
.repo-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 34px; }
.repo-badges span { padding: 7px 10px; border: 1px solid color-mix(in srgb, var(--bg) 24%, transparent); border-radius: 999px; color: color-mix(in srgb, var(--bg) 72%, transparent); font-size: .68rem; font-weight: 750; }
.capability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.capability-card { position: relative; min-height: 280px; padding: 24px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--bg) 22%, transparent); border-radius: 22px; background: color-mix(in srgb, var(--bg) 5%, transparent); color: var(--bg); display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; }
.capability-card .mini-label { color: color-mix(in srgb, var(--bg) 50%, transparent); }
.capability-card h4 { margin: 10px 0 10px; font-size: clamp(1.35rem, 2.4vw, 2rem); line-height: 1.05; letter-spacing: -.04em; }
.capability-card p:not(.mini-label) { margin: 0; color: color-mix(in srgb, var(--bg) 62%, transparent); font-size: .86rem; }
.capability-index { color: color-mix(in srgb, var(--bg) 34%, transparent); font-size: .72rem; font-weight: 900; letter-spacing: .12em; }
.capability-arrow { position: absolute; right: 18px; top: 16px; font-size: 1.15rem; transition: transform .25s ease; }
.capability-card:hover .capability-arrow { transform: translate(4px, -4px) rotate(8deg); }
.featured-project-foot { margin-top: 28px; padding-top: 20px; border-top: 1px solid color-mix(in srgb, var(--bg) 20%, transparent); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: color-mix(in srgb, var(--bg) 52%, transparent); font-size: .75rem; }
.featured-project-foot .text-link { color: var(--bg); }
.project-track-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.setup-panel, .note-card, .portrait { position: relative; overflow: hidden; }
.setup-panel::after, .note-card::after { content: ""; position: absolute; inset: -45% -80%; pointer-events: none; background: linear-gradient(110deg, transparent 44%, color-mix(in srgb, var(--bg) 9%, transparent) 49%, transparent 54%); transform: translateX(-40%) rotate(10deg); animation: cardSweep 9s 2s ease-in-out infinite; }
.portrait::before { content: ""; position: absolute; inset: 11%; border: 1px solid color-mix(in srgb, #fff 34%, transparent); border-radius: 50%; animation: portraitOrbit 9s linear infinite; }
.portrait::after { content: ""; position: absolute; width: 38px; height: 38px; top: 15%; right: 16%; border: 2px solid #fff; border-radius: 50%; box-shadow: -170px 190px 0 -9px color-mix(in srgb, #fff 55%, transparent); animation: orbitDot 4s ease-in-out infinite alternate; }
.social-links a { position: relative; overflow: hidden; }
.social-links a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, color-mix(in srgb, var(--bg) 12%, transparent), transparent 70%); transform: translateX(-110%); transition: transform .55s cubic-bezier(.16,1,.3,1); }
.social-links a:hover::after { transform: translateX(110%); }

@keyframes heroRise { from { opacity: 0; transform: translateY(28px); filter: blur(8px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes heroLineIn { from { opacity: 0; transform: translateY(105%) rotate(3deg); filter: blur(10px); } to { opacity: 1; transform: translateY(0) rotate(0); filter: blur(0); } }
@keyframes heroCardIn { from { opacity: 0; scale: .9; filter: blur(10px); } to { opacity: 1; scale: 1; filter: blur(0); } }
@keyframes heroFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes cardSweep { 0%, 18% { transform: translateX(-45%) rotate(10deg); opacity: 0; } 35% { opacity: 1; } 58%, 100% { transform: translateX(45%) rotate(10deg); opacity: 0; } }
@keyframes statusPulse { 0%,100% { box-shadow: 0 0 0 5px color-mix(in srgb, #45b86b 14%, transparent); } 50% { box-shadow: 0 0 0 10px color-mix(in srgb, #45b86b 4%, transparent); } }
@keyframes scrollHint { 0%,100% { transform: scaleX(.35); opacity: .45; } 50% { transform: scaleX(1); opacity: 1; } }
@keyframes marqueeMove { to { transform: translateX(-50%); } }
@keyframes projectBeam { 0%, 12% { transform: rotate(16deg) translateX(130%); opacity: 0; } 35% { opacity: .9; } 58%, 100% { transform: rotate(16deg) translateX(-290%); opacity: 0; } }
@keyframes portraitOrbit { to { transform: rotate(360deg); border-radius: 32%; } }
@keyframes orbitDot { to { transform: translate(-38px, 48px) scale(.7); } }

@media (max-width: 900px) {
  .capability-grid { grid-template-columns: 1fr; }
  .capability-card { min-height: 210px; }
  .featured-project-head { flex-direction: column; }
  .project-track-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .featured-project { padding: 24px; }
  .featured-project h3 { font-size: clamp(3rem, 18vw, 5.3rem); }
  .featured-project-foot { align-items: flex-start; flex-direction: column; }
  .motion-track { animation-duration: 18s; }
}
@media (pointer: coarse) {
  .cursor-glow, .cursor-dot { display: none; }
  .tilt-card { transform: none !important; }
  .hero-card.tilt-card { transform: none !important; }
}

/* Article pages */
.reading-progress { position: fixed; z-index: 60; top: 0; left: 0; width: 0; height: 3px; background: var(--accent); }
.article-shell { width: min(920px, calc(100% - 48px)); margin: 0 auto; }
.article-hero { padding: 100px 0 64px; border-bottom: 1px solid var(--line); }
.article-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: .78rem; }
.article-title { max-width: 850px; margin: 22px 0 25px; font-size: clamp(3rem, 7vw, 6.5rem); line-height: .97; letter-spacing: -.065em; }
.article-deck { max-width: 720px; margin: 0; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.3rem); }
.article-actions { display: flex; gap: 10px; margin-top: 30px; }
.article-body { max-width: 720px; margin: 0 auto; padding: 72px 0 100px; font-size: 1.05rem; }
.article-body h2 { margin: 58px 0 18px; font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -.04em; }
.article-body h3 { margin: 38px 0 12px; font-size: 1.3rem; }
.article-body p { margin: 0 0 24px; }
.article-body ul, .article-body ol { margin: 0 0 28px; padding-left: 1.35em; }
.article-body li { margin-bottom: 9px; }
.article-body blockquote { margin: 40px 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent); color: var(--muted); font-size: 1.25rem; }
.article-body .callout { margin: 36px 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.article-specs { margin: 38px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.article-specs div { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.article-specs div:last-child { grid-column: 1 / -1; }
.article-specs dt { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.article-specs dd { margin: 7px 0 0; font-weight: 750; line-height: 1.35; }
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 36px 0 100px; border-top: 1px solid var(--line); }
.article-nav a { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); text-decoration: none; }
.article-nav small { display: block; margin-bottom: 7px; color: var(--muted); }
.copy-feedback { min-width: 58px; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 72%, transparent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (max-width: 820px) {
  .container, .article-shell { width: min(100% - 32px, 1120px); }
  .nav { position: absolute; top: calc(100% + 8px); left: 16px; right: 16px; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); display: none; flex-direction: column; align-items: stretch; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .mobile-toggle { display: grid; }
  .hero { min-height: auto; padding-top: 78px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { min-height: 300px; transform: none; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stats div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .hero-stats div:nth-child(4) { border-top: 1px solid var(--line); }
  .setup-panel { grid-template-columns: 1fr; }
  .scroll-hint { display: none; }
  .section { padding-block: 82px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .post-grid, .project-grid { grid-template-columns: 1fr; }
  .post-card.featured { grid-row: auto; min-height: 440px; }
  .about { grid-template-columns: 1fr; }
  .portrait { width: min(100%, 330px); }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-meta { align-items: flex-start; }
}

@media (max-width: 520px) {
  .nav-wrap { gap: 12px; }
  .language-select { max-width: 112px; }
  .container, .article-shell { width: min(100% - 24px, 1120px); }
  .nav-wrap { min-height: 68px; }
  .hero { padding-top: 62px; }
  .hero h1 { font-size: clamp(3.25rem, 17vw, 5rem); }
  .hero-card { min-height: 270px; padding: 22px; }
  .section { padding-block: 68px; }
  .post-card, .project-card { padding: 22px; border-radius: 20px; }
  .post-card { min-height: 330px; }
  .post-card.featured { min-height: 390px; }
  .post-card h3 { margin-top: 44px; }
  .article-hero { padding-top: 72px; }
  .article-title { font-size: clamp(2.75rem, 15vw, 4.5rem); }
  .article-body { padding-top: 54px; }
  .article-nav { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats div { padding: 14px 10px 14px 0; }
  .hero-stats div + div { padding-left: 10px; }
  .spec-grid, .article-specs { grid-template-columns: 1fr; }
  .spec-grid div:last-child, .article-specs div:last-child { grid-column: auto; }
  .project-foot { align-items: flex-start; flex-direction: column; }
  .contact-line { align-items: flex-start; flex-direction: column; }
  .social-links { grid-template-columns: 1fr; }
}
