/* 基础设计令牌：与参考 UI 保持紧凑、清晰的作品集视觉。 */
:root{--bg:#fff;--surface:#fff;--muted:#f6f7f9;--text:#111827;--sub:#6b7280;--line:#e5e7eb;--primary:#8b5cf6;--primary-soft:#f3efff;--success:#059669;--shadow:0 16px 44px rgba(17,24,39,.08);color-scheme:light}html[data-color-scheme=dark]{--bg:#0b0f19;--surface:#111827;--muted:#18202e;--text:#f8fafc;--sub:#94a3b8;--line:#2b3545;--primary:#a78bfa;--primary-soft:#251b42;--success:#34d399;--shadow:0 18px 50px rgba(0,0,0,.28);color-scheme:dark}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;line-height:1.65}a{color:inherit;text-decoration:none}button,input{font:inherit}.shell{width:min(100% - 48px,1180px);margin-inline:auto}

/* 顶部导航还原设计稿的固定结构和轻量边框。 */
.site-header{position:sticky;top:0;z-index:30;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(12px)}.header-inner{display:flex;height:64px;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:10px;font-size:18px}.brand img,.brand-mark{width:34px;height:34px;border-radius:9px}.brand img{object-fit:cover}.brand-mark{display:grid;place-items:center;background:linear-gradient(135deg,#7c3aed,#a78bfa);color:#fff;font-size:17px;font-weight:900;box-shadow:0 8px 20px rgba(139,92,246,.22)}.main-nav{display:flex;align-items:center;gap:30px;color:var(--sub);font-size:13px;font-weight:650}.main-nav a:hover{color:var(--text)}.theme-button{display:grid;width:38px;height:38px;place-items:center;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--sub);cursor:pointer}.theme-button:hover{border-color:var(--primary);color:var(--primary)}.nav-toggle{display:none}

/* 首屏与搜索区使用轻背景，避免压过主体项目卡片。 */
.home-hero,.page-hero{border-bottom:1px solid var(--line);background:radial-gradient(circle at 15% 15%,var(--primary-soft),transparent 36%),var(--muted)}.hero-content{padding:72px 0 54px;text-align:center}.eyebrow,.page-hero .shell>span,.section-heading span,.project-aside>div>span,.about-grid>div>span{color:var(--primary);font-size:11px;font-weight:900;letter-spacing:.18em}.home-hero h1{max-width:760px;margin:10px auto 8px;font-size:clamp(34px,5vw,54px);line-height:1.14;letter-spacing:-.045em}.home-hero p{max-width:680px;margin:0 auto;color:var(--sub);font-size:17px}.hero-search{display:flex;align-items:center;gap:9px;max-width:600px;margin:28px auto 0;padding:0 15px;border:1px solid var(--line);border-radius:10px;background:var(--surface);box-shadow:0 8px 25px rgba(17,24,39,.04)}.hero-search span{font-size:21px;color:var(--sub)}.hero-search input{width:100%;padding:13px 0;border:0;outline:0;background:transparent;color:var(--text)}.hot-tags{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;margin-top:14px;color:var(--sub);font-size:12px}.hot-tags a{padding:3px 9px;border:1px solid var(--line);border-radius:999px;background:var(--surface)}.hot-tags a:hover{border-color:var(--primary);color:var(--primary)}

/* 项目网格和卡片按参考稿使用紧凑的四列布局。 */
.showcase-section,.content-section{padding:42px 0 72px}.section-heading{display:flex;align-items:end;justify-content:space-between;margin-bottom:22px}.section-heading h2{margin:2px 0 0;font-size:28px;letter-spacing:-.03em}.section-heading>a{color:var(--primary);font-size:13px;font-weight:700}.project-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.project-card{display:flex;min-width:0;min-height:205px;flex-direction:column;padding:17px;border:1px solid var(--line);border-radius:11px;background:var(--surface);transition:transform .2s,border-color .2s,box-shadow .2s}.project-card:hover{transform:translateY(-3px);border-color:var(--primary);box-shadow:var(--shadow)}.project-main{display:flex;gap:11px;min-width:0}.project-logo{display:grid;width:42px;height:42px;flex:none;place-items:center;border-radius:9px;font-weight:900}.palette-1{background:#ede9fe;color:#7c3aed}.palette-2{background:#fce7f3;color:#db2777}.palette-3{background:#dbeafe;color:#2563eb}.palette-4{background:#d1fae5;color:#059669}.palette-5{background:#fef3c7;color:#d97706}.palette-6{background:#e0e7ff;color:#4f46e5}.project-copy{min-width:0;flex:1}.project-title-row{display:flex;align-items:start;justify-content:space-between;gap:6px}.project-title-row b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.project-title-row i{flex:none;padding:2px 6px;border-radius:99px;background:#ecfdf5;color:var(--success);font-size:9px;font-style:normal;font-weight:800}.project-copy small{color:var(--sub);font-size:11px}.project-card>p{display:-webkit-box;min-height:44px;margin:13px 0;color:var(--sub);font-size:12px;line-height:1.8;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.card-meta{display:flex;align-items:center;gap:10px;margin-top:auto;color:var(--sub);font-size:10px}.card-meta a{max-width:84px;margin-left:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--primary)}.empty-filter,.empty-state{padding:48px;border:1px dashed var(--line);border-radius:12px;color:var(--sub);text-align:center}.developer-strip{padding:42px 0;border-block:1px solid var(--line);background:var(--muted)}.developer-strip>.shell,.developer-strip>.shell>div{display:flex;align-items:center;justify-content:space-between;gap:20px}.developer-strip>.shell>div{justify-content:flex-start}.avatar,.about-avatar{display:grid;place-items:center;border-radius:50%;background:linear-gradient(135deg,var(--primary),#6366f1);color:#fff;font-weight:900}.avatar{width:68px;height:68px;flex:none}.developer-strip small{color:var(--primary);font-size:10px;font-weight:800;letter-spacing:.14em}.developer-strip h2,.developer-strip p{margin:0}.developer-strip p{color:var(--sub)}.primary-button,.secondary-button{display:inline-flex;align-items:center;justify-content:center;padding:10px 17px;border-radius:8px;font-size:13px;font-weight:800}.primary-button{background:var(--primary);color:#fff}.secondary-button{border:1px solid var(--line);background:var(--surface)}

/* 列表、分类、标签和项目详情共用的内页样式。 */
.page-hero .shell{padding:58px 0 42px}.page-hero h1{margin:6px 0 3px;font-size:clamp(32px,4vw,46px);letter-spacing:-.04em}.page-hero p{max-width:680px;margin:0;color:var(--sub)}.list-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;color:var(--sub);font-size:13px}.list-toolbar label{display:flex;align-items:center;gap:7px;width:260px;padding:0 11px;border:1px solid var(--line);border-radius:8px}.list-toolbar input{width:100%;padding:9px 0;border:0;outline:0;background:transparent;color:var(--text)}.pagination{display:flex;justify-content:center;gap:7px;margin-top:30px}.pagination a{display:grid;width:36px;height:36px;place-items:center;border:1px solid var(--line);border-radius:8px}.pagination a.active{border-color:var(--primary);background:var(--primary);color:#fff}.taxonomy-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.taxonomy-grid>a{display:flex;gap:16px;padding:22px;border:1px solid var(--line);border-radius:12px;background:var(--surface);transition:.2s}.taxonomy-grid>a:hover{border-color:var(--primary);transform:translateY(-2px)}.taxonomy-grid>a>span{display:grid;width:46px;height:46px;flex:none;place-items:center;border-radius:10px;background:var(--primary-soft);color:var(--primary);font-weight:900}.taxonomy-grid h2,.taxonomy-grid p{margin:0}.taxonomy-grid h2{font-size:18px}.taxonomy-grid p{margin:4px 0;color:var(--sub);font-size:12px}.taxonomy-grid small{color:var(--primary)}.tag-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.tag-grid a{display:flex;align-items:center;gap:8px;padding:15px;border:1px solid var(--line);border-radius:9px}.tag-grid a:hover{border-color:var(--primary)}.tag-grid b{color:var(--primary)}.tag-grid small{margin-left:auto;color:var(--sub)}
.project-hero{padding:54px 0;border-bottom:1px solid var(--line);background:var(--muted)}.project-hero nav{display:flex;gap:8px;margin-bottom:28px;color:var(--sub);font-size:12px}.project-intro{display:grid;grid-template-columns:90px 1fr;gap:24px}.large-project-logo{display:grid;width:90px;height:90px;place-items:center;border-radius:19px;background:var(--primary-soft);color:var(--primary);font-size:25px;font-weight:900}.online-badge{color:var(--success);font-size:11px;font-weight:800}.project-intro h1{max-width:820px;margin:5px 0;font-size:clamp(34px,5vw,52px);line-height:1.15;letter-spacing:-.04em}.project-intro p{max-width:760px;margin:0;color:var(--sub)}.detail-tags{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}.detail-tags a{padding:4px 10px;border-radius:99px;background:var(--primary-soft);color:var(--primary);font-size:11px}.detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:24px;align-items:start}.article-content,.project-aside>div,.standalone-content{padding:clamp(24px,4vw,46px);border:1px solid var(--line);border-radius:12px;background:var(--surface)}.article-meta{display:flex;flex-wrap:wrap;gap:16px;padding-bottom:20px;border-bottom:1px solid var(--line);color:var(--sub);font-size:11px}.article-content p,.article-content li,.standalone-content p,.standalone-content li{font-size:16px;line-height:1.9}.article-content img,.standalone-content img{max-width:100%;height:auto;border-radius:10px}.article-content pre,.standalone-content pre{overflow:auto;padding:18px;border-radius:8px;background:var(--muted)}.project-aside{position:sticky;top:24px}.project-aside h2{margin:5px 0 18px}.project-aside dl p{display:flex;justify-content:space-between;margin:0;padding:10px 0;border-bottom:1px solid var(--line)}.project-aside dt{color:var(--sub)}.project-aside dd{margin:0}.project-aside .primary-button{width:100%;margin-top:20px}.standalone-content{max-width:860px}.about-hero{padding:72px 0;border-bottom:1px solid var(--line);background:var(--muted)}.about-grid{display:grid;grid-template-columns:150px 1fr;align-items:center;gap:38px;max-width:900px}.about-avatar{width:150px;height:150px;font-size:42px}.about-grid h1{margin:6px 0;font-size:46px}.about-grid p{max-width:620px;color:var(--sub);font-size:17px}.about-actions{display:flex;gap:10px;margin-top:22px}.values-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.values-grid article{padding:25px;border:1px solid var(--line);border-radius:12px}.values-grid span{color:var(--primary);font-size:11px;font-weight:900}.values-grid h2{font-size:18px}.values-grid p{color:var(--sub);font-size:13px}.site-footer{padding:46px 0 24px;border-top:1px solid var(--line);background:var(--muted)}.footer-grid{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:42px}.footer-grid>div{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.footer-grid p{max-width:420px;color:var(--sub);font-size:13px}.footer-grid h3{margin:0 0 7px;font-size:13px}.footer-grid a:not(.brand){color:var(--sub);font-size:12px}.footer-grid a:hover{color:var(--primary)}.footer-bottom{display:flex;justify-content:space-between;margin-top:34px;padding-top:18px;border-top:1px solid var(--line);color:var(--sub);font-size:11px}

/* 通用内容在中小屏上逐级收缩列数。 */
@media(max-width:1180px){.project-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:900px){.project-grid{grid-template-columns:repeat(2,1fr)}.taxonomy-grid{grid-template-columns:repeat(2,1fr)}.tag-grid{grid-template-columns:repeat(3,1fr)}.detail-layout{grid-template-columns:1fr}.project-aside{position:static}}@media(max-width:620px){.shell{width:min(100% - 28px,1180px)}.home-hero h1{font-size:36px}.project-grid,.taxonomy-grid,.tag-grid,.values-grid{grid-template-columns:1fr}.project-card{min-height:190px}.section-heading{align-items:start}.developer-strip>.shell{align-items:flex-start;flex-direction:column}.project-intro,.about-grid{grid-template-columns:1fr}.large-project-logo{width:70px;height:70px}.about-avatar{width:100px;height:100px}.about-grid h1{font-size:36px}.list-toolbar{align-items:stretch;flex-direction:column;gap:12px}.list-toolbar label{width:100%}.footer-grid{grid-template-columns:1fr 1fr}.footer-grid>div:first-child{grid-column:1/-1}.footer-bottom{align-items:flex-start;flex-direction:column;gap:4px}}

/* 首页主体严格按设计稿组成“左侧分类 + 右侧项目网格”。 */
.showcase-layout{display:grid;grid-template-columns:205px minmax(0,1fr);gap:28px;align-items:start}.category-sidebar{position:sticky;top:86px;padding-right:20px;border-right:1px solid var(--line)}.sidebar-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-size:13px}.sidebar-title a{color:var(--primary);font-size:11px}.category-item{display:grid;width:100%;grid-template-columns:30px 1fr auto;align-items:center;gap:8px;padding:9px 8px;border:0;border-radius:7px;background:transparent;color:var(--sub);text-align:left;cursor:pointer}.category-item>span{display:grid;width:28px;height:28px;place-items:center;border-radius:7px;background:var(--muted);color:var(--primary);font-size:11px;font-weight:800}.category-item b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.category-item small{font-size:10px}.category-item:hover,.category-item.active{background:var(--muted);color:var(--primary)}.category-empty{color:var(--sub);font-size:11px}.mobile-categories{display:none}

/* 新顶部导航与分类区在小屏上还原设计稿的折叠形态。 */
@media(max-width:900px){.hero-content{padding-top:72px}.main-nav{display:none;position:absolute;top:64px;left:24px;right:24px;align-items:stretch;flex-direction:column;gap:0;padding:8px;border:1px solid var(--line);border-radius:10px;background:var(--surface);box-shadow:var(--shadow)}.main-nav.open{display:flex}.main-nav a{padding:11px}.nav-toggle{display:flex;width:38px;height:38px;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}.nav-toggle span{width:16px;height:2px;background:var(--text)}.header-inner{justify-content:flex-start;gap:10px}.header-inner .theme-button{margin-left:auto}.showcase-layout{grid-template-columns:1fr}.category-sidebar{display:none}.mobile-categories{display:flex;gap:7px;margin-bottom:24px;padding-bottom:5px;overflow:auto}.mobile-categories button{flex:none;padding:7px 12px;border:1px solid var(--line);border-radius:99px;background:var(--surface);color:var(--sub)}.mobile-categories button.active{border-color:var(--primary);background:var(--primary);color:#fff}}@media(max-width:620px){.brand b{font-size:15px}}
