:root{
  --bg: #0b1017;
  --fg: #e8edf5;
  --muted: #a4b0c0;
  --card: rgba(255,255,255,0.05);
  --panel: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.12);
  --accent: #7c8aff;
  --accent-2: #52d3aa;
  --danger: #ff7b7b;
  --shadow: 0 16px 60px rgba(0,0,0,0.4);
}

*{box-sizing:border-box;}
html,body{height:100%}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--fg);
  background: radial-gradient(1100px 800px at 20% -10%, #182233 12%, transparent 55%),
              radial-gradient(900px 600px at 90% 130%, #121826 20%, transparent 70%),
              var(--bg);
  background-repeat: no-repeat;
  overflow-x:hidden;
}

.bg{position:fixed; inset:0; pointer-events:none; z-index:-2;}
.blob{
  position:absolute; width:52vmax; height:52vmax; filter: blur(70px);
  opacity:0.3; border-radius:50%;
  animation: float 26s ease-in-out infinite alternate;
}
.blob-1{ left:-12vmax; top:-14vmax; background: conic-gradient(from 20deg, #6bdcff, #7f6bff, #22d3ee, #6bdcff); }
.blob-2{ right:-16vmax; bottom:-16vmax; background: conic-gradient(from 210deg, #ff7ab6, #c084fc, #60a5fa, #ff7ab6); animation-delay: 5s; }
@keyframes float{ to { transform: translate3d(4vmax, -3vmax, 0) rotate(10deg); } }

.noise{
  position:absolute; inset:-50%;
  background-image: url("data:image/svg+xml;utf8,\
  <svg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'>\
    <filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/></filter>\
    <rect width='100%' height='100%' filter='url(%23n)' opacity='0.032'/>\
  </svg>");
  transform: translateZ(0);
  z-index:-1;
}

.top{
  display:flex; align-items:center; justify-content:space-between;
  padding: 20px clamp(18px, 4vw, 32px);
  position:sticky; top:0; z-index:10;
  backdrop-filter: blur(12px);
}
.brand{display:flex; align-items:center; gap:0.85rem;}
.brand-button{
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.6rem 0.95rem;
  cursor: pointer;
  color: var(--fg);
  display:flex; align-items:center; gap:0.7rem;
}
.brand-button:focus-visible{ outline: 2px solid var(--accent); }
.brand .logo{ width:44px; height:44px; }
.brand-name{ font-weight:700; letter-spacing:0.4px; font-size:1.05rem; }
.brand-tag{ font-size:0.95rem; color: var(--muted); }
.chevron{ font-size:0.9rem; opacity:0.7; }

.dropdown{
  position:absolute;
  top:68px; left: clamp(18px, 4vw, 32px);
  display:none;
  flex-direction:column;
  min-width: 240px;
  padding: 0.1rem 0.15rem;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.18);
  box-shadow: var(--shadow);
  background: transparent;
  backdrop-filter: blur(14px) saturate(140%);
  overflow:hidden;
  z-index: 20;
  color: var(--fg);
}
.dropdown.open{ display:flex; }
.dropdown ul{ list-style:none; margin:0; padding:0.5rem 0.35rem; display:flex; flex-direction:column; gap:0.35rem; }
.dropdown li{
  position:relative;
  padding: 0.72rem 1.1rem 0.72rem 1.85rem;
}
.dropdown li::before{
  content:'•';
  color: currentColor;
  position:absolute;
  left:1.05rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.92rem;
  opacity:0.85;
}
.dropdown a{
  color: inherit;
  text-decoration:none;
  display:block;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.dropdown li:hover{ background: rgba(255,255,255,0.05); border-radius:10px; }

.page{
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(12px, 4vw, 30px);
}

.section{
  margin: clamp(2rem, 4vw, 3rem) 0;
  display:flex;
  flex-direction:column;
  gap:1rem;
}
.section-head{ display:flex; justify-content:space-between; align-items:flex-end; gap:1rem; flex-wrap:wrap; }

.hero{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap:1.2rem;
  align-items:center;
}
.hero-content h1{ margin:0 0 0.5rem 0; font-size: clamp(2.2rem, 4vw, 2.8rem); }
.hero-card{
  border:1px solid var(--border);
  border-radius:18px;
  padding:1.2rem;
  background: var(--panel);
  display:flex; flex-direction:column; gap:0.75rem;
}
.hero-metrics{ display:flex; gap:1rem; }
.metric{ font-size:1.6rem; font-weight:700; }

.linocut-frame{
  border:1px solid var(--border);
  border-radius:18px;
  background: rgba(255,255,255,0.02);
  padding:1rem;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 220px;
}
.linocut-frame img{
  max-width:100%;
  height:auto;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
  opacity:0.9;
}
.linocut-frame.small{ min-height: 180px; }

.cards-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:1rem;
}
.card.outline{
  border:1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.about-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:1rem;
}
.prose{
  display:flex;
  gap:1.4rem;
  flex-wrap:wrap;
}
.prose .text{ flex:2; min-width: 300px; }
.prose .side{ flex:1; min-width: 260px; }
.prose h2, .prose h3{ margin: 0.6rem 0 0.35rem; }
.prose p, .prose ul{ color: var(--muted); line-height:1.55; }
.prose ul{ padding-left: 1rem; }
.prose blockquote{
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
}

.layout{
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 2vw, 1.75rem);
  backdrop-filter: blur(12px);
}
.card-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
}
.actions{display:flex; gap:0.5rem; align-items:center;}

.apps-header{
  display:flex; justify-content:space-between; align-items:flex-end;
  margin: 1.25rem 0 0.75rem;
}

.apps-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:0.9rem;
}
.app-card{
  border:1px solid var(--border);
  border-radius:14px;
  padding:0.9rem;
  background: var(--panel);
  display:flex; flex-direction:column; gap:0.35rem;
}
.app-card h4{ margin:0; }
.app-card p{ margin:0; color:var(--muted); font-size:0.95rem; }
.app-meta{ display:flex; gap:0.5rem; align-items:center; flex-wrap:wrap; }

.pill{
  display:inline-flex; align-items:center; gap:0.35rem;
  padding:0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  font-size: 0.9rem;
}
.pill.muted{ color: var(--muted); }
.pill.success{ background: rgba(82,211,170,0.12); color: #b6f2de; border-color: rgba(82,211,170,0.4); }
.pill.warn{ background: rgba(255,123,123,0.12); color: #ffd1d1; border-color: rgba(255,123,123,0.4); }

.eyebrow{ text-transform: uppercase; letter-spacing: 0.2em; font-size:0.72rem; color: var(--muted); margin:0 0 0.3rem 0; }
.muted{ color: var(--muted); }
.small{ font-size:0.9rem; }

.form{ display:flex; flex-direction:column; gap:0.85rem; margin-top:0.6rem; }
.form label{ display:flex; flex-direction:column; gap:0.35rem; font-weight:600; }
.form input, .form textarea, .form select{
  background: rgba(255,255,255,0.04);
  border:1px solid var(--border);
  border-radius:10px;
  padding:0.65rem 0.75rem;
  color: var(--fg);
  font-size:1rem;
}
.form textarea{ resize: vertical; min-height: 72px; }
.form input:focus, .form textarea:focus, .form select:focus{
  outline: 1px solid var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(124,138,255,0.22);
}
.form.inline{ gap:0.75rem; }

.roles{
  border: 1px dashed var(--border);
  border-radius:12px;
  padding:0.75rem;
  display:flex; gap:0.75rem; flex-wrap:wrap;
}
.roles legend{ padding: 0 0.4rem; color: var(--muted); }
.roles label{ font-weight:500; gap:0.25rem; flex-direction:row; align-items:center; }

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:0.35rem;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #7a8cff, #52d3aa);
  color: #08111b;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, filter .2s ease;
}
.btn:hover{ transform: translateY(-1px); filter: brightness(1.05); }
.btn:active{ transform: translateY(0); }
.btn.primary{ background: linear-gradient(135deg, #7a8cff, #52d3aa); color:#08111b; }
.btn.ghost{
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
}
.btn.ghost[disabled]{ opacity:0.5; cursor:not-allowed; }
.btn.small{ padding: 0.45rem 0.8rem; font-size:0.95rem; }

.notice{
  min-height: 1.1rem;
  font-size:0.95rem;
  color: var(--muted);
}
.notice.error{ color: #ffb3b3; }
.notice.success{ color: #b6f2de; }

.code-block{
  background: rgba(0,0,0,0.35);
  border:1px solid var(--border);
  border-radius:12px;
  padding:0.9rem;
  color: var(--muted);
  overflow-x:auto;
}

.admin{
  background: var(--panel);
  border: 1px dashed var(--border);
  margin-top: 1.4rem;
  padding: 1.25rem;
  border-radius: 14px;
}
.admin-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap:1rem;
}
.stack{ display:flex; flex-direction:column; gap:0.5rem; padding:0.75rem; border:1px solid var(--border); border-radius:12px; background: rgba(255,255,255,0.02); }
.assign{
  margin-top:1rem;
  border:1px solid var(--border);
  border-radius:12px;
  padding:1rem;
  background: rgba(255,255,255,0.02);
}
.chip-list{ display:flex; gap:0.5rem; flex-wrap:wrap; }
.chip{
  padding:0.45rem 0.6rem;
  border-radius:10px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.04);
  display:flex; align-items:center; gap:0.35rem;
}
.chip input{ margin:0; }

.hidden{ display:none !important; }

.footer{
  text-align:center;
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size:0.95rem;
}

@media (max-width: 720px){
  .card-header{ flex-direction:column; }
  .actions{ width:100%; justify-content:flex-start; }
  .assign .form.inline label{ width:100%; }
}
