@import url('https://fonts.googleapis.com/css2?family=Merriweather&display=swap');

body {
    font-family: 'Merriweather', serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 0 1em;
}

.container {
    max-width: 42em;
    margin: 0 auto;
}

h1 {
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1rem;
}

a {
    color: #333;
    text-decoration: underline;
}

a:hover {
    color: #000;
    text-decoration: none;
}

/* Remove the list style from the links on the homepage */
ul.homepage-links {
    list-style: none;
    padding: 0;
    text-align: center;
    margin-top: 0;
}

ul.homepage-links li {
    display: inline-block;
    margin: 0 1em;
}

.profile-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

footer {
    text-align: center;
    margin-top: 2rem;
}

#time-in-sunnyvale {
    font-size: 0.9rem;
    color: #888;
}

#practice-sessions-list {
    list-style: none;
    padding: 0;
}

body.guitar-page .container {
    margin: 0;
}

body.guitar-page {
    align-items: flex-start;
    justify-content: flex-start;
}

body.guitar-page h1 {
    text-align: left;
}

[data-loading-overlay] {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: var(--loading-overlay-bg, #fff);
    color: var(--loading-overlay-color, #333);
    font-size: 1.5rem;
    text-transform: lowercase;
    z-index: 1000;
}

body.is-loading [data-loading-overlay] {
    display: flex;
}

body.is-loading [data-loading-hide] {
    visibility: hidden;
}

body.is-loaded [data-loading-hide] {
    visibility: visible;
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px; /* Soft minimalist touch */
    transition: opacity 0.3s ease;
}

.gallery-item img:hover {
    opacity: 0.9;
}

/* Pictures page layout */
body.pictures-page {
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    background: #f7f7f7;
}

body.pictures-page .container {
    max-width: 1400px;
    width: min(1400px, 100%);
    padding: 2rem 1.5rem;
}

body.pictures-page main {
    width: 100%;
}

body.pictures-page .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 0;
}

body.pictures-page .gallery-item {
    overflow: hidden;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

body.pictures-page .gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

body.pictures-page .gallery-item img:hover {
    transform: scale(1.03);
    opacity: 0.95;
}

body.pictures-page [data-loading-overlay] {
    background-color: #f7f7f7;
}

@media (min-width: 720px) {
    body.pictures-page .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 1080px) {
    body.pictures-page .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.75rem;
    }
}

body.pictures-page.lightbox-open {
    overflow: hidden;
}

body.pictures-page .lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.82);
    z-index: 1200;
}

body.pictures-page .lightbox.is-active {
    display: flex;
}

body.pictures-page .lightbox__image {
    max-width: min(90vw, 1200px);
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    object-fit: contain;
    background: #111;
}

body.pictures-page .lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

body.pictures-page .lightbox__close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.05);
}

.back-link-container {
    text-align: center;
    margin: 2rem 0 0.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.95rem;
    color: #666;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.back-link:hover {
    color: #555;
    text-decoration: none;
}

.back-link__icon {
    line-height: 1;
    font-size: 1.2rem;
}

.guitar-page .back-link-container,
.practice-page .back-link-container {
    text-align: center;
    margin: 1.5rem 0 0.25rem;
}

.guitar-page .back-link,
.practice-page .back-link {
    color: #555;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
