﻿/* custom.css - Optimized for Performance */

/* ===========================
   FONT DEFINITIONS
   =========================== */

/* Bootstrap Icons with font-display swap */
@font-face {
    font-family: 'bootstrap-icons';
    src: url('/assets/vendor/bootstrap-icons/font/fonts/bootstrap-icons.woff2') format('woff2'), url('../vendor/bootstrap-icons/font/fonts/bootstrap-icons.woff') format('woff');
    font-display: swap;
}

/* Inter Variable Font */
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter/inter-variable.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Global font optimization */
html {
    font-optical-sizing: auto;
    scroll-behavior: smooth;
}

/* ===========================
   CSS VARIABLES
   =========================== */

:root {
    --gigalore-primary: #1a73e8;
    --gigalore-secondary: #34a853;
    --gigalore-dark: #0f1419;
    --gigalore-light: #f8f9fa;
}

/* ===========================
   BUTTON STYLES
   =========================== */

.btn-primary {
    background-color: var(--gigalore-primary);
    border-color: var(--gigalore-primary);
}

    .btn-primary:hover {
        background-color: #1557b0;
        border-color: #1557b0;
    }

.text-primary {
    color: var(--gigalore-primary) !important;
}

/* ===========================
   NAVBAR STYLES
   =========================== */

.navbar-brand-logo {
    height: 45px;
}

@media (max-width: 991.98px) {
    .navbar-brand-logo {
        height: 35px;
    }
}

/* Navbar GPU acceleration */
.navbar-show-hide {
    transform: translateZ(0);
}

/* ===========================
   GRADIENT TEXT
   =========================== */

.gradient-text {
    background: linear-gradient(135deg, var(--gigalore-primary) 0%, var(--gigalore-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===========================
   TECH ICON STYLES
   =========================== */

.tech-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: 50%;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 8px 0 rgba(55, 125, 255, 0.10);
    transform: translateZ(0);
    backface-visibility: hidden;
}

    .tech-icon i {
        color: var(--gigalore-primary);
        font-size: 2rem;
        transition: color 0.3s;
    }

    .tech-icon:hover {
        background-color: var(--gigalore-primary);
    }

        .tech-icon:hover i {
            color: #fff;
        }

.card:hover .tech-icon {
    background-color: #377dff;
}

    .card:hover .tech-icon i {
        color: #fff;
    }

/* ===========================
   CARD STYLES
   =========================== */

.card-sm {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

    .card-sm:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    }

.card-hover-shadow {
    transition: all 0.3s ease;
}

    .card-hover-shadow:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    }

/* ===========================
   LIST STYLES
   =========================== */

.list-pointer {
    list-style: none;
    padding-left: 0;
}

.list-pointer-item {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

    .list-pointer-item:before {
        content: "▸";
        position: absolute;
        left: 0;
        color: #377dff;
    }

/* ===========================
   ICON CIRCLE STYLES
   =========================== */

.icon-circle {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translateZ(0);
}

.icon-circle-lg {
    width: 100px;
    height: 100px;
}

.bg-soft-primary {
    background-color: rgba(55, 125, 255, 0.1);
}

/* ===========================
   SVG ICON STYLES
   =========================== */

.svg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.svg-icon-sm {
    width: 1.5rem;
    height: 1.5rem;
}

.svg-icon-lg {
    width: 3rem;
    height: 3rem;
}

.svg-icon-xl {
    width: 5rem;
    height: 5rem;
}

/* ===========================
   AOS ANIMATION OPTIMIZATION
   =========================== */

.aos-init {
    will-change: transform, opacity;
}

.aos-animate {
    will-change: auto;
}

/* ===========================
   HERO SECTION OPTIMIZATION
   =========================== */

.position-absolute img,
.position-absolute svg {
    transform: translateZ(0);
}

@media (max-width: 991.98px) {
    .min-vh-lg-100 {
        min-height: auto;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .display-4 {
        font-size: 2rem;
    }
}

/* ===========================
   PERFORMANCE OPTIMIZATIONS
   =========================== */

/* Lazy load images placeholder */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Content visibility for off-screen content */
.container.content-space-2,
.container.content-space-lg-3 {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

footer {
    content-visibility: auto;
    contain-intrinsic-size: auto 400px;
}

/* Prevent layout shift from icons */
.bi::before {
    display: inline-block;
    width: 1em;
    text-align: center;
}

/* ===========================
   ACCESSIBILITY
   =========================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .aos-init,
    .aos-animate {
        will-change: auto !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* ===========================
   MOBILE OPTIMIZATIONS
   =========================== */

/* Disable hover effects on touch devices */
@media (hover: none) {
    .card-sm:hover,
    .card-hover-shadow:hover {
        transform: none;
        box-shadow: none;
    }

    .tech-icon:hover {
        background-color: #f8f9fa;
    }

        .tech-icon:hover i {
            color: var(--gigalore-primary);
        }
}
