/* 
   Home Page Styles
   - Hero Section Animations
   - Orbital Tech Icons System
   - Skill Progress Animations
*/

/* =========================================
   Hero Section Animations
   ========================================= */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes float-delayed {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-slow {

    0%,
    100% {
        opacity: 0.75;
    }

    50% {
        opacity: 1;
    }
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

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

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

.animate-spin-slow {
    animation: spin-slow 8s linear infinite;
}

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

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

.text-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: shine 3s linear infinite;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* =========================================
   Orbital Tech Icons System
   ========================================= */
@keyframes orbit-float {
    0% {
        transform: rotate(0deg) translateX(250px) rotate(0deg);
    }

    100% {
        transform: rotate(360deg) translateX(250px) rotate(-360deg);
    }
}

.orbital-track {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.tech-icon-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    animation: orbit-float 50s linear infinite;
}

.tech-icon-glass {
    width: 100%;
    height: 100%;
    border-radius: 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 0 15px rgba(59, 130, 246, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-icon-glass:hover {
    transform: scale(1.2);
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3), 0 0 25px rgba(59, 130, 246, 0.4);
    z-index: 50;
}

.delay-1 {
    animation-delay: 0s;
}

.delay-2 {
    animation-delay: -6.25s;
}

.delay-3 {
    animation-delay: -12.5s;
}

.delay-4 {
    animation-delay: -18.75s;
}

.delay-5 {
    animation-delay: -25s;
}

.delay-6 {
    animation-delay: -31.25s;
}

.delay-7 {
    animation-delay: -37.5s;
}

.delay-8 {
    animation-delay: -43.75s;
}

@keyframes spin-slow-reverse {
    from {
        transform: translate(-50%, -50%) rotate(360deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

/* =========================================
   Skill Progress Animation
   ========================================= */
@keyframes skillLoad {
    from {
        width: 0;
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.skill-progress {
    box-shadow: 0 0 20px currentColor;
    animation: skillLoad 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-fill-mode: backwards;
    /* Use CSS variables for dynamic values */
    width: var(--skill-width);
    animation-delay: var(--skill-delay);
}

.skill-item {
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: translateX(4px);
}


/* =========================================
   MOBILE RESPONSIVENESS OPTIMIZATIONS
   ========================================= */

/* Hero Section Mobile Optimization */
@media (max-width: 768px) {
    /* Reduce hero padding on mobile */
    section:first-of-type {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    /* Hero title responsive sizing */
    h1[class*="text-7xl"] {
        font-size: 1.875rem !important;
        line-height: 1.2 !important;
    }

    /* Hero subtitle responsive sizing */
    p[class*="text-lg"]:not([class*="text-text-secondary"]) {
        font-size: 0.95rem !important;
        max-width: 100%;
    }

    /* Button stack on mobile */
    .flex.flex-wrap {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    /* Reduce button size on mobile */
    .flex.flex-wrap .relative {
        width: 100%;
    }

    .flex.flex-wrap .relative > div {
        width: 100%;
        justify-content: center;
    }

    /* Profile image optimization for mobile */
    .relative.lg\:hidden {
        padding: 1rem 0;
    }

    .relative.lg\:hidden .w-64 {
        width: 200px !important;
        height: 200px !important;
    }
}

/* Stats Section Mobile Optimization */
@media (max-width: 768px) {
    /* Ensure stats grid is 2 columns on mobile */
    .grid.grid-cols-2 {
        gap: 1rem;
        padding: 0 1rem;
    }

    .flex.flex-col.items-center {
        gap: 0.5rem;
    }

    /* Reduce stat numbers on mobile */
    .text-4xl.font-black {
        font-size: 1.875rem !important;
    }

    /* Stat label sizing */
    .text-xs.font-bold.uppercase {
        font-size: 0.65rem !important;
    }

    /* Icon sizing for stats */
    .h-12.w-12 {
        height: 2.5rem !important;
        width: 2.5rem !important;
    }
}

/* Skills Section Mobile Optimization */
@media (max-width: 768px) {
    /* Single column on mobile for skills */
    .grid.md\:grid-cols-2 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Reduce padding in skill cards */
    .relative.bg-surface-dark\/60 {
        padding: 1.5rem !important;
    }

    /* Skill section header */
    .text-4xl.md\:text-6xl {
        font-size: 1.875rem !important;
    }

    /* Skill badge badges */
    .flex.items-center.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Workflow Section Mobile Optimization */
@media (max-width: 768px) {
    /* Single column workflow on mobile */
    .grid.md\:grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Hide connecting line on mobile */
    .absolute.top-1/2.left-0.hidden.md\:block {
        display: none !important;
    }

    /* Workflow card spacing */
    .relative.h-full {
        padding: 1.5rem !important;
    }

    /* Reduce step number size */
    .absolute.-top-6.left-8 {
        width: 2.5rem !important;
        height: 2.5rem !important;
        font-size: 0.875rem !important;
    }

    /* Icon sizing in workflow */
    .text-5xl {
        font-size: 2rem !important;
    }
}

/* Knowledge Hub Section Mobile Optimization */
@media (max-width: 768px) {
    /* Responsive grid for vault cards */
    .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Header section responsive */
    .flex.flex-col.md\:flex-row {
        flex-direction: column !important;
        gap: 1rem;
    }

    /* Vault card padding */
    .relative.h-full.p-8 {
        padding: 1.5rem !important;
    }

    /* Vault icon sizing */
    .h-14.w-14 {
        height: 2.5rem !important;
        width: 2.5rem !important;
    }

    .h-14.w-14 .material-symbols-outlined {
        font-size: 1.5rem !important;
    }
}

/* Team Section Mobile Optimization */
@media (max-width: 768px) {
    /* Single column team grid on mobile */
    .grid.md\:grid-cols-2.lg\:grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Team member card padding */
    .group.relative.rounded-\[2rem\] {
        border-radius: 1rem !important;
    }

    /* Reduce team section padding */
    section:nth-of-type(8) {
        padding: 2rem 0 !important;
    }

    /* Team section heading */
    .text-4xl.md\:text-6xl.font-black {
        font-size: 1.5rem !important;
    }

    /* Team member image aspect ratio */
    .aspect-\[4\/5\] {
        aspect-ratio: 3/4;
    }

    /* Social links sizing on mobile */
    .h-10.w-10 {
        height: 2rem !important;
        width: 2rem !important;
    }
}

/* General Mobile Optimizations */
@media (max-width: 768px) {
    /* Reduce max-width padding */
    .mx-auto.max-w-7xl.px-6.lg\:px-8 {
        padding: 0 1rem !important;
    }

    /* Reduce section padding on mobile */
    section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Improve spacing between sections */
    section + section {
        margin-top: 0;
    }

    /* Better text wrapping on mobile */
    h1, h2, h3 {
        word-break: break-word;
        hyphens: auto;
    }

    /* Reduced animation complexity on mobile for better performance */
    .orbital-track {
        display: none !important;
    }

    /* Hide orbital tech icons on mobile for performance */
    .tech-icon-wrapper {
        display: none !important;
    }
}

/* Small Mobile Devices (320px - 480px) */
@media (max-width: 480px) {
    /* Extra small text sizes */
    h1 {
        font-size: 1.25rem !important;
    }

    h2 {
        font-size: 1.125rem !important;
    }

    h3 {
        font-size: 1rem !important;
    }

    /* Reduce all padding significantly */
    .px-6 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .p-8 {
        padding: 1rem !important;
    }

    .gap-8 {
        gap: 0.5rem !important;
    }

    /* Stats grid 2x2 on small mobile */
    .grid.grid-cols-2 {
        gap: 0.5rem !important;
    }

    /* Button text size */
    .text-sm {
        font-size: 0.75rem !important;
    }

    /* Reduce profile image further */
    .w-64 {
        width: 150px !important;
        height: 150px !important;
    }

    /* Inline block for flex items */
    .flex.items-center {
        flex-wrap: wrap;
    }
}

/* Tablet Optimization (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Two column layout for team and vault cards */
    .grid.md\:grid-cols-2.lg\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .grid.md\:grid-cols-2.lg\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Moderate padding on tablets */
    section {
        padding: 2rem 1rem !important;
    }
}

/* Landscape Mobile Optimization */
@media (max-height: 500px) and (orientation: landscape) {
    /* Reduce hero padding in landscape */
    section:first-of-type {
        padding: 1rem 0 !important;
        min-height: auto;
    }

    /* Hero title in landscape */
    h1 {
        font-size: 1.5rem !important;
        line-height: 1.2 !important;
    }

    /* Hero paragraph in landscape */
    p[class*="text-lg"] {
        font-size: 0.85rem !important;
    }
}