/* ============================================
   BASE STYLES - vasujain.in
   Mobile-first, CSS Grid + Flexbox
   ============================================ */

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

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

::selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

/* ---- NAVIGATION ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.nav-brand span {
  color: var(--text-muted);
  font-weight: 400;
}

/* Secret slide link - looks like part of the terminal prompt */
.secret-slide {
  color: var(--text-muted) !important;
  text-decoration: none !important;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: default;
  transition: none;
}
.secret-slide:hover {
  color: var(--text-muted) !important;
  text-decoration: none !important;
}

.nav-links {
  display: none;
  list-style: none;
  gap: 0.25rem;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--btn-radius);
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--tag-bg);
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
  border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu drawer */
.mobile-menu {
  position: fixed;
  top: 56px;
  right: -100%;
  width: 280px;
  height: calc(100vh - 56px);
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  padding: 1.5rem;
  transition: right 0.3s ease;
  z-index: 999;
  overflow-y: auto;
}
.mobile-menu.open { right: 0; }
.mobile-menu a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  border-radius: var(--btn-radius);
  transition: all 0.2s;
  border-left: 2px solid transparent;
}
.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--accent);
  background: var(--tag-bg);
  border-left-color: var(--accent);
}

/* Mobile menu overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.menu-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* ---- LAYOUT ---- */
.main-content {
  padding-top: 56px;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page-header {
  padding: 3rem 0 2rem;
  text-align: center;
}
.page-header h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.page-header .subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

section {
  padding: 2rem 0;
}

/* ---- CARDS ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

/* Pinned card */
.card.pinned {
  border-color: var(--pinned-border);
  position: relative;
}
.card.pinned::before {
  content: '\f08d'; /* pin icon */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  color: var(--pinned-border);
  font-size: 0.85rem;
}

/* ---- TAGS ---- */
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 3px;
  margin: 0.15rem;
  font-family: var(--font-primary);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-winner {
  background: var(--winner-badge);
  color: var(--bg-primary);
}
.badge-participant {
  background: var(--tag-bg);
  color: var(--tag-text);
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-primary);
  font-size: 0.85rem;
  border-radius: var(--btn-radius);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border);
}
.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover {
  box-shadow: 0 0 15px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--tag-bg);
}

/* ---- TIMELINE ---- */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--timeline-line);
}
.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--timeline-dot);
  border: 2px solid var(--bg-primary);
  transform: translateX(-5px);
}
.timeline-date {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.timeline-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.timeline-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.timeline-content {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.timeline-content li {
  margin-bottom: 0.3rem;
  list-style: none;
  padding-left: 1rem;
  position: relative;
}
.timeline-content li::before {
  content: '\203a';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---- HERO (index.html) ---- */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: calc(100vh - 56px);
  padding: 2rem 1.25rem;
}
.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  object-fit: cover;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 20px var(--accent-glow);
  transition: transform 0.3s, box-shadow 0.3s;
}
.hero-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px var(--accent-glow);
}
/* Placeholder when no image is provided */
.hero-avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
  box-shadow: 0 0 20px var(--accent-glow);
}
.hero-greeting {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.hero h1 .accent { color: var(--accent); }
.hero .typed-wrap {
  font-size: 1.1rem;
  color: var(--text-secondary);
  min-height: 2rem;
  margin-bottom: 1.5rem;
}
.typed-cursor {
  color: var(--accent);
}

.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin: 2rem 0;
}
.stat-item {
  text-align: center;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--stat-number);
  display: block;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}
.social-links a {
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: color 0.2s;
}
.social-links a:hover { color: var(--accent); }

/* ---- HIGHLIGHTS GRID (Home) ---- */
.highlights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2rem 0;
}
.highlight-card {
  text-decoration: none;
  color: inherit;
}
.highlight-card .card {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.highlight-icon {
  font-size: 1.5rem;
  color: var(--accent);
  min-width: 40px;
  text-align: center;
}
.highlight-card h3 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}
.highlight-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- TECH STACK ---- */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.5rem 0;
}

/* ---- FILTER BAR ---- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}
.filter-btn {
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-family: var(--font-primary);
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--tag-bg);
  color: var(--accent);
  border-color: var(--accent);
}

/* ---- SECTION HEADERS ---- */
.section-header {
  margin-bottom: 2rem;
}
.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.section-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---- EXPERIENCE CARD ---- */
.exp-card .company {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.exp-card .company-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.exp-card .role {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}
.exp-card .company-name {
  color: var(--accent);
  font-size: 0.9rem;
}
.exp-card .dates {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.exp-card .description {
  margin-top: 0.75rem;
}
.exp-card .description li {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  list-style: none;
  padding-left: 1rem;
  position: relative;
}
.exp-card .description li::before {
  content: '\203a';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.exp-card .tech-tags {
  margin-top: 0.75rem;
}

/* ---- PROJECT CARDS (Experience) ---- */
.projects-section {
  margin-top: 2rem;
}
.project-card h4 {
  font-family: var(--font-heading);
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}
.project-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ---- SPEAKING TIMELINE ---- */
.speaking-year {
  margin-bottom: 2rem;
}
.speaking-year h3 {
  font-family: var(--font-heading);
  color: var(--accent);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.speaking-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.talk-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.talk-item:last-child { border-bottom: none; }
.talk-event {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}
.talk-title {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}
.talk-type {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---- AUTHORSHIP ---- */
.authorship-section {
  margin-bottom: 2rem;
}
.authorship-section h3 {
  font-family: var(--font-heading);
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---- AWARDS TIMELINE ---- */
.award-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.award-year {
  font-family: var(--font-heading);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 55px;
  flex-shrink: 0;
}
.award-details h4 {
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.award-details p {
  color: var(--text-muted);
  font-size: 0.83rem;
}

/* ---- COMMUNITY ---- */
.community-section {
  margin-bottom: 2rem;
}
.community-section h3 {
  font-family: var(--font-heading);
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---- CONTACT ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.contact-info h3 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.contact-item i {
  color: var(--accent);
  width: 20px;
  text-align: center;
}
.contact-item a {
  color: var(--link);
  text-decoration: none;
}
.contact-item a:hover { color: var(--link-hover); }

/* ---- FOOTER ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  margin-top: 3rem;
}
.footer p {
  color: var(--text-muted);
  font-size: 0.8rem;
}
.footer a {
  color: var(--accent);
  text-decoration: none;
}

/* ---- THEME SWITCHER ---- */
.theme-switcher {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1001;
}
.theme-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.3s;
  box-shadow: var(--shadow);
}
.theme-toggle-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.theme-options {
  position: absolute;
  bottom: 52px;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 140px;
  box-shadow: var(--shadow-hover);
}
.theme-options.open { display: flex; }
.theme-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: var(--btn-radius);
  transition: all 0.2s;
  white-space: nowrap;
}
.theme-option:hover { background: var(--tag-bg); color: var(--accent); }
.theme-option.active { color: var(--accent); font-weight: 600; }
.theme-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---- BACK TO TOP ---- */
.back-to-top {
  position: fixed;
  bottom: 5rem;
  left: 1.5rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 999;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}
.back-to-top:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---- SCROLL PROGRESS BAR ---- */
.scroll-progress {
  position: fixed;
  top: 56px;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  z-index: 1001;
  transition: width 0.1s linear;
}

/* ---- CMD+K COMMAND PALETTE ---- */
.cmd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: none;
  justify-content: center;
  padding-top: 15vh;
}
.cmd-overlay.open { display: flex; }
.cmd-palette {
  width: 90%;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  overflow: hidden;
  max-height: 420px;
  display: flex;
  flex-direction: column;
  align-self: flex-start;
}
.cmd-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}
.cmd-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  outline: none;
}
.cmd-input::placeholder { color: var(--text-muted); }
.cmd-kbd {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  background: var(--bg-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.cmd-results {
  overflow-y: auto;
  max-height: 300px;
  padding: 0.35rem;
}
.cmd-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: var(--btn-radius);
  text-align: left;
  transition: background 0.1s;
}
.cmd-item:hover,
.cmd-item.selected {
  background: var(--tag-bg);
  color: var(--text-primary);
}
.cmd-item-label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.85rem;
}
.cmd-item-desc {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.cmd-hint {
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.cmd-hint span {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.cmd-hint kbd {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

/* ---- CARD IMAGE (optional photo in hackathon/speaking cards) ---- */
.card-img {
  width: 100%;
  border-radius: calc(var(--card-radius) - 2px);
  margin-bottom: 0.75rem;
  max-height: 180px;
  object-fit: contain;
  object-position: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}
.card-img-sm {
  width: 80px;
  height: 80px;
  border-radius: var(--card-radius);
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

/* ---- CHATBOT ---- */
.chatbot-container {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 1000;
}
.chat-toggle-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}
.chat-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.chat-window {
  position: absolute;
  bottom: 60px;
  left: 0;
  width: 340px;
  max-height: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-hover);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chat-window.open { display: flex; }
.chat-header {
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--accent);
}
.chat-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.25rem;
}
.chat-close:hover { color: var(--text-primary); }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  max-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.chat-msg { display: flex; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg.bot { justify-content: flex-start; }
.chat-bubble {
  max-width: 85%;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.5;
}
.chat-msg.user .chat-bubble {
  background: var(--accent);
  color: var(--bg-primary);
  border-bottom-right-radius: 4px;
}
.chat-msg.bot .chat-bubble {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}
.chat-input-wrap {
  display: flex;
  border-top: 1px solid var(--border);
  padding: 0.5rem;
  gap: 0.5rem;
  background: var(--bg-secondary);
}
.chat-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.82rem;
  outline: none;
}
.chat-input:focus { border-color: var(--accent); }
.chat-input::placeholder { color: var(--text-muted); }
.chat-send {
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--btn-radius);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.82rem;
  transition: opacity 0.2s;
}
.chat-send:hover { opacity: 0.85; }

/* Light theme chat button text */
[data-theme="light"] .chat-toggle-btn,
[data-theme="warm"] .chat-toggle-btn {
  color: #ffffff;
}
[data-theme="light"] .chat-msg.user .chat-bubble,
[data-theme="warm"] .chat-msg.user .chat-bubble {
  color: #ffffff;
}
[data-theme="light"] .chat-send,
[data-theme="warm"] .chat-send {
  color: #ffffff;
}

@media (max-width: 400px) {
  .chat-window {
    width: calc(100vw - 2rem);
    left: -0.5rem;
  }
}

/* ---- PAGE LOAD BADGE ---- */
.page-load-badge {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: 0.65rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  opacity: 0.4;
  z-index: 998;
  pointer-events: none;
  transition: opacity 0.3s;
}
.page-load-badge:hover {
  opacity: 0.8;
}
.page-load-badge i {
  color: var(--accent);
  margin-right: 0.2rem;
}

/* ---- CURSOR BLINK (for terminal theme) ---- */
[data-theme="terminal"] .page-header h1::after {
  content: '_';
  animation: blink 1s step-end infinite;
  color: var(--accent);
}
@keyframes blink {
  50% { opacity: 0; }
}

/* ---- UTILITIES ---- */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Links */
a { color: var(--link); }
a:hover { color: var(--link-hover); }

/* Separator */
.separator {
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

/* Media card */
.media-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.media-icon {
  font-size: 1.5rem;
  color: var(--accent);
  min-width: 36px;
  text-align: center;
  padding-top: 0.25rem;
}
.media-card h4 {
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.media-card .media-source {
  color: var(--accent);
  font-size: 0.8rem;
}
.media-card p {
  color: var(--text-muted);
  font-size: 0.83rem;
  margin-top: 0.2rem;
}

/* ---- BLOG ---- */
.blog-content {
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.9;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.blog-content h1, .blog-content h2, .blog-content h3 {
  color: var(--text-primary);
  font-family: var(--font-heading);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.blog-content h2 { font-size: 1.3rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.blog-content h3 { font-size: 1.1rem; }
.blog-content p { margin-bottom: 1rem; }
.blog-content code {
  font-family: var(--font-heading);
  background: var(--tag-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.85em;
  color: var(--accent);
}
.blog-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.blog-content pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
  font-size: 0.85rem;
}
.blog-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}
.blog-content ul, .blog-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.blog-content li { margin-bottom: 0.4rem; }
.blog-content a { color: var(--link); }
.blog-content a:hover { color: var(--link-hover); }
.blog-content img {
  max-width: 100%;
  border-radius: var(--card-radius);
  margin: 1rem 0;
}
.blog-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
.blog-meta {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.blog-meta h1 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}
.blog-meta .date {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.blog-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.blog-nav a {
  color: var(--link);
  text-decoration: none;
  font-size: 0.85rem;
}
.blog-nav a:hover { color: var(--link-hover); }
