@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #ff2a2a;
    --primary-dark: #cc0000;
    --secondary: #1a1a1a;
    --dark-bg: #050505;
    --card-bg: rgba(25, 25, 25, 0.6);
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --glass-border: rgba(255, 255, 255, 0.08);
    --gradient-primary: linear-gradient(135deg, #ff2a2a 0%, #ff0055 100%);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.7;
}

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

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

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.display-1,
.display-2,
.display-3,
.display-4 {
    font-weight: 800;
    letter-spacing: -0.04em;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar */
.navbar {
    background: rgba(5, 5, 5, 0.8) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.2rem 0;
    transition: all 0.3s ease;
}

.navbar-brand img {
    height: 70px;
    transition: height 0.3s ease;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted) !important;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    margin: 0 10px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main) !important;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.btn-nav-contact {
    background: var(--gradient-primary);
    color: white !important;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(255, 42, 42, 0.3);
}

.btn-nav-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 42, 42, 0.4);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 180px 0 100px;
    background: radial-gradient(circle at top right, rgba(255, 42, 42, 0.1), transparent 40%),
        radial-gradient(circle at bottom left, rgba(0, 85, 255, 0.05), transparent 40%);
    overflow: hidden;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Page Header (Subpages - Matches Hero Style) */
.page-header {
    position: relative;
    padding: 200px 0 100px;
    /* Increased top padding */
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, rgba(255, 42, 42, 0.1), transparent 40%),
        radial-gradient(circle at bottom left, rgba(0, 85, 255, 0.05), transparent 40%);
    overflow: hidden;
}

/* Cards & Glassmorphism */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    z-index: -1;
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 42, 42, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.glass-card i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn-custom-primary {
    background: var(--gradient-primary);
    background-size: 200% auto;
    color: #fff !important;
    padding: 10px 30px;
    /* Reduced padding */
    border-radius: 50px;
    font-weight: 600;
    border: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 42, 42, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    /* Reduced font size */
    text-decoration: none;
}

.btn-custom-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    transition: all 0.4s ease;
    z-index: -1;
}

.btn-custom-primary:hover::before {
    width: 150%;
    left: 100%;
    animation: shine 0.7s;
}

.btn-custom-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 42, 42, 0.5);
    color: #fff !important;
    background-position: right center;
}

.btn-custom-primary:active {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 42, 42, 0.4);
}

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

    100% {
        left: 200%;
    }
}

.btn-custom-outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-custom-outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
    color: #fff;
}

/* Footer */
footer {
    background: #020202;
    border-top: 1px solid var(--glass-border);
    padding-top: 80px;
}

footer h5 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 25px;
}

footer a {
    color: var(--text-muted);
    transition: 0.3s;
}

footer a:hover {
    color: var(--primary);
    transform: translateX(5px);
    display: inline-block;
    /* Required for transform */
}

/* Utilities */
.section-title {
    margin-bottom: 80px;
    text-align: center;
}

.section-title h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

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

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

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

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    .display-4 {
        font-size: 2.5rem;
    }
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out;
}

.loader {
    width: 48px;
    height: 48px;
    border: 3px solid #FFF;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

.loader::after {
    content: '';
    box-sizing: border-box;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-bottom-color: var(--primary);
    animation: rotation 0.5s linear infinite reverse;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

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

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--primary);
    transition: background-color 0.2s, transform 0.2s;
    /* Removed width/height transition, using scale */
}

/* Glassmorphism Utils */
.glass {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card {
    background: var(--card-bg);
    /* Fallback */
    background: linear-gradient(145deg, rgba(25, 25, 25, 0.9), rgba(15, 15, 15, 0.95));
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
}

/* ========================================
   ENHANCED CARD STYLES
======================================== */
.card {
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.9), rgba(10, 10, 10, 0.95));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 42, 42, 0.1);
}

.card-img-top {
    transition: transform 0.5s ease, filter 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.card-body {
    position: relative;
    z-index: 1;
}

/* ========================================
   CONTACT FORM STYLES
======================================== */
.contact-form .form-control,
.contact-form .form-select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.contact-form .form-control:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 42, 42, 0.15);
    outline: none;
}

.contact-form textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.contact-form .form-label {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* ========================================
   MOBILE NAVIGATION
======================================== */
@media (max-width: 991px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(20px);
        padding: 80px 2rem 2rem;
        z-index: 999;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .navbar-collapse.show {
        transform: translateX(0);
    }

    .navbar-nav {
        text-align: center;
        width: 100%;
    }

    .navbar-nav .nav-link {
        font-size: 1.5rem;
        padding: 1rem 0;
        margin: 0;
    }

    .navbar-toggler {
        z-index: 1001;
        border: none;
        padding: 0.5rem;
    }

    .navbar-toggler:focus {
        box-shadow: none;
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
}

/* ========================================
   BLOG & PROJECT CARDS
======================================== */
.hover-effect {
    position: relative;
    overflow: hidden;
}

.hover-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.5s ease;
}

.hover-effect:hover::after {
    left: 100%;
}

/* Stretched Link Fix */
.stretched-link::after {
    border-radius: inherit;
}

/* ========================================
   SMOOTH SCROLL BEHAVIOR
======================================== */
html {
    scroll-behavior: smooth;
}

/* ========================================
   SELECTION HIGHLIGHT
======================================== */
::selection {
    background: var(--primary);
    color: #fff;
}

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

/* ========================================
   IMAGE LAZY LOAD PLACEHOLDER
======================================== */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded,
img:not([loading="lazy"]) {
    opacity: 1;
}

/* ========================================
   FOCUS STATES (ACCESSIBILITY)
======================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ========================================
   SKELETON LOADING
======================================== */
.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   SOCIAL ICONS HOVER
======================================== */
.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    transition: all 0.3s ease;
    margin: 0 5px;
}

.social-icons a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

/* ========================================
   BACK TO TOP BUTTON
======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(255, 42, 42, 0.4);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 42, 42, 0.5);
}

/* ========================================
   ADDITIONAL RESPONSIVE FIXES
======================================== */
@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

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

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

    .glass-card {
        padding: 1.25rem;
    }

    .btn-custom-primary,
    .btn-custom-outline {
        padding: 10px 25px;
        font-size: 0.85rem;
    }

    .page-header {
        padding: 150px 0 60px;
        min-height: 40vh;
    }
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {

    .navbar,
    .back-to-top,
    #preloader,
    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }
}