/* ===== TOKENS ===== */
:root {
  --bg:       #0d0d0d;
  --text:     #d4d4d4;
  --muted:    #666;
  --accent:   #a78bfa;
  --border:   #222;
  --hover-bg: #161616;
  --glow:     #7c6aff22;
  --font:     'JetBrains Mono', monospace;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: .9rem;
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
  position: relative;
}

/* ===== AMBIENT GLOW ===== */
.page-glow {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 480px;
  background: radial-gradient(ellipse at 50% 0%, #5b3fcf38 0%, #3a1f9a14 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

/* ===== POST META ===== */
.post-meta {
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.post-meta a { color: var(--accent); text-decoration: none; }
.post-meta a:hover { color: #fff; }

/* ===== NAV ===== */
.nav { margin-bottom: 3rem; }

.nav-path {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  margin-bottom: .4rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
}

.nav-link {
  color: var(--accent);
  text-decoration: none;
  font-size: .9rem;
  transition: color .15s;
}
.nav-link:hover { color: #fff; }
.nav-link.active { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ===== HERO ===== */
.hero { margin-bottom: 2.5rem; }

.wave {
  display: inline-block;
  font-size: 1.4rem;
  animation: waveHand 2.5s ease-in-out infinite;
  transform-origin: 70% 70%;
  margin-bottom: .3rem;
}
@keyframes waveHand {
  0%, 60%, 100% { transform: rotate(0deg); }
  10%, 30%      { transform: rotate(-18deg); }
  20%, 40%      { transform: rotate(14deg); }
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .75rem;
}
.name { color: var(--accent); }

.bio {
  color: var(--muted);
  font-size: .85rem;
  max-width: 52ch;
  line-height: 1.7;
}
.bio a, .content a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .15s;
}
.bio a:hover, .content a:hover { color: #fff; }

/* ===== DIVIDER ===== */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* ===== SOCIALS ===== */
.socials {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.social-group h2 {
  font-size: .8rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: .85rem;
}
.social-group h2::before { content: '### '; color: var(--border); }

.links-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.icon-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: .8rem;
  transition: color .15s, border-color .15s, background .15s, box-shadow .15s;
  position: relative;
}
.icon-link svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}
.icon-link span { white-space: nowrap; }
.icon-link:hover {
  color: #fff;
  border-color: var(--accent);
  background: var(--hover-bg);
  box-shadow: 0 0 10px var(--glow);
}

/* ===== CONTENT PAGES (blog, projects, setup) ===== */
.content {
  color: var(--text);
  font-size: .88rem;
  line-height: 1.75;
}
.content h1 { font-size: 1.3rem; margin-bottom: 1.5rem; color: #fff; }
.content h2 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--muted);
  margin: 2rem 0 .75rem;
}
.content h2::before { content: '### '; color: var(--border); }
.content h3 { font-size: .85rem; margin: 1.25rem 0 .5rem; color: var(--text); }
.content p { margin-bottom: .9rem; }
.content ul, .content ol { padding-left: 1.25rem; margin-bottom: .9rem; }
.content li { margin-bottom: .25rem; }
.content li::marker { color: var(--accent); }
.content code {
  background: #161616;
  border: 1px solid var(--border);
  padding: .1em .35em;
  border-radius: 3px;
  font-size: .85em;
}
.content pre {
  background: #0a0a0a;
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.content pre code { background: none; border: none; padding: 0; }
.content blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
  margin-bottom: .9rem;
}
.content hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* Post list */
.post-list { list-style: none; padding: 0; }
.post-list li {
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
}
.post-list li:last-child { border-bottom: none; }
.post-date { color: var(--muted); font-size: .78rem; flex-shrink: 0; }
.post-list a {
  color: var(--text);
  text-decoration: none;
  transition: color .15s;
}
.post-list a:hover { color: var(--accent); }

/* ===== FOOTER ===== */
.footer {
  margin-top: 4rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--border);
}

.footer-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 1rem;
  align-items: center;
}
.footer-buttons img {
  height: 31px;
  image-rendering: pixelated;
  opacity: .75;
  transition: opacity .15s;
}
.footer-buttons a:hover img,
.footer-buttons img:hover { opacity: 1; }

.footer-webrings {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: .85rem;
  font-size: .78rem;
}
.webring { display: flex; gap: .4rem; align-items: center; }
.webring a { color: var(--muted); text-decoration: none; transition: color .15s; }
.webring a:hover { color: var(--accent); }

.footer-copy { color: var(--muted); font-size: .78rem; }

/* ===== TOOLTIP ===== */
.tooltip {
  position: fixed;
  background: #1a1a1a;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font);
  font-size: .72rem;
  padding: .25rem .55rem;
  border-radius: 3px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .12s;
  z-index: 200;
}
.tooltip.visible { opacity: 1; }

/* ===== REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  body { padding: 1.5rem 1.25rem 0; }
  h1 { font-size: 1.25rem; }
  .footer-buttons img { height: 28px; }
}

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