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

:root {
    --primary: #667eea;
    --primary-dark: #5a6fd6;
    --secondary: #764ba2;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --white: #ffffff;
    --background: #f8fafc;
    --card-padding: 20px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    perspective: 1000px;
}

.card {
    width: 95mm;
    height: 65mm;
    position: relative;
    cursor: pointer;
    margin: 0 auto;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
}

.card-front,
.card-about,
.card-contact,
.card-social {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    border-radius: 15px;
    padding: var(--card-padding);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card-front.active,
.card-about.active,
.card-contact.active,
.card-social.active {
    opacity: 1;
    visibility: visible;
}

.profile-icon {
    width: 55px;
    height: 55px;
    background: var(--primary);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 15px;
    transform: rotate(-10deg);
    box-shadow: 3px 3px 0 var(--primary-dark);
    transition: var(--transition);
}

.card-front:hover .profile-icon {
    transform: rotate(0deg);
}

.profile-icon svg {
    width: 100%;
    height: 100%;
    fill: var(--white);
}

h1 {
    color: var(--text-dark);
    font-size: 1.6em;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

h2 {
    color: var(--primary);
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

p {
    color: var(--text-light);
    font-size: 1em;
    line-height: 1.5;
    max-width: 90%;
}

.about-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 0 15px;
}

.about-content p {
    text-align: center;
    font-size: 0.95em;
    line-height: 1.4;
    margin: 0;
    max-width: 85%;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    width: 100%;
}

.skills span {
    background: var(--background);
    color: var(--primary);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: var(--transition);
}

.skills span:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.contact-info {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 0 15px;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 1em;
    transition: var(--transition);
    color: var(--text-dark);
    margin: 0;
}

.contact-info p:hover {
    background: var(--background);
    transform: translateX(5px);
}

.contact-info i {
    color: var(--primary);
    font-size: 1.2em;
    width: 20px;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--primary);
    color: var(--white);
    font-size: 1.2em;
    text-decoration: none;
    transition: var(--transition);
    transform: rotate(-10deg);
}

.social-icon:nth-child(even) {
    transform: rotate(10deg);
}

.social-icon:hover {
    transform: rotate(0) scale(1.1);
    background: var(--primary-dark);
}

.qr-code {
    text-align: center;
    background: var(--white);
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qr-code img {
    width: 80px;
    height: 80px;
    margin-bottom: 5px;
    border-radius: 4px;
}

.qr-code p {
    font-size: 0.8em;
    color: var(--text-light);
    margin: 0;
}

.hint {
    color: var(--white);
    font-size: 1em;
    margin-top: 20px;
    text-align: center;
    opacity: 0.9;
}

.card:active {
    transform: scale(0.98);
}

@media (max-width: 400px) {
    .card {
        width: 100%;
        max-width: 95mm;
        height: 65mm;
    }

    h1 {
        font-size: 1.4em;
    }

    h2 {
        font-size: 1em;
    }

    p {
        font-size: 0.9em;
    }

    .profile-icon {
        width: 48px;
        height: 48px;
    }

    .skills span {
        font-size: 0.85em;
        padding: 5px 10px;
    }

    .contact-info p {
        font-size: 0.9em;
        padding: 6px 10px;
    }

    .social-icon {
        width: 34px;
        height: 34px;
        font-size: 1.1em;
    }

    .qr-code img {
        width: 60px;
        height: 60px;
    }
}

@media print {
    body {
        background: none;
    }

    .card {
        box-shadow: none;
    }

    .hint {
        display: none;
    }
} 