/* ── Hide top navbar search ── */
.bd-header .bd-search,
.bd-header .search-button__wrapper,
.bd-header [class*="search"] {
    display: none !important;
}

/* ── Hide right "On this page" sidebar ── */
.bd-sidebar-secondary {
    display: none !important;
}

/* ── Profile Sidebar ── */
.sidebar-profile {
    text-align: center;
    padding: 1.5rem 1rem;
}

.profile-photo-wrap {
    margin-bottom: 1rem;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e2e8f0;
}

.profile-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 0.25rem;
}

.profile-name a {
    color: var(--pst-color-text-base) !important;
    text-decoration: none !important;
}

.profile-name a:hover,
.profile-name a:active {
    color: var(--pst-color-primary) !important;
    text-decoration: none !important;
}

.profile-bio {
    font-size: 0.95rem;
    color: #718096;
    margin: 0 0 1rem;
}

.profile-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-links li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    font-size: 0.9rem;
    color: #586069;
}

.profile-links li svg {
    flex-shrink: 0;
    color: #718096;
}

.profile-links a {
    color: #586069;
    text-decoration: none;
}

.profile-links a:hover {
    color: #58a6ff;
}

/* ── Body text color (not titles) ── */
.bd-article p,
.bd-article li,
.bd-article dd {
    color: #2d3748;
}

html[data-theme="dark"] .bd-article p,
html[data-theme="dark"] .bd-article li,
html[data-theme="dark"] .bd-article dd {
    color: #a0aec0;
}

/* ── Home Page Hero ── */
.hero-intro .tagline {
    font-size: inherit;
    color: #2d3748;
    line-height: inherit;
    font-family: inherit;
}

html[data-theme="dark"] .hero-intro .tagline {
    color: #a0aec0;
}

/* ── Section Cards Grid ── */
.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.section-card {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.5rem;
    text-decoration: none !important;
    color: inherit;
    display: block;
    transition: box-shadow 0.2s, transform 0.2s;
}

.section-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.section-card h3 {
    color: #1a202c;
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.section-card p {
    color: #718096;
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.5;
}

/* ── Dark Mode ── */
html[data-theme="dark"] .profile-name {
    color: #e6edf3;
}

html[data-theme="dark"] .profile-bio,
html[data-theme="dark"] .profile-links li,
html[data-theme="dark"] .profile-links a,
html[data-theme="dark"] .profile-links li svg {
    color: #8b949e;
}

html[data-theme="dark"] .profile-photo {
    border-color: #444;
}

html[data-theme="dark"] .section-card {
    background: #1e1e1e;
    border-color: #333;
}

html[data-theme="dark"] .section-card h3 {
    color: #e6edf3;
}

html[data-theme="dark"] .section-card p {
    color: #8b949e;
}

html[data-theme="dark"] .section-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ── Hide footer Sphinx/theme credits but keep copyright ── */
.bd-footer p.sphinx-version,
.bd-footer p.theme-version,
.bd-footer .footer-items__end {
    display: none !important;
}

.bd-footer p.copyright {
    color: #a0aec0;
}
