@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;600&display=swap');

:root {
    --bg: #161413; 
    --surface: #24211f; 
    --text: #f5f2eb; 
    --text-muted: #a8a29e; 
    --accent: #ffaa00; 
    --accent-hover: #e69900;
}

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

body, html {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.6;
}

header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo img { max-width: 120px; height: auto; }

.lang { color: var(--text-muted); font-size: 1rem; user-select: none; }
.lang-btn { cursor: pointer; transition: 0.3s ease; padding: 5px; }
.lang-btn:hover { color: var(--text); }
.lang-btn.active { color: var(--accent); font-weight: 600; }

section { display: flex; align-items: center; padding: 70px 10%; }

#hero {
    min-height: 100vh;
    padding: 120px 10%;
    background-image: linear-gradient(to bottom, rgba(22, 20, 19, 0.4) 0%, rgba(22, 20, 19, 1) 100%), url('../assets/images/header.jpg');
    background-size: cover;
    background-position: center;
}

.content { max-width: 800px; }

h1 { font-size: clamp(2.5rem, 8vw, 5rem); line-height: 1.1; font-weight: 600; letter-spacing: -1px; margin-bottom: 20px; }
h2 { font-size: clamp(1.8rem, 5vw, 2.5rem); color: var(--text); margin-bottom: 20px; margin-top: 20px; font-weight: 400; border-bottom: 1px solid var(--surface); padding-bottom: 10px; }
h3 { color: var(--accent); margin-top: 25px; margin-bottom: 10px; font-weight: 400; }

.small-heading { font-size: 1.2rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; border: none; margin-top: 40px; }
.highlight { color: var(--accent); }
.subtitle { font-size: 1.4rem; color: var(--accent); margin-bottom: 20px; font-weight: 400; }

p, li { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 15px; }
strong { color: var(--text); font-weight: 600; }
ul { margin-left: 20px; margin-bottom: 30px; }

.project-item { background: var(--surface); padding: 25px; border-radius: 8px; margin-bottom: 15px; border-left: 4px solid var(--accent); }
.project-item p { margin: 0; }
.contact-info { background: var(--surface); padding: 25px; border-radius: 8px; margin: 30px 0; }
.reference-list { list-style-type: none; margin-left: 0; font-size: 0.95rem; }

.btn-group { display: flex; gap: 15px; margin-top: 30px; flex-wrap: wrap; }
.btn { display: inline-block; background: var(--accent); color: var(--bg); text-decoration: none; padding: 14px 35px; font-weight: 600; border-radius: 4px; transition: 0.3s ease; border: 1px solid var(--accent); cursor: pointer; font-family: inherit; font-size: inherit; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--surface); }
.btn-outline:hover { background: var(--surface); color: var(--text); border-color: var(--text-muted); }
.btn-small { padding: 10px 20px; font-size: 0.9rem; margin: 0; }

.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ─── Modal Overlay ─── */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: var(--bg);
    z-index: 200;
    display: none;
    flex-direction: column;
    padding: 50px 10%;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.modal-overlay.active { display: flex; opacity: 1; }

.close-btn { align-self: flex-end; background: none; border: none; color: var(--text); font-size: 3rem; cursor: pointer; margin-bottom: 20px; transition: 0.3s; }
.close-btn:hover { color: var(--accent); }

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--surface);
    padding-bottom: 20px;
}
.portfolio-header h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.5rem); }
.portfolio-header .close-btn { margin: 0; line-height: 1; }

/* ─── Gallery Grid ─── */
.gallery { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    gap: 30px; 
}

/* ─── Gallery Item with Caption ─── */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: zoom-in;
    border-bottom: 3px solid transparent;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    border-bottom: 3px solid var(--accent);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    filter: grayscale(40%) contrast(1.1);
}

.gallery-item:hover img {
    filter: grayscale(0%) contrast(1);
}

/* ─── Gallery Caption Overlay ─── */
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(22, 20, 19, 0.95) 0%, rgba(22, 20, 19, 0.7) 60%, transparent 100%);
    padding: 40px 20px 16px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

.gallery-caption h3 {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.gallery-caption p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

/* ─── Lightbox ─── */
#lightbox { 
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 14, 13, 0.95); 
    backdrop-filter: blur(8px); 
    display: none;
    justify-content: center; 
    align-items: center; 
    z-index: 300; 
    opacity: 0;
    transition: opacity 0.4s ease;
}
#lightbox.active { display: flex; opacity: 1; }

.lightbox-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 85%;
    max-height: 85vh;
}

#lightbox-img { 
    max-width: 100%; 
    max-height: 75vh; 
    border-radius: 4px; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.6); 
    object-fit: contain; 
    user-select: none; 
}

/* ─── Lightbox Caption ─── */
.lightbox-caption {
    text-align: center;
    padding: 16px 24px;
    max-width: 700px;
    opacity: 0;
    transform: translateY(10px);
    animation: captionFadeIn 0.5s ease 0.2s forwards;
}

@keyframes captionFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

.lightbox-caption h3 {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 6px 0;
}

.lightbox-caption p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

.lightbox-close { 
    position: absolute; 
    top: 30px; 
    right: 40px; 
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.08); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text); 
    font-size: 2rem; 
    border-radius: 50%;
    cursor: pointer; 
    z-index: 301; 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}
.lightbox-close:hover { 
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    transform: rotate(90deg); 
}

.lightbox-prev, .lightbox-next { 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    width: 60px; 
    height: 60px;
    background: rgba(255, 255, 255, 0.08); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text); 
    font-size: 1.5rem; 
    cursor: pointer; 
    border-radius: 50%; 
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); 
    z-index: 301; 
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}
.lightbox-prev:hover, .lightbox-next:hover { 
    background: var(--accent); 
    color: var(--bg); 
    border-color: var(--accent);
    transform: translateY(-50%) scale(1.1); 
}
.lightbox-prev { left: 4%; } 
.lightbox-next { right: 4%; }

.policy-box { max-width: 800px; margin: 0 auto; background: var(--surface); padding: 40px; border-radius: 8px; position: relative; width: 100%; }
.policy-box .close-btn { position: absolute; top: 10px; right: 20px; font-size: 2.5rem; }
.policy-text-area p { font-size: 1rem; }

.site-footer { background: #0f0d0c; padding: 40px 10%; margin-top: 50px; border-top: 1px solid var(--surface); }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-content p { margin: 0; font-size: 0.9rem; }
.footer-links span { color: var(--accent); cursor: pointer; margin-left: 15px; font-size: 0.9rem; transition: 0.3s; }
.footer-links span:hover { color: var(--text); }

.cookie-banner {
    position: fixed; bottom: -100%; left: 0; width: 100%; background: var(--surface);
    padding: 20px 10%; display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5); z-index: 999; transition: bottom 0.5s ease;
    border-top: 2px solid var(--accent); flex-wrap: wrap; gap: 20px;
}
.cookie-banner.show { bottom: 0; }
.cookie-text p { margin: 0; font-size: 0.95rem; color: var(--text); }
.cookie-link { color: var(--accent); cursor: pointer; text-decoration: underline; }
.cookie-buttons { display: flex; gap: 10px; }

body.modal-open { overflow-y: hidden; }

/* ─── Responsive ─── */
@media screen and (max-width: 768px) {
    header { padding: 20px 5%; }
    .logo img { max-width: 90px; }
    section { padding: 80px 5% 40px 5%; min-height: auto; }
    #hero { padding: 100px 5% 60px 5%; }
    .btn-group { flex-direction: column; }
    .btn { text-align: center; width: 100%; }
    .gallery { grid-template-columns: repeat(auto-fit, minmax(100%, 1fr)); }
    .modal-overlay { padding: 30px 5%; }
    
    /* Show captions always on mobile (no hover) */
    .gallery-caption {
        transform: translateY(0);
    }
    
    .lightbox-prev, .lightbox-next { width: 45px; height: 45px; font-size: 1.2rem; }
    .lightbox-close { top: 20px; right: 20px; width: 40px; height: 40px; font-size: 1.5rem; }
    
    .lightbox-inner { max-width: 95%; }
    
    .lightbox-caption h3 { font-size: 1rem; }
    .lightbox-caption p { font-size: 0.9rem; }
    
    .footer-content { flex-direction: column; text-align: center; }
    .footer-links span { margin: 0 10px; }
    .cookie-banner { flex-direction: column; text-align: center; padding: 20px 5%; }
}
