/* ==========================================================================
   DIGITAL BUSINESS CARD - ANANDA F. S. ANUGRAH
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
    --bg-gradient-start: #0a4f47;
    --bg-gradient-mid: #0d7a71;
    --bg-gradient-end: #053b35;

    --card-bg: rgba(13, 122, 113, 0.72);
    --card-border: rgba(255, 255, 255, 0.22);
    --card-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.45), 0 18px 36px -18px rgba(0, 0, 0, 0.3);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.92);
    --text-muted: rgba(255, 255, 255, 0.75);

    --accent-emerald: #10b981;
    --accent-glow: rgba(16, 185, 129, 0.4);

    --btn-bg: rgba(255, 255, 255, 0.12);
    --btn-border: rgba(255, 255, 255, 0.25);
    --btn-hover-bg: rgba(255, 255, 255, 0.24);

    --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    --radius-card: 28px;
    --radius-btn: 12px;
    --radius-avatar: 50%;
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: var(--font-body);
    background: radial-gradient(circle at 20% 20%, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Ambient Animated Glows in Background */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
    animation: floatGlow 14s ease-in-out infinite alternate;
}

.glow-1 {
    width: 450px;
    height: 450px;
    background: rgba(13, 148, 136, 0.5);
    top: -100px;
    left: -100px;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: rgba(20, 184, 166, 0.35);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.glow-3 {
    width: 300px;
    height: 300px;
    background: rgba(16, 185, 129, 0.3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -9s;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -30px) scale(1.15); }
    100% { transform: translate(-30px, 40px) scale(0.95); }
}

/* Page Layout Container */
.page-wrapper {
    width: 100%;
    max-width: 960px;
    z-index: 1;
    perspective: 1200px;
}

/* Main Business Card */
.card-container {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    box-shadow: var(--card-shadow);
    padding: 3.25rem 3.5rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    transform-style: preserve-3d;
    overflow: hidden;
}

.card-container:hover {
    box-shadow: 0 35px 70px -10px rgba(0, 0, 0, 0.5), 0 0 35px rgba(255, 255, 255, 0.15);
}

/* Shine overlay effect */
.glass-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.03) 40%,
        transparent 60%
    );
    pointer-events: none;
    transform: rotate(-15deg);
}

/* Grid Content Layout */
.card-content {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    align-items: center;
}

/* Info Section (Left Column) */
.info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.profile-name {
    font-family: var(--font-heading);
    font-size: 2.85rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.profile-role {
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.01em;
}

/* Paragraph spacing & bold highlights */
.profile-bio {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-bio p {
    font-size: 1.02rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 400;
}

.profile-bio p strong {
    color: #ffffff;
    font-weight: 700;
}

/* Social & Action Footer */
.card-footer {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1.1rem;
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    border-radius: var(--radius-btn);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-btn .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.social-btn:hover {
    background: var(--btn-hover-bg);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.social-btn:hover .icon {
    transform: scale(1.15);
}

/* Action Controls (Save Contact & QR) */
.action-bar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.35rem;
    border-radius: var(--radius-btn);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
}

.action-btn .icon {
    width: 18px;
    height: 18px;
}

.primary-action {
    background: #ffffff;
    color: #0d7a71;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.primary-action:hover {
    background: #f0fdf4;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

.secondary-action {
    background: rgba(0, 0, 0, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.secondary-action:hover {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

/* Avatar Section (Right Column) */
.avatar-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-frame {
    position: relative;
    width: 250px;
    height: 250px;
    border-radius: var(--radius-avatar);
    padding: 6px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.1));
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease;
}

.avatar-frame:hover {
    transform: scale(1.03) rotate(1deg);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-avatar);
    display: block;
    background-color: #0d7a71;
}

.avatar-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-avatar);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
    pointer-events: none;
}

/* Modal Popup (QR Code) */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: #0f766e;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 2.25rem;
    width: 90%;
    max-width: 360px;
    text-align: center;
    position: relative;
    transform: scale(0.85);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-backdrop.active .modal-box {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 18px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
}

.modal-close:hover {
    opacity: 1;
}

.modal-box h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.modal-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.qr-code-wrapper {
    background: #ffffff;
    padding: 1rem;
    border-radius: 16px;
    display: inline-block;
    margin-bottom: 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.qr-code-wrapper img, .qr-code-wrapper svg {
    display: block;
    width: 180px;
    height: 180px;
}

.modal-url {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.8);
    word-break: break-all;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 200;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* RESPONSIVE DESIGN (Tablets & Mobile) */
@media (max-width: 840px) {
    .card-container {
        padding: 2.5rem 2rem;
    }

    .card-content {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }

    .avatar-section {
        order: -1; /* Avatar on top for mobile/tablet */
    }

    .avatar-frame {
        width: 200px;
        height: 200px;
    }

    .profile-name {
        font-size: 2.25rem;
        text-align: center;
    }

    .profile-role {
        font-size: 1.1rem;
        text-align: center;
    }

    .profile-bio p {
        text-align: center;
        font-size: 0.98rem;
    }

    .social-links {
        justify-content: center;
    }

    .action-bar {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.75rem;
    }

    .card-container {
        padding: 2rem 1.35rem;
        border-radius: 22px;
    }

    .avatar-frame {
        width: 170px;
        height: 170px;
    }

    .profile-name {
        font-size: 1.95rem;
    }

    .social-btn {
        padding: 0.6rem 0.9rem;
        font-size: 0.85rem;
    }

    .action-btn {
        width: 100%;
    }
}
