/* Graphics Index - Coding Style Design */

.graphics-container {
    /* Use standard site font for the container */
    font-family: var(--font-family-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
    line-height: 1.6;
    color: #cbd5e1;
    /* Slate 300 (Dark) */
}

/* Monospaced accents for coding feel */
.terminal-header,
.terminal-body,
.section-label,
.log-meta,
.cli-link,
.typing,
.readme-content {
    font-family: 'Courier New', Courier, monospace !important;
}

/* Light mode overrides */
[data-theme="light"] .graphics-container {
    color: #020617;
    /* Slate 955 */
}

.terminal-header {
    background: #1e293b;
    /* Slate 800 */
    padding: 0.5rem 1rem;
    border-radius: 6px 6px 0 0;
    font-size: 0.85rem;
    color: #94a3b8;
    /* Slate 400 */
    border: 1px solid #334155;
    margin-bottom: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    white-space: pre;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 600px) {
    .terminal-header {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
        white-space: normal;
        flex-wrap: wrap;
    }
}

[data-theme="light"] .terminal-header {
    background: #cbd5e1;
    /* Slate 300 */
    color: #1e293b;
    /* Slate 800 */
    border-color: #94a3b8;
}

/* Typing animation */
.typing {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    animation: typing 1.2s steps(24, end) forwards;
    /* 1.2s for better pacing, matched steps to character count */
    vertical-align: middle;
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 24ch;
    }

    /* Exact width for "cat graphics_pipeline.md" */
}

/* Blinking cursor animation - placed after typing */
.cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background-color: currentColor;
    margin-left: 4px;
    opacity: 0;
    animation: blink 1s step-end infinite;
    animation-delay: 1s;
    /* Appear after typing starts to avoid overlap */
    vertical-align: middle;
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.terminal-body {
    background: rgba(15, 23, 42, 0.4);
    /* Slate 900 with alpha */
    padding: 1.5rem;
    border: 1px solid #334155;
    border-top: none;
    border-radius: 0 0 6px 6px;
    margin-bottom: 3rem;
}

[data-theme="light"] .terminal-body {
    background: rgba(241, 245, 249, 0.3);
    border-color: #94a3b8;
}

.terminal-body h1 {
    font-size: 1.5rem;
    color: #f8fafc;
    margin-top: 0;
}

[data-theme="light"] .terminal-body h1 {
    color: #020617;
}

.project-log {
    margin-bottom: 2.5rem;
    padding-left: 1rem;
    border-left: 2px solid #334155;
    transition: all 0.2s ease;
    position: relative;
    /* For README positioning */
}

[data-theme="light"] .project-log {
    border-left-color: #94a3b8;
}

.project-log:hover {
    border-left-color: #6366f1;
    /* Indigo 500 */
}

.log-meta {
    font-size: 0.85rem;
    color: #64748b;
    /* Slate 500 */
    margin-bottom: 0.5rem;
}

[data-theme="light"] .log-meta {
    color: #1e293b;
}

.log-meta b {
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
    margin-right: 0.3rem;
}

[data-theme="light"] .log-meta b {
    color: #020617;
}

.log-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #f1f5f9;
    margin: 0.5rem 0;
    font-family: var(--font-family-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
}

[data-theme="light"] .log-title {
    color: #020617;
}

.log-summary {
    color: #94a3b8;
    margin-bottom: 1rem;
    font-family: var(--font-family-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
}

[data-theme="light"] .log-summary {
    color: #0f172a;
}

.log-actions {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    align-items: center;
}

.cli-link {
    color: #818cf8;
    /* Indigo 400 */
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    cursor: pointer;
}

.cli-link:hover {
    background: rgba(129, 140, 248, 0.15);
    color: #a5b4fc;
}

[data-theme="light"] .cli-link {
    color: #4338ca;
    /* Indigo 700 */
    font-weight: 700;
}

[data-theme="light"] .cli-link:hover {
    background: rgba(67, 56, 202, 0.1);
}

.cli-link::before {
    content: "> ./";
    opacity: 0.5;
}

/* Hover-Reveal README */
.readme-trigger {
    position: relative;
    display: inline-block;
}

.readme-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 100;
    width: 450px;
    max-width: 90vw;
    margin-top: 0.5rem;
    padding: 1rem;
    background: #0f172a;
    /* Deep Slate */
    border: 1px solid #334155;
    border-radius: 4px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    color: #94a3b8;
    font-size: 0.85rem;
    white-space: pre-wrap;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    /* Don't interfere with mouse */
}

[data-theme="light"] .readme-content {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.readme-trigger:hover .readme-content {
    visibility: visible;
    opacity: 1;
}

.divider {
    height: 1px;
    background: linear-gradient(to right, #334155, transparent);
    margin: 3rem 0;
}

[data-theme="light"] .divider {
    background: linear-gradient(to right, #64748b, transparent);
}

.section-label {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: #334155;
    color: #f8fafc;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 3px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

[data-theme="light"] .section-label {
    background: #1e293b;
    color: #f8fafc;
}

/* Screenshot styling */
.log-image {
    margin: 1rem 0;
    border-radius: 4px;
    border: 1px solid #334155;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    max-width: 100%;
}

[data-theme="light"] .log-image {
    border-color: #94a3b8;
}

.project-log:hover .log-image {
    opacity: 1;
}

/* Screenshot Gallery for detail pages */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 2rem 0;
}

.project-gallery img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    border: 1px solid #334155;
    border-radius: 4px;
    background: #000;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-gallery img:hover {
    transform: scale(1.05);
    border-color: #818cf8;
    box-shadow: 0 0 15px rgba(129, 140, 248, 0.3);
}