/* Шака */
header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 80px 0 120px;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    margin-bottom: -60px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 L0,100 Z" fill="none" stroke="white" stroke-width="2"/></svg>');
    background-size: 50px 50px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0);
    animation: scaleIn 0.8s 0.3s forwards;
}

.header-text h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s 0.4s forwards;
}

.header-text p {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 25px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s 0.5s forwards;
}

.badges {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s 0.6s forwards;
}

.badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.95rem;
    margin-right: 10px;
    margin-bottom: 10px;
    backdrop-filter: blur(5px);
    transition: transform 0.3s, background-color 0.3s;

    &:hover {
        transform: translateY(-3px);
        background-color: rgba(255, 255, 255, 0.25);
    }
}

.badge i {
    margin-right: 5px;
}

/* Основной контент */
main {
    position: relative;
    z-index: 2;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

/* Карты */
.card {
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 35px;
    margin-bottom: 30px;
    transform: translateY(50px);
    opacity: 0;
    transition: transform 0.6s, opacity 0.6s;
}

.about p {
    margin-bottom: 20px;
}

.about ul{
    padding-left: 20px;
}

.card.animated {
    transform: translateY(0);
    opacity: 1;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: var(--light);
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
    transform: scale(0.95);

    &:hover {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }
}

.skill-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.skill-name {
    font-weight: 500;
}

.skill-level {
    width: 100%;
    height: 6px;
    background-color: var(--light-gray);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.skill-level-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 3px;
    width: 0;
    transition: width 1.5s 0.3s;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.project-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--light-gray);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s, box-shadow 0.4s;
    transform: translateY(20px);
    opacity: 0;
}

.project-card.animated {
    transform: translateY(0);
    opacity: 1;

    &:hover {
        transform: translateY(-10px) !important;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    }
}

.project-image {
    height: 200px;
    background-color: var(--light-gray);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;

    &::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    }
}

.project-tags {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
    display: flex;
    gap: 8px;
}

.project-tag {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dark);
}

.project-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-info h3 {
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.project-info p {
    color: var(--gray);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.project-links {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--primary);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s, background-color 0.3s, box-shadow 0.3s;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);

    &:hover {
        background-color: var(--primary-dark);
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(99, 102, 241, 0.4);
    }
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    box-shadow: none;

    &:hover {
        background-color: var(--primary);
        color: white;
    }
}

.timeline {
    position: relative;
    padding-left: 40px;

    &::before {
        content: '';
        position: absolute;
        left: 15px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
    }
}

.timeline-item {
    position: relative;
    padding-bottom: 40px;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s, transform 0.6s;
}

.timeline-item.animated {
    opacity: 1;
    transform: translateX(0);

    &::before {
        content: '';
        position: absolute;
        left: -35px;
        top: 0;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        border: 3px solid white;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
    }
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 8px;
    font-weight: 500;
}

.timeline-title {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.timeline-desc {
    color: var(--gray);
    font-size: 0.95rem;
}

.contact-list {
    list-style: none;
}

.contact-list li {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s, transform 0.4s;
}

.contact-list li.animated {
    opacity: 1;
    transform: translateY(0);
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-text {
    flex-grow: 1;
}

.contact-text strong {
    display: block;
    margin-bottom: 3px;
    font-weight: 600;
}

.contact-text span {
    color: var(--gray);
    font-size: 0.95rem;
}

.languages {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.language-item {
    background-color: var(--light);
    padding: 15px;
    border-radius: 10px;
    flex-grow: 1;
    text-align: center;
    transition: transform 0.3s;

    &:hover {
        transform: translateY(-5px);
    }
}

.language-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.language-level {
    color: var(--gray);
    font-size: 0.9rem;
}

.stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.stat-item {
    background-color: var(--light);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s;

    &:hover {
        transform: translateY(-5px);
    }
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
    line-height: 1;
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

footer {
    background-color: var(--dark);
    color: white;
    text-align: center;
    padding: 40px 0;
    margin-top: 80px;
    position: relative;
    clip-path: polygon(0 20%, 100% 0, 100% 100%, 0% 100%);

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 L0,100 Z" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"/></svg>');
        background-size: 30px 30px;
        opacity: 0.3;
    }
}

.footer-content {
    position: relative;
    z-index: 2;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: transform 0.3s, background-color 0.3s;

    &:hover {
        transform: translateY(-5px);
        background-color: var(--primary);
    }
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.particle {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@media (max-width: 992px) {
    .grid-container {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .project-info {
        padding: 15px;
    }

    .card {
        padding: 20px;
    }

    .profile-img {
        margin: 0 auto;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    header {
        padding: 60px 0 100px;
        clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
    }

    footer {
        clip-path: polygon(0 10%, 100% 0, 100% 100%, 0% 100%);
    }
}

@media (max-width: 376px) {
    .btn {
        padding: 5px 10px;
    }
}

@media (max-width: 355px) {
    .card {
        border-radius: 0;
        padding: 10px;
    }
}