/* Блок переменных на основе твоего CSS */
:root {
    --bg-color: #030303;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #888;
    --accent-glow: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* No scroll */
    position: relative;
}

/* --- ФОН (Градиент + Сетка из твоего стиля) --- */
.background-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, #0a0a0a 0%, #000 100%);
    z-index: -2;
}

.grid-bg {
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1;
    animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
    from { transform: translateY(0); }
    to { transform: translateY(60px); }
}

/* --- АНИМАЦИИ (из твоего CSS) --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

/* --- LAYOUT --- */
.container {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 20px;
    padding: 40px;
    height: 90vh;
}

/* --- СТИЛЬ КАРТОЧЕК (Дорогой Glassmorphism) --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

a {
    text-decoration: none;
}

/* Эффект мерцания на заголовке */
.shimmer-text {
    background: linear-gradient(90deg, #fff, #555, #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 5s infinite linear;
}

/* --- КОНКРЕТНЫЕ БЛОКИ --- */
.hero { grid-column: span 8; grid-row: span 3; }
.avatar-card { grid-column: span 4; grid-row: span 3; padding: 0; display: flex; align-items: center; justify-content: center;}
.stack-card { grid-column: span 5; grid-row: span 2; }
.devops-card { grid-column: span 7; grid-row: span 2; }

/* Аватарка */
.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    filter: grayscale(1);
    transition: 0.5s;
}
.avatar-card:hover .avatar-img { transform: scale(1.05); }

/* Типографика */
.label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 15px;
    display: block;
}

h1 {
    font-size: clamp(40px, 6vw, 80px);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -4px;
}

.stack-list {
    list-style: none;
    font-family: 'JetBrains Mono', monospace;
}

.stack-item {
    font-size: 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}
.stack-item.active { color: #fff; font-weight: bold; }
.stack-item.active::before { content: '●'; color: #fff; margin-right: 10px; font-size: 10px; }
.stack-item.dim { color: #444; font-size: 16px; }

.devops-info {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
}
.highlight { color: #fff; font-weight: bold; }

/* Ссылки (нижние кнопки) */
.links-container {
    position: absolute;
    bottom: 40px;
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    transition: 0.3s;
}

.btn:hover { background: #fff; color: #000; }

/* Staggered delays */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }


.github {grid-column: span 6; grid-row: span 3; align-items: center;}
.telegram {grid-column: span 6; grid-row: span 3; align-items: center;}

.github .label{
    margin-top: 10px;
    font-size: 1.3rem;
    font-weight: 700;
}

.telegram .label{
    margin-top: 10px;
    font-size: 1.3rem;
    font-weight: 700;
}

@media (max-width: 900px) {
    body { overflow-y: auto; }
    .container { display: flex; flex-direction: column; height: auto; padding: 20px; }
    .hero h1 { font-size: 40px; }
}

/* Общие стили для иконок-подложек */
.github::before, .telegram::before {
    content: "";
    position: absolute;
    right: -10px;
    bottom: -20px;
    width: 120px;
    height: 120px;
    background-color: #fff;
    opacity: 0.05; /* Еле заметная прозрачность */
    transition: all 0.5s ease;
    z-index: 0;
    pointer-events: none;
    transform: rotate(-15deg);
    /* Маска для иконки */
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* Иконка Github */
.github::before {
    -webkit-mask-image: url('https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/github.svg');
    mask-image: url('https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/github.svg');
}

/* Иконка Telegram */
.telegram::before {
    -webkit-mask-image: url('https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/telegram.svg');
    mask-image: url('https://cdn.jsdelivr.net/npm/simple-icons@v9/icons/telegram.svg');
    right: -20px; /* Чуть поправим позицию */
}

/* Эффект при наведении на карточку */
.card:hover::before {
    opacity: 0.15; /* Иконка становится ярче при наведении */
    transform: rotate(0deg) scale(1.1);
}

/* Убедись, что текст выше иконки */
.github .label, .telegram .label {
    position: relative;
    z-index: 1;
}