/* Project archive experience — optional enhancement; content works without it. */
:root { --archive-ice: #a3d8ff; --archive-line: rgb(151 199 247 / .23); }
.archive { position: relative; }
.archive .section-head { position: relative; align-items: end; gap: clamp(1.5rem, 4vw, 3.75rem); }
.archive .section-title { max-width: 24ch; }
.archive-chapter { display: inline-flex; align-items: center; gap: .8rem; margin: .7rem 0 0; color: #b1bfd0; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.archive-chapter::before { content: ""; display: inline-block; width: 34px; height: 1px; background: #87b9e7; }
.archive .projects-paginated { display: grid; gap: clamp(1.15rem, 3vw, 2.25rem); }
.archive .project { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(128deg, rgb(141 191 240 / .09), transparent 43%), #191f28; box-shadow: inset 0 1px rgb(255 255 255 / .025); transition: border-color .38s ease, box-shadow .38s ease, transform .45s cubic-bezier(.22,1,.36,1); }
/* No diffuse pointer spotlight on cards; only the discrete dot grid reacts to the cursor. */
.archive .project::before { content: none; }
.archive .project::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: linear-gradient(90deg, transparent, #79b8fa, transparent); opacity: 0; transform: scaleX(.38); transition: transform .65s cubic-bezier(.22,1,.36,1), opacity .45s ease; pointer-events: none; }
.archive .project:hover::before, .archive .project:focus-within::before { opacity: 1; }
.archive .project:hover::after, .archive .project:focus-within::after { transform: scaleX(1); opacity: .75; }
.archive .project:hover { border-color: rgb(125 180 240 / .42); box-shadow: 0 24px 85px -58px rgb(125 180 240 / .35), inset 0 1px rgb(255 255 255 / .04); transform: translateY(-3px); }
.archive .project:focus-within { border-color: rgb(125 180 240 / .55); }
.archive .project > div:not(.archive-sigil) { min-width: 0; position: relative; z-index: 1; }
.archive .project h2 { max-width: 26ch; text-wrap: balance; padding-right: clamp(0px, 6vw, 60px); }
.archive .project .desc { max-width: 68ch; }
.archive .project .num { position: relative; font-variant-numeric: tabular-nums; opacity: .85; }
.archive .project .num::after { content: ""; display: block; width: 1px; height: clamp(1.25rem, 4vw, 3rem); margin: 1.25rem auto 0; background: linear-gradient(#7db4f0, transparent); opacity: .55; }
.archive-sigil { position: absolute; inset: 20px 22px auto auto; width: clamp(78px, 11vw, 142px); aspect-ratio: 1; opacity: .45; pointer-events: none; transform-origin: center; transition: opacity .6s ease, transform .75s cubic-bezier(.22,1,.36,1); }
.archive-sigil svg { display: block; width: 100%; height: 100%; overflow: visible; }
.archive .project:hover .archive-sigil { opacity: .8; transform: rotate(7deg) scale(1.05); }
.archive-copy { position: absolute; z-index: 3; inset: auto 1.25rem 1.25rem auto; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 1px solid var(--archive-line); border-radius: 99px; background: #24303c; color: #bddaf7; font: 600 .74rem/1 Inter,system-ui,sans-serif; cursor: pointer; transition: background .2s ease, transform .25s ease; }
.archive-copy:hover { background: #35485c; transform: translateY(-2px); }
.archive-copy:focus-visible, .archive-topic:focus-visible, .archive-tag:focus-visible, .archive-top:focus-visible { outline: 2px solid #a3d8ff; outline-offset: 4px; }
.archive-copy svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.archive-copy[data-state="success"] { color: #a6e4ca; border-color: rgb(166 228 202 / .5); }
.archive-copy[data-state="failure"] { color: #ffd1bc; }
.archive .project .tag { transition: background .2s ease, border-color .2s ease, color .2s ease; }
.archive .project .archive-tag { font: inherit; font-size: .72rem; font-weight: 600; line-height: 1.35; border: 1px solid rgb(237 237 237 / .17); color: #becbd9; background: transparent; border-radius: 999px; padding: .48rem .7rem; min-height: 34px; cursor: pointer; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.archive .project .archive-tag:hover { color: #e9f6ff; border-color: #86bff3; background: rgb(125 180 240 / .12); }
.archive .project .actions { padding-right: 3.4rem; }
.archive .project .action { transition: transform .25s cubic-bezier(.22,1,.36,1), background .25s ease, border-color .25s ease; }
.archive .project .action:hover { transform: translateY(-3px); }
.archive .project .project-metric { transition: border-color .3s ease, background .3s ease; }
.archive .project:hover .project-metric { border-color: rgb(125 180 240 / .27); background: rgb(125 180 240 / .035); }
.archive .project-note { max-width: 68ch; }
.archive-enhanced .project[data-archive-enter="pending"] { opacity: 0; transform: translateY(28px); }
.archive-enhanced .project[data-archive-enter="shown"] { animation: archive-arrive .75s both cubic-bezier(.22,1,.36,1); animation-delay: var(--archive-delay, 0ms); }
@keyframes archive-arrive { from { opacity: 0; transform: translateY(25px); filter: blur(4px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }

/* Airy editorial motif. Vector only: no images or large downloads. */
.archive-hero { position: relative; isolation: isolate; }
.archive-hero > :not(.archive-orbit) { position: relative; z-index: 1; }
.archive-orbit { position: absolute; right: -4%; top: 0; width: min(38vw, 430px); aspect-ratio: 1; opacity: .53; pointer-events: none; z-index: 0; }
.archive-orbit svg { width: 100%; height: 100%; overflow: visible; }
.archive-orbit .orbit-a { transform-origin: center; animation: archive-orbit 32s linear infinite; }
.archive-orbit .orbit-b { transform-origin: center; animation: archive-orbit 44s linear infinite reverse; }
.archive-orbit .orbit-node { animation: archive-breathe 4s ease-in-out infinite alternate; }
@keyframes archive-orbit { to { transform: rotate(360deg); } }
@keyframes archive-breathe { to { opacity: .38; } }
.archive-hero .title { max-width: min(100%, 830px); }
.archive-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.65rem; margin-top: 1.55rem; color: #9bacbf; font: 650 .73rem/1.5 Inter,system-ui,sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.archive-meta span { display: inline-flex; align-items: center; gap: .6rem; }
.archive-meta span::before { content: ""; width: 5px; height: 5px; background: #84baf4; border-radius: 50%; box-shadow: 0 0 10px rgb(125 180 240 / .55); }

/* Search controls appear only after JS has connected them to pagination. */
.archive-explorer[hidden] { display: none !important; }
.archive-explorer { margin: 0 0 clamp(1.75rem, 4vw, 3.5rem); padding: clamp(1.1rem, 3.4vw, 2.1rem); border: 1px solid rgb(147 191 238 / .21); border-radius: clamp(16px, 2.5vw, 24px); background: linear-gradient(125deg, rgb(139 191 244 / .075), transparent 60%), #1a222c; }
.archive-explorer-head { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: baseline; justify-content: space-between; margin-bottom: 1.2rem; }
.archive-explorer-head h3 { margin: 0; font: 600 clamp(1rem, 2vw, 1.25rem)/1.3 Inter,system-ui,sans-serif; letter-spacing: -.025em; }
.archive-count { margin: 0; font: 600 .77rem/1.5 Inter,system-ui,sans-serif; color: #a8bed3; font-variant-numeric: tabular-nums; }
.archive-form { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(160px, .9fr) auto; gap: .7rem; align-items: end; }
.archive-field { display: grid; gap: .5rem; min-width: 0; }
.archive-field label { color: #b5c7d9; font: 700 .71rem/1.3 Inter,system-ui,sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.archive-field input, .archive-field select { width: 100%; min-height: 48px; padding: .75rem 1rem; border: 1px solid rgb(151 199 247 / .26); border-radius: .8rem; background: #121921; color: #e8f1fa; font: 500 .93rem/1.4 Inter,system-ui,sans-serif; outline-offset: 3px; }
.archive-field input::placeholder { color: #8799ab; }
.archive-field :is(input,select):focus-visible { outline: 2px solid #93c9ff; border-color: #7db4f0; }
.archive-clear { min-height: 48px; padding: .6rem .95rem; border: 1px solid rgb(151 199 247 / .24); border-radius: .8rem; background: #233140; color: #d6e5f4; font: 650 .84rem/1 Inter,system-ui,sans-serif; cursor: pointer; }
.archive-clear:hover { background: #32465a; }
.archive-topics { display: flex; flex-wrap: nowrap; gap: .55rem; overflow-x: auto; margin-top: 1rem; padding: .2rem 0 .55rem; scrollbar-width: thin; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.archive-topic { min-height: 42px; flex: 0 0 auto; padding: .55rem 1rem; border: 1px solid rgb(151 199 247 / .2); border-radius: 99px; background: transparent; color: #b9c9d9; font: 650 .79rem/1.3 Inter,system-ui,sans-serif; cursor: pointer; transition: border-color .2s ease, color .2s ease, background .2s ease; }
.archive-topic:hover { border-color: #80b6e6; color: #eef8ff; }
.archive-topic[aria-pressed="true"] { background: #7db4f0; border-color: #7db4f0; color: #10151c; }
.archive-empty { padding: clamp(2.5rem, 8vw, 5rem) 1.5rem; text-align: center; border: 1px dashed rgb(151 199 247 / .35); border-radius: 1.2rem; color: #bbcadd; }
.archive-empty h3 { font: 500 clamp(1.6rem, 4vw, 2.4rem)/1.2 Georgia,serif; color: #edf6ff; margin: 0 0 .6rem; }
.archive-empty p { margin: 0; }
.archive-top { position: fixed; z-index: 50; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); width: 48px; height: 48px; border: 1px solid var(--archive-line); border-radius: 50%; background: #233344; box-shadow: 0 8px 34px rgb(0 0 0 / .25); color: #d7ecff; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .25s ease, visibility .25s ease, transform .3s ease; }
.archive-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.archive-top:hover { background: #37516b; transform: translateY(-3px); }
.archive-top svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
@media (min-width: 1000px) {
  .archive .project { min-height: 330px; }
  .archive .project .type { padding-right: 130px; }
}
@media (max-width: 760px) {
  .archive-hero { overflow: hidden; }
  .archive-orbit { width: clamp(170px, 54vw, 270px); right: -24%; top: 2%; opacity: .2; }
  .archive-hero .title { max-width: 100%; }
  .archive-meta { gap: .7rem 1rem; }
  .archive-form { grid-template-columns: minmax(0, 1fr) minmax(130px, .7fr); }
  .archive-clear { grid-column: 1 / -1; width: 100%; }
  .archive .project { padding: clamp(1.35rem, 5vw, 2.4rem); border-radius: 1.25rem; }
  .archive .project h2 { padding-right: 20px; font-size: clamp(1.8rem, 7vw, 2.7rem); }
  .archive .project .num::after { display: none; }
  .archive .project .actions { padding-right: 2.8rem; }
  .archive-sigil { width: 70px; opacity: .28; }
  .archive .project:hover { transform: none; }
}
@media (max-width: 480px) {
  .archive-form { grid-template-columns: 1fr; }
  .archive-clear { grid-column: auto; }
  .archive .project { gap: .8rem; }
  .archive .project h2 { font-size: clamp(1.65rem, 8vw, 2.3rem); }
  .archive .project .project-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr)); }
  .archive .project .project-metric { min-width: 0; }
  .archive .project .num { font-size: 2.5rem; }
  .archive-sigil { width: 60px; right: 14px; top: 14px; }
  .archive-explorer { padding: 1rem; }
  .archive .project .archive-copy { bottom: 1rem; right: 1rem; }
  .archive-top { bottom: 1rem; right: 1rem; }
}
@media (hover: none), (pointer: coarse) {
  .archive .project::before { display: none; }
  .archive .project:hover { transform: none; }
  .archive .project:hover .archive-sigil { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .archive-orbit * { animation: none !important; }
  .archive-enhanced .project[data-archive-enter="pending"] { opacity: 1; transform: none; }
  .archive-enhanced .project[data-archive-enter="shown"] { animation: none; }
  .archive .project, .archive .project *, .archive-top, .archive-topic { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
html.motion-off .archive-enhanced .project[data-archive-enter="pending"] { opacity: 1; transform: none; }
html.motion-off .archive-orbit * { animation: none !important; }


/* Reserve title space for the identity glyph without squeezing descriptions. */
.archive .project h2 { padding-right:clamp(84px,12vw,140px); }
.archive .project .archive-sigil.project-symbol { width:clamp(84px,11vw,135px); height:clamp(84px,11vw,135px); }
@media(max-width:700px){
  .archive .project h2 { padding-right:64px; }
  .archive .project .archive-sigil.project-symbol { width:66px;height:66px; }
}
@media(max-width:420px){
  .archive .project h2 { padding-right:52px; }
  .archive .project .archive-sigil.project-symbol { width:54px;height:54px; }
}
