/* ==========================================================================
   Modern Portfolio - Premium Design System
   ========================================================================== */

   :root {
    /* Color Palette */
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    /* Primary Gradient */
    --primary-start: #3b82f6;
    --primary-end: #8b5cf6;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing & Layout */
    --section-padding: 100px 0;
    --container-max: 1200px;
    
    /* Effects */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --shadow-sm: 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);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Layout & Utilities
   ========================================================================== */

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: var(--section-padding);
}

.dark-section {
    background-color: var(--bg-darker);
}

.text-center {
    text-align: center;
}

.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.gradient-text {
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 16px;
}

.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    border-color: white;
    background: white;
    color: var(--bg-dark);
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: var(--glass-border);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    transition: var(--transition);
}

.header.scrolled .logo img {
    height: 42px;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    text-transform: capitalize;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-start), var(--primary-end));
    transition: var(--transition);
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    overflow: hidden;
}

.hero-bg-shape {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, rgba(15, 23, 42, 0) 70%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
}

.hero-bg-shape-2 {
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    width: 100%;
}

.hero-subtitle {
    font-size: 24px;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.hero-title {
    font-size: 64px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.image-wrapper {
    padding: 0;
    border-radius: 50%;
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    aspect-ratio: 1/1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.image-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent 0%, rgba(139,92,246,0.3) 25%, transparent 50%);
    animation: rotate 10s linear infinite;
    z-index: 0;
}

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

.floating-img {
    position: relative;
    z-index: 1;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: float 6s ease-in-out infinite;
}

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

/* ==========================================================================
   About Section & Skills
   ========================================================================== */

.about-header h2 {
    font-size: 36px;
    max-width: 800px;
    margin-bottom: 60px;
    line-height: 1.4;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.skill-item {
    margin-bottom: 25px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-start), var(--primary-end));
    border-radius: 4px;
    width: 0; /* Animated via JS */
    transition: width 1.5s ease-in-out;
}

/* ==========================================================================
   Services Section
   ========================================================================== */

.section-title h2 {
    font-size: 42px;
    margin-bottom: 15px;
}

.title-underline {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-start), var(--primary-end));
    margin: 0 auto 50px;
    border-radius: 2px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    padding: 40px 30px;
    text-align: center;
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ==========================================================================
   Works Section
   ========================================================================== */

.works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.work-card {
    display: block;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.work-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.work-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.work-overlay i {
    font-size: 40px;
    color: white;
    transform: translateY(20px);
    transition: var(--transition);
}

.work-card:hover .work-img {
    transform: scale(1.05);
}

.work-card:hover .work-overlay {
    opacity: 1;
}

.work-card:hover .work-overlay i {
    transform: translateY(0);
}

.work-info {
    padding: 25px 0;
}

.work-category {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.work-title {
    font-size: 24px;
    margin-top: 5px;
    margin-bottom: 0;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */

.testimonial-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 50px;
    position: relative;
}

.quote-icon {
    font-size: 40px;
    color: var(--primary-start);
    opacity: 0.5;
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 20px;
    color: var(--text-main);
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 30px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 20px;
}

.author-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 0;
    font-size: 18px;
}

.author-info span {
    color: var(--text-muted);
    font-size: 14px;
}

/* Reviews Wrapper & Grid */
.testimonials-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: start;
    margin-top: 40px;
}

.testimonial-slider-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Slider Controls */
.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.ctrl-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.ctrl-btn:hover {
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.review-counter {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

/* Form Styling */
.review-form-container {
    padding: 30px;
}

.review-form-container h3 {
    font-size: 22px;
    margin-bottom: 5px;
}

.form-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.review-form .form-group {
    margin-bottom: 15px;
}

.review-form input,
.review-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--transition);
}

.review-form input:focus,
.review-form textarea:focus {
    outline: none;
    border-color: var(--primary-start);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.review-form textarea {
    resize: none;
}

.review-form .btn {
    width: 100%;
}

/* Initials Avatar fallback style */
.author-avatar-initials {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-sm);
    text-transform: uppercase;
}

/* Animation classes */
.slide-in-right {
    animation: slideInRight 0.4s ease forwards;
}

.slide-in-left {
    animation: slideInLeft 0.4s ease forwards;
}

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

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

/* Responsive adjustments for reviews grid */
@media (max-width: 992px) {
    .testimonials-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    padding: 80px 0 30px;
    border-top: var(--glass-border);
}

.footer-top {
    margin-bottom: 60px;
}

.footer-cta h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.footer-cta p {
    max-width: 600px;
}

.footer-socials {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 60px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(20% - 16px);
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
}

.social-link i {
    font-size: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .social-link {
        width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .d-none-mobile {
        display: none !important;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--bg-darker);
        padding: 40px 20px;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .nav-link {
        font-size: 20px;
    }
    
    .services-grid,
    .works-grid {
        grid-template-columns: 1fr;
    }
    
    .social-link {
        width: 100%;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .about-header h2,
    .footer-cta h2 {
        font-size: 28px;
    }
    
    .about-text p {
        text-align: justify;
    }
}

/* ==========================================================================
   Premium Design Enhancements
   ========================================================================== */

/* Custom Premium Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-start), var(--primary-end));
    border-radius: 5px;
    border: 2px solid var(--bg-darker);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-start);
}

/* Custom Text Selection Highlight */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: white;
}

/* Glass Card Glowing Hover Effect */
.glass-panel.hover-lift:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 20px 40px -15px rgba(139, 92, 246, 0.3);
    background: rgba(30, 41, 59, 0.85);
}

/* Ambient glow in Footer */
.footer {
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(2, 6, 23, 0) 70%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Preloader styling */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-darker);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader-content {
    text-align: center;
}

.loader-name {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 6px;
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    animation: pulseText 1.5s ease-in-out infinite alternate;
}

.loader-bar {
    width: 120px;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    margin: 0 auto;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-start), var(--primary-end));
    animation: loadingBar 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes pulseText {
    0% { opacity: 0.6; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes loadingBar {
    0% { left: -100%; }
    50% { left: 0; }
    100% { left: 100%; }
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Scroll to Top Button styling */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    color: white;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-5px);
}

/* Hero Page-Load Animations (Autoload Entrance) */
.hero-content {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
}

.hero-image {
    opacity: 0;
    transform: scale(0.9) translateY(15px);
    animation: fadeInScale 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
