/* --- CSS Variables & Theming --- */
:root {
  --bg-color: #ffffff;
  --text-color: #111111;
  --text-muted: #666666;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(0, 0, 0, 0.05);
  --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  --accent-color: #111111;
  --accent-hover: #444444;
  --accent-text-color: #ffffff;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.08);
  --btn-text: #111111;
  --btn-bg: #f5f5f5;
  --btn-hover-bg: #e5e5e5;
  --chat-user-bg: #f5f5f5;
  --chat-system-bg: transparent;
  --btn-border: rgba(0, 0, 0, 0.14);
  --btn-border-hover: rgba(0, 0, 0, 0.30);
}

[data-theme="dark"] {
  --bg-color: #0a0f1e;
  --text-color: #ffffff;
  --text-muted: #8898bb;
  --glass-bg: rgba(10, 18, 40, 0.65);
  --glass-border: rgba(80, 140, 255, 0.15);
  --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
  --accent-color: #ffffff;
  --accent-hover: #cccccc;
  --accent-text-color: #000000;
  --card-bg: #0d1428;
  --card-border: rgba(80, 140, 255, 0.12);
  --btn-text: #ffffff;
  --btn-bg: #131c38;
  --btn-hover-bg: #1e2a4a;
  --chat-user-bg: #131c38;
  --chat-system-bg: transparent;
  --btn-border: rgba(80, 140, 255, 0.18);
  --btn-border-hover: rgba(80, 140, 255, 0.38);
}

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

/* --- Custom Thin Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.4);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.7);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.4) transparent;
}

html,
body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition:
    background-color 0.5s ease,
    color 0.5s ease;
  height: 100vh;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* --- Background Mesh / Blobs --- */
.background-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ai-network {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.6;
  animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  background: var(--gradient-blob-1);
}

.blob-2 {
  bottom: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: var(--gradient-blob-2);
  animation-delay: -10s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(10%, 10%) scale(1.1);
  }
}

/* --- Navbar --- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  position: relative;
  z-index: 10;
}

.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-right {
  margin-left: auto;
  display: flex;
  gap: 1rem;
}

.nav-avatar-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.nav-avatar-btn:hover {
  transform: scale(1.1);
}

.nav-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-left .btn-glass,
.nav-right .icon-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--glass-shadow);
  color: var(--text-color);
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-left .btn-glass {
  padding: 0.6rem 1.2rem;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-right {
  display: flex;
  gap: 1rem;
}

.nav-right .icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.nav-left .btn-glass:hover,
.nav-right .icon-btn:hover {
  background: var(--btn-hover-bg);
  transform: translateY(-2px);
}

.hidden {
  display: none !important;
}

/* --- Welcome Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 500px;
  width: 90%;
  position: relative;
  box-shadow: var(--glass-shadow);
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.modal-overlay.hidden .modal {
  transform: translateY(20px);
}

.modal-close-icon {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.modal-close-icon:hover {
  opacity: 1;
}

.modal-content {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  text-align: center;
}

.modal-content h3 {
  font-size: 1.5rem;
  color: var(--text-color);
  font-family: "Playfair Display", serif;
}

.modal-content p {
  color: var(--text-muted);
  line-height: 1.6;
}

.btn-primary {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.3s ease,
    transform 0.2s ease;
  margin-top: 0.5rem;
}

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

/* --- Main Layout --- */
.container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
  transition: all 0.5s ease;
}

/* --- Hero Section --- */
.hero-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
  width: 100%;
}

.hero-section.fade-out {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  position: absolute;
}

.greeting {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.title {
  font-family: "Playfair Display", serif;
  font-size: 5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-color);
  letter-spacing: -0.02em;
}

.avatar-container {
  margin-bottom: 1rem;
  width: 120px;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1.5rem auto;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slogan {
  font-size: 1.1rem;
  color: var(--text-muted);
  opacity: 0.8;
}

/* --- Bottom Controls --- */
.bottom-controls {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem;
  transition: all 0.3s ease;
}

/* When chat is active, slogan watermark fades out */
.bottom-controls.chat-active .slogan-watermark {
  display: none;
}

.quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  order: 2;
  /* Default order (below input) */
}

.input-wrapper {
  order: 1;
  /* Default order (above buttons) */
}

.slogan-watermark {
  order: 3;
}

/* Swap order when chat is active */
.bottom-controls.chat-active .quick-buttons {
  order: 1;
  margin-bottom: 1rem;
}

.bottom-controls.chat-active .input-wrapper {
  order: 2;
}

.btn-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--card-bg);
  border: 1.5px solid var(--btn-border);
  border-radius: 50px;
  font-size: 0.9rem;
  color: var(--text-color);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.btn-me svg,
.btn-projects svg,
.btn-experience svg,
.btn-skills svg,
.btn-contact svg {
  stroke: var(--text-color);
  opacity: 0.7;
}

.btn-tag:hover {
  background: var(--card-bg);
  border-color: var(--btn-border-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

@property --border-angle {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0turn;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 50px;
  padding: 0.4rem 0.4rem 0.4rem 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  width: 100%;

  /* Animated Gradient Border using background-clip */
  border: 2px solid transparent;
  background-image:
    linear-gradient(var(--card-bg), var(--card-bg)),
    conic-gradient(from var(--border-angle),
      #ff3b3b,
      #ff8c00,
      #ff3b3b,
      #ff8c00,
      #ff3b3b);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  animation: shimmerBorder 3s linear infinite;
}

@keyframes shimmerBorder {
  0% {
    --border-angle: 0turn;
  }

  100% {
    --border-angle: 1turn;
  }
}

.input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-color);
  font-size: 1rem;
  padding: 0.5rem;
  outline: none;
  font-family: inherit;
}

.input-wrapper input::placeholder {
  color: var(--text-muted);
}

.slogan-watermark {
  font-family: "Inter", sans-serif;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 900;
  color: var(--text-color);
  opacity: 0.08;
  position: absolute;
  bottom: -70px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  text-align: center;
  white-space: nowrap;
  z-index: -1;
  pointer-events: none;
  letter-spacing: -0.02em;
}

/* --- Mic Button --- */
.mic-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 0.2rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.mic-btn:hover {
  color: var(--text-color);
  transform: scale(1.1);
}

.mic-btn.listening {
  color: #ef4444;
}

.mic-btn.listening::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #ef4444;
  animation: micRing 1.4s ease-out infinite;
}

.mic-btn.listening::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  animation: micRing 1.4s ease-out infinite 0.4s;
}

@keyframes micRing {
  0% {
    transform: scale(0.85);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.mic-btn.listening .mic-icon {
  display: none;
}

.mic-btn:not(.listening) .mic-stop-icon {
  display: none !important;
}

.mic-btn.listening .mic-stop-icon {
  display: flex !important;
}

.send-btn {
  background: var(--accent-color);
  color: var(--accent-text-color);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease;
}

.send-btn:hover {
  background: var(--accent-hover);
}

/* --- Chat Container --- */
.chat-container {
  width: 100%;
  flex: 1;
  min-height: 0;
  padding-bottom: 2rem;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  /* Sleek custom scrollbar for chat */
  scrollbar-width: thin;
  scrollbar-color: rgba(150, 150, 150, 0.3) transparent;
}

.chat-container::-webkit-scrollbar {
  width: 4px;
}

.chat-container::-webkit-scrollbar-track {
  background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
  background: rgba(150, 150, 150, 0.3);
  border-radius: 10px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
  background: rgba(150, 150, 150, 0.6);
}

.chat-history {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

/* --- Chat Messages --- */
.message {
  display: flex;
  max-width: 85%;
  animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

.message.user {
  align-self: flex-end;
}

.message.system {
  align-self: flex-start;
  flex-direction: row;
  gap: 1rem;
}

.message-avatar {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.message-content {
  padding: 1rem 1.2rem;
  border-radius: 1.2rem;
  line-height: 1.5;
  font-size: 1rem;
  min-width: 0;
  width: 100%;
}

.message.user .message-content {
  background: var(--accent-color);
  color: var(--accent-text-color);
  border: 1px solid transparent;
  border-bottom-right-radius: 0.3rem;
}

.message.system .message-content {
  background: var(--chat-system-bg);
  padding: 0.5rem 0;
}

/* --- Rich Content / Templates (For projects, skills, etc) --- */
.rich-content {
  margin-top: 0.5rem;
  width: 100%;
}

.cards-carousel {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: none;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.cards-carousel::-webkit-scrollbar {
  display: none;
}

.project-card {
  position: relative;
  border-radius: 20px;
  min-width: 280px;
  height: 350px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1.5rem;
  background-color: #1a1a1a;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.8) 0%,
      rgba(0, 0, 0, 0.2) 40%,
      rgba(0, 0, 0, 0.9) 100%);
  z-index: 1;
}

.project-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-card h4 {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.project-card p {
  font-size: 1.6rem;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.2;
}

/* --- Project Modal Styles --- */
.project-modal-container {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 3rem 2rem 2rem 2rem;
  max-width: 650px;
  width: 90%;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.3s ease-out;
  max-height: 90vh;
  overflow-y: auto;
}

.pm-category {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.pm-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.pm-details {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

#pm-desc {
  font-size: 1.05rem;
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.pm-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.8rem;
}

.pm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pm-tag {
  padding: 0.4rem 0.8rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-color);
  font-weight: 500;
}

.pm-links-section {
  margin-top: 1rem;
}

.pm-link-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  margin-bottom: 0.8rem;
}

.pm-link-card:hover {
  background: var(--glass-bg);
  transform: translateY(-2px);
}

.skills-group {
  margin-bottom: 1.5rem;
}

.skills-group h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
}

.skill-tag-outline {
  background: transparent;
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.about-tags {
  margin-top: 1rem;
}

.contact-bento {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

.bento-header {
  padding: 1.8rem 1.5rem;
  background: linear-gradient(135deg,
      rgba(var(--accent-color-rgb), 0.1) 0%,
      transparent 100%);
  border-bottom: 1px solid var(--card-border);
}

.bento-header h4 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-color);
  margin-bottom: 0.4rem;
  font-family: "Playfair Display", serif;
}

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

.bento-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  padding: 1.5rem;
}

.bento-card {
  background: var(--bg-color);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bento-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.15);
  border-color: var(--text-muted);
}

.bento-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 0.3s ease;
}

.bento-card:hover .bento-icon {
  transform: scale(1.1);
}

.bento-card.whatsapp .bento-icon {
  background: linear-gradient(135deg, #25d366, #128c7e);
  box-shadow: 0 8px 16px rgba(37, 211, 102, 0.3);
}

.bento-card.email .bento-icon {
  background: linear-gradient(135deg, #ea4335, #c5221f);
  box-shadow: 0 8px 16px rgba(234, 67, 53, 0.3);
}

.bento-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.bento-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.bento-value {
  font-size: 0.95rem;
  color: var(--text-color);
  font-weight: 700;
}

.bento-socials {
  grid-column: 1 / -1;
  display: flex;
  gap: 1rem;
  justify-content: center;
  padding-top: 0.5rem;
  border-top: 1px solid var(--card-border);
}

.social-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-circle:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.social-circle.linkedin:hover {
  color: #fff;
  background: #0077b5;
  border-color: #0077b5;
}

.social-circle.github:hover {
  color: var(--bg-color);
  background: var(--text-color);
  border-color: var(--text-color);
}

.social-circle.file:hover {
  color: #fff;
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* --- Book a Call Card --- */
.book-call-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 1.5rem 1.5rem;
  padding: 1.1rem 1.3rem;
  background: linear-gradient(135deg,
      rgba(99, 102, 241, 0.08) 0%,
      rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.book-call-card:hover {
  background: linear-gradient(135deg,
      rgba(99, 102, 241, 0.14) 0%,
      rgba(139, 92, 246, 0.14) 100%);
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.12);
}

.book-call-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.book-call-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 6px 14px rgba(99, 102, 241, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.book-call-card:hover .book-call-icon {
  transform: scale(1.08);
}

.book-call-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.book-call-info h5 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-color);
}

.book-call-info p {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.book-call-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  padding: 0.48rem 1.1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  font-family: inherit;
  transition: opacity 0.2s ease;
}

.book-call-card:hover .book-call-btn {
  opacity: 0.88;
}

/* --- Typing Indicator --- */
.typing-indicator {
  display: flex;
  gap: 0.3rem;
  padding: 1rem;
  align-items: center;
}

.typing-indicator .dot {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator .dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-indicator .dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {

  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* --- Experience Timeline --- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 1rem 0;
}

.timeline-item {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.5rem;
  border-radius: 16px;
  margin-left: 2.5rem;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* The vertical line */
.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.25rem;
  top: 0;
  bottom: -1.5rem;
  width: 2px;
  background: var(--accent-color);
  opacity: 0.3;
}

/* Remove line extension for the last item */
.timeline-item:last-child::before {
  bottom: 0;
}

/* The dot */
.timeline-item::after {
  content: "";
  position: absolute;
  left: calc(-1.25rem - 5px);
  top: 1.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 0 4px var(--bg-color);
  z-index: 1;
}

.timeline-date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(59, 130, 246, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
}

.timeline-item h4 {
  font-size: 1.2rem;
  color: var(--text-color);
  margin-bottom: 0.4rem;
  font-family: "Playfair Display", serif;
  font-weight: 700;
}

.timeline-item p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Services Carousel --- */
.services-grid {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: none;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.services-grid::-webkit-scrollbar {
  display: none;
}

.service-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 255px;
  max-width: 255px;
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.09);
}

.service-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.service-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.3;
}

.service-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.service-tag {
  font-size: 0.7rem;
  padding: 0.18rem 0.55rem;
  background: var(--bg-color);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  color: var(--text-muted);
  font-weight: 500;
}

.services-cta {
  margin-top: 1rem;
  padding: 0.85rem 1.1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  font-size: 0.83rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

.services-cta strong {
  color: var(--text-color);
}

/* --- Testimonials --- */
.testimonials-carousel {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: none;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.testimonials-carousel::-webkit-scrollbar {
  display: none;
}

.testimonial-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  min-width: 270px;
  max-width: 270px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.testimonial-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.testimonial-stars {
  display: flex;
  gap: 0.15rem;
}

.testimonial-star {
  color: #f59e0b;
  font-size: 0.85rem;
}

.testimonial-big-quote {
  font-size: 3rem;
  line-height: 0.8;
  font-family: Georgia, serif;
  color: var(--text-color);
  opacity: 0.08;
  font-weight: 900;
  user-select: none;
}

.testimonial-text {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-muted);
  flex: 1;
}

.testimonial-divider {
  height: 1px;
  background: var(--card-border);
  margin: 0.2rem 0;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.testimonial-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.testimonial-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.testimonial-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Carousel Navigation Arrows --- */
.carousel-wrapper {
  width: 100%;
}

.carousel-nav {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.9rem;
  padding-left: 0.2rem;
}

.carousel-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.carousel-arrow:hover {
  background: var(--accent-color);
  color: var(--accent-text-color);
  border-color: var(--accent-color);
  transform: scale(1.08);
}

.carousel-arrow:active {
  transform: scale(0.95);
}

/* ============================================
   BOOKING MODAL
   ============================================ */
.booking-container {
  background: var(--bg-color);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2rem 1.8rem 1.8rem;
  max-width: 460px;
  width: 92%;
  position: relative;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.22);
  animation: slideUp 0.3s ease-out;
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: none;
}

.booking-container::-webkit-scrollbar {
  display: none;
}

/* Progress bar */
.booking-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.8rem;
}

.bp-step {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.35s ease;
  flex-shrink: 0;
}

.bp-step.active {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.bp-step.done {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}

.bp-line {
  flex: 1;
  height: 2px;
  background: var(--card-border);
  max-width: 56px;
  transition: background 0.35s ease;
}

.bp-line.done {
  background: #10b981;
}

/* Step panels */
.booking-step-panel {
  width: 100%;
}

.booking-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-color);
  margin-bottom: 0.3rem;
  font-family: "Playfair Display", serif;
}

.booking-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
}

.booking-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

/* Day scroller */
.booking-days {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.6rem;
  scrollbar-width: none;
  margin-bottom: 1.3rem;
}

.booking-days::-webkit-scrollbar {
  display: none;
}

.day-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  padding: 0.65rem 0.85rem;
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-family: inherit;
}

.day-btn:hover {
  border-color: #6366f1;
}

.day-btn.selected {
  background: #6366f1;
  border-color: #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.day-btn .day-name {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.day-btn .day-num {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-color);
}

.day-btn .day-month {
  font-size: 0.62rem;
  color: var(--text-muted);
}

.day-btn.selected .day-name,
.day-btn.selected .day-num,
.day-btn.selected .day-month {
  color: #fff;
}

/* Time slots */
.booking-times {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
}

.time-slot-btn {
  padding: 0.6rem 0.3rem;
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.time-slot-btn:hover {
  border-color: #6366f1;
  color: #6366f1;
}

.time-slot-btn.selected {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3);
}

/* Primary CTA button */
.booking-btn-primary {
  width: 100%;
  padding: 0.88rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.booking-btn-primary:hover:not(:disabled) {
  opacity: 0.88;
  transform: translateY(-1px);
}

.booking-btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.booking-btn-wa {
  background: linear-gradient(135deg, #25d366, #128c7e);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

/* Back button */
.booking-back {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0;
  margin-bottom: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: inherit;
  transition: color 0.2s;
}

.booking-back:hover {
  color: var(--text-color);
}

/* Summary badge (step 2) */
.booking-summary-badge {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 10px;
  margin-bottom: 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-color);
}

/* Form */
.booking-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.booking-input {
  width: 100%;
  padding: 0.78rem 1rem;
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-color);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.booking-input:focus {
  border-color: #6366f1;
}

.booking-input.error {
  border-color: #ef4444;
}

.booking-input::placeholder {
  color: var(--text-muted);
}

.booking-textarea {
  resize: vertical;
  min-height: 75px;
}

/* Confirmed screen */
.booking-confirmed-screen {
  text-align: center;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.booking-check-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.4);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.booking-confirmed-screen .booking-title {
  margin-bottom: 0.4rem;
}

.booking-confirmed-screen .booking-sub {
  margin-bottom: 1.2rem;
}

.booking-confirm-card {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  text-align: left;
}

.bccd-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  padding: 0.28rem 0;
}

.bccd-row span {
  color: var(--text-color);
  font-weight: 600;
}

.booking-wa-final-btn {
  width: 100%;
  padding: 0.88rem;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  margin-bottom: 0.7rem;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.booking-wa-final-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.booking-done-btn {
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.booking-done-btn:hover {
  color: var(--text-color);
  border-color: var(--text-muted);
}

/* --- Toast Notification --- */
.toast-notification {
  position: fixed;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--accent-color);
  color: var(--accent-text-color);
  padding: 0.65rem 1.4rem;
  border-radius: 50px;
  font-size: 0.86rem;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

/* ── Language Switcher ───────────────────────────────────────────────── */
.lang-switcher {
  position: relative;
}

.nav-right .icon-btn.lang-btn {
  width: auto;
  min-width: 44px;
  border-radius: 22px;
  padding: 0 0.5rem 0 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.lang-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  opacity: 0.7;
}

.lang-switcher.open .lang-chevron {
  transform: rotate(180deg);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card-bg, #1a1a2e);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  padding: 0.4rem;
  list-style: none;
  margin: 0;
  min-width: 140px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 9999;
  animation: langDropIn 0.18s ease;
}

@keyframes langDropIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lang-switcher.open .lang-dropdown {
  display: block;
}

.lang-option {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary, rgba(255, 255, 255, 0.65));
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-option:hover {
  background: var(--glass-bg, rgba(255, 255, 255, 0.07));
  color: var(--text-primary);
}

.lang-option.lang-active {
  color: var(--text-primary);
  font-weight: 700;
  background: var(--glass-bg, rgba(255, 255, 255, 0.07));
}

/* ── RTL (Arabic) overrides ──────────────────────────────────────────── */
[dir="rtl"] .timeline::before {
  left: auto;
  right: 10px;
}

[dir="rtl"] .timeline-item {
  margin-left: 0;
  margin-right: 30px;
}

[dir="rtl"] .timeline-item::before {
  left: auto;
  right: -20px;
}

[dir="rtl"] .timeline-item::after {
  left: auto;
  right: calc(-20px - 5px);
}

[dir="rtl"] .message.system {
  flex-direction: row-reverse;
}

[dir="rtl"] .message.user .message-content {
  border-radius: 18px 0 18px 18px;
}

[dir="rtl"] .message.system .message-content {
  border-radius: 0 18px 18px 18px;
}

[dir="rtl"] .book-call-card {
  flex-direction: row-reverse;
}

[dir="rtl"] .carousel-nav {
  flex-direction: row-reverse;
}