/*
Modernized & cleaned stylesheet for stanmilicic.com
Original created Dec 2012. Updated for static Vercel hosting, flex/grid, responsive, no deprecated.
Paths updated to relative ./images/ and ./fonts/
*/

@font-face {
    font-family: 'Conv_PAPYRUS';
    src: url('../fonts/PAPYRUS.eot');
    src: local('☺'), url('../fonts/PAPYRUS.woff') format('woff'), url('../fonts/PAPYRUS.ttf') format('truetype'), url('../fonts/PAPYRUS.svg') format('svg');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Conv_VIVALDII';
    src: url('../fonts/VIVALDII.eot');
    src: local('☺'), url('../fonts/VIVALDII.woff') format('woff'), url('../fonts/VIVALDII.ttf') format('truetype'), url('../fonts/VIVALDII.svg') format('svg');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Conv_arabtype';
    src: url('../fonts/arabtype.eot');
    src: local('☺'), url('../fonts/arabtype.woff') format('woff'), url('../fonts/arabtype.ttf') format('truetype'), url('../fonts/arabtype.svg') format('svg');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    text-decoration: none;
    box-sizing: border-box;
}

body {
    background-color: #000000;
    color: #adadad;
    font-family: Arial, sans-serif;
    line-height: 1.5;
}

.clear {
    clear: both;
}

.left { float: left; }
.right { float: right; }

.wrapper {
    margin: 0 auto;
    width: 100%;
    max-width: 980px;
    padding: 0 10px;
}

/* Header */
.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0 0;
    min-height: 135px;
}

.head-logo {
    width: 315px;
}

.head-logo img {
    max-width: 100%;
    height: auto;
}

.head-logo h1 {
    font-family: 'Conv_VIVALDII', cursive;
    font-size: 46px;
    color: #adadad;
    text-align: left;
}

.tag-line {
    font-family: 'Conv_arabtype', cursive;
    font-size: 20px;
    color: #adadad;
}

/* Navigation — top row + horizontal Works submenu (matches live site) */
.navigation-wrapper > ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.navigation-wrapper > ul > li {
    position: relative;
}

.navigation-wrapper > ul > li > a {
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 18px;
    color: #adadad;
    padding: 4px 10px 3px;
    display: block;
}

.navigation-wrapper > ul > li > a:hover,
.navigation-wrapper > ul > li > a#cur {
    background-image: url('../images/nav_hover_bg.png');
    background-repeat: repeat-x;
    color: #4d4d4d;
    border-radius: 3px;
}

.navigation-wrapper .sl {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    width: max-content;
    height: 33px;
    background-color: #181818;
    z-index: 200;
    white-space: nowrap;
}

.navigation-wrapper > ul > li:hover > .sl,
.navigation-wrapper .sl.open {
    display: block;
}

.navigation-wrapper .sl ul {
    list-style: none;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    height: 33px;
    margin: 0;
    padding: 0;
}

.navigation-wrapper .sl ul li {
    padding: 5px 45px;
    background-image: url('../images/fnav_sep.png');
    background-repeat: no-repeat;
    background-position: right center;
}

.navigation-wrapper .sl ul li:first-child {
    padding-left: 18px;
}

.navigation-wrapper .sl ul li:last-child {
    background-image: none;
    padding: 5px 0 5px 45px;
}

.navigation-wrapper .sl ul li a {
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: #626262;
    line-height: 22px;
    padding: 0;
    display: block;
    background: none;
}

.navigation-wrapper .sl ul li a:hover {
    color: #fff;
    background: none;
    background-image: none;
}

/* Banner / Scroller */
.banner-wrapper {
    width: 100%;
    max-width: 977px;
    height: 405px;
    background: #fff;
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
}

#makeMeScrollable {
    width: 100%;
    height: 401px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

#makeMeScrollable .scrollWrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#makeMeScrollable .scrollableArea {
    display: flex;
    flex-wrap: nowrap;
    height: 100%;
    width: max-content;
    will-change: transform;
}

#makeMeScrollable .scrollableArea img {
    border: 8px solid #fff;
    border-top: none;
    border-bottom: none;
    height: 100%;
    width: auto;
    flex-shrink: 0;
    display: block;
}

/* Simple controls for scroller (added modern) */
.scroller-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    gap: 5px;
}

.scroller-controls button {
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
}

/* Content */
.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 15px 0;
    min-height: 234px;
}

.content-left {
    flex: 1;
    min-width: 300px;
    padding: 0 15px;
}

.content-left h1 {
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 22px;
    color: #adadad;
    margin: 20px 0 15px;
}

.content-left p {
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: #adadad;
    text-align: justify;
    line-height: 18px;
}

.content-right {
    width: 360px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Real signature, revealed along the pen path. See js/main.js */
.signature-area {
    display: block;
    width: 100%;
    max-width: 460px;
    aspect-ratio: 892 / 400;
    margin: 0 auto;
    padding: 0;
    border: none;
    border-radius: 2px;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
}

.signature-area canvas,
.signature-area img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.signature-area:focus-visible {
    outline: 1px solid #8a8a8a;
    outline-offset: 4px;
}

/* Footer */
.footer_wrapper {
    background: #181818;
    border-radius: 3px;
    padding: 14px 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.footer_wrapper ul {
    list-style: none;
    display: flex;
    gap: 8px;
}

.footer_wrapper ul li {
    padding-right: 8px;
    background-image: url('../images/fnav_sep.png');
    background-repeat: no-repeat;
    background-position: right center;
}

.footer_wrapper ul li:last-child {
    background: none;
}

.footer_wrapper ul li a {
    font-family: Arial, sans-serif;
    color: #626262;
    font-size: 12px;
}

.footer_wrapper ul li a:hover,
.footer_wrapper ul li a#fcur {
    color: #fff;
}

.copy {
    color: #626262;
    margin-left: auto;
}

/* Works tiles */
.w-tile {
    width: 225px;
    height: 409px;
    position: relative;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.w-tile img {
    width: 223px;
    height: 407px;
    border: 1px solid #ececec;
    border-radius: 6px;
}

.w-tile-name {
    position: absolute;
    bottom: 0;
    left: 30px;
    width: 165px;
    height: 31px;
    background-image: url('../images/w_tile_name_bg.png');
    background-repeat: repeat-x;
    z-index: 1;
    text-align: center;
}

.w-tile-name a {
    font-family: 'Trebuchet MS', sans-serif;
    font-weight: bold;
    font-size: 18px;
    color: #4d4d4d;
    text-transform: uppercase;
    padding-top: 4px;
    display: block;
}

.w-tile:hover {
    opacity: 1;
}

/* Gallery modern (grid + modal) */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.gallery-grid img {
    width: 100%;
    height: 153px;
    object-fit: cover;
    border: 1px solid #ECECEC;
    border-radius: 7px;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-grid img:hover {
    transform: scale(1.03);
}

/* Lightbox modal */
#lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#lightbox.active {
    display: flex;
}

#lightbox img {
    max-width: 90vw;
    max-height: 80vh;
    border: 8px solid #fff;
}

.lightbox-controls {
    margin-top: 15px;
    display: flex;
    gap: 20px;
}

.lightbox-controls button {
    background: #333;
    color: #adadad;
    border: 1px solid #555;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 3px;
}

.lightbox-info {
    color: #adadad;
    margin-top: 10px;
    font-size: 14px;
}

/* Contact */
.contact-mid-content {
    max-width: 520px;
    margin: 0 auto;
    padding: 0 15px;
}

.contact-mid-content h1 {
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 22px;
    color: #adadad;
    margin: 20px 0 15px;
}

.contact-mid-content p {
    font-family: Arial, sans-serif;
    font-size: 13px;
    color: #adadad;
    line-height: 1.7;
    margin-bottom: 14px;
}

.contact-mid-content a.email-link {
    color: #d4d4d4;
    text-decoration: underline;
}

.contact-mid-content a.email-link:hover {
    color: #fff;
}

/* Bio */
.bio-img {
    border: 3px solid #fff;
    border-radius: 3px;
    margin: 10px 20px 10px 0;
    float: right;
    max-width: 280px;
}

/* Responsive */
@media (max-width: 768px) {
    .wrapper {
        padding: 0 5px;
    }
    .header-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    .navigation-wrapper > ul {
        flex-wrap: wrap;
        gap: 10px;
    }
    .navigation-wrapper .sl {
        height: auto;
        max-width: calc(100vw - 24px);
        white-space: normal;
    }
    .navigation-wrapper .sl ul {
        flex-wrap: wrap;
        height: auto;
    }
    .content-wrapper {
        flex-direction: column;
    }
    .content-right {
        width: 100%;
    }
    .w-tile {
        width: 48%;
        height: auto;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* Play/pause etc for scroller */
.play-pause {
    cursor: pointer;
    width: 30px;
    height: 30px;
}