/* Import Google Fonts — Space Grotesk + Orbitron (LifeSync upgrade) */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* CSS Custom Properties — Deep dark palette from LifeSync */
:root {
    --color-primary: #0a0f1a;
    --color-surface: #0d1424;
    --color-card: #151f32;
    --color-accent: #7E52A0;
    --color-accent-secondary: #BF5A8E;
    --color-text: #E5E7EB;
    --color-light: #EEF0F2;
}

/* --- Global Styles --- */
body {
    color: var(--color-text);
    background-color: var(--color-primary);
    font-family: 'Space Grotesk', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

/* Links */
a {
    color: #FFFFFF;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--color-accent);
}

/* Secondary text — Tailwind gray hierarchy */
.text-gray-300 { color: #D1D5DB; }
.text-gray-400 { color: #9CA3AF; }
.text-gray-500 { color: #6B7280; }

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

/* Form placeholders */
input::placeholder,
textarea::placeholder {
    color: #9CA3AF;
}

/* ============================================
   FANCY TEXT — Animated gradient with Orbitron
   ============================================ */
.fancy-text,
.fancy {
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(135deg, #7E52A0, #BF5A8E, #E91E8C, #7E52A0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    background-size: 300% 300%;
    animation: gradientShift 4s ease infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ============================================
   HERO SECTION — Multi-gradient background
   ============================================ */
.hero-section {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(126,82,160,0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(191,90,142,0.1), transparent),
        radial-gradient(ellipse 50% 30% at 0% 100%, rgba(126,82,160,0.08), transparent),
        linear-gradient(180deg, #0a0f1a 0%, #0d1424 100%);
}

/* ============================================
   GLASSMORPHISM CARDS
   ============================================ */
.glass-card {
    background: rgba(21, 31, 50, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(126, 82, 160, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 15px rgba(126, 82, 160, 0.05);
}

/* ============================================
   BUTTON STYLES — Gradient primary + glass secondary
   ============================================ */
.btn-primary {
    background: linear-gradient(135deg, #7E52A0, #BF5A8E);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    color: white;
    display: inline-block;
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #BF5A8E, #7E52A0);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(126, 82, 160, 0.2);
    color: white;
}
.btn-primary span { position: relative; z-index: 1; }

.btn-secondary {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
    color: white;
    display: inline-block;
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(126, 82, 160, 0.5);
    color: white;
}

/* ============================================
   CHIP / TAG STYLES
   ============================================ */
.chip {
    background: rgba(126, 82, 160, 0.15);
    border: 1px solid rgba(126, 82, 160, 0.3);
    transition: all 0.3s;
}
.chip:hover {
    background: rgba(126, 82, 160, 0.25);
    border-color: rgba(126, 82, 160, 0.5);
}

/* ============================================
   GLOW EFFECTS
   ============================================ */
.glow-accent {
    box-shadow: 0 0 15px rgba(126, 82, 160, 0.15);
}
.glow-accent:hover {
    box-shadow: 0 0 25px rgba(126, 82, 160, 0.25);
}
.glow-text {
    text-shadow: 0 0 15px rgba(126, 82, 160, 0.25);
}

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #7E52A0, #BF5A8E);
    z-index: 9998;
    transition: width 0.1s;
    width: 0;
}

/* ============================================
   ISLAMIC GEOMETRIC PATTERN BACKGROUND
   ============================================ */
.islamic-pattern-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.08;
    animation: patternPulse 8s ease-in-out infinite;
}
.islamic-pattern-bg svg {
    width: 100%;
    height: 100%;
}
.islamic-pattern-bg.interactive {
    transition: opacity 0.5s ease;
}
.islamic-pattern-bg.interactive:hover {
    opacity: 0.15;
}
@keyframes patternPulse {
    0%, 100% { opacity: 0.04; }
    50% { opacity: 0.1; }
}

/* ============================================
   CURSOR GLOW
   ============================================ */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(126,82,160,0.07) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}
body:hover .cursor-glow { opacity: 1; }

/* ============================================
   PARALLAX STARS
   ============================================ */
.parallax-stars {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
}
.star-layer-1 { animation: parallax-move 30s linear infinite; }
.star-layer-2 { animation: parallax-move 20s linear infinite; }
.star-layer-3 { animation: parallax-move 15s linear infinite; }
@keyframes parallax-move {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100vh); }
}

/* ============================================
   PARTICLE BACKGROUND
   ============================================ */
.particle-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline-line {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #7E52A0, #BF5A8E, #7E52A0);
}
.timeline-dot {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #7E52A0, #BF5A8E);
    border-radius: 50%;
    border: 3px solid #0a0f1a;
    z-index: 1;
}
.timeline-dot::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: rgba(126, 82, 160, 0.3);
    animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0; }
}

/* ============================================
   STAT COUNTER CARDS
   ============================================ */
.stat-card {
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(126,82,160,0.1), transparent 30%);
    animation: rotateBorder 4s linear infinite;
}
@keyframes rotateBorder { to { transform: rotate(360deg); } }
.stat-card-inner {
    position: relative;
    background: rgba(21, 31, 50, 0.9);
    border-radius: inherit;
    height: 100%;
    padding: 1.5rem;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #151f32, #1a2744);
    border: 1px solid rgba(126,82,160,0.3);
    color: #E5E7EB;
    padding: 16px 24px;
    border-radius: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.9);
    transition: transform 0.3s;
}
.lightbox.active .lightbox-content { transform: scale(1); }

/* ============================================
   DIVIDER
   ============================================ */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(126,82,160,0.5), transparent);
}

/* ============================================
   SKILL BARS
   ============================================ */
.skill-bar-bg {
    height: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}
.skill-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #7E52A0, #BF5A8E);
    border-radius: 5px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.skill-bar-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Skill percentages */
.skill-percentage {
    color: #7E52A0;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ============================================
   NAV ACTIVE STATE
   ============================================ */
.nav-link.active {
    background: linear-gradient(135deg, rgba(126,82,160,0.2), rgba(191,90,142,0.2));
    border-color: rgba(126,82,160,0.3);
}

/* ============================================
   CARD EFFECTS (legacy support)
   ============================================ */
.card {
    transition: all 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Project Card */
.project-card {
    position: relative;
    overflow: hidden;
}
.project-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 15, 26, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.project-card:hover .project-overlay {
    opacity: 1;
}

/* ============================================
   METRIC CARDS
   ============================================ */
.metric-card {
    background: linear-gradient(135deg, rgba(126,82,160,0.15), rgba(191,90,142,0.15));
    border: 1px solid rgba(126,82,160,0.3);
}

/* ============================================
   PORTFOLIO FILTER
   ============================================ */
.portfolio-item {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.portfolio-item.hidden-filter {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
}
.filter-btn.active {
    background: linear-gradient(135deg, #7E52A0, #BF5A8E);
    color: white;
}

/* ============================================
   ICON ANIMATIONS (legacy)
   ============================================ */
.floating-icon {
    animation: floatIcon 3s ease-in-out infinite;
}
@keyframes floatIcon {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
.pulse-icon {
    animation: pulseIcon 2s ease-in-out infinite;
}
@keyframes pulseIcon {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}
.rotate-icon {
    transition: transform 0.7s ease;
}
.rotate-icon:hover {
    transform: rotate(360deg);
}
.bounce-icon {
    transition: transform 0.3s ease;
}
.bounce-icon:hover {
    animation: bounceIcon 0.6s ease;
}
@keyframes bounceIcon {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    80% { transform: translateY(-5px); }
}
.glow-icon {
    transition: all 0.3s ease;
}
.glow-icon:hover {
    filter: drop-shadow(0 0 10px currentColor);
    transform: scale(1.1);
}

/* Icon Container */
.icon-container {
    position: relative;
    display: inline-block;
}
.icon-container::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    background: radial-gradient(circle, rgba(126, 82, 160, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    z-index: -1;
}
.icon-container:hover::after {
    width: 80px;
    height: 80px;
}

/* Text accents */
.text-accent,
.icon-container i:hover {
    color: #7E52A0;
}

/* ============================================
   MODAL STYLES
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow: auto;
}
.modal-content {
    position: relative;
    background-color: var(--color-card);
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.3s;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}
.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #FFFFFF;
    cursor: pointer;
    transition: color 0.3s;
}

/* Profile Image */
.profile-image {
    position: relative;
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--color-accent);
}

/* ============================================
   FLOAT ELEMENT
   ============================================ */
.float-element {
    animation: gentleFloat 6s ease-in-out infinite;
}
@keyframes gentleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

/* ============================================
   LIGHT THEME
   ============================================ */
body.light-theme { background: #F8FAFC; color: #1E293B; }
body.light-theme .bg-primary { background: #F8FAFC !important; }
body.light-theme .bg-surface { background: #FFFFFF !important; }
body.light-theme .glass-card { background: rgba(255,255,255,0.8) !important; border-color: rgba(0,0,0,0.1) !important; }
body.light-theme .text-text { color: #1E293B !important; }
body.light-theme .text-white\/80,
body.light-theme .text-white\/70,
body.light-theme .text-white\/60 { color: rgba(30,41,59,0.7) !important; }
body.light-theme .hero-section {
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(126,82,160,0.15), transparent),
                radial-gradient(ellipse 60% 40% at 100% 0%, rgba(191,90,142,0.1), transparent),
                linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}
body.light-theme .cursor-glow { background: radial-gradient(circle, rgba(126,82,160,0.08) 0%, transparent 70%); }
body.light-theme .toast { background: #FFFFFF; border-color: rgba(0,0,0,0.1); color: #1E293B; }
body.light-theme .scroll-progress { background: linear-gradient(90deg, #7E52A0, #BF5A8E); }
body.light-theme nav { background: rgba(255,255,255,0.6) !important; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    .cursor-glow { display: none; }
}
