
@supports (-webkit-appearance: none) {
    h1, h2, h3 {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }
}

@supports (-webkit-appearance: none) {
    .contact-item,
    .social-link {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000;
        perspective: 1000;
    }
    
    /* Optimize particle animations for Safari */
    .particle {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

@supports not (-webkit-backdrop-filter: blur(1px)) {
    .glass {
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
    }
    
    .contact-item,
    .social-link {
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
    }
}

@supports (-webkit-appearance: none) and (not (scrollbar-width: thin)) {
    /* Force Safari to use custom scrollbar */
    ::-webkit-scrollbar {
        width: 8px !important;
        height: 8px !important;
    }
    
    ::-webkit-scrollbar-track {
        background: #111111 !important;
        border-radius: 4px !important;
    }
    
    ::-webkit-scrollbar-thumb {
        background: #00d4ff !important;
        border-radius: 4px !important;
        border: 1px solid #111111 !important;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: #7c3aed !important;
    }
}

@supports (-webkit-appearance: none) {
    .header-container {
        -webkit-flex-direction: row;
        flex-direction: row;
        -webkit-justify-content: space-between;
        justify-content: space-between;
        -webkit-align-items: center;
        align-items: center;
    }
    
}

@media (hover: hover) and (-webkit-appearance: none) {
    .contact-item:hover,
    .social-link:hover {
        -webkit-transform: translateY(-2px) translateZ(0);
        transform: translateY(-2px) translateZ(0);
    }
    
    .social-link:hover {
        -webkit-transform: translateY(-4px) scale(1.05) translateZ(0);
        transform: translateY(-4px) scale(1.05) translateZ(0);
    }
}
