:root {
  --bg: #03030b;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --text: #ffffff;
  --muted: #808090;
  --cyan: #00f3ff;
  --magenta: #ff00ff;
  --yellow: #f3f322;
  --orange: #ff9d00;
  --radius: 32px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body, input, textarea, button, select, strong {
  font-family: "Space Grotesk", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  color: var(--text);
  background: var(--bg);
  background-image: 
    radial-gradient(circle at 12% 14%, rgba(255, 0, 102, 0.2), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(255, 145, 0, 0.16), transparent 22%),
    radial-gradient(circle at 72% 58%, rgba(255, 238, 0, 0.12), transparent 24%),
    radial-gradient(circle at 14% 78%, rgba(0, 243, 255, 0.16), transparent 24%),
    radial-gradient(circle at 78% 88%, rgba(153, 102, 255, 0.18), transparent 26%),
    radial-gradient(circle at 0% 0%, rgba(0, 243, 255, 0.08), transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(255, 0, 255, 0.08), transparent 40%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    125deg,
    rgba(255, 0, 0, 0.05),
    rgba(255, 165, 0, 0.05),
    rgba(255, 255, 0, 0.05),
    rgba(0, 128, 0, 0.05),
    rgba(0, 0, 255, 0.05),
    rgba(75, 0, 130, 0.05),
    rgba(238, 130, 238, 0.05)
  );
  background-size: 400% 400%;
  animation: rainbow-shimmer 20s ease infinite;
  pointer-events: none;
}

@keyframes rainbow-shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body::before {
  content: "";
  position: fixed;
  inset: -18vh -10vw auto;
  height: 56vh;
  background:
    linear-gradient(90deg,
      rgba(255, 0, 102, 0.18) 0%,
      rgba(255, 145, 0, 0.16) 18%,
      rgba(255, 238, 0, 0.12) 36%,
      rgba(0, 243, 255, 0.14) 58%,
      rgba(0, 140, 255, 0.12) 76%,
      rgba(153, 102, 255, 0.16) 100%);
  filter: blur(110px);
  opacity: 0.95;
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

html {
  height: -webkit-fill-available;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1000px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  padding: 32px 0;
}

.topbar-inner {
  display: flex;
  justify-content: center;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: white;
  color: black;
  font-weight: 700;
  font-size: 1.5rem;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.home {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0 40px;
}

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
}

.card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  height: clamp(320px, 55vh, 500px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 35%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06), transparent 52%);
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.menu-link:hover, .menu-link:active, .menu-link:focus-visible {
  background: var(--glass-hover);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-8px);
}

.menu-blog:hover, .menu-blog:active, .menu-blog:focus-visible {
  box-shadow: 0 0 40px rgba(0, 243, 255, 0.15);
  border-color: var(--cyan);
}
.menu-blog:hover::after, .menu-blog:active::after, .menu-blog:focus-visible::after {
  opacity: 1;
  box-shadow: 0 0 36px rgba(0, 243, 255, 0.34);
}

.menu-board:hover, .menu-board:active, .menu-board:focus-visible {
  box-shadow: 0 0 40px rgba(255, 0, 255, 0.15);
  border-color: var(--magenta);
}
.menu-board:hover::after, .menu-board:active::after, .menu-board:focus-visible::after {
  opacity: 1;
  box-shadow: 0 0 36px rgba(255, 0, 255, 0.34);
}

.menu-wire:hover, .menu-wire:active, .menu-wire:focus-visible {
  box-shadow: 0 0 40px rgba(243, 243, 34, 0.15);
  border-color: var(--yellow);
}
.menu-wire:hover::after, .menu-wire:active::after, .menu-wire:focus-visible::after {
  opacity: 1;
  box-shadow: 0 0 36px rgba(243, 243, 34, 0.34);
}

.menu-love:hover, .menu-love:active, .menu-love:focus-visible {
  box-shadow: 0 0 40px rgba(255, 157, 0, 0.15);
  border-color: var(--orange);
}
.menu-love:hover::after, .menu-love:active::after, .menu-love:focus-visible::after {
  opacity: 1;
  box-shadow: 0 0 40px rgba(255, 157, 0, 0.4);
}

.menu-link strong {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 0;
  line-height: 1;
  transition: all 0.3s;
}

.menu-blog:hover strong, .menu-blog:active strong, .menu-blog:focus-visible strong {
  color: var(--cyan);
  text-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
}
.menu-board:hover strong, .menu-board:active strong, .menu-board:focus-visible strong {
  color: var(--magenta);
  text-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}
.menu-wire:hover strong, .menu-wire:active strong, .menu-wire:focus-visible strong {
  color: var(--yellow);
  text-shadow: 0 0 15px rgba(243, 243, 34, 0.5);
}
.menu-love:hover strong, .menu-love:active strong, .menu-love:focus-visible strong {
  color: var(--orange);
  text-shadow: 0 0 15px rgba(255, 157, 0, 0.5);
}

@media (max-width: 700px) {
  .menu-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .card {
    height: 38vh;
    border-radius: 28px;
  }

  .menu-link strong {
    font-size: 3.2rem;
  }

  .menu-link:active {
    transform: scale(0.98) translateY(-4px);
  }
}

/* Subpage Styles */
.page-head { padding: 40px 0; text-align: center; }
.page-head h1 { font-size: 3.5rem; margin: 0; letter-spacing: -0.05em; }

.panel {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 32px;
}

.tiny {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.status {
  color: rgba(255, 255, 255, 0.68);
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

input, textarea { 
  width: 100%; 
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 16px; 
  padding: 16px; 
  color: white; 
  font: inherit;
  outline: none;
  transition: border-color 0.3s;
}
input:focus, textarea:focus { border-color: rgba(255, 255, 255, 0.3); }

button {
  padding: 18px 36px;
  border-radius: 999px;
  border: none;
  background: white;
  color: black;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}
button:hover, button:active { 
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.message {
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 12px;
}

.empty {
  color: var(--muted);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding-bottom: 80px;
}

.post-card {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.post-card:hover, .post-card:active {
  background: var(--glass-hover);
  border-color: var(--cyan);
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.1);
  transform: translateY(-4px);
}

.post-card strong {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.post-card:hover strong {
  color: var(--cyan);
}

.post-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.05rem;
}

.post-card .tiny {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.7;
}

@media (max-width: 700px) {
  .post-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .post-card {
    padding: 24px;
  }
}

.dash-grid { display: grid; gap: 20px; }
.post-item { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 20px; 
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
}
.post-actions { display: flex; gap: 10px; }
.btn-small { padding: 8px 16px; font-size: 0.85rem; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass); color: white; cursor: pointer; }
.btn-danger { background: rgba(255, 0, 0, 0.2); color: #ff4444; border: 1px solid rgba(255, 0, 0, 0.3); }
.btn-danger:hover { background: rgba(255, 0, 0, 0.3); }
.nav-tabs { display: flex; gap: 20px; margin-bottom: 30px; }
.tab { cursor: pointer; opacity: 0.5; font-weight: 700; font-size: 1.2rem; }
.tab.active { opacity: 1; border-bottom: 2px solid white; }

.auth-shell { max-width: 600px; margin: 0 auto; }
.page-head-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.spaced-top { margin-top: 20px; }
.editor-excerpt { min-height: 80px; }
.editor-content { min-height: 400px; }

.hidden { display: none !important; }

.split {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

.wire-shell {
  padding-bottom: 80px;
}

.wire-hero {
  padding: 24px 0 36px;
}

.wire-headline h1 {
  font-size: clamp(4rem, 9vw, 6.5rem);
  line-height: 0.92;
  margin: 0;
  letter-spacing: -0.07em;
}

.wire-signal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 24px;
  margin-bottom: 28px;
}

.wire-feature {
  position: relative;
  overflow: hidden;
}

.wire-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(0, 243, 255, 0.08), transparent 36%),
    linear-gradient(300deg, rgba(255, 0, 140, 0.08), transparent 36%);
  pointer-events: none;
}

.wire-feature-muted::before {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.05), transparent 45%);
}

.wire-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.wire-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22f38f;
  box-shadow: 0 0 18px rgba(34, 243, 143, 0.8);
}

.wire-thought {
  display: grid;
  gap: 16px;
}

.wire-thought-featured {
  min-height: 220px;
  align-content: start;
}

.wire-thought-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.wire-thought-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wire-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
  text-transform: lowercase;
}

.wire-pill-muted {
  color: rgba(255, 255, 255, 0.68);
}

.wire-copy {
  margin: 0;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.7;
  max-width: 42rem;
}

.wire-placeholder {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.wire-filter-shell,
.wire-archive {
  margin-bottom: 28px;
}

.wire-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.wire-filter {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: white;
}

.wire-filter.active,
.wire-filter:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.wire-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.reader-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 40px 0;
}

.article p {
  margin-bottom: 1.5em;
  line-height: 1.8;
}

@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
  .page-head-row { flex-direction: column; align-items: stretch; }
  .wire-signal-grid { grid-template-columns: 1fr; }
  .wire-thought-meta { flex-direction: column; }
  .reader-nav { flex-wrap: wrap; }
}
