:root {
  --bg: #0a0a0f;
  --panel: rgba(15, 15, 25, 0.8);
  --text: #e8f4ff;
  --muted: #a8b8d1;
  --primary: #4da6ff;
  --link: #66b3ff;
  --border: rgba(30, 50, 80, 0.3);
  --cosmic-purple: #8b5cf6;
  --cosmic-blue: #3b82f6;
  --cosmic-pink: #ec4899;
  --cosmic-orange: #f97316;
  --star-glow: rgba(255, 255, 255, 0.8);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.1)),
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%),
    url('/posts/bkgd.jpeg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

.site-header, .site-footer {
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.site-footer { border-top: 1px solid var(--border); border-bottom: none; }

.site-header .container, .site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--link);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  transition: all 0.3s ease;
  font-size: 14px;
}

.social-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(124, 196, 255, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(124, 196, 255, 0.2);
}

.x-link:hover {
  background: rgba(0, 0, 0, 0.1);
}

.ens-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 500;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.nav a {
  color: var(--link);
  text-decoration: none;
  margin-left: 16px;
}

main.container { padding: 28px 16px; }

h1, h2, h3, h4 { color: var(--text); }
p { color: var(--muted); }
a { color: var(--link); }

.post-list { display: grid; gap: 20px; }
.post-card {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--panel);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.6;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(77, 166, 255, 0.2);
  border-color: rgba(77, 166, 255, 0.3);
}
.post-card h3 { margin: 0 0 6px; }
.post-card .meta { color: var(--muted); font-size: 14px; }

.post article { 
  padding: 24px; 
  background: var(--panel); 
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1); 
  border-radius: 16px; 
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.post .title { margin-top: 0; }
.post .back { display: inline-block; margin-bottom: 16px; }

/* markdown content */
.post article :where(pre, code) { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.post article pre { background: #0a0f14; border: 1px solid var(--border); padding: 12px; border-radius: 8px; overflow: auto; }
.post article code { background: #0a0f14; padding: 2px 6px; border-radius: 6px; }
.post article blockquote { border-left: 3px solid var(--border); margin: 0; padding-left: 12px; color: var(--muted); }
.post article img { max-width: 100%; border-radius: 8px; }
.post article h1, .post article h2, .post article h3 { margin-top: 24px; }

.about { padding: 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }

/* Construction banner */
.construction-banner {
  margin-bottom: 32px;
  padding: 24px;
  background: linear-gradient(135deg, 
    rgba(77, 166, 255, 0.2), 
    rgba(139, 92, 246, 0.2), 
    rgba(236, 72, 153, 0.2));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.construction-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    transparent 30%, 
    rgba(255, 255, 255, 0.1) 50%, 
    transparent 70%);
  animation: cosmic-shimmer 3s ease-in-out infinite;
}

@keyframes cosmic-shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.construction-content h2 {
  margin: 12px 0 8px;
  color: #fff;
  font-size: 1.4em;
  font-weight: 700;
}

.construction-content p {
  margin: 0;
  color: #fff;
  opacity: 0.9;
}

/* Loading spinner */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Bio section */
.bio-section {
  margin-bottom: 24px;
}

.bio-card {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  margin-bottom: 24px;
}

.bio-card.subtle {
  background: rgba(17, 22, 29, 0.3);
  border: 1px solid rgba(30, 37, 48, 0.5);
  backdrop-filter: blur(10px);
  padding: 16px;
}

.bio-text {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9em;
  font-weight: 300;
  opacity: 0.8;
  transition: all 0.3s ease;
  text-shadow: 0 0 0 transparent;
}

.bio-tags {
  margin: 0;
  color: var(--muted);
  font-size: 0.85em;
  line-height: 1.4;
  opacity: 0.7;
  font-weight: 300;
  transition: all 0.3s ease;
  text-shadow: 0 0 0 transparent;
}

.bio-card:hover .bio-text {
  color: var(--primary);
  text-shadow: 0 0 8px rgba(124, 196, 255, 0.6), 0 0 16px rgba(124, 196, 255, 0.4);
  opacity: 1;
}

.bio-card:hover .bio-tags {
  color: var(--primary);
  text-shadow: 0 0 6px rgba(124, 196, 255, 0.5), 0 0 12px rgba(124, 196, 255, 0.3);
  opacity: 0.9;
}

.bio-card h2 {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 1.5em;
}

.bio-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.1em;
  line-height: 1.6;
}

/* Experimental section */
.experimental-section {
  margin-bottom: 32px;
}

.lab-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 16px;
}

.lab-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(124, 196, 255, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(124, 196, 255, 0.2);
}

.lab-toggle svg {
  opacity: 0.8;
  transition: all 0.3s ease;
}

.lab-toggle:hover svg {
  opacity: 1;
  transform: scale(1.1);
}

/* Mind map styles */
.mindmap-container {
  margin-bottom: 32px;
}

.mindmap-container h2 {
  text-align: center;
  margin-bottom: 24px;
  color: var(--text);
  font-size: 1.8em;
}

.mindmap {
  position: relative;
  height: 600px;
  background: linear-gradient(135deg, rgba(17, 22, 29, 0.8), rgba(11, 15, 20, 0.9));
  border: 1px solid rgba(30, 37, 48, 0.3);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.mindmap-node.outer-node {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: all 0.4s ease;
}

.mindmap:hover .mindmap-node.outer-node {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.connection-line {
  opacity: 0.4;
  transition: all 0.4s ease;
}

.mindmap:hover .connection-line {
  opacity: 0.4;
}

.mindmap-connections {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.connection-line {
  stroke: url(#gradient);
  stroke-width: 1.5;
  opacity: 0.4;
  transition: all 0.4s ease;
  filter: drop-shadow(0 0 2px rgba(124, 196, 255, 0.3));
}

.mindmap:hover .connection-line {
  opacity: 0.4;
}

.connection-line:hover {
  stroke: var(--primary);
  stroke-width: 3;
  opacity: 0.8;
  filter: drop-shadow(0 0 8px rgba(124, 196, 255, 0.6));
}

.mindmap-node {
  position: absolute;
  width: 120px;
  height: 60px;
  background: rgba(11, 15, 20, 0.8);
  border: 1px solid rgba(124, 196, 255, 0.2);
  border-radius: 30px;
  cursor: grab;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  user-select: none;
}

.mindmap-node:active {
  cursor: grabbing;
}

.mindmap-node.dragging {
  cursor: grabbing;
  z-index: 1000;
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 8px 32px rgba(124, 196, 255, 0.4);
  border-color: rgba(124, 196, 255, 0.6);
}

.central-node {
  width: 140px;
  height: 80px;
  background: linear-gradient(135deg, rgba(124, 196, 255, 0.8), rgba(155, 213, 255, 0.6));
  border: 1px solid rgba(124, 196, 255, 0.4);
  top: 50%;
  left: 50%;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 8px 32px rgba(124, 196, 255, 0.3);
  backdrop-filter: blur(20px);
  cursor: default;
}

.outer-node {
  background: rgba(11, 15, 20, 0.6);
  border: 1px solid rgba(30, 37, 48, 0.4);
  backdrop-filter: blur(15px);
}

.mindmap-node:hover {
  border-color: rgba(124, 196, 255, 0.6);
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 8px 32px rgba(124, 196, 255, 0.2);
  backdrop-filter: blur(20px);
}

.mindmap-node:hover .node-label {
  background: rgba(124, 196, 255, 0.9);
  color: #fff;
  border-color: rgba(124, 196, 255, 0.6);
  transform: translateX(-50%) translateY(-8px);
  box-shadow: 0 4px 16px rgba(124, 196, 255, 0.3);
}

.mindmap-node.active {
  border-color: var(--primary);
  background: rgba(124, 196, 255, 0.1);
  transform: translate(-50%, -50%) scale(1.05);
}

.node-label {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 600;
  color: var(--text);
  font-size: 0.9em;
  text-align: center;
  white-space: nowrap;
  background: var(--bg);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  z-index: 3;
  transition: all 0.3s ease;
  text-shadow: 0 0 0 transparent;
}

.central-node .node-label {
  color: #fff;
  font-size: 1em;
  font-weight: 700;
  background: var(--primary);
  border-color: var(--primary);
  text-shadow: 0 0 0 transparent;
}

.mindmap-node:hover .node-label {
  color: var(--primary);
  text-shadow: 0 0 8px rgba(124, 196, 255, 0.8), 0 0 16px rgba(124, 196, 255, 0.6), 0 0 24px rgba(124, 196, 255, 0.4);
  background: rgba(124, 196, 255, 0.1);
  border-color: rgba(124, 196, 255, 0.6);
  box-shadow: 0 0 20px rgba(124, 196, 255, 0.3);
}

.central-node:hover .node-label {
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.9), 0 0 24px rgba(124, 196, 255, 0.8), 0 0 36px rgba(124, 196, 255, 0.6);
  background: linear-gradient(135deg, rgba(124, 196, 255, 0.9), rgba(155, 213, 255, 0.8));
  border-color: rgba(124, 196, 255, 0.8);
  box-shadow: 0 0 25px rgba(124, 196, 255, 0.4);
}

.node-content {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9em;
  text-align: center;
  line-height: 1.2;
  padding: 8px;
}

.central-node .node-content {
  color: #fff;
  font-size: 1em;
  font-weight: 700;
}

.node-definition {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.85em;
  color: var(--muted);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10;
  min-width: 200px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  white-space: normal;
  max-width: 250px;
  pointer-events: none;
}

.node-definition::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--border);
}

.node-definition::after {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid var(--bg);
}

/* Responsive design */
@media (max-width: 768px) {
  .mindmap {
    height: 500px;
  }
  
  .mindmap-node {
    width: 100px;
    height: 50px;
  }
  
  .central-node {
    width: 120px;
    height: 70px;
  }
  
  .node-content {
    font-size: 0.8em;
  }
  
  .central-node .node-content {
    font-size: 0.9em;
  }
  
  .node-definition {
    font-size: 0.8em;
    max-width: 200px;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .social-links {
    gap: 12px;
  }
  
  .social-link {
    padding: 4px 8px;
    font-size: 13px;
  }
}



