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

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

body {
    background: #1a1a2e;
    font-family: 'JetBrains Mono', 'Segoe UI', 'Meiryo', monospace;
    color: #c9d1d9;
    min-height: 100vh;
    padding: 32px 16px;
    transition: padding 0.4s ease;
}

pre, code {
    font-family: 'JetBrains Mono', 'Segoe UI', 'Meiryo', monospace;
}

body.maximized-mode { padding: 0; }

/* --- Terminal Shell --- */

.terminal {
    max-width: 780px;
    margin: 0 auto;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.terminal.maximized {
    max-width: 100%;
    min-height: 100vh;
    border-radius: 0;
    border-color: transparent;
}

.terminal-header {
    background: #161b22;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #30363d;
    user-select: none;
}

.buttons { display: flex; gap: 7px; }

.buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.btn-close { background: #ff5f56; }
.btn-min   { background: #ffbd2e; }
.btn-max   { background: #27c93f; }

.title {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    color: #8b949e;
    margin-right: 40px;
}

.terminal-body {
    padding: 28px 32px 40px;
    font-size: 0.92rem;
    line-height: 1.75;
}

/* --- Lines & Prompt --- */

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

.prompt { color: #58a6ff; font-weight: 700; }
.cmd    { color: #c9d1d9; }

.cursor {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    background: #58a6ff;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

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

/* --- Output Content (rendered from markdown) --- */

#output-content {
    animation: appear 0.3s ease-out;
}

@keyframes appear {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#output-content p {
    margin-bottom: 8px;
    color: #8b949e;
}

#output-content > p:first-of-type {
    color: #8b949e;
    margin-bottom: 8px;
}

/* --- ASCII Art --- */

.ascii-name {
    color: #58a6ff;
    font-size: 0.65rem;
    line-height: 1.2;
    margin: 8px 0 20px;
    overflow: hidden;
    font-variant-ligatures: none;
}

/* --- Headings --- */

h2 {
    color: #c9d1d9;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.md-hash {
    color: #484f58;
    font-weight: 400;
}

/* --- Horizontal Rules --- */

hr {
    border: none;
    border-top: 1px solid #30363d;
    margin: 28px 0;
}

/* --- Project Blocks --- */

.project-block {
    border-left: 2px solid #30363d;
    padding: 12px 0 12px 20px;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}

.project-block:hover {
    border-left-color: #58a6ff;
}

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

.project-header h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.tag {
    font-size: 0.75rem;
    color: #8b949e;
    font-weight: 400;
}

.project-block p {
    color: #8b949e;
    font-size: 0.88rem;
}

.project-block p + p {
    margin-top: 4px;
}

/* --- Links --- */

a {
    color: #58a6ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.links-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.links-row a {
    color: #c9d1d9;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.links-row a:hover {
    border-bottom-color: #58a6ff;
    text-decoration: none;
}

/* --- Final prompt spacing --- */

#final-line {
    margin-top: 32px;
}

/* --- Responsive --- */

@media (max-width: 600px) {
    body { padding: 0; }

    .terminal {
        border-radius: 0;
        border: none;
    }

    .terminal-body {
        padding: 20px 16px 32px;
    }

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

    .line {
        flex-wrap: wrap;
    }
}
