/* Qaswar Sarfraz Portfolio - Custom Styles */

:root {
  --primary-color: #2dd4bf;
  --primary-dark: #0f766e;
  --bg-dark: #0f172a;
  --bg-darker: #020617;
  --text-light: #f8fafc;
  --text-gray: #cbd5e1;
  --glass-bg: rgba(15, 23, 42, 0.8);
  --glass-border: rgba(45, 212, 191, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  color: var(--text-light);
  background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
  min-height: 100vh;
}

/* Glass morphism effects */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

.glass-hover {
  transition: all 0.3s ease;
}

.glass-hover:hover {
  background: rgba(45, 212, 191, 0.1);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-color) 0%, #06b6d4 50%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glow effects */
.glow {
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.3);
}

.glow-hover {
  transition: box-shadow 0.3s ease;
}

.glow-hover:hover {
  box-shadow: 0 0 30px rgba(45, 212, 191, 0.5);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Loading animations */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.shimmer {
  background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.2), transparent);
  background-size: 200px 100%;
  animation: shimmer 2s infinite;
}

/* Typing animation */
.typewriter {
  border-right: 2px solid var(--primary-color);
  white-space: nowrap;
  overflow: hidden;
  animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--primary-color); }
}

/* Particle background */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0.6;
  animation: float 6s ease-in-out infinite;
}

/* AI Chat Interface */
.chat-container {
  max-height: 400px;
  overflow-y: auto;
}

.chat-message {
  margin-bottom: 16px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-user {
  background: linear-gradient(135deg, var(--primary-color), #06b6d4);
  margin-left: auto;
  max-width: 80%;
}

.chat-assistant {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  margin-right: auto;
  max-width: 80%;
}

/* Theme toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: rgba(45, 212, 191, 0.1);
  border-color: var(--primary-color);
  transform: scale(1.1);
}

/* Light theme overrides */
.light-theme {
  --bg-dark: #f8fafc;
  --bg-darker: #ffffff;
  --text-light: #0f172a;
  --text-gray: #475569;
  --glass-bg: rgba(248, 250, 252, 0.8);
  --glass-border: rgba(15, 23, 42, 0.1);
}

.light-theme body {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  color: var(--text-light);
}

/* Navigation */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Project cards */
.project-card {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.1), transparent);
  transition: left 0.6s ease;
}

.project-card:hover::before {
  left: 100%;
}

/* Skills grid */
.skill-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
}

.skill-item:hover {
  background: rgba(45, 212, 191, 0.1);
  border-color: var(--primary-color);
  transform: scale(1.05);
}

/* Form styles */
.form-input {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-light);
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1);
}

.form-input::placeholder {
  color: var(--text-gray);
}

/* Button styles */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #06b6d4);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(45, 212, 191, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Loading spinner */
.spinner {
  border: 2px solid var(--glass-border);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  
  .hero-text {
    font-size: 2rem;
  }
  
  .chat-container {
    max-height: 300px;
  }
  
  .theme-toggle {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }
}