:root {
    --bg-color: #0d0d0d;
    --card-bg: #ffffff;
    --card-text: #000000;
    --text-main: #ffffff;
    --text-muted: #777777;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
    outline: none;
}

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 50% 0%, #1a1a1a 0%, #0d0d0d 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 15px; /* Минимальные отступы для мобильных */
}

.container {
    width: 100%;
    max-width: 450px; /* По умолчанию мобильная ширина */
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* --- СЕКЦИЯ ПРОФИЛЯ --- */
.profile-section {
    text-align: center;
}

.profile-info h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.profile-info .tagline {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.photo-wrapper {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 9 / 16;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stats-container {
    display: grid;
    /* На мобилках: 3 колонки. Если параметров будет 6, получится 2 ряда по 3 */
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px 15px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center; /* Центрируем текст внутри ячейки */
    gap: 5px;
}

.stat-label {
    font-size: 10px; /* Чуть меньше для экономии места */
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    white-space: nowrap;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
}

/* --- СЕКЦИЯ ССЫЛОК --- */
.content-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.links-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.link-card {
    background: var(--card-bg);
    color: var(--card-text);
    padding: 20px;
    border-radius: 18px;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.link-card svg { width: 20px; height: 20px; }

.link-card:hover {
    transform: translateY(-2px);
    background: #f2f2f2;
}

/* --- ФУТЕР --- */
.footer {
    margin-top: 50px;
    text-align: center;
    padding-bottom: 20px;
}

.footer p {
    font-size: 0.75rem;
    color: #444; /* Очень тусклый текст для копирайта */
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dev-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    /* Делаем похожей на кнопку, но прозрачной */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #777; /* Неяркий цвет текста */

    padding: 12px 20px;
    border-radius: 14px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%; /* На мобилках на всю ширину */
    max-width: 320px;
    line-height: 1.2;
}

.dev-card svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.dev-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: #0088cc;
    color: #0088cc;
}

.dev-card:hover svg {
    opacity: 1;
}

/* --- ДЕСКТОП ВЕРСИЯ (2 колонки) --- */
@media (min-width: 850px) {
    .container {
        max-width: 1200px;
        display: grid;
        grid-template-columns: 1fr 1fr; /* Две равные колонки */
        align-items: start;
        gap: 60px;
        background: rgba(255, 255, 255, 0.02);
        padding: 50px;
        border-radius: 40px;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .profile-section {
        text-align: left; /* Ник слева */
    }

    .photo-wrapper {
        margin: 0; /* Убираем центрирование фото */
        max-width: 100%; /* Фото занимает всю ширину своей колонки */
    }

    .profile-info .tagline {
        margin-bottom: 30px;
    }

    .stats-container {
        /* На широком экране выстраиваем всё в один ряд, если параметров до 6 */
        grid-template-columns: repeat(auto-fit, minmax(auto, 1fr));
        background: transparent;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
        padding: 0 0 25px 0;
        margin-bottom: 40px;
        gap: 20px;
    }

    .stat-item {
        align-items: flex-start; /* На десктопе выравниваем по левому краю */
    }

    .content-section {
        height: 100%;
        justify-content: space-between; /* Ссылки сверху, футер снизу */
        padding-top: 85px; /* Выравнивание по уровню начала фото */
    }

    .footer {
        text-align: left;
        margin-top: auto;
    }

    .dev-card {
        width: auto; /* На десктопе кнопка по контенту */
        max-width: 100%;
    }
}