/**
 * AI Engineer Portfolio Theme
 * Professional dark theme with indigo/violet accents
 */

/* ── Design tokens ── */
body.ai-theme {
  --default-font: "Inter", system-ui, -apple-system, sans-serif;
  --heading-font: "Sora", "Inter", sans-serif;
  --nav-font: "Inter", sans-serif;

  --background-color: #0b0f1a;
  --default-color: #94a3b8;
  --heading-color: #f1f5f9;
  --accent-color: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-glow: #22d3ee;
  --surface-color: #151c2c;
  --surface-elevated: #1a2438;
  --contrast-color: #ffffff;
  --border-color: rgba(148, 163, 184, 0.12);
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #22d3ee 100%);
  --gradient-text: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 40%, #67e8f9 100%);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);

  --nav-color: #94a3b8;
  --nav-hover-color: #a5b4fc;
  --nav-mobile-background-color: #111827;
  --nav-dropdown-background-color: #1a2438;
  --nav-dropdown-color: #cbd5e1;
  --nav-dropdown-hover-color: #a5b4fc;

  color-scheme: dark;
  background-color: var(--background-color);
}

body.ai-theme .light-background,
body.ai-theme .ai-section-alt {
  --background-color: #0f1524;
  --surface-color: #151c2c;
  --default-color: #94a3b8;
  --heading-color: #f1f5f9;
}

body.ai-theme .ai-section-alt {
  background-color: #0f1524;
}

body.ai-theme .dark-background {
  --background-color: #070a12;
  --surface-color: #111827;
}

/* ── Typography ── */
body.ai-theme h1,
body.ai-theme h2,
body.ai-theme h3,
body.ai-theme h4,
body.ai-theme h5,
body.ai-theme h6 {
  letter-spacing: -0.02em;
}

body.ai-theme .section-title h2 {
  font-size: 2rem;
  font-weight: 700;
}

body.ai-theme .section-title h2::after {
  width: 64px;
  height: 4px;
  border-radius: 2px;
  background: var(--gradient-primary);
}

body.ai-theme .section-title p {
  color: #64748b;
  font-size: 1.05rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Header ── */
body.ai-theme .ai-header {
  background: rgba(11, 15, 26, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: none;
  padding: 12px 0;
}

body.ai-theme.scrolled .ai-header {
  background: rgba(11, 15, 26, 0.95) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

body.ai-theme .header .logo h1 {
  font-family: var(--heading-font);
  font-size: 1.35rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: -0.03em;
}

body.ai-theme .header .logo .logo-accent {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.ai-theme .header .logo .logo-tagline {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 2px;
  font-family: var(--nav-font);
}

body.ai-theme .header .header-social-links a {
  color: #64748b;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-left: 6px;
  transition: all 0.25s ease;
}

body.ai-theme .header .header-social-links a:hover {
  color: var(--contrast-color);
  background: var(--accent-color);
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

body.ai-theme .navmenu a:hover,
body.ai-theme .navmenu .active {
  color: var(--nav-hover-color) !important;
}

body.ai-theme .navmenu > ul > li > a::before {
  background: var(--gradient-primary);
  height: 3px;
  border-radius: 2px;
}

/* ── Hero ── */
body.ai-theme .hero-ai {
  min-height: 88vh;
  padding: 120px 0 100px;
  overflow: hidden;
  background: var(--background-color);
}

body.ai-theme .hero-ai .hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.25), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(139, 92, 246, 0.12), transparent),
    radial-gradient(ellipse 50% 30% at 0% 80%, rgba(34, 211, 238, 0.08), transparent),
    var(--background-color);
}

body.ai-theme .hero-ai .hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
}

body.ai-theme .hero-ai .container {
  z-index: 2;
}

body.ai-theme .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 24px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 100px;
}

body.ai-theme .hero-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 12px #22c55e;
  animation: ai-pulse 2s ease-in-out infinite;
}

@keyframes ai-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

body.ai-theme .hero-ai .hero-title {
  margin: 0 0 12px;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.ai-theme .hero-ai .hero-role {
  font-size: 1.35rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 8px;
}

body.ai-theme .hero-ai .hero-location {
  font-size: 1rem;
  color: #64748b;
  margin-bottom: 20px;
}

body.ai-theme .hero-ai .hero-desc {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #94a3b8;
  max-width: 640px;
  margin: 0 auto 32px;
}

body.ai-theme .hero-ai .hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
}

body.ai-theme .hero-tag {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 14px;
  color: #cbd5e1;
  background: var(--surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

body.ai-theme .hero .btn-get-started {
  background: var(--gradient-primary);
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 10px;
  box-shadow: var(--shadow-glow);
  text-transform: none;
  letter-spacing: 0.02em;
}

body.ai-theme .hero .btn-get-started:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
  filter: brightness(1.08);
}

body.ai-theme .hero .btn-get-started.btn-outline {
  background: transparent;
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.5);
  box-shadow: none;
}

body.ai-theme .hero .btn-get-started.btn-outline:hover {
  background: rgba(99, 102, 241, 0.15);
  color: #e2e8f0;
}

/* ── Skills ── */
body.ai-theme .skills .progress .skill {
  text-transform: none;
  font-size: 0.9rem;
  font-weight: 600;
}

body.ai-theme .skills .progress .skill .val {
  color: var(--accent-glow);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.ai-theme .skills .progress-bar-wrap {
  background: rgba(148, 163, 184, 0.1);
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
}

body.ai-theme .skills .progress-bar {
  border-radius: 6px;
  background: var(--gradient-primary);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

/* ── Services / Tools cards ── */
body.ai-theme .services .service-item {
  background: var(--surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 40px 28px;
}

body.ai-theme .services .service-item:hover {
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12);
}

body.ai-theme .services .service-item h3 {
  font-size: 1.15rem;
  color: var(--heading-color);
}

body.ai-theme .services .service-item p {
  color: #64748b;
  line-height: 1.6;
}

body.ai-theme .services .service-item .icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: rgba(99, 102, 241, 0.12);
}

body.ai-theme .services .service-item.item-cyan .icon { background: rgba(34, 211, 238, 0.12); }
body.ai-theme .services .service-item.item-orange .icon { background: rgba(251, 146, 60, 0.12); }
body.ai-theme .services .service-item.item-teal .icon { background: rgba(45, 212, 191, 0.12); }
body.ai-theme .services .service-item.item-red .icon { background: rgba(248, 113, 113, 0.12); }
body.ai-theme .services .service-item.item-indigo .icon { background: rgba(99, 102, 241, 0.15); }
body.ai-theme .services .service-item.item-pink .icon { background: rgba(244, 114, 182, 0.12); }

body.ai-theme .services .service-item.item-cyan i { color: #22d3ee; }
body.ai-theme .services .service-item.item-orange i { color: #fb923c; }
body.ai-theme .services .service-item.item-teal i { color: #2dd4bf; }
body.ai-theme .services .service-item.item-red i { color: #f87171; }
body.ai-theme .services .service-item.item-indigo i { color: #818cf8; }
body.ai-theme .services .service-item.item-pink i { color: #f472b6; }

/* ── Portfolio ── */
body.ai-theme .portfolio .portfolio-filters li {
  color: #94a3b8;
  background: var(--surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-weight: 600;
  text-transform: none;
}

body.ai-theme .portfolio .portfolio-filters li:hover,
body.ai-theme .portfolio .portfolio-filters li.filter-active {
  color: var(--contrast-color);
  background: var(--gradient-primary);
  border-color: transparent;
}

body.ai-theme .portfolio .portfolio-item {
  border-radius: 14px;
  border: 1px solid var(--border-color);
}

body.ai-theme .portfolio .portfolio-item img {
  border-radius: 14px 14px 0 0;
  transition: transform 0.4s ease;
}

body.ai-theme .portfolio .portfolio-item:hover img {
  transform: scale(1.03);
}

body.ai-theme .portfolio .portfolio-item .portfolio-info {
  background: rgba(15, 21, 36, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 14px 14px;
}

body.ai-theme .portfolio .portfolio-item .portfolio-info h4 {
  color: var(--heading-color);
}

body.ai-theme .portfolio .portfolio-item .portfolio-info p {
  color: #94a3b8;
}

body.ai-theme .portfolio .portfolio-item .portfolio-info .preview-link:hover,
body.ai-theme .portfolio .portfolio-item .portfolio-info .details-link:hover {
  color: var(--accent-glow);
}

/* ── Footer ── */
body.ai-theme .ai-footer {
  background: #070a12 !important;
  border-top: 1px solid var(--border-color);
  padding: 40px 0 24px;
}

body.ai-theme .ai-footer .copyright p {
  color: #64748b;
  font-size: 0.9rem;
}

body.ai-theme .ai-footer .sitename {
  color: #e2e8f0;
}

body.ai-theme .ai-footer .social-links a {
  color: #64748b;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  margin: 0 6px;
  transition: all 0.25s ease;
}

body.ai-theme .ai-footer .social-links a:hover {
  color: #fff;
  background: var(--accent-color);
  border-color: var(--accent-color);
}

/* ── Scroll top & preloader ── */
body.ai-theme #scroll-top {
  background: var(--gradient-primary);
  border-radius: 12px;
  width: 44px;
  height: 44px;
}

body.ai-theme #preloader {
  background: var(--background-color);
}

/* ── About page & timeline ── */
body.ai-theme .about-container {
  max-width: 900px;
  padding: 48px 16px 80px;
}

body.ai-theme .about-intro {
  text-align: center;
  margin-bottom: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-color);
}

body.ai-theme .about-intro-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #818cf8;
  margin-bottom: 16px;
}

body.ai-theme .about-intro h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 20px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.ai-theme .about-intro-lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #cbd5e1;
  max-width: 640px;
  margin: 0 auto 16px;
}

body.ai-theme .about-intro-lead strong {
  color: #f1f5f9;
}

body.ai-theme .about-intro-sub {
  font-size: 0.95rem;
  color: #64748b;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Timeline container */
body.ai-theme .experience-timeline {
  position: relative;
  padding: 8px 0 24px;
}

body.ai-theme .timeline-track {
  position: absolute;
  left: 103px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(99, 102, 241, 0.4) 8%,
    rgba(139, 92, 246, 0.6) 50%,
    rgba(34, 211, 238, 0.5) 92%,
    transparent 100%
  );
  border-radius: 3px;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

body.ai-theme .timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  margin-bottom: 40px;
  padding-left: 0;
}

body.ai-theme .timeline-item:last-child {
  margin-bottom: 0;
}

body.ai-theme .timeline-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-top: 8px;
  z-index: 2;
}

body.ai-theme .timeline-dot {
  position: absolute;
  left: 95px;
  top: 22px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--background-color);
  border: 3px solid #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2), 0 0 16px rgba(99, 102, 241, 0.4);
  z-index: 3;
}

body.ai-theme .timeline-dot--pulse {
  border-color: #22d3ee;
  animation: timeline-pulse 2s ease-in-out infinite;
}

@keyframes timeline-pulse {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.2), 0 0 16px rgba(34, 211, 238, 0.5);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(34, 211, 238, 0.15), 0 0 24px rgba(34, 211, 238, 0.6);
  }
}

body.ai-theme .timeline-year {
  font-family: var(--heading-font);
  font-size: 1.1rem;
  font-weight: 800;
  color: #e2e8f0;
  letter-spacing: -0.02em;
  padding-right: 28px;
  line-height: 1.2;
}

body.ai-theme .timeline-item--current .timeline-year {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.ai-theme .timeline-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

body.ai-theme .timeline-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateX(4px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.12);
}

body.ai-theme .timeline-card--highlight {
  border-color: rgba(99, 102, 241, 0.3);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, var(--surface-elevated) 60%);
}

body.ai-theme .timeline-card--ai {
  border-color: rgba(139, 92, 246, 0.35);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(34, 211, 238, 0.05) 50%, var(--surface-elevated) 100%);
}

body.ai-theme .timeline-card--current {
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.08);
}

body.ai-theme .timeline-phase {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 8px;
}

body.ai-theme .timeline-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heading-color);
  margin: 0 0 12px;
  font-family: var(--heading-font);
}

body.ai-theme .timeline-card p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0 0 16px;
}

body.ai-theme .timeline-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}

body.ai-theme .timeline-highlights li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.5;
}

body.ai-theme .timeline-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient-primary);
}

body.ai-theme .timeline-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
}

body.ai-theme .timeline-badge--ai {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.35);
}

body.ai-theme .timeline-badge--live {
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.35);
}

body.ai-theme .timeline-badge--live .bi-circle-fill {
  font-size: 0.45rem;
  animation: timeline-pulse 2s ease-in-out infinite;
}

body.ai-theme .timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.ai-theme .timeline-tags span {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 12px;
  color: #cbd5e1;
  background: rgba(15, 21, 36, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

body.ai-theme .about-connect {
  text-align: center;
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid var(--border-color);
}

body.ai-theme .about-connect h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 12px;
}

body.ai-theme .about-connect p {
  color: #64748b;
  margin-bottom: 28px;
}

body.ai-theme .about-connect a {
  color: #a5b4fc;
}

body.ai-theme .about-connect-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

body.ai-theme .about-connect .btn-get-started {
  margin-top: 0;
}

@media (max-width: 767px) {
  body.ai-theme .timeline-track {
    left: 20px;
  }

  body.ai-theme .timeline-item {
    grid-template-columns: 48px 1fr;
    gap: 16px;
  }

  body.ai-theme .timeline-node {
    align-items: flex-start;
    padding-top: 4px;
  }

  body.ai-theme .timeline-item .timeline-dot {
    left: 12px;
    top: 8px;
  }

  body.ai-theme .timeline-year {
    font-size: 0.85rem;
    padding-right: 0;
    padding-left: 36px;
    padding-top: 2px;
    writing-mode: horizontal-tb;
  }

  body.ai-theme .timeline-card {
    padding: 20px;
  }
}

/* ── Shared prose (about + blog posts) ── */
body.ai-theme .about-prose,
body.ai-theme .post-prose {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 0 80px;
}

body.ai-theme .about-prose h1,
body.ai-theme .post-prose h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.ai-theme .about-prose h2,
body.ai-theme .post-prose h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--heading-color);
}

body.ai-theme .about-prose h3,
body.ai-theme .post-prose h3 {
  font-size: 1.15rem;
  color: #cbd5e1;
  margin-top: 1.75rem;
}

body.ai-theme .about-prose p,
body.ai-theme .about-prose li,
body.ai-theme .post-prose p,
body.ai-theme .post-prose li {
  color: #94a3b8;
  line-height: 1.75;
}

body.ai-theme .about-prose strong,
body.ai-theme .post-prose strong {
  color: #e2e8f0;
}

body.ai-theme .about-prose a,
body.ai-theme .post-prose a {
  color: #a5b4fc;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.ai-theme .about-prose a:hover,
body.ai-theme .post-prose a:hover {
  color: var(--accent-glow);
}

body.ai-theme .about-prose table,
body.ai-theme .post-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

body.ai-theme .about-prose th,
body.ai-theme .about-prose td,
body.ai-theme .post-prose th,
body.ai-theme .post-prose td {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  text-align: left;
}

body.ai-theme .about-prose th,
body.ai-theme .post-prose th {
  background: var(--surface-elevated);
  color: var(--heading-color);
  font-weight: 600;
}

body.ai-theme .about-prose tr:nth-child(even) td,
body.ai-theme .post-prose tr:nth-child(even) td {
  background: rgba(21, 28, 44, 0.5);
}

body.ai-theme .about-prose hr,
body.ai-theme .post-prose hr {
  border-color: var(--border-color);
  margin: 2rem 0;
}

body.ai-theme .about-prose iframe,
body.ai-theme .post-prose iframe {
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

body.ai-theme .about-prose blockquote,
body.ai-theme .post-prose blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: #cbd5e1;
}

/* ── Blog index & single post ── */
body.ai-theme .blog-container {
  max-width: 820px;
  padding: 48px 16px 80px;
}

body.ai-theme .blog-index-header {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
}

body.ai-theme .blog-index-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 12px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.ai-theme .blog-index-header p {
  color: #64748b;
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

body.ai-theme .blog-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

body.ai-theme .blog-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

body.ai-theme .blog-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.1);
}

body.ai-theme .blog-card-body {
  padding: 28px 32px;
}

body.ai-theme .blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

body.ai-theme .blog-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 100px;
}

body.ai-theme .blog-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 14px;
  font-family: var(--heading-font);
  line-height: 1.35;
}

body.ai-theme .blog-card-title a {
  color: var(--heading-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

body.ai-theme .blog-card-title a:hover {
  color: #a5b4fc;
}

body.ai-theme .blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 16px;
}

body.ai-theme .blog-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.ai-theme .blog-card-meta i {
  color: #6366f1;
  font-size: 0.9rem;
}

body.ai-theme .blog-card-excerpt {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0 0 20px;
}

body.ai-theme .blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #a5b4fc;
  text-decoration: none;
  transition: gap 0.2s ease, color 0.2s ease;
}

body.ai-theme .blog-card-link:hover {
  color: #67e8f9;
  gap: 12px;
}

/* Single post */
body.ai-theme .post-article {
  padding-bottom: 48px;
}

body.ai-theme .post-hero {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
}

body.ai-theme .post-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.2s ease;
}

body.ai-theme .post-back:hover {
  color: #a5b4fc;
}

body.ai-theme .post-title {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--heading-color);
  margin: 0 0 20px;
  font-family: var(--heading-font);
  letter-spacing: -0.02em;
}

body.ai-theme .post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.9rem;
  color: #64748b;
}

body.ai-theme .post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.ai-theme .post-meta i {
  color: #6366f1;
}

body.ai-theme .post-prose {
  max-width: 100%;
}

/* Hide duplicate title when post body starts with h1 */
body.ai-theme .post-prose > h1:first-child {
  display: none;
}

body.ai-theme .post-prose h2 {
  margin-top: 2.5rem;
  font-size: 1.4rem;
}

body.ai-theme .post-prose h3 {
  margin-top: 1.75rem;
  font-size: 1.15rem;
}

body.ai-theme .post-prose ul,
body.ai-theme .post-prose ol {
  padding-left: 1.35rem;
  margin-bottom: 1.25rem;
}

body.ai-theme .post-prose li {
  margin-bottom: 0.5rem;
}

body.ai-theme .post-prose code {
  font-size: 0.88em;
  color: #c4b5fd;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 2px 8px;
  border-radius: 6px;
}

body.ai-theme .post-prose pre {
  background: #070a12;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

body.ai-theme .post-prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e2e8f0;
}

body.ai-theme .post-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin: 1.5rem 0;
}

body.ai-theme .post-footer {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

body.ai-theme .post-footer .btn-get-started {
  margin-top: 0;
}

@media (max-width: 575px) {
  body.ai-theme .blog-card-body {
    padding: 20px;
  }

  body.ai-theme .blog-card-meta {
    gap: 10px;
  }
}

/* Mobile nav */
body.ai-theme .mobile-nav-toggle {
  color: #e2e8f0;
}

@media (max-width: 1199px) {
  body.ai-theme .navmenu ul {
    background: var(--nav-mobile-background-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
  }

  body.ai-theme .navmenu a {
    color: #cbd5e1;
  }
}
