* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

:root {
    --primary: #f59e0b; /* Amber 500 */
    --primary-light: #fbbf24; /* Amber 400 */
    --primary-dark: #d97706; /* Amber 600 */
    --accent: #ea580c; /* Orange 600 */
    --bg-light: #fffbeb; /* Amber 50 */
    --white: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --shadow: 0 20px 50px rgba(245, 158, 11, 0.15);
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top right, #fff7ed, #ffedd5);
    overflow: hidden;
    position: relative;
}

/* Decorative Background Elements */
body::before, body::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    filter: blur(80px);
    opacity: 0.15;
    z-index: -1;
}

body::before { top: -100px; right: -100px; }
body::after { bottom: -100px; left: -100px; }

/* Container and perspective */
.container {
    perspective: 2000px;
    width: 340px;
    height: 500px;
}

.card-container {
    width: 100%;
    height: 100%;
    position: relative;
    animation: float 6s ease-in-out infinite; /* Move animation here to avoid transform conflict */
}

.card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 30px;
}

.card.flipped {
    transform: rotateY(180deg);
}

.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 30px;
    box-shadow: var(--shadow);
}

.front {
    background: var(--white);
    z-index: 2;
    transform: rotateY(0deg);
    border: 1px solid rgba(245, 158, 11, 0.1);
}

.back {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: var(--white);
    transform: rotateY(180deg);
    z-index: 1;
}

.profile-img {
    width: 130px;
    height: 130px;
    border-radius: 30px;
    overflow: hidden;
    margin-bottom: 25px;
    border: 5px solid var(--white);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.2);
    transform: rotate(-3deg);
    transition: 0.5s;
}

.card:hover .profile-img {
    transform: rotate(0deg) scale(1.05);
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.front h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.role {
    color: var(--primary-dark);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 30px;
    background: rgba(245, 158, 11, 0.1);
    padding: 5px 15px;
    border-radius: 100px;
}

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

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 15px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(245, 158, 11, 0.1);
}

.social-link:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-5px) rotate(8deg);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

.flip-btn {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    border: none;
    padding: 14px 35px;
    border-radius: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(234, 88, 12, 0.25);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.flip-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(234, 88, 12, 0.35);
}

/* Back Side */
.back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: var(--white);
    border: none;
}

.back h3 {
    margin-bottom: 20px;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-light);
}

.back p {
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.8);
}

.skills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 35px;
}

.skills span {
    background: rgba(251, 191, 36, 0.1);
    color: var(--primary-light);
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.contact-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.action-btn {
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 700;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn.email {
    background: var(--accent);
}

.action-btn.website {
    background: var(--primary);
}

.action-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.flip-btn-back {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 15px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
    font-size: 0.85rem;
}

.flip-btn-back:hover {
    background: var(--white);
    color: #0f172a;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Remove conflicting hover animation on card to ensure flip is clear */
.card-container:hover {
    animation-play-state: paused;
}
