/* ============================================
   LYNK.RUN — Global Styles + Theme System
   3 Themes: Cyber (default), Clean, AI Blue
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

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

/* ============================================
   THEME 1: CYBER (DEFAULT)
   ============================================ */
:root,
[data-theme="cyber"] {
  --bg: #0a0a0f;
  --bg-secondary: #0e0e16;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 255, 136, 0.2);
  --text: #e0e0e0;
  --text-strong: #ffffff;
  --text-muted: #666666;
  --accent: #00ff88;
  --accent-hover: #33ffaa;
  --accent-glow: rgba(0, 255, 136, 0.25);
  --accent-subtle: rgba(0, 255, 136, 0.08);
  --secondary: #00ccff;
  --secondary-subtle: rgba(0, 204, 255, 0.1);
  --highlight: #ff00ff;
  --highlight-subtle: rgba(255, 0, 255, 0.15);
  --gradient-cta: linear-gradient(135deg, #00ff88, #00ccff);
  --gradient-highlight: linear-gradient(135deg, #ff00ff, #00ccff);
  --gradient-warm: linear-gradient(135deg, #ff00ff, #ff6644);
  --gradient-hero: linear-gradient(135deg, #00ff88, #00ccff, #ff00ff);
  --nav-bg: rgba(10, 10, 15, 0.85);
  --nav-border: #1e1e2e;
  --mobile-menu-bg: rgba(12, 12, 20, 0.98);
  --card-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 16px 50px rgba(0, 0, 0, 0.4);
  --btn-shadow: 0 8px 30px rgba(0, 255, 136, 0.25);
  --cta-bg: linear-gradient(135deg, rgba(0, 255, 136, 0.08), rgba(0, 204, 255, 0.08), rgba(255, 0, 255, 0.08));
  --cta-border: rgba(0, 255, 136, 0.2);
  --input-bg: var(--bg);
  --code-bg: rgba(0, 255, 136, 0.08);
  --blockquote-bg: rgba(0, 255, 136, 0.04);
  --glow-visible: 1;
  --gradient-text-visible: 1;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --nav-height: 64px;
  --max-width: 1200px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   THEME 2: APPLE (Clean White Minimal)
   ============================================ */
[data-theme="clean"] {
  --bg: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f5f7;
  --border: #d2d2d7;
  --border-hover: #86868b;
  --text: #1d1d1f;
  --text-strong: #000000;
  --text-muted: #6e6e73;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-glow: rgba(0, 113, 227, 0.15);
  --accent-subtle: rgba(0, 113, 227, 0.06);
  --secondary: #1d1d1f;
  --secondary-subtle: rgba(29, 29, 31, 0.06);
  --highlight: #0071e3;
  --highlight-subtle: rgba(0, 113, 227, 0.08);
  --gradient-cta: linear-gradient(135deg, #0071e3, #0071e3);
  --gradient-highlight: linear-gradient(135deg, #0071e3, #34c759);
  --gradient-warm: linear-gradient(135deg, #0071e3, #5856d6);
  --gradient-hero: linear-gradient(135deg, #0071e3, #0071e3);
  --nav-bg: rgba(255, 255, 255, 0.82);
  --nav-border: #d2d2d7;
  --mobile-menu-bg: rgba(255, 255, 255, 0.98);
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --btn-shadow: 0 4px 16px rgba(0, 113, 227, 0.2);
  --cta-bg: linear-gradient(135deg, #f5f5f7, #f5f5f7);
  --cta-border: #d2d2d7;
  --input-bg: #f5f5f7;
  --code-bg: rgba(0, 113, 227, 0.06);
  --blockquote-bg: rgba(0, 113, 227, 0.04);
  --glow-visible: 0;
  --gradient-text-visible: 0;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   THEME 3: AI BLUE (Dark Blue AI)
   ============================================ */
[data-theme="aiblue"] {
  --bg: #0a0e27;
  --bg-secondary: #0d1230;
  --bg-card: #111833;
  --bg-card-hover: #182040;
  --border: #1e2a4a;
  --border-hover: rgba(77, 124, 255, 0.3);
  --text: #c8d6f0;
  --text-strong: #e8eeff;
  --text-muted: #7b8db8;
  --accent: #4d7cff;
  --accent-hover: #6c8fff;
  --accent-glow: rgba(77, 124, 255, 0.3);
  --accent-subtle: rgba(77, 124, 255, 0.1);
  --secondary: #8b5cf6;
  --secondary-subtle: rgba(139, 92, 246, 0.1);
  --highlight: #a78bfa;
  --highlight-subtle: rgba(167, 139, 250, 0.15);
  --gradient-cta: linear-gradient(135deg, #4d7cff, #8b5cf6);
  --gradient-highlight: linear-gradient(135deg, #8b5cf6, #4d7cff);
  --gradient-warm: linear-gradient(135deg, #a78bfa, #4d7cff);
  --gradient-hero: linear-gradient(135deg, #4d7cff, #8b5cf6, #a78bfa);
  --nav-bg: rgba(10, 14, 39, 0.88);
  --nav-border: #1e2a4a;
  --mobile-menu-bg: rgba(13, 18, 48, 0.98);
  --card-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 16px 50px rgba(77, 124, 255, 0.15);
  --btn-shadow: 0 8px 30px rgba(77, 124, 255, 0.3);
  --cta-bg: linear-gradient(135deg, rgba(77, 124, 255, 0.08), rgba(139, 92, 246, 0.08));
  --cta-border: rgba(77, 124, 255, 0.2);
  --input-bg: #0a0e27;
  --code-bg: rgba(77, 124, 255, 0.1);
  --blockquote-bg: rgba(77, 124, 255, 0.05);
  --glow-visible: 1;
  --gradient-text-visible: 1;
}

/* ============================================
   GLOBAL TRANSITION FOR THEME SWITCHING
   ============================================ */
body,
body *:not(script):not(style) {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Full-page background glow (Cyber + AI Blue only) */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(0, 255, 136, 0.04) 0%, transparent 50%),
              radial-gradient(circle at 70% 70%, rgba(0, 204, 255, 0.04) 0%, transparent 50%);
  animation: bgFloat 20s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
  opacity: var(--glow-visible, 1);
  transition: opacity 0.5s ease;
}

[data-theme="aiblue"] body::before {
  background: radial-gradient(circle at 30% 30%, rgba(77, 124, 255, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-2%, -1%); }
}

/* Ensure content sits above the glow */
.nav, .hero, .section, .section-sm, .page-header, .blog-post-header, .blog-post-content, .footer, hr.divider {
  position: relative;
  z-index: 1;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

.mono {
  font-family: var(--font-mono);
}

.label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nav-border);
  z-index: 1000;
  transition: background var(--transition), border-color var(--transition);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-logo span {
  font-size: 1.4rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  width: 100%;
}

.nav-subscribe {
  font-family: var(--font-mono);
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  padding: 6px 16px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent) !important;
  transition: all var(--transition) !important;
}

.nav-subscribe:hover {
  background: var(--accent) !important;
  color: var(--bg) !important;
}

.nav-subscribe::after {
  display: none !important;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  z-index: 1010;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all var(--transition);
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--mobile-menu-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border);
  padding: 80px 32px 32px;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1005;
  flex-direction: column;
  gap: 0;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu a {
  display: block;
  padding: 16px 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: all var(--transition);
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--accent);
  padding-left: 8px;
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1002;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .mobile-menu {
    display: flex;
  }
  .mobile-overlay {
    display: block;
  }
}

/* ============================================
   HERO — Original Cyberpunk Design
   ============================================ */
.hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

/* Background glow animation */
.hero-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: var(--glow-visible);
  transition: opacity 0.5s ease;
}

.hero-glow .glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: floatGlow 8s ease-in-out infinite;
}

.hero-glow .glow-orb:nth-child(1) {
  width: 500px;
  height: 500px;
  top: -100px;
  left: 20%;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.12) 0%, transparent 70%);
  animation-delay: 0s;
}

.hero-glow .glow-orb:nth-child(2) {
  width: 400px;
  height: 400px;
  top: 50px;
  right: 15%;
  background: radial-gradient(circle, rgba(0, 204, 255, 0.08) 0%, transparent 70%);
  animation-delay: -3s;
  animation-duration: 10s;
}

.hero-glow .glow-orb:nth-child(3) {
  width: 350px;
  height: 350px;
  bottom: 10%;
  left: 40%;
  background: radial-gradient(circle, rgba(255, 0, 255, 0.06) 0%, transparent 70%);
  animation-delay: -5s;
  animation-duration: 12s;
}

/* AI Blue theme glow overrides */
[data-theme="aiblue"] .hero-glow .glow-orb:nth-child(1) {
  background: radial-gradient(circle, rgba(77, 124, 255, 0.15) 0%, transparent 70%);
}

[data-theme="aiblue"] .hero-glow .glow-orb:nth-child(2) {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.10) 0%, transparent 70%);
}

[data-theme="aiblue"] .hero-glow .glow-orb:nth-child(3) {
  background: radial-gradient(circle, rgba(167, 139, 250, 0.08) 0%, transparent 70%);
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(15px, 10px) scale(1.02); }
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* Hero badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border: 1px solid var(--accent);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 32px;
  background: var(--accent-subtle);
  text-transform: uppercase;
}

.hero-badge .badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px transparent; }
}

/* Hero headline */
.hero h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -3px;
  margin-bottom: 28px;
  line-height: 1.05;
}

.hero h1 .hero-gradient {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Clean theme: disable gradient text */
[data-theme="clean"] .hero h1 .hero-gradient {
  background: none;
  -webkit-text-fill-color: var(--accent);
  color: var(--accent);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 20px;
  line-height: 1.8;
}

.hero-creator {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.hero-creator a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

/* --- Hero Stats --- */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 40px 0;
  margin-top: 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.hero-stat-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 600px) {
  .hero-stats {
    gap: 24px;
  }
  .hero-stat {
    flex: 0 0 40%;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: none;
  letter-spacing: 0.02em;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: var(--btn-shadow);
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-gradient {
  background: var(--gradient-cta);
  color: var(--bg);
  font-weight: 700;
  color: #fff;
}

[data-theme="clean"] .btn-gradient {
  color: #fff;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: var(--btn-shadow);
  color: #fff;
}

.btn-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="clean"] .card {
  box-shadow: var(--card-shadow);
  border-color: transparent;
}

[data-theme="clean"] .card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: transparent;
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.card h3 {
  margin-bottom: 12px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Grid Layouts --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header .label {
  margin-bottom: 16px;
  display: block;
}

.section-header h2 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* --- Stats --- */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  padding: 40px 0;
}

.stat {
  text-align: center;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- Tags --- */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tag-ai-productivity {
  background: var(--accent-subtle);
  color: var(--accent);
}

.tag-cybersecurity {
  background: var(--secondary-subtle);
  color: var(--secondary);
}

.tag-ai-trends {
  background: var(--highlight-subtle);
  color: var(--highlight);
}

.tag-ai-tools {
  background: var(--accent-subtle);
  color: var(--accent);
}

.tag-product-ideas {
  background: rgba(255, 170, 0, 0.15);
  color: #ffaa00;
}

[data-theme="clean"] .tag-product-ideas {
  background: rgba(255, 149, 0, 0.1);
  color: #c97e00;
}

.tag-leadership {
  background: rgba(136, 136, 255, 0.15);
  color: #8888ff;
}

[data-theme="clean"] .tag-leadership {
  background: rgba(88, 86, 214, 0.1);
  color: #5856d6;
}

/* --- Blog Cards --- */
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--card-shadow);
}

[data-theme="clean"] .blog-card {
  box-shadow: var(--card-shadow);
  border-color: transparent;
}

[data-theme="clean"] .blog-card:hover {
  box-shadow: var(--card-shadow-hover);
}

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

.blog-card-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.blog-card h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.blog-card h3 a {
  color: var(--text-strong);
  text-decoration: none;
}

.blog-card h3 a:hover {
  color: var(--accent);
}

.blog-card-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 16px;
}

.blog-card-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.blog-card-link:hover {
  gap: 10px;
}

/* --- CTA Banner --- */
.cta-banner {
  background: var(--cta-bg);
  border: 1px solid var(--cta-border);
  border-radius: 16px;
  padding: 48px;
  text-align: center;
}

.cta-banner h3 {
  margin-bottom: 12px;
  font-size: 1.5rem;
}

.cta-banner p {
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Subscribe Form --- */
.subscribe-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.subscribe-form input[type="email"] {
  flex: 1;
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.subscribe-form input[type="email"]:focus {
  border-color: var(--accent);
}

.subscribe-form input[type="email"]::placeholder {
  color: var(--text-muted);
}

.subscribe-form button {
  padding: 14px 24px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--gradient-cta);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.subscribe-form button:hover {
  transform: translateY(-2px);
  box-shadow: var(--btn-shadow);
}

@media (max-width: 520px) {
  .subscribe-form {
    flex-direction: column;
  }
}

.subscribe-success {
  display: none;
  text-align: center;
  padding: 20px;
}

.subscribe-success .check {
  font-size: 2rem;
  margin-bottom: 8px;
}

.subscribe-success p {
  color: var(--accent);
  font-weight: 600;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

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

/* --- Blog Post Styles --- */
.blog-post-header {
  padding: calc(var(--nav-height) + 40px) 0 64px 0;
  text-align: center;
}

.blog-post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.blog-post-read-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-post-header h1 {
  font-size: 2.5rem;
  margin-bottom: 24px;
  line-height: 1.2;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.blog-post-excerpt {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

.blog-post-content {
  padding: 64px 0;
}

.blog-post-content .container {
  max-width: 720px;
}

.blog-post-content h2 {
  margin: 48px 0 24px 0;
  font-size: 1.8rem;
  color: var(--accent);
}

.blog-post-content h3 {
  margin: 32px 0 16px 0;
  font-size: 1.3rem;
}

.blog-post-content p {
  margin-bottom: 24px;
  line-height: 1.8;
}

.blog-post-content ul {
  margin: 24px 0 24px 24px;
  line-height: 1.9;
}

.blog-post-content li {
  margin-bottom: 12px;
}

.blog-post-content a {
  border-bottom: 2px solid var(--accent);
  text-decoration: none;
  transition: opacity var(--transition);
}

.blog-post-content a:hover {
  opacity: 0.7;
}

.blog-post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 28px 0;
  background: var(--blockquote-bg);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-muted);
}

.blog-post-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

.blog-post-content strong {
  color: var(--text-strong);
  font-weight: 600;
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.blog-card-large {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  transition: all var(--transition);
}

.blog-card-large:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

[data-theme="clean"] .blog-card-large {
  box-shadow: var(--card-shadow);
  border-color: transparent;
}

[data-theme="clean"] .blog-card-large:hover {
  box-shadow: var(--card-shadow-hover);
}

.blog-card-large h3 a {
  color: var(--text-strong);
  text-decoration: none;
}

.blog-card-large h3 a:hover {
  color: var(--accent);
}

/* --- Page Header (non-home) --- */
.page-header {
  padding: calc(var(--nav-height) + 40px) 0 64px 0;
  text-align: center;
}

.page-header .label {
  display: block;
  margin-bottom: 12px;
}

.page-header h1 {
  font-size: 2.5rem;
  margin: 24px 0;
  line-height: 1.2;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* --- Project Showcase --- */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all var(--transition);
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

[data-theme="clean"] .project-card {
  box-shadow: var(--card-shadow);
  border-color: transparent;
}

.project-card-visual {
  height: 200px;
  background: linear-gradient(135deg, var(--bg), var(--bg-card));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

.project-card-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-subtle), var(--highlight-subtle));
}

.project-card-body {
  padding: 28px;
}

.project-card-body h3 {
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.project-card-body .project-type {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--secondary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-card-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.project-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--secondary-subtle);
  color: var(--secondary);
}

/* --- About Page --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  align-items: start;
}

.about-avatar {
  width: 200px;
  height: 200px;
  border-radius: 16px;
  background: var(--gradient-cta);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: var(--bg);
  margin: 0 auto;
}

.about-content h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.about-content h3 {
  color: var(--accent);
  margin: 32px 0 16px 0;
  font-size: 1.3rem;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.02rem;
  line-height: 1.9;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-avatar {
    width: 150px;
    height: 150px;
  }
  .blog-post-header h1 {
    font-size: 1.8rem;
  }
  .blog-post-content h2 {
    font-size: 1.4rem;
  }
  .page-header h1 {
    font-size: 1.8rem;
  }
}

/* --- Subscribe Page --- */
.subscribe-hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
  text-align: center;
}

.subscribe-hero h1 {
  margin-bottom: 16px;
}

.subscribe-hero p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 40px;
  font-size: 1.05rem;
}

.subscribe-form-large {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.subscribe-success-large {
  text-align: center;
  padding: 48px 32px;
}

/* --- Mantra block --- */
.mantra-block {
  background: var(--accent-subtle);
  padding: 24px;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
  margin: 32px 0;
  font-style: italic;
}

.mantra-block p {
  margin: 0 !important;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text) !important;
}

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

/* --- Animations --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fadeUp 0.6s ease-out forwards;
}

.fade-up-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-up-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-up-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-up-delay-4 { animation-delay: 0.4s; opacity: 0; }

/* --- Utility --- */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* ============================================
   THEME SWITCHER UI
   ============================================ */
.theme-switcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

[data-theme="clean"] .theme-switcher {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
}

.theme-switcher-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: transparent;
  position: relative;
}

.theme-switcher-btn:hover {
  transform: scale(1.15);
}

.theme-switcher-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.theme-switcher-btn[data-theme-value="cyber"] {
  background: linear-gradient(135deg, #0a0a0f, #1a1a26);
}

.theme-switcher-btn[data-theme-value="cyber"]::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00ff88;
}

.theme-switcher-btn[data-theme-value="clean"] {
  background: linear-gradient(135deg, #ffffff, #f5f5f7);
}

.theme-switcher-btn[data-theme-value="clean"]::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1d1d1f;
}

.theme-switcher-btn[data-theme-value="aiblue"] {
  background: linear-gradient(135deg, #0a0e27, #111833);
}

.theme-switcher-btn[data-theme-value="aiblue"]::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4d7cff;
}

/* Tooltip on hover */
.theme-switcher-btn[data-theme-value="cyber"]:hover::before {
  content: 'Cyber';
}

.theme-switcher-btn[data-theme-value="clean"]:hover::before {
  content: 'Clean';
}

.theme-switcher-btn[data-theme-value="aiblue"]:hover::before {
  content: 'AI Blue';
}

.theme-switcher-btn:hover::before {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
  pointer-events: none;
}

/* ============================================
   Welcome Box
   ============================================ */
.welcome-box {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 10001;
  animation: welcomeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

.welcome-box.welcome-hiding {
  animation: welcomeOut 0.4s ease-out forwards;
}

@keyframes welcomeIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes welcomeOut {
  to { opacity: 0; transform: translateY(10px) scale(0.95); }
}

.welcome-inner {
  position: relative;
  background: var(--bg-card, #12121a);
  border: 1px solid var(--accent, #00ff88);
  border-radius: 16px;
  padding: 24px 28px 20px;
  max-width: 260px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 255, 136, 0.1);
  backdrop-filter: blur(12px);
}

[data-theme="clean"] .welcome-inner {
  background: #ffffff;
  border-color: #d2d2d7;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

[data-theme="aiblue"] .welcome-inner {
  background: #111833;
  border-color: #4d7cff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(77, 124, 255, 0.15);
}

.welcome-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted, #8888a0);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.welcome-close:hover {
  color: var(--text, #e0e0e8);
}

.welcome-emoji {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.welcome-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text, #e0e0e8);
  margin-bottom: 8px;
}

.welcome-text {
  font-size: 0.82rem;
  color: var(--text-muted, #8888a0);
  line-height: 1.6;
  margin-bottom: 12px;
}

.welcome-arrow {
  text-align: center;
  font-size: 1.2rem;
  color: var(--accent, #00ff88);
  animation: bounceArrow 1.5s ease-in-out infinite;
}

@keyframes bounceArrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}
