/* Custom CSS for Cybersecurity Portfolio */

/* Custom Properties */
:root {
  --primary-50: #f3f1ff;
  --primary-100: #ebe5ff;
  --primary-200: #d9ceff;
  --primary-300: #bea6ff;
  --primary-400: #9f75ff;
  --primary-500: #843dff;
  --primary-600: #7916ff;
  --primary-700: #6b04fd;
  --primary-800: #5a03d4;
  --primary-900: #4b05ad;
  --primary-950: #2c0076;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b  100%);
  min-height: 100vh;
}

/* Utility Classes */
.section-padding {
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .section-padding {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .section-padding {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.container-width {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-600) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.card-gradient {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

/* Navigation */
.nav-link {
  color: #d1d5db;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  font-weight: 500;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--primary-400);
  background-color: rgba(132, 61, 255, 0.1);
}

.nav-link.active {
  color: var(--primary-400);
  background-color: rgba(132, 61, 255, 0.15);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: white;
  font-weight: 600;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px 0 rgba(132, 61, 255, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px 0 rgba(132, 61, 255, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: transparent;
  color: white;
  font-weight: 600;
  border: 2px solid var(--primary-500);
  border-radius: 0.75rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--primary-600);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px 0 rgba(132, 61, 255, 0.3);
}

/* Social Links */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: 9999px;
  background: rgba(51, 65, 85, 0.5);
  color: #9ca3af;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: rgba(132, 61, 255, 0.2);
  color: var(--primary-400);
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(132, 61, 255, 0.25);
}

/* Skills */
.skill-item {
  padding: 1rem;
  background: rgba(51, 65, 85, 0.3);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.skill-item:hover {
  background: rgba(51, 65, 85, 0.5);
  transform: translateY(-2px);
}

/* Interest Tags */
.interest-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(132, 61, 255, 0.15);
  color: var(--primary-300);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.interest-tag:hover {
  background: rgba(132, 61, 255, 0.25);
  color: var(--primary-200);
  transform: scale(1.05);
}

/* Tech Tags */
.tech-tag {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background: rgba(132, 61, 255, 0.15);
  color: var(--primary-300);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tech-tag:hover {
  background: rgba(132, 61, 255, 0.25);
  color: var(--primary-200);
}

/* Repository Cards */
.repo-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.repo-card:hover {
  border-color: rgba(132, 61, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.repo-header {
  display: flex;
  align-items: start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.repo-icon {
  padding: 0.5rem;
  background: rgba(132, 61, 255, 0.15);
  border-radius: 0.5rem;
  flex-shrink: 0;
}

.repo-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.25rem;
  transition: color 0.3s ease;
}

.repo-card:hover .repo-title {
  color: var(--primary-400);
}

.repo-description {
  color: #d1d5db;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.repo-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #9ca3af;
}

.repo-stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.repo-languages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.repo-language {
  padding: 0.25rem 0.5rem;
  background: rgba(132, 61, 255, 0.1);
  color: var(--primary-300);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.repo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(51, 65, 85, 0.3);
}

.repo-updated {
  font-size: 0.75rem;
  color: #9ca3af;
}

.repo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--primary-400);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.repo-link:hover {
  color: var(--primary-300);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

.animate-fade-in {
  animation: fadeIn 1s ease-in-out;
}

.animate-slide-up {
  animation: slideUp 0.8s ease-out;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Loading States */
.loading-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid transparent;
  border-top: 2px solid var(--primary-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Form Styles */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #d1d5db;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(51, 65, 85, 0.5);
  border: 1px solid #4b5563;
  border-radius: 0.5rem;
  color: white;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(132, 61, 255, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem 1rem;
  background: rgba(51, 65, 85, 0.5);
  border: 1px solid #4b5563;
  border-radius: 0.5rem;
  color: white;
  resize: vertical;
  transition: all 0.3s ease;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(132, 61, 255, 0.1);
}

.form-textarea::placeholder {
  color: #9ca3af;
}

/* Success/Error Messages */
.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* Responsive Design */
@media (max-width: 768px) {
  .section-padding {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  
  .repo-stats {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .repo-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Focus Styles */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .card-gradient {
    background: white !important;
    border: 1px solid #ccc !important;
  }
}

/* Dark mode support (already default) */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
  }
}
