:root {
  --bg: #090d16;
  --sidebar-bg: #0f1626;
  --card-bg: #151e32;
  --card-hover: #1c2742;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.4);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border: #1e293b;
  --radius: 12px;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --sidebar-bg: #ffffff;
  --card-bg: #ffffff;
  --card-hover: #f1f5f9;
  --accent: #4f46e5;
  --accent-light: #6366f1;
  --accent-glow: rgba(79, 70, 229, 0.2);
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --border: #e2e8f0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: background-color 0.25s, border-color 0.25s;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
}

.layout-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 360px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 2.2rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.profile-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-wrapper {
  position: relative;
  width: 135px;
  height: 135px;
  margin-bottom: 1.25rem;
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 0 25px var(--accent-glow);
}

.pk-badge {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 7px;
  border-radius: 50%;
  border: 2px solid var(--sidebar-bg);
}

.user-name {
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.user-title {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #22c55e;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 8px;
  margin-top: 1.25rem;
}

.btn-action {
  flex: 1;
  padding: 9px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--border);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.primary-btn {
  background: var(--accent);
  color: #ffffff;
  border-color: transparent;
}

.primary-btn:hover {
  background: var(--accent-light);
}

.secondary-btn {
  background: var(--card-bg);
  color: var(--text-primary);
}

.secondary-btn:hover {
  background: var(--card-hover);
}

/* Contact Box */
.contact-box {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.contact-item {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}

.contact-item:hover, .contact-item.highlight {
  color: var(--text-primary);
  border-color: var(--border);
  background: var(--card-bg);
}

.contact-item i {
  color: var(--accent-light);
}

.btn-theme {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 1rem;
}

.btn-theme:hover {
  background: var(--card-hover);
}

/* Main Slider Panel */
.slider-panel {
  flex: 1;
  padding: 2.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 960px;
  position: relative;
}

.top-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
  gap: 12px;
}

.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-light);
}

.tab-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.slider-controls {
  display: flex;
  gap: 8px;
}

.control-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
}

.control-btn:hover {
  background: var(--accent);
  color: #ffffff;
}

/* Vertical Slides */
.slides-viewport {
  position: relative;
  min-height: 480px;
  overflow: hidden;
}

.slide {
  display: none;
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.slide.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.slide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.slide-header h2 {
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.slide-tag {
  font-size: 0.75rem;
  color: var(--accent-light);
  background: rgba(99, 102, 241, 0.12);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.card-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-bottom: 1.15rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-top-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
}

.card-badge {
  color: var(--accent-light);
  font-weight: 700;
  text-transform: uppercase;
}

.repo-link {
  color: var(--text-secondary);
}

.card-item h3 {
  font-size: 1.12rem;
  margin-bottom: 0.45rem;
}

.card-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.tags {
  display: flex;
  gap: 8px;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}

.tags span {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 3px 8px;
  font-size: 0.76rem;
  border-radius: 4px;
}

/* Stepper Timeline & CIMAGE Logo */
.timeline-stepper {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 0.75rem;
  border-left: 2px solid var(--border);
  padding-left: 1.2rem;
}

.step-item {
  position: relative;
}

.step-dot {
  position: absolute;
  left: -1.65rem;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.step-content strong {
  font-size: 0.92rem;
}

.step-content p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.edu-brand-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.edu-logo-wrapper {
  width: 38px;
  height: 38px;
  min-width: 38px;
  background: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: 1px solid var(--border);
}

.edu-brand-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Skills Grid */
.skills-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.skill-tile {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
}

.skill-tile h4 {
  color: var(--accent-light);
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
}

.skill-tile p {
  color: var(--text-secondary);
  font-size: 0.84rem;
}

/* Certifications */
.certs-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.cert-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.cert-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.cert-card-link:hover .cert-box {
  transform: translateY(-2px);
  border-color: var(--accent-light);
}

.cert-logo-wrapper {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.cert-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cert-info strong {
  font-size: 0.86rem;
  display: block;
}

.cert-info span {
  font-size: 0.76rem;
  color: var(--text-secondary);
  display: block;
}

.verify-link {
  margin-top: 5px;
  font-size: 0.73rem;
  color: var(--accent-light);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.cert-card-link:hover .verify-link {
  text-decoration: underline;
}

/* Vertical Dots */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 1.5rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all 0.25s;
}

.dot.active {
  background: var(--accent);
  width: 8px;
  height: 22px;
  border-radius: 10px;
}

/* ===================================================
   SMART AI FLOATING PULSE & BLINKING BUTTON
   =================================================== */
.ai-pulse-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  text-decoration: none;
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.45);
  z-index: 9999;
  transition: transform 0.25s ease;
}

.ai-pulse-button:hover {
  transform: scale(1.12);
}

/* Outer Glowing Wave */
.pulse-wave {
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border: 2px solid #818cf8;
  border-radius: 50%;
  animation: pulseLoop 2s infinite ease-out;
  pointer-events: none;
}

@keyframes pulseLoop {
  0% {
    transform: scale(0.95);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Top Blinking Beacon Light */
.pulse-beacon {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background-color: #22c55e;
  border: 2px solid #0f1626;
  border-radius: 50%;
  box-shadow: 0 0 10px #22c55e;
  animation: blinkLoop 1.3s infinite;
}

@keyframes blinkLoop {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 8px #22c55e;
  }
  50% {
    opacity: 0.35;
    transform: scale(1.25);
    box-shadow: 0 0 16px #4ade80;
  }
}

/* Tooltip on Hover */
.btn-hover-tip {
  position: absolute;
  left: -135px;
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, left 0.25s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.ai-pulse-button:hover .btn-hover-tip {
  opacity: 1;
  left: -145px;
}

/* Mobile Responsive */
@media (max-width: 868px) {
  .layout-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
  }
  .slider-panel {
    padding: 2rem 1.2rem;
  }
  .top-nav-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .ai-pulse-button {
    bottom: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    font-size: 1.3rem;
  }
}