:root{
  --paper:#0b0b0a;
  --ink:#f2f0ea;
  --muted:#8a8880;
  --line:#232320;
  --accent:#4AFF00;
}
*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  *{animation-duration:.001ms !important; transition-duration:.001ms !important;}
}
body{
  background:var(--paper);
  color:var(--ink);
  font-family:'Space Mono', monospace;
  font-size:13px;
  line-height:1.5;
  overflow-x:hidden;
}
a{color:inherit;}

/* ---------------- top bar ---------------- */
.archive-topbar{
  position:fixed;
  top:0; left:0; right:0;
  z-index:200;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:20px clamp(18px,4vw,40px);
  background:linear-gradient(rgba(11,11,10,.9), transparent);
  pointer-events:none;
}
.archive-topbar a, .archive-topbar span{pointer-events:auto;}
.archive-back{
  text-decoration:underline;
  text-underline-offset:3px;
  font-size:12px;
}
.archive-back:hover{color:var(--muted);}
.archive-title{
  font-weight:700;
  letter-spacing:.04em;
}
.archive-count{
  font-size:11px;
  color:var(--muted);
}

/* ---------------- contact sheet grid ---------------- */
.archive-grid{
  padding:80px 16px 120px;
  display:grid;
  grid-template-columns:repeat(6,1fr);
  grid-auto-rows:160px;
  gap:10px;
  transition:filter .5s ease;
  will-change:transform;
}
@media (max-width:1100px){
  .archive-grid{grid-template-columns:repeat(4,1fr);}
}
@media (max-width:680px){
  .archive-grid{grid-template-columns:repeat(2,1fr); grid-auto-rows:130px;}
}
.archive-grid.gated{filter:blur(14px) brightness(.6);}

.a-tile{
  position:relative;
  overflow:hidden;
  background:#161613;
  cursor:pointer;
  opacity:1;
  transform:scale(1);
  transition:opacity .35s ease, transform .35s ease;
}
.a-tile.hidden{
  opacity:0;
  transform:scale(.92);
  pointer-events:none;
  position:absolute;
  visibility:hidden;
}
.a-tile.tall{grid-row:span 2;}
.a-tile img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .6s ease;
}
.a-tile:hover img{transform:scale(1.05);}
.a-tile-tag{
  position:absolute;
  left:0; right:0; bottom:0;
  padding:8px 10px;
  font-size:10px;
  letter-spacing:.03em;
  color:rgba(255,255,255,.85);
  background:linear-gradient(transparent, rgba(0,0,0,.75));
  opacity:0;
  transition:opacity .25s ease;
}
.a-tile:hover .a-tile-tag{opacity:1;}

.a-tile.placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px dashed #333;
}
.a-tile.placeholder .plus-note{
  color:#55534c;
  font-size:10px;
  text-align:center;
  letter-spacing:.05em;
  text-transform:uppercase;
  line-height:1.8;
}
.a-tile.placeholder .plus-note span{
  display:block;
  font-size:18px;
}

/* ---------------- floating search pill ---------------- */
.search-wrap{
  position:fixed;
  top:38%;
  left:50%;
  transform:translate(-50%,-50%);
  z-index:300;
  width:min(640px, 90vw);
}
.search-pill{
  background:rgba(20,20,18,.92);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border:1px solid #2c2c28;
  border-radius:999px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:16px 10px 16px 26px;
  box-shadow:0 20px 60px rgba(0,0,0,.5);
}
.search-prefix{
  color:var(--muted);
  white-space:nowrap;
  font-size:14px;
}
.search-input{
  flex:1;
  background:transparent;
  border:none;
  outline:none;
  color:var(--ink);
  font-family:'Space Mono', monospace;
  font-size:14px;
  min-width:0;
}
.search-input::placeholder{color:#54524a;}
.search-clear, .search-submit{
  width:32px; height:32px;
  border-radius:50%;
  border:none;
  background:#2a2a26;
  color:var(--ink);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  flex-shrink:0;
  font-size:14px;
  transition:background .2s ease;
}
.search-clear:hover, .search-submit:hover{background:#3a3a34;}
.search-clear{display:none;}
.search-clear.show{display:flex;}

.search-suggestions{
  margin-top:10px;
  background:rgba(20,20,18,.92);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border:1px solid #2c2c28;
  border-radius:18px;
  padding:14px 10px;
  display:none;
  flex-direction:column;
  max-height:260px;
  overflow-y:auto;
}
.search-suggestions.open{display:flex;}
.search-suggestions button{
  background:none;
  border:none;
  color:var(--muted);
  text-align:left;
  font-family:'Space Mono', monospace;
  font-size:13px;
  padding:9px 16px;
  border-radius:10px;
  cursor:pointer;
  transition:background .15s ease, color .15s ease;
}
.search-suggestions button:hover{
  background:#242420;
  color:var(--ink);
}

/* ---------------- welcome gate ---------------- */
.welcome-gate{
  position:fixed;
  inset:0;
  z-index:400;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.35);
  transition:opacity .5s ease;
}
.welcome-gate.closed{
  opacity:0;
  pointer-events:none;
}
.welcome-card{
  width:min(420px, 86vw);
  background:rgba(22,22,20,.92);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border:1px solid #2c2c28;
  border-radius:20px;
  padding:34px 30px;
  text-align:center;
}
.welcome-close{
  width:34px; height:34px;
  border-radius:50%;
  background:#2a2a26;
  border:none;
  color:var(--ink);
  font-size:16px;
  margin:0 auto 20px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.welcome-close:hover{background:#3a3a34;}
.welcome-card p{
  font-size:13.5px;
  line-height:1.7;
  color:#d8d6cc;
  margin-bottom:22px;
}
.welcome-enter{
  background:var(--accent);
  color:#0b0b0a;
  border:none;
  border-radius:999px;
  padding:12px 26px;
  font-family:'Space Mono', monospace;
  font-weight:700;
  font-size:12.5px;
  letter-spacing:.03em;
  cursor:pointer;
}
.welcome-enter:hover{opacity:.85;}
