:root {
    --bg: #050505;
    --text: #eeeeee;
    --text-dim: #bbbbbb;
    --text-muted: #888888;
    --border: #2a2a2a;
    --accent: #ffffff;
    --bg-opacity: 1;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background-color: var(--bg);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    line-height: 1.6;
    color: var(--text);
}

/* GLOBALNO OZADJE */

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(255,255,255,0.05), transparent 55%),
        linear-gradient(rgba(0,0,0,0.78), rgba(0,0,0,0.86));
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-position: center calc(50% + var(--bg-offset, 0px));
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: var(--bg-opacity);
    transition: opacity 0.7s ease-out;
    z-index: -2;
    pointer-events: none;
}

/* privzeto ozadje */
body::after {
    background-image: url("images/background-default.jpg");
}

/* ozadja sekcij */
body.bg-hero::after {
    background-image: url("images/hero-bg.jpg");
}

body.bg-about::after {
    background-image: url("images/about-bg.jpg");
}

body.bg-works::after {
    background-image: url("images/works-bg.jpg");
}

body.bg-photos::after {
    background-image: var(--photos-bg);
    background-position: center calc(50% + var(--bg-offset, 0px));
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(22px) brightness(0.38) saturate(0.9);
    transform: scale(1.08);
}

body.bg-photos::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(255,255,255,0.05), transparent 45%),
        linear-gradient(rgba(0,0,0,0.72), rgba(0,0,0,0.86));
    z-index: -1;
    pointer-events: none;
}

body.bg-dates::after {
    background-image: url("images/dates-bg.jpg");
}

body.bg-contact::after {
    background-image: url("images/contact-bg.jpg");
}

/* LINKS */

a {
    color: var(--text);
    text-decoration: none;
}

.text-link {
    color: #7dd3fc;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 1px solid #7dd3fc;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.text-link:hover {
    color: #ffffff;
}

.fancy-link {
    color: var(--accent);
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 1px;
    transition: background-size 0.3s ease;
}

.fancy-link:hover {
    background-size: 100% 1px;
}

/* HEADER / NAV */

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    background: rgba(5, 5, 5, 0.78);
    border-bottom: 1px solid rgba(40,40,40,0.9);
}

.nav {
    max-width: 960px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.nav-left {
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--accent);
}

.nav-right a {
    margin-left: 18px;
    opacity: 0.7;
}

.nav-right a:hover {
    opacity: 1;
    color: var(--accent);
}

/* LAYOUT */

main {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* SEKCIJE */

section {
    position: relative;
    margin-bottom: 140px;
    padding: 80px 0;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    scroll-margin-top: 90px;
}

#contact {
    min-height: 85vh;
}

.section-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 18px;
}

/* HERO */

.hero {
    padding: 120px 40px;
    margin-top: 20px;
}

.hero-title {
    font-size: clamp(34px, 6vw, 52px);
    line-height: 1.05;
    margin-bottom: 16px;
    color: #ffffff;
}

.hero-subtitle {
    font-size: 18px;
    color: #dddddd;
    margin-bottom: 10px;
}

.hero-meta {
    font-size: 14px;
    color: #cccccc;
}

/* ABOUT */

.about-text {
    max-width: 620px;
    font-size: 15px;
    color: var(--text-dim);
}

/* WORKS */

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.work-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 10px 14px;
    background: linear-gradient(145deg, rgba(20,20,20,0.94), rgba(8,8,8,0.98));
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease,
        border-color 0.12s ease,
        background 0.12s ease;
    cursor: pointer;
}

.work-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 35px rgba(0,0,0,0.85);
    border-color: #666;
    background: radial-gradient(circle at top, #262626, #111111);
}

.work-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.work-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--accent);
}

.work-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.work-desc {
    font-size: 13px;
    color: var(--text-dim);
}

/* PHOTOS */

.photos-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    position: relative;
    z-index: 2;
}

.photo-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(20,20,20,0.94), rgba(8,8,8,0.98));
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;

    display: block;
    width: 100%;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    position: relative;
    z-index: 2;
}

.photo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(0,0,0,0.75);
    border-color: #666;
}

.photo-image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
    position: relative;
    z-index: 2;
}

.photo-card:hover .photo-image {
    transform: scale(1.04);
    filter: brightness(1.05);
}

/* LIGHTBOX */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 9999;
    padding: 30px;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: min(92vw, 1400px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    opacity: 1;
    transition: opacity 0.22s ease;
}

.lightbox-image.is-fading {
    opacity: 0.2;
}

.lightbox-counter {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.16);
    transform: scale(1.05);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.16);
    transform: translateY(-50%) scale(1.05);
}

.lightbox-prev {
    left: 22px;
}

.lightbox-next {
    right: 22px;
}

body.lightbox-open {
    overflow: hidden;
}

/* DATES */

.dates-list {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.date-row {
    display: flex;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

.date-row:first-child {
    border-top: none;
}

.date-when {
    width: 150px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.date-what {
    flex: 1;
    color: var(--text-dim);
}

.date-where {
    width: 300px;
    text-align: right;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* CONTACT */

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr);
    gap: 30px;
    align-items: flex-start;
}

.contact-main {
    font-size: 15px;
    color: var(--text-dim);
}

.contact-main a {
    border-bottom: 1px solid #666;
    color: var(--accent);
}

.contact-links {
    font-size: 14px;
}

.contact-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-links li + li {
    margin-top: 6px;
}

.contact-links a {
    opacity: 0.75;
}

.contact-links a:hover {
    opacity: 1;
    color: var(--accent);
}

/* FOOTER */

footer {
    border-top: 1px solid rgba(40,40,40,0.9);
    font-size: 12px;
    color: var(--text-muted);
    padding: 14px 20px 24px;
    text-align: center;
    margin-top: 20px;
    background: rgba(5,5,5,0.96);
}

/* RESPONSIVE */

@media (max-width: 1024px) {
    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1000;
    }

    body::after {
        background-attachment: scroll;
    }

    body.bg-photos::after {
        filter: blur(16px) brightness(0.4) saturate(0.92);
        transform: scale(1.05);
    }

    main {
        padding-top: 125px;
    }

    .photos-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .nav {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 12px 16px;
    }

    .nav-left {
        font-size: 16px;
    }

    .nav-right {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 14px;
        width: 100%;
    }

    .nav-right a {
        margin-left: 0;
        font-size: 13px;
        opacity: 0.9;
        padding: 4px 2px;
    }
}

@media (max-width: 768px) {
    main {
        padding: 130px 12px 40px;
    }

    .hero {
        padding: 80px 20px;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .photos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .date-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .date-when {
        margin-bottom: 4px;
    }

    .date-where {
        text-align: left;
        margin-top: 4px;
    }

    section {
        padding: 20px 16px;
        margin-bottom: 60px;
    }

    .nav {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 10px 16px;
    }

    .nav-left {
        font-size: 15px;
        letter-spacing: 0.05em;
    }

    .nav-right {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px 12px;
    }

    .nav-right a {
        margin-left: 0;
        font-size: 12.5px;
        opacity: 0.85;
    }

    .lightbox {
        padding: 16px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 42px;
        height: 42px;
        font-size: 28px;
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-image {
        max-height: 70vh;
        border-radius: 10px;
    }
}

/* ICONS / LINKS */

.icon {
    width: 18px;
    height: 18px;
    fill: var(--text-dim);
    margin-right: 8px;
    vertical-align: middle;
    transition: fill 0.25s ease, transform 0.25s ease;
}

.contact-links a {
    display: flex;
    align-items: center;
}

.contact-links a:hover .icon {
    fill: var(--accent);
    transform: translateX(3px);
}

/* LOGO */

.slika-div {
    width: 338px;
    height: 212px;
    background-image: url("images/logo2.gif");
    background-size: cover;
    background-position: center;
}

/* UTIL */

.rdeca {
    color: red;
    font-weight: 600;
}