
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Times New Roman", Times, serif;
    color: #222;
    background: #f8f8f6;
}

/* Sidebar */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 230px;
    height: 100vh;
    padding: 40px 28px;
    background: #f0f0ed;
    overflow-y: auto;
    z-index: 10;
}

.site-name {
    display: block;
    margin-bottom: 55px;
    color: #222;
    text-decoration: none;
    font-size: 19px;
    letter-spacing: 2px;
    font-weight: bold;
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.main-nav > .nav-link {
    margin-bottom: 23px;
}

.main-nav > .nav-link:last-child {
    margin-bottom: 0;
}

.nav-link,
.nav-heading {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.nav-link:hover,
.sidebar-quick-links a:hover,
.nav-link.active {
    color: #999;
}

/* Projects dropdown */

.sidebar-projects {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    margin-bottom: 0;
    transition:
        max-height 0.8s ease,
        opacity 0.6s ease,
        margin-bottom 0.8s ease;
}

body.gallery-active .sidebar-projects {
    max-height: 300px;
    opacity: 1;
    pointer-events: auto;
    margin-bottom: 23px;
}

.nav-heading {
    font-weight: bold;
    opacity: 0;
    transform: translateY(-4px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

body.gallery-active .nav-heading {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.15s;
}

.sidebar-quick-links {
    display: flex;
    flex-direction: column;
    gap: 13px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-left: 12px;
    transition:
        max-height 0.8s ease 0.3s,
        opacity 0.6s ease 0.3s;
}

body.gallery-active .sidebar-quick-links {
    max-height: 150px;
    opacity: 1;
}

.sidebar-quick-links a {
    color: #555;
    font-size: 13px;
    text-decoration: none;
    opacity: 0;
    transform: translateY(-4px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

body.gallery-active .sidebar-quick-links a {
    opacity: 1;
    transform: translateY(0);
}

body.gallery-active .sidebar-quick-links a:nth-child(1) {
    transition-delay: 0.45s;
}

body.gallery-active .sidebar-quick-links a:nth-child(2) {
    transition-delay: 0.6s;
}

body.gallery-active .sidebar-quick-links a:nth-child(3) {
    transition-delay: 0.75s;
}

/* Gallery progress line and dot */


.scroll-indicator-track {
    position: absolute;
    top: var(--indicator-top, 0px);
    left: 30px;
    width: 1px;
    height: 0;
    background: #222;
    pointer-events: none;
    opacity: 0;
    transition:
        height 0.8s ease 0.3s,
        opacity 0.6s ease 0.3s;
}

body.gallery-active .scroll-indicator-track {
    height: var(--indicator-height, 0px);
    opacity: 1;
}


.scroll-indicator-dot {
    position: absolute;
    top: 0;
    left: -3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgb(224, 70, 55);
    transform: translateY(-50%);
}

/* Main content */

.main-content {
    margin-left: 230px;
    padding: 55px 7%;
}

.page-header {
    max-width: 750px;
    margin-bottom: 45px;
}

.eyebrow {
    color: #888;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

h1 {
    margin: 12px 0;
    font-size: clamp(38px, 6vw, 65px);
    font-weight: normal;
}

.intro {
    color: #777;
    line-height: 1.7;
}

/* Gallery quick links */

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 35px 0 85px;
    padding: 20px;
    border: 1px solid #ddd;
    background: #fff;
}

.quick-links a {
    padding: 9px 14px;
    color: #444;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #e3e3e3;
    transition: background 0.2s ease;
}

.quick-links a:hover {
    background: #eee;
}

/* Gallery sections */

.gallery-section {
    margin-bottom: 110px;
    min-height: 15000px;
    scroll-margin-top: 35px;
}

.section-heading {
    margin-bottom: 25px;
}

.section-heading h2 {
    margin: 8px 0;
    font-size: 30px;
    font-weight: normal;
}

.section-heading > a {
    color: #777;
    font-size: 13px;
    text-decoration: none;
}

.section-heading > a:hover {
    color: #222;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.gallery-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

/* Footer */

.site-footer {
    position: relative;
    isolation: isolate;
    padding: 45px 20px;
    border-top: 1px solid #ddd;
    background: transparent;
}

.site-footer::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 75%;
    height: 180px;
    left: 50%;
    bottom: -65px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(
    ellipse at center,
    rgba(105, 145, 180, 0.27) 0%,
    rgba(105, 145, 180, 0.16) 0%,
    rgba(105, 145, 180, 0.05) 80%,
    transparent 100%
);
filter: blur(22px);
    pointer-events: none;
}
/* Separate project and information pages */

.content-page {
    max-width: 850px;
    min-height: 70vh;
}

.content-page h1 {
    margin-bottom: 25px;
}

.content-page p {
    max-width: 650px;
    color: #666;
    line-height: 1.9;
}

/* Image lightbox */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    padding: 50px;
    background: rgba(0, 0, 0, 0.94);
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    border: 0;
    background: none;
    color: white;
    font-size: 42px;
    cursor: pointer;
}

/* Smaller screens */

@media (max-width: 750px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 22px;
    }

    .site-name {
        margin-bottom: 25px;
    }

    .main-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }

    .sidebar-projects {
        width: 100%;
        max-height: 300px;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-heading,
    .sidebar-quick-links,
    .sidebar-quick-links a {
        opacity: 1;
        transform: none;
    }

    .sidebar-quick-links {
        max-height: 150px;
    }

    .scroll-indicator-track {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 35px 22px;
    }

    .photo-grid {
        grid-template-columns: 1fr;
    }

    .lightbox {
        padding: 20px;
    }
}


/* =====================================
   TIME-BASED COLOUR THEMES
   Temporary 15-second preview
===================================== */

/* Default daytime colours */

body {
    --page-bg: #E7E1D7;
    --sidebar-bg: #DED8CE;
    --surface-bg: #F0EBE2;

    background-color: var(--page-bg);
    transition: background-color 1.5s ease;
}

.sidebar {
    background-color: var(--sidebar-bg);
    transition: background-color 1.5s ease;
}

.quick-links {
    background-color: var(--surface-bg);
    transition: background-color 1.5s ease;
}

/* MORNING: Cool silvery grey */

body.time-morning {
    --page-bg: #DFE1DC;
    --sidebar-bg: #D7D9D4;
    --surface-bg: #E9EAE5;
}

/* DAYTIME: Natural warm stone */

body.time-daytime {
    --page-bg: #E7E1D7;
    --sidebar-bg: #DED8CE;
    --surface-bg: #F0EBE2;
}

/* EVENING: Muted golden grey */

body.time-evening {
    --page-bg: #E2D7C5;
    --sidebar-bg: #D9CEBD;
    --surface-bg: #EBE2D4;
}
