:root {
    --bg-color: #FDFBF7;
    --window-width: 900px;
    --window-height: 600px;
    --font-inter: "Inter", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-inter);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.window {
    width: var(--window-width);
    height: var(--window-height);
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Browser Header Structure */
.browser-header {
    background: #F3F3F3;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #E5E5E5;
}

.title-bar-row {
    display: flex;
    align-items: center;
    padding: 12px 16px 8px;
    /* Top padding for window controls */
    gap: 20px;
}

/* Window Controls (Traffic Lights) */
.buttons {
    display: flex;
    gap: 8px;
    margin-right: 12px;
}

.button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.close {
    background-color: #FF5F57;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.minimize {
    background-color: #FEBC2E;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.maximize {
    background-color: #28C840;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Tabs */
.tabs-container {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    flex: 1;
    height: 34px;
    /* Tab height */
    padding-right: 16px;
}

.tab {
    background-color: transparent;
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
    max-width: 160px;
    flex: 1;
    position: relative;
}

.tab:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.tab.active {
    background-color: #FFFFFF;
    color: #000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tab-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.tab-close {
    font-size: 14px;
    opacity: 0;
    border-radius: 4px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab:hover .tab-close {
    opacity: 0.6;
}

.tab-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    opacity: 1 !important;
}

.new-tab-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    color: #666;
    font-size: 18px;
    margin-bottom: 2px;
}

.new-tab-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Navigation Bar */
.nav-bar-row {
    display: flex;
    align-items: center;
    padding: 8px 16px 12px;
    gap: 12px;
}

.nav-controls {
    display: flex;
    gap: 12px;
    color: #555;
}

.nav-icon {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.nav-icon:hover {
    opacity: 1;
}

.address-bar {
    flex: 1;
    background-color: #F1F1F1;
    /* Slightly darker than active tab */
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    font-size: 13px;
    color: #333;
    transition: background 0.2s, box-shadow 0.2s;
}

.address-bar:focus-within {
    background-color: #FFF;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
    /* Focus ring */
    outline: none;
    /* remove default browser outline */
}

/* Optional: Make the address text editable if we want */
.url-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    outline: none;
}

.lock-icon {
    color: #666;
    width: 12px;
    height: 12px;
    opacity: 0.8;
}

/* Content Area */
.viewport {
    flex: 1;
    background-color: #FFF;
    overflow-y: auto;
    position: relative;
}

.page-content {
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
}

/* Specific override for full-width Finder windows */
#page-players,
#page-subpage,
#page-contact {
    max-width: none;
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}

h1 {
    font-weight: 600;
    font-size: 24px;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

p {
    color: #666;
    line-height: 1.6;
}

/* Profile Styles */
.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding-bottom: 8vh;
    /* Reduced from 20vh to move it down further */
}

.profile-container {
    margin-bottom: 24px;
    background-color: #fff;
    padding: 12px 12px 12px 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: inline-block;
    transform: rotate(-2deg);
    transition: all 0.3s ease;
}

.profile-container:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.profile-image {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 0;
    display: block;
    filter: grayscale(20%);
    margin-bottom: 12px;
}

.polaroid-caption {
    font-family: "Schoolbell", cursive;
    font-size: 24px;
    color: #3333337a;
    padding-bottom: 8px;
}

.role-text {
    font-family: "IBM Plex Mono", monospace;
    font-size: 14px;
    color: #777;
    letter-spacing: 0.05em;
    margin-top: 8px;
    font-weight: 400;
}

/* Desktop Icon / Folder Styles */
.desktop-icon {
    position: absolute;
    left: 60px;
    top: 50%;
    /* Center vertically on the left */
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    padding: 16px;
    border-radius: 8px;
    color: #444;
    width: 100px;
    text-align: center;
}

.desktop-icon.right-icon {
    left: auto;
    right: 60px;
}

.desktop-icon:hover {
    background-color: rgba(0, 0, 0, 0.04);
    transform: translateY(-50%) scale(1.05);
}

.desktop-icon img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

.desktop-icon span {
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-inter);
    color: #333;
    pointer-events: none;
    /* Let clicks pass to container */
}

/* Button style for back navigation */
button {
    padding: 8px 16px;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-inter);
    margin-top: 20px;
}

button:hover {
    background: #e5e5e5;
}

/* Social Media Icons */
.social-links {
    display: flex;
    gap: 16px;
    margin-top: 20px;
    justify-content: center;
}

.social-icon {
    color: #888;
    transition: all 0.2s ease;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon:hover {
    color: #333;
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    :root {
        --window-width: 95vw;
        --window-height: 90vh;
    }

    .page-content {
        padding: 24px;
        /* Ensure visual order works using flex or absolute positioning adjustments */
    }

    .center-content {
        padding-bottom: 80px;
        /* Space for bottom folders */
        padding-top: 40px;
    }

    .desktop-icon {
        top: auto;
        bottom: 30px;
        left: 50%;
        transform: translateX(-110%);
        /* Shift left from center */
    }

    .desktop-icon.right-icon {
        top: auto;
        bottom: 30px;
        right: auto;
        left: 50%;
        transform: translateX(10%);
        /* Shift right from center */
    }

    .desktop-icon:hover {
        transform: translateX(-110%) scale(1.05);
    }

    .desktop-icon.right-icon:hover {
        transform: translateX(10%) scale(1.05);
    }

    .profile-image {
        width: 160px;
        height: 160px;
    }
}

/* Projects Grid Styles */
.projects-header h2 {
    font-weight: 600;
    color: #333;
    margin-bottom: 32px;
    font-size: 24px;
    padding-left: 8px;
}

.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 32px 24px;
    padding-bottom: 40px;
}

.folder-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 8px;
    border-radius: 8px;
}

.folder-item:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.folder-item img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
    transition: transform 0.2s;
}

.folder-item:hover img {
    transform: scale(1.05);
}

.folder-item span {
    font-size: 13px;
    color: #444;
    text-align: center;
    font-weight: 500;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.back-link-container {
    margin-top: 24px;
    border-top: 1px solid #eee;
    padding-top: 24px;
}

.back-btn {
    background: transparent;
    border: 1px solid #ddd;
    color: #555;
    font-size: 13px;
    padding: 6px 16px;
}

.back-btn:hover {
    background: #f5f5f5;
    color: #333;
}

/* MacOS Finder List View Styles */
.finder-window {
    display: flex;
    flex-direction: row;
    height: 100%;
    background: #fff;
    overflow: hidden;
}

/* Sidebar Styles */
.finder-sidebar {
    width: 200px;
    background: #f1f2f4;
    border-right: 1px solid #ddd;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

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

.sidebar-title {
    font-size: 11px;
    font-weight: 600;
    color: #777;
    padding: 4px 8px;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    color: #444;
    font-size: 13px;
    transition: background 0.1s;
}

.sidebar-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.sidebar-item.active {
    background-color: #dcdcdc;
    color: #333;
    font-weight: 500;
}

.sidebar-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Main View Area */
.finder-main-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.finder-list-header {
    display: flex;
    padding: 6px 20px;
    border-bottom: 1px solid #ddd;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    user-select: none;
}

.f-col {
    padding: 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.f-name {
    flex: 2;
    min-width: 200px;
}

.f-date {
    flex: 1;
    color: #777;
    min-width: 140px;
}

.f-kind {
    flex: 1;
    color: #777;
    min-width: 100px;
}

.finder-list-content {
    flex: 1;
    overflow-y: auto;
}

.finder-row {
    display: flex;
    align-items: center;
    padding: 4px 20px;
    font-size: 13px;
    cursor: default;
    height: 28px;
}

/* Zebra striping */
.finder-row:nth-child(even) {
    background-color: #f6f7f8;
}

.finder-row:hover {
    background-color: #007aff;
    color: #fff;
}

.finder-row:hover .f-date,
.finder-row:hover .f-kind {
    color: #e6f0ff;
}

.f-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.f-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.back-link-container {
    margin-top: 0;
}

/* Mobile Sidebar Hide */
@media (max-width: 600px) {
    .finder-sidebar {
        display: none;
    }
}

/* Experience Page Styles - Desktop Mode */
.experience-content {
    padding: 40px;
    position: relative;
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass to desktop */
}

.desktop-files-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.file-icon {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 128px;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: default;
    transition: background 0.1s;
}

.file-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
    /* Subtle hover like macOS */
}

.file-icon.selected {
    background-color: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.file-icon img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    margin-bottom: 8px;
    pointer-events: none;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.file-name {
    font-size: 13px;
    color: #333;
    text-align: center;
    line-height: 1.3;
    padding: 2px 4px;
    border-radius: 3px;
    max-width: 100%;
    word-wrap: break-word;
    background: transparent;
    cursor: text;
}

.file-icon.selected .file-name {
    background: #0058d0;
    color: white;
}