:root {
    --primary-color: #ffffff;
    --accent-color: #808080;
    --progress-color: #a0a0a0;
    --background-overlay: rgba(0, 0, 0, 0.8);
    --card-background: rgba(255, 255, 255, 0.1);
    --hover-background: rgba(255, 255, 255, 0.2);
}

body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    background: #000000 url("../assets/background.jpg") center/cover fixed;
    color: var(--primary-color);
    margin: 0;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    background: var(--background-overlay);
    padding: 20px 0;
    backdrop-filter: blur(5px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

header a:hover {
    background: var(--hover-background);
}

/* Section Styles */
section {
    background: var(--background-overlay);
    border-radius: 10px;
    padding: 40px;
    margin: 30px 0;
    backdrop-filter: blur(5px);
}

/* Button Styles */
.button {
    display: inline-block;
    padding: 12px 24px;
    background: var(--accent-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.button:hover {
    background: var(--primary-color);
    color: #000000;
    transform: translateY(-2px);
}

.button.primary {
    background: #4a90e2;
}

.button.secondary {
    background: var(--accent-color);
}

/* Card Styles */
.service-card, .project-card, .domain-card {
    background: var(--card-background);
    border-radius: 8px;
    padding: 25px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.service-card:hover, .project-card:hover, .domain-card:hover {
    transform: translateY(-5px);
    background: var(--hover-background);
}

/* Progress Bar */
.progress-bar {
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: var(--progress-color);
    transition: width 0.3s ease;
}

/* Skills */
.skill-tag {
    background: var(--card-background);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    margin: 5px;
    display: inline-block;
}

/* Contact Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a90e2;
    background: rgba(255, 255, 255, 0.2);
}

/* Footer */
footer {
    background: var(--background-overlay);
    padding: 40px 20px;
    margin-top: 50px;
    backdrop-filter: blur(5px);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.social-icon {
    color: var(--primary-color);
    font-size: 1.5em;
    margin: 0 10px;
    transition: color 0.3s;
}

.social-icon:hover {
    color: #4a90e2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container { 
        padding: 10px;
    }
    
    section {
        padding: 20px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content > * {
        margin: 10px 0;
    }
}

/* Grid Layouts */
.services-grid, .projects-grid, .domains-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Profile Image */
.profile-image img {
    max-width: 200px;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #4a90e2;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Project Filters */
.project-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-button {
    padding: 8px 16px;
    background: var(--card-background);
    border: none;
    color: var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-button:hover,
.filter-button.active {
    background: var(--hover-background);
    transform: translateY(-2px);
}

/* Service Icons */
.service-icon {
    font-size: 2em;
    margin-bottom: 15px;
    color: #4a90e2;
}

/* Domain Links */
.domain-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.domain-link {
    padding: 8px 16px;
    background: var(--card-background);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.domain-link:hover {
    background: var(--hover-background);
    transform: translateY(-2px);
}

/* Optimized Image Loading */
.image-placeholder {
    background: var(--card-background);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modern Image Loading */
picture {
    display: block;
    position: relative;
}

picture img {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

picture.loading img {
    opacity: 0;
    transform: scale(0.9);
}

picture.loaded img {
    opacity: 1;
    transform: scale(1);
}

/* Background Loading */
.bg-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.bg-wrapper.loaded {
    opacity: 1;
}

/* WebP Background Support with Fast Loading */
@supports (background-image: -webkit-image-set(url("test.webp") 1x)) {
    .bg-wrapper {
        background-image: -webkit-image-set(
            url('../assets/background.webp') 1x
        );
        background-position: center;
        background-size: cover;
        background-attachment: fixed;
    }
}

@supports (background-image: image-set(url("test.webp") 1x)) {
    .bg-wrapper {
        background-image: image-set(
            url('../assets/background.webp') 1x
        );
        background-position: center;
        background-size: cover;
        background-attachment: fixed;
    }
}

/* Blur-up Loading Effect */
.blur-load {
    background-size: cover;
    background-position: center;
    position: relative;
}

.blur-load::before {
    content: '';
    position: absolute;
    inset: 0;
    animation: pulse 2.5s infinite;
}

@keyframes pulse {
    0% { background-color: rgba(255, 255, 255, 0.02); }
    50% { background-color: rgba(255, 255, 255, 0.1); }
    100% { background-color: rgba(255, 255, 255, 0.02); }
}
