:root { --ink:#24252c; --secondary:#666a77; --accent:#327df5; --line:#e7e7ed; --surface:#f5f5f8; --page:#fff; --font:Inter,"Portfolio Sans","PingFang SC","Microsoft YaHei",sans-serif; }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; scroll-padding-top:100px; scrollbar-width:none; }
html::-webkit-scrollbar,body::-webkit-scrollbar { display:none; width:0; height:0; }
body { margin:0; background:var(--page); color:var(--ink); font-family:var(--font); font-size:16px; line-height:1.6; -webkit-font-smoothing:antialiased; }
button { font:inherit; cursor:pointer; -webkit-tap-highlight-color:transparent; }
a { color:inherit; text-decoration:none; -webkit-tap-highlight-color:transparent; }
img { display:block; max-width:100%; }
[hidden] { display:none!important; }
:focus-visible { outline:3px solid var(--accent); outline-offset:5px; }
.container,.header-inner { width:min(1360px,calc(100% - 112px)); margin-inline:auto; }
.site-header { height:72px; border-bottom:1px solid #efeff3; background:rgba(255,255,255,.97); position:sticky; top:0; z-index:20; }
.header-inner { height:100%; display:flex; align-items:center; }
.wordmark { font-weight:600; font-size:22px; white-space:nowrap; }
.intro { padding:48px 0 36px; }
.intro h1 { margin:0; font-size:clamp(36px,3.25vw,49px); line-height:1.33; font-weight:500; letter-spacing:0; }
.intro-description { margin:14px 0 0; font-size:17px; line-height:1.95; color:var(--secondary); }
.featured-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.featured-project { min-width:0; }
.artwork { margin:0; width:100%; position:relative; overflow:hidden; border-radius:4px; background:var(--surface); aspect-ratio:16/9; }
.artwork img { width:100%; height:100%; object-fit:contain; }
.featured-project .artwork { border-radius:6px; }
.featured-project h2 { margin:17px 0 7px; font-size:20px; font-weight:500; line-height:1.4; }
.featured-project p { margin:0; color:var(--secondary); font-size:15px; line-height:1.7; }
.capability-tags { display:flex; flex-wrap:wrap; column-gap:26px; row-gap:12px; margin-top:38px; padding-top:22px; border-top:1px solid var(--line); }
.capability-tag { font-size:14px; line-height:1.8; color:var(--secondary); white-space:nowrap; }
.work-stream { padding-bottom:80px; }
.stream-project { margin-top:88px; scroll-margin-top:105px; }
.project-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:28px; }
.project-heading :is(h1,h2) { margin:0; font-size:36px; font-weight:500; line-height:1.4; }
.project-heading p { margin:9px 0 0; color:var(--secondary); font-size:18px; line-height:1.75; }
.tag-list { display:flex; flex-wrap:wrap; gap:7px; flex-shrink:0; padding-bottom:5px; }
.tag { display:inline-flex; align-items:center; min-height:28px; padding:3px 9px; border:1px solid var(--line); border-radius:4px; color:var(--secondary); background:#fafafa; font-size:13px; line-height:1.5; }
.project-artworks { display:grid; gap:24px; }
.gallery-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.gallery-row-wide { grid-template-columns:minmax(0,1fr); }
.image-retry { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); border:1px solid var(--line); border-radius:4px; padding:12px 18px; background:#fff; color:var(--ink); font-size:15px; }
.image-failed img { visibility:hidden; }
.summary-body { height:100svh; overflow:hidden; background:#f0f0f4; }
.summary-stage { display:flex; justify-content:center; align-items:center; width:100%; height:calc(100svh - 66px); padding:16px 24px 8px; }
.summary-stage img { width:auto; height:auto; max-width:100%; max-height:100%; object-fit:contain; background:#fff; }
.page-numbers { height:66px; display:flex; align-items:center; gap:6px; padding:0 24px; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; white-space:nowrap; }
.page-numbers::-webkit-scrollbar { display:none; }
.page-numbers button { flex:none; min-width:34px; height:34px; padding:0 7px; border:0; border-radius:4px; background:none; color:#666a77; font-size:14px; font-variant-numeric:tabular-nums; }
.page-numbers button[aria-current="page"] { color:#fff; background:var(--ink); }
.page-numbers button:hover:not([aria-current="page"]) { background:#e2e2e9; color:var(--ink); }
.skip-link { position:fixed; top:-100px; left:20px; padding:12px 20px; background:#fff; z-index:100; border:2px solid var(--accent); }
.skip-link:focus { top:12px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.noscript-note { margin:40px; }
@media (min-width:1700px) { .intro { padding-top:76px; } }
@media (max-width:1100px) {
  .container,.header-inner { width:calc(100% - 64px); }
  .intro h1 { font-size:38px; }
  .intro-description { font-size:16px; }
  .featured-grid { gap:18px; }
  .featured-project p { font-size:14px; }
  .capability-tags { column-gap:20px; }
  .project-heading h2 { font-size:32px; }
  .project-heading p { font-size:16px; }
  .project-heading { align-items:flex-start; }
}
@media (max-width:800px) {
  .container,.header-inner { width:calc(100% - 40px); }
  .intro h1 { font-size:32px; }
  .featured-grid { gap:14px; }
  .featured-project h2 { font-size:18px; }
  .project-heading { display:block; }
  .tag-list { margin-top:14px; }
  .gallery-row,.project-artworks { gap:14px; }
}
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }

/* Approved portfolio template: brand system on the left, complete website on the right. */
.project-heading :is(h1,h2) { font-size:clamp(36px,3.4vw,52px); }
.project-heading p { font-size:22px; }
.project-heading { margin-bottom:28px; }
.project-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; align-items:start; }
.brand-column,.website-column { min-width:0; }
.column-title { margin:0 0 24px; font-size:clamp(22px,2vw,30px); font-weight:500; line-height:1.35; }
.project-columns .artwork { border-radius:0; }
.brand-support { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:16px; }
.material-artworks { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:32px; }
.material-artworks.has-one-artwork { grid-template-columns:minmax(0,1fr); }
.website-frame { position:relative; display:block; width:100%; margin:0; aspect-ratio:var(--website-ratio); overflow:hidden; background:var(--surface); }
.website-original { position:absolute; max-width:none; }
.website-original .website-tile { display:block; width:100%; max-width:none; height:auto; }
.website-placeholder { width:100%; aspect-ratio:3164 / 9272; background:var(--surface); }
.website-frame .image-retry { top:16px; right:16px; left:auto; transform:none; }
@media (max-width:1100px) {
  .project-heading p { font-size:19px; }
  .project-heading :is(h1,h2) { font-size:36px; }
}
@media (max-width:800px) {
  .project-columns { gap:16px; }
  .column-title { font-size:20px; margin-bottom:18px; }
  .brand-support,.material-artworks { gap:12px; }
  .brand-support { margin-top:12px; }
  .material-artworks { margin-top:24px; }
}

.project-columns.without-website { grid-template-columns:minmax(0,1fr); }
.without-website .material-artworks { grid-template-columns:repeat(4,minmax(0,1fr)); }
.without-website .material-artworks.has-one-artwork > .artwork { grid-column:1 / -1; }

/* Two levels: cover directory and complete project pages. */
[data-view="home"] .selected-section { padding-bottom:80px; }
[data-view="home"] .featured-grid { row-gap:52px; }
.project-card { display:block; border-radius:16px; }
.cover-window { border:0; border-radius:16px; overflow:hidden; background:transparent; box-shadow:none; transform:none; transform-origin:center; transition:transform .25s cubic-bezier(.22,1,.36,1),box-shadow .25s ease; }
.cover-window .artwork { border-radius:0; }
.project-card[data-project-link="miaoda"] .cover-window { position:relative; }
.project-card[data-project-link="miaoda"] .cover-window::after { content:""; position:absolute; inset:0; z-index:1; border:1px solid rgba(36,37,44,.14); border-radius:inherit; pointer-events:none; }
.card-details { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-top:17px; }
.card-caption { min-width:0; flex:1; }
.featured-project .card-caption h2 { margin:0 0 7px; }
.featured-project .card-caption p { margin:0; }
.card-caption .tag-list { margin-top:13px; padding:0; gap:7px; }
.card-enter { flex:none; display:flex; align-items:center; justify-content:center; width:42px; height:42px; margin-top:1px; border:1px solid #a5a9b5; border-radius:50%; color:var(--ink); transition:background .18s ease,color .18s ease,border-color .18s ease; }
.card-enter svg { width:19px; height:19px; }
.project-card:is(:hover,:focus-visible) .cover-window { transform:translateY(-4px) scale(1.01); box-shadow:2px 8px 24px 2px rgba(0,0,0,.08); }
.project-card:is(:hover,:focus-visible) .card-enter { background:var(--accent); border-color:var(--accent); color:#fff; }
.cover-retry { position:static; transform:none; margin-top:12px; padding:9px 12px; font-size:14px; }
.project-page { padding-bottom:80px; }
.project-page .stream-project { margin-top:48px; }
.project-return { margin-left:auto; display:flex; align-items:center; min-height:44px; padding:0 8px; font-size:16px; color:var(--secondary); }
.project-return:hover { color:var(--ink); text-decoration:underline; text-underline-offset:5px; }
@media (max-width:1100px) {
  [data-view="home"] .featured-grid { row-gap:42px; }
  .card-details { gap:10px; }
  .card-enter { width:34px; height:34px; }
}
@media (prefers-reduced-motion:reduce) {
  .cover-window,.card-enter { transition:none; }
  .project-card:is(:hover,:focus-visible) .cover-window { transform:none; }
}
