/* Profile Page - matches profilepage.desktopview design */
:root {
    --profile-primary: #2563EB;
    --profile-primary-hover: #1d4ed8;
    --profile-emerald: #10B981;
    --profile-emerald-light: rgba(16, 185, 129, 0.1);
    --profile-slate-50: #F8FAFC;
    --profile-slate-100: #f1f5f9;
    --profile-slate-200: #e2e8f0;
    --profile-slate-300: #cbd5e1;
    --profile-slate-400: #94a3b8;
    --profile-slate-500: #64748b;
    --profile-slate-600: #475569;
    --profile-slate-800: #1E293B;
    --profile-blue-50: #eff6ff;
    --profile-blue-100: #dbeafe;
}

/* Smooth scroll for profile jump links */
html {
    scroll-behavior: smooth;
}

/* Profile page main container - stretch to use more width, reduce side space */
/* Extra top padding so content sits below fixed navbar and profile name/hero display properly */
.profile-page-main {
    width: 100%;
    max-width: min(1600px, 96vw);
    box-sizing: border-box;
    padding-top: 6rem; /* clear fixed navbar (~64–80px) and add breathing room */
}

/* Mobile: reduce top padding to eliminate unnecessary gap above profile card */
@media (max-width: 767px) {
    .profile-page-main {
        padding-top: 2rem; /* Reduced padding for mobile to bring profile card closer to header */
    }
}

@media (min-width: 1400px) {
    .profile-page-main {
        max-width: min(1680px, 94vw);
    }
}

/* Ensure body can scroll and full page is visible (navbar is fixed) */
body:has(.profile-page-wrap) {
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
}

.profile-page-wrap {
    background: var(--profile-slate-50);
    color: var(--profile-slate-600);
    min-height: 100vh;
    padding-top: 5.5rem; /* clear fixed navbar (~64–80px) */
    box-sizing: border-box;
}

.profile-main {
    max-width: min(1600px, 96vw);
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
    box-sizing: border-box;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .profile-grid {
        grid-template-columns: 1fr 2fr;
        gap: 2rem;
        align-items: start;
    }
}

/* Prevent any parent from clipping the page */
.profile-page-wrap,
.profile-main,
.profile-grid {
    overflow: visible;
}

/* Sidebar */
.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid var(--profile-slate-200);
    padding: 1.5rem;
}

/* Personal Info Card */
.profile-personal {
    text-align: center;
}

.profile-avatar-wrap {
    position: relative;
    margin-bottom: 1rem;
    display: inline-block;
}

.profile-avatar-img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--profile-slate-50);
}

.profile-avatar-initials {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--profile-primary), #1d4ed8);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--profile-slate-50);
}

.profile-avatar-camera {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--profile-primary);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.profile-personal h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--profile-slate-800);
    margin: 0 0 0.25rem 0;
}

.profile-personal .profile-title {
    font-size: 0.875rem;
    color: var(--profile-slate-500);
    margin-bottom: 1rem;
}

.profile-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.profile-contact-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.profile-contact-list li i {
    color: var(--profile-primary);
    width: 20px;
    text-align: center;
}

.profile-social {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--profile-slate-100);
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.profile-social a {
    color: var(--profile-slate-400);
    font-size: 1.25rem;
    transition: color 0.2s;
}

.profile-social a:hover {
    color: var(--profile-primary);
}

/* Resume Utility Card */
.profile-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--profile-slate-800);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-card h3 i.fa-file-export {
    color: var(--profile-emerald);
}

.profile-card .profile-card-desc {
    font-size: 0.75rem;
    color: var(--profile-slate-500);
    margin-bottom: 1rem;
}

.profile-copy-btns {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-copy-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: var(--profile-slate-50);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.profile-copy-btn:hover {
    background: var(--profile-slate-100);
}

.profile-copy-btn i {
    color: var(--profile-slate-400);
}

.profile-download-pdf {
    width: 100%;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--profile-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
    transition: background 0.2s;
}

.profile-download-pdf:hover {
    background: var(--profile-primary-hover);
}

/* Main content sections */
.profile-main-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.profile-section-header h3 {
    margin: 0;
}

.profile-section-edit {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--profile-primary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

.profile-section-edit:hover {
    color: var(--profile-primary-hover);
}

.profile-summary-text {
    color: var(--profile-slate-600);
    line-height: 1.6;
    margin: 0;
}

/* Work Experience timeline */
.profile-add-btn {
    background: var(--profile-slate-50);
    color: var(--profile-primary);
    border: 1px solid var(--profile-slate-200);
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.profile-add-btn:hover {
    background: var(--profile-slate-100);
}

.profile-timeline {
    position: relative;
    padding-left: 2.5rem;
}

.profile-timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--profile-slate-100);
}

.profile-timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.profile-timeline-item:last-child {
    padding-bottom: 0;
}

.profile-timeline-dot {
    position: absolute;
    left: -2rem;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 0 1px var(--profile-slate-200);
}

.profile-timeline-dot.current {
    background: var(--profile-primary);
}

.profile-timeline-dot.past {
    background: var(--profile-slate-300);
}

.profile-timeline-item h4 {
    font-weight: 700;
    color: var(--profile-slate-800);
    margin: 0 0 0.25rem 0;
}

.profile-timeline-meta {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--profile-slate-500);
    margin-bottom: 0.5rem;
}

.profile-timeline-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--profile-emerald);
    background: var(--profile-emerald-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.profile-timeline-desc,
.profile-timeline ul {
    font-size: 0.875rem;
    color: var(--profile-slate-600);
    margin: 0 0 0 0;
}

.profile-timeline ul {
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.profile-timeline ul li {
    margin-bottom: 0.25rem;
}

/* Skills */
.profile-skills-group {
    margin-bottom: 1.5rem;
}

.profile-skills-group:last-child {
    margin-bottom: 0;
}

.profile-skills-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--profile-slate-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.profile-skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profile-tag {
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.profile-tag.technical {
    background: var(--profile-blue-50);
    color: var(--profile-primary);
    border: 1px solid var(--profile-blue-100);
}

.profile-tag.soft {
    background: var(--profile-emerald-light);
    color: var(--profile-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.profile-tag.more {
    background: var(--profile-slate-50);
    color: var(--profile-slate-500);
    border: 1px solid var(--profile-slate-100);
}

/* Education & Projects grid */
.profile-edu-projects {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .profile-edu-projects {
        grid-template-columns: 1fr 1fr;
    }
}

.profile-edu-item {
    border-left: 2px solid var(--profile-primary);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.profile-edu-item:last-child {
    margin-bottom: 0;
}

.profile-edu-item.secondary {
    border-left-color: var(--profile-slate-200);
}

.profile-edu-item h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--profile-slate-800);
    margin: 0 0 0.25rem 0;
}

.profile-edu-item p {
    font-size: 0.75rem;
    color: var(--profile-slate-500);
    margin: 0;
}

.profile-edu-item .profile-edu-meta {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--profile-slate-400);
    margin-top: 0.25rem;
}

.profile-project-item {
    margin-bottom: 1rem;
}

.profile-project-item:last-child {
    margin-bottom: 0;
}

.profile-project-item h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--profile-slate-800);
    margin: 0 0 0.25rem 0;
    transition: color 0.2s;
}

.profile-project-item:hover h4 {
    color: var(--profile-primary);
}

.profile-project-item p {
    font-size: 0.75rem;
    color: var(--profile-slate-500);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profile-project-tags {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profile-project-tag {
    font-size: 10px;
    padding: 0.125rem 0.375rem;
    background: var(--profile-slate-100);
    border-radius: 4px;
}

/* Footer */
.profile-footer {
    background: #fff;
    border-top: 1px solid var(--profile-slate-200);
    margin-top: 3rem;
    padding: 2rem 1rem;
}

.profile-footer-inner {
    max-width: min(1600px, 96vw);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

@media (min-width: 768px) {
    .profile-footer-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.profile-footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
    font-weight: 700;
}

.profile-avatar-initials.profile-avatar-img {
    background-size: cover;
    background-position: center;
}

.profile-footer-logo i {
    font-size: 1.25rem;
}

.profile-footer-copy {
    font-size: 0.875rem;
    color: var(--profile-slate-400);
}

.profile-footer-links {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--profile-slate-500);
}

.profile-footer-links a {
    color: inherit;
    text-decoration: none;
}

.profile-footer-links a:hover {
    color: var(--profile-primary);
}

/* Empty state */
.profile-empty {
    color: var(--profile-slate-500);
    font-size: 0.875rem;
    font-style: italic;
}

.profile-timeline-item .profile-edit-icon {
    background: none;
    border: none;
    color: var(--profile-slate-400);
    cursor: pointer;
    padding: 0 4px;
}

.profile-timeline-item .profile-edit-icon:hover {
    color: var(--profile-primary);
}

/* Jump-to-section links in left sidebar */
.profile-jump-link {
    text-decoration: none;
    font-size: 0.9375rem;
}
.profile-jump-link:hover {
    text-decoration: none;
}

/* New layout: timeline vertical line (matches reference) */
#profileTimeline.timeline-wrap {
    position: relative;
}
#profileTimeline.timeline-wrap::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: var(--profile-slate-100, #f1f5f9);
}
#profileTimeline .profile-exp-item {
    position: relative;
}

/* Inline Editing Styles */
.edit-form-transition {
    transition: all 0.3s ease-in-out;
}

.edit-form-transition.hidden {
    opacity: 0;
    transform: translateY(-10px);
}

.edit-form-transition:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

/* Modal Styles - use profile-modal-closed to avoid Tailwind .hidden conflicts */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay:not(.profile-modal-closed) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-overlay .modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-overlay .modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--profile-slate-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-overlay .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--profile-slate-800);
}

.modal-overlay .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--profile-slate-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.modal-overlay .modal-close:hover {
    background-color: var(--profile-slate-100);
    color: var(--profile-slate-600);
}

.modal-overlay .modal-body {
    padding: 1.5rem;
}

.modal-overlay .modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--profile-slate-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--profile-slate-600);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--profile-slate-200);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--profile-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Button Styles */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--profile-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--profile-primary-hover);
}

.btn-secondary {
    background-color: var(--profile-slate-100);
    color: var(--profile-slate-700);
}

.btn-secondary:hover {
    background-color: var(--profile-slate-200);
}

.btn-danger {
    background-color: #dc2626;
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--profile-slate-200);
    color: var(--profile-slate-600);
}

.btn-outline:hover {
    background-color: var(--profile-slate-50);
}

/* Edit Button Styles */
.edit-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.edit-btn {
    background: none;
    border: none;
    color: var(--profile-primary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.edit-btn:hover {
    background-color: rgba(37, 99, 235, 0.1);
}

.save-btn {
    background-color: var(--profile-emerald);
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: none;
}

.save-btn:hover {
    background-color: #059669;
}

.cancel-btn {
    background-color: var(--profile-slate-100);
    color: var(--profile-slate-600);
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: none;
}

.cancel-btn:hover {
    background-color: var(--profile-slate-200);
}

/* Skills Edit Styles */
.skill-input-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.skill-input {
    flex: 1;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--profile-slate-200);
    border-radius: 0.375rem;
    font-size: 0.75rem;
    outline: none;
    transition: border-color 0.2s;
}

.skill-input:focus {
    border-color: var(--profile-primary);
}

.skill-add-btn {
    padding: 0.375rem 0.75rem;
    background-color: var(--profile-primary);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.skill-add-btn:hover {
    background-color: var(--profile-primary-hover);
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    background-color: var(--profile-slate-100);
    color: var(--profile-slate-700);
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.skill-remove {
    background: none;
    border: none;
    color: var(--profile-slate-400);
    cursor: pointer;
    padding: 0;
    font-size: 0.75rem;
    line-height: 1;
    transition: color 0.2s;
}

.skill-remove:hover {
    color: #dc2626;
}

/* Info Message */
.info-message {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: var(--profile-blue-50);
    border: 1px solid var(--profile-blue-100);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--profile-slate-600);
    margin-bottom: 1rem;
}

.info-message i {
    color: var(--profile-primary);
    margin-top: 0.125rem;
}

/* Password Input Container */
.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--profile-slate-400);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--profile-slate-600);
}

/* Checkbox and Radio Options */
.checkbox-option,
.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--profile-slate-600);
}

.checkbox-option input,
.radio-option input {
    margin: 0;
}

/* Warning Message */
.warning-message {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.warning-message p {
    margin: 0 0 0.5rem 0;
    color: #dc2626;
    font-weight: 600;
}

.warning-message p:last-child {
    margin-bottom: 0;
    font-weight: 400;
    color: var(--profile-slate-600);
}

/* Current Email Display */
.current-email-display {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--profile-slate-50);
    border-radius: 0.5rem;
    border: 1px solid var(--profile-slate-100);
}

.current-email-display label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--profile-slate-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.email-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.email-info span:first-child {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--profile-slate-800);
}

.verification-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.verification-badge.verified {
    background-color: var(--profile-emerald-light);
    color: var(--profile-emerald);
}

.verification-badge.unverified {
    background-color: #fef3c7;
    color: #d97706;
}

/* Collapsible Sections */
.settings-section {
    margin-bottom: 1.5rem;
    border: 1px solid var(--profile-slate-200);
    border-radius: 0.75rem;
    overflow: hidden;
}

.settings-section.active .section-content {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: var(--profile-slate-50);
    border-bottom: 1px solid var(--profile-slate-200);
    cursor: pointer;
    transition: background-color 0.2s;
}

.section-header:hover {
    background-color: var(--profile-slate-100);
}

.section-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--profile-slate-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header i:first-child {
    color: var(--profile-primary);
}

.toggle-icon {
    color: var(--profile-slate-400);
    transition: transform 0.2s;
}

.settings-section.active .toggle-icon {
    transform: rotate(180deg);
}

.section-content {
    padding: 1.5rem;
    display: none;
}

/* Frequency Options */
.frequency-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* Notification Options */
.notification-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* Account Stats */
.account-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.stat-card {
    background: white;
    border: 1px solid var(--profile-slate-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--profile-slate-800);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--profile-slate-500);
    font-weight: 500;
}

/* ========== Profile Hero Section (Desktop & Mobile) ========== */
.profile-hero-section {
    width: 100%;
    margin-bottom: 2rem;
    box-sizing: border-box;
}

.profile-hero-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.profile-hero-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-width: 0;
    flex: 1 1 auto;
}

.profile-hero-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-hero-avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 4px solid white;
    background: var(--profile-primary);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.profile-hero-avatar-camera {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: var(--profile-primary);
    color: white;
    padding: 0.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: background 0.2s;
}

.profile-hero-avatar-camera:hover {
    background: #1d4ed8;
}

.profile-hero-info {
    min-width: 0;
    flex: 1 1 auto;
}

.profile-hero-name {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--profile-slate-800);
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
    word-break: break-word;
}

.profile-hero-title {
    font-size: 1rem;
    color: var(--profile-slate-600);
    font-weight: 500;
    margin: 0 0 0.75rem 0;
}

.profile-hero-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.profile-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
}

.profile-hero-badge i {
    flex-shrink: 0;
}

.profile-hero-badge-complete {
    background: rgba(16, 185, 129, 0.1);
    color: var(--profile-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.profile-hero-badge-auto {
    background: rgba(37, 99, 235, 0.1);
    color: var(--profile-primary);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.profile-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.profile-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.profile-hero-btn-secondary {
    background: white;
    color: var(--profile-slate-800);
    border: 1px solid var(--profile-slate-200);
}

.profile-hero-btn-secondary:hover {
    background: var(--profile-slate-100);
}

.profile-hero-btn-primary {
    background: var(--profile-primary);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2), 0 4px 6px -2px rgba(37, 99, 235, 0.1);
}

.profile-hero-btn-primary:hover {
    background: var(--profile-primary-hover);
}

/* Desktop: larger avatar and spacing */
@media (min-width: 768px) {
    .profile-hero-avatar {
        width: 8rem;
        height: 8rem;
        font-size: 2.25rem;
    }

    .profile-hero-left {
        gap: 1.5rem;
    }

    .profile-hero-name {
        font-size: 1.875rem;
    }
}

/* Profile Hero Mobile */
@media (max-width: 767px) {
    .profile-hero-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .profile-hero-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-hero-name {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .profile-hero-badges {
        justify-content: center;
    }

    .profile-hero-badge {
        white-space: normal;
    }

    .profile-hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .profile-hero-btn {
        width: 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-overlay .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-overlay .modal-header,
    .modal-overlay .modal-body,
    .modal-overlay .modal-footer {
        padding: 1rem;
    }

    .edit-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .edit-btn,
    .save-btn,
    .cancel-btn {
        width: 100%;
        justify-content: center;
    }
}
