/* === BASE STYLES === */
:root {
    --bg-color: #0a0a0a;
    --terminal-bg: #0d1117;
    --text-primary: #00ff41;
    --text-secondary: #00cc33;
    --text-dim: #006622;
    --accent: #00ff41;
    --accent-dim: rgba(0, 255, 65, 0.1);
    --border-color: #1a3a1a;
    --glow: 0 0 10px rgba(0, 255, 65, 0.5);
}

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

body {
    background: var(--bg-color);
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* === MATRIX BACKGROUND === */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
}

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

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    opacity: 0.03;
    animation: noise 0.2s infinite;
}

@keyframes noise {
    0%, 100% { background-position: 0 0; }
    10% { background-position: -5% -10%; }
    20% { background-position: -15% 5%; }
    30% { background-position: 7% -25%; }
    40% { background-position: 20% 25%; }
    50% { background-position: -25% 10%; }
    60% { background-position: 15% 5%; }
    70% { background-position: 0% 15%; }
    80% { background-position: 25% 35%; }
    90% { background-position: -10% 10%; }
}

/* === TERMINAL WINDOW === */
.terminal {
    max-width: 900px;
    margin: 40px auto;
    background: var(--terminal-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow:
        0 0 0 1px rgba(0, 255, 65, 0.1),
        0 25px 50px rgba(0, 0, 0, 0.5),
        var(--glow);
    overflow: hidden;
    position: relative;
}

.terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 255, 65, 0.03) 0%,
        transparent 100%
    );
    pointer-events: none;
}

.terminal-header {
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

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

.btn-close { background: #ff5f57; }
.btn-minimize { background: #ffbd2e; }
.btn-maximize { background: #28c940; }

.terminal-title {
    flex: 1;
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
}

.terminal-body {
    padding: 24px;
    min-height: 400px;
}

/* === BOOT SEQUENCE === */
.boot-sequence {
    animation: fadeIn 0.5s ease;
}

.ascii-art {
    color: var(--text-primary);
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
    text-shadow: var(--glow);
    animation: flicker 0.15s infinite;
}

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

.blink {
    animation: blink 1s infinite;
}

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

/* === SECTIONS === */
.section {
    margin-bottom: 32px;
}

.command-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.prompt {
    color: var(--text-secondary);
    font-weight: bold;
}

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

.typed-command::after {
    content: '█';
    animation: cursorBlink 0.7s infinite;
    margin-left: 2px;
}

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

.output {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.output.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === HEADER CONTENT === */
.header-content {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 16px;
    background: rgba(0, 255, 65, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.avatar-container {
    position: relative;
    flex-shrink: 0;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 4px;
    border: 2px solid var(--accent);
    box-shadow: var(--glow);
    filter: grayscale(100%) contrast(1.2);
    transition: filter 0.3s ease;
}

.avatar:hover {
    filter: grayscale(0%) contrast(1);
}

.avatar-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        transparent 50%,
        rgba(0, 0, 0, 0.5) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    border-radius: 4px;
}

.info h1 {
    font-size: 28px;
    margin-bottom: 4px;
    text-shadow: var(--glow);
}

.title {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 12px;
}

.title::before {
    content: '> ';
    color: var(--text-dim);
}

.about {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.7;
}

/* === GLITCH EFFECT === */
.glitch-text {
    position: relative;
}

.glitch-text.glitching {
    animation: glitch 0.3s ease;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.glitch-text.glitching::before,
.glitch-text.glitching::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text.glitching::before {
    color: #ff0000;
    animation: glitch-color 0.3s ease;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch-text.glitching::after {
    color: #00ffff;
    animation: glitch-color 0.3s ease reverse;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch-color {
    0% { transform: translate(0); }
    20% { transform: translate(3px, 0); }
    40% { transform: translate(-3px, 0); }
    60% { transform: translate(3px, 0); }
    80% { transform: translate(-3px, 0); }
    100% { transform: translate(0); }
}

/* === SOCIAL LINKS === */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 12px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    animation: slideIn 0.3s ease backwards;
}

.file-item:hover {
    background: var(--accent-dim);
    transform: translateX(4px);
}

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

.file-name {
    flex: 1;
}

.arrow {
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-item:hover .arrow {
    opacity: 1;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === SKILLS === */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    padding: 6px 12px;
    background: var(--accent-dim);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-secondary);
    animation: popIn 0.3s ease backwards;
    transition: all 0.2s ease;
}

.skill-tag:hover {
    border-color: var(--accent);
    box-shadow: var(--glow);
    color: var(--text-primary);
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* === PROJECTS === */
.project-card {
    background: rgba(0, 255, 65, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 16px;
    animation: fadeUp 0.4s ease backwards;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: var(--text-dim);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

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

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

.project-indicator {
    color: var(--accent);
    transition: transform 0.2s ease;
}

.project-card:hover .project-indicator {
    transform: translateX(4px);
}

.project-title {
    font-size: 18px;
    color: var(--text-primary);
}

.project-subtitle {
    color: var(--text-dim);
    font-size: 13px;
    margin-bottom: 12px;
    font-style: italic;
}

.project-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
    filter: grayscale(50%);
    transition: filter 0.3s ease;
}

.project-card:hover .project-image {
    filter: grayscale(0%);
}

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

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

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

.project-links {
    display: flex;
    gap: 12px;
}

.project-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

.project-link:hover {
    text-shadow: var(--glow);
}

/* === FOOTER === */
.footer .command-line {
    margin-bottom: 0;
}

.cursor {
    animation: blink 1s infinite;
}

/* === UTILITIES === */
.hidden {
    display: none !important;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .terminal {
        margin: 16px;
        border-radius: 0;
    }

    .terminal-body {
        padding: 16px;
    }

    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .avatar {
        width: 100px;
        height: 100px;
    }

    .info h1 {
        font-size: 22px;
    }

    .ascii-art {
        font-size: 6px;
    }

    .command-line {
        font-size: 12px;
    }

    .file-item {
        font-size: 13px;
    }

    .permissions {
        display: none;
    }
}

/* === SELECTION === */
::selection {
    background: var(--accent);
    color: var(--bg-color);
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
}

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

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

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