@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700;800&display=swap');

:root {
    /* Premium Dark Theme Palette */
    --bg-color: #1a1b26;
    --bg-gradient: radial-gradient(circle at 50% 10%, #2a2e45 0%, #1a1b26 60%, #12131b 100%);
    --terminal-bg: rgba(30, 30, 46, 0.7);
    --terminal-border: rgba(255, 255, 255, 0.08);
    --terminal-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 40px rgba(137, 180, 250, 0.15);

    /* Text and Accents */
    --text-primary: #cdd6f4;
    --text-secondary: #a6adc8;

    --accent-blue: #89b4fa;
    --accent-pink: #f5c2e7;
    --accent-green: #a6e3a1;
    --accent-yellow: #f9e2af;
    --accent-red: #f38ba8;
    --accent-mauve: #cba6f7;
    --accent-teal: #94e2d5;

    /* macOS Buttons */
    --mac-red: #ff5f56;
    --mac-yellow: #ffbd2e;
    --mac-green: #27c93f;

    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    --transition-speed: 0.3s;
}

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

body {
    font-family: var(--font-mono);
    background: var(--bg-gradient);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    line-height: 1.6;
}

::selection {
    background: rgba(137, 180, 250, 0.4);
    color: #fff;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--terminal-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

#root {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Terminal Window Styles */
.terminal-container-wrapper {
    width: 100%;
    max-width: 1100px;
    height: 85vh;
    max-height: 850px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--terminal-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--terminal-border);
    border-radius: 12px;
    box-shadow: var(--terminal-shadow);
    animation: floatIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes floatIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terminal-header {
    height: 38px;
    background: rgba(43, 45, 66, 0.4);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 16px;
}

.terminal-header-buttons {
    display: flex;
    gap: 8px;
    z-index: 2;
}

.mac-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    opacity: 0.9;
}

.mac-btn.close {
    background-color: var(--mac-red);
}

.mac-btn.minimize {
    background-color: var(--mac-yellow);
}

.mac-btn.maximize {
    background-color: var(--mac-green);
}

.terminal-header-title {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    pointer-events: none;
}

.terminal-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Prompt Line */
.terminal-prompt-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    margin-bottom: 8px;
    line-height: 1.5;
}

.prompt-host {
    color: var(--accent-green);
    font-weight: 600;
}

.prompt-separator {
    color: var(--text-secondary);
    margin: 0 1px;
}

.prompt-path {
    color: var(--accent-blue);
    font-weight: 600;
}

.prompt-symbol {
    margin-left: 6px;
    margin-right: 8px;
    font-weight: bold;
}

.prompt-command {
    color: var(--accent-yellow);
    display: flex;
    align-items: center;
}

.cursor-block {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    background-color: var(--text-primary);
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

/* Add a class helper to hide cursor permanently */
.cursor-block.hidden {
    display: none !important;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Tab List / LS Output Table */
.tab-list-container {
    margin-top: 8px;
    margin-bottom: 24px;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.ls-output-header {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.ls-output-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.ls-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
    line-height: 1.8;
}

.ls-row:hover,
.ls-row:focus {
    background-color: rgba(255, 255, 255, 0.05);
    outline: none;
}

.ls-row.active .ls-name {
    text-decoration: underline;
    text-decoration-color: var(--accent-pink);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.ls-permissions {
    color: var(--text-secondary);
    padding-right: 16px;
}

.ls-links {
    color: var(--text-secondary);
    padding-right: 16px;
    text-align: right;
}

.ls-owner,
.ls-group {
    color: var(--accent-yellow);
    padding-right: 16px;
}

.ls-size {
    color: var(--text-secondary);
    padding-right: 16px;
    text-align: right;
}

.ls-date {
    color: var(--text-secondary);
    padding-right: 16px;
}

.ls-name {
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.ls-name.dir {
    color: var(--accent-blue);
}

.ls-row:hover .ls-name.dir {
    color: var(--accent-mauve);
    transform: translateX(4px);
}

.ls-name.file {
    color: var(--accent-green);
}

.ls-row:hover .ls-name.file {
    color: var(--accent-teal);
    transform: translateX(4px);
}

/* Content Viewer */
.content-viewer-container {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--terminal-border);
    animation: slideDown 0.4s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section h2 {
    color: var(--accent-mauve);
    font-size: 1.2rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.comment {
    color: var(--text-secondary);
}

.content-text {
    color: var(--text-primary);
    margin-bottom: 16px;
}

.content-text.highlighted {
    color: var(--accent-green);
    border-left: 2px solid var(--accent-green);
    padding-left: 12px;
    font-style: italic;
}

.keyword {
    color: var(--accent-pink);
}

.variable {
    color: var(--accent-blue);
}

.property {
    color: var(--accent-teal);
}

.string {
    color: var(--accent-yellow);
}

.ascii-art {
    color: var(--accent-blue);
    white-space: pre;
    font-size: 0.75rem;
    line-height: 1.2;
    margin-bottom: 24px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.skill-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--terminal-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bullet {
    color: var(--accent-yellow);
}

.project-list {
    list-style-type: none;
    padding: 0;
}

.project-list li {
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
    border-radius: 8px;
    border-left: 3px solid var(--accent-blue);
}

.project-title {
    color: var(--accent-teal);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.timeline {
    position: relative;
    border-left: 2px solid var(--terminal-border);
    margin-left: 12px;
    padding-left: 24px;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -31px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-pink);
    box-shadow: 0 0 10px var(--accent-pink);
}

.timeline-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.timeline-role {
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 8px;
}

/* Responsive adjustments */
@media (max-width: 600px) {

    .ls-permissions,
    .ls-links,
    .ls-owner,
    .ls-group,
    .ls-size,
    .ls-date {
        display: none;
    }

    .ls-row {
        display: block;
        padding: 8px 0;
    }

    .ls-name {
        display: block;
        width: 100%;
    }

    .ascii-art {
        font-size: 0.45rem;
    }
}