/*
Theme Name: Dapp Ahoy
Theme URI: https://dappahoy.com
Author: Dapp Whisperer 
Author URI: https://dappahoy.com 
Description: WordPress theme for Dapp Ahoy. 
Version: 1.0
*/

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&display=swap');

/* =========================
   CSS Custom Properties
   ========================= */
:root {
  --primary-bg: #000012;
  --secondary-bg: #1a1a2e;
  --accent-cyan: #00ffff;
  --accent-cyan-rgb: 0, 255, 255; /* for rgba() */
  --accent-magenta: #ff00ff;
  --accent-purple: #8b00ff;
  --accent-gold: #ffd700;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --border-color: #333366;
  --hover-glow: rgba(0, 255, 255, 0.3);
  --card-bg: rgba(26, 26, 46, 0.8);

  /* sticky sidebar offset */
  --sidebar-sticky-top: clamp(12px, 2.5vw, 24px);
}

[data-theme="light"] {
  --primary-bg: #f0f0f0;
  --secondary-bg: #ffffff;
  --accent-cyan: #0066cc;
  --accent-cyan-rgb: 0, 102, 204;
  --accent-magenta: #cc0066;
  --accent-purple: #6600cc;
  --accent-gold: #cc9900;
  --text-primary: #000000;
  --text-secondary: #666666;
  --border-color: #cccccc;
  --hover-glow: rgba(0, 102, 204, 0.3);
  --card-bg: rgba(255, 255, 255, 0.9);
}

.layout--full .layout__main--full { width:100%!important; max-width: var(--content-xxl, 1920px); margin-inline: auto; }

/* =========================
   Reset & Base
   ========================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { max-width: 100vw; height: 100%; overflow-x: hidden; }

body {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: var(--primary-bg);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--accent-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 { font-family: 'Roboto Condensed', sans-serif; font-weight: 700; }

/* Article body links */
.article-body a:link,
.article-body a:visited { color: var(--accent-cyan); }

table { width: 100%; }
thead { text-align: left; }
tr:hover { background: rgba(0, 255, 255, 0.1); }

/* =========================
   Generic Containers
   ========================= */
.container {
  max-width: 100vw;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Common centered site container */
.site-container {
  max-width: 1440px; /* responsive cap */
  width: 100%;
  margin: 0 auto;
  padding: 4rem 24px; /* allow for fixed header */
}

/* Home/index two-column layout (content + sidebar) */
.container-index {
  margin: 2rem auto 0;
  padding: 3rem 0 0;
  display: grid;
  grid-template-columns: 5fr 2fr;
  gap: 2rem;
  min-height: calc(99vh - 40px);
  max-width: calc(99vw - 2rem);
}

.main-content { display: flex; flex-direction: column; width: 100%; overflow-x: hidden; }
.sidebar { display: flex; flex-direction: column; gap: 1rem; margin-top: 2.3rem; }

.main-content,
.article-card,
.articles-grid { max-width: 100%; overflow-x: hidden; }

/* =========================
   Background Effects
   ========================= */
.matrix-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.1; }

/* =========================
   Header & Navigation
   ========================= */
.header {
  position: relative;
  top: 0; left: 0; right: 0;
  background: linear-gradient(to bottom, #0a1a2f, #1c2b44);
  z-index: 1000;
  padding: 1rem 0;
}

.header-content { display: flex; justify-content: space-between; align-items: center; max-width: 1370px; margin: 0 auto; padding: 0 1rem; }

.site-info { flex: 1; }
.site-name { margin: 0; font-size: 1.5rem; font-weight: 700; }
.logo { color: var(--accent-cyan); text-shadow: 0 0 10px var(--accent-cyan); }

.nav-container { flex: 1; display: flex; justify-content: flex-end; }
.nav-menu { list-style: none; display: flex; gap: 1rem; }
.nav-item { position: relative; }

.nav-link,
.dropdown-toggle {
  color: var(--text-primary);
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  transition: color 0.3s, transform 0.2s;
  background: none; border: none; cursor: pointer; text-decoration: none;
}
.nav-link:hover,
.dropdown-toggle:hover { color: var(--accent-cyan); transform: scale(1.05); }

.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--primary-bg);
  border: 1px solid var(--accent-cyan);
  list-style: none; padding: 0.5rem 0; margin: 0; min-width: 200px; z-index: 1000;
}
.dropdown-menu li { padding: 0.5rem 1rem; }
.dropdown-menu a { color: var(--text-primary); display: block; font-family: 'Roboto Condensed', sans-serif; }
.dropdown-menu a:hover { color: var(--accent-cyan); }
.dropdown:hover .dropdown-menu,
.dropdown-menu:hover { display: block; }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.bar { width: 25px; height: 3px; background: var(--accent-cyan); margin: 5px 0; transition: all 0.3s ease; }

/* =========================
   News Lists & Cards (generic)
   ========================= */
.news-container { display: flex; flex-direction: column; gap: 10px; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }

/* Keep .news-item minimal; specialize per context */
.news-item { display: flex; align-items: center; gap: 15px; }

/* Card-style news items inside .news-grid */
.news-grid .news-item {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  padding: 5px;
  transition: transform 0.2s, box-shadow 0.3s, background-color 0.3s;
}
.news-grid .news-item:hover {
  transform: translateY(-3px) scale(1.02);
  background-color: rgba(var(--accent-cyan-rgb), 0.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.news-item a { color: var(--accent-cyan); transition: color 0.3s ease; }
.news-item a:hover { color: var(--text-primary); text-decoration: underline; }

/* Inline text link reuse */
.text-container a { color: var(--accent-cyan); transition: color 0.3s ease; }
.text-container a:hover { color: var(--text-primary); text-decoration: underline; }

/* =========================
   Sidebar Blocks
   ========================= */
.sidebar-block { background: var(--card-bg); border: 1px solid var(--border-color); padding: 1rem; transition: all 0.3s ease; }
.sidebar-block h3 { color: var(--accent-cyan); margin-bottom: 1rem; font-size: 1.1rem; text-transform: uppercase; }

/* =========================
   Articles Grid — 2/3 + 1/3 first row, then 3-up
   ========================= */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 20px);
  padding: 2.3rem 0;
  margin: 0 auto;
  width: 100%;
  grid-auto-flow: row dense; /* lets card #2 occupy the remaining 1/3 of row 1 */
}

/* =========================
   Article Cards
   ========================= */
.article-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.article-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0,0,0,0.3); }

/* FEATURED-FIRST: span 2 cols and elevate visuals */
.article-card--featured-first { grid-column: span 2; }
.article-card--featured-first .article-card__title {
  font-size: clamp(1.1rem, 1.2vw + 1rem, 1.6rem);
  line-height: 1.2;
}
.article-card--featured-first .article-card__image { aspect-ratio: 16 / 9; }

/* shimmer sweep (disabled later for premium feel) */
.article-card::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: -100%;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,255,255,0.1), transparent);
  transition: left 0.5s ease;
}
.article-card:hover::before { left: 100%; }

.article-card__image img,
.featured-image { width: 100%; height: auto; border-radius: 6px; }

.article-card__placeholder {
  width: 100%; aspect-ratio: 3/4;
  background: var(--border-color);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 1rem; text-align: center;
}

.article-card__content { padding: 0.5rem; }
.article-card__content h3 { font-size: 1.75rem; margin: 0; color: var(--text-primary); line-height: 1.3; }
.article-card__content p {
  font-size: 1.1rem; color: var(--text-secondary); line-height: 1.6; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis;
}

/* Fun effects (optional) */
.article-card.aberrate { filter: hue-rotate(45deg) blur(0.5px); transform: rotate(2deg) scale(1.02); }
.article-card.mutate { filter: contrast(110%) brightness(95%) sepia(0.2); transform: skewX(1deg) scale(1.01); }
.article-card.distort { filter: grayscale(10%) saturate(120%); transform: perspective(500px) rotateY(3deg); }
.article-card.corrupt { filter: drop-shadow(0 0 2px rgba(255,0,255,0.5)) contrast(105%); transform: rotate(-1deg) scale(1.03); }
.article-card.invert { filter: invert(10%) hue-rotate(20deg); transform: scale(1.02) rotate(1deg); }

.article-card:hover h3,
.article-card.aberrate h3,
.article-card.mutate h3,
.article-card.distort h3,
.article-card.corrupt h3,
.article-card.invert h3 { color: var(--accent-cyan); text-shadow: 0 0 2px var(--text-primary), 0 0 10px #000; }

.article-card:hover p,
.article-card.aberrate p,
.article-card.mutate p,
.article-card.distort p,
.article-card.corrupt p,
.article-card.invert p { color: var(--text-secondary); text-shadow: 0 0 1px var(--text-primary); }

.article-card__intro { font-size: 0.85rem; color: var(--text-secondary); margin: 0.5rem 0; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* List view variant for articles grid */
.articles-grid.list { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.5rem; }
.articles-grid.list .article-card { width: 100%; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 0.5rem; margin: 0; box-shadow: 0 4px 8px rgba(0,0,0,0.2); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.articles-grid.list .article-card:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0,0,0,0.3); }
.articles-grid.list .article-card__content { padding: 0; }
.articles-grid.list .article-card__content h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); color: var(--accent-cyan); margin-bottom: 0.5rem; }
.articles-grid.list .article-card__content p { font-size: clamp(0.9rem, 1.5vw, 1rem); color: var(--text-secondary); margin-bottom: 0.5rem; }
.articles-grid.list .links-grid { display: flex; gap: 0.5rem; justify-content: flex-start; }

/* =========================
   Pagination
   ========================= */
.pagination { margin: 2rem 0; display:flex; justify-content:center; }
.pagination ul { list-style:none; display:flex; gap:.5rem; padding:0; margin:0; }
.pagination a, .pagination span {display:inline-block; padding:.5rem .8rem; border-radius:8px; background:rgba(255,255,255,.05); text-decoration:none; }
.pagination .current { font-weight:700; background:rgba(255,255,255,.12); }
.pagination a:hover { background:rgba(255,255,255,.15); }

/* =========================
   Links Grid
   ========================= */
.links-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.link-item { padding: 0.5rem; background: rgba(0,255,255,0.1); border: 1px solid var(--accent-cyan); color: var(--text-primary); text-align: center; transition: all 0.3s ease; }
.link-item:hover { background: rgba(0,255,255,0.2); transform: translateY(-2px); }

/* =========================
   Wallets / Donations
   ========================= */
.wallet-row { display: flex; align-items: center; padding: 15px; border-bottom: 1px solid var(--border-color); transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease; }
.wallet-row:last-child { border-bottom: none; }
.wallet-row:hover { background-color: var(--hover-glow); transform: translateY(-2px); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.qr-code { flex: 0 0 160px; margin-right: 20px; }
.qr-code img { width: 160px; height: 160px; border: 1px solid var(--border-color); border-radius: 4px; }
.wallet-info { flex: 1; }
.wallet-info strong { font-size: 1.2em; color: var(--text-primary); }
.wallet-info code { display: block; font-family: 'Courier New', Courier, monospace; font-size: 0.9em; color: var(--text-secondary); word-break: break-all; margin-top: 5px; background-color: var(--card-bg); padding: 5px; border-radius: 4px; }

/* =========================
   Admin/Dashboard helper
   ========================= */
.section-title { font-size: clamp(1.3rem, 2.5vw, 1.6rem); color: var(--accent-cyan); margin-bottom: 1rem; text-transform: uppercase; }
.delete-link { background: var(--accent-magenta); color: var(--text-primary); }
.delete-link:hover { background: rgba(255,0,255,0.8); transform: translateY(-2px); }

/* =========================
   Related Articles
   ========================= */
.related-articles .related-grid { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 1.5rem !important; max-width: 1200px !important; margin: 0 auto !important; padding: 1rem !important; }
.related-articles .related-card { background: var(--card-bg) !important; border-radius: 8px !important; overflow: hidden !important; box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important; cursor: pointer !important; transition: transform 0.2s !important; }
.related-articles .related-card:hover { transform: translateY(-5px) !important; }
.related-articles .related-card__image { width: 100% !important; height: 200px !important; overflow: hidden !important; }
.related-articles .related-card__image img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
.related-articles .related-card__placeholder { width: 100% !important; height: 100% !important; background: var(--border-color) !important; }
.related-articles .related-card__content { padding: 1rem !important; }
.related-articles .related-card__title { font-size: 1.25rem !important; margin: 0 0 0.5rem !important; color: var(--text-primary) !important; }
.related-articles .related-card__date { font-size: 0.875rem !important; color: var(--text-secondary) !important; margin: 0 !important; }

/* =========================
   Animations
   ========================= */
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes shake { 0% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-5px); } 100% { transform: translateX(0); } }
@keyframes climb { 0% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-10px); } 100% { transform: translateX(-50%) translateY(0); } }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* =========================
   Typography
   ========================= */
h1 { font-size: 2.5rem; margin: 2rem 0 1.5rem; line-height: 1.2; }
h2 { font-size: 1.4rem; margin: 1.75rem 0 1.25rem; line-height: 1.2; }
h3 { font-size: 1.5rem; margin: 1.5rem 0 1rem; line-height: 1.3; }
h4 { font-size: 1.25rem; margin: 1.25rem 0 0.75rem; line-height: 1.3; }
h5 { font-size: 1.1rem; margin: 1rem 0 0.5rem; line-height: 1.4; }
h6 { font-size: 1rem; margin: 0.75rem 0 0.5rem; line-height: 1.4; }

p { margin-bottom: 1.5rem; line-height: 1.6; }
ul, ol { margin: 0.5rem 0; padding-left: 2rem; }

blockquote { margin: 1.5rem 0; padding: 1rem 1.5rem; border-left: 4px solid var(--accent-cyan); background: rgba(0,255,255,0.05); font-style: italic; font-size: 1.1rem; line-height: 1.6; color: var(--text-secondary); }
blockquote p { margin-bottom: 0; }
blockquote cite { display: block; margin-top: 0.75rem; font-size: 0.9rem; color: var(--text-secondary); font-style: normal; }

/* =========================
   New single layout (flex 2/3 main + 1/3 sidebar)
   ========================= */
.layout--with-sidebar { display: flex; gap: 32px; align-items: flex-start; }

/* MAIN: 2/3 */
.layout--with-sidebar > .layout__main,
.layout--with-sidebar > #primary { flex: 0 0 66.6667%; min-width: 0; }

/* SIDEBAR: 1/3 */
.layout--with-sidebar > .widget-area,
.layout--with-sidebar > #secondary,
.layout--with-sidebar > aside { flex: 0 0 33.3333%; max-width: 33.3333%; width: auto; }

/* --- Sticky Sidebar: floats while scrolling, stops at container end --- */
.layout--with-sidebar > #secondary,
.layout--with-sidebar > .widget-area,
.layout--with-sidebar > aside,
.sidebar {
  position: sticky;
  top: var(--sidebar-sticky-top);
  align-self: flex-start;
  height: max-content;
  z-index: 2;
}

/* Optional: make tall sidebars scroll within viewport on desktop */
@media (min-width: 1025px) {
  .sidebar--scrollable,
  .layout--with-sidebar > #secondary.sidebar--scrollable,
  .layout--with-sidebar > .widget-area.sidebar--scrollable {
    max-height: calc(100dvh - var(--sidebar-sticky-top));
    overflow: auto;
    overscroll-behavior: contain;
  }
}

/* Disable stickiness on stacked layouts (≤1024px) */
@media (max-width: 1024px) {
  .layout--with-sidebar > #secondary,
  .layout--with-sidebar > .widget-area,
  .layout--with-sidebar > aside,
  .sidebar {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
  }
}

/* Single post presentation */
.single-post__header { text-align: center; margin-bottom: 24px; }
.single-post__title { margin: 0 0 8px; line-height: 1.2; }
.single-post__meta { font-size: 0.9375rem; opacity: 0.85; }
.single-post__thumb { margin: 24px auto; text-align: center; }
.single-post__featured-image { display: block; margin: 0 auto; height: auto; max-width: 100%; border-radius: 8px; }

/* Limit reading line-length, keep it centered within main column */
.single-post__content { max-width: 760px; margin: 0 auto 24px; }
.single-post__content img,
.single-post__content figure { height: auto; max-width: 100%; }

.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 16px; margin: 24px 0; }

/* =========================
   Responsive
   ========================= */

/* <= 1024px */
@media (max-width: 1024px) {
  .container-index { grid-template-columns: 1fr; padding: 1rem 0; gap: 1rem; max-width: 100%; }
  .articles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; padding: 1rem; width: 100%; }
  .article-card--featured-first { grid-column: 1 / -1; } /* featured fills full width on tablets */
  .article-card__content { padding: 0.5rem; }
  .article-card__content h3 { font-size: clamp(1.1rem, 1.8vw, 1.3rem); }
  .article-card__content p { font-size: clamp(0.85rem, 1.4vw, 0.95rem); -webkit-line-clamp: 3; }

  .header { padding: 0.5rem; }
  .site-name { font-size: clamp(1rem, 1.8vw, 1.2rem); }
  .hamburger { display: flex; }

  .controls { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: rgba(0,0,18,0.95); backdrop-filter: blur(10px); padding: 0.5rem; border-top: 1px solid var(--accent-cyan); }
  .controls.active { display: flex; }

  .hamburger.active .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .hamburger.active .bar:nth-child(2) { opacity: 0; }
  .hamburger.active .bar:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

  /* Stack main + sidebar */
  .layout--with-sidebar { flex-direction: column; }
  .layout--with-sidebar > * { flex: none; max-width: 100%; width: 100%; }
}

/* <= 960px: single-post grid collapse */
@media (max-width: 960px) {
  .layout-two-col { grid-template-columns: 1fr; }
  .sidebar-area { order: 2; }
}

/* <= 768px */
@media (max-width: 768px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; padding: 0.75rem; }
  .article-card__content h3 { font-size: clamp(1rem, 1.6vw, 1.2rem); }
  .article-card__content p { font-size: clamp(0.8rem, 1.3vw, 0.9rem); -webkit-line-clamp: 3; }

  .section-title { font-size: clamp(1.1rem, 1.8vw, 1.3rem); }
  .main-content { order: 1; }
  .sidebar { order: 2; }
}

/* <= 640px (guard: featured card shouldn't span) */
@media (max-width: 640px) {
  .article-card--featured-first { grid-column: auto; }
}

/* <= 480px */
@media (max-width: 480px) {
  .container { padding: 0 0.5rem; }
  .container-index { margin: 2rem auto 0; padding: 6rem 0 0; display: block; min-height: calc(100vh - 80px); max-width: 96vw; }

  .articles-grid { grid-template-columns: 1fr; gap: 0.5rem; padding: 0.5rem; width: 100%; margin: auto; }
  .article-card { width: 100%; border-radius: 6px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); margin: 0.36rem 0; }
  .article-card__content { padding: 0.5rem; }
  .article-card__content h3 { font-size: clamp(0.9rem, 4vw, 1rem); margin-bottom: 0.4rem; }
  .article-card__content p { font-size: clamp(0.75rem, 3.5vw, 0.85rem); -webkit-line-clamp: 2; }
  .article-card__intro { font-size: clamp(0.7rem, 3vw, 0.8rem); -webkit-line-clamp: 2; }

  .article-card__image { width: 100%; height: auto; }
  .article-card__image img { width: 100%; object-fit: cover; }
  .article-card__placeholder { aspect-ratio: 3/4; height: auto; }

  .pagination { gap: 0.3rem; margin-top: 1rem; }
  .pagination button { padding: 0.4rem 0.8rem; font-size: clamp(0.8rem, 3vw, 0.9rem); }

  .site-name { font-size: clamp(0.7rem, 3vw, 0.8rem); }

  .controls { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
  .controls.active { max-height: 300px; }
  .controls a, .controls button { font-size: 0.9rem; padding: 0.4rem 0.8rem; }

  .related-articles .related-grid { grid-template-columns: 1fr !important; gap: 0.75rem !important; padding: 0.5rem !important; }
  .related-articles .related-card__image { height: 120px !important; }
  .related-articles .related-card__title { font-size: 1rem !important; }
  .related-articles .related-card__date { font-size: 0.8rem !important; }
}
/* A11y helper */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* --- Primary menu base --- */
.nav-menu,
.nav-menu ul { list-style: none; }
.nav-menu { display: flex; gap: 1rem; align-items: center; }
.nav-menu > li { position: relative; }

/* Submenu styling (desktop) */
.nav-menu .sub-menu {
  position: absolute;
  top: 100%; left: 0;
  min-width: 220px;
  background: var(--primary-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: .5rem 0;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(6px);
  pointer-events: none; visibility: hidden;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 1000;
}
.nav-menu .sub-menu li { position: relative; }
.nav-menu .sub-menu a {
  display: block; padding: .55rem 1rem;
  color: var(--text-primary); text-decoration: none;
  white-space: nowrap;
}
.nav-menu .sub-menu a:hover { background: rgba(var(--accent-cyan-rgb), .08); }

/* open on hover/focus (desktop) */
.nav-menu > li:hover > .sub-menu,
.nav-menu > li:focus-within > .sub-menu {
  opacity: 1; transform: translateY(0);
  pointer-events: auto; visibility: visible;
}

/* --- Mobile nav panel --- */
@media (max-width: 1024px) {
  .nav-container { position: static; }
  .nav-menu {
    position: fixed;
    left: 0; right: 0; top: 64px; /* header height ~ */
    height: calc(100dvh - 64px);
    background: linear-gradient(180deg, #0a1a2f, #1c2b44 60%, rgba(0,0,18,.98));
    backdrop-filter: blur(8px);
    display: block;
    padding: 1rem;
    overflow-y: auto;
    transform: translateY(-1rem);
    opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
    border-top: 1px solid var(--accent-cyan);
  }
  .nav-container.is-open .nav-menu {
    transform: translateY(0);
    opacity: 1; pointer-events: auto; visibility: visible;
  }

  .nav-menu > li { margin-bottom: .25rem; }
  .nav-menu a { display: block; padding: .75rem 0.75rem; border-radius: 6px; }
  .nav-menu a:active { background: rgba(var(--accent-cyan-rgb), .12); }

  /* Nested submenus collapse vertically on mobile */
  .nav-menu .sub-menu {
    position: static;
    border: 0; border-radius: 0; box-shadow: none;
    padding: 0 0 0 .5rem; margin: 0 0 .25rem;
    max-height: 0; overflow: hidden;
    opacity: 1; transform: none; visibility: visible; /* controlled by height */
    transition: max-height .25s ease;
  }
  .nav-menu .menu-item-has-children.open > .sub-menu { max-height: 1000px; }

  /* Submenu toggle chevron */
  .submenu-toggle {
    background: none; border: 0; margin-left: .25rem;
    width: 36px; height: 36px; border-radius: 6px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .submenu-toggle:focus-visible { outline: 2px solid var(--accent-cyan); }
  .submenu-toggle::before {
    content: ""; display: block; width: 8px; height: 8px;
    border-right: 2px solid var(--text-primary);
    border-bottom: 2px solid var(--text-primary);
    transform: rotate(-45deg); transition: transform .2s ease;
  }
  .menu-item-has-children.open > a + .submenu-toggle::before { transform: rotate(45deg); }
}

/* --- Unique hamburger animation --- */
.hamburger {
  display: none; /* shown via media query */
  position: relative;
  width: 44px; height: 44px;
  border: 1px solid rgba(var(--accent-cyan-rgb), .4);
  border-radius: 12px;
  background: radial-gradient(120% 120% at 50% -10%, rgba(0,255,255,.25), transparent);
  cursor: pointer;
  transition: box-shadow .25s ease, border-color .25s ease, transform .1s ease;
}
.hamburger:hover { box-shadow: 0 0 0 6px rgba(var(--accent-cyan-rgb), .08) inset; }
.hamburger:active { transform: scale(0.98); }
.hamburger .bar {
  position: absolute; left: 10px; right: 10px; height: 2px;
  background: var(--accent-cyan);
  transform-origin: center;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .2s ease, top .3s ease, bottom .3s ease;
}
.hamburger .bar:nth-child(1) { top: 14px; }
.hamburger .bar:nth-child(2) { top: 21px; }
.hamburger .bar:nth-child(3) { bottom: 14px; }

/* pulse ring on open */
.hamburger::after {
  content: ""; position: absolute; inset: 0; border-radius: 12px;
  box-shadow: 0 0 0 0 rgba(var(--accent-cyan-rgb), .45);
  opacity: 0; pointer-events: none;
}
.nav-container.is-open + .hamburger::after {
  animation: ring 600ms ease-out forwards;
}
@keyframes ring {
  0% { box-shadow: 0 0 0 0 rgba(0,255,255,.45); opacity: 1; }
  100% { box-shadow: 0 0 0 16px rgba(0,255,255, 0); opacity: 0; }
}

/* morph to 'DNA X' shape */
.nav-container.is-open + .hamburger .bar:nth-child(1) {
  top: 21px; transform: rotate(45deg);
}
.nav-container.is-open + .hamburger .bar:nth-child(2) {
  opacity: 0; transform: scaleX(0);
}
.nav-container.is-open + .hamburger .bar:nth-child(3) {
  bottom: auto; top: 21px; transform: rotate(-45deg);
}

/* show hamburger only on mobile */
@media (max-width: 1024px) {
  .hamburger { display: inline-block; }
  .nav-menu { gap: 0; } /* tighter in overlay */
}

/* Spacing fix so fixed header doesn't overlay content */
@media (max-width: 1024px) {
  .site-container { padding-top: 6rem; }
}

/* =========================
   Design tokens (pro polish)
   ========================= */
:root {
  /* Surfaces */
  --surface-0: color-mix(in srgb, var(--primary-bg) 96%, black);
  --surface-1: color-mix(in srgb, var(--primary-bg) 92%, black);
  --surface-2: color-mix(in srgb, var(--primary-bg) 86%, black);

  /* Radius & shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.35);
  --shadow-2: 0 6px 24px rgba(0,0,0,.35);

  /* Layout */
  --container-max: 1200px;
  --content-max: 760px;

  /* Gradients */
  --grad-aurora: radial-gradient(120% 120% at 0% 10%, rgba(0,255,255,.10), transparent 40%),
                 radial-gradient(120% 120% at 100% 0%, rgba(139,0,255,.10), transparent 42%);

  /* Borders */
  --grad-border: linear-gradient(90deg, rgba(0,255,255,.5), rgba(139,0,255,.5));

  /* Typography tweaks */
  --tracking-tight: -0.005em;
}

/* Base cleanup: crisp text, calmer neon */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: var(--tracking-tight);
  background:
    var(--grad-aurora),
    radial-gradient(1200px 600px at 50% -10%, rgba(0,255,255,.04), transparent 60%),
    var(--primary-bg);
}

/* Header: glass + subtle border, keeps your gradient */
.header {
  background: linear-gradient(180deg, rgba(10,26,47,.75), rgba(28,43,68,.55));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,255,255,.08);
}

/* Logo: remove heavy glow */
.logo { text-shadow: none; }

/* Links: premium underline on hover, calmer default */
a { text-decoration: none; }
a:hover {
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .15em;
}

/* Cards & sidebar: gradient border ring (subtle) */
.sidebar-block, .article-card, .news-sidebar {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
    var(--grad-border) border-box;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
}
.article-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }

/* =========================
   Single Post — Premium Hero
   ========================= */
.single-hero {
  max-width: var(--container-max);
  margin: 3.3rem auto 24px; /* leaves room for fixed header */
  padding: 24px 24px 0;
}
.single-hero__eyebrow {
  display: inline-flex; gap: .5rem; align-items: center;
  font-size: .875rem; color: var(--text-secondary);
  padding: .25rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(0,255,255,.25);
  background: linear-gradient(180deg, rgba(0,255,255,.08), rgba(0,0,0,.0));
}
.single-hero__title {
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.1;
  margin: .75rem 0 .5rem;
  background: linear-gradient(90deg, var(--accent-cyan), #9b5cff 60%, #b9a6ff 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.single-hero__meta {
  display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center;
  color: var(--text-secondary); font-size: .95rem;
}
.single-hero__meta .sep { opacity: .35; }

/* Featured media: full-bleed feel but contained */
.single-hero__media {
  margin: 20px auto 0;
  max-width: min(100%, var(--container-max));
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: var(--shadow-2);
}
.single-hero__media img { display: block; width: 100%; height: auto; }

/* Reading container */
.single-post__content {
  max-width: var(--content-max);
  margin: 24px auto;
  font-size: 1.05rem;
}
.single-post__content h2, .single-post__content h3 {
  margin-top: 1.75em;
}
.single-post__content p + p { margin-top: 1rem; }



/* ========== Blockquote with left avatar ========== */

/* Global defaults (you can set these in Customizer > Additional CSS) */
:root{
  --quote-avatar: url('https://dappahoy.com/dapp-ai.webp'); /* default avatar */
  --quote-avatar-size: 150px;
  --quote-avatar-gap: 14px;  /* space between avatar and text */
}

/* Base container (handles both Gutenberg figure + plain blockquote) */
figure.wp-block-quote,
blockquote{
  position: relative;
  display: block;
  margin: 1.5rem 0;
  padding: 1rem 1rem 1rem calc(var(--quote-avatar-size) + var(--quote-avatar-gap) + 18px);
  border-left: 3px solid color-mix(in srgb, currentColor 30%, transparent);
  border-bottom: 3px solid color-mix(in srgb, currentColor 30%, transparent);
  background: color-mix(in srgb, currentColor 6%, transparent);
  border-radius: 12px;
  min-height: 130px;
  margin-top:50px;
}

/* The avatar bubble */
figure.wp-block-quote::before,
blockquote::before{
  content: "";
  position: absolute;
  left: 12px;
  bottom: 0;
  width: var(--quote-avatar-size);
  height: var(--quote-avatar-size);
  background-image: var(--quote-avatar);
  background-size: cover;
  background-position: center;
  border-radius: 0;
  box-shadow: 0 0 0 0px rgba(255,255,255,.96), 0 2px 12px rgba(0,0,0,.18);
  /* If your theme is dark by default, lighten/tweak the ring below */
}

/* Text + citation tidy-up */
figure.wp-block-quote p,
blockquote p{
  margin: 1rem 0 .6rem;
    line-height: 1.5;
}
figure.wp-block-quote cite,
blockquote cite{
  display: block;
  margin-top: .35rem;
  font-style: normal;
  font-weight: 600;
  opacity: .8;
}

/* Large style compatibility (Gutenberg's is-style-large) */
figure.wp-block-quote.is-style-large,
blockquote.is-style-large{
  font-size: clamp(1.15rem, 1.05rem + .5vw, 1.35rem);
}

/* Mobile: shrink the avatar and keep the rhythm */
@media (max-width: 600px){
  figure.wp-block-quote,
  blockquote{ --quote-avatar-size: 48px; }
}






/* =========================
   Footer CTA (optional, sleek)
   ========================= */
.footer-cta {
  max-width: var(--container-max);
  margin: 64px auto 0; padding: 16px 24px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(139,0,255,.08), rgba(0,0,0,0));
}

/* Reduce old neon effects that feel “gamer” */
.article-card::before { display: none; }
.logo { text-shadow: none; }

/* Archive hero */
.archive-hero { margin: 3.3rem auto 16px; padding: 0 8px; }
.archive-hero__eyebrow{
  display:inline-flex; gap:.5rem; align-items:center;
  color:var(--text-secondary); font-size:.9rem;
  border:1px solid rgba(0,255,255,.25); padding:.25rem .6rem; border-radius:999px;
  background: linear-gradient(180deg, rgba(0,255,255,.08), rgba(0,0,0,.0));
}
.archive-hero__title{
  margin:.6rem 0 0; font-size:clamp(1.8rem,3.2vw,2.6rem); line-height:1.1;
  background: linear-gradient(90deg, var(--accent-cyan), #9b5cff 60%, #b9a6ff 90%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.archive-hero__desc{ max-width:760px; color:var(--text-secondary); margin-top:.6rem; }
.archive-hero__controls{
  display:flex; align-items:center; gap:12px; margin-top:12px; flex-wrap:wrap;
}
.view-toggle{ display:inline-flex; border:1px solid rgba(255,255,255,.12); border-radius:10px; padding:2px; }
.view-toggle .view-btn{
  background:transparent; border:0; padding:.45rem .7rem; border-radius:8px; color:var(--text-secondary); cursor:pointer;
}
.view-toggle .view-btn.is-active{ color:var(--text-primary); background:rgba(0,255,255,.10); }
.sort-toggle{ color:var(--text-secondary); border:1px solid rgba(255,255,255,.12); padding:.45rem .7rem; border-radius:8px; }
.sort-toggle:hover{ color:var(--text-primary); }

/* Chips + meta */
.article-card__meta{ display:flex; align-items:center; gap:.5rem .75rem; flex-wrap:wrap; color:var(--text-secondary); font-size:.93rem; margin:.35rem 0 .6rem; }
.article-card__meta .sep{ opacity:.35; }
.chip{
  display:inline-flex; align-items:center; gap:.4rem;
  padding:.2rem .55rem; border-radius:999px; font-size:.82rem;
  background: rgba(0,255,255,.08); border:1px solid rgba(0,255,255,.25);
  color: var(--text-primary);
}
.chip--muted{ background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: var(--text-secondary); }

/* List view (toggle class added by JS) */
.articles-grid.list { display:flex; flex-direction:column; gap:.75rem; padding-top:1rem; }
.articles-grid.list .article-card{ display:flex; gap:16px; align-items:flex-start; }
.articles-grid.list .article-card__image{ flex:0 0 280px; max-width:280px; border-radius:10px; overflow:hidden; }
.articles-grid.list .article-card__content{ padding:.25rem 0; }

/* Square, center-cropped article thumbnails */
.article-card__image {
  aspect-ratio: 1 / 1;      /* force 1:1 */
  overflow: hidden;
  border-radius: 8px;
  background: var(--card-bg);
}

.article-card__image > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;         /* center crop */
  object-position: center;   /* center focal point */
}

/* Make the fallback placeholder square too */
.article-card__placeholder {
  aspect-ratio: 1 / 1;
}

/* == Mobile full-width fix pack (paste at end) == */

/* Use dynamic viewport to avoid 100vw scrollbar issues */
:root {
  --mobile-inline-pad: 12px; /* tweak if you want tighter edges */
}

@supports (padding: max(0px)) {
  /* Respect iOS safe-area while keeping small padding */
  .site-container,
  .container-index,
  .articles-grid {
    padding-left: max(var(--mobile-inline-pad), env(safe-area-inset-left));
    padding-right: max(var(--mobile-inline-pad), env(safe-area-inset-right));
  }
}

@media (max-width: 1024px) {
  /* Ensure main index container doesn't cap width on tablet/mobile */
  .container-index { max-width: 100%; width: 100%; }
}

@media (max-width: 480px) {
  /* Remove the 96vw cap that creates side gaps */
  .container-index {
    max-width: 100%;
    width: 100%;
    margin: 0;                 /* remove extra outer margin */
    padding-top: 1rem;         /* keep room for fixed header */
    padding-left: 0;           /* we’ll handle padding via site-container / grid */
    padding-right: 0;
  }

  /* So content can actually reach the edges if you want */
  .site-container {
    padding-left: var(--mobile-inline-pad);
    padding-right: var(--mobile-inline-pad);
  }

  /* Make list view truly responsive on phones */
  .articles-grid.list .article-card {
    flex-direction: column;
  }
  .articles-grid.list .article-card__image {
    flex: 0 0 auto;
    max-width: 100%;
  }
}

/* Optional utility for full-bleed sections (hero/media that must span the screen) */
.full-bleed {
  width: 100dvw;
  margin-left: calc(50% - 50dvw);
  margin-right: calc(50% - 50dvw);
}
/* === Dropdown UX patch (desktop) === */
/* 1) Remove the hover gap by overlapping submenu upward */
.nav-menu .sub-menu {
  top: calc(100% - 8px); /* was 100% — pull it up a bit */
}

/* 2) Delay only the closing (not the opening) */
.nav-menu .sub-menu {
  transition:
    opacity .20s ease .12s,         /* hide after 120ms */
    transform .20s ease .12s,
    visibility 0s linear .12s;       /* keep it "there" during delay */
}
.nav-menu > li:hover > .sub-menu,
.nav-menu > li:focus-within > .sub-menu {
  transition-delay: 0s, 0s, 0s;      /* open instantly */
}

/* 3) Slightly larger hit-area for top-level items */
.nav-menu > li > a { padding-bottom: 0.75rem; }

/* NEXT BLOCK INTEL DESIGN*/

.wp-block-latest-posts__post-title {
    font-size: 150%;
    font-weight: 900;
}

.wp-block-latest-posts.wp-block-latest-posts__list li {
    clear: both;
    overflow-wrap: break-word;
    padding: 1rem 0;
    margin: auto;
    min-height: 100px;
    
}

/* === Web3 Link Hover UX — drop underlines, add neon micro-bar === */

/* 1) Kill all underline-on-hover everywhere */
a:hover,
.article-body a:hover,
.text-container a:hover,
.news-item a:hover {
  text-decoration: none !important;
  text-decoration-thickness: 0 !important;
  text-underline-offset: 0 !important;
}

/* 2) Base link styling (keeps your palette) */
a,
.article-body a,
.text-container a,
.news-item a,
.single-post__content a {
  position: relative;
  text-decoration: none;
  transition: color .2s ease, text-shadow .25s ease;
}

/* 3) Neon micro-bar that animates in (not a text-underline) */
a::after,
.article-body a::after,
.text-container a::after,
.news-item a::after,
.single-post__content a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;                  /* adjust if you want it tighter/looser */
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), #9b5cff 60%, #b9a6ff 95%);
  box-shadow:
    0 0 8px rgba(var(--accent-cyan-rgb), .6),
    0 0 14px rgba(139,0,255,.45);
  border-radius: 999px;
  transition: width .25s ease;
}

/* 4) Hover/focus state: subtle glow + bar reveal */
a:hover,
a:focus-visible,
.article-body a:hover,
.article-body a:focus-visible,
.text-container a:hover,
.text-container a:focus-visible,
.news-item a:hover,
.news-item a:focus-visible,
.single-post__content a:hover,
.single-post__content a:focus-visible {
  color: var(--text-primary);
  text-shadow:
    0 0 6px rgba(var(--accent-cyan-rgb), .45),
    0 0 16px rgba(139,0,255,.35);
}
a:hover::after,
a:focus-visible::after,
.article-body a:hover::after,
.article-body a:focus-visible::after,
.text-container a:hover::after,
.text-container a:focus-visible::after,
.news-item a:hover::after,
.news-item a:focus-visible::after,
.single-post__content a:hover::after,
.single-post__content a:focus-visible::after {
  width: 100%;
}

/* 5) Keep buttons/CTA links clean (no bar) */
a.btn, .btn a,
a.button, .button a,
.link-item a, a.link-item,
.nav-link.button, .chip a {
  text-shadow: none;
}
a.btn::after, .btn a::after,
a.button::after, .button a::after,
.link-item a::after, a.link-item::after,
.nav-link.button::after, .chip a::after {
  content: none;
}

/* 6) Optional: apply the same effect in the top navigation */
.nav-link,
.dropdown-toggle { position: relative; }
.nav-link::after,
.dropdown-toggle::after {
  content: "";
  position: absolute;
  left: 12px;                    /* respects nav padding */
  right: 12px;
  bottom: 6px;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), #9b5cff 60%, #b9a6ff 95%);
  box-shadow:
    0 0 8px rgba(var(--accent-cyan-rgb), .5),
    0 0 14px rgba(139,0,255,.35);
  border-radius: 999px;
  transition: width .25s ease;
}
.nav-link:hover::after,
.nav-link:focus-visible::after,
.dropdown-toggle:hover::after,
.dropdown-toggle:focus-visible::after {
  width: 100%;
}

/* 7) A11y: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  a, .nav-link, .dropdown-toggle { transition: none !important; }
  a::after, .nav-link::after, .dropdown-toggle::after { transition: none !important; width: 100% !important; }
}

/* =========================
   Next-Gen Web3 Dropdown — Desktop Only
   (glass, gradient border, caret, hover-intent close delay)
   ========================= */
:root {
  --menu-ease: cubic-bezier(.2,.8,.2,1);
  --menu-blur: 10px;
}

@media (min-width: 1025px) {
  /* Unify both WP (.sub-menu) and legacy (.dropdown-menu) */
  .nav-menu .sub-menu,
  .dropdown-menu {
    /* positioning & gap fix */
    position: absolute;
    top: calc(100% - 8px);
    left: 0;

    /* layout */
    min-width: 240px;
    padding: .5rem 0;
    border-radius: 12px;

    /* glass + gradient border ring */
    border: 1px solid transparent;
    background:
      linear-gradient(var(--surface-1), var(--surface-1)) padding-box,
      var(--grad-border) border-box;
    backdrop-filter: blur(var(--menu-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--menu-blur)) saturate(140%);

    /* elevation */
    box-shadow: 0 16px 40px rgba(0,0,0,.45);

    /* animate in/out with close delay (hover intent) */
    display: block;             /* override older display:none */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px) scale(.98);
    transform-origin: top center;
    transition:
      opacity .22s var(--menu-ease) .12s,
      transform .22s var(--menu-ease) .12s,
      visibility 0s linear .12s;
    z-index: 1000;
  }

  /* glowing caret */
  .nav-menu .sub-menu::before,
  .dropdown-menu::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 24px;
    width: 12px;
    height: 12px;
    transform: rotate(45deg);
    border: 1px solid transparent;
    background:
      linear-gradient(var(--surface-1), var(--surface-1)) padding-box,
      var(--grad-border) border-box;
    box-shadow: 0 2px 10px rgba(0,255,255,.25);
    border-radius: 2px;
  }

  /* OPEN STATES (instant open, delayed close) */
  .nav-menu > li:hover > .sub-menu,
  .nav-menu > li:focus-within > .sub-menu,
  .dropdown:hover > .dropdown-menu,
  .dropdown:focus-within > .dropdown-menu,
  .dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s, 0s, 0s;
    animation: menuRise .26s var(--menu-ease);
  }

  /* Menu items — animated sweep + neon spine */
  .nav-menu .sub-menu li,
  .dropdown-menu li { position: relative; }

  .nav-menu .sub-menu li + li,
  .dropdown-menu li + li {
    border-top: 1px solid rgba(255,255,255,.06);
  }

  .nav-menu .sub-menu a,
  .dropdown-menu a {
    position: relative;
    display: block;
    padding: .62rem 1rem .62rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    transition: color .18s var(--menu-ease);
  }

  /* left neon spine */
  .nav-menu .sub-menu a::before,
  .dropdown-menu a::before {
    content: "";
    position: absolute;
    left: .6rem;
    top: .5rem;
    bottom: .5rem;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent-cyan), #9b5cff);
    transform: scaleY(.6);
    opacity: 0;
    transition: transform .22s var(--menu-ease), opacity .22s var(--menu-ease);
  }

  /* aurora sweep highlight */
  .nav-menu .sub-menu a::after,
  .dropdown-menu a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      90deg,
      rgba(0,255,255,0) 0%,
      rgba(0,255,255,.12) 40%,
      rgba(155,92,255,.12) 60%,
      rgba(0,255,255,0) 100%
    );
    transform: translateX(-100%);
    opacity: 0;
    transition: transform .35s var(--menu-ease), opacity .24s var(--menu-ease);
    pointer-events: none;
  }

  .nav-menu .sub-menu a:hover,
  .nav-menu .sub-menu a:focus-visible,
  .dropdown-menu a:hover,
  .dropdown-menu a:focus-visible {
    color: var(--accent-cyan);
  }
  .nav-menu .sub-menu a:hover::before,
  .nav-menu .sub-menu a:focus-visible::before,
  .dropdown-menu a:hover::before,
  .dropdown-menu a:focus-visible::before {
    transform: scaleY(1);
    opacity: .9;
  }
  .nav-menu .sub-menu a:hover::after,
  .nav-menu .sub-menu a:focus-visible::after,
  .dropdown-menu a:hover::after,
  .dropdown-menu a:focus-visible::after {
    transform: translateX(0);
    opacity: 1;
  }

  /* slightly larger hit area on the parent item */
  .nav-menu > li > a { padding-bottom: .75rem; }
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  .nav-menu .sub-menu,
  .dropdown-menu,
  .nav-menu .sub-menu a::after,
  .dropdown-menu a::after { transition: none !important; animation: none !important; }
}

/* Keyframes (GPU-friendly: transform/opacity only) */
@keyframes menuRise {
  0% { opacity: 0; transform: translateY(12px) scale(.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* =========================
   Scrollbars — FORCE APPLY
   ========================= */

/* 1) Variables + safe fallbacks */
:root{
  --scrollbar-size: 12px;
  --scrollbar-minlength: 32px;

  /* Fallback colors first (work everywhere), then fancy */
  --scrollbar-track-fallback: rgba(255,255,255,.06);
  --scrollbar-thumb-fallback: #00ffff;

  --scrollbar-track: color-mix(in srgb, var(--primary-bg) 88%, black);
  --scrollbar-thumb-grad: linear-gradient(180deg, var(--accent-cyan), #9b5cff 60%, #b9a6ff 100%);
  --scrollbar-thumb-hover-grad: linear-gradient(180deg, var(--accent-cyan), #b09cff 55%, #e1d9ff 100%);
  --scrollbar-thumb-active-grad: linear-gradient(180deg, #65ffff, #a784ff 60%, #ffffff 100%);
}
[data-theme="light"]{
  --scrollbar-track: color-mix(in srgb, var(--secondary-bg) 96%, white);
}

/* 2) Prevent layout jump when bar appears */
html{ scrollbar-gutter: stable both-edges; }

/* 3) Firefox (must be on the actual scroller) */
html, body, .nav-menu, .sidebar, .articles-grid, .single-post__content, .site-container {
  scrollbar-width: thin;
  /* thumb color, then track color */
  scrollbar-color:
    color-mix(in srgb, var(--accent-cyan) 65%, var(--primary-bg))
    var(--scrollbar-track);
}

/* 4) WebKit (Chrome/Edge/Safari) — target real scrollers explicitly */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.nav-menu::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.articles-grid::-webkit-scrollbar,
.single-post__content::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.nav-menu::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track,
.articles-grid::-webkit-scrollbar-track,
.single-post__content::-webkit-scrollbar-track {
  /* fallback color first, then fancy */
  background: var(--scrollbar-track-fallback);
  background: var(--scrollbar-track);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.nav-menu::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
.articles-grid::-webkit-scrollbar-thumb,
.single-post__content::-webkit-scrollbar-thumb {
  min-height: var(--scrollbar-minlength);
  /* fallback color first, then gradient */
  background: var(--scrollbar-thumb-fallback);
  background: var(--scrollbar-thumb-grad);
  border-radius: 999px;
  border: 2px solid transparent;      /* glass ring */
  background-clip: padding-box;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.06),
    0 0 10px rgba(var(--accent-cyan-rgb), .35);
  transition: background .2s ease, box-shadow .2s ease, opacity .2s ease;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.nav-menu::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover,
.articles-grid::-webkit-scrollbar-thumb:hover,
.single-post__content::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover-grad);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.10),
    0 0 14px rgba(var(--accent-cyan-rgb), .5);
}

html::-webkit-scrollbar-thumb:active,
body::-webkit-scrollbar-thumb:active,
.nav-menu::-webkit-scrollbar-thumb:active,
.sidebar::-webkit-scrollbar-thumb:active,
.articles-grid::-webkit-scrollbar-thumb:active,
.single-post__content::-webkit-scrollbar-thumb:active {
  background: var(--scrollbar-thumb-active-grad);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.16),
    0 0 18px rgba(139,0,255,.45);
}

::-webkit-scrollbar-corner{ background: transparent; }

/* 5) Compact + invisible utilities (optional) */
.scrollbar--minimal::-webkit-scrollbar{ width:8px; height:8px; }
.scrollbar--minimal{ scrollbar-width: thin; }

.scrollbar--invisible{ scrollbar-width: none; }
.scrollbar--invisible::-webkit-scrollbar{ display:none; }

/* 6) Mobile slimmer bars */
@media (max-width: 768px){
  :root{ --scrollbar-size: 8px; --scrollbar-minlength: 28px; }
}

/* 7) High-contrast safety */
@media (forced-colors: active){
  html, body{ scrollbar-color: ButtonText Canvas; }
  ::-webkit-scrollbar-thumb{ box-shadow:none; }
}
/* === Dapp Ahoy Full-Width Template Fix === */

/* Remove global container cap for this template only */
.site-container.site-container--full {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Ensure the main area spans fully */
.layout--full .layout__main--full {
  width: 100% !important;
  max-width: none !important;
}

/* Let the hero actually be full width */
.layout--full .single-hero {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  /* keep some breathing room for text */
  padding-left: clamp(16px, 3vw, 40px);
  padding-right: clamp(16px, 3vw, 40px);
}

/* Full-bleed media inside the hero */
.full-bleed {
  width: 100dvw !important;
  margin-left: calc(50% - 50dvw) !important;
  margin-right: calc(50% - 50dvw) !important;
  border-radius: 0 !important; /* edge-to-edge look */
}

/* If you want the article body to stretch too, uncomment: */

.layout--full .single-post__content {
  max-width: none !important;
  width: 100%;
  padding-left: clamp(16px, 3vw, 40px);
  padding-right: clamp(16px, 3vw, 40px);
}

/* =========================
   TERMINAL MICRO-INTERACTIONS
   ========================= */

/* 1) Cursor hint on titles (">_") */
.article-card__content h3,
.article-card__content h3 a,
.archive-hero__title,
.single-hero__title {
  position: relative;
  cursor: pointer;
}
.article-card__content h3:hover::before,
.article-card__content h3 a:hover::before,
.archive-hero__title:hover::before,
.single-hero__title:hover::before {
  content: "›_";
  position: absolute;
  left: -1.2em;
  top: 0.08em;
  font: 600 0.9rem ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color: var(--accent-cyan);
  opacity: .0;
  transform: translateX(-6px);
  filter: drop-shadow(0 0 6px rgba(var(--accent-cyan-rgb), .6));
  animation: caretSlide .28s ease forwards;
}
@keyframes caretSlide {
  to { opacity: 1; transform: translateX(0); }
}

/* 2) “Typed-in” section headers
   Usage: wrap section title with .section--typed .section-title
   Optionally set --type-width (in ch); defaults to 26ch */
.section--typed .section-title {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid rgba(0,255,255,.6);
  width: 0ch;
  --type-width: 26ch;
  animation: typeIn 1.4s steps(26) forwards, caretBlink 1s step-end infinite;
}
.section--typed .section-title[data-typech] {
  --type-width: attr(data-typech number)ch; /* progressive enhancement */
  animation: typeIn 1.4s steps(var(--type-width, 26)) forwards, caretBlink 1s step-end infinite;
}
@keyframes typeIn { to { width: var(--type-width, 26ch); } }
@keyframes caretBlink { 50% { border-right-color: transparent; } }

@media (prefers-reduced-motion: reduce) {
  .section--typed .section-title { width: auto !important; border-right: 0 !important; animation: none !important; }
}

/* 3) Subtle CRT bloom on hover (titles only) */
.article-card:hover h3,
.archive-hero__title:hover,
.single-hero__title:hover {
  text-shadow:
    0 0 .5px rgba(255,255,255,.6),
    0 0 8px rgba(var(--accent-cyan-rgb), .45),
    0 0 18px rgba(139,0,255,.35);
  filter: saturate(112%) contrast(104%);
}

/* =========================
   CIVIC-STYLE ESSAY TYPOGRAPHY
   (targets posts in categories “Future” and “Imagine”
   or add .is-essay to body for manual opt-in)
   ========================= */
.category-future .single-post__content,
.category-imagine .single-post__content,
.is-essay .single-post__content {
  max-width: 68ch;          /* narrow measure */
  font-size: 1.08rem;
  line-height: 1.85;        /* generous leading */
  letter-spacing: 0.0015em;
  margin-top: 0.25rem;
  hyphens: auto;
}
.category-future .single-post__content h2,
.category-imagine .single-post__content h2,
.is-essay .single-post__content h2,
.category-future .single-post__content h3,
.category-imagine .single-post__content h3,
.is-essay .single-post__content h3 {
  text-wrap: balance;       /* nicer breaks on multi-line heads */
  margin-top: 2.1rem;
  line-height: 1.22;
}
.category-future .single-post__content p,
.category-imagine .single-post__content p,
.is-essay .single-post__content p {
  margin: 0 0 1.1rem 0;
}

/* Optional brand chip under hero for essays */
.category-future .single-hero__eyebrow::after,
.category-imagine .single-hero__eyebrow::after,
.is-essay .single-hero__eyebrow::after {
  content: "Dapp Ahoy! • World beyond Web3";
  margin-left: .6rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .8rem;
  color: var(--text-primary);
  background: rgba(0,255,255,.08);
  border: 1px solid rgba(0,255,255,.25);
}

/* Typed headers — robust version */
.section--typed .section-title {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid rgba(0,255,255,.6);
  width: 0ch; /* starts hidden */
  /* --type-steps: <number>; --type-ch: <length in ch>; set inline */
  animation: typeIn 1.2s steps(var(--type-steps, 28)) forwards, caretBlink 1s step-end infinite;
}
@keyframes typeIn { to { width: var(--type-ch, 28ch); } }
@keyframes caretBlink { 50% { border-right-color: transparent; } }

@media (prefers-reduced-motion: reduce) {
  .section--typed .section-title { width: auto !important; border-right: 0 !important; animation: none !important; }
}

/* ===== Footer ===== */
:root {
  --footer-bg: var(--color-surface-1, #0b0c10);
  --footer-fg: var(--text, #e8e8e8);
  --footer-muted: var(--text-secondary, #a3a3a3);
  --footer-border: var(--border, #2a2d34);
  --footer-link: var(--link, #b1c5ff);
  --footer-link-hover: var(--link-hover, #d7e2ff);
  --footer-chip-bg: rgba(255,255,255,0.06);
  --footer-chip-border: rgba(255,255,255,0.15);
  --focus: #6ea8fe;
}

[data-theme="light"] {
  --footer-bg: #f7f7f9;
  --footer-fg: #131415;
  --footer-muted: #5a5f6a;
  --footer-border: #e5e7eb;
  --footer-link: #2c5cff;
  --footer-link-hover: #1a3fe6;
  --footer-chip-bg: rgba(0,0,0,0.04);
  --footer-chip-border: rgba(0,0,0,0.12);
}

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-fg);
  border-top: 1px solid var(--footer-border);
  margin-top: 3rem;
}

.site-footer .wrapper {
  max-width: 1440px;
  margin-inline: auto;
  padding: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4rem;
}

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-title {
  font-size: 0.85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--footer-muted);
  margin: 0 0 .75rem;
}

.footer-tagline {
  font-size: .95rem;
  line-height: 1.5;
  margin: 0 0 .75rem;
  color: var(--footer-fg);
}

.footer-links,
.legal-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li + li { margin-top: .4rem; }

.footer-links a,
.legal-links a {
  color: var(--footer-fg);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color .15s ease, border-color .15s ease;
}
.footer-links a:hover,
.legal-links a:hover {
  color: var(--footer-link-hover);
  border-color: var(--footer-link-hover);
}

.footer-social {
  display: flex;
  gap: .6rem;
  margin: .5rem 0 1rem;
}
.footer-social a {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--footer-border);
  border-radius: 999px;
  background: var(--footer-chip-bg);
  color: var(--footer-fg);
}
.footer-social a:hover { border-color: var(--footer-link); }

.newsletter {
  display: flex;
  gap: .5rem;
  margin: .75rem 0 .25rem;
}
.newsletter input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  appearance: none;
  background: transparent;
  color: var(--footer-fg);
  border: 1px solid var(--footer-border);
  border-radius: .5rem;
  padding: .55rem .75rem;
  font-size: 0.95rem;
}
.newsletter input::placeholder { color: var(--footer-muted); }
.newsletter .btn {
  appearance: none;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.9rem;
  padding: .55rem .9rem;
  border-radius: .5rem;
  border: 1px solid var(--footer-border);
  background: var(--footer-chip-bg);
  color: var(--footer-fg);
}
.newsletter .btn:hover { border-color: var(--footer-link); color: var(--footer-link-hover); }

.microcopy {
  margin: .35rem 0 0;
  font-size: .8rem;
  color: var(--footer-muted);
}

.status-card {
  border: 1px solid var(--footer-border);
  background: var(--footer-chip-bg);
  border-radius: .75rem;
  padding: .9rem;
  margin-top: 1rem;
}
.status-title {
  font-size: .8rem;
  color: var(--footer-muted);
  margin: 0 0 .5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .4rem .8rem;
  margin: 0;
}
.status-grid dt {
  font-size: .75rem;
  color: var(--footer-muted);
}
.status-grid dd {
  margin: 0;
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
}

.footer-bottom {
  border-top: 1px solid var(--footer-border);
  margin-top: 2rem;
  padding-top: 1rem;
  display: flex;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.copyright {
  margin: 0;
  color: var(--footer-muted);
  font-size: .85rem;
}
.legal-links {
  display: flex;
  gap: .9rem;
  flex-wrap: wrap;
  font-size: .85rem;
}

/* Theme toggle */
.theme-toggle {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--footer-border);
  background: var(--footer-chip-bg);
  border-radius: 999px;
  cursor: pointer;
}
.theme-toggle__icon {
  width: 18px; height: 18px;
  position: relative; display: block;
  background: currentColor;
  mask: radial-gradient(circle at 60% 40%, transparent 7px, #000 7.5px);
  -webkit-mask: radial-gradient(circle at 60% 40%, transparent 7px, #000 7.5px);
}

/* A11y helpers */
.sr-only,
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Focus ring */
.site-footer a:focus,
.site-footer button:focus,
.site-footer input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: .35rem;
}
/* Discuss on X button */ 

/* Right-aligned action row */
.single-hero__actions{
  margin-top:.9rem;
  display:flex;
  justify-content:flex-end;
}

/* Button: dark-friendly, glassy card, neon hover */
.x-discuss-btn{
  display:inline-flex;
  align-items:center;
  gap:.65rem;
  text-decoration:none;
  border:1px solid var(--border-color);
  border-radius:.7rem;
  padding:.6rem .95rem;
  font-weight:600;
  line-height:1;
  background: var(--card-bg);
  color: var(--text-primary);
  backdrop-filter: saturate(140%) blur(6px);
  transition: transform .08s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.x-discuss-btn__icon{
  display:inline-grid;
  place-items:center;
  width:40px; height:40px;
  border-radius:.55rem;
  overflow:hidden; /* clean corners on SVG */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
}

/* Label with neon gradient text for dark mode */
.x-discuss-btn__label{
  background: linear-gradient(90deg, var(--accent-magenta), var(--accent-cyan));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  letter-spacing:.1px;
}

/* Hover / focus: cyan glow using the rgb var */
.x-discuss-btn:hover,
.x-discuss-btn:focus{
  border-color: var(--accent-cyan);
  box-shadow:
    0 0 0 1px var(--border-color),
    0 8px 28px rgba(var(--accent-cyan-rgb), 0.35),
    0 0 24px rgba(var(--accent-cyan-rgb), 0.25) inset;
  transform: translateY(-1px);
}

/* Boost SVG neon on hover */
.x-discuss-btn:hover .x-icon--synth,
.x-discuss-btn:focus .x-icon--synth{
  filter:
    drop-shadow(0 0 6px var(--accent-magenta))
    drop-shadow(0 0 10px rgba(var(--accent-cyan-rgb), 0.9));
}

/* Active */
.x-discuss-btn:active{
  transform: translateY(0);
  box-shadow:none;
}

/* Light theme remains readable via your variables */
[data-theme="light"] .x-discuss-btn{
  backdrop-filter: none;
}
