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

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    overflow: hidden;
    background-color: #a1a1a1;
    height: 100vh;
    width: 100%;
}

.bio-screen {
    width: 100%;
    height: 100vh;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #a1a1a1;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

.bio-content {
    position: relative;
    z-index: 2;
    padding: 1.5rem 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Анимации для элементов */
.page-title h1,
.page-title p,
.bio-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.bio-screen.loaded .page-title h1 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.bio-screen.loaded .page-title p {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.bio-screen.loaded .bio-card {
    opacity: 1;
    transform: translateY(0);
}

/* Задержки для каждой карточки */
.bio-card:nth-child(1) { transition-delay: 0.05s; }
.bio-card:nth-child(2) { transition-delay: 0.1s; }
.bio-card:nth-child(3) { transition-delay: 0.15s; }
.bio-card:nth-child(4) { transition-delay: 0.2s; }
.bio-card:nth-child(5) { transition-delay: 0.25s; }
.bio-card:nth-child(6) { transition-delay: 0.3s; }
.bio-card:nth-child(7) { transition-delay: 0.35s; }
.bio-card:nth-child(8) { transition-delay: 0.4s; }
.bio-card:nth-child(9) { transition-delay: 0.45s; }
.bio-card:nth-child(10) { transition-delay: 0.5s; }
.bio-card:nth-child(11) { transition-delay: 0.55s; }

.page-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.page-title h1 {
    font-size: 2.5rem;
    color: white;
    text-shadow: 2px 2px 12px rgba(0,0,0,0.7);
    letter-spacing: 1px;
}

.page-title p {
    font-size: 1rem;
    color: #f0f0f0;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
    background: rgba(0,0,0,0.35);
    display: inline-block;
    padding: 0.2rem 1.2rem;
    border-radius: 40px;
    backdrop-filter: blur(4px);
    margin-top: 0.3rem;
}

/* Сетка карточек — более компактная */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2rem;
    justify-items: center;
    align-items: start;
    margin-top: 0.5rem;
}

/* Стиль карточки — уменьшенный */
.bio-card {
    background: rgba(15, 20, 30, 0.75);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 1rem;
    width: 100%;
    max-width: 220px;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1), box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    border: 1px solid rgba(255, 215, 150, 0.5);
    box-shadow: 0 15px 25px -8px rgba(0, 0, 0, 0.4);
}

.bio-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.6);
    background: rgba(30, 35, 50, 0.9);
    border-color: rgba(255, 200, 100, 0.9);
}

/* Картинка — квадратная, уменьшенная */
.bio-card-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 16px;
    border: 2px solid #ffd966;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    background-color: #e9eef3;
    transition: transform 0.3s ease;
}

.bio-card:hover .bio-card-img {
    transform: scale(1.03);
}

.bio-card-caption {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffefc0;
    letter-spacing: -0.2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.bio-card-desc {
    font-size: 0.7rem;
    color: #cbd5e1;
    font-weight: 500;
}

/* Кнопка назад */
.back-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 30;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    padding: 8px 18px;
    border-radius: 50px;
    color: #ffecb3;
    font-size: 12px;
    font-weight: 500;
    font-family: monospace;
    text-decoration: none;
    border: 1px solid rgba(255,215,0,0.5);
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.back-button:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: translateX(-3px);
    color: #ffdf99;
}

/* Скроллбар */
.bio-screen::-webkit-scrollbar {
    width: 4px;
}
.bio-screen::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}
.bio-screen::-webkit-scrollbar-thumb {
    background: #ffd966;
    border-radius: 10px;
}

/* Адаптив */
@media (max-width: 768px) {
    .bio-content {
        padding: 1rem;
    }
    .cards-grid {
        gap: 1rem;
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }
    .bio-card {
        padding: 0.8rem;
        max-width: 190px;
    }
    .bio-card-img {
        width: 100px;
        height: 100px;
    }
    .bio-card-caption {
        font-size: 1rem;
    }
    .bio-card-desc {
        font-size: 0.65rem;
    }
    .page-title h1 {
        font-size: 2rem;
    }
    .page-title p {
        font-size: 0.85rem;
    }
}

@media (max-width: 550px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.8rem;
    }
    .bio-card {
        padding: 0.7rem;
        max-width: 170px;
    }
    .bio-card-img {
        width: 85px;
        height: 85px;
    }
    .bio-card-caption {
        font-size: 0.9rem;
    }
    .bio-card-desc {
        font-size: 0.6rem;
    }
}

@media (max-width: 400px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.7rem;
    }
    .bio-card {
        padding: 0.6rem;
        max-width: 150px;
    }
    .bio-card-img {
        width: 75px;
        height: 75px;
    }
    .bio-card-caption {
        font-size: 0.8rem;
    }
}