/* ================================================
   macOS X 10.9 Mavericks Theme
   ================================================ */

/* CSS Variables - macOS X 10.9 Mavericks Color Palette */
:root {
    /* Layout */
    --menubar-height: 24px;
    --window-titlebar-height: 22px;

    /* Small viewport height for mobile Safari - fallback to vh for older browsers */
    --vh-full: 100vh;
    --vh-full: 100svh;
    /* Overrides previous line in browsers that support svh */

    /* === MAVERICKS ACCENT COLORS === */
    /* Primary Blue - The classic Aqua blue from Mavericks */
    --accent-blue: #007AFF;
    --accent-blue-hover: #0066D6;
    --accent-blue-active: #0055B3;
    --accent-blue-light: #E8F2FC;
    --accent-blue-subtle: rgba(0, 122, 255, 0.08);

    /* Secondary Blue - Softer Aqua blue for headers/sections */
    --accent-blue-muted: #5A8CBB;
    --accent-blue-muted-light: #6B9BC3;

    /* === MAVERICKS BLUISH-GRAY PALETTE === */
    /* Authentic Mavericks colors with subtle blue tint */
    /* Based on Finder sidebar color #DFE4EA (RGB 223, 228, 234) */
    --gray-50: #F7F9FB;
    /* Lightest - subtle blue tint */
    --gray-100: #EEF2F6;
    /* Light surface */
    --gray-150: #E6EAEF;
    /* Sidebar/content bg */
    --gray-200: #DFE4EA;
    /* Mavericks Finder sidebar - THE key color */
    --gray-300: #C9D1D9;
    /* Borders light */
    --gray-400: #B4BEC8;
    /* Borders medium */
    --gray-500: #8E99A4;
    /* Disabled text */
    --gray-600: #6E7A85;
    /* Secondary text */
    --gray-700: #525D66;
    /* Primary text muted */
    --gray-800: #3A4249;
    /* Dark text */
    --gray-900: #2C3338;
    /* Darker text */
    --gray-950: #1C2024;
    /* Darkest */

    /* === TEXT COLORS === */
    --text-primary: #1C2024;
    --text-color: #2C3338;
    --text-secondary: #525D66;
    --text-tertiary: #6E7A85;
    --text-placeholder: #8E99A4;
    --text-inverse: #FFFFFF;

    /* === WINDOW CHROME === */
    /* Mavericks window chrome with bluish-gray tint */
    --menubar-bg: rgba(40, 44, 50, 0.85);
    --window-bg: rgba(247, 249, 251, 0.92);
    --window-bg-solid: #F7F9FB;
    --window-titlebar: linear-gradient(180deg, #E8ECF0 0%, #D4DAE0 100%);
    --window-titlebar-inactive: linear-gradient(180deg, #F0F3F6 0%, #E4E8EC 100%);
    --window-border: rgba(140, 150, 160, 0.5);
    --window-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 5px 20px rgba(0, 0, 0, 0.15);
    --toolbar-bg: linear-gradient(180deg, #EEF2F6 0%, #DFE4EA 100%);
    --toolbar-border: #C9D1D9;

    /* === TRAFFIC LIGHTS === */
    --traffic-red: #FF5F57;
    --traffic-red-border: #E14640;
    --traffic-yellow: #FEBC2E;
    --traffic-yellow-border: #DEA123;
    --traffic-green: #28C840;
    --traffic-green-border: #1AAB29;
    --traffic-inactive: #C9D1D9;

    /* === FINDER ICON COLORS === */
    --folder-orange: #FF9500;
    --folder-orange-dark: #E68600;
    --document-blue: #007AFF;
    --document-blue-dark: #0066D6;

    /* === SEMANTIC COLORS === */
    --success: #34C759;
    --warning: #FF9500;
    --error: #FF3B30;
    --info: #5856D6;

    /* === EVENT/TAG TYPE COLORS === */
    --type-hackathon: #5856D6;
    --type-fellowship: #34C759;
    --type-work: #FF9500;
    --type-open-source: #007AFF;
    --type-speaking: #FF2D55;
    --type-achievement: #FFCC00;
    --type-project: #30B0C7;

    /* === SCROLLBAR === */
    --scrollbar-track: #E6EAEF;
    --scrollbar-thumb: #B4BEC8;
    --scrollbar-thumb-hover: #8E99A4;

    /* === SHADOWS === */
    --shadow-sm: 0 1px 2px rgba(28, 32, 36, 0.06);
    --shadow-md: 0 2px 8px rgba(28, 32, 36, 0.1);
    --shadow-lg: 0 4px 16px rgba(28, 32, 36, 0.14);
    --shadow-card: 0 1px 3px rgba(28, 32, 36, 0.08);
    --shadow-card-hover: 0 4px 12px rgba(28, 32, 36, 0.12);

    /* === TYPOGRAPHY === */
    --font-system: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
    --font-mono: 'Menlo', 'Monaco', monospace;
}

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

/* Base */
html,
body {
    width: 100%;
    height: 100vh;
    height: 100svh;
    /* Small viewport height for mobile Safari */
    overflow: hidden;
    font-family: var(--font-system);
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
    user-select: none;
}

body {
    /* Wallpaper handled by ::before pseudo-element */
    /* Fallback color matches wallpaper to prevent white flash */
    background-color: #2d3a4f;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Tiny 16x9 base64 placeholder - loads instantly */
    background: url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QDIRXhpZgAATU0AKgAAAAgABgEGAAMAAAABAAIAAAESAAMAAAABAAEAAAEaAAUAAAABAAAAVgEbAAUAAAABAAAAXgEoAAMAAAABAAIAAIdpAAQAAAABAAAAZgAAAAAAAABIAAAAAQAAAEgAAAABAAeQAAAHAAAABDAyMjGRAQAHAAAABAECAwCgAAAHAAAABDAxMDCgAQADAAAAAQABAACgAgAEAAAAAQAAABCgAwAEAAAAAQAAAAmkBgADAAAAAQAAAAAAAAAA/8AAEQgACQAQAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/bAEMAAgICAgICAwICAwUDAwMFBgUFBQUGCAYGBgYGCAoICAgICAgKCgoKCgoKCgwMDAwMDA4ODg4ODw8PDw8PDw8PD//bAEMBAgICBAQEBwQEBxALCQsQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEP/dAAQAAf/aAAwDAQACEQMRAD8A/OPxl4o0a+t7e78NeVbRSHE0ZG5lz/cJz+tcBZyabdQTf2pJH1bajJiQenzjA/DFee23+pFRr0NffTxU3UU7/K+h4MaUVDlsf//Z') no-repeat center center;
    background-size: cover;
    /* transform: scaleX(-1); */
    z-index: -1;
    transition: background-image 0.5s ease-in-out;
}

/* High-res wallpaper loaded class */
body.wallpaper-loaded::before {
    background-image: url('/wallpaper.webp');
}

hr {
    border: none;
    height: 1px;
    background-color: #C0C0C0;
    margin-top: 4px;
    margin-bottom: 4px;
}

/* ================================================
   Menu Bar
   ================================================ */
.menubar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--menubar-height);
    background: var(--menubar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
    z-index: 10000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

#active-app-name {
    /* truncate */
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: calc(100vw - 250px);
    min-width: 0;
}

.menubar-left {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-left: 4px;
}

.menubar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.1s ease;
}

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

.apple-menu {
    display: flex;
    align-items: center;
    padding: 2px 8px;
    cursor: pointer;
    border-radius: 3px;
    position: relative;
    transition: background 0.1s ease;
}

.apple-menu:hover {
    background: rgba(255, 255, 255, 0.15);
}

.apple-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 2px;
    background: rgba(40, 40, 40, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 6px;
    min-width: 200px;
    padding: 4px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.15s ease;
    z-index: 10001;
}

.apple-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 6px 16px;
    color: white;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.1s ease;
}

.dropdown-item:hover {
    background: #007AFF;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

.menu-item {
    color: white;
    font-size: 13px;
    font-weight: 500;
    padding: 2px 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.1s ease;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.menu-item.active {
    font-weight: 600;
}

/* Finder Menu Dropdown */
.finder-menu {
    position: relative;
}

.finder-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    max-width: 300px;
    background: rgba(50, 50, 50, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 4px 0;
    margin-top: 4px;
    z-index: 10000;
}

.finder-dropdown.open {
    display: block;
}

.dropdown-label {
    padding: 6px 16px 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-item.empty {
    color: rgba(255, 255, 255, 0.4);
    cursor: default;
}

.dropdown-item.empty:hover {
    background: none;
}

.dropdown-item.active-window {
    font-weight: 600;
}

.dropdown-item.window-item {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.menubar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    color: white;
    font-size: 12px;
}

.menu-status {
    font-weight: 500;
}

.status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background 0.15s ease;
}

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

.status-icon svg {
    opacity: 0.9;
}

.status-icon:hover svg {
    opacity: 1;
}

/* About This Mac Window */
.about-window {
    min-width: 320px !important;
    min-height: auto !important;
}

.about-this-mac {
    text-align: center;
    padding: 24px 20px;
}

.about-this-mac .about-icon {
    margin-bottom: 12px;
}

.about-this-mac .about-icon svg {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15));
}

.about-this-mac h1 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1C2024;
}

.about-this-mac .about-tagline {
    color: #666;
    font-size: 12px;
    margin-bottom: 20px;
}

.about-this-mac .about-info {
    text-align: left;
    background: #F5F5F7;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid #E5E5E7;
}

.about-this-mac .about-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #E5E5E7;
}

.about-this-mac .about-row:last-child {
    border-bottom: none;
}

.about-this-mac .about-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.about-this-mac .about-value {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

.about-this-mac .about-value a {
    color: #0066CC;
    text-decoration: none;
    transition: color 0.15s ease;
}

.about-this-mac .about-value a:hover {
    color: #004499;
    text-decoration: underline;
}

.about-this-mac .about-commit-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.about-this-mac .about-commit-link code {
    background: #E3E5E8;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-family: 'Menlo', 'Monaco', monospace;
    color: #333;
    transition: background 0.15s ease;
}

.about-this-mac .about-commit-link:hover code {
    background: #D0E5FF;
    color: #0066CC;
}

.about-this-mac .about-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.about-this-mac .about-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.about-this-mac .about-btn.github {
    background: #24292e;
    color: white;
}

.about-this-mac .about-btn.github:hover {
    background: #1a1e22;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.about-this-mac .about-btn.rss {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.about-this-mac .about-btn.rss:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.about-this-mac .about-footer {
    font-size: 11px;
    color: #888;
    margin: 0;
}

/* ================================================
   Desktop
   ================================================ */
.desktop {
    position: fixed;
    top: var(--menubar-height);
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
}

/* Desktop Widget */
.desktop-widget {
    position: absolute;
    left: 20px;
    top: 20px;
    width: 280px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.widget-icon {
    font-size: 16px;
}

.widget-icon.blink-new {
    font-size: 10px;
    font-weight: 800;
    font-family: 'Arial Black', 'Impact', sans-serif;
    padding: 2px 5px;
    border-radius: 3px;
    animation: blink-colors 0.5s linear infinite;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

@keyframes blink-colors {

    0%,
    100% {
        color: #FF0000;
    }

    25% {
        color: #FF00FF;
    }

    50% {
        color: #00FF00;
    }

    75% {
        color: #FFFF00;
    }
}

.widget-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.widget-content {
    padding: 8px;
}

.widget-blog-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease;
    cursor: pointer;
}

.widget-blog-item:hover {
    background: rgba(0, 122, 255, 0.1);
}

.widget-blog-title {
    flex: 1;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.widget-blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.widget-blog-type {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.widget-type-blogs {
    background: rgba(88, 86, 214, 0.15);
    color: #5856D6;
}

.widget-type-projects {
    background: rgba(0, 122, 255, 0.15);
    color: #007AFF;
}

.widget-type-timeline {
    background: rgba(255, 149, 0, 0.15);
    color: #FF9500;
}

.widget-blog-date {
    font-size: 10px;
    color: #888;
    flex-shrink: 0;
}

.desktop-icons {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
    height: 100%;
    padding-right: 10px;
    direction: rtl;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.1s ease;
    direction: ltr;

    /* Button Reset */
    background: none;
    border: none;
    outline: none;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.desktop-icon:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px #007AFF;
}

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

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

.desktop-icon:active {
    background: rgba(0, 122, 255, 0.6);
}

.icon-image {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.icon-image img,
.icon-image svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Lazy-loaded image transitions */
.lazy-image {
    filter: blur(5px);
    transition: filter 0.3s ease-out;
}

.lazy-image.loaded {
    filter: blur(0);
}

.icon-label {
    color: white;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 0 10px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
    max-width: 76px;
    word-wrap: break-word;
}

/* ================================================
   Windows
   ================================================ */
.windows-container {
    position: fixed;
    top: var(--menubar-height);
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.window {
    position: absolute;
    background: var(--window-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 6px;
    box-shadow: var(--window-shadow);
    min-width: 400px;
    min-height: 300px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
    border: 1px solid var(--window-border);
}

.window.inactive .window-titlebar {
    background: var(--window-titlebar-inactive);
}

.window.inactive .window-title {
    color: #999;
}

/* Traffic lights turn gray when inactive */
.window.inactive .traffic-light {
    background: #CDCDCD !important;
    border-color: #B0B0B0 !important;
}

/* Remove background from the symbol span */
.window.inactive .traffic-light span {
    background: transparent !important;
}

.titlebar-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    width: 20px;
    height: 20px;
    padding: 0;
    margin-right: 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0.7;
}

.titlebar-link:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
    opacity: 1;
}

.window.inactive .titlebar-link {
    display: none;
}

.window-titlebar {
    height: var(--window-titlebar-height);
    background: var(--window-titlebar);
    display: flex;
    align-items: center;
    padding: 0 10px;
    cursor: grab;
    flex-shrink: 0;
    border-bottom: 1px solid #B0B0B0;
    border-radius: 6px 6px 0 0;
}

.window-titlebar:active {
    cursor: grabbing;
}

.traffic-lights {
    display: flex;
    gap: 6px;
    position: relative;
}

.traffic-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    text-decoration: none;
}

.traffic-light.close {
    background: var(--traffic-red);
    border: 1px solid #E14640;
}

.traffic-light.minimize {
    background: var(--traffic-yellow);
    border: 1px solid #DEA123;
}

.traffic-light.maximize {
    background: var(--traffic-green);
    border: 1px solid #1AAB29;
}

.traffic-light span {
    display: none;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    color: rgba(0, 0, 0, 0.5);
}

.window-titlebar:hover .traffic-light span {
    display: block;
}

.traffic-light.close span::after {
    content: "×";
}

.traffic-light.minimize span::after {
    content: "−";
}

.traffic-light.maximize span::after {
    content: "+";
}

.window-title {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #4A4A4A;
    margin-right: 46px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.window-content {
    flex: 1;
    overflow: auto;
    padding: 0;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-color);
    min-height: 0;
}

/* Child windows (individual items) get padding */
.window-content .project-detail,
.window-content .blog-post,
.window-content .timeline-event,
.window-content .about-this-mac {
    padding: 16px;
}

/* Wins and Contact pages get padding */
/* Wins and Contact get no padding (handled internally) */
[data-window-id="wins"] .window-content,
[data-window-id="contact"] .window-content {
    padding: 0;
}

.window-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.window-content::-webkit-scrollbar-track {
    background: #F0F0F0;
}

.window-content::-webkit-scrollbar-thumb {
    background: #C0C0C0;
    border-radius: 4px;
}

.window-content::-webkit-scrollbar-thumb:hover {
    background: #A0A0A0;
}

/* Window resize handle */
.window-resize {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
}

/* Window Loading Spinner */
.window-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 5;
    pointer-events: none;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #007AFF;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* External Window (iframe) Styles */
.external-window .window-toolbar {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: linear-gradient(180deg, #F0F0F0 0%, #E0E0E0 100%);
    border-bottom: 1px solid #C0C0C0;
    gap: 8px;
}

.url-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: white;
    border: 1px solid #C8C8C8;
    border-radius: 6px;
    font-size: 12px;
}

.url-icon {
    font-size: 11px;
}

.url-text {
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.open-external {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #E8E8E8;
    border: 1px solid #C8C8C8;
    border-radius: 4px;
    text-decoration: none;
    color: #007AFF;
    font-size: 14px;
    transition: all 0.2s ease;
}

.open-external:hover {
    background: #007AFF;
    color: white !important;
    fill: white !important;
    border-color: #007AFF;
}

.window-iframe-container {
    flex: 1;
    background: white;
    overflow: hidden;
    position: relative;
}

.window-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.iframe-blocked-fallback {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #F5F5F7 0%, #E8E8EA 100%);
    text-align: center;
    padding: 40px;
}

.fallback-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.iframe-blocked-fallback h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.iframe-blocked-fallback p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.fallback-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #007AFF;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.fallback-btn:hover {
    background: #0056CC;
}

.external-window {
    display: flex;
    flex-direction: column;
}

.external-window .window-content {
    display: none;
}

/* ================================================
   Finder-style Content
   ================================================ */
.finder-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 16px;
}

/* ================================================
   Finder Window Layout (Lists)
   ================================================ */
.finder-window {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.finder-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(180deg, #F6F6F6 0%, #E8E8E8 100%);
    border-bottom: 1px solid #C0C0C0;
}

.finder-title {
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.finder-count {
    font-size: 11px;
    color: #666;
}

.finder-content {
    flex: 1;
    overflow: auto;
    background: rgba(255, 255, 255, 0.8);
}

.finder-list-view {
    display: flex;
    flex-direction: column;
}

.finder-header {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: #F5F5F7;
    border-bottom: 1px solid #D0D0D0;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
}

.finder-row {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #F0F0F0;
    cursor: pointer;
    transition: background 0.1s ease;
}

.finder-row:hover {
    background: rgba(0, 122, 255, 0.08);
}

.finder-row:active,
.finder-row.selected {
    background: var(--accent-blue);
    color: white;
}

.finder-row:active .col-date,
.finder-row.selected .col-date {
    color: rgba(255, 255, 255, 0.8);
}

.finder-row:active svg path,
.finder-row.selected svg path {
    fill: white;
}

.col-icon {
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.col-name {
    flex: 1;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 12px;
}

.col-date {
    width: 100px;
    font-size: 12px;
    color: #666;
    text-align: right;
}

/* ================================================
   Project Detail Layout
   ================================================ */
.project-header {
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #E0E0E0;
}

.project-year {
    font-size: 13px;
    color: #666;
}

.project-summary {
    font-size: 15px;
    color: #444;
    line-height: 1.5;
    margin: 0;
}

.project-links-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: #F5F5F7;
    border-radius: 8px;
    margin-bottom: 20px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.project-link.website {
    background: #007AFF;
    color: white;
}

.project-link.website:hover {
    background: #0056CC;
}

.project-link.github {
    background: #24292e;
    color: white;
}

.project-link.github:hover {
    background: #1a1e22;
}

.project-link.demo {
    background: #34C759;
    color: white;
}

.project-link.demo:hover {
    background: #2da44e;
}

.project-content {
    line-height: 1.7;
}

.project-content h2,
.project-content h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.project-content h2 {
    font-size: 20px;
}

.project-content h3 {
    font-size: 16px;
}

/* ================================================
   Timeline Event Layout
   ================================================ */
.timeline-event {
    max-width: 100%;
}

.event-header {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #E0E0E0;
}

.event-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FF9500 0%, #FF5E3A 100%);
    border-radius: 12px;
    flex-shrink: 0;
}

.event-date-badge .event-month {
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}

.event-date-badge .event-year {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.event-title-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-title-area h1 {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.event-summary {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.event-content {
    line-height: 1.7;
}

.event-content p {
    margin-bottom: 12px;
}

/* ================================================
   Blog Post Layout - See main.css for blog-specific styles
   ================================================ */
/* Base blog-post constraints inherited from main.css */

/* Additional styles for blog elements in window context */
.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.post-meta time {
    font-size: 13px;
    color: #666;
}

.post-tags {
    display: flex;
    gap: 6px;
}

.post-tags .tag {
    padding: 3px 10px;
    background: #E8E8EA;
    border-radius: 12px;
    font-size: 11px;
    color: #555;
}

/* ================================================
   Content Styling
   ================================================ */
.window-content h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.window-content h2 {
    font-size: 18px;
    font-weight: 600;
    color: #2a2a2a;
    margin-top: 24px;
    margin-bottom: 12px;
}

.window-content h3 {
    font-size: 15px;
    font-weight: 600;
    color: #3a3a3a;
    margin-top: 20px;
    margin-bottom: 8px;
}

.window-content p {
    line-height: 1.6;
    margin-bottom: 12px;
    color: #444;
}

.window-content ul,
.window-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.window-content li {
    margin-bottom: 6px;
    color: #444;
}

.window-content a {
    color: var(--accent-blue);
    text-decoration: none;
}

.window-content a:hover {
    text-decoration: underline;
}

.window-content code {
    background: #F4F4F4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: "SF Mono", Menlo, Monaco, monospace;
    font-size: 12px;
    color: #E83E8C;
}

.window-content pre {
    background: #2D2D2D;
    color: #F8F8F2;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 16px 0;
}

.window-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.window-content blockquote {
    border-left: 3px solid var(--accent-blue);
    padding-left: 16px;
    margin: 16px 0;
    color: #666;
    font-style: italic;
}

/* ================================================
   Project Layout - New Consistent Design
   ================================================ */

.project-detail {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.project-hero {
    margin-bottom: 24px;
    border-bottom: 1px solid #E5E5E5;
    padding-bottom: 20px;
}

.project-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.2;
    color: #1a1a1a;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.project-badge {
    background: #F0F0F0;
    color: #555;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.project-badge.tag {
    background: #E8F2FF;
    color: #0066CC;
}

.project-lead {
    font-size: 16px;
    line-height: 1.5;
    color: #444;
    margin: 0;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    background: #F5F5F7;
    color: #333;
    border: 1px solid #D1D1D6;
    transition: all 0.2s ease;
    cursor: pointer;
}

.action-btn:hover {
    background: #E5E5E5;
    text-decoration: none;
    transform: translateY(-1px);
}

.action-btn.primary {
    background: #007AFF;
    color: white;
    border-color: #0062CC;
}

.action-btn.primary:hover {
    background: #0062CC;
}

.btn-icon {
    font-size: 14px;
}

/* Markdown Content Styling */
.markdown-body {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.markdown-body h2 {
    font-size: 20px;
    margin: 32px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #EAEAEA;
    font-weight: 600;
}

.markdown-body h3 {
    font-size: 17px;
    margin: 24px 0 12px 0;
    font-weight: 600;
}

.markdown-body p {
    margin-bottom: 16px;
}

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.markdown-body li {
    margin-bottom: 6px;
}

.markdown-body img,
.markdown-body p img {
    max-width: min(640px, calc(100% - 48px)) !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 24px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    display: block;
}

.markdown-body blockquote {
    border-left: 4px solid #DFDFDF;
    margin: 20px 0;
    padding: 8px 16px;
    background: #F9F9F9;
    color: #666;
    font-style: italic;
    border-radius: 0 4px 4px 0;
}

.window-content img {
    max-width: 100%;
    margin: 12px 0;
}

/* Tables */
.window-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 13px;
}

.window-content th,
.window-content td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #E0E0E0;
}

.window-content th {
    background: #F5F5F7;
    font-weight: 600;
    color: #333;
}

.window-content tr:hover {
    background: rgba(0, 122, 255, 0.05);
}

.window-content td a {
    color: var(--accent-blue);
}

/* Timeline & Project entry styling */
.timeline-entry time,
.project-page time {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E0E0E0;
}

/* Better select for window content text */
.window-content {
    user-select: text;
    padding: 0px;
}

/* Blog Post */
.blog-post time {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E0E0E0;
}

/* Contact */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #F5F5F7;
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.contact-link:hover {
    background: #E8E8EA;
    text-decoration: none;
}

.contact-icon {
    font-size: 20px;
}

/* ================================================
   Animations
   ================================================ */
@keyframes windowClose {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes windowOpen {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes windowOpenCentered {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.window.opening {
    animation: windowOpen 0.2s ease-out forwards;
}

.window.centered.opening {
    animation: windowOpenCentered 0.2s ease-out forwards;
}

.window.closing {
    animation: windowClose 0.15s ease-in forwards;
}

/* ================================================
   Shortcodes
   ================================================ */
/* Classic Mac "Aqua/Glass" Type Button (Blue) */
.shortcode-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 18px;
    min-width: 80px;
    height: 32px;

    /* 2010-era Glassy Gradient */
    background: linear-gradient(to bottom, #8dbef9 0%, #3e91eb 49%, #007aff 50%, #0066d6 100%);
    border: 1px solid #004c9e;

    /* Deep bevels and shadows */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        /* Top Highlight */
        0 1px 2px rgba(0, 0, 0, 0.2);
    /* Drop Shadow */

    color: white !important;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
    /* Debossed Text */

    border-radius: 16px;
    /* Pill Shape */
    font-weight: 500;
    font-size: 13px;
    text-decoration: none !important;
    line-height: 1;
    margin: 4px 6px 4px 0;
    transition: all 0.1s linear;
}

.shortcode-button:hover {
    filter: brightness(1.05);
}

.shortcode-button:active {
    background: linear-gradient(to bottom, #3e91eb 0%, #0066d6 100%);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
}

/* Classic Mac "Aqua/Glass" Type Button (Gray/Silver) */
.shortcode-github {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 18px;
    min-width: 80px;
    height: 32px;

    /* Silver Glass Gradient */
    background: linear-gradient(to bottom, #ffffff 0%, #f2f2f2 49%, #e0e0e0 50%, #d0d0d0 100%);
    border: 1px solid #999;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 1px 2px rgba(0, 0, 0, 0.1);

    color: #333 !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);

    border-radius: 16px;
    font-weight: 500;
    font-size: 13px;
    text-decoration: none !important;
    line-height: 1;
    margin: 4px 6px 4px 0;
    transition: all 0.1s linear;
}

.shortcode-github svg {
    color: #333;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.8));
}

.shortcode-github:hover {
    filter: brightness(1.02);
}

.shortcode-github:active {
    background: linear-gradient(to bottom, #e0e0e0 0%, #d0d0d0 100%);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    transform: translateY(1px);
}

.shortcode-github svg {
    flex-shrink: 0;
}

/* Classic Mac "Aqua/Glass" Type Button (Red/NPM) */
.shortcode-npm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 18px;
    min-width: 80px;
    height: 32px;

    /* Red Glass Gradient */
    background: linear-gradient(to bottom, #ff8a8a 0%, #ff5f5f 49%, #cc3535 50%, #a62b2b 100%);
    border: 1px solid #9e2323;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        /* Top Highlight */
        0 1px 2px rgba(0, 0, 0, 0.2);

    color: white !important;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);

    border-radius: 16px;
    font-weight: 500;
    font-size: 13px;
    text-decoration: none !important;
    line-height: 1;
    margin: 4px 6px 4px 0;
    transition: all 0.1s linear;
}

.shortcode-npm svg {
    color: white;
    filter: drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.2));
}

.shortcode-npm:hover {
    filter: brightness(1.05);
}

.shortcode-npm:active {
    background: linear-gradient(to bottom, #ff5f5f 0%, #a62b2b 100%);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
}

.shortcode-npm svg {
    flex-shrink: 0;
}

.youtube-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin: 16px 0;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ================================================
   About Section - macOS Finder Style
   ================================================ */
.about-finder {
    height: 100%;
}

.about-finder .finder-toolbar {
    border-radius: 0;
}

.finder-split {
    display: flex;
    height: calc(100% - 33px);
}

/* Sidebar */
.finder-sidebar {
    width: 180px;
    background: linear-gradient(180deg, #E8E8EC 0%, #D8D8DC 100%);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-right: 1px solid #C0C0C0;
    flex-shrink: 0;
}

.sidebar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-name {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 16px;
    text-align: center;
}

.sidebar-status {
    font-size: 11px;
    color: #555;
    margin-bottom: 16px;
}

.sidebar-section {
    width: 100%;
    margin-bottom: 12px;
}

.sidebar-label {
    font-size: 11px;
    font-weight: bold;
    color: #7A7A7A;
    letter-spacing: 0.5px;
    margin-top: 12px;
    margin-bottom: 6px;
    padding-left: 10px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.sidebar-value {
    font-size: 12px;
    color: #333;
}

.sidebar-links {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
}

.sidebar-links a {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.sidebar-links a:hover {
    background: var(--accent-blue);
    color: white;
    transform: translateY(-2px);
}

/* Main Content */
.finder-main {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #F5F5F7;
}

/* Stats Bar */
.about-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    margin-bottom: 16px;
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
}

.stat-label {
    display: block;
    font-size: 10px;
    opacity: 0.9;
    margin-top: 2px;
}

/* Info Panels */
.info-panel {
    background: #F5F5F7;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.info-header {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #E0E0E0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
}

.info-row:not(:last-child) {
    border-bottom: 1px solid #EAEAEA;
}

.info-label {
    color: #333;
    font-weight: 500;
}

.info-row a {
    color: var(--accent-blue);
    text-decoration: none;
}

.info-row a:hover {
    text-decoration: underline;
}

.info-badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.info-badge.acquired {
    background: #34C759;
    color: white;
}

.info-badge.core {
    background: #007AFF;
    color: white;
}

.info-badge.funded {
    background: #FF9500;
    color: white;
}

.info-text {
    font-size: 13px;
    line-height: 1.6;
    color: #444;
    margin: 0 0 8px 0;
}

.info-text:last-child {
    margin-bottom: 0;
}

.info-text a {
    color: var(--accent-blue);
    text-decoration: none;
}

.info-text a:hover {
    text-decoration: underline;
}

/* Action Buttons - main styles in Project Layout section (~L1203) */
.about-actions {
    display: flex;
    gap: 10px;
    padding-top: 8px;
}

/* About page specific overrides for action buttons */
.about-actions .action-btn {
    flex: 1;
    text-align: center;
}

.about-actions .action-btn.primary {
    background: #34C759;
}

.about-actions .action-btn.primary:hover {
    background: #2da44e;
}

.about-actions .action-btn.secondary {
    background: #E8E8EA;
    color: #333;
}

.about-actions .action-btn.secondary:hover {
    background: #D8D8DA;
}

/* ================================================
   Responsive
   ================================================ */
/* ================================================
   Mobile Optimizations
   ================================================ */

/* Tablet and Below */
@media (max-width: 1024px) {

    /* Smaller windows on tablets */
    .window {
        min-width: 350px;
    }

    /* Adjust menubar active app name */
    #active-app-name {
        max-width: calc(100vw - 300px);
    }
}

/* Mobile Devices */
@media (max-width: 768px) {

    /* Safe area insets for iPhone notch/home indicator */
    body {
        /* Ensure content respects safe areas on notched devices */
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
        padding-bottom: env(safe-area-inset-bottom);
    }

    /* ===== Desktop Widget on Mobile ===== */
    .desktop-widget {
        position: relative;
        left: auto;
        top: auto;
        width: calc(100% - 24px);
        margin: 12px auto;
        order: 2;
    }

    /* ===== Desktop Layout on Mobile ===== */
    .desktop {
        display: flex;
        flex-direction: column;
    }

    /* ===== Desktop Icons ===== */
    .desktop-icons {
        flex-direction: row;
        flex-wrap: wrap;
        align-content: flex-start;
        justify-content: center;
        gap: 12px;
        padding: 12px;
        height: auto;
        max-height: calc(100vh - var(--menubar-height) - env(safe-area-inset-bottom, 0px));
        max-height: calc(100svh - var(--menubar-height));
        overflow-y: auto;
    }

    .desktop-icon {
        width: 70px;
        padding: 6px;
    }

    .icon-image {
        width: 48px;
        height: 48px;
    }

    .icon-label {
        font-size: 10px;
        max-width: 70px;
    }

    /* ===== Menu Bar ===== */
    .menubar {
        padding: 0 4px;
    }

    .menubar-left {
        gap: 0;
        padding-left: 0;
        min-width: 0;
        flex: 1;
    }

    .menubar-right {
        gap: 8px;
        font-size: 11px;
    }

    #active-app-name {
        max-width: calc(100vw - 150px);
        font-size: 12px;
    }

    /* Hide non-active menu items to save space */
    .menu-item:not(.active) {
        display: none;
    }

    .menubar-icon {
        padding: 2px 6px;
    }

    .apple-menu {
        padding: 2px 6px;
    }

    /* ====== Simplified Dropdowns ===== */
    .apple-dropdown,
    .finder-dropdown {
        min-width: 180px;
        max-width: calc(100vw - 20px);
    }

    .dropdown-item {
        padding: 4px 16px;
        font-size: 14px;
        justify-content: flex-start;
        align-items: center;
    }

    /* ===== Windows ===== */
    .window {
        min-width: 300px !important;
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        left: 8px !important;
        top: 8px !important;
        /* Use svh (small viewport height) for mobile Safari - this ensures 
           content fits even when Safari's bottom toolbar is visible */
        height: calc(100vh - var(--menubar-height) - 16px - env(safe-area-inset-bottom, 0px)) !important;
        height: calc(100svh - var(--menubar-height) - 16px) !important;
        max-height: calc(100vh - var(--menubar-height) - 16px - env(safe-area-inset-bottom, 0px)) !important;
        max-height: calc(100svh - var(--menubar-height) - 16px) !important;
        border-radius: 6px;
    }

    /* Position all windows similarly on mobile */
    .window.centered {
        transform: none;
        left: 8px !important;
        top: 8px !important;
    }

    .window-titlebar {
        padding: 0 8px;
        cursor: default;
        /* Disable dragging on mobile */
    }

    .window-title {
        font-size: 12px;
        margin-right: 40px;
    }

    /* Make traffic lights more touch-friendly */
    .traffic-lights {
        gap: 8px;
    }

    .traffic-light {
        width: 14px;
        height: 14px;
        /* Always show symbols on mobile for clarity */
    }

    .traffic-light span {
        display: block !important;
        font-size: 11px;
    }

    /* Disable window dragging and resizing on mobile */
    .window-resize {
        display: none;
    }

    /* ===== Finder Layouts ===== */
    .finder-split {
        flex-direction: column;
        height: 100%;
    }

    .finder-sidebar {
        width: 100%;
        max-height: auto;
        padding: 16px 12px;
        border-right: none;
        border-bottom: 1px solid #C0C0C0;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .sidebar-avatar {
        width: 60px;
        height: 60px;
        margin-bottom: 0;
    }

    .sidebar-name {
        width: 100%;
        margin-bottom: 8px;
        font-size: 13px;
    }

    .sidebar-section {
        width: auto;
        margin-bottom: 0;
    }

    .sidebar-label {
        font-size: 10px;
        margin-top: 8px;
        margin-bottom: 4px;
        padding-left: 0;
        text-align: center;
    }

    .sidebar-value {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        justify-content: center;
    }

    .connect-item {
        height: auto;
        text-align: center;
        /* padding: 4px; */
        font-size: 12px;
    }

    .connect-item img.icon {
        width: 18px;
        height: 18px;
        margin-right: 0px !important;
        margin: 0px;
    }

    .connect-item a {
        display: none !important;
    }

    .finder-main {
        padding: 12px;
        overflow-y: visible;
        flex: none;
    }

    /* ===== Finder List View ===== */
    .finder-header {
        padding: 6px 10px;
        font-size: 10px;
    }

    .finder-row {
        padding: 10px;
        /* Larger touch target */
        cursor: pointer;
        outline: none;
    }

    .finder-row:focus-visible {
        background: rgba(0, 122, 255, 0.2);
    }

    .col-name {
        font-size: 14px;
        /* Slightly larger for readability */
    }

    .col-date {
        width: 80px;
        font-size: 11px;
    }

    .col-icon {
        width: 20px;
    }

    /* ===== Info Panels ===== */
    .info-panel {
        padding: 10px 12px;
        margin-bottom: 10px;
    }

    .info-header {
        font-size: 10px;
        margin-bottom: 8px;
    }

    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 8px 0;
        font-size: 12px;
    }

    .info-label {
        font-size: 12px;
    }

    .info-text {
        font-size: 13px;
        line-height: 1.6;
    }

    /* ===== Stats Bar ===== */
    .about-stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .stat-value {
        font-size: 18px;
    }

    .stat-label {
        font-size: 9px;
    }

    /* ===== Project Links ===== */
    .project-links-bar {
        padding: 10px 12px;
        gap: 6px;
    }

    .project-link {
        padding: 10px 16px;
        /* Larger touch target */
        font-size: 14px;
    }

    /* ===== Blog Post ===== */
    .blog-post {
        padding: 12px;
    }

    .post-header {
        padding-bottom: 12px;
        margin-bottom: 16px;
    }

    .post-title {
        font-size: 22px;
    }

    .post-meta {
        font-size: 12px;
    }

    .post-content {
        font-size: 14px;
        line-height: 1.7;
    }

    .post-content h2 {
        font-size: 20px;
        margin-top: 20px;
    }

    .post-content h3 {
        font-size: 17px;
        margin-top: 18px;
    }

    .post-content pre {
        font-size: 12px;
        padding: 12px;
        border-radius: 6px;
        overflow-x: auto;
    }

    .post-content code {
        font-size: 12px;
    }

    .post-content img {
        border-radius: 6px;
    }

    /* ===== Timeline Event ===== */
    .event-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .event-date-badge {
        width: 50px;
        height: 50px;
    }

    .event-month {
        font-size: 11px;
    }

    .event-day {
        font-size: 18px;
    }

    .event-title {
        font-size: 18px;
    }

    .event-type {
        font-size: 11px;
    }

    /* ===== External Windows (iframes) ===== */
    .window-toolbar {
        padding: 6px 8px;
    }

    .url-bar {
        padding: 6px 8px;
        font-size: 11px;
    }

    .url-text {
        font-size: 10px;
    }

    .open-external {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    /* ===== Spotlight Search ===== */
    .spotlight-container {
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
    }

    #spotlight-input {
        font-size: 18px;
    }

    .spotlight-search {
        padding: 12px 14px;
    }

    .spotlight-result {
        padding: 12px 14px;
        /* Larger touch target */
    }

    .spotlight-result-title {
        font-size: 15px;
    }

    .spotlight-result-type {
        font-size: 12px;
    }

    /* ===== Scrollbars ===== */
    .window-content::-webkit-scrollbar,
    .finder-content::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

    .window-content::-webkit-scrollbar-thumb,
    .finder-content::-webkit-scrollbar-thumb {
        border-radius: 3px;
    }

    /* ===== Contact & Wins Pages ===== */
    [data-window-id="wins"] .window-content,
    [data-window-id="contact"] .window-content {
        padding: 12px;
    }

    /* ===== About This Mac Window ===== */
    .about-window {
        width: calc(100vw - 32px) !important;
        min-width: 280px !important;
        left: 16px !important;
        top: 50px !important;
        transform: none !important;
        height: auto !important;
        max-height: calc(100vh - var(--menubar-height) - 66px - env(safe-area-inset-bottom, 0px)) !important;
        max-height: calc(100svh - var(--menubar-height) - 66px) !important;
    }

    .about-this-mac {
        padding: 16px;
    }

    .about-this-mac .about-icon svg {
        width: 48px;
        height: 48px;
    }

    .about-this-mac h1 {
        font-size: 18px;
    }

    .about-this-mac .about-links {
        flex-direction: column;
    }

    .about-this-mac .about-btn {
        width: 100%;
        justify-content: center;
    }

    /* ===== Generic Content Improvements ===== */
    .about-intro {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .experience-item {
        flex-direction: column;
    }

    .experience-item .role {
        min-width: auto;
    }

    /* ===== Touch Improvements ===== */
    /* Make all clickable elements easier to tap */
    .action-btn,
    .contact-link,
    .project-link,
    .finder-row,
    .desktop-icon,
    .traffic-light,
    .menubar-icon,
    .dropdown-item {
        min-height: 44px;
        /* iOS recommended minimum */
    }

    .action-btn,
    .contact-link,
    .project-link {
        display: inline-flex;
        align-items: center;
    }

    /* Adjust exceptions */
    .traffic-light,
    .menubar-icon {
        min-height: auto;
    }

    /* These should remain as full-width flex blocks */
    .finder-row,
    .desktop-icon,
    .dropdown-item,
    .contact-link {
        display: flex;
    }

    /* Remove hover effects that don't work well on touch */
    @media (hover: none) {

        .desktop-icon:hover,
        .finder-row:hover,
        .traffic-light:hover span {
            background: transparent;
        }

        /* Always show traffic light symbols */
        .traffic-light span {
            display: block !important;
        }
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .desktop-icon {
        width: 60px;
    }

    .icon-image {
        width: 42px;
        height: 42px;
    }

    .icon-label {
        font-size: 9px;
        max-width: 60px;
    }

    #active-app-name {
        max-width: calc(100vw - 120px);
        font-size: 11px;
    }

    .window-title {
        font-size: 11px;
    }

    .about-stats-bar {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .stat-item {
        padding: 8px 0;
    }

    .finder-sidebar {
        padding: 12px 8px;
    }

    .post-title {
        font-size: 20px;
    }

    .post-content {
        font-size: 13px;
    }

    .post-content h2 {
        font-size: 18px;
    }

    .post-content h3 {
        font-size: 16px;
    }
}

/* Static Window Styles for Direct Links */
.static-window {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: calc(100vh - 90px);
    height: calc(100svh - 90px);
    max-width: 1200px;
    background: var(--window-bg);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--window-border);
    animation: staticWindowOpen 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 10;
}

@keyframes staticWindowOpen {
    0% {
        transform: translateX(-50%) scale(0.95);
        opacity: 0;
    }

    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

/* Mobile Static Window Overrides */
@media (max-width: 768px) {
    .static-window {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        left: 8px !important;
        top: calc(var(--menubar-height) + 8px) !important;
        height: calc(100vh - var(--menubar-height) - 16px - env(safe-area-inset-bottom, 0px)) !important;
        height: calc(100svh - var(--menubar-height) - 16px) !important;
        transform: none !important;
    }
}

/* Ensure link-based finder rows behave well */
a.finder-row {
    text-decoration: none;
    color: inherit;
    display: flex;
}

/* Sidebar Connect Items - .sidebar-label styles consolidated above (~L1571) */

.connect-item {
    display: flex;
    align-items: center;
    height: 26px;
    /* Fixed height for finder items */
    padding: 0 10px;
    margin-bottom: 0px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: none;
    /* Finder items are snappy */
}

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

.connect-item:active {
    background-color: rgba(0, 0, 0, 0.08);
}

.connect-item img.icon {
    width: 17px;
    /* Standard sidebar icon size */
    height: 17px;
    margin-right: 8px;
    /* Mavericks (10.9) had grey sidebar icons */
    filter: grayscale(100%);
    opacity: 0.65;
    transition: all 0.2s ease;
}

.connect-item:hover img.icon {
    filter: none;
    opacity: 1;
}

.connect-item a {
    /* The link text itself */
    flex: 1;
    color: #333;
    font-size: 13px;
    /* Standard system size */
    text-decoration: none;
    font-weight: 400;
    letter-spacing: -0.2px;
    pointer-events: none;
    text-align: center;
    /* Make the whole row clickable via main element if possible, or just style the a to fill */
}

/* Since HTML has <a> inside div, we need to make sure clicks work or style <a> to fill */
/* Re-targeting structure: .connect-item is the div, inside is img and a */
.connect-item a {
    pointer-events: auto;
    /* Let clicks pass to a */
    display: flex;
    align-items: center;
    text-align: center;
    height: 100%;
    width: 100%;
}

/* Actually, the HTML is: div.connect-item > img + a */
/* So I should style the div as the container and let a be the text */

.connect-item a {
    color: #262626;
    text-align: center;
}

/* ================================================
   Notification System - macOS Mavericks Style
   ================================================ */

#notification-container {
    position: fixed;
    top: calc(var(--menubar-height) + 12px);
    right: 12px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: 360px;
    width: 100%;
}

.notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(245, 245, 247, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 10px;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.15),
        0 1px 4px rgba(0, 0, 0, 0.1),
        inset 0 0.5px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    pointer-events: auto;
    transform: translateX(400px);
    opacity: 0;
    cursor: default;
    min-width: 280px;
    will-change: transform, opacity;
}

.notification.visible {
    animation: notificationSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.notification.dismissing {
    animation: notificationSlideOut 0.3s ease-in forwards;
}

@keyframes notificationSlideIn {
    0% {
        transform: translateX(400px);
        opacity: 0;
    }

    60% {
        opacity: 1;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes notificationSlideOut {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification.clickable {
    cursor: pointer;
}

.notification.clickable:hover {
    background: rgba(240, 240, 245, 0.98);
}

.notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-icon-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

.notification-icon-emoji {
    font-size: 28px;
    line-height: 1;
}

.notification-content {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.notification-title {
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    line-height: 1.3;
    margin-bottom: 2px;
}

.notification-message {
    font-size: 12px;
    color: #6e6e73;
    line-height: 1.4;
    word-wrap: break-word;
}

.notification-close {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.06);
    border: none;
    border-radius: 100%;
    color: #86868b;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    padding-bottom: 2px;
    line-height: 1;
    margin-top: 2px;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1d1d1f;
}

.notification-close:active {
    background: rgba(0, 0, 0, 0.15);
    transform: scale(0.95);
}

/* Mobile responsive */
@media (max-width: 768px) {
    #notification-container {
        top: calc(var(--menubar-height) + 40px);
        /* 40px lower on mobile */
        right: 8px;
        left: 8px;
        max-width: none;
        width: auto;
    }

    .notification {
        min-width: 0;
        /* Hint for swipe gesture */
        touch-action: pan-y pinch-zoom;
    }
}