:root {
    --bg: #050817;
    --card-start: #121836;
    --card-end: #12162b;
    --accent: #a762ff;
    --accent-strong: #7c4dff;
    --text: #f5f5ff;
    --text-muted: #b1b6d5;
    --chip-bg: rgba(255, 255, 255, 0.05);
    --stack-gap: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px clamp(10px, 4vw, 40px);
}

.page {
    width: 100%;
    max-width: 900px;
}

.profile-card {
    background: radial-gradient(circle at top left, rgba(167, 98, 255, 0.25), transparent 55%), linear-gradient(145deg, var(--card-start), var(--card-end));
    border-radius: 32px;
    padding: 36px 44px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--stack-gap);
    box-shadow: 0 20px 60px rgba(7, 10, 33, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.intro-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--stack-gap);
    width: 100%;
}

.profile-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.15), transparent 55%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.profile-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 70px rgba(7, 10, 33, 0.95);
}

.profile-card:hover::before {
    opacity: 1;
}

.avatar-wrapper {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 28px;
    position: relative;
    padding: 6px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    animation: float 6s ease-in-out infinite;
}

.avatar-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid #12152c;
}

.status-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #34d399;
    border: 4px solid #12152c;
    position: absolute;
    bottom: 16px;
    right: 18px;
}

h1 {
    font-size: 2.4rem;
    margin-bottom: 6px;
}

.subtitle {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 18px;
}

.description {
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
    font-size: 1rem;
}

.skills h2 {
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 12px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.skill-tags span {
    background-color: var(--chip-bg);
    border-radius: 12px;
    padding: 10px 18px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.skill-tags span::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 65%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-tags span:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
}

.skill-tags span:hover::after {
    opacity: 1;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin: 0;
}

.socials a {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    background-color: rgba(255, 255, 255, 0.02);
    transition: transform 0.2s ease, background-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.socials svg {
    width: 26px;
    height: 26px;
}

.socials a::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.25), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.socials a:hover {
    transform: translateY(-6px);
    background-color: rgba(167, 98, 255, 0.2);
}

.socials a:hover::after {
    opacity: 1;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 200px;
    padding: 14px 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 15px 35px rgba(124, 77, 255, 0.4);
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.primary-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(124, 77, 255, 0.45);
}

.primary-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.25), transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.primary-btn:hover::after {
    opacity: 1;
}

.cta-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 0;
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    padding: 14px 22px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.4px;
    background-color: transparent;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.2s ease;
}

.secondary-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.secondary-btn:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.45);
}

.secondary-btn:hover::after {
    opacity: 1;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 20px 0 28px;
}

.project {
    padding: 20px 24px;
    border-radius: 18px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.12), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.project:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.2);
}

.project:hover::after {
    opacity: 1;
}

.project header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.project-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project h3 {
    font-size: 1.2rem;
}

.badge {
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.badge.muted {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.project p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.project-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 22px;
    border-radius: 14px;
    border: 1px solid rgba(167, 98, 255, 0.6);
    background: linear-gradient(135deg, rgba(167, 98, 255, 0.35), rgba(124, 77, 255, 0.55));
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 10px 25px rgba(124, 77, 255, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ghost-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(124, 77, 255, 0.35);
}

.contact-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 20px 24px;
    z-index: 1200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.contact-modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.contact-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
}

.contact-card {
    position: relative;
    width: min(380px, 90%);
    background: linear-gradient(145deg, rgba(18, 24, 54, 0.98), rgba(18, 22, 43, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
}

.contact-mail-icon {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.contact-mail-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.contact-card h4 {
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.contact-card p {
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.5;
}

.contact-address {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--accent);
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 24px;
}

.contact-btn {
    border: none;
    border-radius: 14px;
    padding: 12px 26px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-btn.ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text);
}

.contact-btn:hover {
    transform: translateY(-2px);
}

.tech {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech li {
    padding: 5px 12px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@media (max-width: 900px) {
    body {
        align-items: flex-start;
        padding: 32px 20px;
    }

    .profile-card {
        padding: 32px 28px;
        border-radius: 28px;
    }

    .avatar-wrapper {
        width: 120px;
        height: 120px;
        margin-bottom: 18px;
    }

    h1 {
        font-size: 2.1rem;
    }

    .description {
        font-size: 0.95rem;
    }

    .socials a {
        width: 52px;
        height: 52px;
    }

    .projects-list {
        gap: 16px;
    }
}

@media (max-width: 640px) {
    body {
        padding: 22px 14px;
    }

    .profile-card {
        padding: 24px 18px 32px;
        gap: 16px;
    }

    .intro-block {
        gap: 16px;
    }

    h1 {
        font-size: 2rem;
    }

    .skill-tags span {
        font-size: 0.9rem;
        padding: 8px 14px;
    }

    .cta-group {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .socials {
        gap: 12px;
        flex-wrap: wrap;
    }

    .socials a {
        width: 52px;
        height: 52px;
    }

    .project-actions {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }

    .contact-modal {
        padding: 32px 12px 18px;
    }

    .contact-card {
        padding: 24px 20px;
    }

    .contact-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 18px 10px;
    }

    .profile-card {
        padding: 20px 14px 26px;
        border-radius: 22px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .skill-tags {
        gap: 6px;
    }

    .skill-tags span {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        max-width: none;
    }

    .project {
        padding: 16px 18px;
    }

    .ghost-btn {
        width: 100%;
        justify-content: center;
    }

    .contact-modal {
        padding: 26px 10px 16px;
    }

    .contact-card {
        padding: 20px 18px;
    }
}
