* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #0a0a0a;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Анимированный фон */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #533483 75%, #e94560 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Золотые акценты */
:root {
    --gold: #FFD700;
    --dark-gold: #FFA500;
    --light-gold: #FFED4E;
}

header {
    text-align: center;
    padding: 80px 20px 40px;
    position: relative;
}

.header-content {
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: 3.5em;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--light-gold) 50%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    animation: shimmer 3s ease-in-out infinite;
    font-weight: 900;
    letter-spacing: 2px;
}

@keyframes shimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.subtitle {
    font-size: 1.3em;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    font-weight: 300;
    letter-spacing: 1px;
}

.intro-section {
    max-width: 800px;
    margin: 0 auto 50px;
    padding: 0 20px;
}

.intro-text {
    text-align: center;
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 35px;
    margin-top: 40px;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--gold);
    font-size: 1.5em;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.project-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    position: relative;
    border: 2px solid transparent;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, var(--gold), var(--dark-gold), var(--light-gold));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 60px rgba(255, 215, 0, 0.4);
}

.project-card:hover::before {
    opacity: 1;
}

.project-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 100%);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.15);
}

.project-content {
    padding: 30px;
    background: white;
}

.project-content h3 {
    font-size: 1.6em;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--dark-gold) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.project-content p {
    color: #555;
    margin-bottom: 25px;
    font-size: 1.05em;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    background: linear-gradient(135deg, var(--gold) 0%, var(--dark-gold) 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
}

.project-link {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--dark-gold) 100%);
    color: #000;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    position: relative;
    overflow: hidden;
}

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

.project-link:hover::before {
    left: 100%;
}

.project-link:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.6);
}

.no-projects, .error {
    text-align: center;
    padding: 80px 20px;
    color: white;
    font-size: 1.4em;
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--gold);
    font-weight: 600;
    font-size: 1.1em;
}

/* Адаптивность */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2.2em;
    }
    
    .subtitle {
        font-size: 1.1em;
    }
    
    .intro-text {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .project-card {
        border-radius: 15px;
    }
}
