/* ===== СБРОС ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --purple-dark: #0a0014;
    --purple-mid: #1a0a2e;
    --purple-glow: #8b5cf6;
    --purple-light: #c084fc;
    --purple-bright: #e9d5ff;
    --neon: #a855f7;
    --white: #f5f0ff;
    --font-main: 'Montserrat', sans-serif;
    --font-hand: 'Caveat', cursive;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background: var(--purple-dark);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ===== ФОН ===== */
.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #0d001a 0%, #1a0a2e 40%, #0f0520 100%);
}

.works-bg {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        linear-gradient(180deg, #0a0014 0%, #12082a 50%, #0a0014 100%);
}

/* ===== ЧАСТИЦЫ ===== */
.particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: var(--purple-light);
    border-radius: 50%;
    opacity: 0;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0%   { opacity: 0; transform: translateY(0) scale(1); }
    20%  { opacity: 0.8; }
    80%  { opacity: 0.6; }
    100% { opacity: 0; transform: translateY(-120px) scale(0.3); }
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes ringPulse {
    0%, 100% { box-shadow: 0 0 15px var(--neon), 0 0 30px rgba(168,85,247,0.5); }
    50%      { box-shadow: 0 0 25px var(--neon), 0 0 50px rgba(168,85,247,0.7), 0 0 80px rgba(168,85,247,0.3); }
}

@keyframes crownBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(-5px); }
}

/* ===== КАРТОЧКА-ВИЗИТКА ===== */
.card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
}

.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    animation: fadeInUp 1s ease-out;
}

/* Аватар */
.avatar-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
}

.avatar-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 3px solid var(--neon);
    box-shadow: 0 0 15px var(--neon), 0 0 30px rgba(168, 85, 247, 0.5);
    animation: ringPulse 3s ease-in-out infinite;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--purple-light);
    position: relative;
    z-index: 1;
}

.crown {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.8rem;
    z-index: 2;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.7));
    animation: crownBounce 2s ease-in-out infinite;
}

/* Инфо */
.profile-info {
    text-align: center;
}

.name {
    font-family: var(--font-hand);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 0 20px var(--neon), 0 0 40px rgba(168, 85, 247, 0.4);
    line-height: 1.1;
}

.sparkle { font-size: 2rem; }
.bunny   { font-size: 2rem; }

.username {
    font-size: 1rem;
    color: var(--purple-light);
    margin-top: 0.3rem;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

.divider {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon), transparent);
    margin: 1rem auto;
}

/* ===== БЛОК ССЫЛОК ===== */
.links-block {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.link-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.2rem;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 30px;
    text-decoration: none;
    color: var(--purple-bright);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.link-item:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: var(--neon);
    color: var(--white);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
    transform: translateY(-2px);
}

.link-icon {
    flex-shrink: 0;
    color: var(--neon);
}

/* ===== СОЦ. РЯД ===== */
.social-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.line-left, .line-right {
    width: 80px;
    height: 1px;
}
.line-left {
    background: linear-gradient(90deg, transparent, var(--neon));
}
.line-right {
    background: linear-gradient(90deg, var(--neon), transparent);
}

.telegram-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--neon);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.telegram-btn:hover {
    background: rgba(168, 85, 247, 0.2);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.6);
    transform: scale(1.1);
}

/* ===== ЦИТАТА ===== */
.quote {
    position: absolute;
    bottom: 100px;
    left: 40px;
    display: flex;
    flex-direction: column;
    font-family: var(--font-hand);
    font-size: 1.6rem;
    color: var(--purple-light);
    opacity: 0.7;
    transform: rotate(-12deg);
    animation: fadeInUp 1.5s ease-out 0.3s both;
}

.quote .heart {
    font-size: 1.4rem;
    color: var(--neon);
}

/* ===== КНОПКА "МОИ РАБОТЫ" ===== */
.btn-works {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 2.2rem;
    margin-top: 2rem;
    border: 2px solid var(--neon);
    border-radius: 50px;
    text-decoration: none;
    color: var(--white);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
    animation: fadeInUp 1s ease-out 0.6s both;
    position: relative;
    overflow: hidden;
}

.btn-works::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn-works:hover::before {
    transform: translateX(100%);
}

.btn-works:hover {
    background: rgba(168, 85, 247, 0.15);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
}

.btn-arrow {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.btn-works:hover .btn-arrow {
    transform: translateX(5px);
}

/* ===== СТРАНИЦА РАБОТ ===== */
.works-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2.5rem;
    animation: fadeInUp 0.8s ease-out;
}

.back-btn {
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--purple-light);
    text-decoration: none;
    padding: 0.5rem 1.2rem;
    border: 1px solid rgba(192, 132, 252, 0.3);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: var(--neon);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.works-title {
    font-family: var(--font-hand);
    font-size: 2.5rem;
    color: var(--white);
    text-shadow: 0 0 15px var(--neon);
}

/* ===== ГАЛЕРЕЯ ===== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem 2.5rem 3rem;
    max-width: 1300px;
    margin: 0 auto;
}

.gallery-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    animation: fadeInUp 0.8s ease-out both;
}

.gallery-card:nth-child(1) { animation-delay: 0.1s; }
.gallery-card:nth-child(2) { animation-delay: 0.25s; }
.gallery-card:nth-child(3) { animation-delay: 0.4s; }
.gallery-card:nth-child(4) { animation-delay: 0.55s; }

.gallery-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(139, 92, 246, 0.3);
}

.card-glow {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 2px solid transparent;
    transition: border-color 0.4s ease;
    z-index: 2;
    pointer-events: none;
}

.gallery-card:hover .card-glow {
    border-color: var(--neon);
    box-shadow: inset 0 0 20px rgba(168, 85, 247, 0.2);
}

.gallery-card img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-card:hover img {
    transform: scale(1.05);
}

.card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.2rem;
    background: linear-gradient(transparent, rgba(10, 0, 20, 0.9));
    display: flex;
    align-items: center;
    gap: 0.8rem;
    z-index: 3;
}

.card-number {
    font-family: var(--font-hand);
    font-size: 1.8rem;
    color: var(--neon);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.card-name {
    font-size: 0.95rem;
    color: var(--purple-bright);
    font-weight: 500;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .name { font-size: 2.5rem; }
    .quote {
        position: relative;
        bottom: auto;
        left: auto;
        transform: rotate(0);
        margin-top: 1rem;
        align-items: center;
    }
    .avatar-wrapper { width: 140px; height: 140px; }
    .gallery { padding: 1rem; gap: 1.2rem; }
    .gallery-card img { height: 280px; }
    .works-header { padding: 1rem; flex-direction: column; gap: 0.8rem; }
    .works-title { font-size: 2rem; }
}

@media (max-width: 480px) {
    .name { font-size: 2rem; }
    .gallery { grid-template-columns: 1fr; }
    .card-container { padding: 1.5rem 1rem; }
}