/* Main CSS for Shahmeer Baqai Portfolio */

:root {
  --background: hsl(26, 14%, 5%);
  --foreground: hsl(0, 0%, 100%);
  --card: hsl(26, 14%, 8%);
  --card-foreground: hsl(0, 0%, 95%);
  --primary: hsl(180, 100%, 48%);
  --primary-foreground: hsl(0, 0%, 0%);
  --secondary: hsl(26, 14%, 12%);
  --secondary-foreground: hsl(0, 0%, 100%);
  --muted: hsl(26, 14%, 10%);
  --muted-foreground: hsl(0, 0%, 70%);
  --accent: hsl(180, 100%, 48%);
  --destructive: hsl(0, 85%, 60%);
  --border: hsl(26, 14%, 15%);
  --input: hsl(26, 14%, 12%);
  --admin-dark: hsl(225, 39%, 6%);
  --main-dark: hsl(225, 23%, 11%);
  --cyber: hsl(180, 100%, 48%);
  --glass: hsla(0, 0%, 100%, 0.1);
}

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

body {
  background-color: var(--main-dark);
  color: var(--foreground);
  font-family: 'Inter', system-ui, sans-serif;
  cursor: none;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Cursor */
.custom-cursor {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid var(--cyber);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: all 0.1s ease;
  backdrop-filter: blur(2px);
}

.custom-cursor::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--cyber);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Admin Button */
.admin-btn {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 50;
  background: rgba(0, 243, 255, 0.2);
  color: var(--cyber);
  border: 1px solid var(--cyber);
  padding: 12px 16px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  cursor: pointer;
}

.admin-btn:hover {
  opacity: 1;
  background: rgba(0, 243, 255, 0.3);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 40;
  background: rgba(15, 17, 26, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  color: var(--cyber);
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--cyber);
}

.message-btn {
  background: var(--cyber);
  color: black;
  border: none;
  padding: 8px 24px;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.message-btn:hover {
  background: hsl(180, 100%, 40%);
}

/* Magnetic Hover Effect */
.magnetic-hover {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Glass Card Effect */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
}

.hero-title {
  font-size: clamp(4rem, 8vw, 9rem);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  color: white;
  animation: float 3s ease-in-out infinite;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(1.25rem, 2vw, 2rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin: 0 auto 48px;
}

.hero-badges {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.badge-text {
  color: var(--cyber);
  font-weight: 500;
  padding: 12px 24px;
}

/* Floating Elements */
.floating-element {
  position: absolute;
  border-radius: 50%;
  animation: bounce 2s infinite;
}

.floating-1 {
  top: 25%;
  left: 25%;
  width: 16px;
  height: 16px;
  background: var(--cyber);
  opacity: 0.6;
  animation: pulse 2s infinite;
}

.floating-2 {
  bottom: 33%;
  right: 25%;
  width: 24px;
  height: 24px;
  background: rgba(0, 243, 255, 0.5);
  animation: bounce 3s infinite;
}

.floating-3 {
  top: 50%;
  right: 16%;
  width: 8px;
  height: 8px;
  background: white;
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Sections */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  margin-bottom: 24px;
}

.section-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin: 0 auto;
}

/* Portfolio Section */
.portfolio-section {
  padding: 96px 0;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

.category-btn {
  padding: 12px 24px;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.category-btn.active {
  background: var(--cyber);
  color: black;
}

.category-btn:not(.active) {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.category-btn:not(.active):hover {
  background: rgba(255, 255, 255, 0.2);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.portfolio-item {
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.portfolio-item:hover {
  transform: scale(1.05);
}

.portfolio-preview {
  height: 192px;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  display: flex;
  items: center;
  justify-content: center;
  color: white;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 600;
}

.portfolio-info {
  padding: 24px;
}

.portfolio-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.portfolio-category {
  color: rgba(255, 255, 255, 0.7);
  text-transform: capitalize;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px;
}

.empty-state p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
}

/* Reviews Section */
.reviews-section {
  padding: 96px 0;
  background: rgba(255, 255, 255, 0.05);
}

.reviews-carousel {
  position: relative;
  height: 384px;
  overflow: hidden;
}

.reviews-track {
  display: flex;
  gap: 32px;
  transition: transform 1s ease-in-out;
}

.review-card {
  min-width: 320px;
  padding: 32px;
  border-radius: 12px;
  text-align: center;
  flex-shrink: 0;
}

.review-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 16px;
  object-fit: cover;
}

.review-stars {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 16px;
}

.star {
  color: #fbbf24;
  font-size: 20px;
}

.review-quote {
  font-size: 18px;
  margin-bottom: 16px;
}

.review-author {
  color: var(--cyber);
  font-weight: 600;
}

/* About Section */
.about-section {
  padding: 96px 0;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-size: 20px;
  line-height: 1.8;
}

.about-content p {
  margin-bottom: 24px;
}

.about-tagline {
  color: var(--cyber);
  font-weight: 600;
  font-size: 24px;
}

.about-signature {
  color: var(--cyber);
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: 18px;
}

/* Footer */
.footer {
  padding: 48px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer p {
  color: rgba(255, 255, 255, 0.6);
}

/* Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--main-dark);
  padding: 32px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.admin-modal {
  background: var(--admin-dark);
}

.preview-modal {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  cursor: pointer;
  position: absolute;
  top: 16px;
  right: 16px;
}

.modal-close:hover {
  color: white;
}

/* Form Styles */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  color: white;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--cyber);
}

.form-actions {
  display: flex;
  gap: 16px;
}

/* Button Styles */
.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--cyber);
  color: black;
}

.btn-primary:hover {
  background: hsl(180, 100%, 40%);
}

.btn-secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  color: white;
}

.btn-danger {
  background: var(--destructive);
  color: white;
}

.btn-danger:hover {
  background: hsl(0, 85%, 50%);
}

/* Admin Dashboard */
.admin-dashboard {
  position: fixed;
  inset: 0;
  background: var(--admin-dark);
  z-index: 50;
  overflow-y: auto;
  padding: 32px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.admin-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: white;
}

.admin-section {
  margin-bottom: 32px;
  padding: 24px;
  border-radius: 12px;
}

.admin-section h3 {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
}

/* Admin Lists */
.admin-portfolio-list,
.admin-messages-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 16px;
  border-radius: 8px;
}

.admin-item-info h4 {
  color: white;
  font-weight: 600;
}

.admin-item-info p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  text-transform: capitalize;
}

.delete-btn {
  background: var(--destructive);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}

.delete-btn:hover {
  background: hsl(0, 85%, 50%);
}

/* Message specific styles */
.message-item {
  border-left: 4px solid transparent;
}

.message-item.unread {
  border-left-color: var(--cyber);
}

.message-actions {
  display: flex;
  gap: 8px;
}

.mark-read-btn {
  background: var(--cyber);
  color: black;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.message-content {
  color: rgba(255, 255, 255, 0.9);
  margin: 8px 0;
}

.message-timestamp {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

/* Unread Badge */
.unread-badge {
  background: var(--cyber);
  color: black;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}

/* Error Message */
.error-message {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* Toast Styles */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 1000;
}

.toast {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.success {
  border-left: 4px solid #10b981;
}

.toast.error {
  border-left: 4px solid #ef4444;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.toast-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

/* Animations */
@keyframes float {
  0%, 100% { 
    transform: translateY(0px) rotateY(0deg); 
  }
  50% { 
    transform: translateY(-10px) rotateY(5deg); 
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
  50% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    gap: 16px;
  }
  
  .nav-link {
    display: none;
  }
  
  .hero-badges {
    flex-direction: column;
    align-items: center;
  }
  
  .category-filter {
    gap: 8px;
  }
  
  .category-btn {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  
  .reviews-track {
    gap: 16px;
  }
  
  .review-card {
    min-width: 280px;
  }
  
  .modal-content {
    margin: 16px;
  }
  
  .admin-dashboard {
    padding: 16px;
  }
  
  .admin-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .form-actions {
    flex-direction: column;
  }
}

/* Disable context menu on media */
video, img {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -moz-user-drag: none;
  -ms-user-drag: none;
  user-drag: none;
}

/* File preview styles */
.preview-content {
  max-height: 70vh;
  overflow: auto;
}

.preview-content video {
  width: 100%;
  max-height: 60vh;
  border-radius: 8px;
}

.preview-content iframe {
  width: 100%;
  height: 60vh;
  border: none;
  border-radius: 8px;
}

.file-download {
  text-align: center;
  padding: 32px;
}

.file-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.download-btn {
  background: var(--cyber);
  color: black;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: background 0.3s ease;
}

.download-btn:hover {
  background: hsl(180, 100%, 40%);
}