/* ========================================
   BRODYYY — desktop OS portfolio (macOS dark)
   koncept: bychudy.com · default macOS dark
   ======================================== */

:root {
    --yellow: #fec84b;            /* fajky / akcent z referencie */
    --win:      #1e1e1f;          /* telo okna */
    --win-bar:  #2c2c2e;          /* titulková lišta */
    --win-2:    #262628;          /* panely vnútri */
    --border:   rgba(255,255,255,.10);
    --text:     #ececee;
    --text-2:   #9a9aa0;          /* sekundárny text */
    --desk:     #161617;          /* plocha kým nie je tapeta */
    --shadow:   0 24px 60px rgba(0,0,0,.55);
    --radius:   12px;
    --ui: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --ease: cubic-bezier(.22,1,.36,1);
}

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

html, body { height: 100%; }
body {
    font-family: var(--ui);
    color: var(--text);
    background-color: var(--desk);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    user-select: none;
}
::selection { background: var(--yellow); color: #1a1a1a; }

/* tapeta ako samostatná vrstva (kvôli parallaxu / 3D náklonu) */
.wallpaper {
    position: fixed;
    inset: -6%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    will-change: transform;
    transform-origin: center center;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    /* vypneme len veľké/opakované animácie; jemné hover prechody nechávame */
    .window, .dialog { animation: none !important; }
    .dock-app, .icon-thumb, .icon-label { transition-duration: .14s !important; }
}

/* ---------- menubar ---------- */
.menubar {
    position: fixed;
    inset: 0 0 auto 0;
    height: 28px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 14px;
    background: rgba(28,28,30,.66);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: 13px;
    color: var(--text);
}
.mb-left, .mb-right { display: flex; align-items: center; gap: 18px; }
.mb-brand { font-weight: 700; letter-spacing: .02em; }
.mb-item { cursor: default; font-weight: 500; opacity: .92; }
.mb-about { cursor: pointer; }
.mb-item:hover { opacity: .6; }
.mb-tag { font-size: 12px; color: var(--text-2); }
.mb-clock { font-size: 12px; font-weight: 600; min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 600px) { .mb-left .mb-item, .mb-tag { display: none; } }

/* ---------- desktop ---------- */
.desktop { position: fixed; inset: 28px 0 0 0; z-index: 1; }

.desktop-empty {
    position: absolute;
    top: 42%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(30,30,31,.9);
    padding: 28px 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 15px;
    line-height: 1.7;
}
.desktop-empty a { color: var(--yellow); }

/* ---------- ikony na ploche ---------- */
.icon {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 96px;
    display: grid; justify-items: center; gap: 6px;
    background: none; border: 0; cursor: pointer; font: inherit;
    padding: 4px;
}
.icon-thumb {
    width: 72px; height: 72px;
    display: grid; place-items: center;
    overflow: hidden;
    background: #2a2a2c;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,.45);
    transition: transform .32s var(--ease), box-shadow .32s var(--ease);
    will-change: transform;
}
.icon-thumb img, .icon-thumb video { width: 100%; height: 100%; object-fit: cover; }
.icon-blank { font-size: 30px; color: #6a6a6e; }
.icon-label {
    font-size: 11px; font-weight: 600; letter-spacing: .02em;
    text-align: center; line-height: 1.2;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.9), 0 0 2px rgba(0,0,0,.8);
    max-width: 112px; text-transform: uppercase;
    padding: 1px 5px; border-radius: 5px;
    transition: background .2s var(--ease);
}
.icon:hover .icon-thumb { transform: translateY(-5px) scale(1.06); box-shadow: 0 14px 30px rgba(0,0,0,.55); }
.icon:hover .icon-label { background: rgba(254,200,75,.92); color: #1a1a1a; text-shadow: none; }
.icon:active .icon-thumb { transform: translateY(-2px) scale(1.02); transition-duration: .12s; }
.icon:focus-visible { outline: none; }
.icon:focus-visible .icon-thumb { outline: 3px solid var(--yellow); outline-offset: 2px; }
.icon.selected .icon-thumb { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* ---------- okná ---------- */
.window {
    position: fixed;
    min-width: 320px;
    width: min(580px, 92vw);
    max-height: 80vh;
    background: var(--win);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex; flex-direction: column;
    overflow: hidden;
    z-index: 20;
    animation: winpop .16s var(--ease);
}
@keyframes winpop { from { opacity: 0; transform: scale(.97) translateY(6px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.win-bar {
    height: 38px; flex-shrink: 0;
    display: flex; align-items: center; gap: 8px;
    padding: 0 12px;
    background: var(--win-bar);
    border-bottom: 1px solid var(--border);
    cursor: grab;
}
.win-bar.dragging { cursor: grabbing; }
.win-lights { display: flex; gap: 8px; }
.win-light { width: 12px; height: 12px; border-radius: 50%; border: 0; cursor: pointer; padding: 0; }
.win-close { background: #ff5f57; }
.win-min   { background: #febc2e; }
.win-zoom  { background: #28c840; }
.win-title {
    flex: 1; text-align: center;
    font-size: 13px; font-weight: 600;
    color: var(--text-2);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    padding-right: 50px;
}
.win-body { overflow-y: auto; padding: 20px 22px 26px; }
.win-body:has(.cvwin) { padding: 0; }

/* ---------- projekt v okne ---------- */
.pjt-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pjt-cover {
    width: 46px; height: 46px; flex-shrink: 0; object-fit: cover;
    border-radius: 9px; border: 1px solid var(--border);
    display: grid; place-items: center; color: var(--text-2); font-size: 16px; background: #2a2a2c;
}
.pjt-head-txt { display: grid; gap: 2px; }
.pjt-title { font-size: 15px; font-weight: 700; }
.pjt-sub { font-size: 13px; color: var(--text-2); }

.pjt-desc {
    background: var(--win-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 14.5px; line-height: 1.6;
    margin-bottom: 14px;
}

.pjt-sec { margin-bottom: 12px; }
.pjt-sec > summary {
    list-style: none; cursor: pointer;
    font-size: 13px; font-weight: 600; color: var(--text);
    display: flex; align-items: center; gap: 7px;
    padding: 4px 0;
}
.pjt-sec > summary::-webkit-details-marker { display: none; }
.pjt-sec > summary::before {
    content: '▸'; color: var(--text-2); font-size: 11px;
    transition: transform .2s var(--ease);
}
.pjt-sec[open] > summary::before { transform: rotate(90deg); }
.pjt-detail { font-size: 14px; padding: 6px 0 4px 18px; }
.pjt-detail-k { font-weight: 700; }

.pb-media { display: grid; gap: 10px; padding: 8px 0 2px; }
.pb-media img, .pb-media video { width: 100%; height: auto; display: block; border-radius: 8px; border: 1px solid var(--border); }
.pb-embed { position: relative; aspect-ratio: 16/9; }
.pb-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }
.pb-text { font-size: 14.5px; line-height: 1.6; }

/* ---------- O mne / CV / Interests ---------- */
.cvwin { display: flex; min-height: 320px; max-height: 80vh; }
.cv-tabs {
    width: 150px; flex-shrink: 0;
    border-right: 1px solid var(--border);
    padding: 14px 8px; display: flex; flex-direction: column; gap: 2px;
    background: var(--win-2);
}
.cv-tab {
    display: flex; justify-content: space-between; align-items: center;
    background: none; border: 0; cursor: pointer; font: inherit;
    color: var(--text); font-size: 14px; text-align: left;
    padding: 7px 10px; border-radius: 7px;
}
.cv-tab span { color: var(--text-2); font-size: 12px; }
.cv-tab:hover { background: rgba(255,255,255,.05); }
.cv-tab.is-active { background: rgba(255,255,255,.10); }
.cv-content { flex: 1; overflow-y: auto; padding: 18px 22px 24px; }
.cv-pane[hidden] { display: none; }
.cv-intro { font-size: 14.5px; line-height: 1.6; margin-bottom: 16px; }
.cv-h { font-size: 14px; font-weight: 700; margin: 18px 0 8px; }
.cv-h:first-child { margin-top: 0; }
.cv-list { list-style: none; display: grid; gap: 6px; }
.cv-list li {
    position: relative; padding-left: 26px;
    font-size: 14px; line-height: 1.45;
}
.cv-list li::before {
    content: '✓';
    position: absolute; left: 0; top: 1px;
    width: 17px; height: 17px;
    display: grid; place-items: center;
    background: var(--yellow); color: #1a1a1a;
    border-radius: 50%; font-size: 11px; font-weight: 700;
}
.cv-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cv-gallery img { width: 100%; height: auto; display: block; border-radius: 8px; border: 1px solid var(--border); }

@media (max-width: 560px) {
    .cvwin { flex-direction: column; max-height: none; }
    .cv-tabs { width: 100%; flex-direction: row; border-right: 0; border-bottom: 1px solid var(--border); }
    .cv-tab { flex: 1; justify-content: center; gap: 6px; }
}

/* ---------- kontakt vizitka ---------- */
.ct-card { display: flex; gap: 20px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.ct-photo {
    width: 130px; height: 150px; flex-shrink: 0; object-fit: cover;
    border-radius: 10px; border: 1px solid var(--border);
    filter: grayscale(100%);
}
.ct-rows { flex: 1; min-width: 200px; display: grid; gap: 0; }
.ct-row {
    display: flex; align-items: baseline; gap: 14px;
    padding: 12px 2px; border-bottom: 1px solid var(--border);
}
.ct-row:last-child { border-bottom: 0; }
.ct-k {
    font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px; font-weight: 700; letter-spacing: .04em;
    color: var(--text-2); min-width: 78px; text-transform: uppercase;
}
.ct-v { font-size: 15px; color: var(--text); }
.ct-link { color: #4ea1ff; text-decoration: none; }
.ct-link:hover { text-decoration: underline; }
.ct-bio {
    background: var(--win-2); border: 1px solid var(--border); border-radius: 8px;
    padding: 14px 16px; font-size: 14.5px; line-height: 1.65;
}

/* ---------- fake adobe dialóg ---------- */
.dialog {
    position: fixed; z-index: 60;
    width: min(330px, 88vw);
    background: #2a2a2c; color: #f0f0f0;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px; text-align: center;
    animation: winpop .14s var(--ease);
}
.dialog-ico { font-size: 26px; margin-bottom: 10px; display: inline-block; font-weight: 800; }
.dialog p { font-size: 13px; line-height: 1.5; margin-bottom: 16px; }
.dialog button {
    background: #3a7afe; color: #fff; border: 0;
    padding: 7px 16px; font: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer; border-radius: 7px;
}

/* ---------- dock ---------- */
.dock {
    position: fixed; left: 50%; bottom: 12px;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    background: rgba(40,40,42,.55);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 20px;
    box-shadow: 0 14px 40px rgba(0,0,0,.5);
}
.dock-app {
    position: relative;
    width: 48px; height: 48px;
    display: grid; place-items: center;
    background: none; border: 0; cursor: pointer; text-decoration: none;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.dock-app:hover { transform: translateY(-9px) scale(1.14); }
.dock-app:active { transform: translateY(-3px) scale(1.05); transition-duration: .1s; }

/* tooltip s názvom ikonky */
.dock-app[data-tip]::after {
    content: attr(data-tip);
    position: absolute; left: 50%; bottom: calc(100% + 12px);
    transform: translateX(-50%) translateY(4px) scale(.96);
    background: #f4f4f6; color: #1a1a1a;
    font-size: 12px; font-weight: 600; letter-spacing: .01em;
    padding: 5px 11px; border-radius: 9px; white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0,0,0,.35);
    opacity: 0; pointer-events: none;
    transition: opacity .16s var(--ease), transform .16s var(--ease);
}
.dock-app[data-tip]::before {
    content: ''; position: absolute; left: 50%; bottom: calc(100% + 6px);
    transform: translateX(-50%);
    border: 6px solid transparent; border-top-color: #f4f4f6;
    opacity: 0; pointer-events: none; transition: opacity .16s var(--ease);
}
.dock-app[data-tip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.dock-app[data-tip]:hover::before { opacity: 1; }
.da {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 11px;
    font-weight: 800; font-size: 17px; color: #fff;
}
.da-ae { background: linear-gradient(135deg,#1a0a3a,#2a1a5a); color:#9b8cff; border:1px solid #4a3a8a; }
.da-ps { background: linear-gradient(135deg,#001e36,#003a5c); color:#3ddbff; border:1px solid #0a5a8a; }
.da-ai { background: linear-gradient(135deg,#330000,#5c1a00); color:#ff9a3d; border:1px solid #8a3a0a; }
.da-info { background: #f0f0f0; color:#1a1a1a; font-size: 22px; }
.da-ig { background: linear-gradient(135deg,#feda75,#d62976,#962fbf); font-size: 20px; }
.da-ttv { background: #9146ff; font-size: 16px; }
.da-mail { background: linear-gradient(135deg,#3a8eff,#1a6aff); font-size: 20px; }
.da-trash { background: rgba(255,255,255,.85); color:#333; font-size: 20px; }
.da-custom { background: rgba(255,255,255,.92); overflow: hidden; padding: 0; }
.da-custom img { width: 100%; height: 100%; object-fit: cover; display: block; }
.da-custom.da-text { background: #1a1a1a; color: var(--yellow); font-size: 15px; }
.dock-sep { width: 1px; height: 34px; background: rgba(255,255,255,.16); }

@media (max-width: 600px) {
    .dock { gap: 4px; padding: 6px 8px; bottom: 8px; }
    .dock-app { width: 40px; height: 40px; }
    .da { width: 38px; height: 38px; font-size: 14px; }
    .icon { width: 80px; }
    .icon-thumb { width: 58px; height: 58px; }
}
