/* Shared CSS for strohfeldt.net */

/* 1. Define colors as variables for easy management */
:root {
    /* Light Mode Colors (Default) */
    --page-background: #eef2f5;
    --neu-shadow-dark: #d1d5d8;
    --neu-shadow-light: #ffffff;
}

/* 2. Redefine variables for users in Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        /* Dark Mode Colors */
        --page-background: #1f2428; /* A dark, slightly blue-ish charcoal */
        --neu-shadow-dark: #191d20; /* The darker shadow */
        --neu-shadow-light: #252b2f; /* The lighter "highlight" */
    }
}

/* 3. Apply the theme-aware background color */
body { 
    background-color: var(--page-background);
    transition: background-color 0.3s ease; /* Smooth transition between modes */
}

/* Banner styles */
.page-banner {
    width: 100%; 
    padding: 4rem 1rem; 
    text-align: center; 
    color: var(--pico-primary-inverse);
    background-size: cover;
    background-position: center;
}

.page-banner h1 { 
    margin-bottom: 0.5rem; 
    color: inherit; 
}

.page-banner p { 
    margin-top: 0; 
    font-size: 1.2rem; 
    opacity: 0.9; 
    color: inherit; 
}

/* Enhanced focus indicators for accessibility */
a:focus, button:focus, [role="button"]:focus {
    outline: 3px solid var(--pico-primary);
    outline-offset: 2px;
    border-radius: 3px;
}

/* Icon link styles */
.icon-link {
    display: inline-flex; 
    align-items: center; 
    gap: 0.75rem; 
    text-decoration: none;
    font-size: 1.1rem; 
    margin: 0.5rem 0;
}

.icon-link svg { 
    width: 24px; 
    height: 24px; 
    fill: var(--pico-primary); 
}

.icon-link:focus {
    background-color: var(--pico-primary-focus);
    outline: 3px solid var(--pico-primary);
    outline-offset: 2px;
}

/* Special styling for Strava link */
#strava-link svg { 
    fill: #FC5200; 
}

/* Footer styles */
footer { 
    text-align: center; 
    padding: 2rem 0; 
    background-color: var(--page-background); 
}

/* Card styles for clickable cards */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card {
    border: 1px solid var(--pico-card-border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--pico-card-background-color);
}

.card-link:hover .card {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border-color: var(--pico-primary);
}

.card-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: top;
    background-color: var(--pico-secondary-background);
    transition: all 0.3s ease;
}

.card-link:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: var(--pico-card-padding);
    flex-grow: 1;
    transition: all 0.3s ease;
}

.card-content h3 {
    margin-top: 0;
    transition: color 0.3s ease;
}

.card-link:hover .card-content h3 {
    color: var(--pico-primary);
}

/* Site content section styles (for main page) */
.site-content-section article a {
    text-decoration: none; 
}

.site-content-section article {
    background: none;
    border: none;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.site-content-section article:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.site-content-section article img {
    width: 120px;
    height: 120px;
    padding: 25px;
    background: var(--page-background);
    border-radius: 50%;
    object-fit: contain;
    margin-bottom: 1rem;
    box-shadow: 9px 9px 18px var(--neu-shadow-dark), 
                -9px -9px 18px var(--neu-shadow-light);
    transition: all 0.3s ease;
}

.site-content-section article:hover img {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.site-content-section article strong {
    font-size: 1.1rem;
    color: var(--pico-h-color);
    transition: color 0.3s ease;
}

.site-content-section article:hover strong {
    color: var(--pico-primary);
}