/* --- CSS Reset & Variables --- */
:root {
    --bg-color: #0d0f17;
    --card-bg: rgba(26, 30, 44, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    
    /* Vibrant Gradients */
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --gradient-1: #6366f1;
    --gradient-2: #a855f7;
    --gradient-3: #ec4899;
    
    --shadow-subtle: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);
    
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-full: 9999px;
    
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 20px;
}

/* --- Background Orbs --- */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
}

.orb-1 {
    top: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--gradient-1), transparent 70%);
}

.orb-2 {
    bottom: -20%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--gradient-2), transparent 70%);
    animation-delay: -5s;
}

.orb-3 {
    top: 40%;
    left: 60%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--gradient-3), transparent 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 5%) scale(1.1); }
    100% { transform: translate(-5%, -5%) scale(0.9); }
}

/* --- Card Container --- */
.card-container {
    width: 100%;
    max-width: 420px;
    perspective: 1000px;
}

.card-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    box-shadow: var(--shadow-subtle), var(--shadow-glow);
    transition: transform 0.1s;
    transform-style: preserve-3d;
}

/* --- Profile Section --- */
.profile-section {
    text-align: center;
    margin-bottom: 30px;
    transform: translateZ(40px); /* 3D effect */
    transition: all 0.4s ease;
}

/* Thumbnail Layout Option */
.profile-section.thumbnail-view {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 20px;
}

.profile-section.thumbnail-view .profile-image-wrapper {
    width: 90px;
    height: 90px;
    margin: 0;
    flex-shrink: 0;
}

.profile-section.thumbnail-view .name {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.profile-section.thumbnail-view .role {
    font-size: 1rem;
    margin-bottom: 4px;
}

.profile-section.thumbnail-view .company {
    margin-bottom: 8px;
    padding: 2px 10px;
    font-size: 0.85rem;
}

.profile-section.thumbnail-view .bio {
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.icon-btn:hover {
    color: var(--text-primary) !important;
    transform: scale(1.1);
}

.profile-image-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--bg-color);
    background-color: #2a2e40; /* Placeholder while loading */
}

.name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: -0.02em;
}

.role {
    font-size: 1.1rem;
    color: var(--gradient-2);
    font-weight: 500;
    margin-bottom: 8px;
}

.company {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-full);
}

.bio {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* --- Action Buttons --- */
.primary-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    transform: translateZ(30px);
}

.action-btn {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 14px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    outline: none;
}

.primary-btn {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    filter: brightness(1.1);
}

.primary-btn:active {
    transform: translateY(1px);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(5px);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.secondary-btn:active {
    transform: translateY(1px);
}

/* --- Links Section --- */
.links-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    transform: translateZ(20px);
}

.link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.link-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: translateY(-100%);
    transition: 0.5s ease;
}

.link-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.link-item:hover::before {
    transform: translateY(100%);
}

.link-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    margin-bottom: 12px;
    margin-right: 0; /* Reset margin from previous layout */
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.link-item:hover .link-icon {
    background: var(--gradient-1);
    color: white;
    transform: scale(1.1);
}

.link-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.link-label {
    font-size: 0.95rem;
    font-weight: 600;
}

.link-value {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.arrow-icon {
    display: none;
}

/* --- Quick Action Footer --- */
.card-footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 30px;
    padding: 20px 10px;
    border-top: 1px solid rgba(99, 102, 241, 0.3);
    background: linear-gradient(to top, rgba(99, 102, 241, 0.1), transparent);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: inset 0 20px 20px -20px rgba(99, 102, 241, 0.15);
    margin-left: -30px;
    margin-right: -30px;
    margin-bottom: -40px; /* Counteract card content padding to stretch to edge */
}

.footer-action {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: inherit;
    outline: none;
}

.footer-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}

.footer-action span {
    font-size: 0.8rem;
    font-weight: 500;
}

.footer-action:hover {
    color: var(--text-primary);
    transform: translateY(-3px);
}

.footer-action:hover .footer-icon {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transform: scale(1.1);
}

.footer-action:active {
    transform: translateY(0);
}

/* --- Modal --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 100;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-color);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    width: 90%;
    max-width: 350px;
    text-align: center;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.show .modal-content {
    transform: translateY(0) scale(1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.close-btn:hover {
    color: white;
}

.modal-content h2 {
    margin-bottom: 10px;
}

.modal-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* --- Toast --- */
.toast {
    position: fixed;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-border);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-subtle);
    z-index: 1000;
    transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    bottom: 30px;
}

/* --- Media Queries --- */
@media (max-width: 480px) {
    .card-container {
        max-width: 100%;
    }
    
    .card-content {
        padding: 30px 20px;
    }
    
    .link-item {
        padding: 14px;
    }
    
    .link-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}
