/* ...move all .projects-list, .project-list, .project-item, .project-link, etc. styles here... */
.projects-list {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 0 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.project-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    align-self: center;
}

.project-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    margin: 0;
    background: none;
    box-shadow: none;
    border: none;
    transition: box-shadow 0.2s;
    position: relative;
    min-height: 260px;
}

.project-item:nth-child(even) .project-thumbnail {
    order: 2;
}

.project-item:nth-child(even) .project-info {
    order: 1;
    text-align: right;
    align-items: flex-end;
}

.project-link {
    display: flex;
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: inherit;
    gap: 0;
    background: none;
    padding: 0;
}

.project-thumbnail {
    flex: 0 0 56%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 320px;
    max-width: 520px;
    width: 720px; /* Force a fixed width */
    height: 260px;
    margin: 0 2.5rem 0 0;
    background: #e8eaf6;
    box-shadow: 0 2px 24px rgba(97,109,203,0.10);
    border-radius: 0;
    overflow: hidden;
    transition: box-shadow 0.18s, border 0.18s;
}

.project-item:nth-child(even) .project-thumbnail {
    margin: 0 0 0 2.5rem;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: none;
    border-radius: 0;
}

.project-link:hover .project-thumbnail img {
    opacity: 0.92;
}

.project-info {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin: 0 0.2em;
    padding: 0 0.5rem;
    min-width: 0;
    max-width: 340px;
    position: relative;
}

.project-info h2 {
    margin: 0 0 0.7rem 0;
    font-size: 1.35rem;
    color: var(--savoy-blue);
    font-family: "DM Sans", "Inter", "Montserrat", "Futura", Arial, sans-serif;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    line-height: 1.1;
}

.project-info p {
    margin: 0 0 0.2rem 0;
    font-size: 1.08rem;
    color: #222;
    line-height: 1.5;
    font-family: "Inter", "Montserrat", Arial, sans-serif;
    font-weight: 400;
    letter-spacing: 0.01em;
    background: none;
    border-left: none;
    border-right: none;
    padding-left: 0.8em;
    padding-right: 0.8em;
    /* visually sharp, not rounded */
}

/* Left-aligned image (odd rows): summary line on left */
.project-item:nth-child(odd) .project-info p {
    border-left: 3px solid var(--vista-blue);
    border-right: none;
    padding-left: 0.8em;
    padding-right: 0;
}

/* Right-aligned image (even rows): summary line on right */
.project-item:nth-child(even) .project-info p {
    border-left: none;
    border-right: 3px solid var(--vista-blue);
    padding-left: 0;
    padding-right: 0.8em;
    text-align: right;
}

.date {
    text-align: center;
    font-weight: 500;
    font-style: italic;
    margin: 10px 0 18px 0;
    color: var(--savoy-blue-2);
    font-size: 1.08rem;
    letter-spacing: 0.04em;
}

/* --- Responsive: Projects List --- */
@media (max-width: 1000px) {
    .project-thumbnail {
        min-width: 220px;
        max-width: 350px;
        width: 260px; /* Force a fixed width for medium screens */
        height: 180px;
        margin: 0 1.2rem 0 0;
    }

    .project-item:nth-child(even) .project-thumbnail {
        margin: 0 0 0 1.2rem;
    }

    .project-info {
        max-width: 220px;
    }
}

@media (max-width: 700px) {
    .projects-list {
        padding: 1.2rem 0 1.2rem 0;
        gap: 1.5rem;
    }

    .project-list {
        gap: 2rem;
    }

    .project-item,
    .project-link {
        flex-direction: column;
        align-items: stretch;
        min-height: 0;
    }

    .project-thumbnail,
    .project-item:nth-child(even) .project-thumbnail {
        margin: 0 0 1.1rem 0;
        min-width: 0;
        max-width: 100vw;
        width: 100vw; /* Full width on small screens */
        height: 38vw;
        min-height: 120px;
        max-height: 220px;
        order: 1 !important;
    }

    .project-info,
    .project-item:nth-child(even) .project-info {
        align-items: flex-start;
        text-align: left;
        max-width: 100vw;
        padding: 0 0.2rem;
        order: 2 !important;
    }
}

@media (max-width: 480px) {
    .projects-list {
        padding: 0.5rem 0 0.5rem 0;
    }

    .project-list {
        gap: 1.2rem;
    }

    .project-thumbnail {
        height: 32vw;
        min-height: 80px;
        max-height: 140px;
    }

    .project-info h2 {
        font-size: 1.05rem;
    }

    .project-info p {
        font-size: 0.93rem;
    }
}

/* --- Anniversary Banner --- */
.anniversary-banner {
    padding: 1rem 0;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.anniversary-content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.anniversary-number {
    font-size: 7rem;
    font-weight: 800;
    /* metallic effect */
    /* color: var(--savoy-blue); */
    background-image: linear-gradient(45deg, #4e5b8d, #6c7abf, #4e5b8d);
    color: transparent;
    background-clip: text;
    line-height: 1;
    margin-right: 1.5rem;
    position: relative;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.05);
}

.anniversary-number::after {
    content: '';
    position: absolute;
    height: 70%;
    width: 2px;
    background-color: #333;
    right: -0.75rem;
    top: 15%;
}

.anniversary-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.anniversary-line {
    font-size: 2.5rem;
    font-weight: 500;
    color: #333;
    line-height: 1.2;
    letter-spacing: 0em;
}

/* .anniversary-decoration {
    position: relative;
    height: 300px;
    width: 100%;
    margin-bottom: -275px;
    opacity: 0.2;
    background-image: linear-gradient(45deg, var(--savoy-blue) 25%, transparent 25%, transparent 50%, var(--savoy-blue) 50%, var(--savoy-blue) 75%, transparent 75%, transparent);
    background-size: 10px 10px;
    z-index: 1;
} */

.anniversary-explainer {
    font-style: italic;
    text-align: center;
}

@media (max-width: 768px) {
    .anniversary-banner {
        margin: 1.5rem 0 3rem;
        padding: 2rem 0;
    }

    .anniversary-number {
        font-size: 5rem;
        margin-right: 1rem;
    }

    .anniversary-line {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .anniversary-banner {
        margin: 1rem 0 0rem;
        padding: 1.5rem 0;
    }

    .anniversary-content {
        flex-direction: column;
        text-align: center;
    }

    .anniversary-number {
        font-size: 4rem;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .anniversary-number::after {
        height: 2px;
        width: 40%;
        right: 30%;
        top: auto;
        bottom: 0;
    }

    .anniversary-line {
        font-size: 1.5rem;
    }
}

/* --- Project Detail Page --- */
.project-detail {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.2rem 3rem 1.2rem;
    font-family: "Inter", "DM Sans", "Montserrat", Arial, sans-serif;
    background: #fff;
    box-shadow: 0 6px 32px rgba(97, 109, 203, 0.07);
    border-radius: 0;
}

.project-single-header {
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--savoy-blue-2);
    padding-bottom: 1.2rem;
    background: none;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
}

.title-container {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.project-single-title {
    color: var(--savoy-blue);
    font-size: 2.1rem;
    font-weight: 700;
    margin: 0 0 0.2rem 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.1;
}

.project-single-subtitle {
    color: var(--vista-blue);
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.02em;
    text-transform: none;
}

.back-button {
    display: flex;
    align-items: center;
    color: var(--savoy-blue);
    text-decoration: none;
    font-size: 2.2rem;
    background: none;
    border: none;
    transition: filter 0.2s, color 0.2s;
    padding: 0.2em 0.5em;
    border-radius: 0;
    margin-bottom: 0.2em;
}

.back-button:hover {
    color: var(--royal-blue-web-color);
    filter: brightness(70%);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    align-items: flex-start;
}

.project-single-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: justify
}

.info-section h3 {
    color: var(--savoy-blue-2);
    font-size: 1.08rem;
    font-weight: 600;
    margin-bottom: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.summary-content {
    color: #222;
    line-height: 1.7;
    font-size: 1.08rem;
    background: none;
    border-left: 3px solid var(--vista-blue);
    padding-left: 1em;
    margin-bottom: 0.7em;
    font-family: "Inter", "Montserrat", Arial, sans-serif;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--savoy-blue);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2em 0.7em;
    display: inline-flex;
    align-items: center;
    margin-top: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.18s;
}

.read-more-btn::before {
    content: "↓";
    margin-right: 0.4em;
    font-size: 1.2em;
}

.read-more-btn:hover {
    color: var(--royal-blue-web-color);
}

.project-metadata {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    min-width: 120px;
}

.metadata-section {
    margin-bottom: 0.7rem;
    background: none;
}

.metadata-section h3 {
    color: var(--savoy-blue-2);
    font-size: 0.98rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.metadata-section p {
    margin: 0.1rem 0;
    color: #333;
    font-size: 1.05rem;
    font-family: "Inter", Arial, sans-serif;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2.2rem;
    /* Remove fixed aspect ratio for dynamic heights */
    grid-auto-flow: dense;
}

.project-gallery .gallery-item {
    width: 100%;
    /* Let images define their own height */
    background: #e8eaf6;
    border-radius: 0;
    box-shadow: 0 2px 16px rgba(97, 109, 203, 0.08);
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    /* For masonry effect, allow spanning multiple rows if image is tall */
    break-inside: avoid;
    cursor: pointer;
}

.project-gallery .gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 0;
    transition: opacity 0.22s, transform 0.22s;
}

.project-gallery .gallery-item img:hover {
    opacity: 0.96;
    transform: scale(1.02);
}

/* Masonry for larger screens */
@media (min-width: 900px) {
    .project-gallery {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* Masonry for smaller screens */
@media (max-width: 700px) {
    .project-gallery {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.7rem;
    }
}

.project-single-content {
    line-height: 1.7;
    color: #333;
    font-size: 1.08rem;
    margin-top: 1.5rem;
    font-family: "Inter", Arial, sans-serif;
    background: none;
    border-left: 3px solid var(--savoy-blue-2);
    padding-left: 1em;
}

@media (max-width: 900px) {
    .project-detail {
        padding: 1.2rem 0.5rem 2rem 0.5rem;
        margin-top: 2.5rem;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .project-metadata {
        flex-direction: row;
        gap: 2.5rem;
        margin-top: 1.2rem;
    }

    .project-gallery .gallery-item {
        aspect-ratio: 16/9;
    }
}

@media (max-width: 600px) {
    .project-detail {
        padding: 0.5rem 0.1rem 1.2rem 0.1rem;
    }

    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.7rem;
    }

    .project-single-title {
        font-size: 1.2rem;
    }

    .project-single-subtitle {
        font-size: 1rem;
    }

    .project-gallery .gallery-item {
        aspect-ratio: 16/11;
    }

    .project-single-content {
        font-size: 0.97rem;
        padding-left: 0.5em;
    }
}

/* --- Tag Filter UI --- */
.project-tags-filter {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 0rem 0 1rem 0;
    flex-wrap: wrap;
}

.tag-btn {
    background: #f7f8fa;
    color: var(--savoy-blue);
    border: 1.5px solid var(--savoy-blue-2);
    padding: 0.5em 1.5em;
    font-size: 1.01rem;
    font-style: italic;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border 0.18s;
    outline: none;
}

.tag-btn.active,
.tag-btn:focus {
    background: var(--savoy-blue);
    color: #fff;
    border-color: var(--savoy-blue);
}

.tag-btn:hover {
    background: var(--royal-blue-web-color);
    color: #fff;
    border-color: var(--royal-blue-web-color);
}

.project-tags {
    margin-top: 0.7em;
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}

.project-tag {
    background: rgb(from var(--savoy-blue-2) r g b / 0.7);
    color: #fff;
    padding: 0.2em 0.9em;
    font-size: 0.93em;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.01em;
    margin-right: 0.2em;
    margin-bottom: 0.2em;
    display: inline-block;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .project-tags-filter {
        gap: 0.5rem;
        margin: 1.2rem 0 1rem 0;
    }
    .tag-btn {
        font-size: 0.93rem;
        padding: 0.4em 1em;
    }
}

.year-group.year-group-hidden {
    display: contents !important;
}
