/* ==========================================================================
   Professional Portfolio CSS
   Author: John Evans Okyere
   Description: Main stylesheet with modern, professional styling
   ========================================================================== */

/* ==========================================================================
   CSS Variables & Custom Properties
   ========================================================================== */
:root {
  /* Colors */
  --color-primary-50: #f0f9ff;
  --color-primary-100: #e0f2fe;
  --color-primary-200: #bae6fd;
  --color-primary-300: #7dd3fc;
  --color-primary-400: #38bdf8;
  --color-primary-500: #0ea5e9;
  --color-primary-600: #0284c7;
  --color-primary-700: #0369a1;
  --color-primary-800: #075985;
  --color-primary-900: #0c4a6e;
  
  --color-secondary-50: #fdf4ff;
  --color-secondary-100: #fae8ff;
  --color-secondary-200: #f5d0fe;
  --color-secondary-300: #f0abfc;
  --color-secondary-400: #e879f9;
  --color-secondary-500: #d946ef;
  --color-secondary-600: #c026d3;
  --color-secondary-700: #a21caf;
  --color-secondary-800: #86198f;
  --color-secondary-900: #701a75;
  
  --color-accent-50: #ecfdf5;
  --color-accent-100: #d1fae5;
  --color-accent-200: #a7f3d0;
  --color-accent-300: #6ee7b7;
  --color-accent-400: #34d399;
  --color-accent-500: #10b981;
  --color-accent-600: #059669;
  --color-accent-700: #047857;
  --color-accent-800: #065f46;
  --color-accent-900: #064e3b;
  
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  
  /* Typography */
  --font-family-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Spacing */
  --section-padding: 6rem 0;
  --container-padding: 1.5rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary-600) 0%, var(--color-secondary-600) 100%);
  --gradient-accent: linear-gradient(135deg, var(--color-accent-500) 0%, var(--color-primary-500) 100%);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  --gradient-contact: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  
  /* Border Radius */
  --border-radius-sm: 0.375rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;
  --border-radius-2xl: 1.5rem;
  --border-radius-3xl: 2rem;
  
  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-medium: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
  
  /* Z-Index Scale */
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-modal-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-popover: 1060;
  --z-index-tooltip: 1070;
  --z-index-toast: 1080;
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family-primary);
  line-height: 1.6;
  color: var(--color-gray-800);
  background-color: var(--color-gray-50);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ==========================================================================
   Preloader
   ========================================================================== */
#preloader {
  background: linear-gradient(135deg, var(--color-primary-600), var(--color-secondary-600));
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   Navigation Styles
   ========================================================================== */
#navbar {

  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transform: translateY(0);
  transition: all var(--transition-medium);
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

#navbar.hidden {
  transform: translateY(-100%);
}

.logo-container a {
  font-weight: 800;
  font-size: 1.5rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--color-gray-700);
  text-decoration: none;
  padding: 0.5rem 0;
  transition: all var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-medium);
}

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

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--gradient-primary);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius-lg);
  font-weight: 600;
  transition: all var(--transition-medium);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

/* Mobile Menu */
.glass-effect {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-link-mobile {
  color: var(--color-gray-700);
  font-weight: 500;
  padding: 0.75rem 0;
  text-decoration: none;
  transition: all var(--transition-fast);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-link-mobile:hover {
  color: var(--color-primary-600);
  padding-left: 1rem;
}

.btn-primary-mobile {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--gradient-primary);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius-lg);
  font-weight: 600;
  margin-top: 1rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--gradient-hero);

  padding-top: 9rem; /* adjust as needed */
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 50%);
  animation: float 6s ease-in-out infinite;
}

.profile-image-container {
  position: relative;
  margin: 0 auto 3rem auto;
  margin: 2rem auto 3rem auto; /* add top margin */
  width: 180px;
  height: 180px;
}

.profile-image {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2), var(--shadow-2xl);
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-placeholder {
  display: none;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.profile-ring {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 2rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
}

.typing-animation::after {
  content: '|';
  display: inline-block;
  animation: blink 1s infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero-description {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.9);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  sm:flex-direction: row;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.btn-hero-primary,
.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  padding: 1rem 2rem;
  border-radius: var(--border-radius-xl);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-medium);
  min-width: 200px;
  justify-content: center;
}

.btn-hero-primary {
  background: white;
  color: var(--color-primary-600);
  box-shadow: var(--shadow-lg);
}

.btn-hero-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2xl);
  background: var(--color-gray-50);
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
}

.hero-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  text-decoration: none;
  border-radius: 50%;
  transition: all var(--transition-medium);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px) scale(1.05);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
}

.scroll-mouse {
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 15px;
  margin: 0 auto 8px;
  position: relative;
}

.scroll-wheel {
  width: 3px;
  height: 8px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 2s infinite;
}

.scroll-text {
  font-size: 0.875rem;
  font-weight: 500;
}

@keyframes scroll {
  0% { top: 8px; opacity: 1; }
  50% { top: 20px; opacity: 0.5; }
  100% { top: 8px; opacity: 1; }
}

/* ==========================================================================
   Section Styles
   ========================================================================== */
.section-padding {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-gray-800);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-divider {
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  margin: 0 auto 1.5rem auto;
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--color-gray-600);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-content {
  background: var(--color-gray-50);
  padding: 2.5rem;
  border-radius: var(--border-radius-2xl);
  box-shadow: var(--shadow-md);
}

.about-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-gray-800);
  margin-bottom: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-text {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--color-gray-700);
  margin-bottom: 1.5rem;
}

.about-highlights {
  margin: 2rem 0;
}

.highlight-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: white;
  border-radius: var(--border-radius-lg);
  transition: all var(--transition-medium);
  box-shadow: var(--shadow-sm);
}

.highlight-item:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
}

.highlight-item i {
  font-size: 1.25rem;
  margin-right: 1rem;
  width: 24px;
  text-align: center;
}

.highlight-item span {
  font-weight: 500;
  color: var(--color-gray-700);
}

.about-cta {
  margin-top: 2rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 1.75rem;
  background: white;
  color: var(--color-primary-600);
  text-decoration: none;
  border-radius: var(--border-radius-lg);
  font-weight: 600;
  border: 2px solid var(--color-primary-200);
  transition: all var(--transition-medium);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--color-primary-50);
  border-color: var(--color-primary-300);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Stats Container */
.stats-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.stat-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius-2xl);
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-gray-100);
  transition: all var(--transition-medium);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-primary-200);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-gray-800);
  margin-bottom: 0.25rem;
}

.stat-description {
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: white;
  padding: 2.5rem;
  border-radius: var(--border-radius-2xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-gray-100);
  transition: all var(--transition-medium);
}

.skill-category:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-primary-200);
}

.skill-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: var(--border-radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  box-shadow: var(--shadow-lg);
}

.skill-icon i {
  font-size: 2rem;
  color: white;
}

.skill-category-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gray-800);
  text-align: center;
  margin-bottom: 2rem;
}

.skill-items {
  space-y: 1.5rem;
}

.skill-item {
  margin-bottom: 1.5rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.skill-name {
  font-weight: 600;
  color: var(--color-gray-700);
}

.skill-percentage {
  font-weight: 600;
  color: var(--color-primary-600);
  font-family: var(--font-family-mono);
}

.skill-bar {
  height: 8px;
  background: var(--color-gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  width: 0;
  transition: width 1.5s ease-in-out;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-tag {
  background: var(--color-gray-100);
  color: var(--color-gray-700);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-medium);
  border: 1px solid transparent;
}

.skill-tag:hover {
  background: var(--gradient-primary);
  color: white;
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --section-padding: 4rem 0;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .section-title {
    font-size: 2.25rem;
  }
  
  .stats-container {
    grid-template-columns: 1fr;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .skill-category {
    padding: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .about-content {
    padding: 2rem;
  }
  
  .skill-category {
    padding: 1.5rem;
  }
}