@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #111;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Container ---- */
.container {
    max-width: 820px;
    width: 92%;
    margin: 60px auto;
    min-height: 100vh;
    background: #fff;
    padding: 72px 80px;
    position: relative;
    z-index: 10;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 16px 48px rgba(0,0,0,0.1);
    animation: containerIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes containerIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Typography ---- */
h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    text-align: center;
    line-height: 1.2;
}

h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 48px 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #eaeaea;
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 32px 0 16px 0;
}

p {
    color: #555;
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.7;
}

ul {
    margin-bottom: 24px;
    padding-left: 20px;
    color: #555;
    font-size: 1rem;
    line-height: 1.7;
}

li { margin-bottom: 8px; }

img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 16px;
}

.project-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin: 20px 0;
    display: block;
}

/* ---- Navigation ---- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 48px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s, gap 0.3s;
}

.back-link:hover {
    color: #111;
    gap: 10px;
}

/* ---- Meta Grid ---- */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
    padding: 24px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
}

.meta-item .label {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.meta-item .value {
    font-weight: 600;
    font-size: 0.95rem;
}

/* ---- Buttons ---- */
.button-group { display: flex; gap: 12px; margin-top: 48px; }

.btn {
    display: inline-block;
    background: #111;
    color: #fff;
    padding: 11px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.2s, transform 0.2s;
}

.btn:hover {
    background: #333;
    transform: translateY(-1px);
}

.btn.outline {
    background: transparent;
    color: #111;
    border: 1px solid #ddd;
}

.btn.outline:hover {
    background: #f8f8f8;
    transform: translateY(-1px);
}

/* ---- Gallery ---- */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin: 32px 0;
}

.gallery-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.gallery-img:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

/* ---- Lightbox ---- */
.lightbox {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.close-lightbox {
    position: absolute;
    top: 24px;
    right: 32px;
    color: #fff;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* ---- Standalone Images ---- */
.standalone-svg {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 32px auto;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    transition: box-shadow 0.3s ease;
}

.standalone-svg:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* ---- Captions ---- */
.small {
    font-size: 0.8rem;
    color: #999;
    margin-top: -8px;
    margin-bottom: 24px;
    text-align: center;
    font-style: italic;
}

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: none;
}

/* ---- Footer ---- */
footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid #eaeaea;
    text-align: left;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .container {
        padding: 40px 24px;
        margin: 32px auto;
        border-radius: 12px;
        width: 95%;
    }

    .button-group { flex-direction: column; }
    .meta-grid { grid-template-columns: 1fr; }
    .project-gallery { grid-template-columns: 1fr; }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.15rem; }
}
