@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #cbd5e1 50%, #94a3b8 75%, #64748b 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    margin: 0;
    opacity: 0;
    animation: pageLoad 1.5s ease-out forwards;
}

@keyframes pageLoad {
    0% {
        opacity: 0;
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Ensure card container is responsive */
.card-container {
    perspective: 1000px;
    width: 100%;
    max-width: 650px;
    display: flex;
    justify-content: center;
}

.business-card {
    width: 600px;
    height: 350px;
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: cardEntrance 1s ease-out;
}

.business-card:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    filter: brightness(1.05);
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(50px) rotateX(-15deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

/* Enhanced white theme glassmorphism effect */
.card-front {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 250, 252, 0.9) 50%, 
        rgba(241, 245, 249, 0.85) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    border: 1px solid rgba(203, 213, 225, 0.6);
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.15), 
        0 16px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(203, 213, 225, 0.3);
    padding: 25px 30px;
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    grid-template-rows: 1fr auto auto;
    grid-template-areas: 
        "header contact ."
        ". . actions"
        "qr qr qr";
    gap: 25px;
    position: relative;
    overflow: hidden;
}

.card-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.card-front > * {
    position: relative;
    z-index: 1;
}

/* Grid layout for desktop horizontal design */
.header {
    grid-area: header;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    margin-top: 0;
}

.contact-info {
    grid-area: contact;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.skills {
    grid-area: skills;
    display: none;
}

.actions {
    grid-area: actions;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-self: end;
    gap: 15px;
    margin-top: 0;
}

.qr-section {
    grid-area: qr;
    display: none; /* Hide QR section on desktop for cleaner look */
}

/* Add subtle inner glow for white theme */
.card-front::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* White theme top border */
.card-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0ea5e9, #3b82f6, #6366f1, #8b5cf6, #a855f7);
    background-size: 200% 100%;
    animation: gradientShift 4s ease-in-out infinite;
    border-radius: 24px 24px 0 0;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
    color: white;
    font-size: 30px;
    box-shadow: 
        0 15px 40px rgba(59, 130, 246, 0.3),
        0 0 0 4px rgba(255, 255, 255, 1),
        0 0 0 6px rgba(59, 130, 246, 0.2);
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: avatarPulse 3s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% { 
        box-shadow: 
            0 15px 40px rgba(59, 130, 246, 0.3),
            0 0 0 4px rgba(255, 255, 255, 1),
            0 0 0 6px rgba(59, 130, 246, 0.2);
    }
    50% { 
        box-shadow: 
            0 20px 50px rgba(59, 130, 246, 0.4),
            0 0 0 4px rgba(255, 255, 255, 1),
            0 0 0 8px rgba(59, 130, 246, 0.3);
    }
}

.avatar:hover {
    transform: scale(1.1) rotateY(10deg);
    box-shadow: 
        0 25px 60px rgba(59, 130, 246, 0.5),
        0 0 0 4px rgba(255, 255, 255, 1),
        0 0 0 10px rgba(59, 130, 246, 0.4);
    animation: none;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar i {
    display: none;
}

.name-section h1 {
    font-size: 28px;
    color: #1e293b;
    margin-bottom: 5px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #1e293b 0%, #3b82f6 50%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 3s ease-in-out infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

@keyframes textShimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.name-section p {
    font-size: 16px;
    color: #6366f1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    animation: fadeInUp 1s ease-out 0.5s both;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.name-section p::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #6366f1, #8b5cf6);
    border-radius: 2px;
    animation: lineExpand 2s ease-out 1s both;
}

@keyframes lineExpand {
    0% { width: 0%; }
    100% { width: 60%; }
}

.contact-info {
    margin: 0;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 12px;
    color: #475569;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Add modern white theme glassmorphism effect */
.business-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #0ea5e9, #3b82f6, #6366f1, #8b5cf6, #a855f7);
    border-radius: 22px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Add hover effect to the entire card */
.business-card:hover {
    transform: translateY(-5px) rotateX(2deg);
    transition: all 0.3s ease;
}

/* Modern white theme contact item styling */
.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px 16px;
    color: #334155;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.contact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
    transition: left 0.6s ease;
}

.contact-item:hover::before {
    left: 100%;
}

.contact-item:hover {
    background: rgba(59, 130, 246, 0.15);
    transform: translateX(8px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.contact-item i {
    width: 20px;
    margin-right: 15px;
    color: #3b82f6;
    font-size: 16px;
    transition: all 0.3s ease;
}

.contact-item:hover i {
    color: #2563eb;
    transform: scale(1.2) rotate(5deg);
}

.contact-item span {
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-item:hover span {
    color: #1e293b;
    font-weight: 600;
}

.skills {
    margin: 0;
}

.skills h3 {
    color: #1e293b;
    margin-bottom: 12px;
    font-size: 16px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.actions {
    display: flex;
    gap: 10px;
    margin: 0;
}

.btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
}

.btn-secondary {
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
    border: 1px solid rgba(100, 116, 139, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.15);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #1e293b;
}

.qr-section {
    text-align: center;
    margin-top: 10px;
}

.qr-code {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: #ffffff;
    border-radius: 10px;
    border: 2px dashed #3b82f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.qr-code i {
    font-size: 40px;
    color: #3b82f6;
    margin-bottom: 5px;
}

.qr-code p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

/* Modal Styles - White Theme */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #ffffff;
    margin: 15% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(203, 213, 225, 0.3);
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    color: #94a3b8;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
}

.close:hover {
    color: #3b82f6;
}

.modal-content h3 {
    color: #1e293b;
    margin-bottom: 20px;
    text-align: center;
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(203, 213, 225, 0.3);
}

.share-btn:hover {
    background: #3b82f6;
    color: white;
    transform: translateX(5px);
    border-color: #3b82f6;
}

.share-btn i {
    font-size: 18px;
}

/* Floating Elements - White Theme */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-circle,
.floating-square,
.floating-triangle {
    position: absolute;
    opacity: 0.08;
    filter: blur(1px);
}

.floating-circle {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border-radius: 50%;
    top: 15%;
    left: 8%;
    animation: floatCircle 8s ease-in-out infinite;
}

.floating-square {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    top: 65%;
    right: 12%;
    transform: rotate(45deg);
    animation: floatSquare 10s ease-in-out infinite;
}

.floating-triangle {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 80px solid #0ea5e9;
    top: 25%;
    right: 25%;
    animation: floatTriangle 12s ease-in-out infinite;
}

@keyframes floatCircle {
    0%, 100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-30px) translateX(20px) rotate(120deg);
    }
    66% {
        transform: translateY(20px) translateX(-15px) rotate(240deg);
    }
}

@keyframes floatSquare {
    0%, 100% {
        transform: translateY(0px) translateX(0px) rotate(45deg);
    }
    50% {
        transform: translateY(-25px) translateX(30px) rotate(135deg);
    }
}

@keyframes floatTriangle {
    0%, 100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) translateX(-25px) rotate(90deg);
    }
    50% {
        transform: translateY(15px) translateX(20px) rotate(180deg);
    }
    75% {
        transform: translateY(-10px) translateX(-30px) rotate(270deg);
    }
}

/* Desktop Responsive Design - White Theme */
@media (min-width: 769px) {
    .card-container {
        max-width: 700px;
        padding: 0 20px;
    }
    
    .business-card {
        width: 650px;
        height: 380px;
        max-width: 100%;
    }
    
    .card-front {
        padding: 30px 35px;
        gap: 30px;
        grid-template-areas: 
            "header contact ."
            ". . actions"
            "qr qr qr";
    }
    
    .header {
        align-items: flex-start;
        text-align: left;
        justify-content: flex-start;
        margin-bottom: 0;
        padding-top: 10px;
    }
    
    .avatar {
        width: 90px;
        height: 90px;
    }
    
    .contact-info {
        padding: 10px 0;
        justify-content: center;
    }
    
    .skills {
        display: block;
    }
    
    .actions {
        flex-direction: column;
        gap: 12px;
        align-self: flex-end;
        justify-content: flex-end;
        margin-bottom: 10px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 13px;
        min-width: 120px;
    }
    
    .qr-section {
        display: none;
    }
    
    .actions {
        gap: 12px;
    }
}

/* Responsive Design - White Theme */
@media (max-width: 768px) {
    body {
        padding: 15px;
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    }
    
    .card-container {
        max-width: 100%;
        width: 100%;
    }
    
    .business-card {
        width: 100%;
        height: auto;
        min-height: 500px;
    }
    
    .card-front {
        padding: 25px 20px;
        grid-template-columns: 1fr;
        grid-template-areas: 
            "header"
            "contact"
            "skills"
            "actions"
            "qr";
        gap: 20px;
    }
    
    .header {
        grid-area: header;
        align-items: center;
        text-align: center;
        justify-content: center;
        margin-bottom: 0;
    }
    
    .avatar {
        width: 70px;
        height: 70px;
        margin: 0 auto 12px auto;
        font-size: 24px;
    }
    
    .name-section {
        text-align: center;
    }
    
    .name-section h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .name-section p {
        font-size: 14px;
        margin-bottom: 0;
    }
    
    .contact-info {
        grid-area: contact;
        margin: 0;
    }
    
    .contact-item {
        margin-bottom: 10px;
        padding: 10px 14px;
    }
    
    .contact-item span {
        font-size: 13px;
    }
    
    .contact-item i {
        width: 18px;
        margin-right: 12px;
        font-size: 15px;
    }
    
    .skills {
        grid-area: skills;
        display: block;
        margin: 0;
    }
    
    .skills h3 {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .skill-tags {
        gap: 6px;
        justify-content: center;
    }
    
    .skill-tag {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .actions {
        grid-area: actions;
        flex-direction: row;
        gap: 12px;
        margin: 0;
    }
    
    .btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .qr-section {
        grid-area: qr;
        display: block;
        margin: 0;
    }
    
    .qr-code {
        padding: 12px;
    }
    
    .qr-code i {
        font-size: 32px;
    }
    
    .qr-code p {
        font-size: 11px;
    }
    
    .modal-content {
        margin: 25% auto;
        padding: 25px;
        width: 95%;
        max-width: 350px;
    }
    
    .floating-elements {
        display: none;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    }
    
    .business-card {
        width: 100%;
        min-height: 450px;
        max-width: 400px;
    }
    
    .card-front {
        padding: 20px 16px;
        gap: 16px;
    }
    
    .avatar {
        width: 60px;
        height: 60px;
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .name-section {
        text-align: center;
    }
    
    .name-section h1 {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .name-section p {
        font-size: 12px;
        margin-bottom: 0;
    }
    
    .contact-item {
        margin-bottom: 8px;
        padding: 8px 12px;
    }
    
    .contact-item span {
        font-size: 12px;
    }
    
    .contact-item i {
        width: 16px;
        margin-right: 10px;
        font-size: 14px;
    }
    
    .skills h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .skill-tag {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .btn {
        padding: 10px 14px;
        font-size: 12px;
    }
    
    .qr-code {
        padding: 10px;
    }
    
    .qr-code i {
        font-size: 28px;
    }
    
    .qr-code p {
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    .card-front {
        padding: 16px 12px;
        gap: 14px;
    }
    
    .avatar {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .name-section h1 {
        font-size: 18px;
    }
    
    .name-section p {
        font-size: 11px;
    }
    
    .contact-item span {
        font-size: 11px;
    }
    
    .skill-tags {
        gap: 4px;
    }
    
    .skill-tag {
        padding: 3px 6px;
        font-size: 9px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 11px;
    }
}

/* Large screens optimization - White Theme */
@media (min-width: 1200px) {
    .business-card {
        width: 700px;
        height: 400px;
    }
    
    .card-front {
        padding: 35px 40px;
        gap: 35px;
    }
    
    .avatar {
        width: 100px;
        height: 100px;
        font-size: 35px;
    }
    
    .name-section h1 {
        font-size: 32px;
    }
    
    .name-section p {
        font-size: 18px;
    }
    
    .contact-item {
        padding: 14px 18px;
        margin-bottom: 14px;
    }
    
    .contact-item span {
        font-size: 15px;
    }
    
    .skills h3 {
        font-size: 18px;
        margin-bottom: 14px;
    }
    
    .skill-tag {
        padding: 7px 14px;
        font-size: 13px;
    }
    
    .btn {
        padding: 16px 26px;
        font-size: 15px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .avatar img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles - White Theme */
@media print {
    body {
        background: white !important;
    }
    
    .business-card {
        box-shadow: none !important;
        border: 1px solid #ccc;
    }
    
    .floating-elements {
        display: none !important;
    }
}