/* A quiet sleeve for a collection of imagined 1970s computing covers. */
:root { --muted: var(--muted-foreground); --rule: var(--border); --rust: var(--brand); --font-editorial: var(--font-serif); }
.collection-page { font-family: var(--font-sans); }
.collection-page [hidden] { display: none !important; }
.collection { max-width: 1320px; min-height: 100svh; padding: 0 44px; margin: auto; display: flex; flex-direction: column; }
.masthead { height: 74px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--rule); }
.masthead a { color: var(--foreground); font-family: var(--font-editorial); font-size: 24px; text-decoration: none; letter-spacing: -.6px; }
.masthead-tools > span, .masthead > span, .collection-footer, .browse-hint { font-family: var(--font-mono); color: var(--muted); font-size: 10px; letter-spacing: .03em; }
.collection main { flex: 1; }
.collection-toolbar { display: flex; justify-content: center; padding: 28px 0 0; }
.categories { display: flex; justify-content: center; gap: 28px; }
.collection-page button { font: inherit; font-size: 12px; font-weight: 400; color: var(--muted); background: none; box-shadow: none; border: 0; border-radius: 0; cursor: pointer; }
.categories button { position: relative; padding: 9px 0; min-height: 40px; letter-spacing: .02em; }
.categories button[aria-pressed='true'] { color: var(--foreground); }
.categories button[aria-pressed='true']::after { content: ''; position: absolute; height: 1px; bottom: 0; left: 0; right: 0; background: var(--rust); }
.collection-page button:hover { color: var(--foreground); background: none; }
.collection-page :focus-visible { outline: 2px solid var(--rust); outline-offset: 5px; }
.projects { list-style: none; padding: 0; margin: 30px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.project { min-width: 0; }
.project-link { display: block; color: inherit; text-decoration: none; }
.project-art { display: block; width: 100%; aspect-ratio: 1; background-size: cover; background-position: center; background-color: var(--art-placeholder); border-radius: 2px; }
.project-copy { padding: 14px 0; }
.project-category, .selection-category { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); }
.project-copy h2 { font-family: var(--font-editorial); font-size: 24px; font-weight: 400; margin: 5px 0; }
.project-copy p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; }
.project-arrow { display: none; }
/* JS turns the semantic link list into a roving, selectable cover flow. */
.enhanced .projects:not(.is-list) { position: relative; display: block; height: 384px; margin: 22px -20px 0; perspective: 1000px; overflow: hidden; touch-action: pan-y; user-select: none; }
.enhanced .projects:not(.is-list) .project { position: absolute; width: 264px; left: 50%; top: 34px; margin-left: -132px; transform: translateX(var(--shift)) translateZ(var(--depth)) rotateY(var(--angle)); z-index: var(--layer); opacity: var(--opacity); transition: transform 440ms cubic-bezier(.2,.75,.25,1), opacity 350ms; }
.enhanced .projects:not(.is-list) .project-link { box-shadow: 0 14px 21px -15px hsl(var(--shadow-color) / .47); border-radius: 2px; -webkit-user-drag: none; }
.enhanced .projects:not(.is-list) .project-copy { display: none; }
.enhanced .projects:not(.is-list) .project-link:focus-visible { outline-offset: 5px; }
@media (hover: hover) and (pointer: fine) {
    .enhanced .projects:not(.is-list) .project:has(.project-link[aria-current='true']):hover {
        transform: translateX(var(--shift)) translateY(-3px) translateZ(var(--depth)) rotateY(var(--angle)) scale(1.04);
    }
}
.selection { max-width: 420px; margin: 0 auto; text-align: center; padding: 0 15px; }
.selection-title { font-family: var(--font-editorial); font-weight: 400; font-size: 30px; letter-spacing: -.8px; line-height: 1.2; margin: 9px 0 10px; }
.selection-description { color: var(--muted); font-size: 12px; line-height: 1.7; min-height: 41px; margin: 0; }
.selection-link { display: inline-block; color: var(--foreground); font-family: var(--font-editorial); font-size: 14px; padding: 5px 0 2px; margin-top: 6px; text-decoration: none; border-bottom: 1px solid var(--rule); }
.selection-link:hover { border-color: var(--rust); color: var(--rust); }
.carousel-footer { display: flex; justify-content: center; align-items: center; gap: 22px; margin: 25px 0 0; }
.carousel-footer button { width: 36px; height: 36px; padding: 0; border: 1px solid var(--rule); border-radius: 50%; color: var(--foreground); font-size: 16px; }
.carousel-footer button:hover { border-color: var(--muted); }
.carousel-footer button:disabled { opacity: .3; cursor: default; }
.project-count { font-family: var(--font-mono); font-size: 10px; color: var(--muted); min-width: 53px; text-align: center; }
.browse-hint { text-align: center; margin: 26px 0 40px; font-size: 9px; }
.collection-footer { display: flex; justify-content: space-between; align-items: center; min-height: 62px; border-top: 1px solid var(--rule); }
.collection-footer-end { display: flex; align-items: center; }
.collection-contact { color: var(--muted); text-decoration: none; padding: 12px 0; transition: color var(--motion-fast) var(--ease-standard); }
.collection-contact:hover, .collection-contact:focus-visible { color: var(--brand); }
.collection-footer .index-toggle { color: var(--foreground); font-family: var(--font-editorial); font-size: 12px; padding: 12px 0 12px 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; top: -80px; left: 16px; z-index: 50; background: var(--background); color: var(--foreground); padding: 12px; }
.skip-link:focus { top: 12px; }
.enhanced .projects.is-list { max-width: 780px; margin: 38px auto; display: block; }
.is-list .project { border-bottom: 1px solid var(--rule); }
.is-list .project-link { display: flex; gap: 22px; align-items: center; padding: 13px 0; }
.is-list .project-link:hover h2 { color: var(--rust); }
.is-list .project-art { width: 64px; flex-shrink: 0; }
.is-list .project-copy { padding: 0; }
.is-list .project-copy h2 { font-size: 21px; }
.is-list .project-category { font-size: 8px; }
@media (min-height: 850px) and (min-width: 701px) { .enhanced .projects:not(.is-list) { margin-top: 48px; height: 420px; } }
@media (max-width: 700px) {
    .collection { padding: 0 22px; }
    .masthead { height: 64px; }
    .masthead a { font-size: 22px; white-space: nowrap; }
    .masthead-tools > span, .masthead > span { font-size: 8px; max-width: 140px; text-align: right; }
    .collection-toolbar { padding-top: 18px; }
    /* One row that scrolls sideways, fading at the edges, instead of wrapping. */
    .collection-toolbar { justify-content: flex-start; margin: 0 -22px; }
    .categories {
        justify-content: flex-start; gap: 20px; max-width: 100%; padding: 0 22px;
        overflow-x: auto; overscroll-behavior-x: contain; scroll-padding-inline: 22px; scrollbar-width: none;
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
        mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
    }
    .categories::-webkit-scrollbar { display: none; }
    .categories button { flex: 0 0 auto; font-size: 11px; white-space: nowrap; }
    .enhanced .projects:not(.is-list) { margin: 18px -22px 0; height: 300px; perspective: 750px; }
    .enhanced .projects:not(.is-list) .project { width: 206px; margin-left: -103px; top: 28px; }
    .selection-title { font-size: 28px; }
    .selection-description { min-height: 41px; }
    .carousel-footer { margin-top: 20px; }
    .carousel-footer button { width: 40px; height: 40px; }
    .browse-hint { margin: 22px 0 30px; }
    .collection-footer { font-size: 8px; min-height: 55px; }
    .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .is-list .project-link { gap: 15px; }
    .is-list .project-art { width: 56px; }
}
@media (prefers-reduced-motion: reduce) { .collection-page *, .collection-page *::before { transition: none !important; animation: none !important; } }
.masthead-tools { display: flex; align-items: center; gap: 20px; }
.collection-page .theme-toggle { width: 34px; height: 34px; min-height: 34px; padding: 0; border: 1px solid var(--rule); border-radius: 50%; color: var(--muted); }
.collection-page .theme-toggle:hover { border-color: var(--muted); color: var(--foreground); }
@media (max-width: 700px) { .masthead-tools { gap: 12px; } }

/* Cover Flow's signature: covers stand on a glossy floor. Browsers without
   box-reflect simply show the shadow. */
.enhanced .projects:not(.is-list) .project-link { -webkit-box-reflect: below 3px linear-gradient(transparent 74%, hsl(0 0% 100% / .15)); }
.enhanced .projects:not(.is-list) .project { transition: transform 440ms cubic-bezier(.2,.75,.25,1), opacity 350ms, filter 350ms; filter: brightness(var(--dim, 1)); }
:root[data-theme="dark"] .enhanced .projects:not(.is-list) .project-link { -webkit-box-reflect: below 3px linear-gradient(transparent 76%, hsl(0 0% 100% / .12)); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .enhanced .projects:not(.is-list) .project-link { -webkit-box-reflect: below 3px linear-gradient(transparent 76%, hsl(0 0% 100% / .12)); }
}

/* The caption settles in each time the selection changes. */
@media (prefers-reduced-motion: no-preference) {
    @keyframes caption-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
    .selection.is-changing > * { animation: caption-in 360ms cubic-bezier(.2,.75,.25,1) both; }
    .selection.is-changing > :nth-child(2) { animation-delay: 30ms; }
    .selection.is-changing > :nth-child(3) { animation-delay: 60ms; }
    .selection.is-changing > :nth-child(4) { animation-delay: 90ms; }
}
.selection-link span { display: inline-block; transition: transform var(--motion-fast) var(--ease-standard); }
.selection-link:hover span { transform: translate(2px, -2px); }
.carousel-footer button { transition: border-color var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard); }
.carousel-footer button:hover:not(:disabled) { border-color: var(--foreground); }
.carousel-footer button:active:not(:disabled) { transform: scale(.94); }

/* Index view: a numbered catalogue. */
.enhanced .projects.is-list { counter-reset: project; }
.is-list .project:not([hidden]) { counter-increment: project; }
.is-list .project-link { position: relative; padding: 16px 40px 16px 0; }
.is-list .project-link::before { content: counter(project, decimal-leading-zero); flex: 0 0 22px; align-self: flex-start; padding-top: 24px; color: var(--muted); font-family: var(--font-mono); font-size: 10px; }
.is-list .project-art { transition: transform var(--motion-settle) var(--ease-standard), box-shadow var(--motion-settle) var(--ease-standard); }
.is-list .project-link:hover .project-art { transform: translateY(-2px); box-shadow: 0 12px 18px -12px hsl(var(--shadow-color) / .55); }
.is-list .project-copy h2 { transition: color var(--motion-fast) var(--ease-standard); }
.is-list .project-arrow { display: block; position: absolute; right: 4px; top: 50%; color: var(--muted); font-size: 16px; opacity: 0; transform: translate(-4px, -50%); transition: opacity var(--motion-fast) var(--ease-standard), transform var(--motion-settle) var(--ease-standard); }
.is-list .project-link:hover .project-arrow,
.is-list .project-link:focus-visible .project-arrow { opacity: 1; color: var(--rust); transform: translate(0, -50%); }
@media (max-width: 700px) {
    .is-list .project-link { padding-right: 0; }
    .is-list .project-link::before { display: none; }
    .is-list .project-arrow { display: none; }
}

/* External projects identify their destination. */
.project-destination { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.6; }


/* Individual covers share the seventies print / island-world art direction. */
.art-murm { background-image: url('/images/myst-murm.webp'); }
.art-pulse { background-image: url('/images/myst-pulse.webp'); }
.art-hype { background-image: url('/images/myst-hype.webp'); }
.art-dialup { background-image: url('/images/myst-dialup.webp'); }
.art-notes { background-image: url('/images/myst-notes.webp'); }
.art-time-zones { background-image: url('/images/myst-time-zones.webp'); }
.art-gtd { background-image: url('/images/myst-gtd.webp'); }
.art-business-days { background-image: url('/images/myst-business-days.webp'); }
.art-gantt { background-image: url('/images/myst-gantt.webp'); }
.art-solar { background-image: url('/images/myst-solar.webp'); }
.art-json { background-image: url('/images/myst-json.webp'); }
.art-tmux { background-image: url('/images/myst-tmux.webp'); }
.art-aspect { background-image: url('/images/myst-aspect.webp'); }
.art-systems { background-image: url('/images/myst-systems.webp'); }
.art-culture { background-image: url('/images/myst-culture.webp'); }
.art-autonomous { background-image: url('/images/myst-autonomous.webp'); }
