/* Terminal Portfolio Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1c2128;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --accent-green: #3fb950;
    --accent-blue: #58a6ff;
    --accent-yellow: #d29922;
    --accent-red: #f85149;
    --accent-purple: #bc8cff;
    --border-color: #30363d;
    --prompt-color: #58a6ff;
    --path-color: #79c0ff;
    --error-color: #f85149;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden; /* remove page scrollbar; terminal-body will scroll instead */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.terminal-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden; /* avoid container scrollbars */
}

.terminal-window {
    background: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.terminal-header {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.btn-close { background: #ff5f56; }
.btn-minimize { background: #ffbd2e; }
.btn-maximize { background: #27c93f; }

.terminal-title {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    flex: 1;
    text-align: center;
}

.terminal-icon {
    color: var(--accent-green);
    margin-right: 8px;
}

.terminal-body {
    padding: 20px;
    min-height: 500px;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: auto;
    background: var(--bg-primary);
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
    display: block;
    text-align: left !important;
    /* Hide scrollbar UI but keep scroll working */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge legacy */
}

.terminal-body::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.terminal-line {
    margin-bottom: 8px;
    word-wrap: break-word;
    white-space: pre-wrap;
    width: 100%;
    display: block;
    text-align: left !important;
    margin-left: 0;
}

.input-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0;
    background: transparent;
    width: 100%;
}

.prompt-block {
    margin-right: 8px;
    white-space: nowrap;
}

.command-input {
    flex: 1;
    min-width: 12ch;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    padding: 0;
    margin: 0;
    caret-color: var(--accent-green);
}

.prompt {
    color: var(--prompt-color);
    font-weight: 600;
}

.path {
    color: var(--path-color);
    font-weight: 500;
}

.command {
    color: var(--text-primary);
}

.cursor {
    background: var(--accent-green);
    color: var(--bg-primary);
    animation: none;
    padding: 0 2px;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.terminal-output {
    margin: 10px 0;
    padding: 10px 0;
    color: var(--text-primary);
    white-space: pre-wrap;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    text-align: left !important;
}

.terminal-output pre {
    margin: 0;
    font-family: inherit;
    color: inherit;
    white-space: pre;
    word-wrap: normal;
    overflow-x: auto;
    overflow-y: visible;
    max-width: 100%;
    display: block;
}

/* Ensure welcome banner (ASCII) doesn't break */
.banner-pre {
    white-space: pre;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0;
}

/* Command output styles */
.cmd-name {
    color: var(--accent-green);
    font-weight: 600;
}

/* Photo output */
.terminal-photo-wrap {
    display: block;
    padding: 12px 0;
}

.terminal-photo {
    display: block;
    max-width: min(520px, 100%);
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.terminal-photo-wrap + pre {
    margin-top: 8px;
}

/* Error messages */
.error-message {
    color: var(--error-color);
    margin: 10px 0;
}

.error-message::before {
    content: "❌ ";
}

/* Responsive */
@media (max-width: 768px) {
    body { padding: 10px; }
    .terminal-body { padding: 15px; font-size: 12px; }
    .terminal-title { font-size: 11px; }
    .terminal-output pre { font-size: 11px; }
    .banner-pre { font-size: 9px; line-height: 1; }
}

@media (max-width: 480px) {
    .terminal-body { font-size: 11px; padding: 10px; }
    .terminal-output pre { font-size: 10px; }
    .banner-pre { font-size: 7px; line-height: 0.9; }
}

::selection {
    background: var(--accent-blue);
    color: var(--bg-primary);
}


