/* Portfolio pages (navigation/portfolio/*.html) — the [ projectArchive ] panel: topic list + the open project */

img {
    border: 1px solid #3b5998;
}

.img_col {
    width: 45%;
    margin: 15px;
    margin-top: 0;
    min-height: 350px;
    float: right;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-item {
    width: 90%;
    aspect-ratio: 1;
    background: #eee;
    border: 1px solid #ddd;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

/* The panel fills the page's .content, so its left edge lines up with the title above it. */
body.p-portfolio > .content {
    margin-top: 20px;
}

.container_inner {
    width: 100%;
    box-sizing: border-box;
    background-color: white;
    border: 1px solid #3b5998;
}

.header {
    background: #dddddd;
    color: #666666;
    padding: 10px;
    position: relative;
    border-bottom: 1px solid #3b5998;
}

.header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: normal;
    color: #666666;
}

.topics-box {
    display: flex;
    float: left;
    width: 200px;
    background: white;
}

.topics-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.topics-list li {
    padding: 18px;
    cursor: pointer;
    border-top: 1px solid #d9e5ff;
    font-size: 18px;
    color: #666666;
}

.topics-list li a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.topics-list li:hover {
    background: #f0f2f5;

}

.topics-list li.active {
    background: #d9e5ff;
}

/* The panel's right-hand column. It is a .content, but not the page's
   main column, so undo the shared 80%-wide / centred box: as a block
   formatting context it then simply fills the space beside the
   floated topics list. */
.container_inner .content {
    display: flex;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 10px;
    border-left: 1px solid #3b5998;
}

.section {
    margin-right: 20px;
    min-width: auto;
}

.section-header {
    padding: 5px;
}

.section-header h1 {
    margin: 10px;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: normal;
    color: #666666;
}

.section-content {
    min-height: 400px;
    padding: 5px;
    margin-bottom: 5px;
    position: relative;
}


.section-content p {
    margin: 10px;
    font-weight: lighter;
    font-size: 16px;
    color: #333333;
}

.section-content .paper {
    position: absolute;
    font-size: 16px;
    bottom: 0;
}
@media (max-width: 1000px) {
    .container_inner {
        width: 100%;
    }
    .section-header h1 {
        font-size: 18px;
    }
    .section-content p {
        font-size: 14px;
    }
    .topics-box {
        width: 130px;
    }
    .topics-list {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    .topics-list li {
        font-size: 13px;
        padding: 10px;
    }

}

/* Web Design: each site gets a domain header (+ a visit link while it's live)
   and a row of three screenshots at one shared size, cropped from the top. */
.site-header {
    margin: 10px;
    font-size: 1.2em;
    font-weight: normal;
}
.site-domain { color: #45a049; }
.site-visit,
.site-offline {
    margin-left: 10px;
    font-size: 0.7em;
    color: #888;
}
.site-visit { text-decoration: none; }
.site-visit:hover { color: #45a049; text-decoration: underline; }
.site-shots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 10px 10px;
}
.site-shots img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
    cursor: pointer;
}
.site-shots img {
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.site-shots img:hover {
    box-shadow: 0 4px 12px rgb(210, 245, 250);
    transform: translateY(-2px);
}

/* Lightbox as a carousel: the image at 60% of the screen width, with
   ‹ › arrows on either side (added by portfolio.js; hidden with one image). */
.modal .modal-content {
    width: 60vw;
    max-width: none;
}
.modal .modal-content img {
    display: block;
    width: 100%;
    max-width: none;
    max-height: 90vh;
    object-fit: contain;
    box-sizing: border-box;
    border: 6px solid #fff;
}
.modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 14px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 48px;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
    transition: color 0.2s, transform 0.2s;
}
.modal-arrow:hover { color: #fff; }
.modal-prev { right: 100%; margin-right: 12px; }
.modal-next { left: 100%; margin-left: 12px; }
.modal-prev:hover { transform: translate(-3px, -50%); }
.modal-next:hover { transform: translate(3px, -50%); }
.modal.single .modal-arrow { display: none; }
@media (max-width: 768px) {
    .modal .modal-content { width: 80vw; }
    .modal-arrow { font-size: 36px; padding: 8px; }
    .modal-prev { margin-right: 0; }
    .modal-next { margin-left: 0; }
}
