/* --- PROFILE PAGE STYLES --- */

/* Center Everything */
.profile-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

/* Glass Card Override */
.profile-card {
    text-align: center;
    max-width: 500px;
    width: 100%;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    /* Make it pop */
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* 📸 IMAGE MAGIC */
.profile-image-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 1rem;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Breathing Glow Ring */
.glow-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #00cec9);
    z-index: 1;
    opacity: 0.6;
    filter: blur(20px);
    animation: breathe 3s infinite ease-in-out;
}

@keyframes breathe {
    0%, 100% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* TEXT STYLING */
.role-badge {
    background: rgba(108, 92, 231, 0.1);
    color: #6c5ce7;
    padding: 8px 16px; /* Increased padding slightly */
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    
    /* 🛑 FIX 2: PREVENT OVERLAP */
    display: inline-block; /* Ensures the box respects padding when wrapped */
    line-height: 1.6;      /* Adds a gap between lines */
    margin-bottom: 5px;    /* Adds space between badge and Name */
}

[data-theme="dark"] .role-badge {
    background: rgba(162, 155, 254, 0.2);
    color: #a29bfe;
}

h1 {
    font-size: 2.5rem;
    margin: 10px 0 5px 0;
    background: linear-gradient(135deg, #2d3436 0%, #6c5ce7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="dark"] h1 {
    background: linear-gradient(135deg, #ffffff 0%, #a29bfe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.student-id {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.bio {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

/* BUTTONS */
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.email {
    background: #2d3436;
    color: #fff;
}

[data-theme="dark"] .email {
    background: #ffffff;
    color: #000;
}

.email:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* BACK ARROW (Fixed for Desktop) */
.back-btn {
    position: absolute;
    top: 40px; 
    left: 40px;
    z-index: 1000; /* Forces it on top of everything */
    
    display: flex; 
    align-items: center; 
    gap: 10px;
    
    /* Make it a Glass Pill so it's always readable */
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    
    text-decoration: none;
    color: var(--text-primary); 
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.back-btn:hover { 
    transform: translateX(-5px); 
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    color: var(--accent-color); 
}

[data-theme="dark"] .back-btn {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* 🛑 FIX 1: MOBILE ADJUSTMENTS */
@media (max-width: 768px) {
    /* Create space at the top so the card doesn't hit the back button */
    .profile-wrapper {
        justify-content: flex-start; /* Stop vertically centering */
        padding-top: 85px; /* Push the card down */
    }

    /* Style the back button to be smaller and cleaner */
    .back-btn { 
        top: 20px; 
        left: 20px; 
        padding: 8px 14px; 
        font-size: 0.85rem;
    }

    .profile-card {
        padding: 2rem 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }

    /* Adjust badge for smaller screens */
    .role-badge {
        font-size: 0.75rem;
        line-height: 1.5;
    }
}