/* ════════════════════════════════════════
   terminal.css  –  Ojas Terminal Portfolio
   ════════════════════════════════════════ */

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

/* ── CSS Variables – Dark ── */
.dark-theme {
    --bg-page:        #0a0c10;
    --bg-term:        #0d1117;
    --bg-titlebar:    #161b22;
    --bg-hover:       #1a2030;
    --border:         #30363d;
    --text:           #e6edf3;
    --text-sec:       #8b949e;
    --text-muted:     #484f58;
    --p-user:         #3fb950;
    --p-dir:          #58a6ff;
    --p-dollar:       #e6edf3;
    --green:          #3fb950;
    --blue:           #58a6ff;
    --cyan:           #79c0ff;
    --yellow:         #e3b341;
    --red:            #ff7b72;
    --orange:         #ffa657;
    --purple:         #d2a8ff;
    --link:           #58a6ff;
    --tag-bg:         #1a2030;
    --tag-border:     #30363d;
    --tag-text:       #79c0ff;
    --btn-bg:         #161b22;
    --btn-hover:      #1f2937;
    --btn-border:     #30363d;
    --btn-text:       #58a6ff;
    --prog-fill:      #3fb950;
    --prog-empty:     #30363d;
    --topbar-bg:      #0d1117;
    --topbar-border:  #21262d;
    --social-c:       #8b949e;
    --social-hover:   #e6edf3;
    --dot-r:          #ff5f57;
    --dot-y:          #ffbd2e;
    --dot-g:          #28c840;
    --scrollbar:      #30363d;
    --input-bg:       #0d1117;
    --card-bg:        #161b22;
    --timeline-bg:    #161b22;
    --timeline-line:  #58a6ff;
    --section-title:  #3fb950;
    --form-bg:        #161b22;
}

/* ── CSS Variables – Light ── */
.light-theme {
    --bg-page:        #f0f2f5;
    --bg-term:        #ffffff;
    --bg-titlebar:    #e8eaed;
    --bg-hover:       #f3f4f6;
    --border:         #d0d7de;
    --text:           #1c2128;
    --text-sec:       #57606a;
    --text-muted:     #8c959f;
    --p-user:         #1a7f37;
    --p-dir:          #0550ae;
    --p-dollar:       #1c2128;
    --green:          #1a7f37;
    --blue:           #0550ae;
    --cyan:           #0969da;
    --yellow:         #9a6700;
    --red:            #cf222e;
    --orange:         #bc4c00;
    --purple:         #8250df;
    --link:           #0550ae;
    --tag-bg:         #ddf4ff;
    --tag-border:     #54aeff;
    --tag-text:       #0550ae;
    --btn-bg:         #f6f8fa;
    --btn-hover:      #eaeef2;
    --btn-border:     #d0d7de;
    --btn-text:       #0550ae;
    --prog-fill:      #1a7f37;
    --prog-empty:     #d0d7de;
    --topbar-bg:      #ffffff;
    --topbar-border:  #d0d7de;
    --social-c:       #57606a;
    --social-hover:   #1c2128;
    --dot-r:          #ff5f57;
    --dot-y:          #ffbd2e;
    --dot-g:          #28c840;
    --scrollbar:      #d0d7de;
    --input-bg:       #ffffff;
    --card-bg:        #f6f8fa;
    --timeline-bg:    #f6f8fa;
    --timeline-line:  #0550ae;
    --section-title:  #1a7f37;
    --form-bg:        #f6f8fa;
}

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

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

body {
    font-family: 'JetBrains Mono', 'Courier New', Consolas, monospace;
    font-size: 14px;
    background: var(--bg-page);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
}

/* ── Page Layout ── */
.page-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* ── Top Social Bar ── */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 16px;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--topbar-border);
    flex-shrink: 0;
    transition: background 0.3s, border-color 0.3s;
    z-index: 10;
}

.social-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    color: var(--social-c);
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: color 0.2s, background 0.2s;
}
.social-link:hover {
    color: var(--social-hover);
    background: var(--bg-hover);
}
.social-link i { font-size: 14px; }

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    border-radius: 4px;
    color: var(--btn-text);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
}
.theme-toggle-btn:hover { background: var(--btn-hover); }

/* ── Terminal Window ── */
.terminal-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 10px 14px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.35);
    background: var(--bg-term);
    min-height: 0;
    transition: background 0.3s, border-color 0.3s;
}

/* Title Bar */
.title-bar {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-titlebar);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    transition: background 0.3s, border-color 0.3s;
    user-select: none;
}

.win-dots { display: flex; gap: 7px; }
.wdot {
    width: 13px; height: 13px;
    border-radius: 50%;
    cursor: default;
}
.wdot-red    { background: var(--dot-r); }
.wdot-yellow { background: var(--dot-y); }
.wdot-green  { background: var(--dot-g); }

.title-bar-label {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: var(--text-sec);
}
.title-bar-spacer { width: 55px; }

/* ── Terminal Body ── */
.term-body {
    flex: 1;
    padding: 14px 18px 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    scroll-behavior: smooth;
    cursor: text;
}

.term-body::-webkit-scrollbar { width: 5px; }
.term-body::-webkit-scrollbar-track { background: transparent; }
.term-body::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 3px; }

/* ── Output Area ── */
#output { flex: 1; }

/* ── Prompt & Input Row ── */
.input-row {
    display: flex;
    align-items: center;
    margin-top: 4px;
    flex-shrink: 0;
}

.prompt { white-space: nowrap; flex-shrink: 0; line-height: 1.6; }
.p-user   { color: var(--p-user);   font-weight: 700; }
.p-colon  { color: var(--text); }
.p-dir    { color: var(--p-dir);    font-weight: 700; }
.p-dollar { color: var(--text); }
.p-space  { flex-shrink: 0; }

.cmd-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    caret-color: var(--text);
    min-width: 0;
}

/* ════════════════════════════
   OUTPUT CONTENT CLASSES
   ════════════════════════════ */

/* Command echo line */
.cmd-echo {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    line-height: 1.6;
    margin-bottom: 2px;
}
.ce-user   { color: var(--p-user);   font-weight: 700; }
.ce-colon  { color: var(--text); }
.ce-dir    { color: var(--p-dir);    font-weight: 700; }
.ce-dollar { color: var(--text); }
.ce-space  { white-space: pre; }
.ce-cmd    { color: var(--text); }

/* Generic text rows */
.row { line-height: 1.7; }

.c-green  { color: var(--green);   }
.c-blue   { color: var(--blue);    }
.c-cyan   { color: var(--cyan);    }
.c-yellow { color: var(--yellow);  }
.c-red    { color: var(--red);     }
.c-orange { color: var(--orange);  }
.c-purple { color: var(--purple);  }
.c-sec    { color: var(--text-sec);}
.c-muted  { color: var(--text-muted);}
.bold     { font-weight: 700; }
.small    { font-size: 13px; }

/* Section headings */
.sec-title {
    color: var(--section-title);
    font-size: 15px;
    font-weight: 700;
    margin: 6px 0 8px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
}

/* Skill tags */
.stag {
    display: inline-block;
    padding: 2px 9px;
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    border-radius: 3px;
    color: var(--tag-text);
    font-size: 12px;
    margin: 2px 3px 2px 0;
}

/* Timeline card */
.tl-card {
    margin: 8px 0;
    padding: 10px 14px;
    background: var(--timeline-bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--timeline-line);
    border-radius: 0 4px 4px 0;
}
.tl-title { color: var(--cyan); font-weight: 700; font-size: 14px; }
.tl-date  { color: var(--yellow); font-size: 13px; margin: 3px 0; }
.tl-body  { color: var(--text); font-size: 13px; line-height: 1.7; }
.tl-stack { margin-top: 6px; font-size: 12px; }
.tl-stack .sl { color: var(--orange); }

/* Bullet list inside cards */
.bul { padding-left: 14px; position: relative; line-height: 1.7; font-size: 13px; }
.bul::before { content: '▸ '; color: var(--green); position: absolute; left: 0; }

/* Project / blog card */
.p-card {
    margin: 8px 0;
    padding: 10px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
}
.p-card-title { color: var(--cyan); font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.p-card-desc  { color: var(--text-sec); font-size: 13px; line-height: 1.6; }
.p-card-link  { margin-top: 7px; }
.p-card-link a {
    color: var(--link);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}
.p-card-link a:hover { text-decoration: underline; }

/* ── LS Section Buttons ── */
.ls-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0 4px;
}

.ls-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    border-radius: 4px;
    color: var(--btn-text);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.ls-btn:hover {
    background: var(--btn-hover);
    border-color: var(--blue);
    color: var(--cyan);
}
.ls-btn .dicon { color: var(--yellow); }

/* ── Progress Bars ── */
.prog-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    line-height: 1.8;
}
.prog-lbl { min-width: 110px; color: var(--text-sec); }
.prog-bar { font-size: 12px; letter-spacing: 0; }
.prog-fill  { color: var(--prog-fill); }
.prog-empty { color: var(--prog-empty); }
.prog-pct   { min-width: 40px; color: var(--text-sec); }
.prog-done  { color: var(--green); }

/* ── Help Table ── */
.help-row { display: flex; margin: 4px 0; font-size: 14px; line-height: 1.6; }
.h-cmd  { color: var(--cyan); min-width: 220px; flex-shrink: 0; }
.h-desc { color: var(--text-sec); }

/* ── Home Banner ── */
.home-pre {
    color: var(--green);
    font-size: 13px;
    line-height: 1.25;
    white-space: pre;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* ── Divider ── */
.hr { border: none; border-top: 1px solid var(--border); margin: 10px 0; }

/* ── Contact Form ── */
.c-form { margin: 6px 0; }
.c-form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}
.c-form-row.ta { align-items: flex-start; }
.c-lbl {
    color: var(--cyan);
    min-width: 80px;
    font-size: 13px;
    padding-top: 1px;
}
.c-inp, .c-ta {
    flex: 1;
    background: var(--form-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    padding: 6px 10px;
    outline: none;
    transition: border-color 0.2s;
}
.c-inp:focus, .c-ta:focus { border-color: var(--blue); }
.c-ta { height: 80px; resize: vertical; }
.c-submit {
    margin-top: 10px;
    padding: 7px 20px;
    background: var(--btn-bg);
    border: 1px solid var(--blue);
    border-radius: 4px;
    color: var(--btn-text);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.c-submit:hover { background: var(--blue); color: var(--bg-term); }

/* ── Boot ── */
.boot-greet { color: var(--green); font-weight: 700; font-size: 15px; line-height: 1.6; }
.boot-info  { color: var(--text-sec); font-size: 13px; line-height: 1.6; }

/* ── Spacing helpers ── */
.mt4  { margin-top: 4px; }
.mt8  { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.gap  { height: 6px; }
.gap2 { height: 12px; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .terminal-window { margin: 6px; }
    .top-bar { padding: 6px 10px; }
    .link-label { display: none; }
    .social-link { padding: 5px 8px; }
    .h-cmd { min-width: 150px; }
    .prog-lbl { min-width: 80px; }
    .home-pre { font-size: 10px; }
    .term-body { padding: 10px 12px 8px; }
}
