/* Custom styles for Charlie Reisinger website */

/* ---- Amber accent (overrides Pico's default azure in both themes) ---- */
:root[data-theme="light"] {
    --pico-primary: #b45309;
    --pico-primary-hover: #92400e;
    --pico-primary-focus: rgba(217, 119, 6, 0.25);
    --pico-primary-background: #d97706;
    --pico-primary-hover-background: #b45309;
    --pico-primary-underline: rgba(180, 83, 9, 0.5);
    --pico-primary-inverse: #fff;
}

:root[data-theme="dark"] {
    --pico-primary: #fbbf24;
    --pico-primary-hover: #fcd34d;
    --pico-primary-focus: rgba(217, 119, 6, 0.375);
    --pico-primary-background: #d97706;
    --pico-primary-hover-background: #f59e0b;
    --pico-primary-underline: rgba(251, 191, 36, 0.5);
    --pico-primary-inverse: #fff;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    padding: 0.5rem 1rem;
    background: var(--pico-primary);
    color: #fff;
    z-index: 100;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

header {
    padding-top: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

header h1 {
    margin-bottom: 1.5rem;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Theme toggle button — fixed in the upper-right corner of the viewport */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pico-primary);
    background-color: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--pico-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.theme-toggle svg {
    width: 1.2rem;
    height: 1.2rem;
    stroke: currentColor;
}

/* Show the moon in light mode (click to go dark), the sun in dark mode */
.theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

.site-title {
    text-decoration: none;
    color: inherit;
}

.site-title:hover {
    color: var(--pico-primary);
}

header nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

header nav li {
    list-style: none;
    padding: 0;
    margin: 0;
}

header nav a {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--pico-border-radius);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

header nav a:hover {
    background-color: var(--pico-secondary-focus);
}

main {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.intro h2 {
    margin-bottom: 2rem;
}

.intro p {
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--pico-muted-border-color);
}

.social-links a,
.social-links button {
    margin: 0;
}

/* Social links as outlined amber pills (less blocky, matches the accent) */
.social-links .social-btn {
    padding: 0.45rem 1.25rem;
    background: transparent;
    color: var(--pico-primary);
    border: 1px solid var(--pico-primary);
    border-radius: 50rem;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.social-links .social-btn:hover,
.social-links .social-btn:focus-visible {
    background: var(--pico-primary-focus);
    border-color: var(--pico-primary);
    color: var(--pico-primary);
}

footer {
    padding-top: 2rem;
    padding-bottom: 2rem;
    border-top: 1px solid var(--pico-muted-border-color);
    text-align: center;
}

footer p {
    margin: 0;
    color: var(--pico-muted-color);
}

/* Teaching page styles */
.course-list {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--pico-card-background-color);
    border-radius: var(--pico-border-radius);
    border: 1px solid var(--pico-muted-border-color);
}

.course-list p {
    margin-bottom: 0.75rem;
}

.course-list p:last-child {
    margin-bottom: 0;
}

/* Writing page styles */
.publication-section {
    margin-top: 3rem;
}

.publication-section:first-child {
    margin-top: 0;
}

.publication-section h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--pico-muted-border-color);
}

.publication-section p {
    margin-bottom: 1.25rem;
}

.article-list {
    margin-top: 1.5rem;
    margin-left: 1rem;
}

.article-list p {
    margin-bottom: 1rem;
}

/* Speaking page styles */
.presentations-list p {
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    border-left: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.presentations-list p:hover {
    border-left-color: var(--pico-primary);
}

.presentations-list .first-presentation {
    margin-top: 3rem;
    padding: 1.5rem;
    background-color: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    border-left: 3px solid var(--pico-primary);
}

/* About page styles */
.about-content p {
    margin-bottom: 1.5rem;
}

.awards-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--pico-card-background-color);
    border-left: 3px solid var(--pico-primary);
    border-radius: var(--pico-border-radius);
}

.awards-section p {
    margin-bottom: 0;
}

.about-image {
    margin: 3rem 0;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--pico-border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Press/Media page styles */
.press-list p {
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    border-left: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.press-list p:hover {
    border-left-color: var(--pico-primary);
}

.featured-media {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: var(--pico-card-background-color);
    border-left: 3px solid var(--pico-primary);
    border-radius: var(--pico-border-radius);
}

.featured-media p {
    margin-bottom: 0;
    font-weight: 600;
    border-left: none;
}

.featured-media p:hover {
    border-left: none;
}

/* vCIO page styles */
.vcio-lede {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--pico-muted-color);
    margin-bottom: 2rem;
}

.vcio-section {
    margin-top: 3rem;
}

.vcio-section h3 {
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--pico-muted-border-color);
}

.vcio-services {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    padding-left: 1rem;
    border-left: 3px solid var(--pico-muted-border-color);
}

.vcio-services p {
    margin-bottom: 0.75rem;
}

.vcio-services p:last-child {
    margin-bottom: 0;
}

.vcio-callout {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background-color: var(--pico-card-background-color);
    border-left: 3px solid var(--pico-primary);
    border-radius: var(--pico-border-radius);
}

.vcio-callout p {
    margin: 0;
}

.vcio-no-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.vcio-no-item {
    padding: 0.5rem 1rem;
    background-color: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    font-size: 0.9rem;
}

.vcio-no-item span {
    font-weight: 700;
    color: var(--pico-primary);
    margin-right: 0.25rem;
}

.vcio-cta {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    text-align: center;
}

.vcio-cta p {
    margin-bottom: 1rem;
}

.vcio-cta p:last-child {
    margin-bottom: 0;
}

.vcio-footnote {
    font-size: 0.85rem;
    color: var(--pico-muted-color);
}

/* 404 Error page styles */
.error-page {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    margin: 0;
    color: var(--pico-primary);
    line-height: 1;
}

.error-content h2 {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.error-content p {
    margin-bottom: 2rem;
    color: var(--pico-muted-color);
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.error-actions a {
    margin: 0;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    header nav ul {
        flex-direction: column;
    }

    header nav a {
        display: block;
        text-align: left;
    }

    .social-links {
        flex-direction: column;
    }

    .social-links a,
    .social-links button {
        width: 100%;
    }

    .error-code {
        font-size: 6rem;
    }

    .error-actions {
        flex-direction: column;
    }

    .error-actions a {
        width: 100%;
    }
}