body {
    font-family: Arial, Helvetica, sans-serif;
    background: black;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.card {
    background: black;
    border-radius: 0px;
    max-width: 428px;   /* pixel width of iPhone 13 pro max is 428px */
    /*max-height: ; make it so phone doesn't scroll*/
    text-align: center;
    width: 100%;
    box-shadow: 0 8px 20px rgba(147, 147, 147, 0.8);
    padding: 0;
}

.flip-container {
    perspective: 1000px;
    width: 100%;
    max-width: 428px;
    position: relative;   /* ✅ anchor for .profile overlay */
}

.flip-card {
    width: 100%;
    aspect-ratio: 9 / 16;   /* square card. Make 9 / 16 for phone layout fullscreen */
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s;
    cursor: pointer;
}

/* Front and back faces */
.front, .back{
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    top: 0;
    left: 0;
}

/* Front: profile photo */
.front {
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(to bottom, rgba(0,0,0,0) 60%, rgba(0,0,0,0.9) 80%),
        url("photo.jpg");
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Back: QR code */
.back {
    background: black;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: rotateY(180deg);
}

.back img {
    max-width: 80%;
    max-height: 80%;
    transform: translateY(-50%);
}

/* Flip effect */
.flip-card.flipped {
    transform: rotateY(180deg);
}

.profile {
    position: absolute;   /* ✅ stays over the card */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* let clicks pass through except links */
}

.profile h1,
.profile h2,
.profile a {
    position: absolute;
    color: white;
    margin: 0;
    z-index: 10;
    pointer-events: auto; /* allow clicking links */
}

/* Position the elements */
.profile h1 { top: 69%; left: 10px; font-size: 1.8em; }
.profile h2 { top: 73%; left: 10px; font-size: 1.1em; }
.profile a:nth-of-type(1) { top: 78%; left: 10px; }
.profile a:nth-of-type(2) { top: 83%; left: 10px; }
.profile a:nth-of-type(3) { top: 88%; left: 10px; }
.profile a:nth-of-type(4) { top: 93%; left: 10px; }

/* Shared button styles */
.profile a {
    position: absolute;
    color: white;
    text-decoration: none;
    font-weight: bold;
    background: rgba(0,0,0,0.4);
    padding: 6px 10px;
    border-radius: 6px;
    transition: 0.3s;
    z-index: 10;
    pointer-events: auto;
}

/* Make icon-only buttons round and larger */
.icon-btn {
    padding: 10px;
    border-radius: 50%;
    font-size: 1.2em;   /* icon size */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Hover effect */
.profile a:hover {
    background: #e0e0e0;
}

/* Positioning (adjust as needed) */
.profile h1 { top: 69%; left: 10px; font-size: 1.8em; }
.profile h2 { top: 73%; left: 10px; font-size: 1.1em; }
.profile a:nth-of-type(1) { top: 78%; left: 10px; } /* Mail icon */
.profile a:nth-of-type(2) { top: 83%; left: 10px; } /* Phone icon */
.profile a:nth-of-type(3) { top: 88%; left: 10px; } /* LinkedIn */
.profile a:nth-of-type(4) { top: 93%; left: 10px; } /* Download Contact */

.reveal-btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: rgba(0,0,0,0.6);
    color: #000000;
    text-decoration: none;
    padding: 10px;
    border-radius: 30px;
    overflow: hidden;
    width: 40px;            /* collapsed width */
    transition: width 0.4s ease;
    white-space: nowrap;
    z-index: 10;
}

.reveal-btn i {
    font-size: 1.2em;
    
}

.reveal-btn .label {
    margin-left: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reveal-btn:hover {
    width: 240px;           /* adjust width if text is longer */
    background: rgba(0,0,0,0.8);
    color: #000000;
}

.reveal-btn:hover .label {
    opacity: 1;
}


.reveal-btn:nth-of-type(1) { top: 78%; left: 10px; } /* Mail */
.reveal-btn:nth-of-type(2) { top: 83%; left: 10px; } /* Phone */
.reveal-btn:nth-of-type(3) { top: 88%; left: 10px; } /* LinkedIn */
.reveal-btn:nth-of-type(4) { top: 93%; left: 10px; } /* Download */

