* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #292929;
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.layout-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    min-width: 250px;
    padding: 2rem 0.5rem 2rem 2rem;
    background-color: #ffffff;
    border-right: none;
    display: flex;
    flex-direction: column;
}

.site-title {
    margin-bottom: 3rem;
}

.site-title h1 {
    font-size: 1.1rem;
    font-weight: 300;
    text-transform: lowercase;
    line-height: 1.4;
}

.title-line {
    display: block;
    letter-spacing: 0.15em;
}

.title-link {
    color: #292929;
    text-decoration: none;
    transition: opacity 0.3s ease;
    display: block;
}

.title-link:hover {
    opacity: 0.6;
}

.nav-menu {
    margin-top: 0;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: #292929;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: lowercase;
    transition: opacity 0.3s ease;
    display: block;
}

.nav-menu a:hover {
    opacity: 0.6;
}

.dark-mode-btn {
    background: none;
    border: none;
    color: #292929;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: lowercase;
    cursor: pointer;
    padding: 0;
    margin: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    transition: opacity 0.3s ease;
    display: block;
    text-align: left;
    width: 100%;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.dark-mode-btn:hover {
    opacity: 0.6;
}

/* Dark mode styles */
body.dark-mode {
    background-color: #292929;
    color: #ffffff;
}

body.dark-mode .sidebar {
    background-color: #292929;
}

body.dark-mode .content-area {
    background-color: #292929;
}

body.dark-mode .title-link,
body.dark-mode .nav-menu a,
body.dark-mode .dark-mode-btn,
body.dark-mode .section p,
body.dark-mode .links a {
    color: #ffffff !important;
}

.content-area {
    flex: 1;
    padding: 2rem 2rem 2rem 0.5rem;
    overflow-y: auto;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    max-width: 100%;
    margin-top: 1rem;
}

/* Dark mode: 2 columns, show first 2 images (fig and bird) side by side, fig bigger */
body.dark-mode .image-gallery {
    grid-template-columns: 1fr 1fr;
}

body.dark-mode .image-item:nth-child(1),
body.dark-mode .image-item:nth-child(2) {
    display: block;
}

body.dark-mode .image-item:nth-child(n+3) {
    display: none;
}

body.dark-mode .image-item img {
    width: 100%;
    height: auto;
    display: block;
}

.image-item {
    width: 100%;
}

.image-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 4rem;
}

.content {
    margin-top: 0;
}

.content-area .content {
    max-width: 100%;
}

.links {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.links a {
    color: #292929;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

.links a:hover {
    opacity: 0.6;
}

.image-toggle-container {
    margin-bottom: 3rem;
}

.image-toggle-btn {
    background: none;
    border: 1px solid #000000;
    color: #000000;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: lowercase;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.image-toggle-btn:hover {
    background-color: #000000;
    color: #ffffff;
}

.image-container {
    min-height: 300px;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
}

.image-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

.quote {
    font-style: italic;
    font-size: 1.1rem;
    color: #292929;
    margin-top: 2rem;
}

.section {
    margin-top: 0;
    padding-top: 0;
}

.section h2 {
    font-size: 1.5rem;
    font-weight: 300;
    text-transform: lowercase;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
}

.section p {
    color: #292929;
    line-height: 1.6;
    font-size: 0.9rem;
    text-align: left;
    max-width: 100%;
}

.section ul {
    list-style: disc;
    margin: 1rem 0;
    padding-left: 1.5rem;
    color: #292929;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.section li {
    margin: 0.25rem 0;
    line-height: 1.6;
    font-size: 0.9rem;
    color: #292929;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body.dark-mode .section ul,
body.dark-mode .section li {
    color: #ffffff;
}


.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: none;
    border: 1px solid #000000;
    color: #000000;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: lowercase;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #000000;
    color: #ffffff;
}

@media (max-width: 768px) {
    .layout-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: auto;
        padding: 1.5rem;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .site-title {
        margin-bottom: 1.5rem;
    }

    .site-title h1 {
        font-size: 1.2rem;
    }

    .content-area {
        padding: 1.5rem;
    }

    .image-gallery {
        gap: 1.5rem;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
    }
}

