/* ═══════════════════════════════════════════════════════════
   NACHT — Blog  ·  Futuristic Cyberpunk Stylesheet
   Neon accents, grid backdrop, glassmorphism, holographic UI
   ═══════════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  /* Cyberpunk Palette */
  --bg-primary:    #050508;
  --bg-secondary:  #0a0a12;
  --bg-card:       rgba(10, 10, 20, 0.6);
  --bg-card-hover: rgba(15, 15, 30, 0.75);
  --bg-glass:      rgba(10, 10, 25, 0.5);

  --border-subtle: rgba(0, 240, 255, 0.08);
  --border-hover:  rgba(0, 240, 255, 0.25);
  --border-glow:   rgba(0, 240, 255, 0.4);

  --text-primary:   #e8f4f8;
  --text-secondary: #8aa0a8;
  --text-muted:     #4a5a62;

  --accent-cyan:    #00f0ff;
  --accent-magenta: #ff00a0;
  --accent-violet:  #8b5cf6;
  --accent-soft:    rgba(0, 240, 255, 0.12);
  --accent-glow:    rgba(0, 240, 255, 0.3);

  --tag-bg:         rgba(0, 240, 255, 0.08);
  --tag-border:     rgba(0, 240, 255, 0.2);

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-full: 50%;

  --shadow-card: 0 0 30px rgba(0, 240, 255, 0.08),
                 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow),
                 0 0 80px rgba(0, 240, 255, 0.1);

  --timing-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --timing-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --max-width: 680px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════
   LOADING SCREEN
   ═══════════════════════════════════════ */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: loadingFadeIn 0.4s ease forwards;
}

@keyframes loadingFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.loading__avatar-ring {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-full);
  padding: 2.5px;
  background: conic-gradient(from 0deg, var(--accent-cyan), var(--accent-magenta), var(--accent-cyan));
  animation: loadingRingSpin 1.2s linear infinite;
}

@keyframes loadingRingSpin {
  to { transform: rotate(360deg); }
}

.loading__avatar {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

.loading__name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}

.loading__percent {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-cyan);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.5), 0 0 40px rgba(0, 240, 255, 0.2);
  min-width: 80px;
  text-align: center;
  line-height: 1;
}

.loading__bar {
  width: 140px;
  height: 2px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.loading__bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-magenta));
  border-radius: 2px;
  transition: width 0.15s ease;
  box-shadow: 0 0 10px var(--accent-cyan);
}

/* Main hidden (before loading done) */
.main-hidden {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.5s ease, transform 0.5s var(--timing-smooth);
}

.main-visible {
  opacity: 1;
  transform: scale(1);
}

/* Tech Grid Background — now handled by canvas */
.ambient-glow {
  display: none;
}

/* Scanline overlay — now handled by canvas */
body::after {
  display: none;
}

/* ── Main Container ── */
#main-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Sections ── */
.section {
  padding: 40px 0;
}

.section__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-family: 'JetBrains Mono', monospace;
}

.section__title::before {
  content: '//';
  color: var(--accent-cyan);
  margin-right: 4px;
}

.section__icon {
  color: var(--accent-cyan);
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: clamp(60px, 12vh, 100px);
  padding-bottom: 30px;
  gap: 8px;
}

/* Avatar Ring */
.hero__avatar-ring {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: var(--radius-full);
  padding: 3px;
  background: conic-gradient(from 0deg, var(--accent-cyan), var(--accent-magenta), var(--accent-violet), var(--accent-cyan));
  margin-bottom: 20px;
  animation: ringHueShift 4s linear infinite;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.2), 0 0 60px rgba(255, 0, 160, 0.1);
}

@keyframes ringHueShift {
  to { filter: hue-rotate(360deg); }
}

.hero__avatar {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

/* Name */
.hero__name {
  font-size: clamp(2.2rem, 9vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-cyan) 50%, var(--accent-magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.3));
}

/* Typewriter tagline */
.hero__tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 1.5em;
  margin-top: 6px;
}

.typewriter {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  font-family: 'JetBrains Mono', monospace;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.typewriter__cursor {
  font-size: 1rem;
  font-weight: 300;
  color: var(--accent-magenta);
  animation: cursorBlink 0.7s step-end infinite;
  margin-left: 2px;
  text-shadow: 0 0 8px rgba(255, 0, 160, 0.6);
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* Bio */
.hero__bio {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.7;
  margin-top: 12px;
  opacity: 0.85;
}

/* Scroll hint */
.hero__scroll-hint {
  margin-top: 32px;
  color: var(--accent-cyan);
  animation: scrollFloat 2s ease-in-out infinite;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

/* Hero nav */
.hero__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.hero__nav-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.hero__nav-link:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
}

@supports not (-webkit-touch-callout: none) {
  .hero__nav-link:active {
    transform: scale(0.96);
  }
}

@keyframes scrollFloat {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%      { transform: translateY(8px); opacity: 1; }
}

/* ═══════════════════════════════════════
   BLOG CARDS
   ═══════════════════════════════════════ */
.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.4s var(--timing-smooth),
              box-shadow 0.4s var(--timing-smooth);
}

.blog-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta), var(--accent-violet));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.blog-card__glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  box-shadow: inset 0 0 40px rgba(0, 240, 255, 0.06);
}

.blog-card__inner {
  position: relative;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.4s ease, background 0.4s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.blog-card__date {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  font-family: 'JetBrains Mono', monospace;
}

.blog-card__read {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent-cyan);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}

.blog-card__title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text-primary);
}

.blog-card__excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.blog-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent-cyan);
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.25s ease;
}

.blog-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-cyan);
  text-decoration: none;
  margin-top: 4px;
  transition: gap 0.25s var(--timing-smooth), text-shadow 0.25s ease;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.blog-card__read-more svg {
  transition: transform 0.25s var(--timing-smooth);
}

@media (hover: hover) {
  .blog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card), var(--shadow-glow);
  }
  .blog-card:hover::before {
    opacity: 1;
  }
  .blog-card:hover .blog-card__glow {
    opacity: 1;
  }
  .blog-card:hover .blog-card__inner {
    border-color: transparent;
    background: var(--bg-card-hover);
  }
  .tag:hover {
    background: var(--accent-soft);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
  }
  .blog-card__read-more:hover {
    gap: 10px;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
  }
  .blog-card__read-more:hover svg {
    transform: translateX(3px);
  }
}

/* ═══════════════════════════════════════
   ARTICLE / MARKDOWN CONTENT
   ═══════════════════════════════════════ */

.article-section {
  padding: 20px 0 40px;
}

.article-header {
  margin-bottom: 32px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.article-date {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
}

.article-category {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-magenta);
  background: rgba(255, 0, 160, 0.1);
  border: 1px solid rgba(255, 0, 160, 0.2);
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'JetBrains Mono', monospace;
}

.article-title {
  font-size: clamp(1.5rem, 6vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.article-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  max-width: 540px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-heading {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-top: 24px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.article-paragraph {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.article-paragraph strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-paragraph em {
  color: var(--accent-cyan);
  font-style: italic;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 20px;
  margin: 8px 0;
}

.article-list-item {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  position: relative;
}

.article-list-item::marker {
  color: var(--accent-cyan);
}

.article-list-item strong {
  color: var(--text-primary);
}

.article-link {
  color: var(--accent-cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, text-shadow 0.25s ease;
}

.article-link:hover {
  border-bottom-color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.article-image-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-subtle);
}

/* Code blocks */
.code-block {
  background: rgba(5, 5, 12, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  overflow-x: auto;
  margin: 8px 0;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.code-block code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre;
  display: block;
}

/* Inline code */
.inline-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82em;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(0, 240, 255, 0.1);
}

/* ═══════════════════════════════════════
   NEWSLETTER
   ═══════════════════════════════════════ */
.newsletter-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.4s var(--timing-smooth),
              box-shadow 0.4s var(--timing-smooth);
}

.newsletter-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--accent-magenta), var(--accent-violet), var(--accent-cyan));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.newsletter-card__glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  box-shadow: inset 0 0 40px rgba(255, 0, 160, 0.06);
}

.newsletter-card__inner {
  position: relative;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: inherit;
  display: flex;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.newsletter-card__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.newsletter-form__input {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: rgba(5, 5, 10, 0.6);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.newsletter-form__input::placeholder {
  color: var(--text-muted);
}

.newsletter-form__input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 15px rgba(0, 240, 255, 0.2);
}

.newsletter-form__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  color: #000;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.newsletter-form__button:active {
  transform: scale(0.96);
}

@media (hover: hover) {
  .newsletter-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card), var(--shadow-glow);
  }
  .newsletter-card:hover::before {
    opacity: 1;
  }
  .newsletter-card:hover .newsletter-card__glow {
    opacity: 1;
  }
  .newsletter-card:hover .newsletter-card__inner {
    border-color: transparent;
  }
  .newsletter-form__button:hover {
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
    filter: brightness(1.1);
  }
}

/* ═══════════════════════════════════════
   SOCIAL LINK BUTTONS
   ═══════════════════════════════════════ */
.links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.3s var(--timing-smooth),
              border-color 0.3s ease,
              background 0.3s ease,
              box-shadow 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.link-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.05), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.link-btn:active {
  transform: scale(0.97);
}

.link-btn__icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.link-btn__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.link-btn__name {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.link-btn__handle {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'JetBrains Mono', monospace;
}

.link-btn__arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.3s var(--timing-smooth),
              color 0.3s ease;
}

@media (hover: hover) {
  .link-btn:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-card), var(--shadow-glow);
  }
  .link-btn:hover::before {
    transform: translateX(100%);
  }
  .link-btn:hover .link-btn__icon {
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
    background: rgba(0, 240, 255, 0.2);
  }
  .link-btn:hover .link-btn__arrow {
    transform: translate(3px, -3px);
    color: var(--accent-cyan);
  }
}

/* ═══════════════════════════════════════
   WAIFU MASCOT
   ═══════════════════════════════════════ */
.waifu {
  position: fixed;
  bottom: 0;
  right: 16px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.waifu__character {
  pointer-events: auto;
  cursor: pointer;
  animation: waifuFloat 4s ease-in-out infinite;
  transition: transform 0.3s var(--timing-bounce);
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}

.waifu__character.is-tapped {
  animation: waifuBounce 0.5s var(--timing-bounce);
}

.waifu__img {
  width: 160px;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.3))
          drop-shadow(0 4px 16px rgba(0, 0, 0, 0.4));
  animation: waifuTilt 8s ease-in-out infinite;
}

@keyframes waifuFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

@keyframes waifuTilt {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(0.8deg); }
  75%      { transform: rotate(-0.8deg); }
}

@keyframes waifuBounce {
  0%   { transform: translateY(0) scale(1); }
  30%  { transform: translateY(-14px) scale(1.03); }
  50%  { transform: translateY(-4px) scale(0.98); }
  70%  { transform: translateY(-10px) scale(1.01); }
  100% { transform: translateY(0) scale(1); }
}

/* Bubble */
.waifu__bubble {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 10px;
  max-width: 220px;
  padding: 12px 18px;
  background: rgba(5, 5, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-hover);
  border-radius: 12px 12px 4px 12px;
  color: var(--text-primary);
  font-size: 0.8rem;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.95);
  transition: opacity 0.35s ease,
              visibility 0.35s ease,
              transform 0.35s var(--timing-smooth);
  pointer-events: none;
  white-space: normal;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.waifu__bubble.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* ── Mobile Waifu adjustments ── */
@media (max-width: 768px) {
  .waifu {
    position: relative;
    right: auto;
    bottom: auto;
    justify-content: center;
    padding: 20px 0 0;
    margin: 0 auto;
  }
  .waifu__img {
    width: 140px;
  }
  .waifu__bubble {
    right: auto;
    bottom: auto;
    top: -50px;
    left: 50%;
    transform: translateX(-50%) translateY(8px) scale(0.95);
    border-radius: 12px;
  }
  .waifu__bubble.is-visible {
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.footer {
  text-align: center;
  padding: 40px 0 clamp(30px, 6vh, 60px);
}

.footer__text {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  font-family: 'JetBrains Mono', monospace;
}

/* ═══════════════════════════════════════
   TOAST
   ═══════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  background: rgba(5, 5, 15, 0.9);
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease,
              visibility 0.35s ease,
              transform 0.35s var(--timing-smooth);
  z-index: 100;
  pointer-events: none;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.toast--visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════
   REVEAL ANIMATION (Intersection Observer)
   ═══════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--timing-smooth),
              transform 0.8s var(--timing-smooth);
  will-change: opacity, transform;
}

.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.5s; }

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

/* ═══════════════════════════════════════
   STAGGER for lists & grids
   ═══════════════════════════════════════ */
.links-list .reveal:nth-child(1) { transition-delay: 0.05s; }
.links-list .reveal:nth-child(2) { transition-delay: 0.10s; }
.links-list .reveal:nth-child(3) { transition-delay: 0.15s; }

.blog-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.blog-grid .reveal:nth-child(2) { transition-delay: 0.12s; }
.blog-grid .reveal:nth-child(3) { transition-delay: 0.19s; }
.blog-grid .reveal:nth-child(4) { transition-delay: 0.26s; }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

/* Small phones */
@media (max-width: 360px) {
  .hero__name {
    font-size: 1.8rem;
  }
  .hero__bio {
    font-size: 0.82rem;
  }
  .link-btn {
    padding: 14px 14px;
    gap: 12px;
  }
  .link-btn__icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }
  .link-btn__name {
    font-size: 0.85rem;
  }
  .blog-card__title {
    font-size: 1rem;
  }
  .newsletter-form {
    flex-direction: column;
  }
  .newsletter-form__input {
    min-width: 100%;
  }
}

/* Tablet+ */
@media (min-width: 640px) {
  #main-content {
    padding: 0 32px;
  }
  .hero {
    padding-top: 100px;
  }
  .section {
    padding: 50px 0;
  }
}

/* Large desktop */
@media (min-width: 1024px) {
  :root {
    --max-width: 720px;
  }
  .waifu__img {
    width: 180px;
  }
}

/* ═══════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ═══════════════════════════════════════
   FOCUS‑VISIBLE (accessibility)
   ═══════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ═══════════════════════════════════════
   SELECTION
   ═══════════════════════════════════════ */
::selection {
  background: rgba(0, 240, 255, 0.2);
  color: var(--text-primary);
}

/* ═══════════════════════════════════════
   SCROLLBAR (webkit)
   ═══════════════════════════════════════ */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* ═══════════════════════════════════════
   SEARCH BAR
   ═══════════════════════════════════════ */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.search-bar__icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.25s ease;
}

.search-bar__input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(5, 5, 10, 0.6);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-bar__input::placeholder {
  color: var(--text-muted);
}

.search-bar__input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 15px rgba(0, 240, 255, 0.2);
}

.search-bar__input:focus + .search-bar__icon,
.search-bar:focus-within .search-bar__icon {
  color: var(--accent-cyan);
}

.search-stats {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
  min-height: 1.2em;
}

/* ═══════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  padding: 16px 0;
}

.pagination__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.pagination__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination__btn:not(:disabled):hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.pagination__pages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination__page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.pagination__page:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.pagination__page.is-active {
  background: var(--accent-cyan);
  color: #000;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
  font-weight: 600;
}

/* Posts view-all link wrapper */
.posts-view-all {
  margin-top: 8px;
}
