/* ═══════════════════════════════════════════════
   Andrija Pulić Portfolio — Apple 2013 Style
   style.css
═══════════════════════════════════════════════ */

/* ── Helvetica Neue — local font files ── */
@font-face {
    font-family: 'Helvetica Neue';
    font-weight: 100;
    font-style: normal;
    src: url('fonts/HelveticaNeue Thin.ttf') format('truetype');
}
@font-face {
    font-family: 'Helvetica Neue';
    font-weight: 200;
    font-style: normal;
    src: url('fonts/HelveticaNeue Light.ttf') format('truetype');
}
@font-face {
    font-family: 'Helvetica Neue';
    font-weight: 300;
    font-style: normal;
    src: url('fonts/HelveticaNeue Light.ttf') format('truetype');
}
@font-face {
    font-family: 'Helvetica Neue';
    font-weight: 400;
    font-style: normal;
    src: url('fonts/HelveticaNeue.ttf') format('truetype');
}

/* ─── ROOT ─────────────────────────────────── */
:root {
    --nav-height: 44px;
    --accent: #ff3b30;
    --body-font: Arial, Helvetica, sans-serif;
    --bg: transparent;
    --bg-section: rgba(0,0,0,.25);
    --bg-card: rgba(0,0,0,.3);
    --border: rgba(255,255,255,.08);
    --text: #e0e0e0;
    --text-muted: #888;
    --text-heading: #f5f5f5;
}

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

html {
    scroll-behavior: smooth;
    background-color: #1a1a1a;  /* prevents white flash before JS runs */
}

body {
    font-family: var(--body-font);
    background-color: #1a1a1a;   /* instant fallback — never white */
    background: url('ios6/leather.png') repeat center top;
    background-size: 600px auto;
    color: var(--text);
    font-size: 14px;
    line-height: 1.8;
    min-width: 320px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--text-heading); font-weight: 600; line-height: 1.2; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* content images only — never lockscreen assets */
img { display: block; width: 100%; border-radius: 6px; }
#lockscreen img { width: auto; border-radius: 0; }

/* ─── GLOBAL NAV ───────────────────────────── */
#globalheader {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: linear-gradient(to bottom,
    #6e6e6e 0%, #636363 40%,
    #575757 50%, #4a4a4a 51%, #424242 100%);
    border-top: 1px solid #999;
    border-bottom: 1px solid #1a1a1a;
    box-shadow: 0 1px 4px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.15);
}

.nav-inner {
    max-width: 980px;
    height: 100%;
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    align-items: center;
}

#globalheader ul {
    list-style: none;
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    margin: 0; padding: 0;
}

#globalheader ul li {
    position: relative;
    height: var(--nav-height);
    display: flex;
    align-items: center;
}

#globalheader ul li + li::before {
    content: '';
    position: absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 1px;
    background: linear-gradient(to bottom,
    rgba(255,255,255,.12), rgba(0,0,0,.35) 50%, transparent);
}

/* no separator before the search field */
#globalheader ul li:last-child::before {
    display: none;
}

#globalheader ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 14px;
    color: #f0f0f0;
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: .02em;
    text-shadow: 0 1px 1px rgba(0,0,0,.7);
    white-space: nowrap;
    transition: background .1s;
    text-transform: uppercase;
}

#globalheader ul li a:hover {
    background: linear-gradient(to bottom,
    rgba(255,255,255,.13) 0%, rgba(255,255,255,.04) 50%,
    rgba(0,0,0,.08) 51%, rgba(0,0,0,.14) 100%);
    text-decoration: none;
}

#globalheader ul li a.active {
    background: linear-gradient(to bottom,
    rgba(0,0,0,.3) 0%, rgba(0,0,0,.15) 100%);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.5),
    inset 0 -1px 0 rgba(255,255,255,.06);
    color: #fff;
}

/* Logo cell */
li.nav-logo { flex-shrink: 0; }
li.nav-logo a,
#globalheader li.nav-logo a {
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff !important;
    text-shadow: 0 -1px 0 rgba(0,0,0,.3);
    /* red button matching .btn-apple-primary */
    background: linear-gradient(to bottom,
    #ff6b5b 0%, #e63020 50%, #cc2010 51%, #b81a0a 100%) !important;
    border-top: 1px solid #cc2010;
    border-bottom: 1px solid #7a0a00;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
    height: 100%;
}

li.nav-spacer { flex: 1; pointer-events: none; }

/* Search */
.search-wrap { position: relative; display: flex; align-items: center; }

.search-icon-svg {
    position: absolute; left: 7px;
    width: 12px; height: 12px;
    pointer-events: none;
}

#search-input {
    height: 22px; width: 138px;
    background: linear-gradient(to bottom, #565656, #484848);
    border: 1px solid #222;
    border-radius: 11px;
    padding: 0 8px 0 24px;
    color: #ddd;
    font-family: var(--body-font);
    font-size: 11px;
    outline: none;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.1);
    transition: width .25s ease;
}

#search-input::placeholder { color: #999; }
#search-input:focus {
    width: 178px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.3), 0 0 0 2px rgba(200,80,60,.4);
}

/* ─── PAGE HEADER ──────────────────────────── */
.page-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 60px 20px 50px;
    text-align: center;
}

.page-header h1 {
    font-size: 52px;
    font-weight: 700;
    letter-spacing: -1.5px;
    margin-bottom: 8px;
    /* glossy white-to-grey gradient fill */
    background: linear-gradient(to bottom,
    #ffffff 0%,
    #ffffff 40%,
    #c8c8c8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* soft drop shadow below the letters */
    filter: drop-shadow(0 3px 6px rgba(0,0,0,.7));
}

.page-header h1 strong { font-weight: 700; }

.page-header .subtitle {
    font-size: 16px;
    color: var(--text-muted);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.page-header.homepage { padding: 90px 20px 70px; }
.page-header.homepage h1 { font-size: 68px; }

/* ─── SECTION WRAPPER ──────────────────────── */
.site-content {
    max-width: 980px;
    margin: 0 auto;
    padding: 60px 20px;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 50px 0;
}

.section-title {
    font-size: 28px;
    font-weight: 300;
    letter-spacing: -.5px;
    color: var(--text-heading);
    margin-bottom: 6px;
}

.section-byline {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 28px;
    display: block;
}

/* ─── PHOTO GRID ───────────────────────────── */
.photo-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 50px;
}

.photo-row .photo-cell img {
    border-radius: 3px;
    aspect-ratio: 1;
    object-fit: cover;
    width: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow:
            0 2px 3px rgba(0,0,0,.55),
            0 1px 0 rgba(255,255,255,.05) inset;
}

.photo-row .photo-cell img:hover {
    transform: scale(1.03);
    box-shadow:
            0 3px 6px rgba(0,0,0,.7),
            0 1px 0 rgba(255,255,255,.05) inset;
}

.photo-caption {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.4;
}

/* ─── CONTENT + SIDEBAR ────────────────────── */
.content-sidebar {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 50px;
}

.sidebar-section h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-heading);
    margin-bottom: 6px;
}

.sidebar-byline {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    display: block;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.sidebar-section ol {
    padding-left: 18px;
    font-size: 13px;
    color: var(--text-muted);
}

.sidebar-section ol li { margin-bottom: 4px; }

/* ─── TILES ────────────────────────────────── */
.tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-left: 1px solid rgba(255,255,255,.06);
    border-top: 1px solid rgba(255,255,255,.06);
}

.tile {
    border-right: 1px solid rgba(0,0,0,.5);
    border-bottom: 1px solid rgba(0,0,0,.5);
    padding: 32px 20px 34px;
    text-align: center;
    /* inset gloss look — lighter at top, darker at bottom */
    background:
            linear-gradient(to bottom,
            rgba(255,255,255,.07) 0%,
            rgba(255,255,255,.02) 50%,
            rgba(0,0,0,.12) 100%);
    box-shadow:
            inset 0 1px 0 rgba(255,255,255,.1),   /* top highlight */
            inset 0 -1px 0 rgba(0,0,0,.3),         /* bottom shadow */
            inset 0 0 30px rgba(0,0,0,.15);         /* depth */
    text-decoration: none;
    color: inherit;
    display: block;
    transition: background .2s, box-shadow .2s;
    position: relative;
}

.tile:hover {
    background:
            linear-gradient(to bottom,
            rgba(255,255,255,.12) 0%,
            rgba(255,255,255,.05) 50%,
            rgba(0,0,0,.08) 100%);
    box-shadow:
            inset 0 1px 0 rgba(255,255,255,.15),
            inset 0 -1px 0 rgba(0,0,0,.2),
            inset 0 0 30px rgba(0,0,0,.1);
    color: inherit;
    text-decoration: none;
}

.tile-icon {
    font-size: 48px;
    margin-bottom: 14px;
    display: block;
    /* subtle drop shadow on icons like Mavericks */
    filter: drop-shadow(0 2px 3px rgba(0,0,0,.7));
    transition: filter .2s, transform .2s;
}

.tile:hover .tile-icon {
    filter: drop-shadow(0 3px 5px rgba(0,0,0,.8));
    transform: translateY(-2px);
}

.tile h3 {
    font-size: 13px;
    font-weight: 700;
    color: #d0d0d0;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .06em;
    text-shadow: 0 1px 2px rgba(0,0,0,.8);
}

.tile p {
    font-size: 11px;
    color: #777;
    line-height: 1.5;
    margin: 0;
    text-shadow: 0 1px 1px rgba(0,0,0,.6);
}

/* ─── MEDIA PAGE ───────────────────────────── */
.responsive-video {
    width: 100%;
    border-radius: 4px;
    box-shadow:
            0 2px 4px rgba(0,0,0,.6),
            0 1px 0 rgba(255,255,255,.06) inset;
    margin-bottom: 30px;
}

.youtube-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: 4px;
    box-shadow:
            0 2px 4px rgba(0,0,0,.6),
            0 1px 0 rgba(255,255,255,.06) inset;
}

.youtube-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 6px;
}

.audio-container { margin-bottom: 40px; }

.audio-container audio {
    width: 100%;
    border-radius: 6px;
    outline: none;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.photo-item img {
    aspect-ratio: 1;
    object-fit: cover;
    width: 100%;
    border-radius: 3px;
    box-shadow:
            0 2px 3px rgba(0,0,0,.55),
            0 1px 0 rgba(255,255,255,.05) inset;
    transition: transform .2s ease, box-shadow .2s ease;
}

.photo-item img:hover {
    transform: scale(1.04);
    box-shadow:
            0 3px 6px rgba(0,0,0,.7),
            0 1px 0 rgba(255,255,255,.05) inset;
}

/* ─── ABOUT PAGE ───────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-photo img {
    border-radius: 4px;
    box-shadow:
            0 2px 4px rgba(0,0,0,.65),
            0 1px 0 rgba(255,255,255,.06) inset;
}

.about-text p {
    color: var(--text);
    font-size: 14px;
    line-height: 1.9;
    margin-bottom: 1.2em;
}

/* ─── BUTTONS ──────────────────────────────── */
.btn-apple {
    display: inline-block;
    padding: 9px 22px;
    border-radius: 6px;
    font-family: var(--body-font);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: filter .15s;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.btn-apple-primary {
    border: 1px solid #aa2010;
    background: linear-gradient(to bottom,
    #ff6b5b 0%, #e63020 50%, #cc2010 51%, #b81a0a 100%);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.2);
    text-shadow: 0 -1px 0 rgba(0,0,0,.3);
}

.btn-apple-secondary {
    border: 1px solid #333;
    background: linear-gradient(to bottom,
    #2a2a2a 0%, #1e1e1e 50%, #181818 51%, #121212 100%);
    color: #ddd;
    box-shadow: 0 1px 3px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.08);
}

.btn-apple:hover { filter: brightness(1.12); color: inherit; text-decoration: none; }
.btn-apple:active { filter: brightness(.9); }

/* ─── FOOTER ───────────────────────────────── */
#site-footer {
    background: linear-gradient(to bottom,
    rgba(200,200,200,.80) 0%,
    rgba(0,0,0,.70) 10%,
    rgba(0,0,0,.70) 100%);
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 50px 20px;
}

.footer-inner {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 12px;
}

.footer-col p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.7;
}

.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { padding: 4px 0; }
.footer-links a  { font-size: 12px; color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: none; }

/* ─── COPYRIGHT ────────────────────────────── */
#copyright {
    background: rgba(0,0,0,.6);
    border-top: 1px solid rgba(255,255,255,.05);
    padding: 16px 20px;
    text-align: center;
    font-size: 11px;
    color: rgba(255,255,255,.2);
}

/* ─── RESPONSIVE ───────────────────────────── */
@media (max-width: 900px) {
    .content-sidebar { grid-template-columns: 1fr; }
    .about-grid       { grid-template-columns: 1fr; }
    .footer-inner     { grid-template-columns: 1fr 1fr; }
    .photo-row        { grid-template-columns: 1fr 1fr; }
    .tiles-grid       { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .page-header.homepage h1 { font-size: 40px; }
    .page-header h1           { font-size: 32px; }
    .footer-inner             { grid-template-columns: 1fr; }
    .tiles-grid               { grid-template-columns: 1fr 1fr; }
    #globalheader ul li a     { font-size: 10px; padding: 0 9px; }
    li.nav-logo a             { font-size: 11px; }
    #search-input             { width: 80px; }
}


/* ═══════════════════════════════════════════════
   iOS 6 LOCKSCREEN
═══════════════════════════════════════════════ */

#lockscreen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    color: #fff;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 300;
    overflow: hidden;
    touch-action: none;
    background: url('lockscreen/ios6.jpg') center center / cover no-repeat #1a2530;
}

#lockscreen,
#lockscreen * {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

#lockscreen.ls-hidden { display: none !important; }

/* ── status bar ── */
#ls-status {
    flex-shrink: 0;
    height: 26px;
    background-color: rgba(0,0,0,.35);
    background-image: url('lockscreen/StatusBar.png');
    background-size: 100% 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}

#ls-status img {
    height: 22px;
    width: auto;
    display: block;
    border-radius: 0;
}

/* ── clock bar ── */
#ls-clock {
    flex-shrink: 0;
    background-color: transparent;
    background-image: url('lockscreen/Header.png');
    background-size: 100% 100%;
    padding: 18px 0 20px;
    text-align: center;
}

#ls-time {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 96px;
    font-weight: 100;
    line-height: 1;
    letter-spacing: -3px;
    color: #fff;
    text-shadow: 0 0 30px rgba(0,0,0,.3), 0 1px 3px rgba(0,0,0,.4);
}

#ls-date {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 21px;
    font-weight: 400;
    color: rgba(255,255,255,.95);
    margin-top: 4px;
    letter-spacing: .01em;
}

/* ── wallpaper area ── */
#ls-wall { flex: 1; }

/* ── footer bar ── */
#ls-footer {
    flex-shrink: 0;
    background-image: url('lockscreen/footer.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    height: 123px;
    padding: 0 14px;
    display: flex;
    align-items: center;
}

/* ── slider ── */
#ls-slider {
    position: relative;
    flex: 1;
    height: 60px;
}

#ls-track {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: stretch;
    pointer-events: none;
}

#ls-track-l,
#ls-track-r {
    flex-shrink: 0;
    display: block;
    height: 60px;
    width: auto;
    border-radius: 0;
}

#ls-track-m {
    flex: 1;
    background: url('lockscreen/WrapperForSliderMIDLE.png') repeat-x center / auto 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* shimmer text */
#ls-label {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 22px;
    font-weight: 200;
    letter-spacing: .06em;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    background: linear-gradient(90deg,
    rgba(255,255,255,.2) 0%,
    rgba(255,255,255,.2) 35%,
    rgba(255,255,255,.95) 50%,
    rgba(255,255,255,.2) 65%,
    rgba(255,255,255,.2) 100%);
    background-size: 300% 100%;
    background-position: 200% 0;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: ls-shimmer 4s linear infinite;
}

@keyframes ls-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -100% 0; }
}

/* handle */
#lockscreen #ls-handle {
    position: absolute;
    top: 2px;
    left: 0;
    height: 60px;
    width: 78px;
    display: block;
    border-radius: 0;
    cursor: grab;
    z-index: 5;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

#lockscreen #ls-handle:active { cursor: grabbing; }

/* lockscreen only on mobile */
@media (min-width: 769px) {
    #lockscreen { display: none !important; }
}

/* ═══════════════════════════════════════
   iOS 6 BOTTOM TAB BAR — mobile only
═══════════════════════════════════════ */

#ios-tabbar { display: none; }

@media (max-width: 768px) {
    #globalheader { display: none !important; }

    #ios-tabbar {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 68px;
        z-index: 9000;
        background: linear-gradient(to bottom, #3a3a3a 0%, #2a2a2a 2%, #1e1e1e 100%);
        border-top: 1px solid #000;
        box-shadow: 0 -1px 0 rgba(255,255,255,.08);
        align-items: stretch;
    }

    .tab-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        gap: 4px;
        border-right: 1px solid rgba(0,0,0,.5);
        padding: 8px 0 6px;
        position: relative;
        transition: background .1s;
    }

    .tab-item:last-child { border-right: none; }
    .tab-item:hover { text-decoration: none; }

    /* inactive icon — grey */
    .tab-icon {
        width: 24px;
        height: 24px;
        display: block;
        filter: invert(1) opacity(0.45);
    }



    /* inactive label — dim white */
    .tab-label {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: .02em;
        color: rgba(255,255,255,.55);
        text-shadow: 0 -1px 0 rgba(0,0,0,.6);
    }

    /* active — reversed gradient (darker top = pressed) */
    .tab-item.active {
        background: linear-gradient(to bottom, #080808 0%, #282828 100%);
        box-shadow: inset 0 3px 5px rgba(0,0,0,.85);
        text-decoration: none;
    }

    /* active top edge */
    .tab-item.active::after {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0;
        height: 1px;
        background: #000;
    }

    /* active icon — white */
    .tab-item.active .tab-icon {
        filter: invert(1) opacity(1);
    }

    /* active label — full white */
    .tab-item.active .tab-label {
        color: #fff;
        text-shadow: 0 1px 0 rgba(0,0,0,.5);
    }

    body { padding-bottom: 68px; }
}