/* Crisp white character frames sit inside black backgrounds with rectangular bleed. */
:root {
    --ascii-font: var(--terminal-font);
    --bg: #000 !important;
    --window-bg: #000 !important;
    --code-bg: #000 !important;
}

.ascii-positioned {
    position: relative;
}

[data-ascii-frame] {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    isolation: isolate;
}

.ascii-surface {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
.ascii-fill { position: absolute; inset: 8px; background: #000; }
.ascii-bleed { position: absolute; }
.ascii-bleed-top, .ascii-bleed-bottom {
    left: 0;
    right: 0;
    height: 8px;
    background-repeat: repeat-x;
    /* Only 8 by 4 pixel black rectangles. Opacity changes by whole cells. */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='8'%3E%3Cg fill='black'%3E%3Cpath opacity='.12' d='M0 0h8v4H0zM32 0h8v4H32z'/%3E%3Cpath opacity='.28' d='M16 0h8v4H16zM48 0h8v4H48z'/%3E%3Cpath opacity='.4' d='M8 0h8v4H8zM40 0h8v4H40z'/%3E%3Cpath opacity='.5' d='M0 4h8v4H0zM24 4h8v4H24zM56 4h8v4H56z'/%3E%3Cpath opacity='.8' d='M8 4h8v4H8zM32 4h8v4H32zM48 4h8v4H48z'/%3E%3Cpath opacity='.65' d='M16 4h8v4H16zM40 4h8v4H40z'/%3E%3C/g%3E%3C/svg%3E");
}
.ascii-bleed-top { top: 0; }
.ascii-bleed-bottom { bottom: 0; transform: rotate(180deg); }
.ascii-bleed-left, .ascii-bleed-right {
    top: 8px;
    bottom: 8px;
    width: 8px;
    background-repeat: repeat-y;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='64'%3E%3Cg fill='black'%3E%3Cpath opacity='.12' d='M0 0h4v8H0zM0 32h4v8H0z'/%3E%3Cpath opacity='.28' d='M0 16h4v8H0zM0 48h4v8H0z'/%3E%3Cpath opacity='.4' d='M0 8h4v8H0zM0 40h4v8H0z'/%3E%3Cpath opacity='.5' d='M4 0h4v8H4zM4 24h4v8H4zM4 56h4v8H4z'/%3E%3Cpath opacity='.8' d='M4 8h4v8H4zM4 32h4v8H4zM4 48h4v8H4z'/%3E%3Cpath opacity='.65' d='M4 16h4v8H4zM4 40h4v8H4z'/%3E%3C/g%3E%3C/svg%3E");
}
.ascii-bleed-left { left: 0; }
.ascii-bleed-right { right: 0; transform: rotate(180deg); }

[data-ascii-divider] {
    border: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
    box-shadow: none !important;
    padding-bottom: 16px;
}

.ascii-frame, .ascii-rule {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: block;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    color: #fff;
    font: 11px/12px var(--ascii-font);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    text-shadow: none;
    text-align: left;
}
.ascii-frame { inset: 8px; }

.ascii-edge {
    position: absolute;
    display: block;
    white-space: pre;
}

.ascii-edge-top, .ascii-edge-bottom {
    left: 4px;
    right: 4px;
    height: 12px;
}

.ascii-edge-top { top: 0; }
.ascii-edge-bottom { bottom: 0; }
.ascii-edge-left, .ascii-edge-right {
    top: 16px;
    bottom: 16px;
    width: 14px;
    flex-direction: column;
}
.ascii-edge-left { left: 0; }
.ascii-edge-right { right: 0; text-align: right; }

.editor-container, .modal-window, .project-window, .tag-project-window,
.circuit-board[data-ascii-frame] {
    padding: 22px 26px;
}

.editor { min-height: 0; }
.window-chrome { min-height: 40px; }
.window-title { font-family: var(--ascii-font); color: #fff; }
.project-window-header, .tag-window-header { flex-shrink: 0; gap: 12px; }
.project-window-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-window.minimized { min-width: 250px; }
.project-window.minimized .project-window-header { padding: 8px 0; }
.project-window.minimized .ascii-rule { display: none; }
.project-content, .tag-window-content { min-height: 0; }

.window-button, .window-control, .circuit-close {
    border: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
    box-shadow: none !important;
    width: auto !important;
    min-width: 28px;
    height: 26px !important;
    padding: 0 3px;
    color: #fff !important;
    font: 13px/26px var(--ascii-font) !important;
    text-align: center;
    opacity: 0.75;
    cursor: pointer;
    flex-shrink: 0;
}
.window-button:hover, .window-control:hover, .circuit-close:hover { opacity: 1; color: var(--fg) !important; }
.window-buttons[aria-hidden] { pointer-events: none; }
.window-control:focus-visible, .window-button:focus-visible, .circuit-close:focus-visible {
    outline: 2px dotted var(--accent);
    outline-offset: 2px;
}

.card[data-ascii-frame], .project-card[data-ascii-frame], .circuit-node[data-ascii-frame] {
    padding: 24px 26px;
}
.project-decks-container { padding: 24px; }
.card-glow, .stat-card::before, .stat-card::after, .featured-card::after,
.project-stack::after, .circuit-board::before, .circuit-node::before { display: none !important; }
.year-chip::before, .year-chip::after { display: none !important; }
.about-main-card:hover, .card:hover { filter: none; }
.skill-card-inner { padding: 22px; }
.skill-card:hover .skill-expansion { border: 0; padding: 20px 12px 16px 6px; }
.skill-expansion { background: #000; }
.skill-stats { flex-wrap: wrap; }
.ascii-meter {
    display: inline-block;
    color: #fff;
    font: 11px/1.5 var(--ascii-font);
    white-space: nowrap;
    letter-spacing: 0;
}

.about-quote, .milestone-detail-text { border: 0 !important; }
.quote-mark { display: none; }
.neon-sign[data-ascii-frame] { padding: 20px 24px; animation: none; text-shadow: none; }
.circuit-hints[data-ascii-divider] { padding-bottom: 16px; }
.circuit-progress-wrap .ascii-meter { font-size: 12px; }
.circuit-paused-overlay { border: 0 !important; border-radius: 0 !important; background: #000 !important; }
.circuit-close:hover { transform: none; }

/* Keep the timeline's original stylesheet and injected layout in agreement. */
.circuit-modal.active { display: flex; }
.circuit-board[data-ascii-frame] { inset: auto; pointer-events: inherit; }
.circuit-board .circuit-scroll-area { inset: auto; min-height: 0; }
.circuit-board .circuit-hints { inset: auto; transform: none; }
.circuit-board .hint-pill { border: 0; border-radius: 0; background: #000; backdrop-filter: none; }

/* Text labels and actions use literal brackets instead of pill outlines. */
.project-window-tag, .project-card-tag, .project-tag, .lines-badge,
.skill-tags .tag, .node-tag, .hint-key, .cta a, .github-link,
.scroll-indicator, .back-indicator {
    border: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
    box-shadow: none !important;
}
.project-window-tag::before, .project-card-tag::before, .project-tag::before,
.lines-badge::before, .skill-tags .tag::before,
.node-tag::before, .hint-key::before { content: '['; margin-right: 0.25em; color: #fff; }
.project-window-tag::after, .project-card-tag::after, .project-tag::after,
.lines-badge::after, .skill-tags .tag::after,
.node-tag::after, .hint-key::after { content: ']'; margin-left: 0.25em; color: #fff; }
.cta a::before { display: none; }
.cta a span::before, .github-link::before, .scroll-indicator::before, .back-indicator::before { content: '[ '; color: #fff; }
.cta a span::after, .github-link::after, .scroll-indicator::after, .back-indicator::after { content: ' ]'; color: #fff; }
.cta a:hover { color: var(--fg); }
.scroll-indicator:hover, .back-indicator:hover, .github-link:hover { color: var(--fg); }
.cta a { padding-inline: 0; }

@media (max-width: 768px) {
    .editor-container, .modal-window, .project-window, .tag-project-window,
    .circuit-board[data-ascii-frame] { padding: 22px 24px; }
    .project-window { width: 92vw; min-width: 280px; max-width: 96vw; }
    .circuit-header[data-ascii-divider] { gap: 8px; padding-inline: 4px; }
    .circuit-title { letter-spacing: 0.05em !important; }
    .circuit-progress-wrap .ascii-meter { font-size: 10px; }
}
