﻿.profile-card {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    margin: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    background: var(--card-bg);
    border: 0;
}
.profile-card-hero {
    position: relative;
    min-height: 196px;
    padding: 18px 22px 0;
    padding-left: 16px;
    background: color-mix(in srgb, var(--bg-secondary) 84%, var(--card-bg));
}
.theme-switch {
    position: absolute;
    top: 16px;
    right: 18px;
    z-index: 2;
    width: 64px;
    height: 34px;
    cursor: pointer;
}
.theme-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.theme-switch-track {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 999px;
    background: linear-gradient(135deg, #76c7ff, #dff5ff);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 8px 18px rgba(0, 0, 0, 0.22);
    transition: background 0.22s ease;
}
.theme-switch-track::before,
.theme-switch-track::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.theme-switch-track::before {
    width: 5px;
    height: 5px;
    top: 9px;
    right: 14px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: -12px 7px 0 rgba(255, 255, 255, 0.78), 8px 10px 0 rgba(255, 255, 255, 0.72);
    opacity: 0;
}
.theme-switch-track::after {
    width: 18px;
    height: 7px;
    left: 31px;
    top: 19px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: -9px 2px 0 1px rgba(255, 255, 255, 0.64);
}
.theme-switch-orb {
    position: absolute;
    left: 4px;
    top: 4px;
    z-index: 1;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ffd65a;
    box-shadow: 0 0 14px rgba(255, 214, 90, 0.7);
    transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}
.theme-switch-orb::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #172033;
    opacity: 0;
    transform: translate(-8px, -3px) scale(0.92);
    transition: opacity 0.22s ease;
}
.theme-switch input:checked + .theme-switch-track {
    background: linear-gradient(135deg, #172033, #08111f);
}
.theme-switch input:checked + .theme-switch-track::before {
    opacity: 1;
}
.theme-switch input:checked + .theme-switch-track::after {
    opacity: 0;
    transform: translateX(10px);
}
.theme-switch input:checked + .theme-switch-track .theme-switch-orb {
    transform: translateX(30px);
    background: #f4f7ff;
    box-shadow: 0 0 12px rgba(190, 210, 255, 0.34);
}
.theme-switch input:checked + .theme-switch-track .theme-switch-orb::after {
    opacity: 1;
}
.profile-avatar {
    width: 96px;
    height: 96px;
    margin: 28px auto -14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-soft));
    background-size: cover;
    background-position: center;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    font-weight: 800;
    border: 4px solid color-mix(in srgb, var(--bg-secondary) 84%, var(--card-bg));
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}
.profile-avatar.has-photo { color: transparent; }
.profile-name {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
}
.profile-subtitle {
    flex: 0 1 auto;
    min-width: 0;
    color: color-mix(in srgb, var(--text-hint) 84%, var(--text));
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-meta-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.profile-since {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--text-hint);
    font-size: 12px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-since:empty {
    display: none;
}
.profile-since:not(:empty)::before {
    content: "·";
    margin-right: 8px;
    opacity: 0.7;
}
.profile-card-footer {
    padding: 28px 20px 18px;
    background: var(--bg);
}
.profile-subject-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
}
.profile-subject-icons {
    display: flex;
    align-items: center;
}
.profile-subject-icons img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: contain;
}
.profile-subject-copy {
    min-width: 0;
}
.profile-subject-label {
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
}
.profile-learning-inline {
    margin-top: 4px;
    color: var(--text-hint);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}
.profile-settings-btn {
    width: 40px;
    height: 40px;
    border: 1px solid color-mix(in srgb, var(--card-border) 78%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bg-secondary) 84%, transparent);
    color: var(--text-hint);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.profile-settings-btn:active {
    transform: scale(0.96);
    color: var(--accent-soft);
}
.profile-settings-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.profile-actions {
    display: grid;
    gap: 10px;
    margin: 14px 16px 0;
}
#screen-profile > .stats-row,
#screen-profile > .overview-card {
    margin-right: 16px;
    margin-left: 16px;
}
#screen-profile > .stats-row .stat-box {
    background: var(--bg);
    border-color: transparent;
    box-shadow: none;
}
.profile-action {
    width: 100%;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text);
    padding: 14px 16px;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}
