/* ===================================
   mrvallejo.com - Retro Terminal Theme
   =================================== */

:root {
    --bg-color: #0a0a0a;
    --terminal-bg: #1a1a2e;
    --text-primary: #00ff41;
    --text-secondary: #008f11;
    --text-dim: #005a00;
    --accent-cyan: #00ffff;
    --accent-pink: #ff0000;
    --accent-yellow: #ffff00;
    --card-bg: #16213e;
    --border-color: #00ff41;
    --scanline-color: rgba(0, 0, 0, 0.5);
    --font-mono: 'VT323', 'Courier New', monospace;
    --input-bg: #0d0d0d;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 18px;
    overflow-x: hidden;
}

/* CRT Effects */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        var(--scanline-color) 2px,
        var(--scanline-color) 4px
    );
    pointer-events: none;
    z-index: 1000;
    opacity: 0.15;
}

.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 60%,
        rgba(0, 0, 0, 0.3) 100%
    );
    pointer-events: none;
    z-index: 999;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Terminal Header */
.terminal-header {
    margin-bottom: 20px;
}

.terminal-bar {
    background: linear-gradient(180deg, #2a2a4a 0%, #1a1a2e 100%);
    border: 2px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.terminal-bar .close-btn,
.terminal-bar .min-btn,
.terminal-bar .max-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-bar .close-btn {
    background: #ff5f56;
    border: 1px solid #cc4c45;
}

.terminal-bar .min-btn {
    background: #ffbd2e;
    border: 1px solid #cc9725;
}

.terminal-bar .max-btn {
    background: #27ca40;
    border: 1px solid #1fa332;
}

.terminal-bar .title {
    margin-left: 15px;
    color: var(--text-secondary);
    font-size: 14px;
    text-shadow: 0 0 5px var(--text-secondary);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 40px 20px 20px;
    margin-bottom: 20px;
}

.glitch-wrapper {
    display: inline-block;
    margin-bottom: 15px;
}

.glitch {
    font-size: 4rem;
    font-weight: bold;
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--text-primary);
    position: relative;
    animation: glitch 2s infinite;
}

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

.glitch::before {
    color: var(--accent-pink);
    animation: glitch-offset-1 2s infinite linear alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-2px, -2px);
}

.glitch::after {
    color: var(--accent-cyan);
    animation: glitch-offset-2 2s infinite linear alternate;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    transform: translate(2px, 2px);
}

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

@keyframes glitch-offset-1 {
    0%, 100% { clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%); }
    25% { clip-path: polygon(0 10%, 100% 10%, 100% 50%, 0 50%); }
    50% { clip-path: polygon(0 20%, 100% 20%, 100% 60%, 0 60%); }
    75% { clip-path: polygon(0 5%, 100% 5%, 100% 40%, 0 40%); }
}

@keyframes glitch-offset-2 {
    0%, 100% { clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%); }
    25% { clip-path: polygon(0 60%, 100% 60%, 100% 90%, 0 90%); }
    50% { clip-path: polygon(0 70%, 100% 70%, 100% 100%, 0 100%); }
    75% { clip-path: polygon(0 50%, 100% 50%, 100% 80%, 0 80%); }
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    min-height: 1.6em;
}

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

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

.hint {
    margin-top: 15px;
    font-size: 1rem;
    color: var(--text-dim);
}

.hint .kbd {
    background: var(--card-bg);
    border: 1px solid var(--text-dim);
    border-radius: 4px;
    padding: 2px 8px;
    color: var(--accent-yellow);
}

/* Interactive Terminal */
.interactive-terminal {
    margin-bottom: 30px;
}

.terminal-window {
    background: #0d0d0d;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
    min-height: 200px;
    display: flex;
    flex-direction: column;
}

.terminal-output {
    flex: 1;
    font-family: var(--font-mono);
    overflow-y: auto;
    max-height: 300px;
    margin-bottom: 10px;
}

.terminal-output .welcome-msg {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.terminal-output .command {
    color: var(--accent-yellow);
}

.terminal-output .response {
    color: var(--text-primary);
    margin-bottom: 10px;
    white-space: pre-wrap;
}

.terminal-output .error {
    color: #ff5f56;
    margin-bottom: 10px;
}

.terminal-output .system-msg {
    color: var(--accent-cyan);
    margin-bottom: 10px;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.terminal-input-line .prompt {
    color: var(--accent-yellow);
    font-weight: bold;
}

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

/* Navigation */
.nav-terminal {
    background: var(--terminal-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
}

.nav-terminal .prompt {
    color: var(--accent-yellow);
    font-weight: bold;
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    gap: 15px;
    list-style: none;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.nav-link:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

/* Sections */
.section {
    margin-bottom: 60px;
    padding: 30px;
    background: var(--terminal-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.1);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 25px;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan);
    border-bottom: 2px dashed var(--text-dim);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title .hashtag {
    color: var(--accent-pink);
}

/* Pixel Icons */
.pixel-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 5px currentColor);
}

.pixel-sports { color: var(--accent-cyan); }
.pixel-tech { color: var(--accent-pink); }
.pixel-music { color: var(--accent-yellow); }
.pixel-blog { color: #ff9f43; }
.pixel-hottakes { color: #ff6b6b; }
.pixel-guestbook { color: #5f27cd; }
.pixel-about { color: #00d2d3; }

.section-intro {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    border: 2px solid var(--text-dim);
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.card h3 {
    color: var(--accent-yellow);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.card p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Blog Section */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.blog-post {
    background: var(--card-bg);
    border: 2px solid var(--text-dim);
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
}

.blog-post:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.15);
}

.post-header {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.post-date {
    color: var(--text-dim);
}

.post-category {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.post-category.tech {
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
}

.post-category.sports {
    color: var(--accent-yellow);
    border: 1px solid var(--accent-yellow);
}

.post-category.music {
    color: var(--accent-pink);
    border: 1px solid var(--accent-pink);
}

.post-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px var(--accent-cyan);
}

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.8;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more {
    color: var(--accent-cyan);
    cursor: pointer;
    transition: all 0.3s ease;
}

.read-more:hover {
    text-shadow: 0 0 10px var(--accent-cyan);
}

/* Terminal Box */
.terminal-box {
    background: #0d0d0d;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    font-family: var(--font-mono);
}

.terminal-output {
    min-height: 100px;
}

.terminal-output p {
    margin-bottom: 10px;
}

.prompt {
    color: var(--accent-yellow);
    font-weight: bold;
    margin-right: 10px;
}

/* Hot Takes */
.hot-takes-list {
    margin-top: 20px;
}

.hot-take {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 0, 0.05);
    border-left: 4px solid var(--accent-yellow);
    border-radius: 4px;
}

.hot-take .fire {
    font-size: 1.2rem;
}

.hot-take p {
    color: var(--text-primary);
    flex: 1;
}

.category-tag {
    font-size: 0.8rem;
    color: var(--text-dim);
    padding: 2px 6px;
    border: 1px solid var(--text-dim);
    border-radius: 3px;
}

/* Guestbook Section */
.guestbook-form {
    background: #0d0d0d;
    border: 2px solid var(--text-dim);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.terminal-input-group {
    margin-bottom: 15px;
}

.terminal-input-group label {
    display: block;
    color: var(--accent-yellow);
    margin-bottom: 8px;
    font-weight: bold;
}

.terminal-input-group input,
.terminal-input-group textarea {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--text-dim);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    padding: 12px;
    outline: none;
    transition: border-color 0.3s ease;
}

.terminal-input-group input:focus,
.terminal-input-group textarea:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.terminal-input-group textarea {
    resize: vertical;
}

.terminal-btn {
    background: var(--terminal-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.terminal-btn:hover {
    background: var(--border-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
}

.btn-icon {
    color: var(--accent-yellow);
}

.terminal-btn:hover .btn-icon {
    color: var(--bg-color);
}

.guestbook-entries {
    background: #0d0d0d;
    border: 2px solid var(--text-dim);
    border-radius: 8px;
    padding: 25px;
}

.entries-title {
    color: var(--accent-cyan);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.guestbook-entry {
    background: var(--card-bg);
    border-left: 4px solid var(--accent-pink);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.guestbook-entry .entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--text-dim);
}

.guestbook-entry .entry-name {
    color: var(--accent-yellow);
    font-weight: bold;
}

.guestbook-entry .entry-date {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.guestbook-entry .entry-message {
    color: var(--text-secondary);
    line-height: 1.6;
}

.no-entries {
    color: var(--text-dim);
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.ascii-avatar {
    color: var(--text-secondary);
    font-size: 10px;
    line-height: 1.2;
}

.ascii-avatar pre {
    font-family: var(--font-mono);
    white-space: pre;
    text-shadow: 0 0 5px var(--text-secondary);
}

.about-text p {
    margin-bottom: 15px;
}

.about-text strong {
    color: var(--accent-cyan);
}

.interests-list {
    list-style: none;
    margin: 15px 0;
}

.interests-list li {
    padding: 5px 0;
    color: var(--text-secondary);
}

.interests-list .bullet {
    color: var(--accent-pink);
    margin-right: 10px;
}

.status-line {
    margin-top: 20px;
    padding: 10px 15px;
    background: rgba(0, 255, 65, 0.1);
    border-radius: 4px;
    border-left: 4px solid var(--text-primary);
}

.status-line .blink {
    animation: blink 1s step-end infinite;
    color: var(--text-primary);
}

/* Footer */
.terminal-footer {
    text-align: center;
    padding: 30px;
    border-top: 2px dashed var(--text-dim);
    margin-top: 40px;
}

.terminal-footer p {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.social-link {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.social-link:hover {
    color: var(--accent-cyan);
    transform: scale(1.2);
}

.social-icon {
    width: 28px;
    height: 28px;
}

.copyright {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Responsive */
@media (max-width: 768px) {
    .glitch {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .nav-links {
        justify-content: center;
    }

    .section {
        padding: 20px;
    }

    .section-title {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

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

    .about-content {
        grid-template-columns: 1fr;
    }

    .ascii-avatar {
        text-align: center;
    }

    .social-links {
        gap: 15px;
    }
}

/* Search Modal */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.search-modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
}

.search-content {
    background: var(--terminal-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
}

.search-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 2px solid var(--text-dim);
    gap: 10px;
}

.search-header .prompt {
    color: var(--accent-yellow);
    font-weight: bold;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.2rem;
    outline: none;
}

.search-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.search-close:hover {
    color: var(--accent-pink);
}

.search-results {
    padding: 15px 20px;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 12px;
    margin-bottom: 10px;
    background: var(--card-bg);
    border: 1px solid var(--text-dim);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    border-color: var(--accent-cyan);
    transform: translateX(5px);
}

.search-result-item h4 {
    color: var(--text-primary);
    margin-bottom: 5px;
}

.search-result-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-hints {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    border-top: 1px solid var(--text-dim);
    font-size: 0.85rem;
    color: var(--text-dim);
}

.search-hints kbd {
    background: var(--card-bg);
    border: 1px solid var(--text-dim);
    border-radius: 3px;
    padding: 2px 6px;
    color: var(--text-secondary);
}

/* Pixel art decoration */
.pixel-corner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.5;
    animation: float 3s ease-in-out infinite;
    z-index: 100;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pixel-corner:hover {
    opacity: 1;
    transform: scale(1.2);
    text-shadow: 0 0 10px var(--accent-pink);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
    border: 1px solid var(--text-dim);
}

::-webkit-scrollbar-thumb {
    background: var(--text-dim);
    border-radius: 5px;
}

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

/* Terminal output scrollbar */
.terminal-output::-webkit-scrollbar {
    width: 8px;
}

.terminal-output::-webkit-scrollbar-track {
    background: #0d0d0d;
    border: 1px solid var(--text-dim);
}

.terminal-output::-webkit-scrollbar-thumb {
    background: var(--text-dim);
    border-radius: 4px;
}
