:root {
  --bg-1: #050a16;
  --bg-2: #0b1223;
  --panel: rgba(11, 19, 34, 0.7);
  --panel-strong: rgba(12, 19, 31, 0.88);
  --panel-soft: rgba(19, 29, 47, 0.78);
  --text: #edf7ff;
  --muted: #9eb6d9;
  --line: rgba(147, 171, 198, 0.18);
  --cyan: #74e4ff;
  --cyan-strong: #16b9ff;
  --teal: #57f0cf;
  --violet: #8868ff;
  --pink: #ff75b6;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(24, 185, 255, 0.2), transparent 22%),
    radial-gradient(circle at 80% 0%, rgba(136, 104, 255, 0.17), transparent 28%),
    linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 52%, #091728 100%);
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
a {
  font: inherit;
}

.background-glow {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.25;
  pointer-events: none;
}

.glow-one {
  top: 6%;
  left: 6%;
  width: 240px;
  height: 240px;
  background: rgba(24, 185, 255, 0.8);
}

.glow-two {
  right: 8%;
  bottom: 10%;
  width: 260px;
  height: 260px;
  background: rgba(136, 104, 255, 0.75);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0 1.25rem;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  color: #051018;
  font-weight: 800;
  box-shadow: 0 0 20px rgba(116, 228, 255, 0.35);
}

.brand-name {
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-tag {
  font-size: 0.78rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem;
}

.site-nav a,
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 2.25rem 0 1.5rem;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(116, 228, 255, 0.22);
  background: rgba(24, 185, 255, 0.1);
  color: var(--cyan);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0.9rem 0 0.9rem;
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.hero-copy p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

.primary-btn,
.secondary-btn,
#randomPortalBtn,
.search-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.primary-btn,
#randomPortalBtn,
.search-row button {
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  color: #06141d;
  border-color: rgba(87, 240, 207, 0.38);
  box-shadow: 0 8px 22px rgba(87, 240, 207, 0.22);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.primary-btn:hover,
.secondary-btn:hover,
#randomPortalBtn:hover,
.search-row button:hover {
  transform: translateY(-1px);
}

.hero-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.5rem 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.hero-meta li {
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.visual-frame {
  width: min(100%, 540px);
  background: rgba(13, 20, 30, 0.72);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.window-bar {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--line);
}

.window-bar span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}

.window-bar span:nth-child(1) { background: #ff6d73; }
.window-bar span:nth-child(2) { background: #f7c75d; }
.window-bar span:nth-child(3) { background: #45d483; }

.visual-frame img {
  width: 100%;
  height: auto;
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
}

.stats-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 1rem;
  margin: 0.5rem 0 2.4rem;
}

.stat-card {
  background: rgba(11, 19, 34, 0.7);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}

.stat-card .label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 0.7rem;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: -0.06em;
}

.preview-showcase,
.archive-panel {
  margin-top: 2rem;
}

.section-heading {
  margin-bottom: 1rem;
}

.section-heading h2 {
  margin: 0.7rem 0 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.05em;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.preview-card {
  background: rgba(11, 19, 34, 0.72);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.preview-image-wrap {
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--line);
}

.preview-image-wrap img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.preview-copy {
  padding: 1rem 1rem 1.2rem;
}

.preview-copy h3 {
  margin: 0 0 0.5rem;
  font-size: 1.18rem;
}

.preview-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.toolbar {
  margin-bottom: 1.2rem;
}

.search-label {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-weight: 600;
}

.search-row {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.search-row input {
  flex: 1;
  border: 1px solid var(--line);
  background: rgba(8, 16, 26, 0.78);
  color: var(--text);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  outline: none;
}

.search-row input:focus {
  border-color: rgba(116, 228, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(24, 185, 255, 0.12);
}

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

.category-card {
  background: rgba(11, 19, 34, 0.7);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.category-name {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}

.category-count {
  display: inline-flex;
  min-width: 2.2rem;
  padding: 0.4rem 0.6rem;
  justify-content: center;
  border-radius: 999px;
  background: rgba(87, 240, 207, 0.12);
  border: 1px solid rgba(87, 240, 207, 0.2);
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 700;
}

.portal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.portal-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.portal-item a:hover {
  background: rgba(24, 185, 255, 0.05);
  border-color: rgba(116, 228, 255, 0.2);
  transform: translateX(1px);
}

.portal-name {
  display: block;
  font-size: 0.96rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-meta {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header,
  .site-footer,
  .search-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
  }

  .stats-panel {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: clamp(2.4rem, 14vw, 4rem);
  }
}
