/* web3.observer - static site, no build step */

:root {
  --bg: #0a0a0b;
  --bg-elevated: #141416;
  --bg-card: #18181b;
  --border: #27272a;
  --border-hover: #3f3f46;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #22d3ee;
  --accent-hover: #06b6d4;
  --accent-muted: rgba(34, 211, 238, 0.12);
  --radius: 12px;
  --radius-pill: 999px;
  --font: "Outfit", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --header-h: 64px;
  --container: 1280px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

#directory,
#what-is-web3,
#categories,
#category-list {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Header ── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--bg);
    backdrop-filter: none;
  }
}

.header-inner {
  display: flex;
  align-items: center;
  height: var(--header-h);
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.main-nav {
  display: none;
  gap: 1.75rem;
  margin-left: auto;
}

.main-nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
}

.main-nav a:hover {
  color: var(--text);
}

.header-search {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 0.85rem;
  min-width: 200px;
}

.header-search:focus-within {
  border-color: var(--accent);
}

.search-icon {
  color: var(--text-dim);
  flex-shrink: 0;
}

.header-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.875rem;
  width: 100%;
}

.header-search input::placeholder {
  color: var(--text-dim);
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  margin-left: auto;
  padding: 0 8px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.mobile-menu {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.mobile-menu a {
  font-size: 1rem;
  color: var(--text-muted);
}

.mobile-search input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.875rem;
}

@media (min-width: 1024px) {
  .main-nav { display: flex; }
  .header-search { display: flex; }
  .menu-toggle { display: none; }
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.15s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0b;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}

.btn-full {
  width: 100%;
}

/* ── Hero ── */

.hero {
  position: relative;
  min-height: min(100dvh, 900px);
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: 4rem;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 85% 15%, rgba(34, 211, 238, 0.08), transparent),
    linear-gradient(rgba(39, 39, 42, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 39, 42, 0.3) 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  min-height: calc(100dvh - var(--header-h) - 6rem);
}

.hero-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-copy h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 12ch;
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 42ch;
  line-height: 1.65;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hero preview panel */

.hero-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}

.preview-title {
  color: var(--text-muted);
}

.preview-count {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.preview-list {
  list-style: none;
}

.preview-row {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s var(--ease);
}

.preview-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.15rem;
  color: inherit;
}

.preview-row:last-child {
  border-bottom: none;
}

.preview-row:hover {
  background: var(--bg-elevated);
}

.preview-row-active {
  background: var(--accent-muted);
  border-left: 2px solid var(--accent);
}

.preview-icon {
  border-radius: 6px;
}

.preview-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.preview-name {
  font-weight: 500;
  font-size: 0.9rem;
}

.preview-cat {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.preview-chain {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  white-space: nowrap;
}

@media (min-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

@media (min-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

/* ── Chain bar ── */

.chain-bar {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.chain-bar-label {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.chain-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem 2.5rem;
  list-style: none;
}

.chain-logos li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  opacity: 0.5;
  cursor: default;
  transition: opacity 0.25s var(--ease);
}

.chain-logos li:hover,
.chain-logos li:focus-visible {
  opacity: 1;
}

.chain-logos li:focus-visible {
  outline: 2px solid var(--accent-muted);
  outline-offset: 4px;
  border-radius: 4px;
}

.chain-logos li::after {
  content: attr(data-chain);
  position: absolute;
  bottom: calc(100% + 0.55rem);
  left: 50%;
  z-index: 2;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.chain-logos li:hover::after,
.chain-logos li:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.chain-logos img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  transform: scale(var(--chain-scale, 1));
  filter: brightness(0) invert(0.55);
  transition: filter 0.25s var(--ease);
}

.chain-logos li:hover img,
.chain-logos li:focus-visible img {
  filter: brightness(0) invert(0.82);
}

/* ── Sections ── */

.section {
  padding: 5rem 0;
}

.section-heading {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--text-muted);
  max-width: 50ch;
  margin-bottom: 2.5rem;
}

/* ── Featured showcase ── */

.featured-showcase {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.featured-lead {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  color: inherit;
  transition: border-color 0.25s var(--ease);
}

.featured-lead:hover {
  border-color: var(--border-hover);
}

.featured-lead-copy {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
}

.featured-lead-icon {
  border-radius: 8px;
}

.featured-lead h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: color 0.2s var(--ease);
}

.featured-lead:hover h3 {
  color: var(--accent);
}

.featured-lead-copy p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 42ch;
}

.featured-lead-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.25rem;
}

.featured-lead-meta span {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.featured-lead-visual {
  margin: 0;
  border-top: 1px solid var(--border);
}

.featured-lead-visual img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.featured-rest {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.featured-tile {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: inherit;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.featured-tile:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}

.featured-tile-icon {
  border-radius: 6px;
}

.featured-tile h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.2s var(--ease);
}

.featured-tile:hover h3 {
  color: var(--accent);
}

.featured-tile p {
  flex: 1;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.55;
}

.featured-tile-meta {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}

@media (min-width: 768px) {
  .featured-lead {
    grid-template-columns: 1fr 1.15fr;
  }

  .featured-lead-copy {
    padding: 2rem 2.25rem;
    justify-content: center;
  }

  .featured-lead-visual {
    border-top: none;
    border-left: 1px solid var(--border);
  }

  .featured-lead-visual img {
    height: 100%;
    min-height: 240px;
    aspect-ratio: auto;
  }

  .featured-rest {
    grid-template-columns: repeat(3, 1fr);
  }

  .featured-tile p {
    font-size: 0.875rem;
  }
}

/* ── Web3 intro (homepage) ── */

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

.web3-intro {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.web3-intro-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.web3-intro-copy h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.web3-intro-copy p {
  color: var(--text-muted);
  max-width: 58ch;
  margin-bottom: 1rem;
  line-height: 1.65;
}

.web3-intro-copy .btn {
  margin-top: 0.5rem;
}

.web3-intro-visual {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.web3-intro-visual img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

@media (min-width: 768px) {
  .web3-intro-inner {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

/* ── About page ── */

.about-page {
  padding-top: var(--header-h);
}

.page-hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

.page-hero-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.page-hero-inner h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 18ch;
  margin-bottom: 1rem;
}

.page-hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 58ch;
  line-height: 1.65;
}

.about-block-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

.about-block-copy h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.about-block-copy p {
  color: var(--text-muted);
  max-width: 58ch;
  margin-bottom: 1rem;
  line-height: 1.65;
}

.about-block-copy p:last-child {
  margin-bottom: 0;
}

.guidelines-list {
  color: var(--text-muted);
  max-width: 58ch;
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  line-height: 1.65;
}

.guidelines-list li {
  margin-bottom: 0.65rem;
}

.guidelines-list li:last-child {
  margin-bottom: 0;
}

.guidelines-list strong {
  color: var(--text);
  font-weight: 600;
}

.guidelines-list-ordered {
  list-style: decimal;
}

.about-block-alt {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-block-visual {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.about-block-visual img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.about-stats li {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.about-stat-value {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.about-stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.about-categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.about-category-card {
  display: block;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.about-category-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}

.about-category-card:hover h3 {
  color: var(--accent);
}

.about-category-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.about-category-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.about-cta {
  border-top: 1px solid var(--border);
}

.about-cta-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.about-cta-copy h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.about-cta-copy p {
  color: var(--text-muted);
  max-width: 50ch;
}

.about-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .about-block-inner {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
  }

  .about-block-reverse {
    direction: rtl;
  }

  .about-block-reverse > * {
    direction: ltr;
  }

  .about-categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-cta-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2.5rem 3rem;
  }
}

@media (min-width: 1024px) {
  .about-categories {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Category index ── */

.category-index {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.category-index-header,
.category-row {
  display: grid;
  grid-template-columns: minmax(5rem, 0.75fr) 1fr auto;
  align-items: baseline;
  gap: 1rem 1.5rem;
  padding: 0.9rem 1.15rem;
}

.category-index-header {
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.category-index-header-desc {
  display: none;
}

.category-index-header-count {
  text-align: right;
}

.category-row {
  border-bottom: 1px solid var(--border);
  color: inherit;
  transition: background 0.2s var(--ease);
}

.category-row:last-child {
  border-bottom: none;
}

.category-row:hover {
  background: var(--bg-elevated);
}

.category-row-name {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.category-row-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.category-row-count {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}

.category-row:hover .category-row-name {
  color: var(--accent);
}

@media (min-width: 768px) {
  .category-index-header,
  .category-row {
    grid-template-columns: minmax(7rem, 0.55fr) 1.4fr auto;
    padding: 1rem 1.35rem;
  }

  .category-index-header-desc {
    display: block;
  }

  .category-row-name {
    font-size: 1rem;
  }

  .category-row-desc {
    font-size: 0.875rem;
  }
}

/* ── Category listings ── */

.category-list {
  border-top: 1px solid var(--border);
  padding-top: 3rem;
}

.category-list-intro {
  color: var(--text-muted);
  max-width: 50ch;
  margin-bottom: 1.5rem;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.category-tab {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}

.category-tab:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.category-tab.is-active {
  border-color: var(--accent);
  background: var(--accent-muted);
  color: var(--accent);
}

.category-tab[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent-muted);
  color: var(--accent);
}

.category-panel {
  display: none;
}

.category-panel.is-active {
  display: block;
}

.category-panel-desc {
  color: var(--text-muted);
  max-width: 60ch;
  margin-bottom: 1.25rem;
}

.cat-project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.cat-project-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s var(--ease);
}

.cat-project-card:hover {
  border-color: var(--border-hover);
}

.cat-project-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.cat-project-body {
  padding: 1rem 1.15rem 1.15rem;
}

.cat-project-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.cat-project-head img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  aspect-ratio: 1;
  object-fit: contain;
  flex-shrink: 0;
}

.cat-project-head h3 {
  font-size: 1rem;
  font-weight: 600;
}

.cat-project-meta {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-bottom: 0.65rem;
}

.cat-project-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
}

.cat-project-link:hover {
  color: var(--accent-hover);
}

@media (min-width: 768px) {
  .cat-project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Latest additions ── */

.latest-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.latest-col + .latest-col {
  border-top: 1px solid var(--border);
}

.latest-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s var(--ease);
}

.latest-item:last-child {
  border-bottom: none;
}

.latest-item:hover {
  background: var(--bg-elevated);
}

.latest-item img {
  border-radius: 4px;
  flex-shrink: 0;
}

.latest-name {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
}

.latest-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.1rem;
}

@media (min-width: 768px) {
  .latest-grid {
    grid-template-columns: 1fr 1fr;
  }

  .latest-col + .latest-col {
    border-top: none;
    border-left: 1px solid var(--border);
  }
}

/* ── Submit page ── */

.submit-page-body {
  padding-bottom: 4rem;
}

.page-hero-sub a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.submit-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

.submit-tip {
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
  background: var(--accent-muted);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  max-width: 48ch;
}

.submit-tip strong {
  color: var(--text);
  font-weight: 600;
}

.submit-copy p {
  color: var(--text-muted);
  max-width: 48ch;
  line-height: 1.65;
}

.submit-copy a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.submit-requirements-heading {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
}

.submit-requirements {
  color: var(--text-muted);
  max-width: 48ch;
  padding-left: 1.15rem;
  line-height: 1.65;
}

.submit-requirements li {
  margin-bottom: 0.45rem;
}

.submit-guidelines-link {
  margin-top: 1rem;
  font-size: 0.875rem;
}

.submit-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.submit-email-to {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.submit-email-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.submit-email-address {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text);
}

.submit-template-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.45rem;
}

.submit-template-subject {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.submit-template-body {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin: 0 0 2.5rem;
  white-space: pre-wrap;
  overflow-x: auto;
}

.submit-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.submit-copy-note {
  font-size: 0.8rem;
  margin-top: 0.75rem;
  min-height: 1.2em;
  color: #4ade80;
}

@media (min-width: 768px) {
  .submit-inner {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

/* ── Footer ── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-top: 0.65rem;
  max-width: 30ch;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.footer-col h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.85rem;
}

.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  transition: color 0.2s var(--ease);
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--text-dim);
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1.2fr 2fr;
  }

  .footer-nav {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Scroll reveal ── */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Hero load animation ── */

@media (prefers-reduced-motion: no-preference) {
  .hero-copy {
    animation: heroIn 0.7s var(--ease) both;
  }

  .hero-preview {
    animation: heroIn 0.7s var(--ease) 0.15s both;
  }
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Utilities ── */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Category detail page ── */

.category-detail-page {
  padding-top: var(--header-h);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.cat-page-hero {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, var(--accent-muted), transparent 70%);
}

.cat-page-hero-row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
}

.cat-page-hero-copy h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.65rem;
}

.cat-page-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 52ch;
  line-height: 1.6;
}

.cat-page-count {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: var(--radius-pill);
  background: var(--accent-muted);
}

.cat-page-body {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

.cat-list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cat-list-title {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.category-detail-filter-note {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.category-detail-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.category-detail-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem 1rem;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border);
  color: inherit;
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.category-detail-row:last-child {
  border-bottom: none;
}

.category-detail-row:hover {
  background: var(--bg-elevated);
  box-shadow: inset 2px 0 0 var(--accent);
}

.category-detail-row:hover .category-detail-name {
  color: var(--accent);
}

.category-detail-row:hover .category-detail-action {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.category-detail-index {
  display: none;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  min-width: 1.5rem;
}

.category-detail-info {
  min-width: 0;
}

.category-detail-name {
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  transition: color 0.2s var(--ease);
}

.category-detail-meta {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.category-detail-action {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.category-detail-empty {
  text-align: center;
  color: var(--text-dim);
  padding: 3rem 1rem;
  font-size: 0.9rem;
}

.cat-page-back {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.category-panel-footer {
  margin-top: 1.25rem;
  text-align: center;
}

.category-view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  transition: color 0.2s var(--ease);
}

.category-view-all:hover {
  color: var(--accent-hover);
}

@media (min-width: 768px) {
  .cat-page-hero {
    padding: 3rem 0 2.5rem;
  }

  .cat-page-hero-row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .category-detail-index {
    display: block;
  }

  .category-detail-row {
    padding: 1rem 1.35rem;
    gap: 1rem 1.25rem;
  }
}

/* ── 404 ── */

.page-404 {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  overflow: hidden;
}

.page-404-bg {
  opacity: 0.85;
}

.page-404-inner {
  position: relative;
  text-align: center;
  max-width: 32rem;
  width: 100%;
}

.page-404-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  transition: color 0.25s var(--ease);
}

.page-404-logo:hover {
  color: var(--text);
}

.page-404-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.page-404-code {
  font-family: var(--mono);
  font-size: clamp(4rem, 18vw, 7rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
  opacity: 0.12;
  margin-bottom: -0.15em;
  user-select: none;
}

.page-404 h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--text);
}

.page-404-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 38ch;
  margin: 0 auto 2rem;
}

