:root {
    color-scheme: dark;
    /* Glassmorphism Variables */
    --glass: rgba(255, 255, 255, 0.12);
    --glass-strong: rgba(20, 20, 25, 0.65);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.05);
    
    /* Colors */
    --text: #ffffff;
    --text-muted: rgba(235, 235, 245, 0.6);
    --text-dim: rgba(235, 235, 245, 0.35);
    
    --accent: #0a84ff;
    --accent-hover: #0077ed;
    --accent-muted: rgba(10, 132, 255, 0.15);
    
    --danger: #ff453a;
    --warning: #ff9f0a;
    --success: #30d158;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 30px 60px rgba(0, 0, 0, 0.5);
    
    /* Backgrounds */
    --window-bg: #1c1c1f; /* Solid dark background for better contrast */
    --sidebar-bg: rgba(0, 0, 0, 0.3);
    
    /* Wallpaper & Fonts */
    --wallpaper: radial-gradient(circle at 50% 0%, #1a1a20 0%, #000000 100%);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'JetBrains Mono', Consolas, monospace;
}

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

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    font-family: var(--font-main);
    background-color: #000;
    color: var(--text);
    overflow: hidden;
}

body {
    display: flex;
    align-items: stretch;
}

/* --- Boot Screen --- */
.boot-screen {
    position: fixed;
    inset: 0;
    background: #000;
    background-image: 
        radial-gradient(circle at center, #111 0%, #000 100%),
        repeating-linear-gradient(0deg, transparent 0, transparent 1px, rgba(255, 255, 255, 0.02) 1px, rgba(255, 255, 255, 0.02) 2px);
    background-size: 100% 100%, 100% 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s step-end;
}

.boot-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.boot-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding: 60px;
    width: 100%;
    max-width: 400px;
    position: relative;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Subtle glow behind the card content */
.boot-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(10, 132, 255, 0.08), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.boot-logo {
    font-size: 84px;
    color: #fff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
    animation: pulse 3s infinite ease-in-out;
    line-height: 1;
}

.boot-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    text-transform: uppercase;
    font-family: var(--font-main);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; transform: scale(1); text-shadow: 0 0 30px rgba(255, 255, 255, 0.4); }
    50% { opacity: 1; transform: scale(1.02); text-shadow: 0 0 50px rgba(255, 255, 255, 0.7), 0 0 20px var(--accent); }
}

.boot-progress {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

.boot-label {
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.boot-bar {
    width: 240px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.boot-bar-fill {
    display: block;
    height: 100%;
    background: var(--accent);
    width: 0;
    animation: load 2.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    box-shadow: 0 0 15px var(--accent);
    position: relative;
}

/* Glint effect on progress bar */
.boot-bar-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(to right, transparent, #fff);
    opacity: 0.5;
}

@keyframes load { 
    0% { width: 0; }
    20% { width: 15%; }
    50% { width: 60%; }
    100% { width: 100%; }
}

/* --- Desktop & Wallpaper --- */
.desktop {
    position: relative;
    flex: 1;
    background: var(--wallpaper) no-repeat center/cover;
    display: flex;
    flex-direction: column;
    perspective: 1000px;
}

/* Restoring the Big Logo Background Effect */
.desktop::after {
    content: '◎';
    position: absolute;
    inset: 0;
    font-size: clamp(320px, 40vw, 520px);
    color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
    /* Removed blur for sharpness as requested */
    opacity: 0.5;
}

/* --- Top Bar (macOS Style) --- */
.top-bar {
    height: 28px; /* macOS default height */
    background: rgba(25, 25, 25, 0.5); /* Semi-transparent dark */
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    font-size: 13px;
    user-select: none;
    z-index: 5000;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    color: #fff;
    font-weight: 500;
}

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

.apple-logo {
    font-weight: 600;
    font-size: 15px;
    opacity: 1;
    padding: 0 4px;
    margin-right: 4px;
    cursor: pointer;
    background: transparent;
    border: none;
    color: #fff;
}

.menu {
    display: flex;
    gap: 0; /* macOS menus are tight */
}

.menu-item {
    background: transparent;
    border: none;
    color: #fff;
    padding: 0 10px;
    border-radius: 4px;
    cursor: default;
    font-weight: 400;
    font-size: 13px;
    opacity: 0.95;
    line-height: 28px;
}

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

.status-icons {
    display: flex;
    gap: 12px;
    margin-right: 8px;
    opacity: 0.9;
}

.status-icon {
    width: 16px;
    height: 16px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

/* Using simple CSS shapes for icons to avoid external deps breaking */
.status-icon.wifi {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z'/%3E%3C/svg%3E");
    /* Actually let's just use text/emoji for stability if icons fail */
}

#status-clock {
    font-variant-numeric: tabular-nums;
    font-weight: 400;
    margin-left: 4px;
}


.spotlight-trigger {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.spotlight-trigger:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text);
}

.spotlight-trigger kbd {
    font-family: inherit;
    opacity: 0.6;
}

/* --- Workspace & Icons --- */
.workspace {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.desktop-icons {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
    align-items: flex-end;
}

.desktop-icon {
    width: 80px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: background 0.1s;
}

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

.desktop-icon img {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.desktop-icon span {
    color: #fff;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    text-align: center;
    line-height: 1.2;
    padding: 2px 4px;
    border-radius: 4px;
}

/* --- Windows --- */
.window-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.window {
    position: absolute;
    width: 900px;
    height: 600px;
    min-width: 320px;
    min-height: 300px;
    background: var(--window-bg);
    backdrop-filter: blur(40px) saturate(120%);
    -webkit-backdrop-filter: blur(40px) saturate(120%);
    border-radius: 12px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
    opacity: 1;
    transform-origin: center;
    transition: 
        opacity 0.25s ease,
        transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
        width 0.3s ease,
        height 0.3s ease;
}

.window[aria-hidden="true"] {
    opacity: 0;
    transform: scale(0.95) translateY(15px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.window.active {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 40px 80px rgba(0,0,0,0.6);
    z-index: 100;
}

.window.maximized {
    width: 100% !important;
    height: calc(100% - 32px) !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    border-radius: 0;
}

/* Title Bar */
.title-bar {
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    user-select: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0.03), transparent);
    flex-shrink: 0;
}

.title-bar-actions {
    display: flex;
    gap: 8px;
}

.title-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

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

.traffic-lights {
    display: flex;
    gap: 8px;
    margin-right: 16px;
}

.traffic-lights .btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    position: relative;
    padding: 0;
    overflow: hidden;
}

.traffic-lights .close { background: #ff5f57; border: 1px solid #e0443e; }
.traffic-lights .minimize { background: #febc2e; border: 1px solid #d89e24; }
.traffic-lights .maximize { background: #28c840; border: 1px solid #1aab29; }

.traffic-lights:hover .btn::after {
    content: '';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: rgba(0, 0, 0, 0.5);
    font-family: sans-serif;
}
.traffic-lights:hover .close::after { content: '×'; }
.traffic-lights:hover .minimize::after { content: '−'; }
.traffic-lights:hover .maximize::after { content: '+'; }

.title {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    opacity: 0.8;
    margin-right: 56px;
}

/* --- Window Layout (Sidebar Pattern) --- */
.window-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    flex: 1;
    overflow: hidden;
}

.window-sidebar {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--glass-border);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-header {
    padding: 0 10px;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.sidebar-header button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
    margin-bottom: 8px;
}

.sidebar-profile img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.sidebar-profile-text {
    display: flex;
    flex-direction: column;
}

.sidebar-profile-text strong {
    font-size: 14px;
    color: var(--text);
}

.sidebar-profile-text small {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

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

.sidebar-item.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 1px 4px rgba(10, 132, 255, 0.3);
}

.sidebar-item i {
    font-style: normal;
    font-size: 18px;
    opacity: 0.8;
}

.sidebar-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-text strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-text small {
    font-size: 11px;
    opacity: 0.7;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.window-main {
    position: relative;
    padding: 32px 40px;
    overflow-y: auto;
    background: transparent;
}

/* --- Portfolio Specifics --- */
.portfolio-section {
    display: none;
    animation: slideFade 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.portfolio-section.active { display: block; }

@keyframes slideFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-header { margin-bottom: 40px; }
.hero-header h1 {
    font-size: 42px;
    letter-spacing: -0.02em;
    margin: 16px 0;
    line-height: 1.1;
    background: linear-gradient(to bottom right, #fff, #a5a5b5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; font-weight: 600; color: var(--accent); margin: 0; }
.hero-copy { font-size: 16px; line-height: 1.6; color: var(--text-muted); max-width: 500px; }
.metrics-row { display: flex; gap: 24px; margin-bottom: 40px; }
.metric-card { padding: 16px 20px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--glass-border); border-radius: 12px; min-width: 120px; }
.metric-card strong { font-size: 24px; display: block; color: var(--text); margin-bottom: 4px; }
.metric-card span { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.portfolio-block h3 { font-size: 18px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--glass-border); }
.mini-list { padding-left: 20px; color: var(--text-muted); line-height: 1.6; }
.section-header { margin-bottom: 32px; border-bottom: 1px solid var(--glass-border); padding-bottom: 16px; }
.section-header h2 { font-size: 24px; margin: 0 0 8px; }
.section-header p { margin: 0; color: var(--text-muted); }
.cards.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.card.service-card { 
    background: rgba(255, 255, 255, 0.02); 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    padding: 24px; 
    border-radius: 8px; /* Less rounded */
    transition: all 0.2s ease; 
}
.card.service-card:hover { 
    background: rgba(255, 255, 255, 0.04); 
    border-color: var(--accent-muted); 
    transform: translateY(-2px);
}

/* --- Skills Section (Enhanced) --- */
.skills-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 16px;
}

.filter-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.filter-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(10, 132, 255, 0.3);
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-category {
    width: 100%;
    margin-top: 16px;
    margin-bottom: 8px;
}

.skill-category h2 {
    font-size: 18px;
    color: var(--text);
    border-left: 3px solid var(--accent);
    padding-left: 12px;
    margin: 0;
}

.skill-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 20px;
    transition: all 0.3s ease;
}

.skill-card:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Hide hidden elements */
.skill-card.hidden, .skill-category.hidden {
    display: none;
}

.skill-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 24px;
    color: var(--accent);
}

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

.skill-info h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text);
}

.skill-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.skill-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 8px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    position: relative;
    width: 0; /* Default, animated by JS */
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Tags inside cards */
.skill-info .skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.skill-info .skill-tag {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border-radius: 4px;
    transition: all 0.2s;
}

.skill-info .skill-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Simplified Contact */
.contact-wrapper { display: grid; grid-template-columns: 1fr; gap: 20px; }
.contact-big-card { 
    flex-direction: row; 
    gap: 20px; 
    text-align: left; 
    align-items: center; 
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 10;
    cursor: pointer;
    text-decoration: none;
}
.contact-big-card .icon { margin: 0; font-size: 24px; color: var(--accent); }
.contact-big-card div { display: flex; flex-direction: column; }
.contact-big-card strong { font-size: 16px; margin: 0; }
.contact-big-card span { font-size: 13px; color: var(--text-muted); }

.contact-info { display: none; } /* Remove clutter */

/* --- Notes App Specifics --- */
.notes-main {
    display: flex;
    flex-direction: column;
    padding: 20px 30px;
}

.note-panels {
    flex: 1;
    display: flex;
}

.note-panel {
    flex: 1;
    background: transparent;
    border: none;
    resize: none;
    color: var(--text);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    outline: none;
    display: none;
}

.note-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.notes-status-bar {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-dim);
}

/* --- Terminal App Specifics (Enhanced) --- */
#terminal-window .content {
    background: #0c0c0c;
    padding: 16px;
    font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    flex: 1; /* Fix gray leak by filling available space */
    min-height: 0; /* Ensure scrolling works within flex item */
}

#terminal-window .content::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    z-index: 2;
    pointer-events: none;
    opacity: 0.3;
}

.terminal-line {
    margin-bottom: 6px;
    word-break: break-word;
    line-height: 1.5;
    position: relative;
    z-index: 3;
}

.terminal-line.command { 
    color: #fff; 
    font-weight: bold;
}

.terminal-line.error { color: #ff5f57; }

.terminal-input {
    display: flex;
    gap: 8px;
    margin-top: 4px;
    position: relative;
    z-index: 3;
    align-items: center;
}

.terminal-prompt {
    color: #30d158; /* Green prompt */
    font-weight: bold;
}

#terminal-input-field {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: inherit;
    outline: none;
    caret-color: #fff; /* Standard visible cursor */
}

/* --- Minesweeper App Specifics (Mac Style Refined) --- */
.minesweeper-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    background: transparent;
    gap: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

.minesweeper-hud {
    width: 100%;
    max-width: 500px;
    padding: 16px 24px;
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.minesweeper-stats {
    display: flex;
    gap: 24px;
}

.minesweeper-stats article {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
}

.minesweeper-stats p {
    margin: 0 0 2px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.minesweeper-stats strong {
    font-size: 22px;
    font-weight: 300;
    font-variant-numeric: tabular-nums;
    color: #fff;
    letter-spacing: -0.03em;
}

.minesweeper-stats small {
    display: none; /* Clean up UI */
}

.minesweeper-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.minesweeper-actions {
    display: flex;
    gap: 8px;
}

.difficulty-switch {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    padding: 3px;
    border-radius: 8px;
    gap: 2px;
}

.difficulty-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 4px 12px;
    font-size: 11px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.difficulty-btn:hover {
    color: #fff;
}

.difficulty-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.pill {
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
}

.pill.ghost {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.pill.ghost:hover, .pill.ghost.active {
    background: rgba(255, 255, 255, 0.2);
}

.pill.primary {
    background: #0071e3;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.4);
}

.pill.primary:hover {
    background: #0077ed;
    transform: translateY(-1px);
}

.pill:active {
    transform: scale(0.96);
}

.mine-board-container {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 10px;
    min-height: 0;
}

.mine-board {
    display: grid;
    grid-template-columns: repeat(var(--cols, 10), var(--cell-size, 30px));
    grid-template-rows: repeat(var(--rows, 8), var(--cell-size, 30px));
    gap: 2px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    margin: auto;
}

.mine-cell {
    width: var(--cell-size, 30px);
    height: var(--cell-size, 30px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: "SF Mono", "Menlo", monospace;
    font-size: calc(var(--cell-size, 30px) * 0.6);
    transition: all 0.1s ease;
    position: relative;
    color: transparent;
    user-select: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 1px 2px rgba(0,0,0,0.1);
}

.mine-cell:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.05);
    z-index: 5;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.mine-cell.revealed {
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
    cursor: default;
    transform: none;
    z-index: 0;
    border: 1px solid rgba(0,0,0,0.1);
}

.mine-cell.flagged {
    background: rgba(255, 59, 48, 0.15);
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.mine-cell.flagged::after {
    content: '🚩';
    font-size: calc(var(--cell-size, 30px) * 0.55);
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
    line-height: 1;
}

.mine-cell.bomb {
    background: rgba(255, 59, 48, 0.8) !important;
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.5);
    z-index: 10;
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

.mine-cell.bomb::after {
    content: '💣';
    font-size: calc(var(--cell-size, 30px) * 0.65);
    line-height: 1;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Neon-like numbers */
.mine-cell[data-count] { text-shadow: 0 0 10px currentColor; }
.mine-cell[data-count="1"] { color: #32d74b; }
.mine-cell[data-count="2"] { color: #64d2ff; }
.mine-cell[data-count="3"] { color: #ffd60a; }
.mine-cell[data-count="4"] { color: #bf5af2; }
.mine-cell[data-count="5"] { color: #ff453a; }
.mine-cell[data-count="6"] { color: #0a84ff; }
.mine-cell[data-count="7"] { color: #ac8e68; }
.mine-cell[data-count="8"] { color: #fff; }

.minesweeper-hint, .minesweeper-meta, .minesweeper-feed {
    display: none;
}



/* --- About App --- */
.about-content {
    padding: 60px 40px;
    text-align: center;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.3));
}

.about-hero h2 { font-size: 32px; margin-bottom: 16px; }
.about-meta { margin-top: 20px; display: flex; gap: 10px; justify-content: center; }
.about-chip { padding: 6px 16px; background: rgba(255,255,255,0.1); border-radius: 20px; font-size: 12px; border: 1px solid var(--glass-border); }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin-top: 40px; text-align: left; }
.about-grid article { background: rgba(255,255,255,0.03); padding: 20px; border-radius: 12px; border: 1px solid var(--glass-border); }
.about-grid h3 { margin-top: 0; color: var(--text); }
.about-grid ul { padding-left: 20px; color: var(--text-muted); }
.about-footer { margin-top: 40px; font-size: 12px; color: var(--text-dim); }

.selection-marquee {
    position: absolute;
    background: rgba(0, 122, 255, 0.15);
    border: 1px solid rgba(0, 122, 255, 0.4);
    border-radius: 2px;
    pointer-events: none;
    z-index: 9999;
    display: none;
}

.selection-marquee.active {
    display: block;
}

/* --- Dock --- */
.dock {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    height: 70px;
    padding: 0 16px;
    background: rgba(20, 20, 25, 0.4);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    z-index: 9000;
    transition: width 0.2s;
}

.dock-item {
    width: 50px;
    height: 50px;
    border: none;
    background: transparent;
    padding: 0;
    border-radius: 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-origin: bottom center;
    cursor: pointer;
}

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

.dock-item:hover + .dock-item,
.dock-item:has(+ .dock-item:hover) {
    transform: scale(1.1) translateY(-4px);
    margin: 0 4px;
}

.dock-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.dock-item span {
    display: none;
}

.dock-item.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 4px rgba(255,255,255,0.4);
}

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

/* --- Command Palette --- */
.command-palette {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
}

.command-palette.open { display: flex; }

.command-panel {
    width: 600px;
    background: rgba(30, 30, 35, 0.9);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 50px 100px rgba(0,0,0,0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: popIn 0.2s ease-out;
}

@keyframes popIn { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#command-input {
    width: 100%;
    padding: 18px 20px;
    font-size: 20px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text);
    outline: none;
}

.command-list {
    padding: 8px;
    margin: 0;
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.command-list li {
    padding: 10px 12px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
}

.command-list li.active, .command-list li:hover { background: var(--accent); color: #fff; }
.command-list li span { opacity: 0.6; font-size: 12px; }
.command-header, .command-hint { display: none; }

/* --- Window Resize Handles --- */
.resize-handle {
    position: absolute;
    z-index: 100;
}
.resize-handle.n { top: -3px; left: 0; right: 0; height: 6px; cursor: ns-resize; }
.resize-handle.e { top: 0; right: -3px; bottom: 0; width: 6px; cursor: ew-resize; }
.resize-handle.s { bottom: -3px; left: 0; right: 0; height: 6px; cursor: ns-resize; }
.resize-handle.w { top: 0; left: -3px; bottom: 0; width: 6px; cursor: ew-resize; }
.resize-handle.ne { top: -3px; right: -3px; width: 12px; height: 12px; cursor: ne-resize; }
.resize-handle.se { bottom: -3px; right: -3px; width: 12px; height: 12px; cursor: se-resize; }
.resize-handle.sw { bottom: -3px; left: -3px; width: 12px; height: 12px; cursor: sw-resize; }
.resize-handle.nw { top: -3px; left: -3px; width: 12px; height: 12px; cursor: nw-resize; }

/* --- Launchpad (macOS Style) --- */
.app-library {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(30px) saturate(120%);
    -webkit-backdrop-filter: blur(30px) saturate(120%);
    z-index: 8000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 8vh;
}

.app-library.open {
    opacity: 1;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.4); /* Slightly darker when open */
}

.library-shell { 
    width: 100%; 
    max-width: 1200px; 
    padding: 40px; 
    text-align: center; 
    display: flex;
    flex-direction: column;
    gap: 40px;
    height: 100%;
    align-items: center;
}

.library-head {
    margin-bottom: 10px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.library-head > div {
    display: none; /* Hide the text titles for a cleaner look */
}

.library-actions {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
}

.library-search-container {
    position: relative;
    width: 100%;
    max-width: 360px;
}

.library-search-container input {
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 44px 12px 16px;
    color: #fff;
    font-size: 16px;
    outline: none;
    text-align: left;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    font-weight: 400;
}

.library-search-container input::placeholder { 
    color: rgba(255, 255, 255, 0.6); 
    font-weight: 400;
}

.library-search-container input:focus { 
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.library-search-container i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.library-actions button.pill {
    display: none; /* Hide close button, use click-outside/esc */
}

.library-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); 
    gap: 40px 24px; 
    justify-items: center; 
    width: 100%;
    max-width: 1000px;
    padding: 20px 40px;
    overflow-y: auto;
    max-height: 70vh;
    scrollbar-width: none; /* Hide scrollbar */
}

.library-grid::-webkit-scrollbar {
    display: none;
}

.library-app { 
    background: transparent; 
    border: none; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 12px; 
    cursor: pointer; 
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 110px;
    padding: 10px;
    border-radius: 12px;
}

.library-app:hover { 
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05); 
}

.library-app:active {
    transform: scale(0.95);
    opacity: 0.8;
}

.library-app img { 
    width: 72px; 
    height: 72px; 
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2)); 
    transition: filter 0.2s;
    object-fit: contain;
}

.library-app strong { 
    color: #fff; 
    font-size: 13px; 
    font-weight: 500; 
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    letter-spacing: 0.01em;
    margin-top: 4px;
}

.library-app span { display: none; }

.library-hint {
    margin-top: auto;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 400;
    padding-bottom: 20px;
}

.library-empty {
    grid-column: 1 / -1;
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
    margin-top: 40px;
}

/* --- Responsiveness --- */
@media (max-width: 768px) {
    .desktop-icons { display: none; }
    
    .window {
        width: 100% !important;
        height: calc(100% - 80px) !important;
        top: 40px !important;
        left: 0 !important;
        border-radius: 0;
        transform: none !important;
    }
    
    .window-layout { grid-template-columns: 60px 1fr; }
    .window-sidebar { padding: 20px 4px; align-items: center; }
    .sidebar-profile-text, .sidebar-item span, .sidebar-text { display: none; }
    .sidebar-profile img { width: 32px; height: 32px; }
    .sidebar-item { justify-content: center; padding: 12px 0; }
    .sidebar-header { justify-content: center; }
    .sidebar-header small { display: none; }
    
    .dock { bottom: 10px; padding: 0 8px; height: 56px; width: auto; }
    .dock-item { width: 36px; height: 36px; }
    .dock-item:hover { transform: none; margin: 0; }
    
    .metrics-row { flex-wrap: wrap; }
    .minesweeper-hud { max-width: 100%; }
}
