:root {
  --bg-color: #000000;
  --primary-color: #ffffff;
  --secondary-color: #a0a0a0;
  --accent-color: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.5);
  --chat-bg: rgba(15, 15, 15, 0.6);
}
body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-color);
  color: var(--primary-color);
  overflow-x: hidden;
  cursor: none;
}
body.chat-open {
  cursor: auto !important;
}
body.chat-open #custom-cursor {
  display: none !important;
}

/* Custom Cursor */
#custom-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  pointer-events: none !important;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s;
  z-index: 10000;
}
body.cursor-pointer-active #custom-cursor {
  width: 40px;
  height: 40px;
  background-color: var(--accent-glow);
  border-color: transparent;
}
@media (hover: none) and (pointer: coarse) {
  #custom-cursor {
    display: none;
  }
  body {
    cursor: auto;
  }
}

/* 3D Canvas */
#hero-canvas,
#about-image-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100;
  height: 100%;
  z-index: 1;
}
#about-image-container {
  position: relative;
  width: 100%;
  padding-top: 125%;
  border-radius: 1rem;
  overflow: hidden;
}

.section {
  position: relative;
  z-index: 10;
  background-color: var(--bg-color);
}

/* Horizontal Scrolling Section for Desktop */
@media (min-width: 768px) {
  #projects-section-wrapper {
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
  }
  #projects-container {
    display: flex;
    flex-wrap: nowrap;
    padding: 0 5vw;
    gap: 4rem;
    width: max-content;
  }
  .project-card {
    width: 60vw;
    max-width: 600px;
    flex-shrink: 0;
  }
}
@media (max-width: 767px) {
  #projects-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1rem;
  }
}

.aurora-card {
  position: relative;
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid #222;
  transition: border-color 0.3s;
}
.aurora-card:hover {
  border-color: var(--accent-color);
}
.aurora-card::before {
  content: "";
  position: absolute;
  top: var(--y, 50%);
  left: var(--x, 50%);
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s;
}
.aurora-card:hover::before {
  opacity: 1;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.modal-backdrop.visible {
  opacity: 1;
  visibility: visible;
}

.heading-reveal {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}
.heading-reveal .char {
  display: inline-block;
  transform: translateY(100%);
}

#initial-logo {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 1001;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--primary-color);
  text-decoration: none;
  position: relative;
  display: inline-block;
}
#initial-logo::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease-out;
}
#initial-logo:hover::after {
  width: 100%;
}

/* Dynamic Island Navigation */
#island-cluster {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  pointer-events: none;
}
#navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
}
#navbar-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  width: 130px;
}
#island-text-container {
  position: relative;
  overflow: hidden;
  height: 24px;
  width: 100px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
#island-text {
  position: absolute;
  width: 100%;
  font-weight: 500;
}
#nav-links {
  display: flex;
  gap: 1.5rem;
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
  padding: 0 1.5rem;
}
.nav-link {
  color: #a0a0a0;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  white-space: nowrap;
}
.nav-link:hover {
  color: #ffffff;
}

/* CHATBOT STYLES */
#chat-bubble {
  position: fixed;
  bottom: 3rem;
  right: 3rem;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2001;
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}
#chat-bubble-docked {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  opacity: 0;
  pointer-events: none;
}
#chat-widget-container {
  position: fixed;
  bottom: 9rem;
  right: 3rem;
  width: 440px;
  max-width: 90vw;
  height: 70vh;
  max-height: 700px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  border-radius: 1.5rem;
  background: var(--chat-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform-origin: bottom right;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  pointer-events: none;
}
#chat-widget-container.open {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
}
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
#chat-close-btn {
  cursor: pointer;
}
.chat-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.status-dot {
  width: 10px;
  height: 10px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
#chat-history {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.chat-bubble-wrapper {
  display: flex;
  gap: 0.75rem;
  max-width: 85%;
}
.chat-bubble-wrapper.user {
  align-self: flex-end;
  flex-direction: row-reverse;
  animation: slide-in-right 0.5s ease-out;
}
.chat-bubble-wrapper.ai {
  align-self: flex-start;
  animation: slide-in-left 0.5s ease-out;
}
@keyframes slide-in-left {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slide-in-right {
  from {
    transform: translateX(20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #333;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  overflow: hidden;
}
.avatar.user-avatar {
  background-color: var(--accent-color);
}
.chat-bubble {
  padding: 0.75rem 1.25rem;
  border-radius: 1.25rem;
  line-height: 1.5;
  background-color: rgba(40, 40, 40, 0.8);
}
.chat-bubble-wrapper.user .chat-bubble {
  background-color: var(--accent-color);
  border-bottom-right-radius: 0.25rem;
}
.chat-bubble-wrapper.ai .chat-bubble {
  border-bottom-left-radius: 0.25rem;
}
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 20px;
}
.typing-indicator span {
  width: 8px;
  height: 8px;
  background-color: #777;
  border-radius: 50%;
  animation: typing-bounce 1.2s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) {
  animation-delay: -1s;
}
.typing-indicator span:nth-child(3) {
  animation-delay: -0.8s;
}
@keyframes typing-bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}
#suggested-prompts {
  padding: 0 1.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.prompt-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.prompt-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary-color);
}
#chat-form {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
#chat-input {
  transition: box-shadow 0.3s;
}
#chat-input:focus {
  box-shadow: 0 0 15px var(--accent-glow);
}
