/* ============================================================
   PGLANG-INSPIRED PORTFOLIO — STYLESHEET
   Typeface : Times New Roman / serif fallback (matches pgLang)
   Palette  : off-white bg, dark charcoal text, muted grey dates
   ============================================================ */

/* --- Reset & Base ------------------------------------------ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #e8e4df;
    --color-text: #1a1a1a;
    --color-date: #8a8a8a;
    --color-border: #c8c4bf;
    --color-hover: #3a3a3a;
    --color-card-bg: #ddd9d4;
    --font-body: "Times New Roman", Times, "Noto Serif", Georgia, serif;
    --max-width: 1200px;
    --side-pad: 40px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

/* --- Header / Navbar --------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px var(--side-pad);
    background-color: var(--color-bg);
}

.site-logo {
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--color-text);
    text-decoration: none;
    user-select: none;
}

.site-logo span {
    /* The lambda-style "a" is just a styled lowercase a —
     we use a unicode lambda for effect */
    font-style: normal;
}

.nav-symbols {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-symbols a {
    font-size: 1.15rem;
    color: var(--color-text);
    opacity: 0.65;
    transition: opacity 0.2s ease;
    text-decoration: none;
    line-height: 1;
}

.nav-symbols a:hover,
.nav-symbols a.active {
    opacity: 1;
}

/* tiny dot separator between symbols */
.nav-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--color-text);
    opacity: 0.4;
    display: inline-block;
}

/* --- Main Content ------------------------------------------ */
.site-main {
    max-width: var(--max-width);
    padding: 40px var(--side-pad) 80px;
}

/* --- Project Card (expanding) ------------------------------ */
.project-list {
    display: flex;
    flex-direction: column;
}

.project-card {
    border-top: 1px solid var(--color-border);
    overflow: hidden;
}

.project-card:last-child {
    border-bottom: 1px solid var(--color-border);
}

/* Header row — always visible */
.project-header {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0 24px;
    align-items: baseline;
    padding: 14px 0;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.project-header:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.project-date {
    font-size: 0.9rem;
    color: var(--color-date);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    padding-left: 4px;
}

.project-title {
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--color-text);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.2s ease;
}

.project-header:hover .project-title {
    color: var(--color-hover);
}

/* Expand / collapse body */
.project-body {
    max-height: 0;
    overflow: hidden;
    transition:
        max-height 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 0.4s ease;
    opacity: 0;
}

.project-card.is-open .project-body {
    opacity: 1;
    /* max-height is set via JS to the scroll height */
}

.project-body-inner {
    padding: 4px 0 36px 154px; /* align with title column */
}

/* Featured image / hero inside expanded card */
.project-hero {
    position: relative;
    width: 100%;
    max-width: 620px;
    margin-bottom: 20px;
    overflow: hidden;
    background: #2a2a2a;
}

.project-hero img {
    width: 100%;
    display: block;
}

/* Image gallery grid inside card */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 16px;
    max-width: 620px;
}

.project-gallery img {
    width: 100%;
    height: auto;
    object-fit: cover;
    cursor: pointer;
    filter: grayscale(0%);
    transition:
        filter 0.3s ease,
        transform 0.3s ease;
}

.project-gallery img:hover {
    filter: grayscale(30%);
    transform: scale(1.02);
}

/* Two-up layout for specific galleries */
.project-gallery.two-up {
    grid-template-columns: repeat(2, 1fr);
}

/* Three-up layout */
.project-gallery.three-up {
    grid-template-columns: repeat(3, 1fr);
}

/* Single hero-style full width */
.project-gallery.single {
    grid-template-columns: 1fr;
}

.project-description {
    font-size: 0.95rem;
    line-height: 1.65;
    max-width: 520px;
    color: var(--color-text);
    margin-top: 14px;
}

.project-description p {
    margin-bottom: 10px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.project-tag {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--color-date);
    border: 1px solid var(--color-border);
    padding: 3px 10px;
    border-radius: 2px;
    text-transform: uppercase;
}

/* --- Lightbox ---------------------------------------------- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border: none;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 1.6rem;
    color: #fff;
    opacity: 0.7;
    transition: opacity 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}

.lightbox-close:hover {
    opacity: 1;
}

/* --- Footer ------------------------------------------------ */
.site-footer {
    padding: 32px var(--side-pad) 28px;
    font-size: 0.8rem;
    color: var(--color-date);
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.footer-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 14px;
}

.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-date);
    transition:
        color 0.2s ease,
        opacity 0.2s ease;
    opacity: 0.7;
}

.footer-socials a:hover {
    color: var(--color-text);
    opacity: 1;
}

.footer-socials svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.footer-copy {
    margin-top: 0;
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 768px) {
    :root {
        --side-pad: 20px;
    }

    .project-header {
        grid-template-columns: 100px 1fr;
        gap: 0 16px;
    }

    .project-body-inner {
        padding-left: 0;
        padding-right: 0;
    }

    .project-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        max-width: 100%;
    }

    .project-hero {
        max-width: 100%;
    }

    .project-date {
        font-size: 0.82rem;
    }

    .project-title {
        font-size: 0.95rem;
    }

    .nav-symbols {
        gap: 14px;
    }
}

@media (max-width: 480px) {
    .project-header {
        grid-template-columns: 80px 1fr;
        gap: 0 10px;
        padding: 12px 0;
    }

    .project-date {
        font-size: 0.75rem;
    }

    .project-title {
        font-size: 0.88rem;
    }

    .site-logo {
        font-size: 1rem;
    }

    .nav-symbols {
        gap: 10px;
    }

    .nav-symbols a {
        font-size: 1rem;
    }

    .project-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .project-gallery.three-up {
        grid-template-columns: repeat(2, 1fr);
    }
}
