/* Externalized styles from index.html */
/* Custom styles for the page and animations */
body {
  /* Body font set to Lato for readability */
  font-family: "Lato", sans-serif;
  background-color: #000; /* Black background */
  color: #f3f4f6; /* text-gray-200 */
  /* Hide the default cursor */
  cursor: none;
}

/* Handwritten font for headings and key elements */
h1,
h2,
h3,
.nav-link,
.chat-header h3,
.logo-font {
  font-family: "Caveat", cursive;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Reset button fonts to Lato */
.btn-shine,
.chat-send-btn,
button[type="submit"] {
  font-family: "Lato", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

/* --- Custom Cursor --- */
#custom-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: #ffffff; /* White */
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease;
}
#custom-cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 2px solid #ffffff; /* White */
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: all 0.1s linear;
  opacity: 0.5;
}
/* Cursor interaction */
.cursor-interact:hover ~ #custom-cursor-dot {
  width: 30px;
  height: 30px;
  background-color: rgba(255, 255, 255, 0.3); /* White with opacity */
}
.cursor-interact:hover ~ #custom-cursor-outline {
  width: 0;
  height: 0;
  opacity: 0;
}

/* --- Glassmorphism Header --- */
.glass-header {
  background-color: rgba(0, 0, 0, 0.7); /* Black with 70% opacity */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-width: 1px;
  border-color: #374151; /* border-gray-700 */
}

/* Active Nav Link Style */
.nav-link.active {
  color: #ffffff; /* White */
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* --- Hero Canvas Animation --- */
#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.3; /* A bit more visible */
}

/* --- Skill Slider Animation --- */
.skills-slider-container {
  /* Allow horizontal manual scrolling; JS will auto-scroll when idle */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 15%,
    black 85%,
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    black 15%,
    black 85%,
    transparent
  );
  cursor: grab;
}
.skills-slider {
  display: flex;
  width: 200%;
  /* JS handles auto-scrolling for smoother control and pausing on interaction */
}
@keyframes slide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Hide native scrollbars across browsers */
.skills-slider-container::-webkit-scrollbar {
  display: none;
  height: 0;
}
.skills-slider-container {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

.skills-slider-container.is-dragging {
  cursor: grabbing;
}

/* Updated Skill Item for Dark Mode */
.skill-item {
  flex-shrink: 0;
  width: auto;
  padding: 0.75rem 1.25rem;
  margin: 0 0.5rem;
  background-color: #1f2937; /* bg-gray-800 */
  border: 1px solid #374151; /* border-gray-700 */
  border-radius: 9999px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease-in-out;
}
.skill-item:hover {
  background-color: #374151; /* bg-gray-700 */
  transform: translateY(-2px);
}
.skill-item i {
  font-size: 1.75rem;
}
.skill-item span {
  font-family: "Lato", sans-serif; /* Keep skill text readable */
  font-weight: 500; /* font-medium */
  font-size: 0.9rem;
  line-height: 1;
  color: #d1d5db; /* text-gray-300 */
}

/* --- Button Shine Effect --- */
.btn-shine {
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.btn-shine::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: -1;
}
.btn-shine:hover::before {
  left: 100%;
}

/* --- Project Card Animation (Fade-in on scroll) --- */
.project-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.project-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Custom Form Styles --- */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #f3f4f6; /* bg-gray-100 */
  color: #111827; /* text-gray-900 */
  border: 2px solid transparent;
  border-radius: 0.5rem; /* rounded-lg */
  transition: all 0.2s ease;
  font-family: "Lato", sans-serif;
}
.form-input:focus {
  outline: none;
  border-color: #374151; /* border-gray-700 */
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
}
.form-textarea {
  min-height: 150px;
}

/* --- AI Chatbot Styles --- */
.chat-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 4rem;
  height: 4rem;
  background-color: #000; /* Black */
  border: 2px solid #fff; /* White border */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: all 0.3s ease;
}
.chat-fab:hover {
  background-color: #374151; /* gray-700 */
  transform: scale(1.1);
}
.chat-widget {
  position: fixed;
  bottom: 7rem;
  right: 2rem;
  width: 350px;
  max-width: 90vw;
  height: 500px;
  max-height: 70vh;
  background-color: #111; /* Near black */
  border-radius: 0.75rem; /* rounded-xl */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #374151; /* border-gray-700 */
  transform-origin: bottom right;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s ease;
  transform: scale(0.5);
  opacity: 0;
  pointer-events: none;
}
.chat-widget.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}
.chat-header {
  padding: 1rem;
  background-color: #374151; /* bg-gray-700 */
  border-bottom: 1px solid #4b5563; /* border-gray-600 */
}
.chat-header h3 {
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem; /* Larger for Caveat */
}
.chat-header p {
  font-size: 0.875rem;
  color: #d1d5db; /* text-gray-300 */
  font-family: "Lato", sans-serif;
}
.chat-log {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.chat-message {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  max-width: 80%;
  line-height: 1.5;
  font-family: "Lato", sans-serif;
}
.chat-message.user {
  background-color: #ffffff; /* White */
  color: #000000; /* Black */
  align-self: flex-end;
  border-bottom-right-radius: 0.25rem;
}
.chat-message.bot {
  background-color: #374151; /* bg-gray-700 */
  color: #d1d5db; /* text-gray-300 */
  align-self: flex-start;
  border-bottom-left-radius: 0.25rem;
}
.chat-input-area {
  display: flex;
  padding: 1rem;
  border-top: 1px solid #374151; /* border-gray-700 */
}
.chat-input {
  flex-grow: 1;
  background-color: #000; /* Black */
  border: 1px solid #4b5563; /* border-gray-600 */
  color: #fff;
  padding: 0.75rem;
  border-radius: 0.5rem;
  margin-right: 0.5rem;
  font-family: "Lato", sans-serif;
}
.chat-input:focus {
  outline: none;
  border-color: #ffffff; /* White */
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}
.chat-send-btn {
  background-color: #ffffff; /* White */
  color: #000; /* Black */
  border: none;
  padding: 0 1rem;
  border-radius: 0.5rem;
}
