/* ==== Reset & Base ==== */
*,
*::before,
*::after { box-sizing: border-box; margin:0; padding:0; }
html { font-family: system-ui, -apple-system, sans-serif; line-height: 1.5; }
body { min-height: 100vh; display: flex; flex-direction: column; background:#f9f9fb; color:#333; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ==== Layout ==== */
.container { flex: 1; max-width: 1100px; margin: 2rem auto; padding: 0 1rem; }
footer { text-align:center; padding:1rem; background:#222; color:#eee; font-size:0.9rem; }

/* ==== Navbar ==== */
/* ==== FIXED NAVBAR ==== */
.navbar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #222;
    color: #fff;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.nav-brand { font-weight: bold; font-size: 1.2rem; }
.nav-toggle { display:none; background:none; border:none; color:#fff; font-size:1.5rem; cursor:pointer; }

.nav-menu { display: flex; gap: 1.5rem; }
.nav-menu a { padding: .25rem .5rem; border-radius: 4px; transition: background .2s; }
.nav-menu a:hover, .nav-menu a.active { background: rgba(255,255,255,.2); }

/* Mobile */
@media (max-width: 640px) {
    .nav-toggle { display: block; }
    .nav-menu { position: fixed; top: 0; right: -100%; width: 70%; height: 100vh; background: #222; flex-direction: column; padding: 4rem 1rem; transition: right .3s; }
    .nav-menu.active { right:0; }
    .nav-menu a { display:block; margin:.5rem 0; font-size:1.1rem; }
}

/* ==== Page Specific ==== */
.about-content { display:flex; gap:2rem; align-items:center; flex-wrap:wrap; margin-top:1.5rem; }
.profile-img { border-radius:50%; width:180px; height:180px; object-fit:cover; }

.snowfall .controls { margin:1.5rem 0; display:flex; gap:.5rem; flex-wrap:wrap; align-items:center; }
.snowfall select, .snowfall button { padding:.5rem .75rem; font-size:1rem; }
.snowfall button { background:#0066cc; color:#fff; border:none; border-radius:4px; cursor:pointer; }
.snowfall button:hover { background:#0055aa; }

.results {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.85); /* BLACK background */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #eee;
    font-size: 1.1rem;
    line-height: 1.6;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
}

.results h3 {
    margin: 0 0 1rem;
    color: #fff;
    font-size: 1.4rem;
    text-align: center;
}

.results ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.results li {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.results li:last-child {
    border-bottom: none;
}
.placeholder { color:#777; font-style:italic; }
/* ==== About Page Background ==== */
.about-bg {
    background: url('images/about-bg.jpg') center/cover no-repeat fixed;
    position: relative;
}

/* Optional: dark overlay so text stays readable */
.about-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* Dark tint */
    z-index: 0;
}

/* Ensure content appears above overlay */
.about-bg .container,
.about-bg .navbar,
.about-bg footer {
    position: relative;
    z-index: 1;
}

/* Optional: improve text contrast on dark backgrounds */
.about-bg .about h1,
.about-bg .about p,
.about-bg .about-content {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.7);
}
.about-bg .profile-img {
    border: 4px solid rgba(255,255,255,.8);
}

/* ==== About Card – Desktop: Text Right | Mobile: Text Below ==== */
.about-card {
    background: rgba(30,30,30, 0.80);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.about-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.intro {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.extra {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.extra p {
    margin: 0.75rem 0;
}

/* Mobile: Stack image on top, full text below */
@media (max-width: 640px) {
    .about-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
    }
    .profile-img {
        width: 150px;
        height: 150px;
    }
}

/* Ensure text stays readable over background */
.about-bg .about h1 {
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,.6);
    text-align: center;
}

/* ==== Ultra Runs Page ==== */
.ultra-list h1 { text-align: center; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.8); }
.ultra-card {
    background: rgba(20, 20, 20, 0.88);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem auto;
    max-width: 800px;
    color: #eee;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.ultra-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid rgba(255,255,255,.2);
    padding-bottom: .5rem;
    margin-bottom: .75rem;
}
.ultra-header h2 { margin: 0; font-size: 1.5rem; }
.ultra-date { font-weight: bold; color: #4da6ff; }
.ultra-details p { margin: .4rem 0; }
.coming-soon { text-align: center; font-style: italic; color: #aaa; margin-top: 2rem; }

/* ==== Gallery Page ==== */
.gallery h1 { text-align: center; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.8); }
.gallery-subtitle { text-align: center; color: #ccc; font-style: italic; margin-bottom: 2rem; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
}
.gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
    transition: transform .2s, box-shadow .2s;
}
.gallery-grid img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,.4);
}
.gallery-note { text-align: center; color: #aaa; margin-top: 2rem; font-style: italic; }

/* Mobile adjustments */
@media (max-width: 640px) {
    .ultra-card { padding: 1.2rem; }
    .gallery-grid { grid-template-columns: 1fr; }
}

/* ==== Gallery Card – Opaque Black Glass (Like About Me) ==== */
.gallery-card {
    background: rgba(20, 20, 20, 0.88);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin: 1.5rem auto;
    max-width: 1100px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    color: #eee;
}

.gallery-subtitle {
    text-align: center;
    font-style: italic;
    margin-bottom: 1.5rem;
    color: #ccc;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
    transition: transform .2s, box-shadow .2s;
}

.gallery-grid img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,.4);
}

.gallery-note {
    text-align: center;
    font-style: italic;
    color: #aaa;
    margin: 0;
}

/* Mobile: Stack grid */
@media (max-width: 640px) {
    .gallery-card {
        padding: 1.5rem;
        margin: 1rem;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ==== Gallery Thumbnails with Hover Captions ==== */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
    transition: transform .2s, box-shadow .2s;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,.4);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 0.8rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0,0,0,.8);
    transform: translateY(50%);
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
    pointer-events: none;
}

.gallery-item:hover .caption-overlay,
.gallery-item:focus-within .caption-overlay {  /* For mobile tap */
    transform: translateY(0);
    opacity: 1;
}

/* Lightbox link fills the item */
.gallery-item a {
    display: block;
    color: inherit;
}

/* ==== LIGHTBOX ==== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    color: #fff;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    text-shadow: 0 0 8px rgba(0,0,0,.8);
}

.lightbox-close:hover {
    color: #ff5a5a;
}

/* Optional: Smooth fade-in */
.lightbox {
    opacity: 0;
    transition: opacity .2s;
}
.lightbox.active {
    opacity: 1;
}

/* Prevent page scroll when lightbox open */
body.lightbox-open {
    overflow: hidden;
}

/* ==== Snowfall Page Background ==== */
.snowfall-bg {
    background: url('images/snowfall-bg.jpg') center/cover no-repeat fixed;
    position: relative;
}

/* Optional: dark overlay so text stays readable */
.snowfall-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* Dark tint */
    z-index: 0;
}

/* Ensure content appears above overlay */
.snowfall-bg .container,
.snowfall-bg .navbar,
.snowfall-bg footer {
    position: relative;
    z-index: 1;
}

/* ==== Snowfall Card – Opaque Black Glass (Like Other Pages) ==== */
.snowfall-card {
    background: rgba(20, 20, 20, 0.88);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin: 1.5rem auto;
    max-width: 800px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    color: #eee;
}

.snowfall-card h1 {
    color: #fff;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0,0,0,.8);
    margin-bottom: 1.5rem;
}

/* ==== Snowfall Controls – Modern, Clean, High-Contrast ==== */
.snowfall .controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
    font-family: system-ui, -apple-system, sans-serif;
}

.snowfall .controls label {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 0 1px 3px rgba(0,0,0,.7);
    white-space: nowrap;
}

.snowfall select {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #222;
    border: none;
    border-radius: 12px;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    transition: all .2s ease;
}

.snowfall select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.4);
    background-color: #fff;
}

.snowfall button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    transition: all .2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.snowfall button:hover {
    background: #0055aa;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,.3);
}

.snowfall button:active {
    transform: translateY(0);
}

/* Mobile: Stack vertically */
@media (max-width: 640px) {
    .snowfall .controls {
        flex-direction: column;
        align-items: stretch;
    }
    .snowfall .controls label {
        text-align: center;
        margin-bottom: 0.5rem;
    }
    .snowfall select,
    .snowfall button {
        width: 100%;
    }
}

/* ==== Snowfall Results – Stacked Metric Cards ==== */
.results-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.metric-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    transition: transform .15s ease, box-shadow .15s ease;
}

.metric-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.metric-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 1rem;
    color: #333;
}

.metric-label > div:first-child {
    font-weight: 600;
    font-size: 1.1rem;
}

.verified {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: #000;
    letter-spacing: -1px;
}

/* Placeholder */
.placeholder {
    text-align: center;
    color: #aaa;
    font-style: italic;
    margin: 2rem 0;
}

/* Mobile */
@media (max-width: 640px) {
    .metric-card {
        padding: 1rem;
    }
    .metric-value {
        font-size: 1.9rem;
    }
}

