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

/* Dark mode is default */
:root {
    --bg: #0a0a0f;
    --surface: #12121a;
    --surface-2: #1a1a24;
    --border: #2a2a3a;
    --text: #e8e8f0;
    --text-dim: #8888a0;
    --text-muted: #5a5a70;
    --blue: #5c8aff;
    --purple: #a078ff;
    --pink: #ff6eb4;
    --mint: #4ae0a0;
    --yellow: #ffc048;
    --peach: #ff9f6a;
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Outfit', sans-serif;
    --radius: 12px;
    --taskbar: 48px;
    --desktop-bg: url('https://middleton.io/images/darkmode-bg.png');
}

/* Light mode values */
@media (prefers-color-scheme: light) {
    :root {
        --bg: #f0f0f5;
        --surface: #ffffff;
        --surface-2: #ffffff;
        --border: rgba(140, 140, 180, 0.4);
        --text: #1a1a2e;
        --text-dim: #3a3a55;
        --text-muted: #5a5a75;
        --blue: #2563eb;
        --purple: #7c3aed;
        --pink: #db2777;
        --mint: #059669;
        --yellow: #d97706;
        --peach: #ea580c;
        --desktop-bg: url('https://middleton.io/images/lightmode-bg.png');
    }
}

/* Manual overrides via data attribute */
[data-theme="light"] {
    --bg: #f0f0f5;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --border: rgba(140, 140, 180, 0.4);
    --text: #1a1a2e;
    --text-dim: #3a3a55;
    --text-muted: #5a5a75;
    --blue: #2563eb;
    --purple: #7c3aed;
    --pink: #db2777;
    --mint: #059669;
    --yellow: #d97706;
    --peach: #ea580c;
    --desktop-bg: url('https://middleton.io/images/lightmode-bg.png');
}

[data-theme="dark"] {
    --bg: #0a0a0f;
    --surface: #12121a;
    --surface-2: #1a1a24;
    --border: #2a2a3a;
    --text: #e8e8f0;
    --text-dim: #8888a0;
    --text-muted: #5a5a70;
    --blue: #5c8aff;
    --purple: #a078ff;
    --pink: #ff6eb4;
    --mint: #4ae0a0;
    --yellow: #ffc048;
    --peach: #ff9f6a;
    --desktop-bg: url('https://middleton.io/images/darkmode-bg.png');
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* ===================
   DESKTOP LAYOUT
   =================== */
.desktop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: var(--taskbar);
    display: flex;
    background: var(--desktop-bg) center/cover no-repeat;
}

/* Desktop Icon Rails */
.desktop-icons {
    width: 90px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 8px;
    overflow-y: auto;
    z-index: 1;
}

.desktop-icons-left {
    order: 1;
}

.desktop-icons-right {
    order: 3;
    margin-left: auto;
}

/* ===================
   macOS DOCK
   =================== */
.dock {
    position: fixed;
    bottom: calc(var(--taskbar) + 8px);
    left: 50%;
    transform: translateX(-50%) translateZ(0);
    display: flex;
    align-items: flex-end;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    z-index: 100;
    will-change: transform;
}

[data-theme="light"] .dock {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .dock {
        background: rgba(255, 255, 255, 0.7);
        border-color: rgba(0, 0, 0, 0.1);
    }
}

.dock-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.15s ease-out, margin 0.15s ease-out;
    position: relative;
    text-decoration: none;
}

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

.dock-emoji {
    font-size: 32px;
    line-height: 1;
    transition: font-size 0.15s ease-out;
}

/* Active indicator dot */
.dock-item.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--text);
    border-radius: 50%;
}

/* Tooltip on hover */
.dock-item::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: rgba(30, 30, 40, 0.95);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

[data-theme="light"] .dock-item::before {
    background: rgba(50, 50, 60, 0.95);
}

.dock-item:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

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

[data-theme="light"] .dock-divider {
    background: rgba(0, 0, 0, 0.15);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .dock-divider {
        background: rgba(0, 0, 0, 0.15);
    }
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
}

.desktop-icon.active {
    border-color: rgba(92, 138, 255, 0.5);
}

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

.icon-label {
    font-family: var(--font-mono);
    font-size: 9px;
    text-align: center;
    color: var(--text-dim);
    word-break: break-word;
    line-height: 1.2;
    max-width: 70px;
}

/* ===================
   WINDOWS AREA
   =================== */
.windows-area {
    flex: 1;
    order: 2;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    z-index: 10;
}

/* ===================
   WINDOWS
   =================== */
.window {
    position: absolute;
    width: min(800px, calc(100% - 40px));
    max-height: calc(100% - 40px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.window.window-open {
    display: flex;
}

/* Window Header */
.window-header {
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    padding: 0 14px;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    cursor: grab;
    user-select: none;
}

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

.window-dots {
    display: flex;
    gap: 7px;
}

.window-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: transform 0.1s;
}

.window-dot:hover {
    transform: scale(1.15);
}

.window-dot.red {
    background: #ff5f57;
}

.window-dot.yellow {
    background: #ffbd2e;
}

.window-dot.green {
    background: #28c840;
}

.window-title {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.file-badge {
    padding: 2px 7px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}

.file-badge.md {
    background: rgba(92, 138, 255, 0.2);
    color: var(--blue);
}

.file-badge.yaml {
    background: rgba(160, 120, 255, 0.2);
    color: var(--purple);
}

.file-badge.config {
    background: rgba(74, 224, 160, 0.2);
    color: var(--mint);
}

.file-badge.sh {
    background: rgba(255, 110, 180, 0.2);
    color: var(--pink);
}

.file-badge.log {
    background: rgba(255, 192, 72, 0.2);
    color: var(--yellow);
}

.window-path {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
}

.window-content {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

/* ===================
   HERO (README)
   =================== */
.hero-content {
    text-align: center;
    padding: 36px 28px;
}

.hero-ascii {
    font-family: var(--font-mono);
    font-size: 9px;
    line-height: 1.1;
    color: var(--blue);
    margin-bottom: 24px;
    white-space: pre;
    opacity: 0.9;
}

.hero-name {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--text), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 24px;
}

.hero-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--blue);
    color: var(--bg);
}

.btn-primary:hover {
    background: #7aa3ff;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

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

/* ===================
   QUERY (SEEKING)
   =================== */
.query-content {
    text-align: center;
    padding: 28px;
}

.query-code {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.query-code .kw {
    color: var(--purple);
}

.query-code .str {
    color: var(--mint);
}

.pills {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.pill {
    padding: 6px 14px;
    border-radius: 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    border: 1px solid;
    text-align: center;
}

.pill.blue {
    background: rgba(92, 138, 255, 0.1);
    border-color: var(--blue);
    color: var(--blue);
}

.pill.purple {
    background: rgba(160, 120, 255, 0.1);
    border-color: var(--purple);
    color: var(--purple);
}

.pill.pink {
    background: rgba(255, 110, 180, 0.1);
    border-color: var(--pink);
    color: var(--pink);
}

.pill.mint {
    background: rgba(74, 224, 160, 0.1);
    border-color: var(--mint);
    color: var(--mint);
}

.pill.yellow {
    background: rgba(255, 192, 72, 0.1);
    border-color: var(--yellow);
    color: var(--yellow);
}

.pill.peach {
    background: rgba(255, 159, 106, 0.1);
    border-color: var(--peach);
    color: var(--peach);
}

.query-note {
    color: var(--text-muted);
    font-size: 13px;
}

/* ===================
   PROFILE
   =================== */
.profile-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
}

.profile-photos {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 280px;
}

.profile-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-photos-row {
    display: flex;
    gap: 8px;
}

.profile-photos-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.profile-thumb {
    width: 100px;
    height: 82px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-cats {
    flex: 1;
    height: 172px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-img:hover,
.profile-thumb:hover,
.profile-cats:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 20px rgba(92, 138, 255, 0.3);
}

.profile-text p {
    color: var(--text-dim);
    margin-bottom: 12px;
    font-size: 13px;
}

.profile-callout {
    background: rgba(92, 138, 255, 0.08);
    border: 1px solid rgba(92, 138, 255, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.profile-callout h4 {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--blue);
    margin-bottom: 8px;
}

.profile-callout p {
    margin: 0;
    font-size: 12px;
}

/* ===================
   VALUES
   =================== */
.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.value-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.value-card h4 {
    font-family: var(--font-mono);
    font-size: 12px;
    margin-bottom: 6px;
}

.value-card p {
    color: var(--text-dim);
    font-size: 12px;
    margin: 0;
}

.value-card.blue h4 {
    color: var(--blue);
}

.value-card.purple h4 {
    color: var(--purple);
}

.value-card.pink h4 {
    color: var(--pink);
}

.value-card.mint h4 {
    color: var(--mint);
}

.value-card.yellow h4 {
    color: var(--yellow);
}

.value-card.peach h4 {
    color: var(--peach);
}

/* ===================
   EXPERIENCE
   =================== */
.folder-path {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}

.exp-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exp-item {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    padding-right: 32px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    position: relative;
}

.exp-item::after {
    content: '›';
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    position: absolute;
    right: 12px;
    top: 32px;
}

.exp-item.open::after {
    transform: rotate(90deg);
}

.exp-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--text-muted);
}

.exp-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.exp-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.exp-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.exp-info h4 a {
    color: var(--text);
    text-decoration: none;
}

.exp-info h4 a:hover {
    color: var(--blue);
}

.exp-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
}

.exp-right {
    text-align: right;
}

.exp-role {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--purple);
}

.exp-date {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
}

.exp-detail {
    display: none;
    grid-column: 1 / -1;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px dashed var(--border);
}

.exp-item.open .exp-detail {
    display: block;
}

.exp-detail p {
    color: var(--text-dim);
    margin-bottom: 12px;
    font-size: 12px;
}

.exp-highlights {
    list-style: none;
    margin-bottom: 12px;
}

.exp-highlights li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 6px;
    color: var(--text-dim);
    font-size: 12px;
}

.exp-highlights li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--mint);
}

.exp-highlights strong {
    color: var(--text);
}

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

.tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    border: 1px solid;
}

.tag:nth-child(6n+1) {
    background: rgba(92, 138, 255, 0.1);
    border-color: var(--blue);
    color: var(--blue);
}

.tag:nth-child(6n+2) {
    background: rgba(160, 120, 255, 0.1);
    border-color: var(--purple);
    color: var(--purple);
}

.tag:nth-child(6n+3) {
    background: rgba(255, 110, 180, 0.1);
    border-color: var(--pink);
    color: var(--pink);
}

.tag:nth-child(6n+4) {
    background: rgba(74, 224, 160, 0.1);
    border-color: var(--mint);
    color: var(--mint);
}

.tag:nth-child(6n+5) {
    background: rgba(255, 192, 72, 0.1);
    border-color: var(--yellow);
    color: var(--yellow);
}

.tag:nth-child(6n+6) {
    background: rgba(255, 159, 106, 0.1);
    border-color: var(--peach);
    color: var(--peach);
}

/* Experience Images */
.exp-images {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.exp-img {
    width: 120px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.exp-img:hover {
    transform: scale(1.05);
    border-color: var(--blue);
    box-shadow: 0 4px 12px rgba(92, 138, 255, 0.3);
}

.exp-img-static {
    cursor: default;
    object-fit: contain;
    background: #000;
    padding: 8px;
}

.exp-img-static:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: none;
}

/* ===================
   LIGHTBOX
   =================== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-window {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8);
    max-width: 90vw;
    max-height: 85vh;
    overflow: hidden;
    cursor: default;
}

.lightbox-header {
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    padding: 0 14px;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lightbox-title {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
}

.lightbox-body {
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-body img {
    max-width: 100%;
    max-height: calc(85vh - 62px);
    border-radius: 4px;
}

/* ===================
   PROJECTS
   =================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.project-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.project-card:hover {
    border-color: var(--blue);
}

.project-img {
    height: 70px;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.project-img img {
    max-height: 90%;
    max-width: 90%;
    object-fit: contain;
}

.project-body {
    padding: 12px;
    position: relative;
}

.project-body h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.project-body h4 a {
    color: var(--text);
    text-decoration: none;
}

.project-body h4 a:hover {
    color: var(--blue);
}

.project-body p {
    font-size: 11px;
    color: var(--text-dim);
    margin: 0;
}

.project-external {
    position: absolute;
    bottom: 4px;
    right: 8px;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: var(--text-dim);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.project-card:hover .project-external {
    opacity: 1;
    color: var(--blue);
}

/* Company-specific project header colors */
.project-card.sendoso .project-img {
    background: url('https://middleton.io/images/sendoso-bg.png') center/cover;
}

.project-card.rocket-lawyer .project-img {
    background: url('https://middleton.io/images/rocket-lawyer-bg.png') center/cover;
}

.project-card.lever .project-img {
    background: #000000;
}

.project-card.hurd .project-img {
    background: #000000;
}

.project-card.oracle .project-img {
    background: #FFFFFF;
    border-bottom: 1px solid #e0e0e0;
}

.project-card.hvac .project-img {
    background: #000000;
}

.project-card.hvac .project-img img {
    max-width: 25% !important;
    max-height: 35% !important;
}

/* ===================
   SKILLS
   =================== */
.skills-section {
    margin-bottom: 16px;
}

.skills-header {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--border);
}

.skills-section.blue .skills-header {
    color: var(--blue);
}

.skills-section.purple .skills-header {
    color: var(--purple);
}

.skills-section.pink .skills-header {
    color: var(--pink);
}

.skills-section.mint .skills-header {
    color: var(--mint);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding-left: 20px;
}

.skill {
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
}

.tools-divider {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.tools-divider h4 {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* ===================
   RECOMMENDATIONS
   =================== */
.log-entry {
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
}

.log-ts {
    color: var(--text-muted);
    font-size: 9px;
    margin-bottom: 6px;
}

.log-quote {
    color: var(--mint);
    font-style: italic;
    margin-bottom: 8px;
    line-height: 1.4;
}

.log-author {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.log-name {
    color: var(--text);
    font-weight: 500;
}

.log-badge {
    padding: 1px 5px;
    background: rgba(160, 120, 255, 0.2);
    color: var(--purple);
    border-radius: 4px;
    font-size: 8px;
}

.log-role {
    color: var(--text-muted);
    font-size: 10px;
}

.log-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    text-align: center;
}

.log-footer a {
    color: var(--blue);
    text-decoration: none;
    font-size: 11px;
}

/* ===================
   TERMINAL / CONNECT
   =================== */
.terminal {
    background: #0a0a0f;
    border-radius: 8px;
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 12px;
}

.term-line {
    margin-bottom: 5px;
    display: flex;
    gap: 6px;
}

.term-prompt {
    color: #4ae0a0;
}

.term-cmd {
    color: #e0e0e8;
}

.term-output {
    color: #c0c0cc;
    padding-left: 18px;
    margin-bottom: 12px;
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.connect-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 18px;
}

.connect-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.connect-btn:hover {
    background: rgba(92, 138, 255, 0.1);
    border-color: var(--blue);
    transform: translateY(-2px);
}

[data-theme="light"] .connect-btn {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .connect-btn {
        background: #ffffff;
        border: 1px solid rgba(0, 0, 0, 0.15);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
}

.connect-icon {
    font-size: 18px;
    line-height: 1;
}

/* ===================
   TASKBAR
   =================== */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--taskbar);
    background: rgba(18, 18, 26, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    transform: translateZ(0);
    will-change: transform;
}

.taskbar-logo {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 14px;
    color: var(--blue);
}

.taskbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.taskbar-status {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--mint);
}

.taskbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.taskbar-time {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

/* ===================
   ICON SPACER
   =================== */
.icon-spacer {
    flex: 1;
}

/* ===================
   FLOATING MUSIC PLAYER
   =================== */
.music-player {
    position: fixed;
    bottom: calc(var(--taskbar) + 90px);
    right: 110px;
    width: 280px;
    background: rgba(30, 30, 40, 0.7);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 14px 14px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 500;
    transform: translateZ(0);
    will-change: transform;
}

.player-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: grab;
}

.player-header:active {
    cursor: grabbing;
}

.player-dots {
    display: flex;
    gap: 6px;
}

.player-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.player-dot.red {
    background: #ff5f57;
}

.player-dot.yellow {
    background: #ffbd2e;
}

.player-dot.green {
    background: #28c840;
}

.player-drag-area {
    flex: 1;
    height: 20px;
}

.player-info {
    text-align: center;
    margin-bottom: 10px;
}

.player-title {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: #e8e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-artist {
    font-family: var(--font-sans);
    font-size: 11px;
    color: #8888a0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.player-time {
    font-family: var(--font-mono);
    font-size: 9px;
    color: #5a5a70;
    min-width: 32px;
}

.player-time.current {
    text-align: right;
}

.player-time.remaining {
    text-align: left;
}

.player-progress {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--blue), var(--purple));
    border-radius: 2px;
    transition: width 0.1s linear;
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.player-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    color: #e8e8f0;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.player-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.player-btn.play-btn {
    width: 40px;
    height: 40px;
    background: #e8e8f0;
    color: #12121a;
    font-size: 14px;
}

.player-btn.play-btn:hover {
    background: #fff;
    transform: scale(1.08);
}

/* Hide mobile-only elements on desktop */
.mobile-contact-bar {
    display: none;
}

.touch-controls {
    display: none;
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

/* ===================
   MOBILE FALLBACK
   =================== */
@media (max-width: 768px) {

    html,
    body {
        height: auto;
        overflow: auto;
    }

    .desktop {
        position: relative;
        display: block;
        overflow-y: visible;
        padding: 16px;
        padding-bottom: calc(var(--taskbar) + 20px);
        min-height: 100vh;
    }

    .desktop-icons {
        display: none;
    }

    .dock {
        display: none;
    }

    .windows-area {
        display: flex;
        flex-direction: column;
        gap: 16px;
        overflow: visible;
    }

    #connect {
        display: none !important;
    }

    #games {
        order: 90;
    }

    /* Game windows should be full width like other windows */
    .game-window {
        width: 100%;
    }

    .window {
        position: relative !important;
        width: 100% !important;
        max-height: none !important;
        display: flex !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
    }

    /* Hide individual game windows from mobile scroll - they load inside games folder */
    /* MUST come after .window display:flex rule to override it */
    #invaders,
    #tetris,
    #bugsquash,
    #runner,
    #snake,
    #standup {
        display: none !important;
    }
    
    /* When a game is active on mobile, show it */
    #invaders.mobile-active-game,
    #tetris.mobile-active-game,
    #bugsquash.mobile-active-game,
    #runner.mobile-active-game,
    #snake.mobile-active-game,
    #standup.mobile-active-game {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Hide window dots on active mobile games */
    .mobile-active-game .window-dots {
        display: none !important;
    }
    
    /* Hide games folder when a game is active */
    .mobile-hidden {
        display: none !important;
    }
    
    /* Reset games folder max-width on mobile */
    #games {
        max-width: 100% !important;
    }

    /* Mobile game styling */
    .game-window {
        width: 100% !important;
        max-width: 100% !important;
    }

    .game-container {
        width: 100%;
        max-width: 100%;
    }

    #gameCanvas {
        width: 100%;
        height: auto;
        max-width: 480px;
        margin: 0 auto;
        display: block;
    }

    #tetrisCanvas {
        width: 100%;
        height: auto;
        max-width: 240px;
        margin: 0 auto;
        display: block;
    }

    #runnerCanvas {
        width: 100%;
        height: auto;
        max-width: 480px;
        margin: 0 auto;
        display: block;
    }

    #snakeCanvas {
        width: 100%;
        height: auto;
        max-width: 320px;
        margin: 0 auto;
        display: block;
    }

    .runner-touch .touch-btn {
        border-radius: 12px;
        height: 60px;
        font-size: 16px;
    }

    .game-screen {
        padding: 30px 16px;
        min-height: 350px;
    }

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

    .game-subtitle {
        font-size: 12px;
    }

    .game-flavor {
        font-size: 11px;
    }

    .game-instructions {
        font-size: 11px;
    }

    .game-over-cta {
        padding: 16px 8px;
    }

    .game-over-bio {
        font-size: 11px;
    }

    /* Touch Controls */
    .touch-controls {
        display: none;
        justify-content: space-between;
        align-items: center;
        padding: 16px;
        background: var(--surface);
        border-top: 1px solid var(--border);
    }

    .touch-controls.visible {
        display: flex !important;
    }

    .touch-btn {
        width: 70px;
        height: 70px;
        font-size: 28px;
        background: var(--surface-2);
        border: 2px solid var(--border);
        border-radius: 50%;
        color: var(--text);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        transition: background 0.1s, border-color 0.1s;
    }

    .touch-btn:active {
        background: var(--blue);
        border-color: var(--blue);
    }

    .touch-autofire {
        font-family: var(--font-mono);
        font-size: 10px;
        color: var(--mint);
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    /* Mobile Sticky Contact Bar */
    .mobile-contact-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(18, 18, 26, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 10px 12px;
        gap: 8px;
        justify-content: center;
        align-items: stretch;
        z-index: 1001;
    }

    .mobile-contact-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 8px 12px;
        background: rgba(30, 30, 45, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        text-decoration: none;
        transition: background 0.15s, border-color 0.15s;
    }

    .mobile-btn-icon {
        font-size: 20px;
        line-height: 1;
    }

    .mobile-btn-label {
        font-family: var(--font-mono);
        font-size: 10px;
        color: rgba(255, 255, 255, 0.7);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-contact-btn:active {
        background: rgba(92, 138, 255, 0.2);
        border-color: var(--blue);
    }

    .mobile-contact-cta {
        background: var(--blue);
        border-color: var(--blue);
    }

    .mobile-contact-cta .mobile-btn-label {
        color: #fff;
    }

    /* Adjust desktop padding for sticky bar */
    .desktop {
        padding-bottom: calc(var(--taskbar) + 90px) !important;
    }

    /* Hide taskbar on mobile */
    .taskbar {
        display: none;
    }

    /* Show/hide based on device */
    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }

    .hero-ascii {
        font-size: 5px;
    }

    /* Hero links scroll to sections on mobile */
    .hero-link {
        scroll-behavior: smooth;
    }

    /* Profile layout for mobile */
    .profile-grid {
        display: block;
    }

    .profile-photos {
        float: none;
        margin-right: 0;
        margin-bottom: 16px;
        gap: 6px;
        width: 100%;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }

    .profile-photos-row {
        gap: 6px;
    }

    .profile-photos-stack {
        gap: 6px;
    }

    .profile-thumb {
        width: 65px;
        height: 55px;
    }

    .profile-cats {
        height: 116px;
    }

    .profile-text {
        overflow: hidden;
    }

    .profile-callout {
        clear: both;
        width: 100%;
    }

    .profile-text p {
        width: 100%;
    }

    #about .window-content {
        padding: 20px 16px;
    }

    .values-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .pills {
        grid-template-columns: repeat(2, auto);
    }

    .exp-item {
        grid-template-columns: 36px 1fr;
    }

    .exp-icon {
        width: 36px;
        height: 36px;
    }

    .exp-right {
        grid-column: 2;
        text-align: left;
        margin-top: -4px;
    }

    .taskbar-center {
        display: none;
    }

    .music-player {
        display: none !important;
    }

    .photo-window {
        display: none !important;
    }

    /* Experience images 2x2 grid on mobile */
    .exp-images {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        justify-items: center;
        max-width: 280px;
        margin: 0 auto 12px;
    }

    .exp-img {
        width: 100%;
        max-width: 130px;
        height: 80px;
    }
}

/* ===================
   VIRUS ICON
   =================== */
.virus-icon .icon-emoji {
    animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ===================
   VIRUS OVERLAY
   =================== */
.virus-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.virus-overlay.active {
    display: flex;
}

.virus-screen {
    text-align: center;
}

.virus-text {
    color: #ff0000;
    font-family: var(--font-mono);
}

.glitch {
    font-size: 48px;
    font-weight: bold;
    animation: glitch 0.3s infinite;
    text-shadow: 2px 0 #00ff00, -2px 0 #ff00ff;
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

.virus-warning {
    font-size: 24px;
    margin-top: 20px;
    animation: blink-warning 0.5s infinite;
}

@keyframes blink-warning {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.recovery-hint {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    color: var(--text);
    padding: 24px 32px;
    border-radius: 12px;
    font-family: var(--font-mono);
    text-align: center;
    animation: bounce-hint 1s infinite;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    z-index: 10000;
}

.recovery-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.recovery-subtitle {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.recovery-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.recovery-btn {
    padding: 12px 20px;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.recovery-btn:hover {
    background: var(--blue);
    color: var(--bg);
    border-color: var(--blue);
    transform: scale(1.05);
}

@keyframes pulse-recover {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(74, 224, 160, 0.5);
    }

    50% {
        box-shadow: 0 0 40px rgba(74, 224, 160, 0.8);
    }
}

@keyframes bounce-hint {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ===================
   PARTY OVERLAY
   =================== */
.party-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1500;
    display: none;
    overflow: hidden;
}

.confetti-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.party-overlay.active {
    display: block;
}

.confetti {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.party-mode .desktop {
    animation: disco 0.5s infinite;
    will-change: filter;
}

@keyframes disco {
    0% {
        filter: hue-rotate(0deg);
    }

    100% {
        filter: hue-rotate(360deg);
    }
}

/* ===================
   PHOTO WINDOWS
   =================== */
.photo-window {
    position: fixed;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    max-width: 90vw;
    max-height: 80vh;
}

.photo-header {
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    padding: 0 14px;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: grab;
    user-select: none;
}

.photo-header:active {
    cursor: grabbing;
}

.photo-title {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
}

.photo-body {
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-body img {
    max-width: 320px;
    max-height: 320px;
    width: auto;
    height: auto;
    border-radius: 6px;
}

/* Make profile pics look clickable */
.profile-img,
.profile-thumb {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-img:hover,
.profile-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(92, 138, 255, 0.3);
}

/* Project card links */
.project-card-link {
    text-decoration: none;
    color: inherit;
    display: contents;
}

/* ===================
   FOLDER CONTENT
   =================== */
.folder-content {
    padding: 20px;
}

/* Games folder - compact width on desktop */
#games {
    max-width: 420px;
}

.folder-grid {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 12px;
    justify-content: center;
    padding: 16px;
}

.folder-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
}

.folder-icon {
    font-size: 36px;
    line-height: 1;
}

.folder-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
}

@media (max-width: 768px) {
    .folder-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 12px;
    }
    
    .folder-icon {
        font-size: 32px;
    }
    
    .folder-label {
        font-size: 9px;
    }
    
    .folder-item {
        padding: 8px 4px;
    }
}

/* ===================
   GAME WINDOW
   =================== */
.game-window {
    width: min(520px, calc(100% - 40px));
}

.game-content {
    padding: 0 !important;
    background: #0a0a0f;
}

.game-container {
    position: relative;
    width: 480px;
    min-height: 400px;
    margin: 0 auto;
}

#gameCanvas {
    display: block;
    background: #0a0a0f;
}

/* Game Screens */
.game-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    min-height: 400px;
    /* Force light text inside dark game screens regardless of theme */
    --text: #e8e8f0;
    --text-dim: #a0a0b8;
    --text-muted: #888899;
}

.game-title {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 700;
    color: var(--mint);
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.game-subtitle {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 24px;
}

.game-instructions {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.game-instructions p {
    margin: 4px 0;
}

.game-btn {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 32px;
    background: var(--mint);
    color: #0a0a0f;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(74, 224, 160, 0.3);
}

.game-btn-secondary {
    background: #2a2a3e;
    color: #e8e8f0;
    border: 1px solid #3a3a4e;
}

.game-btn-secondary:hover {
    background: #3a3a4e;
    box-shadow: 0 4px 20px rgba(92, 138, 255, 0.2);
}

/* Game HUD */
.game-hud {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    background: #1a1a24;
    border-top: 1px solid #2a2a3e;
    font-family: var(--font-mono);
    font-size: 12px;
    color: #a0a0b8;
}

/* Tetris specific */
#tetris .game-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#tetrisCanvas {
    display: block;
    margin: 0 auto;
    border: 2px solid #2a2a3e;
}

.tetris-touch {
    justify-content: center;
    gap: 16px;
}

.touch-rotate {
    background: #2a2a3e;
}

.touch-drop {
    background: var(--mint);
    color: #0a0a0f;
    border-color: var(--mint);
}

/* Runner Game */
#runnerCanvas {
    display: block;
    margin: 0 auto;
    border: 2px solid #2a2a3e;
    background: linear-gradient(to bottom, #1a1a2e 0%, #16213e 100%);
}

.runner-touch {
    justify-content: center;
    gap: 20px;
}

.runner-jump,
.runner-slide {
    flex: 1;
    max-width: 150px;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 14px;
}

.runner-jump {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.runner-slide {
    background: var(--pink);
    border-color: var(--pink);
    color: #fff;
}

/* Snake Game */
#snakeCanvas {
    display: block;
    margin: 0 auto;
    border: 2px solid #2a2a3e;
    background: #0a0a0f;
}

.snake-touch {
    justify-content: center;
    padding: 12px;
}

.snake-dpad {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.snake-dpad-middle {
    display: flex;
    gap: 50px;
}

.snake-touch .touch-btn {
    width: 60px;
    height: 60px;
    font-size: 24px;
    border-radius: 12px;
}

.snake-up, .snake-down {
    background: #2a2a3e;
}

.snake-left, .snake-right {
    background: #2a2a3e;
}

/* Standup Speedrun Game */
.standup-game {
    display: flex;
    flex-direction: column;
    height: 400px;
    max-height: 400px;
}

@media (max-width: 768px) {
    .standup-game {
        height: auto;
        max-height: none;
        min-height: 400px;
    }
    
    .slack-messages {
        max-height: 120px;
    }
    
    .slack-scramble {
        display: block !important;
        padding: 16px;
    }
    
    .scramble-words {
        padding-bottom: 8px;
    }
}

.standup-slack {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1a1a2e;
    border-radius: 8px;
    overflow: hidden;
    margin: 12px;
    min-height: 0;
    /* Force light text inside dark game regardless of theme */
    --text: #e8e8f0;
    --text-dim: #9999b0;
}

.slack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #0f0f1a;
    border-bottom: 1px solid #2a2a3e;
    flex-shrink: 0;
}

.slack-channel {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text);
}

.slack-lives {
    font-size: 16px;
}

.slack-time {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    color: var(--mint);
}

.slack-time.urgent {
    color: var(--pink);
    animation: pulse-urgent 0.5s ease-in-out infinite;
}

@keyframes pulse-urgent {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.slack-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    min-height: 0;
}

.slack-message {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.slack-avatar {
    font-size: 28px;
    line-height: 1;
}

.slack-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.slack-username {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.slack-text {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.4;
}

.slack-text.user-message {
    color: var(--text);
}

.slack-text.success {
    color: var(--mint);
}

.slack-text.error {
    color: var(--pink);
}

.slack-prompt {
    padding: 16px;
    background: rgba(74, 224, 160, 0.1);
    border-top: 1px solid #2a2a3e;
    flex-shrink: 0;
}

.prompt-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--mint);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.prompt-text {
    font-family: var(--font-mono);
    font-size: 18px;
    color: var(--text);
    letter-spacing: 0.5px;
}

.slack-input-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #0f0f1a;
    border-top: 1px solid #2a2a3e;
    flex-shrink: 0;
}

.slack-avatar-small {
    font-size: 24px;
    line-height: 1;
}

.slack-input {
    flex: 1;
    background: #2a2a3e;
    border: 1px solid #3a3a4e;
    border-radius: 6px;
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s;
}

.slack-input:focus {
    border-color: var(--blue);
}

.slack-input.correct {
    border-color: var(--mint);
    background: rgba(74, 224, 160, 0.1);
}

.slack-input.incorrect {
    border-color: var(--pink);
    background: rgba(255, 110, 180, 0.1);
}

.standup-stats {
    display: flex;
    justify-content: space-around;
    padding: 12px 16px;
    background: #1a1a24;
    border-top: 1px solid #2a2a3e;
    font-family: var(--font-mono);
    font-size: 12px;
    color: #a0a0b8;
}

/* Word Scramble Mode (Mobile) */
.slack-scramble {
    padding: 12px 16px;
    background: #0f0f1a;
    border-top: 1px solid #2a2a3e;
    flex-shrink: 0;
    /* Force dark theme colors inside scramble area */
    --text: #e8e8f0;
    --text-dim: #9999b0;
    --surface-2: #2a2a3e;
}

.scramble-built {
    min-height: 40px;
    padding: 10px 12px;
    background: #2a2a3e;
    border: 1px solid #3a3a4e;
    border-radius: 6px;
    margin-bottom: 12px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.scramble-built:empty::before {
    content: "Tap words in order...";
    color: var(--text-dim);
}

.scramble-built .built-word {
    background: var(--blue);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
}

.scramble-words {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.scramble-word {
    background: var(--surface-2);
    border: 1px solid #3a3a4e;
    border-radius: 6px;
    padding: 10px 16px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.scramble-word:active {
    transform: scale(0.95);
}

.scramble-word.correct {
    background: var(--mint);
    color: #0a0a0f;
    border-color: var(--mint);
}

.scramble-word.wrong {
    background: var(--pink);
    color: #fff;
    border-color: var(--pink);
    animation: shake 0.3s ease-in-out;
}

.scramble-word.used {
    opacity: 0.3;
    pointer-events: none;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Bug Squash Game */
.bug-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 12px;
    padding: 20px;
    background: #0a0a0f;
    min-height: 300px;
}

.bug-spot {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    cursor: pointer;
    transition: background 0.1s, transform 0.1s, border-color 0.1s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.bug-spot:hover {
    background: rgba(255, 255, 255, 0.05);
}

.bug-spot.has-bug {
    border-color: var(--pink);
    background: rgba(255, 110, 180, 0.1);
    animation: bug-wobble 0.3s ease-in-out infinite;
}

.bug-spot.has-powerup {
    border-color: var(--mint);
    background: rgba(74, 224, 160, 0.1);
    animation: powerup-pulse 0.5s ease-in-out infinite;
}

.bug-spot.has-feature {
    border-color: var(--blue);
    background: rgba(92, 138, 255, 0.1);
    animation: feature-glow 0.8s ease-in-out infinite;
}

@keyframes feature-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(92, 138, 255, 0.3); }
    50% { box-shadow: 0 0 20px rgba(92, 138, 255, 0.5); }
}

.bug-spot.squashed {
    animation: squash-pop 0.2s ease-out;
}

@keyframes bug-wobble {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

@keyframes powerup-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes squash-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 0.5; }
}

.bug-emoji {
    pointer-events: none;
}

/* Game Over */
.game-over {
    background: rgba(10, 10, 15, 0.95);
    /* Force light text inside dark game-over screen regardless of theme */
    --text: #e8e8f0;
    --text-dim: #a0a0b8;
}

.game-final-score {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.game-final-wave {
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--text);
    opacity: 0.8;
    margin-bottom: 24px;
}

.game-message {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--pink);
    font-style: italic;
    margin-bottom: 32px;
}

.game-over-btns {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

/* Intro screen additions */
.game-flavor {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-style: italic;
}

.game-powerups {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.game-credit {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #2a2a3e;
}

.game-credit-title {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #a0a0b8;
    margin-bottom: 4px;
}

.game-credit-tagline {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--mint);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s;
}

.game-credit-tagline:hover {
    color: #fff;
    text-decoration: underline;
}

/* Game over screen additions */
.game-over-cta {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #2a2a3e;
    text-align: center;
}

.game-over-bio {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #a0a0b8;
    line-height: 1.6;
    margin-bottom: 16px;
}

.game-btn-cta {
    background: var(--blue);
    color: #fff;
    display: inline-block;
    text-decoration: none;
    margin-bottom: 16px;
}

.game-btn-cta:hover {
    box-shadow: 0 4px 20px rgba(92, 138, 255, 0.4);
}

.game-share {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #888899;
}

.game-share a {
    color: #5c8aff;
    text-decoration: none;
}

.game-share a:hover {
    text-decoration: underline;
}

.share-divider {
    margin: 0 6px;
    color: #666677;
}

.game-btn-link {
    background: transparent;
    border: none;
    color: #a0a0b8;
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    padding: 8px 0;
    margin-top: 12px;
    transition: color 0.15s;
}

.game-btn-link:hover {
    color: #4ae0a0;
}

/* Back link at top of game start screens */
.game-back-link {
    position: absolute;
    top: 12px;
    left: 12px;
    margin: 0;
    padding: 4px 8px;
    font-size: 11px;
}

/* Make game-start relative for absolute positioning */
.game-start {
    position: relative;
}

/* Mobile games embed container */
.games-embed {
    min-height: 400px;
}

.games-embed .game-container {
    height: 100%;
}