@font-face {
    font-family: 'OpenDyslexic';
    src: url('https://cdn.jsdelivr.net/npm/open-dyslexic@1.0.3/otf/OpenDyslexic-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'Candara', 'Calibri', 'Trebuchet MS', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #e8e8e8;
    background-color: #232b35;
}

.container {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.tagline {
    font-size: 1.2rem;
    color: #b8b8b8;
    margin-bottom: 30px;
}

/* Navigation */
.nav {
    margin-bottom: 30px;
    background-color: #2d3742;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav span {
    display: inline-block;
    margin: 0 15px;
    color: #95a5a6;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    cursor: default;
}

.nav a {
    display: inline-block;
    margin: 0 15px;
    color: #95a5a6;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: color 0.3s;
}

.nav a:hover {
    color: #ffffff;
}

.nav span.active, .nav a.active {
    color: #ffffff;
    border-bottom: 2px solid #ffffff;
}

.content-box {
    background-color: #2d3742;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 30px;
}

h2 {
    font-size: 1rem;
    margin-bottom: 30px;
    color: #ffffff;
}

p {
    font-size: 1rem;
    margin-bottom: 20px;
}

/* Random photo preview styles */
.random-photo-preview {
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s;
}

.random-photo-preview:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.random-photo-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.photo-info {
    margin-top: 15px;
    font-size: 0.95rem;
    color: #b8b8b8;
}

.photo-info a {
    color: #b8b8b8;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: bold;
}

.photo-info a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Logo styles */
.logo-container {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.main-logo {
    max-width: 400px;
    height: auto;
    margin: 10px 0;
}

.copyright {
    font-size: 0.9rem;
    color: #95a5a6;
    margin-top: 40px;
    margin-bottom: 10px;
}

.contact {
    font-size: 1rem;
    margin-bottom: 30px;
}

.contact a {
    color: #b8b8b8;
    text-decoration: none;
    transition: color 0.3s;
}

.contact a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    margin: auto;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.close-lightbox {
    color: white;
    font-size: 30px;
    position: absolute;
    top: 20px;
    right: 30px;
    cursor: pointer;
    z-index: 1002;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 50px;
    cursor: pointer;
    opacity: 0.7;
    z-index: 1002;
    transition: opacity 0.3s, background-color 0.3s;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.lightbox-nav:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.5);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1002;
    text-align: center;
    max-width: 80%;
    line-height: 1.6;
}

.lightbox-caption a {
    color: #88ccff;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: bold;
}

.lightbox-caption a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.gallery-source {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #aaaaaa;
}

/* Font toggle */
.font-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #2d3742;
    color: #e8e8e8;
    border: 1px solid #95a5a6;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
    z-index: 100;
}

.font-toggle:hover {
    background-color: #95a5a6;
}

.dyslexic-font * {
    font-family: 'OpenDyslexic', 'Comic Sans MS', 'Trebuchet MS', Arial, sans-serif !important;
}
/* Gallery-specific styles */
.random-photo-btn {
    background-color: #2d3742;
    color: #e8e8e8;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 20px;
    transition: background-color 0.3s;
}

.random-photo-btn:hover {
    background-color: #909090;
}

/* Photo item styles */
.photo-item {
    margin-bottom: 0;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    break-inside: avoid;
    margin-bottom: 5px;
}

.photo-item.loaded {
    opacity: 1;
}

.photo-item.loading {
    background: linear-gradient(90deg, #2d3742 0%, #3d4752 50%, #2d3742 100%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    min-height: 200px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.photo-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    transition: opacity 0.3s, transform 0.3s;
}

/* Gallery caption overlay */
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    font-size: 12px;
    line-height: 1.4;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    text-align: left;
}

/* Desktop hover effect */
@media (hover: hover) and (pointer: fine) {
    .photo-item:hover img {
        opacity: 0.9;
        transform: scale(1.02);
    }
    
    .photo-item:hover .gallery-caption {
        transform: translateY(0);
    }
}

/* Mobile/tablet tap effect */
@media (hover: none) or (pointer: coarse) {
    .photo-item.caption-visible .gallery-caption {
        transform: translateY(0);
    }
    
    .photo-item.caption-visible img {
        opacity: 0.9;
    }
    
    .photo-item::after {
        content: "ⓘ";
        position: absolute;
        top: 10px;
        right: 10px;
        background-color: rgba(255, 255, 255, 0.9);
        color: #333;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        opacity: 0.8;
        transition: opacity 0.3s;
    }
    
    .photo-item.caption-visible::after {
        opacity: 0.3;
    }
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    background-color: #2d3742;
    color: #e8e8e8;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #909090;
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background-color: #909090;
    color: #fff;
}

.page-info {
    color: #b8b8b8;
    font-size: 0.9rem;
}

.photos-per-page {
    background-color: #2d3742;
    color: #e8e8e8;
    border: 1px solid #909090;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.view-toggle {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.view-btn {
    background-color: #2d3742;
    color: #e8e8e8;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.view-btn.active {
    background-color: #909090;
    color: #fff;
}

.view-btn:hover {
    background-color: #909090;
}

.image-caption {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1002;
    text-align: center;
    max-width: 80%;
    line-height: 1.4;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-caption.visible {
    display: block;
    opacity: 1;
}

.info-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    z-index: 1002;
    transition: background-color 0.3s;
    border: 2px solid transparent;
}

.info-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.info-btn.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: white;
}

.keyboard-hint {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    z-index: 1002;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 12px 24px;
    border-radius: 8px;
    display: none;
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .keyboard-hint {
        display: block;
    }
}

/* CSS Columns Layout */
.photo-grid {
    column-count: 4;
    column-gap: 5px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .photo-grid {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .photo-grid {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .photo-grid {
        column-count: 1;
    }
}
/* Add these styles to your existing styles.css file */

/* Essay/Musings specific styles */
.essay {
    background-color: #2d3742;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 30px;
    text-align: left;
}

.essay-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #ffffff;
    text-align: center;
}

.essay-date {
    font-size: 0.9rem;
    color: #95a5a6;
    margin-bottom: 15px;
    text-align: center;
}

.essay-summary {
    font-size: 1rem;
    color: #e8e8e8;
    margin-bottom: 20px;
    line-height: 1.6;
}

.essay-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #e8e8e8;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease, margin-top 0.5s ease;
    margin-top: 0;
}

.essay-content.expanded {
    max-height: 10000px; /* Large enough to fit any essay */
    opacity: 1;
    margin-top: 20px;
}

.essay-content p {
    margin-bottom: 20px;
}

.read-more-btn {
    background-color: #95a5a6;
    color: #232b35;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
    display: block;
    margin: 0 auto;
}

.read-more-btn:hover {
    background-color: #ffffff;
    transform: translateY(-2px);
}

.read-more-btn:active {
    transform: translateY(0);
}