html { direction: rtl; }
body { 
    font-family: 'IRANSans', 'Segoe UI', Tahoma, Arial, sans-serif; 
    background: linear-gradient(135deg, #c2cae4ff 30%, #9061c0ff 70%);
    color: #2d3748; 
    margin: 0;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
    z-index: 1;
}

.profile-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 20px 60px;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.side-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 120px;
    height: fit-content;
    animation: slideInRight 0.8s ease-out;
}

.main-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 6px solid rgba(255, 255, 255, 0.8);
    display: block;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.name {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge-faculty {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: white;
    font-size: .8rem;
    padding: 8px 16px;
    border-radius: 25px;
    margin-bottom: 20px;
    display: inline-block;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.badge-faculty:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.socials {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 1.5rem;
    margin: 25px 0;
}

.socials a {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: all 0.3s ease;
    text-decoration: none;
}

.socials a:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 25px 0 0 0;
    text-align: right;
}

.info-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    transition: all 0.3s ease;
    border-right: 4px solid transparent;
}

.info-list li:hover {
    background: rgba(102, 126, 234, 0.1);
    border-right-color: #667eea;
    transform: translateX(-5px);
}

.info-list i {
    color: #667eea;
    width: 25px;
    text-align: center;
    font-size: 1.1rem;
}

.bio-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    text-align: justify;
    line-height: 2;
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.bio-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.books-box {
    background: linear-gradient(135deg, rgba(255, 216, 155, 0.1) 0%, rgba(25, 84, 123, 0.1) 100%);
    border-radius: 20px;
    padding: 25px;
    margin-top: 25px;
    text-align: right;
    border: 1px solid rgba(255, 216, 155, 0.2);
}

.books-box h3 {
    color: #19547b;
    margin-bottom: 15px;
    font-weight: 700;
}

.books-box ul {
    margin: 0;
    padding-right: 20px;
}

.books-box li {
    margin-bottom: 10px;
    font-size: .9rem;
    padding: 8px 0;
    transition: all 0.3s ease;
}

.books-box li:hover {
    color: #19547b;
    transform: translateX(-5px);
}

.video-box {
    border-radius: 20px;
    overflow: hidden;
    margin-top: 25px;
    transition: all 0.3s ease;
}

.video-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.cta-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 25px;
    padding: 35px;
    text-align: center;
    margin-top: 35px;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cta-box .btn {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.cta-box .btn:hover {
    transform: translateY(-3px);
    background: white;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.courses-section {
    margin-top: 40px;
}

.courses-list {
    list-style: none;
    padding: 0;
    margin: 25px 0 0 0;
    text-align: right;
}

.courses-list li {
    margin-bottom: 12px;
}

.course-link {
    display: block;
    padding: 18px 25px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    text-decoration: none;
    color: #2d3748;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.course-link::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    z-index: -1;
}

.course-link:hover {
    color: white;
    transform: translateX(-8px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.course-link:hover::before {
    right: 0;
}

.course-link i {
    margin-left: 12px;
    color: #667eea;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.course-link:hover i {
    color: white;
    transform: scale(1.2);
}

.course-meta {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    font-size: 0.85rem;
}

.course-level {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.course-category {
    color: #718096;
}

.empty-courses {
    text-align: center;
    padding: 60px 40px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    margin-top: 20px;
    border: 2px dashed #cbd5e0;
}

.empty-courses i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #cbd5e0;
    opacity: 0.7;
}

.empty-courses h3 {
    margin-bottom: 10px;
    color: #64748b;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title::before {
    content: '';
    width: 8px;
    height: 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.buttons-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px 0;
    position: relative;
    z-index: 3;
}

.edit-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 15px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.edit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.4);
    color: white;
}

.resume-status-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.resume-status-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.4);
}

.resume-status-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.resume-status-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 25px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: modalAppear 0.4s ease-out;
}

@keyframes modalAppear {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.status-header {
    margin-bottom: 30px;
}

.status-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.status-updated { color: #10b981; }
.status-not-updated { color: #ef4444; }

.status-items {
    margin-bottom: 30px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    font-weight: 700;
    color: #374151;
}

.status-value {
    color: #6b7280;
    font-weight: 600;
}

.close-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 15px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}