/* V6.18 — Neo-brutalist project cards, anchored search toolbar, and standalone Cloudflare package actions. */
:root{
  --neo-ink:#090d15;
  --neo-paper:#f7f7f2;
  --neo-radius:34px;
  --neo-ease:cubic-bezier(.16,1,.3,1);
  --neo-toolbar-top:84px;
}

/* Keep the project area visually separate and faithful to the supplied neo-brutalist reference. */
.projects{
  position:relative;
  isolation:isolate;
  background:
    radial-gradient(circle at 10% 4%,rgba(72,199,239,.10),transparent 34rem),
    radial-gradient(circle at 92% 12%,rgba(246,85,189,.09),transparent 30rem),
    var(--neo-ink)!important;
  padding-bottom:clamp(70px,8vw,130px);
  overflow:visible!important;
}
.projects .section-heading{
  border-bottom:3px solid rgba(255,255,255,.14)!important;
}

/* The toolbar deliberately remains visible while the user scans the cards. */
.project-toolbar{
  position:sticky!important;
  position:-webkit-sticky!important;
  top:calc(var(--neo-toolbar-top) + env(safe-area-inset-top,0px))!important;
  z-index:8900!important;
  width:min(1880px,calc(100% - 32px));
  margin:18px auto 26px!important;
  padding:12px!important;
  display:grid!important;
  grid-template-columns:minmax(260px,1fr) auto!important;
  gap:12px!important;
  align-items:center!important;
  border:2px solid rgba(255,255,255,.18)!important;
  border-radius:22px!important;
  background:rgba(9,13,21,.88)!important;
  color:var(--neo-paper)!important;
  box-shadow:0 16px 40px rgba(0,0,0,.28)!important;
  backdrop-filter:blur(20px) saturate(135%)!important;
  -webkit-backdrop-filter:blur(20px) saturate(135%)!important;
  transform:translateZ(0);
  contain:paint;
}
.project-toolbar.is-stuck{
  border-color:rgba(255,217,77,.72)!important;
  box-shadow:0 18px 46px rgba(0,0,0,.42),0 0 0 1px rgba(255,217,77,.12)!important;
}
.search-box{
  min-height:50px!important;
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  padding:0 15px!important;
  border:2px solid rgba(255,255,255,.38)!important;
  border-radius:14px!important;
  background:rgba(255,255,255,.05)!important;
  color:var(--neo-paper)!important;
  box-shadow:none!important;
}
.search-box:focus-within{
  border-color:#ffd94d!important;
  box-shadow:0 0 0 3px rgba(255,217,77,.15)!important;
}
.search-box input{
  min-width:0!important;
  width:100%!important;
  padding:12px 0!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  color:var(--neo-paper)!important;
  caret-color:#ffd94d!important;
  font:700 .84rem/1.2 "Space Mono","Courier New",ui-monospace,monospace!important;
}
.search-box input::placeholder{color:rgba(247,247,242,.58)!important;opacity:1!important}
.filter-list{display:flex!important;gap:7px!important;overflow-x:auto!important;max-width:100%!important;padding:1px!important;scrollbar-width:none!important;overscroll-behavior-inline:contain}
.filter-list::-webkit-scrollbar{display:none}
.filter-button{
  min-height:48px!important;
  flex:0 0 auto!important;
  padding:10px 15px!important;
  border:2px solid rgba(255,255,255,.32)!important;
  border-radius:14px!important;
  background:transparent!important;
  color:var(--neo-paper)!important;
  font:700 .68rem/1 "Space Mono","Courier New",ui-monospace,monospace!important;
  letter-spacing:.07em!important;
  text-transform:uppercase!important;
  transition:transform .2s var(--neo-ease),background .2s ease,color .2s ease,border-color .2s ease!important;
}
.filter-button:hover,.filter-button:focus-visible{transform:translateY(-2px);border-color:var(--neo-paper)!important;outline:0}
.filter-button.is-active{background:var(--neo-paper)!important;color:var(--neo-ink)!important;border-color:var(--neo-paper)!important}

.projects__grid{
  width:min(1880px,calc(100% - 32px));
  margin-inline:auto!important;
  padding:0!important;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  align-items:stretch!important;
  gap:clamp(18px,2vw,28px)!important;
  background:transparent!important;
  perspective:1500px;
}
.project-card,.project-card:nth-child(n){
  --spot-x:50%;
  --spot-y:50%;
  position:relative!important;
  isolation:isolate!important;
  min-height:clamp(640px,48vw,790px)!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  padding:clamp(28px,3.2vw,52px)!important;
  border:3px solid var(--neo-ink)!important;
  border-radius:var(--neo-radius)!important;
  color:var(--neo-ink)!important;
  box-shadow:12px 14px 0 rgba(0,0,0,.50)!important;
  transform-style:preserve-3d!important;
  will-change:transform;
  transition:box-shadow .3s var(--neo-ease),filter .3s ease,opacity .25s ease,transform .45s var(--neo-ease)!important;
}
.project-card--yellow{background:radial-gradient(circle at var(--spot-x) var(--spot-y),rgba(255,255,255,.40),transparent 31%),linear-gradient(145deg,rgba(255,255,255,.74),transparent 42%),#ffd94d!important}
.project-card--cyan{background:radial-gradient(circle at var(--spot-x) var(--spot-y),rgba(255,255,255,.40),transparent 31%),linear-gradient(145deg,rgba(255,255,255,.74),transparent 42%),#48c7ef!important}
.project-card--pink{background:radial-gradient(circle at var(--spot-x) var(--spot-y),rgba(255,255,255,.36),transparent 31%),linear-gradient(145deg,rgba(255,255,255,.72),transparent 42%),#f655bd!important}
.project-card--lavender{background:radial-gradient(circle at var(--spot-x) var(--spot-y),rgba(255,255,255,.38),transparent 31%),linear-gradient(145deg,rgba(255,255,255,.72),transparent 42%),#8d7bf8!important}
.project-card--lime{background:radial-gradient(circle at var(--spot-x) var(--spot-y),rgba(255,255,255,.42),transparent 31%),linear-gradient(145deg,rgba(255,255,255,.76),transparent 42%),#9bea6d!important}
.project-card--orange{background:radial-gradient(circle at var(--spot-x) var(--spot-y),rgba(255,255,255,.38),transparent 31%),linear-gradient(145deg,rgba(255,255,255,.74),transparent 42%),#ff7d52!important}
.project-card--green{background:radial-gradient(circle at var(--spot-x) var(--spot-y),rgba(255,255,255,.36),transparent 31%),linear-gradient(145deg,rgba(255,255,255,.72),transparent 42%),#31d98c!important}
.project-card:hover{box-shadow:18px 22px 0 rgba(0,0,0,.60)!important;filter:saturate(1.06)}
.project-card::before{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  z-index:-2!important;
  pointer-events:none!important;
  opacity:.20!important;
  border-radius:inherit!important;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")!important;
  mix-blend-mode:color-dodge!important;
}
.project-card::after{
  content:""!important;
  position:absolute!important;
  right:4%!important;
  top:9%!important;
  width:92px!important;
  height:92px!important;
  z-index:0!important;
  border:3px solid var(--neo-ink)!important;
  border-radius:28px!important;
  background:rgba(255,255,255,.08)!important;
  opacity:.22!important;
  transform:rotate(14deg)!important;
  pointer-events:none!important;
}
.project-card__ghost{
  position:absolute!important;
  right:-1.5%!important;
  bottom:-5%!important;
  z-index:-1!important;
  color:transparent!important;
  -webkit-text-stroke:3px rgba(9,13,21,.11)!important;
  font-family:"Bebas Neue",Impact,"Arial Black",sans-serif!important;
  font-size:clamp(9rem,17vw,16rem)!important;
  line-height:.7!important;
  pointer-events:none!important;
}
.project-card__top{position:relative!important;z-index:3!important;display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:18px!important;transform:translateZ(28px)}
.project-card__number{display:inline-flex!important;align-items:center!important;min-height:36px!important;padding:6px 14px!important;border-radius:999px!important;background:var(--neo-ink)!important;color:var(--neo-paper)!important;box-shadow:none!important;font:700 .74rem/1 "Space Mono","Courier New",ui-monospace,monospace!important;letter-spacing:.03em!important}
.project-card__icon{position:relative!important;z-index:2!important;width:clamp(58px,5vw,76px)!important;height:auto!important;aspect-ratio:1!important;display:grid!important;place-items:center!important;border:3px solid var(--neo-ink)!important;border-radius:22px!important;background:rgba(255,255,255,.28)!important;color:var(--neo-ink)!important;font-family:"Unbounded",system-ui,sans-serif!important;font-size:clamp(1.3rem,2.2vw,2rem)!important;box-shadow:5px 6px 0 rgba(9,13,21,.16)!important;transform:rotate(-1deg)!important}
.project-card__body{position:relative!important;z-index:3!important;flex:1!important;display:flex!important;flex-direction:column!important;padding-top:clamp(44px,6vw,92px)!important;transform:translateZ(20px)}
.project-card__category{margin:0 0 14px!important;color:var(--neo-ink)!important;font:700 clamp(.62rem,.8vw,.78rem)/1.2 "Space Mono","Courier New",ui-monospace,monospace!important;text-transform:uppercase!important;letter-spacing:.22em!important}
.project-card__title{margin:0 0 clamp(22px,3.5vw,38px)!important;color:var(--neo-ink)!important;font-family:"Bebas Neue",Impact,"Arial Black",sans-serif!important;font-size:clamp(3.05rem,5.05vw,6.1rem)!important;font-weight:400!important;line-height:.72!important;letter-spacing:-.035em!important;text-transform:uppercase!important;text-wrap:balance!important;overflow-wrap:normal!important;word-break:normal!important;hyphens:none!important}
.project-card__title br{display:none!important}
.project-card__title span{display:block!important;color:transparent!important;-webkit-text-stroke:clamp(1.4px,.17vw,3px) var(--neo-ink)!important;text-stroke:clamp(1.4px,.17vw,3px) var(--neo-ink)!important;overflow-wrap:normal!important;word-break:normal!important;hyphens:none!important}
.project-card__desc{max-width:94%!important;margin:0 0 22px!important;color:var(--neo-ink)!important;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif!important;font-size:clamp(.93rem,1.2vw,1.18rem)!important;font-weight:760!important;line-height:1.55!important;text-wrap:pretty!important}
.project-card__tags{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin:0 0 28px!important}
.project-card__tag{padding:6px 11px!important;border:2px solid var(--neo-ink)!important;border-radius:999px!important;background:rgba(255,255,255,.16)!important;color:var(--neo-ink)!important;backdrop-filter:none!important;font:700 clamp(.53rem,.68vw,.68rem)/1.1 "Space Mono","Courier New",ui-monospace,monospace!important;text-transform:uppercase!important;letter-spacing:.03em!important;white-space:nowrap!important}
.project-card__actions{position:relative!important;z-index:4!important;margin-top:auto!important;display:flex!important;flex-wrap:wrap!important;gap:10px!important}
.project-card .card-btn{min-height:54px!important;padding:13px clamp(14px,1.6vw,22px)!important;border:3px solid var(--neo-ink)!important;border-radius:15px!important;background:rgba(255,255,255,.74)!important;color:var(--neo-ink)!important;box-shadow:5px 6px 0 var(--neo-ink)!important;font:700 clamp(.58rem,.73vw,.73rem)/1.15 "Space Mono","Courier New",ui-monospace,monospace!important;letter-spacing:.035em!important;transition:transform .2s var(--neo-ease),box-shadow .2s var(--neo-ease),background .2s ease!important}
.project-card .card-btn:hover,.project-card .card-btn:focus-visible{transform:translate(3px,3px)!important;box-shadow:2px 3px 0 var(--neo-ink)!important;outline:none!important}
.project-card .card-btn--primary{background:var(--neo-ink)!important;color:var(--neo-paper)!important}
.project-card .card-btn--cloudflare{background:#dff8ff!important;color:var(--neo-ink)!important}
.project-card[hidden]{display:none!important}
.empty-results{width:min(1880px,calc(100% - 32px));margin:auto;color:var(--neo-paper)!important;border:2px dashed rgba(255,255,255,.28)!important;border-radius:28px!important}

/* Dark shell must never recolor the bright cards or erase their typography. */
html[data-front-theme="dark"] .project-card,
html[data-front-theme="dark"] .project-card :where(.project-card__category,.project-card__desc,.project-card__tag){color:var(--neo-ink)!important}
html[data-front-theme="dark"] .project-card__title{color:var(--neo-ink)!important}
html[data-front-theme="dark"] .project-card__title span{color:transparent!important;-webkit-text-stroke-color:var(--neo-ink)!important}
html[data-front-theme="light"] .project-toolbar{background:rgba(9,13,21,.90)!important;color:var(--neo-paper)!important}
html[data-front-theme="light"] .search-box,html[data-front-theme="light"] .filter-button{color:var(--neo-paper)!important}
html[data-front-theme="light"] .filter-button.is-active{color:var(--neo-ink)!important}

@media(max-width:1260px){
  .projects__grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .project-card,.project-card:nth-child(n){min-height:690px!important}
  .project-card__title{font-size:clamp(3.3rem,7.2vw,6.5rem)!important}
}
@media(max-width:980px){
  :root{--neo-toolbar-top:72px}
  .project-toolbar{grid-template-columns:1fr!important}
  .filter-list{width:100%!important}
}
@media(max-width:720px){
  :root{--neo-radius:25px;--neo-toolbar-top:66px}
  .project-toolbar{width:calc(100% - 22px)!important;margin:10px auto 18px!important;padding:9px!important;border-radius:17px!important;gap:9px!important}
  .search-box{min-height:46px!important}
  .filter-button{min-height:44px!important;padding:9px 12px!important}
  .projects__grid{width:calc(100% - 22px)!important;grid-template-columns:1fr!important;gap:16px!important}
  .project-card,.project-card:nth-child(n){min-height:650px!important;padding:28px 24px 25px!important;box-shadow:8px 9px 0 rgba(0,0,0,.52)!important}
  .project-card:hover{box-shadow:8px 9px 0 rgba(0,0,0,.52)!important}
  .project-card__body{padding-top:46px!important}
  .project-card__title{font-size:clamp(3.55rem,16.5vw,6rem)!important}
  .project-card__desc{max-width:100%!important;font-size:1rem!important}
  .project-card__actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important}
  .project-card .card-btn{width:100%!important}
}
@media(max-width:420px){
  .project-card,.project-card:nth-child(n){min-height:610px!important}
  .project-card__title{font-size:15.2vw!important;line-height:.76!important}
  .project-card__icon{width:58px!important}
}
@media(hover:none),(pointer:coarse){.project-card{transform:none!important}}
@media(prefers-reduced-motion:reduce){.project-card,.project-toolbar,.filter-button,.card-btn{transition:none!important}.project-card{transform:none!important}}
