/* ===== CSS Variables ===== */
:root {
    /* Terminal Colors */
    --bg-terminal: #0d1117;
    --bg-titlebar: #161b22;
    --bg-output: #0a0c10;
    --bg-hover: #1c2128;
    --bg-nav: #0d1117;

    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #484f58;

    /* Syntax Colors */
    --prompt-color: #7ee787;
    --command-color: #e6edf3;
    --path-color: #79c0ff;
    --string-color: #a5d6ff;
    --highlight-purple: #d2a8ff;
    --highlight-cyan: #56d4dd;
    --highlight-green: #7ee787;
    --highlight-yellow: #e3b341;
    --highlight-red: #ff7b72;
    --highlight-orange: #ffa657;

    /* UI Colors */
    --border-color: #30363d;
    --dot-red: #ff5f56;
    --dot-yellow: #ffbd2e;
    --dot-green: #27c93f;

    /* Typography */
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;

    /* Spacing */
    --terminal-padding: clamp(16px, 4vw, 32px);
    --command-bar-height: 60px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 15px;
}

body {
    font-family: var(--font-mono);
    background-color: #010409;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
    padding-bottom: calc(var(--command-bar-height) + 40px);
}

::selection {
    background: var(--highlight-purple);
    color: var(--bg-terminal);
}

/* ===== Terminal Window ===== */
.terminal-window {
    width: 100%;
    max-width: 1000px;
    background: var(--bg-terminal);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.3),
        0 16px 70px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
}

/* ===== Title Bar ===== */
.terminal-titlebar {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-titlebar);
    border-bottom: 1px solid var(--border-color);
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.titlebar-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: opacity 0.2s;
}

.dot.red { background: var(--dot-red); }
.dot.yellow { background: var(--dot-yellow); }
.dot.green { background: var(--dot-green); }

.titlebar-title {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.titlebar-spacer {
    width: 52px;
}

/* ===== Navigation Bar ===== */
.nav-bar {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    position: sticky;
    top: 44px;
    z-index: 99;
}

.nav-link {
    padding: 8px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-link.active {
    color: var(--highlight-cyan);
    background: rgba(86, 212, 221, 0.1);
}

/* ===== Terminal Content ===== */
.terminal-content {
    padding: var(--terminal-padding);
    padding-bottom: 40px;
    min-height: calc(100vh - 200px);
}

/* ===== Pages ===== */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 16px 0 8px 0;
}

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

/* ===== Sticky Command Bar ===== */
.command-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1000px;
    height: var(--command-bar-height);
    background: var(--bg-titlebar);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.command-bar-inner {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    gap: 12px;
}

.command-input-wrapper {
    flex: 1;
    position: relative;
}

.command-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    outline: none;
}

.command-input::placeholder {
    color: var(--text-muted);
}

.command-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 4px 8px;
    background: var(--bg-output);
    border-radius: 4px;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: var(--bg-titlebar);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4);
}

.autocomplete-dropdown.active {
    display: block;
}

.autocomplete-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: var(--bg-hover);
}

.autocomplete-item.selected {
    background: rgba(139, 92, 246, 0.15);
}

.autocomplete-cmd {
    color: var(--highlight-cyan);
    font-weight: 500;
}

.autocomplete-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.autocomplete-category {
    font-size: 0.65rem;
    padding: 2px 6px;
    background: var(--bg-output);
    border-radius: 3px;
    color: var(--text-muted);
    margin-left: 8px;
}

/* ===== Boot Sequence ===== */
.boot-sequence {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.ascii-logo {
    color: var(--highlight-purple);
    font-size: clamp(0.35rem, 1.5vw, 0.7rem);
    line-height: 1.2;
    margin-bottom: 20px;
    overflow-x: auto;
    white-space: pre;
}

.boot-line {
    margin: 4px 0;
    font-size: 0.85rem;
}

.boot-line.success {
    color: var(--highlight-green);
}

.boot-line .prompt {
    color: var(--prompt-color);
    margin-right: 8px;
}

/* ===== Status Bar ===== */
.status-bar {
    display: flex;
    gap: 20px;
    padding: 12px 16px;
    background: var(--bg-output);
    border-radius: 6px;
    margin-bottom: 40px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.online {
    background: var(--highlight-green);
    box-shadow: 0 0 8px var(--highlight-green);
}

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

/* ===== Sections ===== */
.section {
    margin-bottom: 50px;
}

/* ===== Command Blocks ===== */
.command-block {
    margin-bottom: 20px;
}

.input-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

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

.command {
    color: var(--command-color);
}

.typing-container {
    display: flex;
    align-items: center;
}

.cursor {
    color: var(--highlight-purple);
    animation: blink 1s step-end infinite;
}

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

/* ===== Output Blocks ===== */
.output {
    background: var(--bg-output);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-left: 20px;
}

.output-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.file-path {
    color: var(--path-color);
    font-size: 0.85rem;
}

/* ===== Text Utilities ===== */
.highlight-purple { color: var(--highlight-purple); }
.highlight-cyan { color: var(--highlight-cyan); }
.highlight-green { color: var(--highlight-green); }
.highlight-yellow { color: var(--highlight-yellow); }
.highlight-red { color: var(--highlight-red); }
.highlight-orange { color: var(--highlight-orange); }
.highlight-italic { font-style: italic; color: var(--text-primary); }
.text-muted { color: var(--text-muted); }

/* ===== Hero Output ===== */
.hero-output h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.hero-sub {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 8px;
}

/* ===== Manifesto Output ===== */
.manifesto-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px dashed var(--border-color);
}

.manifesto-section:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
}

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

.line-number {
    color: var(--text-muted);
    font-size: 0.8rem;
    min-width: 32px;
}

.section-title {
    color: var(--highlight-yellow);
    font-weight: 600;
    font-size: 1rem;
}

.section-body {
    padding-left: 48px;
}

.section-body p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.output-footer {
    text-align: center;
    padding-top: 20px;
    font-size: 0.85rem;
}

/* ===== Build Grid ===== */
.build-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.build-item {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 4px 12px;
    padding: 16px;
    background: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: border-color 0.2s, background 0.2s;
}

.build-item:hover {
    border-color: var(--highlight-purple);
    background: var(--bg-hover);
}

.item-icon {
    grid-row: span 2;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.item-name {
    color: var(--path-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.item-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== Begin Output ===== */
.begin-output {
    padding: 30px;
}

.begin-header {
    font-size: 1rem;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.step-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.step-item {
    display: grid;
    grid-template-columns: auto auto 1fr;
    grid-template-rows: auto auto;
    gap: 4px 12px;
    padding: 16px;
    background: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.step-status {
    grid-row: span 2;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.step-status.success {
    color: var(--highlight-green);
}

.step-label {
    color: var(--highlight-yellow);
    font-weight: 600;
    font-size: 0.8rem;
}

.step-text {
    color: var(--text-primary);
    font-weight: 500;
}

.step-hint {
    grid-column: 2 / -1;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.begin-cta {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.cta-link {
    color: var(--highlight-cyan);
    text-decoration: none;
    transition: color 0.2s;
}

.cta-link:hover {
    color: var(--highlight-purple);
    text-decoration: underline;
}

.cta-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 8px;
    margin-left: 20px;
}

/* ===== Footer ===== */
.footer-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.footer-output {
    text-align: center;
    background: transparent;
    border: none;
}

.footer-ascii {
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.4;
    display: inline-block;
    text-align: left;
}

/* ===== Projects Grid ===== */
.projects-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.project-card {
    background: var(--bg-output);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.2s;
    /* 3 columns: calc((100% - 2 * 16px gap) / 3) */
    width: calc((100% - 32px) / 3);
    min-width: 280px;
    max-width: 400px;
}

/* 2 columns on medium screens */
@media (max-width: 1000px) {
    .project-card {
        /* 2 columns: calc((100% - 16px gap) / 2) */
        width: calc((100% - 16px) / 2);
        min-width: 280px;
    }
}

/* 1 column on small screens */
@media (max-width: 640px) {
    .project-card {
        width: 100%;
        max-width: 100%;
    }
}

.project-card:hover {
    border-color: var(--highlight-purple);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.project-name {
    color: var(--path-color);
    font-weight: 600;
    font-size: 1rem;
}

.project-time {
    color: var(--highlight-green);
    font-size: 0.75rem;
    padding: 2px 8px;
    background: rgba(126, 231, 135, 0.1);
    border-radius: 4px;
}

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

.project-tags {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.project-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: var(--bg-hover);
    border-radius: 4px;
    color: var(--text-muted);
}

/* ===== Resource Tabs ===== */
.resource-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.resource-tab {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.resource-tab:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.resource-tab.active {
    background: var(--highlight-purple);
    border-color: var(--highlight-purple);
    color: var(--bg-terminal);
}

.resource-content {
    display: none;
}

.resource-content.active {
    display: block;
}

/* ===== Blog List ===== */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.blog-item {
    background: var(--bg-output);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.blog-item:hover {
    border-color: var(--highlight-cyan);
}

.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

.blog-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.blog-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Links List ===== */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.links-category {
    margin-bottom: 8px;
}

.links-category-title {
    color: var(--highlight-yellow);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.links-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.link-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    background: var(--bg-output);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: border-color 0.2s;
}

.link-item:hover {
    border-color: var(--highlight-cyan);
}

.link-item a {
    color: var(--path-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.link-item a:hover {
    text-decoration: underline;
}

.link-item p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
}

/* ===== Tools List ===== */
.tools-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.tool-item {
    padding: 16px;
    background: var(--bg-output);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: border-color 0.2s;
}

.tool-item:hover {
    border-color: var(--highlight-green);
}

.tool-item a {
    color: var(--highlight-green);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.tool-item a:hover {
    text-decoration: underline;
}

.tool-item p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 6px;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.tool-category {
    font-size: 0.7rem;
    padding: 2px 6px;
    background: var(--bg-hover);
    border-radius: 3px;
    color: var(--text-muted);
    margin-left: 8px;
}

/* ===== Help Page ===== */
.help-output {
    padding: 24px;
}

.help-section {
    margin-bottom: 30px;
}

.help-category {
    color: var(--highlight-yellow);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
}

.help-commands {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-item {
    display: flex;
    gap: 20px;
    align-items: baseline;
}

.help-cmd {
    color: var(--highlight-cyan);
    font-weight: 500;
    min-width: 120px;
}

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

.help-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* ===== Blog Post View ===== */
.blog-post-view {
    background: var(--bg-output);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
}

.blog-post-view h1 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.blog-post-view .blog-meta {
    margin-bottom: 24px;
}

.blog-post-view .blog-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.blog-post-view .blog-content h2 {
    color: var(--highlight-yellow);
    font-size: 1.1rem;
    margin: 24px 0 12px 0;
}

.blog-post-view .blog-content p {
    margin-bottom: 16px;
}

.blog-post-view .blog-content ol,
.blog-post-view .blog-content ul {
    margin-bottom: 16px;
    padding-left: 24px;
}

.blog-post-view .blog-content li {
    margin-bottom: 8px;
}

.blog-post-view .blog-content strong {
    color: var(--text-primary);
}

.blog-back {
    margin-bottom: 20px;
}

.blog-back a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
}

.blog-back a:hover {
    color: var(--highlight-cyan);
}

/* ===== Matrix Effect ===== */
.matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    display: none;
}

.matrix-canvas.active {
    display: block;
}

/* ===== Random Popup ===== */
.random-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-titlebar);
    border: 2px solid var(--highlight-purple);
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    z-index: 2000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.random-popup h3 {
    color: var(--highlight-purple);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.random-popup p {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
}

.random-popup-close {
    margin-top: 20px;
    padding: 8px 16px;
    background: var(--bg-output);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.2s;
}

.random-popup-close:hover {
    border-color: var(--highlight-purple);
    color: var(--text-primary);
}

.random-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1999;
}

/* ===== Work Page ===== */
.work-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.work-value-props {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.work-prop {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: var(--bg-output);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
}

.work-prop:hover {
    border-color: var(--highlight-purple);
}

.prop-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.prop-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.prop-title {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
}

.prop-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.work-example-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.work-example-item {
    display: flex;
    gap: 20px;
    padding: 12px 16px;
    border-radius: 6px;
    transition: background 0.2s;
}

.work-example-item:hover {
    background: var(--bg-hover);
}

.example-name {
    color: var(--highlight-cyan);
    font-weight: 500;
    min-width: 200px;
}

.example-desc {
    color: var(--text-muted);
}

/* Work Form */
.work-form-output {
    padding: 24px;
}

.form-header {
    font-size: 1rem;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.work-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    display: flex;
    align-items: center;
}

.label-prompt {
    color: var(--highlight-cyan);
    font-weight: 500;
}

.form-input {
    background: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.form-input:focus {
    outline: none;
    border-color: var(--highlight-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-select option {
    background: var(--bg-terminal);
    color: var(--text-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.form-submit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--highlight-purple), #7c3aed);
    border: none;
    border-radius: 8px;
    color: white;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.submit-icon {
    font-size: 0.8rem;
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.form-success {
    text-align: center;
    padding: 40px 20px;
}

.success-message {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.success-detail {
    color: var(--text-muted);
}

.work-footer {
    margin-top: 20px;
}

/* ===== Project Card Updates ===== */
.project-card {
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.project-card:hover {
    border-color: var(--highlight-purple);
    transform: translateY(-2px);
}

.project-tagline {
    color: var(--highlight-cyan);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 8px;
}

.project-category {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 4px;
    color: var(--highlight-purple);
    margin-bottom: 12px;
}

/* ===== Project Detail Page ===== */
.project-back {
    margin-bottom: 24px;
}

.project-back a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.project-back a:hover {
    color: var(--highlight-cyan);
}

.project-detail-header {
    background: var(--bg-output);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.project-detail-top {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.project-detail-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.project-detail-category {
    font-size: 0.75rem;
    padding: 4px 12px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 4px;
    color: var(--highlight-purple);
    font-weight: 500;
}

.project-detail-tagline {
    color: var(--highlight-cyan);
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 16px;
}

.project-detail-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
}

.project-meta-item {
    color: var(--text-secondary);
}

.meta-label {
    color: var(--text-muted);
}

/* Screenshots Section */
.project-screenshots {
    margin-bottom: 24px;
}

.section-label {
    color: var(--highlight-yellow);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.screenshot-placeholder {
    background: var(--bg-output);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: border-color 0.2s;
    min-height: 180px;
}

.screenshot-placeholder:hover {
    border-color: var(--highlight-purple);
}

.placeholder-icon {
    font-size: 2rem;
    opacity: 0.5;
}

.placeholder-text {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}

/* Screenshot Images */
.screenshot-container {
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-output);
    border: 1px solid var(--border-color);
    transition: border-color 0.2s, transform 0.2s;
    cursor: pointer;
}

.screenshot-container:hover {
    border-color: var(--highlight-purple);
    transform: scale(1.02);
}

.screenshot-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: all 0.2s;
    z-index: 10001;
}

.lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

@media (max-width: 768px) {
    .lightbox-arrow {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

/* Problem & Solution */
.project-problem-solution {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.problem-box,
.solution-box {
    background: var(--bg-output);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.box-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.problem-label {
    background: rgba(255, 123, 114, 0.15);
    color: var(--highlight-red);
}

.solution-label {
    background: rgba(126, 231, 135, 0.15);
    color: var(--highlight-green);
}

.problem-box p,
.solution-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Features Section */
.project-features {
    background: var(--bg-output);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.features-list li {
    position: relative;
    padding-left: 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.features-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--highlight-green);
}

/* Tech Stack */
.project-tech {
    margin-bottom: 24px;
}

.tech-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tech-tag {
    font-size: 0.8rem;
    padding: 6px 14px;
    background: var(--bg-output);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--path-color);
    transition: border-color 0.2s;
}

.tech-tag:hover {
    border-color: var(--path-color);
}

/* Lead Capture Form */
.project-lead-capture {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(86, 212, 221, 0.1));
    border: 1px solid var(--highlight-purple);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 24px;
}

.lead-header {
    text-align: center;
    margin-bottom: 24px;
}

.lead-header h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.lead-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.lead-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.lead-field {
    display: flex;
    flex-direction: column;
}

.lead-field:last-of-type {
    grid-column: 1 / -1;
}

.lead-input {
    background: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lead-input::placeholder {
    color: var(--text-muted);
}

.lead-input:focus {
    outline: none;
    border-color: var(--highlight-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.lead-textarea {
    resize: vertical;
    min-height: 80px;
    grid-column: 1 / -1;
}

.lead-submit {
    grid-column: 1 / -1;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--highlight-purple), #7c3aed);
    border: none;
    border-radius: 8px;
    color: white;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.lead-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.lead-success {
    text-align: center;
    padding: 20px;
    font-size: 1rem;
}

/* Project Detail Tags */
.project-detail-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-tag {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.detail-tag:hover {
    color: var(--highlight-cyan);
}

/* ===== About Page ===== */
.about-content {
    padding: var(--terminal-padding);
}

.about-profile {
    margin-bottom: 32px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--highlight-purple), var(--highlight-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-placeholder {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.profile-title {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 4px 0;
}

.profile-location {
    font-size: 0.85rem;
    margin: 0;
}

.about-section {
    margin-bottom: 24px;
}

.about-bio p {
    margin-bottom: 16px;
    line-height: 1.7;
}

.about-bio p:last-child {
    margin-bottom: 0;
}

/* Experience Grid */
.experience-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.experience-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 16px;
    padding: 16px;
    background: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.2s;
}

.experience-item:hover {
    border-color: var(--highlight-purple);
}

.exp-role {
    font-weight: 600;
    color: var(--text-primary);
    grid-column: 1;
    grid-row: 1;
}

.exp-company {
    color: var(--highlight-cyan);
    grid-column: 1;
    grid-row: 2;
}

.exp-period {
    color: var(--text-muted);
    font-size: 0.85rem;
    grid-column: 2;
    grid-row: 1;
    text-align: right;
}

.exp-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 8px;
}

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

.education-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.edu-degree {
    font-weight: 600;
    color: var(--highlight-purple);
    min-width: 120px;
}

.edu-school {
    flex: 1;
    color: var(--text-primary);
}

.edu-year {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Philosophy Grid */
.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.philosophy-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.2s, transform 0.2s;
}

.philosophy-item:hover {
    border-color: var(--highlight-purple);
    transform: translateY(-2px);
}

.phil-icon {
    font-size: 1.5rem;
}

.phil-title {
    font-weight: 600;
    color: var(--text-primary);
}

.phil-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Connect Grid */
.connect-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.connect-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}

.connect-item:hover {
    border-color: var(--highlight-purple);
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.connect-icon {
    font-size: 1.2rem;
}

.connect-label {
    font-size: 0.9rem;
}

.about-cta {
    margin-top: 32px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    body {
        padding: 10px;
        padding-bottom: calc(var(--command-bar-height) + 30px);
    }

    .terminal-window {
        border-radius: 8px;
    }

    .ascii-logo {
        font-size: 0.3rem;
    }

    .section-body {
        padding-left: 0;
    }

    .build-grid,
    .projects-grid,
    .tools-list {
        grid-template-columns: 1fr;
    }

    .output {
        margin-left: 0;
        padding: 16px;
    }

    .status-bar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .nav-bar {
        gap: 4px;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .command-bar {
        bottom: 10px;
        width: calc(100% - 20px);
        height: 50px;
    }

    .help-item {
        flex-direction: column;
        gap: 4px;
    }

    .help-cmd {
        min-width: auto;
    }

    .example-name {
        min-width: auto;
    }

    .work-example-item {
        flex-direction: column;
        gap: 4px;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-hint {
        text-align: center;
    }

    /* Project Detail Responsive */
    .project-detail-title {
        font-size: 1.4rem;
    }

    .project-detail-tagline {
        font-size: 1rem;
    }

    .screenshots-grid {
        grid-template-columns: 1fr;
    }

    .project-problem-solution {
        grid-template-columns: 1fr;
    }

    .features-list {
        grid-template-columns: 1fr;
    }

    .lead-form {
        grid-template-columns: 1fr;
    }

    /* About Page Responsive */
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-name {
        font-size: 1.4rem;
    }

    .experience-item {
        grid-template-columns: 1fr;
    }

    .exp-period {
        grid-column: 1;
        grid-row: 2;
        text-align: left;
        margin-top: 4px;
    }

    .exp-company {
        grid-row: 3;
    }

    .exp-desc {
        grid-row: 4;
    }

    .education-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .edu-degree {
        min-width: auto;
    }

    .philosophy-grid {
        grid-template-columns: 1fr;
    }

    .connect-grid {
        flex-direction: column;
    }

    .connect-item {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .ascii-logo {
        display: none;
    }

    .hero-output h1 {
        font-size: 1.3rem;
    }

    .command-hint {
        display: none;
    }
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-terminal);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== Scanline Effect ===== */
.terminal-content::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.03) 0px,
        rgba(0, 0, 0, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}
