/* =============================================================
   TERMINAL PORTFOLIO — Minimal 3-Color Design
   Colors: Charcoal neutral, Green accent, Muted secondary
   ============================================================= */

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

:root {
    --bg: #111111;
    --bg-surface: #181818;
    --bg-raised: #1e1e1e;
    --bg-hover: #252525;
    --bg-header: #0e0e0e;

    --green: #00e639;
    --green-dim: #00aa2a;
    --green-muted: rgba(0, 230, 57, 0.08);
    --green-border: rgba(0, 230, 57, 0.15);

    --text: #a0a0a0;
    --text-bright: #d4d4d4;
    --text-dim: #555555;

    --border: #2a2a2a;

    --font: 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #333 var(--bg);
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 14px;
    overflow-x: hidden;
}

::selection {
    background: var(--green);
    color: var(--bg);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

a {
    color: var(--green);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover { opacity: 0.8; }

/* --- Boot Screen --- */
#boot-screen {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    padding: 40px;
    font-family: var(--font);
    font-size: 13px;
    color: var(--green);
    transition: opacity 0.5s;
}

#boot-screen.fade-out { opacity: 0; pointer-events: none; }
#boot-screen.hidden { display: none; }

#boot-log { white-space: pre-wrap; line-height: 1.8; }

.boot-line { opacity: 0; animation: boot-appear 0.05s forwards; }
@keyframes boot-appear { to { opacity: 1; } }

/* --- Scanlines --- */
.scanlines {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 2px,
        rgba(0, 0, 0, 0.06) 2px, rgba(0, 0, 0, 0.06) 4px
    );
}

/* --- Terminal Window --- */
.terminal-window {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

/* --- Header --- */
.terminal-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
}

.terminal-buttons {
    display: flex;
    gap: 7px;
    flex-shrink: 0;
}

.terminal-buttons span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #333;
    display: block;
}

.btn-close { background: #ff5f57 !important; }
.btn-minimize { background: #ffbd2e !important; }
.btn-maximize { background: #28c840 !important; }

.terminal-title {
    font-size: 12px;
    color: var(--text-dim);
    flex-shrink: 0;
}

.terminal-nav { margin-left: auto; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--green);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: var(--font);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    display: block;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--text-dim);
    border-radius: 3px;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--green);
    background: var(--green-muted);
    opacity: 1;
}

/* --- Body --- */
.terminal-body { flex: 1; padding: 0 24px; }

/* --- Sections --- */
.section {
    padding: 60px 0;
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.section.visible { opacity: 1; transform: translateY(0); }
.section:last-child { border-bottom: none; }

/* --- Prompt & Output --- */
.command-prompt {
    font-size: 13px;
    margin-bottom: 14px;
    padding: 6px 0;
}

.prompt-user { color: var(--green); font-weight: 500; }
.prompt-path { color: var(--text-dim); }
.typed-command { color: var(--text-bright); }

.command-output {
    padding-left: 16px;
    border-left: 1px solid var(--border);
    margin-bottom: 28px;
}

.output-comment {
    color: var(--text-dim);
    font-size: 12px;
    margin-bottom: 16px;
}

/* --- ASCII Art --- */
.ascii-art {
    color: var(--green);
    font-size: clamp(6px, 1.6vw, 13px);
    line-height: 1.2;
    margin-bottom: 24px;
    overflow-x: auto;
    opacity: 0.7;
}

/* --- Hero --- */
.hero-output { margin-bottom: 24px; }

.hero-text-block {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 6px;
    border: 1px solid var(--border);
    filter: grayscale(0.3);
    flex-shrink: 0;
}

.hero-name {
    font-size: 24px;
    color: var(--text-bright);
    margin-bottom: 4px;
    font-weight: 600;
}

.hero-title {
    color: var(--green);
    font-size: 13px;
    min-height: 20px;
    margin-bottom: 12px;
}

.hero-title::after {
    content: '█';
    animation: cursor-blink 1s step-end infinite;
    color: var(--green);
}

@keyframes cursor-blink { 50% { opacity: 0; } }

.hero-tagline {
    font-size: 13px;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.8;
}

.hero-location {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 8px;
}

/* --- Highlights (all green now) --- */
.highlight-green,
.highlight-cyan,
.highlight-amber,
.highlight-magenta,
.highlight-red { color: var(--green); }
.dim { color: var(--text-dim); }

/* --- Neofetch --- */
.neofetch-block {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.neofetch-ascii {
    color: var(--green);
    font-size: 10px;
    line-height: 1.1;
    opacity: 0.6;
    flex-shrink: 0;
}

.neofetch-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
}

.nf-label { color: var(--green); font-weight: 500; }
.nf-separator { color: var(--text-dim); }
.nf-key { color: var(--text-dim); margin-right: 8px; }

.nf-colors { margin-top: 6px; color: var(--green); letter-spacing: 1px; opacity: 0.5; }
.nf-colors .c1,
.nf-colors .c2,
.nf-colors .c3,
.nf-colors .c4,
.nf-colors .c5,
.nf-colors .c6,
.nf-colors .c7 { color: var(--green); }

/* --- About --- */
.file-content {
    font-size: 13px;
    color: var(--text);
    max-width: 680px;
    line-height: 1.9;
}

/* --- Git Log / Experience --- */
.git-log {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.git-entry {
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-surface);
    transition: all 0.2s;
    opacity: 0;
    transform: translateX(-8px);
}

.git-entry.visible { opacity: 1; transform: translateX(0); }
.git-entry:hover { background: var(--bg-hover); }

.dim-entry { border-color: transparent; background: transparent; }
.dim-entry:hover { border-color: var(--border); background: var(--bg-surface); }
.dim-entry .git-message h3 { color: var(--text-dim); }
.dim-entry .git-message p { color: var(--text-dim); }

.git-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
    flex-wrap: wrap;
}

.git-hash { color: var(--text-dim); font-size: 11px; }
.git-branch { color: var(--green); font-size: 11px; font-weight: 500; }
.git-meta { font-size: 11px; color: var(--text-dim); margin-bottom: 6px; }
.git-date { color: var(--text-dim); }

.git-message h3 {
    font-size: 14px;
    color: var(--text-bright);
    font-weight: 500;
    margin-bottom: 6px;
    line-height: 1.4;
}

.git-message p {
    font-size: 12px;
    color: var(--text);
    line-height: 1.7;
}

.git-tag {
    display: inline-block;
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 3px;
    background: var(--green-muted);
    color: var(--green-dim);
    border: 1px solid var(--green-border);
    margin-right: 4px;
    margin-bottom: 6px;
}

/* --- Skills --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 12px;
}

.skill-category {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-surface);
}

.skill-dir {
    font-size: 12px;
    color: var(--text-bright);
    margin-bottom: 10px;
    font-weight: 500;
}

.skill-dir .highlight-green,
.skill-dir .highlight-cyan,
.skill-dir .highlight-amber,
.skill-dir .highlight-magenta,
.skill-dir .highlight-red { color: var(--green); }

.skill-items { display: flex; flex-wrap: wrap; gap: 5px; }

.skill-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid var(--border);
    color: var(--text);
    background: transparent;
}

.skill-tag.legendary {
    color: var(--text-bright);
    border-color: var(--green-border);
    background: var(--green-muted);
}

.skill-tag.epic {
    color: var(--text);
    border-color: var(--border);
}

.skill-tag.standard {
    color: var(--text-dim);
    border-color: var(--border);
}

.skill-tag.domain {
    color: var(--green-dim);
    border-color: var(--green-border);
    background: var(--green-muted);
}

.legendary { color: var(--text-bright); }
.epic { color: var(--text); }
.standard { color: var(--text-dim); }

/* --- Projects --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.project-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-surface);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--green);
    opacity: 0;
    transition: opacity 0.2s;
}

.project-card:hover {
    background: var(--bg-hover);
    transform: translateY(-1px);
}

.project-card:hover::before { opacity: 1; }

.work-card { border-color: var(--border); }
.work-card::before { background: var(--green); }
.work-card .project-status { color: var(--text-dim); }

.project-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.project-icon { font-size: 16px; }

.project-header h3 {
    font-size: 14px;
    color: var(--text-bright);
    font-weight: 500;
    flex: 1;
}

.project-status {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.project-status.active { color: var(--green); }

.project-desc {
    font-size: 12px;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 12px;
}

.project-stack { display: flex; flex-wrap: wrap; gap: 4px; }

.project-stack span {
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 3px;
    background: var(--green-muted);
    color: var(--green-dim);
    border: 1px solid var(--green-border);
}

/* --- Education --- */
.education-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.edu-entry {
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-surface);
}

.edu-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.edu-year {
    color: var(--green);
    font-size: 11px;
    font-weight: 500;
    flex-shrink: 0;
    padding: 1px 7px;
    border: 1px solid var(--green-border);
    border-radius: 3px;
    background: var(--green-muted);
}

.edu-header h3 {
    font-size: 13px;
    color: var(--text-bright);
    font-weight: 500;
}

.edu-degree {
    font-size: 12px;
    color: var(--green-dim);
    margin-bottom: 4px;
}

.edu-details {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.6;
}

/* --- Contact --- */
.contact-block { text-align: center; }

.contact-ascii {
    color: var(--green);
    font-size: clamp(8px, 1.8vw, 12px);
    margin-bottom: 24px;
    opacity: 0.5;
    display: inline-block;
    text-align: left;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
    margin: 0 auto;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-surface);
    transition: all 0.2s;
}

.contact-link:hover {
    background: var(--bg-hover);
    transform: translateX(3px);
    opacity: 1;
}

.contact-label {
    color: var(--green);
    font-size: 11px;
    font-weight: 500;
    min-width: 65px;
}

.contact-value {
    color: var(--text);
    font-size: 12px;
}

/* --- Interactive Terminal --- */
#terminal-output { min-height: 30px; margin-bottom: 6px; }

#terminal-output .term-line {
    margin-bottom: 3px;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

#terminal-output .term-line.cmd { color: var(--text-bright); }
#terminal-output .term-line.output { color: var(--text); }
#terminal-output .term-line.error { color: #cc4444; }
#terminal-output .term-line.success { color: var(--green); }

.input-line {
    display: flex;
    align-items: center;
    font-size: 13px;
}

#terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-bright);
    font-family: var(--font);
    font-size: 13px;
    caret-color: var(--green);
}

#terminal-input::placeholder { color: var(--text-dim); }

/* --- Status Bar --- */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 24px;
    background: var(--bg-header);
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-dim);
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.status-indicator {
    color: var(--green);
    font-size: 7px;
    animation: pulse 2s ease infinite;
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.status-left,
.status-right,
.status-center {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Resume Button --- */
.hero-actions {
    margin-top: 16px;
}

.btn-resume {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--green-border);
    border-radius: 4px;
    background: var(--green-muted);
    color: var(--green);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-resume:hover {
    background: rgba(0, 230, 57, 0.15);
    border-color: var(--green-dim);
    opacity: 1;
}

/* --- Cover Letter Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-box {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 24px 30px;
    max-width: 480px;
    width: 90%;
    font-family: var(--font);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 22px;
    cursor: pointer;
    font-family: var(--font);
    line-height: 1;
    padding: 0 4px;
}

.modal-close:hover { color: var(--text-bright); }

.cl-templates {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.cl-template-btn {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    padding: 10px 16px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.cl-template-btn:hover {
    background: var(--bg-hover);
    border-color: var(--green-border);
    color: var(--green);
}

.cl-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
}

.cl-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--text-dim);
}

.cl-form input {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-bright);
    font-family: var(--font);
    font-size: 13px;
    padding: 8px 12px;
    outline: none;
    transition: border-color 0.2s;
}

.cl-form input:focus {
    border-color: var(--green-dim);
}

.cl-form input::placeholder {
    color: var(--text-dim);
}

.cl-generate-btn {
    background: var(--green-muted);
    border: 1px solid var(--green-border);
    border-radius: 4px;
    color: var(--green);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.cl-generate-btn:hover {
    background: rgba(0, 230, 57, 0.15);
    border-color: var(--green-dim);
}

.cl-back-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-dim);
    font-family: var(--font);
    font-size: 12px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-start;
}

.cl-back-btn:hover { color: var(--text); border-color: var(--text-dim); }

.cl-success {
    color: var(--green);
    font-size: 14px;
    margin-bottom: 16px;
}

/* --- Easter eggs --- */
.glitch-mode { animation: glitch 0.3s infinite; }
@keyframes glitch {
    0% { text-shadow: 2px 0 #cc4444, -2px 0 var(--green); }
    50% { text-shadow: -2px 2px #cc4444, 2px -2px var(--green); }
    100% { text-shadow: 2px 0 #cc4444, -2px 0 var(--green); }
}

.party-mode * { animation: hue-rotate 2s linear infinite !important; }
@keyframes hue-rotate { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }

/* --- Responsive --- */
@media (max-width: 768px) {
    body { font-size: 13px; }
    .terminal-body { padding: 0 16px; }
    .terminal-header { padding: 8px 16px; flex-wrap: wrap; }
    .terminal-title { display: none; }
    .nav-toggle { display: block; }
    .nav-links { display: none; width: 100%; flex-direction: column; padding-top: 8px; }
    .nav-links.open { display: flex; }
    .section { padding: 36px 0; }
    .hero-text-block { flex-direction: column; }
    .hero-name { font-size: 20px; }
    .neofetch-block { flex-direction: column; }
    .skills-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .command-output { padding-left: 10px; }
    .status-center { display: none; }
    .status-bar { padding: 5px 16px; }
}

@media (max-width: 480px) {
    .ascii-art { font-size: 5px; }
    .hero-name { font-size: 18px; }
    .neofetch-ascii { display: none; }
    .terminal-buttons { display: none; }
    .edu-header { flex-direction: column; gap: 4px; }
}
