/* ========================================
   Profile Page Styles
   ======================================== */

/* Profile Component Container */
[data-component="profile"] {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing, 2rem) var(--spacing, 1rem);
}

/* Profile Header Section */
[data-component="profile"] [data-role="profile-header"] {
    padding-bottom: var(--spacing, 2rem);
    margin-bottom: var(--spacing, 2rem);
    border-bottom: 1px solid var(--muted-border-color, #e1e1e1);
}

/* Profile Header Main Container */
[data-component="profile"] [data-component="profile-header-main"] {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

/* Avatar Container */
[data-component="profile"] [data-role="avatar-container"] {
    flex-shrink: 0;
}

/* Avatar Image */
[data-component="profile"] [data-role="avatar-container"] img[data-role="avatar"] {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--pico-primary, #0172ad);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Avatar Initials */
[data-component="profile"] [data-role="avatar-container"] [data-role="avatar-initials"] {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    font-size: 36px;
    text-transform: uppercase;
    border: 3px solid var(--pico-primary, #0172ad);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    user-select: none;
}

/* Profile Info Container */
[data-component="profile"] [data-role="profile-info"] {
    flex: 1;
}

/* Profile Name */
[data-component="profile"] #profile-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--h1-color, #24333e);
}

/* Profile Headline */
[data-component="profile"] #profile-headline {
    font-size: 1.125rem;
    color: var(--muted-color, #73828c);
    margin: 0.5rem 0 0 0;
    font-style: italic;
}

/* Profile Actions */
[data-component="profile"] [data-role="profile-actions"] {
    margin-top: 1.5rem;
    text-align: center;
}

[data-component="profile"] [data-role="profile-actions"] a[role="button"] {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
}

/* Main Sections */
[data-component="profile"] section[data-section] {
    margin-bottom: 3rem;
}

[data-component="profile"] section[data-section] h2 {
    font-size: 1.75rem;
    color: var(--h2-color, #24333e);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--pico-primary, #0172ad);
}

/* About Section */
[data-section="about"] #profile-bio {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color, #415462);
    margin-bottom: 1.5rem;
}

/* Details List */
[data-component="profile"] #profile-details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem 2rem;
    margin-top: 1.5rem;
}

[data-component="profile"] #profile-details dt {
    font-weight: 600;
    color: var(--muted-color, #73828c);
}

[data-component="profile"] #profile-details dd {
    margin: 0;
    color: var(--color, #415462);
}

[data-component="profile"] #profile-details dd a {
    color: var(--pico-primary, #0172ad);
    text-decoration: none;
}

[data-component="profile"] #profile-details dd a:hover {
    text-decoration: underline;
}

/* Skills Section */
[data-section="skills"] #profile-skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

[data-section="skills"] #profile-skills-list li {
    background: var(--pico-primary, #0172ad);
    color: var(--primary-inverse, white);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

[data-section="skills"] #profile-skills-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Experience Section */
[data-section="experience"] [data-role="experience-list"] {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

[data-component="experience-item"] {
    padding: 1.5rem;
    background: var(--card-background-color, #fff);
    border: 1px solid var(--muted-border-color, #e1e1e1);
    border-radius: var(--border-radius, 0.25rem);
    transition: box-shadow 0.2s;
}

[data-component="experience-item"]:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-component="experience-item"] h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: var(--h3-color, #24333e);
}

[data-component="experience-item"] [data-role="experience-dates"] {
    color: var(--muted-color, #73828c);
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

[data-component="experience-item"] [data-role="experience-description"] {
    color: var(--color, #415462);
    margin: 0.5rem 0 0 0;
    line-height: 1.6;
}

/* Education Section */
[data-section="education"] [data-role="education-list"] {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

[data-component="education-item"] {
    padding: 1.5rem;
    background: var(--card-background-color, #fff);
    border: 1px solid var(--muted-border-color, #e1e1e1);
    border-radius: var(--border-radius, 0.25rem);
}

[data-component="education-item"] h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: var(--h3-color, #24333e);
}

[data-component="education-item"] [data-role="education-degree"] {
    color: var(--pico-primary, #0172ad);
    font-weight: 500;
    margin: 0.25rem 0;
}

[data-component="education-item"] [data-role="education-field"] {
    color: var(--muted-color, #73828c);
    margin: 0.25rem 0;
}

/* Empty State */
[data-component="profile"] [data-state="empty"] {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-background-color, #fff);
    border: 2px dashed var(--muted-border-color, #e1e1e1);
    border-radius: var(--border-radius, 0.25rem);
}

[data-component="profile"] [data-state="empty"] p {
    font-size: 1.125rem;
    color: var(--muted-color, #73828c);
    margin-bottom: 1.5rem;
}

/* Dark Theme Support */
[data-theme="dark"] [data-component="profile"] {
    --h1-color: #e1e8ed;
    --h2-color: #e1e8ed;
    --h3-color: #e1e8ed;
    --color: #c1cad2;
    --muted-color: #a1adb8;
    --card-background-color: #1f2937;
    --muted-border-color: #374151;
}

[data-theme="dark"] [data-component="profile"] [data-role="avatar-container"] img[data-role="avatar"],
[data-theme="dark"] [data-component="profile"] [data-role="avatar-container"] [data-role="avatar-initials"] {
    border-color: #39a1c4;
}

[data-theme="dark"] [data-section="skills"] #profile-skills-list li {
    background: #39a1c4;
    color: #1f2937;
}

/* Responsive Design */
@media (max-width: 768px) {
    [data-component="profile"] {
        padding: 1rem;
    }

    /* Stack avatar and info on mobile */
    [data-component="profile"] [data-component="profile-header-main"] {
        flex-direction: column;
        text-align: center;
    }

    [data-component="profile"] [data-role="profile-info"] {
        text-align: center;
    }

    /* Smaller avatar on mobile */
    [data-component="profile"] [data-role="avatar-container"] img[data-role="avatar"],
    [data-component="profile"] [data-role="avatar-container"] [data-role="avatar-initials"] {
        width: 80px;
        height: 80px;
        font-size: 24px;
    }

    [data-component="profile"] #profile-name {
        font-size: 2rem;
    }

    [data-component="profile"] #profile-details {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    [data-component="profile"] #profile-details dt {
        font-size: 0.875rem;
        margin-top: 1rem;
    }

    [data-component="experience-item"],
    [data-component="education-item"] {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    [data-component="profile"] {
        padding: 0;
    }

    [data-role="profile-actions"] {
        display: none;
    }

    [data-component="profile"] section[data-section] {
        page-break-inside: avoid;
    }

    [data-section="skills"] #profile-skills-list li {
        border: 1px solid currentColor;
        background: transparent;
        color: inherit;
    }
}

/* Accessibility - Focus States */
[data-component="profile"] a:focus-visible,
[data-component="profile"] [role="button"]:focus-visible {
    outline: 2px solid var(--pico-primary, #0172ad);
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    [data-component="profile"] * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
