/* --- CSS Variables --- */
:root {
    --bg-color: #000000;
    --text-primary: #ffffff;
    --text-dim: #888888;
    --border-color: #ffffff;
    --font-mono: 'Courier New', Consolas, Monaco, Menlo, 'SF Mono', monospace;
    --pixel-size: 4px;
}

/* --- Reset & Global --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    image-rendering: pixelated;
}

body {
    font-family: var(--font-mono);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
}

/* --- Pixel Particle Background --- */
#pixel-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* --- Scanline Overlay --- */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
}

/* --- Terminal Window Card --- */
.terminal {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    /* Pixel corner decorations using pseudo-elements */
    box-shadow:
        inset 0 0 0 1px var(--border-color),
        0 0 0 1px var(--border-color),
        4px 4px 0 0 var(--border-color);

    /* Animation */
    opacity: 0;
    transform: scale(0.95);
    animation: terminalBoot 0.6s ease-out forwards;
    animation-delay: 0.2s;
}

@keyframes terminalBoot {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Terminal Title Bar */
.terminal-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 2px solid var(--border-color);
    background: var(--text-primary);
    color: var(--bg-color);
}

.terminal-controls {
    display: flex;
    gap: 6px;
}

.control-dot {
    width: 10px;
    height: 10px;
    background: var(--bg-color);
    border: 1px solid var(--bg-color);
}

.terminal-title {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.terminal-content {
    padding: 24px 20px 20px 20px;
    position: relative;
}

/* --- Header --- */
.header {
    margin-bottom: 24px;
}

.name-line {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 8px;
}

h1 {
    font-size: 20px;
    font-weight: normal;
    letter-spacing: 0;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background: var(--text-primary);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

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

.bio {
    font-size: 13px;
    color: var(--text-dim);
    margin-left: 4px;
}

/* --- Experience Section --- */
.section-label {
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 12px;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.experience-group {
    border: 1px solid var(--border-color);
    padding: 4px 0;
    margin-bottom: 24px;
}

.exp-item {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.exp-item:not(:last-child) {
    border-bottom: 1px dashed var(--border-color);
}

.exp-prefix {
    color: var(--text-dim);
    font-size: 12px;
    white-space: nowrap;
    min-width: 20px;
}

.exp-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.exp-title {
    font-size: 14px;
    font-weight: normal;
}

.exp-desc {
    font-size: 12px;
    color: var(--text-dim);
}

.exp-date {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
    text-align: right;
    min-width: 90px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.exp-degree {
    font-size: 12px;
    color: var(--text-primary);
}

/* --- Links Section --- */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: var(--text-primary);
    padding: 12px 16px;
    transition: all 0.1s ease;
    border: none;
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 13px;
    background: transparent;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

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

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

.link-item:hover .link-arrow {
    color: var(--bg-color);
}

.link-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.link-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.link-arrow {
    font-size: 12px;
    color: var(--text-dim);
    transition: color 0.1s ease;
}

/* --- Footer --- */
.footer {
    margin-top: 20px;
    text-align: left;
    font-size: 11px;
    color: var(--text-dim);
    padding-left: 4px;
}

.prompt {
    color: var(--text-primary);
}

.prompt-path {
    color: var(--text-dim);
}

.footer-blink {
    animation: blink 1s step-end infinite;
}

.footer-cursor {
    animation: blink 1s step-end infinite;
}

/* --- Interactive Shell --- */
.shell-container {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    background: var(--bg-color);
    padding: 40px 20px 20px 20px;
    z-index: 5;
}

.shell-container.active {
    display: flex;
}

.shell-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
}

.shell-title {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.shell-close-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.1s ease;
}

.shell-close-btn:hover {
    background: var(--text-primary);
    color: var(--bg-color);
}

.shell-output {
    flex: 1;
    font-size: 12px;
    color: var(--text-dim);
    overflow-y: auto;
    padding-bottom: 8px;
}

.shell-output .output-line {
    margin-bottom: 4px;
}

.shell-output .output-line.command {
    color: var(--text-primary);
}

.shell-output .output-line.result {
    color: var(--text-dim);
}

.shell-output .output-line.error {
    color: #ff6b6b;
}

.shell-input-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
}

.shell-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 11px;
    flex: 1;
    outline: none;
    caret-color: var(--text-primary);
}

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

.email-actions {
    margin-top: 8px;
}

.send-email-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.1s ease;
}

.send-email-btn:hover {
    background: var(--text-primary);
    color: var(--bg-color);
}

/* --- Neofetch --- */
.neofetch-logo {
    display: block;
    font-size: 10px;
    line-height: 1.3;
    color: var(--text-primary);
    white-space: pre;
    margin-bottom: 8px;
}

.neofetch-info {
    display: block;
    font-size: 11px;
    line-height: 1.6;
    white-space: pre;
}

.neofetch-label {
    color: var(--text-dim);
    min-width: 90px;
    display: inline-block;
    font-weight: 600;
}

.neofetch-value {
    color: var(--text-primary);
}

.neofetch-tip {
    display: block;
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 16px;
    font-style: italic;
    white-space: pre;
}

/* --- Responsive --- */
@media (max-width: 500px) {
    .terminal {
        max-width: 100%;
    }

    .exp-item {
        flex-direction: column;
        gap: 8px;
    }

    .exp-date {
        text-align: left;
        padding-left: 24px;
    }
}
