:root {
    color-scheme: dark;
    --bg: #0e1315;
    --panel: #171d20;
    --line: #31393c;
    --text: #f5f1e9;
    --muted: #b1b8b9;
    --lime: #c5eb35;
    font-family: Inter, system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
.frame { width: min(96.2%, 1440px); margin-inline: auto; }
.work-header { background: #101416; border-bottom: 1px solid #23282a; }
.header-row { min-height: 49px; padding-inline: clamp(0px,2.5vw,34px); display: flex; align-items: center; justify-content: space-between; gap: clamp(10px,2vw,30px); }
.wordmark { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-stretch: condensed; font-size: 19px; font-weight: 900; letter-spacing: -.09em; }
.wordmark svg { width: 37px; color: var(--lime); }
.wordmark span span, .work-signature span { color: var(--lime); }
.work-nav { display: flex; align-items: center; justify-content: center; gap: clamp(13px,3vw,35px); white-space: nowrap; font-size: 12px; }
.work-nav span { margin-right: 3px; }
.work-nav a:hover, .work-footer a:hover, .breadcrumbs a:hover { color: var(--lime); }
.work-search { display: flex; flex: 0 1 31%; min-width: 200px; align-items: center; gap: 5px; border: 1px solid #42484a; border-radius: 18px; background: #272c2e; }
.work-search input { min-width: 0; width: 100%; height: 32px; padding: 0 10px 0 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }
.work-search:focus-within { border-color: var(--lime); }
.work-search button { display: grid; place-items: center; padding: 0 0 0 10px; border: 0; background: transparent; color: var(--text); }
.work-search svg, .work-download svg, .work-stats svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

.work-hero { position: relative; isolation: isolate; min-height: clamp(300px,31vw,465px); display: flex; align-items: center; overflow: hidden; background: radial-gradient(ellipse at 72% 75%,#1d2427,transparent 70%); }
.hero-scene { position: absolute; z-index: -1; right: -1.6%; top: 50%; width: 63%; aspect-ratio: 605 / 305; transform: translateY(-50%); pointer-events: none; }
.hero-art { display: block; width: 100%; height: 100%; }
.hero-copy { padding: 20px 0 25px clamp(0px,2.5vw,36px); }
.hero-copy h1 { margin: 0; font-size: clamp(36px,4.35vw,68px); font-weight: 900; letter-spacing: -.045em; line-height: 1.02; }
.hero-copy h1 span { position: relative; display: inline-block; }
.hero-copy h1 span::after { content: ""; position: absolute; left: 0; right: 0; height: 9px; bottom: -5px; border-top: 4px solid var(--lime); border-radius: 46% 50% 0 0; transform: rotate(-1deg); }
.hero-copy > p { margin: 17px 0 19px; color: var(--muted); font-size: clamp(15px,1.7vw,22px); }
.work-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 20px; min-height: 42px; border: 1px solid var(--lime); border-radius: 9px; background: var(--lime); color: #111709; font-weight: 750; font-size: 14px; }
.work-button:hover { background: #d8f96c; }
.work-button span { font-size: 19px; line-height: 1; }
.work-stats { display: flex; margin: 34px 0 0; padding: 0; }
.work-stats div { display: grid; grid-template-columns: auto 1fr; column-gap: 9px; padding-inline: clamp(8px,2vw,27px); border-right: 1px solid #343c3f; }
.work-stats div:first-child { padding-left: 0; }
.work-stats div:last-child { border: 0; }
.work-stats svg { grid-row: 1 / 3; width: 25px; align-self: center; color: var(--lime); }
.work-stats dt { font-size: 15px; font-weight: 850; white-space: nowrap; line-height: 1; }
.work-stats dd { margin: 2px 0 0; font-size: 11px; color: var(--muted); white-space: nowrap; }

.work-categories, .work-cards { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(9px,1.6vw,24px); }
.work-category { display: flex; align-items: end; position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 1.58; border: 1px solid #41484b; border-radius: 14px; background: #202628; }
.work-category::after { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(transparent 54%,#080a0ae8); }
.work-category img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 42%; transition: transform .25s; }
.work-category:hover img { transform: scale(1.045); }
.work-category:hover, .work-card:hover { border-color: #80964a; }
.work-category span { padding: 12px 13px; font-weight: 850; font-size: clamp(15px,2vw,26px); }
.work-category b { margin-left: 4px; font-weight: 400; }
.work-catalog { margin-top: 23px; padding-bottom: 28px; scroll-margin-top: 12px; }
.work-section-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }
.work-section-head h1, .work-section-head h2 { position: relative; margin: 0; padding-left: 20px; letter-spacing: -.04em; line-height: 1.15; font-size: clamp(22px,2.5vw,36px); }
.work-section-head h1::before, .work-section-head h2::before { content: ""; width: 5px; height: .95em; background: var(--lime); transform: skewX(-13deg); position: absolute; left: 4px; top: .1em; }
.work-tabs { display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; }
.work-tabs a, .filter-options a { border: 1px solid transparent; border-radius: 9px; padding: 5px 8px; font-size: 11px; color: var(--muted); }
.work-tabs a[aria-current], .work-tabs a:hover, .filter-options a[aria-current], .filter-options a:hover { border-color: var(--lime); color: var(--lime); }
.work-card { min-width: 0; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: radial-gradient(ellipse at 42% 16%,#1e2529,#151a1d 73%); }
.work-preview { display: grid; place-items: center; height: auto; aspect-ratio: 1.85; padding: 9px 13px 0; }
.work-preview img, .work-preview svg { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.work-preview svg { width: 82%; }
.work-star, .work-badge { position: absolute; top: 10px; }
.work-star { left: 10px; color: var(--muted); background: #151a1da8; padding: 0 3px; border: 0; border-radius: 5px; font-size: 20px; line-height: 1.05; }
.work-star:hover, .work-star[aria-pressed=true] { color: var(--lime); }
.work-badge { right: 11px; color: var(--lime); border: 1px solid var(--lime); padding: 2px 8px; border-radius: 7px; font-size: 10px; font-weight: 800; }
.work-card-info { padding: 7px 41px 11px 11px; min-height: 71px; }
.work-card-info h3 { margin: 0 0 5px; font-size: clamp(12px,1.35vw,17px); line-height: 1.24; overflow-wrap: anywhere; }
.work-card-info h3 a:hover { color: var(--lime); }
.work-card-info p { margin: 3px 0 0; font-size: 11px; color: #d1d5d6; }
.card-size span { color: var(--muted); font-size: 15px; }
.work-download { display: grid; place-items: center; position: absolute; bottom: 10px; right: 10px; width: 33px; height: 33px; border: 1px solid var(--lime); border-radius: 8px; color: var(--lime); background: #1b2117; }
.work-download:hover { background: var(--lime); color: #131905; }
.work-more, .work-pagination { display: flex; justify-content: center; gap: 10px; margin: 22px auto 0; }
.work-more { width: max-content; color: var(--lime); }
.work-pagination a, .work-pagination span { display: grid; place-items: center; min-width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; }
.work-pagination span, .work-pagination a:hover { color: var(--lime); border-color: var(--lime); }
.work-filterbar { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 10px; margin-bottom: 16px; color: var(--muted); font-size: 13px; }
.work-filterbar p { margin: 0; }
.work-filters summary { cursor: pointer; color: var(--lime); text-align: right; }
.work-filters[open] { grid-column: 1 / -1; grid-row: 2; }
.filter-panel { display: grid; gap: 16px; margin-top: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.filter-options, .filter-panel form { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.filter-panel select { color: var(--text); background: var(--bg); border: 1px solid var(--line); padding: 5px; border-radius: 6px; }
.filter-panel input { accent-color: var(--lime); }
.filter-panel .work-button { min-height: 34px; padding-block: 4px; }
.work-empty { grid-column: 1 / -1; color: var(--muted); }
.work-footer { display: flex; gap: 22px; padding-block: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.work-signature { color: var(--text); font-weight: 900; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 9px; padding-block: 19px; color: var(--muted); font-size: 13px; }
.detail-page, .about-page { padding-bottom: 34px; }
.detail-layout, .about-model { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.detail-preview { position: relative; min-width: 0; padding: 12px; background: radial-gradient(ellipse,#232d31,#111719); }
.detail-preview > img, .model-cover-placeholder, .stl-viewer { width: 100%; height: clamp(280px,42vw,550px); object-fit: contain; }
.detail-file { position: absolute; z-index: 2; top: 16px; left: 15px; right: 15px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); pointer-events: none; }
.detail-file b { padding: 3px 8px; border: 1px solid var(--lime); border-radius: 7px; color: var(--lime); }
.detail-info, .about-model { padding: clamp(18px,4vw,48px); }
.detail-info h1, .about-page h1 { margin: 0; font-size: clamp(25px,3.6vw,50px); letter-spacing: -.045em; line-height: 1.1; overflow-wrap: anywhere; }
.about-page h1 { margin-bottom: 20px; }
.eyebrow { color: var(--lime); font-size: 12px; }
.detail-lead, .detail-note, .about-text { color: var(--muted); line-height: 1.65; overflow-wrap: anywhere; }
.detail-note { font-size: 12px; }
.detail-specs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.detail-specs div { background: var(--bg); padding: 9px; }
.detail-specs dt { color: var(--muted); font-size: 12px; }
.detail-specs dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.about-model { grid-template-columns: minmax(0,1fr) minmax(0,2fr); gap: 20px; margin-top: 18px; }
.about-model h2, .about-text p:first-child { margin-top: 0; }
.stl-viewer { position: relative; display: flex; flex-direction: column; overflow: hidden; }
.stl-viewer-canvas { flex: 1; min-height: 0; }
.stl-viewer-canvas canvas { display: block; }
.stl-viewer-toolbar { position: absolute; bottom: 0; inset-inline: 0; display: flex; flex-wrap: wrap; gap: 7px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #161c1ee0; }
.viewer-btn { border: 1px solid var(--line); border-radius: 5px; padding: 6px 8px; color: var(--text); background: var(--panel); font-size: 11px; }
.viewer-btn:hover { color: var(--lime); }
.viewer-status { color: var(--muted); font-size: 10px; }
@media (min-width: 1100px) {
    .header-row { min-height: 60px; }
    .work-nav { font-size: 14px; }
    .work-search input { height: 38px; font-size: 13px; }
}
@media (max-width: 820px) {
    .header-row { flex-wrap: wrap; padding-block: 8px; }
    .work-nav { order: 3; width: 100%; justify-content: start; overflow-x: auto; }
    .hero-copy h1 { font-size: clamp(30px,5vw,42px); }
    .work-section-head { align-items: start; flex-direction: column; }
    .work-tabs { max-width: 100%; }
}
@media (max-width: 600px) {
    .frame { width: calc(100% - 24px); }
    .wordmark { font-size: 15px; }
    .wordmark svg { width: 25px; }
    .work-search { min-width: 0; flex: 1 1 140px; }
    .work-nav { gap: 14px; font-size: 11px; }
    .work-hero { display: block; padding-bottom: 1px; min-height: 0; }
    .hero-copy { padding: 21px 0 5px; }
    .hero-scene { z-index: -1; position: relative; width: min(100%,450px); top: auto; right: auto; margin: -7px auto 0; transform: none; }
    .work-hero { display: flex; flex-direction: column-reverse; align-items: stretch; }
    .work-stats { margin-top: 20px; }
    .work-stats div { padding-inline: 8px; }
    .work-stats svg { width: 20px; }
    .work-stats dd { font-size: 10px; }
    .work-categories, .work-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .work-catalog { margin-top: 18px; }
    .detail-layout, .about-model { grid-template-columns: 1fr; }
}
.work-display { display: flex; gap: 6px; }
.work-display button { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--muted); font-size: 12px; }
.work-display button[aria-pressed=true] { border-color: var(--lime); color: var(--lime); }
.work-cards[data-mode=compact] { grid-template-columns: repeat(2,minmax(0,1fr)); }
.work-cards[data-mode=compact] .work-card { display: grid; grid-template-columns: minmax(98px,30%) 1fr; align-items: center; }
.work-cards[data-mode=compact] .work-preview { padding: 5px; }
.work-cards[data-mode=compact] .work-star, .work-cards[data-mode=compact] .work-badge { top: 5px; }
.work-cards[data-mode=compact] .work-badge { right: 7px; }
.work-cards[data-mode=compact] .work-card-info { padding-top: 24px; }
.work-cards[data-mode=blueprint] .work-preview { background: repeating-linear-gradient(0deg,#a7d54417 0 1px,transparent 1px 20px),repeating-linear-gradient(90deg,#a7d54417 0 1px,transparent 1px 20px),#131e21; }
@media (max-width: 600px) {
    .work-cards[data-mode=compact] { grid-template-columns: 1fr; }
}

.hero-art { mask-image: linear-gradient(to right, transparent, black 3%, black 96%, transparent); }
.wheel-spin { animation: assembly-rotation 18s linear infinite; transform-origin: 0 0; }
.assembly-black .wheel-spin { animation-duration: 11s; animation-direction: reverse; }
@keyframes assembly-rotation { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .wheel-spin { animation: none; } }

.model-downloads { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.8rem; }
.model-downloads a { padding:.45rem .65rem; border:1px solid currentColor; border-radius:.35rem; }
.card-viewer { width: 100%; height: 100%; min-height: 180px; pointer-events: none; background: transparent; }

/* Category gallery */
.category-section { margin: 18px 0 46px; }
.category-heading { display:flex; align-items:end; justify-content:space-between; gap:16px; margin:0 0 20px; }
.category-heading p { margin:0 0 7px; color:#b9d64b; font-weight:700; font-size:12px; letter-spacing:.14em; }
.category-heading h2 { margin:0; font-size:clamp(26px,2.7vw,39px); letter-spacing:-.035em; }
.category-heading > span { color:var(--muted); font-size:14px; }
.category-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.category-tile { position:relative; display:flex; min-width:0; min-height:185px; overflow:hidden; border:1px solid #303b3c; border-radius:14px; background:radial-gradient(ellipse at 75% 40%,#283537 0,#1b2426 48%,#171d20 100%); transition:border-color .2s,transform .2s; }
.category-tile:hover { border-color:var(--lime); transform:translateY(-3px); }
.category-tile-copy { position:relative; z-index:1; display:flex; flex-direction:column; justify-content:end; gap:6px; width:75%; padding:18px; }
.category-tile-copy strong { font-size:clamp(15px,1.35vw,20px); line-height:1.2; }
.category-tile-copy small { color:#bec9c2; font-size:13px; }
.category-tile-visual { position:absolute; inset:4% -4% 10% 39%; pointer-events:none; }
.category-model { display:block; width:100%; height:100%; min-height:140px; pointer-events:none; background:transparent; }
@media(max-width:900px) { .category-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:600px) { .category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; } .category-tile { min-height:150px; } .category-tile-copy { padding:12px; } .category-tile-copy small { font-size:12px; } }

.category-tile { isolation:isolate; background:#1b2426; }
.category-illustration { position:absolute; z-index:-2; inset:0; width:100%; height:100%; object-fit:cover; object-position:center; transition:transform .3s ease; }
.category-tile::after { content:""; position:absolute; z-index:-1; inset:0; background:linear-gradient(90deg,rgba(10,15,16,.92) 0%,rgba(10,15,16,.66) 36%,rgba(10,15,16,.08) 100%),linear-gradient(0deg,rgba(10,15,16,.68),transparent 65%); }
.category-tile:hover .category-illustration { transform:scale(1.05); }
