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

body {
    font-family: 'Inter', sans-serif;
    background: #0A0C10;
    color: #EFF3F8;
    line-height: 1.5;
    scroll-behavior: smooth;
    overflow-x: hidden;
    position: relative;
}

.global-violet-aura {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.floating-particle {
    position: absolute;
    background: rgba(108, 99, 255, 0.25);
    border-radius: 50%;
    filter: blur(90px);
    animation: floatParticle 22s infinite alternate ease-in-out;
    pointer-events: none;
}
.floating-particle:nth-child(1) { animation-duration: 28s; background: rgba(108, 99, 255, 0.2); }
.floating-particle:nth-child(2) { animation-duration: 32s; background: rgba(155, 77, 255, 0.18); }
.floating-particle:nth-child(3) { animation-duration: 25s; background: rgba(130, 90, 255, 0.22); }
.floating-particle:nth-child(4) { animation-duration: 35s; background: rgba(108, 99, 255, 0.15); }
.floating-particle:nth-child(5) { animation-duration: 29s; background: rgba(155, 77, 255, 0.25); }
.floating-particle:nth-child(6) { animation-duration: 40s; background: rgba(90, 70, 220, 0.2); }

@keyframes floatParticle {
    0% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    100% { transform: translate(60px, -50px) scale(1.5); opacity: 0.6; }
}

.content {
    position: relative;
    z-index: 2;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #1A1E26;
}
::-webkit-scrollbar-thumb {
    background: #6C63FF;
    border-radius: 8px;
}

.gradient-border {
    background: linear-gradient(135deg, #6C63FF, #3A2C8F);
    border-radius: 28px;
    padding: 2px;
    transition: all 0.3s;
    height: 100%;
    display: block;
}

.card-inner {
    background: #12151E;
    border-radius: 26px;
    padding: 1.8rem;
    transition: transform 0.25s ease, box-shadow 0.3s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gradient-border:hover .card-inner {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px -12px rgba(108, 99, 255, 0.45);
}

.btn-primary {
    background: linear-gradient(95deg, #6C63FF, #5849d6);
    border: none;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 8px 18px rgba(108, 99, 255, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: scale(1.02);
    background: linear-gradient(95deg, #8a7aff, #6c5be6);
    box-shadow: 0 14px 26px rgba(108, 99, 255, 0.6);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid rgba(108, 99, 255, 0.7);
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 500;
    color: #CDCFFA;
    transition: 0.2s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-outline:hover {
    border-color: #b77cff;
    background: rgba(108, 99, 255, 0.2);
    color: white;
    box-shadow: 0 0 12px rgba(108, 99, 255, 0.4);
}

.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    position: relative;
}
.hero-container {
    max-width: 1300px;
    width: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
    justify-content: center;
}

.avatar-block {
    flex-shrink: 0;
    cursor: pointer;
}
.avatar-wrapper {
    width: 280px;
    height: 280px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 25px 40px -12px rgba(108, 99, 255, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s;
    border: 1px solid rgba(108, 99, 255, 0.5);
    overflow: hidden;
    position: relative;
}
.avatar-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 30px 50px -12px rgba(155, 77, 255, 0.8);
    border-color: #b77cff;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1F2538, #0f1320);
    gap: 12px;
}
.avatar-fallback i {
    font-size: 6rem;
    color: #9b4dff;
    filter: drop-shadow(0 0 8px #6C63FF);
}
.avatar-fallback span {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(145deg, #fff, #C0B9FF);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 28px;
    background: radial-gradient(circle, rgba(155, 77, 255, 0.6), rgba(108, 99, 255, 0.2), transparent);
    pointer-events: none;
    z-index: 10;
    filter: blur(6px);
    animation: rippleExpand 0.6s ease-out forwards;
}

@keyframes rippleExpand {
    0% {
        width: 0px;
        height: 0px;
        opacity: 0.8;
    }
    100% {
        width: 420px;
        height: 420px;
        opacity: 0;
    }
}

@media (max-width: 820px) {
    @keyframes rippleExpand {
        0% { width: 0px; height: 0px; }
        100% { width: 360px; height: 360px; }
    }
}
@media (max-width: 480px) {
    @keyframes rippleExpand {
        0% { width: 0px; height: 0px; }
        100% { width: 300px; height: 300px; }
    }
}

.hero-text {
    flex: 1;
    min-width: 280px;
    text-align: left;
}
.badge-code {
    background: rgba(108, 99, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 6px 18px;
    border-radius: 60px;
    font-size: 0.85rem;
    width: fit-content;
    margin-bottom: 1.5rem;
    border: 1px solid #6C63FF;
    box-shadow: 0 0 6px rgba(108, 99, 255, 0.3);
}
h1 {
    font-size: 3.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FFFFFF, #C7B9FF);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    line-height: 1.2;
}
.highlight {
    background: linear-gradient(145deg, #B77CFF, #6C63FF);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}
.nickname {
    display: inline-block;
    background: rgba(108, 99, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 8px 20px;
    border-radius: 60px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.2rem;
    border: 1px solid rgba(155, 77, 255, 0.6);
}
.nickname i {
    margin-right: 8px;
    color: #B77CFF;
}

@media (max-width: 820px) {
    .hero-container { flex-direction: column; text-align: center; gap: 2rem; }
    .hero-text { text-align: center; }
    .badge-code { margin-left: auto; margin-right: auto; }
    h1 { font-size: 2.6rem; }
    .avatar-wrapper { width: 240px; height: 240px; }
}
@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    .avatar-wrapper { width: 200px; height: 200px; }
}

section {
    padding: 5rem 1.5rem;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-wrapper {
    position: relative;
    margin-bottom: 3rem;
}
.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: inline-block;
    position: relative;
    z-index: 2;
    background: transparent;
    padding-right: 2rem;
}
.section-line {
    position: absolute;
    bottom: 12px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #9b4dff, #6C63FF, #c084fc, #6C63FF, #9b4dff);
    border-radius: 4px;
    box-shadow: 0 0 12px #b77cff;
    z-index: 1;
}
@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
        padding-right: 1rem;
    }
    .section-line {
        bottom: 8px;
    }
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    align-items: stretch;
}
@media (min-width: 1100px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.projects-grid > div,
.hidden-projects > div {
    height: auto;
    display: flex;
}

.gradient-border {
    width: 100%;
}

.tech-tag {
    background: #1F232E;
    padding: 5px 12px;
    border-radius: 24px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #D3C9FF;
    border-left: 2px solid #6C63FF;
    display: inline-block;
    margin: 3px;
}
.project-icon {
    font-size: 2rem;
    color: #b77cff;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 4px #6C63FF);
}
.project-demo-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #C7B5FF;
    text-decoration: none;
    border-bottom: 1px dashed #b77cff;
    transition: 0.2s;
    width: fit-content;
}
.project-demo-link:hover {
    color: white;
    text-shadow: 0 0 3px #9b4dff;
}

.card-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-inner .tech-tags-container {
    margin-bottom: 1rem;
}

.skills-cloud, .hidden-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0;
    margin-bottom: 0;
}

.skill-item {
    background: #171C26;
    border-radius: 60px;
    padding: 10px 28px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #2A2F3C;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
}
.skill-item i {
    color: #b77cff;
    font-size: 1.3rem;
}
.skill-item:hover {
    transform: translateY(-4px);
    border-color: #9b4dff;
    background: #1F2330;
    box-shadow: 0 0 16px rgba(108, 99, 255, 0.3);
}

.skill-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #1E2332, #161a28);
    color: #EFF3F8;
    padding: 10px 18px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 400;
    z-index: 1000;
    border: 1px solid #6C63FF;
    box-shadow: 0 8px 25px rgba(108, 99, 255, 0.4);
    pointer-events: none;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
    max-width: 300px;
    text-align: center;
    backdrop-filter: blur(8px);
    white-space: normal;
    word-wrap: break-word;
}

/* Плавная анимация открытия/закрытия */
.expandable-content {
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 0;
}

.expandable-content-inner {
    padding-top: 2rem;
}

.hidden-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hidden-projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

@media (min-width: 1100px) {
    .hidden-projects {
        grid-template-columns: repeat(2, 1fr);
    }
}

.show-more-btn {
    display: block;
    margin: 2rem auto 0;
    padding: 12px 32px;
    background: linear-gradient(95deg, #6C63FF, #5849d6);
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 8px 18px rgba(108, 99, 255, 0.35);
    width: fit-content;
}
.show-more-btn:hover {
    transform: scale(1.02);
    background: linear-gradient(95deg, #8a7aff, #6c5be6);
    box-shadow: 0 14px 26px rgba(108, 99, 255, 0.6);
}

.section-footer {
    text-align: center;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}
.contact-card {
    background: #12151E;
    border-radius: 48px;
    padding: 0.9rem 2rem;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #EFF3F8;
    font-weight: 500;
    border: 1px solid #262C3A;
}
.contact-card i {
    font-size: 1.6rem;
    color: #b77cff;
}
.contact-card:hover {
    border-color: #b77cff;
    background: #1A1E2A;
    transform: translateY(-3px);
    box-shadow: 0 0 16px rgba(108, 99, 255, 0.3);
}

.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1E2332;
    border: 1px solid #9b4dff;
    color: #F0F3FF;
    padding: 12px 24px;
    border-radius: 60px;
    font-weight: 500;
    z-index: 9999;
    font-size: 0.9rem;
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.6);
    backdrop-filter: blur(8px);
    animation: toastFade 2s ease forwards;
}

@keyframes toastFade {
    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #2A2F45;
    color: #9B92B5;
    font-size: 0.85rem;
}

.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}
