/* ==============================================
   MODERNE VARIJABLE I OSNOVNA PODEŠAVANJA
   ============================================== */
:root {
    /* Moderna color palette */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-light: #f1f5f9;
    --border-color: #e2e8f0;
    
    /* Spacing */
    --section-padding: 100px;
    --container-padding: 20px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --shadow-modern: 0 10px 40px rgba(37, 99, 235, 0.08);
    --shadow-hover: 0 20px 60px rgba(37, 99, 235, 0.15);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset i osnove */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

/* ==============================================
   NAVIGACIJA - Moderna & Elegant
   ============================================== */
.navbar {
    position: fixed !important;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.2rem 0 !important;
    transition: all var(--transition-base);
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.navbar-scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: var(--shadow-md);
    padding: 0.8rem 0 !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform var(--transition-base);
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary) !important;
    padding: 0.5rem 1.2rem !important;
    position: relative;
    transition: color var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link:hover::after {
    width: 60%;
}

/* ==============================================
   HERO SEKCIJA - Modern & Dynamic
   ============================================== */
.hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 50%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
    padding-top: 140px !important;
    padding-bottom: 80px !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 60%;
    height: 100%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
    animation: float 15s ease-in-out infinite reverse;
}

.hero .container {
    position: relative;
    z-index: 1;
}

/* Badge styling */
.badge {
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.6rem 1.2rem !important;
    border-radius: 50px;
    font-size: 0.875rem;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light)) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Heading styling */
.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero .lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Hero Buttons */
.hero .btn {
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.btn-outline-primary {
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

/* Tech Stack */
.tech-stack {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    margin-top: 2rem;
}

.tech-icon {
    color: var(--text-light);
    transition: all var(--transition-base);
    cursor: pointer;
}

.tech-icon:hover {
    color: var(--primary-color);
    transform: translateY(-8px) scale(1.1);
}

/* Hero Image */
.hero-image-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    border: 10px solid white;
    position: relative;
    z-index: 2;
    transition: transform var(--transition-slow);
}

.hero-image:hover {
    transform: scale(1.02) rotate(2deg);
}

.hero-image-bg {
    position: absolute;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 30px;
    transform: rotate(-5deg);
    top: 20px;
    left: calc(50% - 200px);
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

/* Experience Badge */
.experience-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 3;
}

.badge-circle {
    width: 130px;
    height: 130px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border: 4px solid var(--primary-color);
    animation: float 3s ease-in-out infinite;
}

.badge-text {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.badge-subtext {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

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

/* Hero Content Animation */
.hero-content {
    animation: fadeInUp 1s ease-out;
}

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

/* ==============================================
   SECTION STYLING - Professional Layout
   ============================================== */
section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-subtitle {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    padding-left: 2rem;
}

.section-subtitle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ==============================================
   CARDS - Modern Design
   ============================================== */
.card {
    border: none !important;
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
    background: white;
}

.shadow-modern {
    box-shadow: var(--shadow-modern) !important;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover) !important;
}

.card-body {
    padding: 2rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==============================================
   PROGRESS BARS - Animated
   ============================================== */
.progress {
    height: 12px;
    border-radius: 10px;
    background: var(--bg-light);
    overflow: visible;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    position: relative;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.progress-bar::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%); }
}

/* ==============================================
   PROJECTS SECTION - Grid Layout
   ============================================== */
.projects-section {
    background: var(--bg-secondary);
    position: relative;
}

.project-card {
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem !important;
    font-weight: 600;
}

.project-card .btn {
    width: 100%;
    padding: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.project-card .btn:hover {
    transform: translateY(-2px);
}

.project-card .fa-external-link-alt {
    opacity: 0;
    transition: all var(--transition-base);
    font-size: 1rem;
}

.project-card:hover .fa-external-link-alt {
    opacity: 1;
    transform: translateX(3px) translateY(-3px);
}

.project-card .btn i {
    transition: transform var(--transition-base);
}

.project-card .btn:hover i {
    transform: translateX(5px);
}

/* ==============================================
   SERVICE BOXES - Modern & Clean
   ============================================== */
.service-box {
    background: white;
    border-radius: var(--radius-xl);
    border: 2px solid var(--border-color);
    transition: all var(--transition-base);
    height: 100%;
}

.service-box:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
}

.service-box i {
    transition: all var(--transition-base);
}

.service-box:hover i {
    transform: scale(1.15) rotate(5deg);
    color: var(--secondary-color) !important;
}

.service-box h5 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.service-box p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==============================================
   FOOTER - Modern & Professional
   ============================================== */
.footer-modern {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    position: relative;
    overflow: hidden;
}

.footer-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.footer-modern h5 {
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.footer-modern h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Footer Links */
.footer-links li a {
    opacity: 0.8;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
}

.footer-links li a:hover {
    opacity: 1;
    color: var(--accent-color) !important;
    padding-left: 8px;
}

.footer-links li a i {
    font-size: 0.7rem;
    transition: transform var(--transition-base);
}

.footer-links li a:hover i {
    transform: translateX(3px);
}

/* Contact Info */
.contact-info .footer-link {
    opacity: 0.8;
    transition: all var(--transition-base);
    word-break: break-word;
}

.contact-info .footer-link:hover {
    opacity: 1;
    color: var(--accent-color) !important;
}

/* Social Icons */
.social-icon {
    width: 45px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
}

.social-icon:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    transform: translateY(-5px) rotate(5deg);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Tech List in Footer */
.tech-list i {
    transition: all var(--transition-base);
}

.tech-list .d-flex {
    opacity: 0.8;
    transition: all var(--transition-base);
}

.tech-list .d-flex:hover {
    opacity: 1;
}

.tech-list .d-flex:hover i {
    transform: scale(1.15);
    color: var(--accent-color) !important;
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */
@media (max-width: 991.98px) {
    :root {
        --section-padding: 60px;
    }
    
    .hero {
        padding-top: 100px !important;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-image,
    .hero-image-bg {
        width: 320px;
        height: 320px;
    }

    .hero-image-bg {
        left: calc(50% - 160px);
    }

    .experience-badge {
        right: 10px;
        bottom: 10px;
    }

    .badge-circle {
        width: 100px;
        height: 100px;
    }

    .badge-text {
        font-size: 1.4rem;
    }

    .badge-subtext {
        font-size: 0.8rem;
    }
}

@media (max-width: 767.98px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero .lead {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-description {
        font-size: 1rem;
    }

    .hero-image,
    .hero-image-bg {
        width: 280px;
        height: 280px;
    }

    .hero-image-bg {
        left: calc(50% - 140px);
    }

    .footer-modern .row > div {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 2rem;
        margin-bottom: 2rem;
    }

    .footer-modern .row > div:last-child {
        border-bottom: none;
    }
}

/* ==============================================
   UTILITY CLASSES
   ============================================== */
.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

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

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Selection Styling */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading Animation (optional) */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==============================================
   SCROLL TO TOP BUTTON
   ============================================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: 999;
}

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

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

@media (max-width: 767.98px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}
