/* =====================================================
   macOS DESKTOP PORTFOLIO - AUTHENTIC FINDER STYLE
   ===================================================== */

:root {
    --chrome-bg: #3c3c3c;
    --sidebar-bg: #2d2d2f;
    --content-bg: #1e1e1e;
    --toolbar-bg: #323232;
    --text: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-tertiary: rgba(255, 255, 255, 0.4);
    --border: rgba(255, 255, 255, 0.1);
    --accent: #0a84ff;
    --red: #ff5f57;
    --yellow: #febc2e;
    --green: #28c840;
    --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
}

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

html, body {
    height: 100%;
    overflow: hidden;
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

/* Wallpapers */
.wallpaper {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    transition: background-image 0.8s ease;
}

.wallpaper[data-wallpaper="0"] { background-image: url('https://images.unsplash.com/photo-1462331940025-496dfbfc7564?w=1920&q=80'); }
.wallpaper[data-wallpaper="1"] { background-image: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1920&q=80'); }
.wallpaper[data-wallpaper="2"] { background-image: url('https://images.unsplash.com/photo-1534796636912-3b95b3ab5986?w=1920&q=80'); }
.wallpaper[data-wallpaper="3"] { background-image: url('https://images.unsplash.com/photo-1419242902214-272b3f66ee7a?w=1920&q=80'); }
.wallpaper[data-wallpaper="4"] { background-image: url('https://images.unsplash.com/photo-1507400492013-162706c8c05e?w=1920&q=80'); }

/* Hero Overlay - Name on Wallpaper */
.hero-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    text-align: center;
    pointer-events: none;
}

.hero-name {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    color: white;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero-role {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-role a {
    color: #0a84ff;
    font-weight: 500;
    text-decoration: none;
    pointer-events: auto;
    transition: color 0.2s;
}

.hero-role a:hover {
    color: #409cff;
    text-decoration: underline;
}

/* Desktop Folders */
.desktop {
    position: fixed;
    top: 40px;
    right: 20px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90px;
    padding: 8px;
    border-radius: 8px;
    cursor: default;
    transition: background 0.15s;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.15);
}

.desktop-icon.selected {
    background: rgba(10, 132, 255, 0.4);
}

.desktop-icon-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 6px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.desktop-icon-label {
    font-size: 12px;
    font-weight: 500;
    color: white;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
}

/* Wallpaper Widget */
.wallpaper-widget {
    position: fixed;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.wallpaper-widget:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.05);
}

.widget-preview {
    width: 50px;
    height: 32px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.widget-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Menu Bar */
.menubar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 25px;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(30px) saturate(180%);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.menubar-left, .menubar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.apple-logo {
    width: 13px;
    height: 13px;
    background: var(--text);
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.menubar-name {
    font-weight: 600;
    font-size: 13px;
}

.menubar-time {
    font-variant-numeric: tabular-nums;
    font-size: 13px;
}

/* Finder Window */
.window {
    position: fixed;
    display: none;
    flex-direction: column;
    width: 800px;
    height: 520px;
    background: var(--content-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 30px 60px rgba(0, 0, 0, 0.4);
    z-index: 100;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.window.open {
    display: flex;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Window Chrome (Title Bar) */
.window-chrome {
    display: flex;
    align-items: center;
    height: 52px;
    padding: 0 16px;
    background: var(--chrome-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.control svg {
    width: 8px;
    height: 8px;
    opacity: 0;
    transition: opacity 0.15s;
}

.window-controls:hover .control svg {
    opacity: 1;
}

.control.close { 
    background: var(--red); 
    color: #4a0000;
}
.control.minimize { 
    background: var(--yellow); 
    color: #995700;
}
.control.maximize { 
    background: var(--green); 
    color: #006500;
}

.control:hover { filter: brightness(1.1); }

.window-title {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

/* Window Body */
.window-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Finder Sidebar */
.finder-sidebar {
    width: 180px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    padding: 8px 0;
    overflow-y: auto;
}

.sidebar-group {
    padding: 0 8px;
}

.sidebar-header {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 10px 6px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: default;
    transition: background 0.15s;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
}

.sidebar-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* Finder Main Area */
.finder-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--content-bg);
}

/* Finder Toolbar */
.finder-toolbar {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 12px;
    background: var(--toolbar-bg);
    border-bottom: 1px solid var(--border);
}

.toolbar-nav {
    display: flex;
    gap: 4px;
}

.nav-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: var(--text);
    font-size: 14px;
    cursor: default;
}

.nav-btn.disabled {
    opacity: 0.3;
}

.toolbar-title {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.toolbar-actions {
    display: flex;
    gap: 2px;
}

.view-btn {
    width: 28px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-tertiary);
    cursor: default;
}

.view-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.view-btn svg {
    width: 14px;
    height: 14px;
}

/* Finder Content */
.finder-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* About - Profile Card */
.profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 24px;
}

.profile-avatar {
    font-size: 64px;
}

.profile-name {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.profile-title {
    font-size: 14px;
    color: var(--accent);
}

.info-table {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-key {
    font-size: 13px;
    color: var(--text-secondary);
}

.info-val {
    font-size: 13px;
    color: var(--text);
}

.status-online {
    color: var(--green);
}

.profile-bio {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Experience */
.exp-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 20px;
}

.exp-icon {
    font-size: 48px;
}

.exp-role {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.exp-company {
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 4px;
}

.exp-period {
    font-size: 12px;
    color: var(--text-tertiary);
}

.exp-description {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 16px;
}

.exp-description p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.exp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 12px;
    background: rgba(10, 132, 255, 0.15);
    border-radius: 6px;
    font-size: 12px;
    color: var(--accent);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.skill-group {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 16px;
}

.skill-category {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text);
    transition: background 0.15s;
}

.skill-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.skill-emoji {
    font-size: 16px;
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.contact-app-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 12px;
}

.contact-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.contact-handle {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Dock */
.dock {
    position: fixed;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
}

.dock-container {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(40, 40, 40, 0.75);
    backdrop-filter: blur(30px) saturate(180%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dock-item {
    padding: 4px;
    background: none;
    border: none;
    cursor: default;
    transition: transform 0.15s ease;
    position: relative;
    text-decoration: none;
}

.dock-item:hover {
    transform: translateY(-8px) scale(1.2);
}

.dock-item::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}

.dock-item:hover::after {
    opacity: 1;
}

img.dock-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
}

.dock-separator {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 6px;
    align-self: center;
}

.dock-item.active::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

/* Responsive */
@media (max-width: 900px) {
    .window {
        width: 95vw;
        height: 80vh;
    }
    
    .finder-sidebar {
        width: 140px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .dock-icon {
        width: 40px;
        height: 40px;
    }
    
    .wallpaper-widget {
        display: none;
    }
}

@media (max-width: 600px) {
    .finder-sidebar {
        display: none;
    }
    
    .profile-card {
        flex-direction: column;
        text-align: center;
    }
    
    .exp-card {
        flex-direction: column;
        text-align: center;
    }
}
