/*
Theme Name: Hariharan Portfolio
Description: A modern DevSecOps Engineer portfolio theme with AI/ML focus, multilingual support, and advanced animations
Author: Hariharan Palanisamy
Version: 2.0
Tags: portfolio, developer, devsecops, ai-ml, multilingual, rtl-ready
Text Domain: hariharan-portfolio
*/

/* Tailwind CSS Import */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&family=Fira+Code:wght@400;500&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #5025d1;
    --color-primary-dark: #3a1a9e;
    --color-secondary: #8c85ff;
    --color-accent: #00b090;
    --color-dark: #1d1e20;
    --color-light: #f2f3f6;
    --color-text: #374151;
    --color-bg: #ffffff;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --color-primary: #8c85ff;
    --color-primary-dark: #5025d1;
    --color-secondary: #5025d1;
    --color-accent: #00e6c3;
    --color-dark: #f2f3f6;
    --color-light: #1d1e20;
    --color-text: #f9fafb;
    --color-bg: #111827;
}

/* Base Body Styles - IMPORTANT: Remove opacity 0 */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    opacity: 1 !important; /* Force visibility */
    visibility: visible !important;
    transition: all 0.3s ease;
}

/* Fix for blank page issue */
.wp-site-blocks,
.site-content,
main,
.container {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Loading Screen with UAE/India Flag Animation */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #06b6d4 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-h {
    font-size: 120px;
    font-weight: 900;
    color: #00b090;
    margin-bottom: 20px;
    animation: pulse-glow 2s infinite;
}

.flag-animation {
    width: 200px;
    height: 120px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.uae-flag {
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, 
        #ff0000 0%, #ff0000 25%, 
        #ffffff 25%, #ffffff 50%, 
        #000000 50%, #000000 75%, 
        #00ad00 75%, #00ad00 100%);
    animation: wave-flag 3s ease-in-out infinite;
}

.india-flag {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        #ff9933 0%, #ff9933 33.33%, 
        #ffffff 33.33%, #ffffff 66.66%, 
        #138808 66.66%, #138808 100%);
    animation: wave-flag 3s ease-in-out infinite;
    animation-delay: 1.5s;
}

@keyframes pulse-glow {
    0%, 100% { 
        text-shadow: 0 0 20px #00b090, 0 0 40px #00b090;
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 30px #5025d1, 0 0 60px #5025d1;
        transform: scale(1.05);
    }
}

@keyframes wave-flag {
    0%, 100% { transform: perspective(300px) rotateY(0deg) rotateX(0deg); }
    25% { transform: perspective(300px) rotateY(10deg) rotateX(5deg); }
    50% { transform: perspective(300px) rotateY(0deg) rotateX(10deg); }
    75% { transform: perspective(300px) rotateY(-10deg) rotateX(5deg); }
}

/* AI Elements Background */
.ai-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.05;
}

.ai-circuit {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    animation: float-circuit 6s ease-in-out infinite;
}

.ai-circuit:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.ai-circuit:nth-child(2) { top: 20%; right: 15%; animation-delay: 2s; }
.ai-circuit:nth-child(3) { bottom: 20%; left: 20%; animation-delay: 4s; }
.ai-circuit:nth-child(4) { bottom: 15%; right: 10%; animation-delay: 1s; }

@keyframes float-circuit {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.7; }
}

/* Neural Network Animation */
.neural-network {
    position: absolute;
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
}

.neural-node {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: neural-pulse 2s ease-in-out infinite;
}

.neural-connection {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    animation: data-flow 3s linear infinite;
}

@keyframes neural-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 1; }
}

@keyframes data-flow {
    0% { opacity: 0; transform: scaleX(0); }
    50% { opacity: 1; transform: scaleX(1); }
    100% { opacity: 0; transform: scaleX(0); }
}

/* Navigation Styles */
.main-navigation {

    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

[data-theme="dark"] .main-navigation {
    background: rgba(17, 24, 39, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
}

/* Hero Section Enhancement */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-accent) 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    opacity: 1 !important;
    visibility: visible !important;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    opacity: 1 !important;
    visibility: visible !important;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 1rem;
    animation: slideInUp 1s ease-out;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    margin-bottom: 1.5rem;
    animation: slideInUp 1s ease-out 0.2s both;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
    animation: slideInUp 1s ease-out 0.4s both;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.7;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.3);
    animation: float 6s ease-in-out infinite;
}

.floating-icon:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.floating-icon:nth-child(2) { top: 30%; right: 15%; animation-delay: 1s; }
.floating-icon:nth-child(3) { bottom: 30%; left: 20%; animation-delay: 2s; }
.floating-icon:nth-child(4) { bottom: 20%; right: 10%; animation-delay: 3s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(120deg); }
    66% { transform: translateY(15px) rotate(240deg); }
}

/* Animation Classes */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Utility Classes for Animations */
.animate-slide-up {
    animation: slideInUp 0.8s ease-out forwards;
}

.animate-slide-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.8s ease-out forwards;
}

/* Section Styles */
.section {
    padding: 5rem 0;
    position: relative;
    opacity: 1 !important;
    visibility: visible !important;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--color-text);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 2px;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .theme-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        top: 80px;
        right: 15px;
    }
    
    .loading-h {
        font-size: 80px;
    }
    
    .flag-animation {
        width: 150px;
        height: 90px;
    }
}

/* Ensure all content is visible */
.fade-in,
.slide-up,
.slide-in-left,
.slide-in-right,
.scale-in,
.rotate-in {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Override any hidden elements */
[style*="opacity: 0"] {
    opacity: 1 !important;
}

[style*="visibility: hidden"] {
    visibility: visible !important;
}

/* Skills Page Enhanced Styling - Dark/Light Mode Support */
/* Skills Page Enhanced Styling - Working Version */
.skills-content {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.skills-content h1 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 4rem;
  text-align: center;
  background: linear-gradient(135deg, #5025d1, #8c85ff, #00b090);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .skills-content h1 {
  background: linear-gradient(135deg, #a78bfa, #c4b5fd, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 2rem;
}

@media (min-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem;
  }
}

.skill-category {
  background-color: white;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid #f3f4f6;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .skill-category {
  background-color: #1f2937;
  border-color: #374151;
}

.skill-category:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  border-color: #5025d1;
}

[data-theme="dark"] .skill-category:hover {
  border-color: #a78bfa;
}

.skill-category h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #5025d1;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

[data-theme="dark"] .skill-category h2 {
  color: #a78bfa;
}

.skill-category h2 i {
  font-size: 1.875rem;
  padding: 0.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #5025d1, #8c85ff);
  color: white;
}

[data-theme="dark"] .skill-category h2 i {
  background: linear-gradient(135deg, #a78bfa, #c4b5fd);
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-item {
  position: relative;
}

.skill-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #374151;
}

[data-theme="dark"] .skill-name {
  color: #d1d5db;
}

.skill-name i {
  width: 1.25rem;
  text-align: center;
  margin-right: 0.5rem;
  transition: all 0.3s ease;
}

.skill-item:hover .skill-name i {
  transform: scale(1.1);
}

.skill-bar {
  position: relative;
  height: 0.75rem;
  border-radius: 9999px;
  overflow: hidden;
  background: #e5e7eb;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .skill-bar {
  background: #4b5563;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.skill-progress {
  height: 100%;
  border-radius: 9999px;
  position: relative;
  overflow: hidden;
  width: 0%;
  background: linear-gradient(135deg, #5025d1, #8c85ff, #00b090);
  box-shadow: 0 2px 4px rgba(80, 37, 209, 0.3);
  transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .skill-progress {
  background: linear-gradient(135deg, #a78bfa, #c4b5fd, #34d399);
  box-shadow: 0 2px 4px rgba(167, 139, 250, 0.3);
}

/* Shimmer effect */
.skill-progress::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.4), 
    transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Percentage display */
.skill-name::after {
  content: attr(data-percentage) '%';
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #5025d1, #8c85ff);
  color: white;
  min-width: 2.75rem;
  text-align: center;
}

[data-theme="dark"] .skill-name::after {
  background: linear-gradient(135deg, #a78bfa, #c4b5fd);
}

/* Skill percentages */
.skill-progress[data-percentage="95"] { --target-width: 95%; }
.skill-progress[data-percentage="92"] { --target-width: 92%; }
.skill-progress[data-percentage="90"] { --target-width: 90%; }
.skill-progress[data-percentage="88"] { --target-width: 88%; }
.skill-progress[data-percentage="87"] { --target-width: 87%; }
.skill-progress[data-percentage="85"] { --target-width: 85%; }
.skill-progress[data-percentage="83"] { --target-width: 83%; }
.skill-progress[data-percentage="82"] { --target-width: 82%; }
.skill-progress[data-percentage="80"] { --target-width: 80%; }
.skill-progress[data-percentage="78"] { --target-width: 78%; }
.skill-progress[data-percentage="76"] { --target-width: 76%; }
.skill-progress[data-percentage="75"] { --target-width: 75%; }
.skill-progress[data-percentage="70"] { --target-width: 70%; }
.skill-progress[data-percentage="68"] { --target-width: 68%; }
.skill-progress[data-percentage="65"] { --target-width: 65%; }

/* Animation trigger */
.skill-progress.animate {
  width: var(--target-width);
}

/* Dark mode icon colors */
[data-theme="dark"] .text-red-600 { color: #fca5a5 !important; }
[data-theme="dark"] .text-blue-600 { color: #93c5fd !important; }
[data-theme="dark"] .text-yellow-400 { color: #fbbf24 !important; }
[data-theme="dark"] .text-green-600 { color: #86efac !important; }
[data-theme="dark"] .text-purple-600 { color: #c4b5fd !important; }
[data-theme="dark"] .text-indigo-600 { color: #a5b4fc !important; }
[data-theme="dark"] .text-cyan-600 { color: #67e8f9 !important; }
[data-theme="dark"] .text-pink-600 { color: #f9a8d4 !important; }
[data-theme="dark"] .text-orange-600 { color: #fdba74 !important; }

/* Responsive adjustments */
@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  
  .skill-category {
    padding: 1.5rem;
  }
}

@media (max-width: 640px) {
  .skills-content {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  
  .skills-content h1 {
    font-size: 1.875rem;
    margin-bottom: 3rem;
  }
  
  .skill-category {
    padding: 1rem;
  }
  
  .skill-category h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
  }
  
  .skill-name {
    font-size: 1rem;
  }
}

