/* ====================================
   RETRO PORTFOLIO CSS STYLES
   ==================================== */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ====================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   - Easy to customize colors and effects
   ==================================== */
:root {
    /* Color palette - customize these to change the entire theme */
    --bg-primary: #0a0a0a;        /* Main dark background */
    --bg-secondary: #1a1a1a;      /* Secondary dark background */
    --text-primary: #00ff00;      /* Terminal green - main accent */
    --text-secondary: #ffffff;    /* White text */
    --text-dim: #888888;         /* Dimmed text */
    --accent: #ff6b35;           /* Orange accent color */
    --border: #333333;           /* Border color */
    --glow: #00ff0050;          /* Glow effect (50% opacity green) */
}

/* ====================================
   BODY AND BASIC LAYOUT
   ==================================== */
body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ====================================
   RETRO EFFECTS
   ==================================== */

/* Scanlines effect - creates the classic CRT monitor look */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.03),      /* Very subtle green lines */
        rgba(0, 255, 0, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;    /* Don't interfere with clicking */
    z-index: 1000;          /* Above everything else */
}

/* ====================================
   TERMINAL WINDOW STYLING
   ==================================== */

/* Main terminal window container */
.terminal-window {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 8px;
    margin: 20px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
}

/* Terminal header with window controls */
.terminal-header {
    background: var(--border);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 6px 6px 0 0;
}

/* Window control buttons (close, minimize, maximize) */
.terminal-buttons {
    display: flex;
    gap: 6px;
}

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

/* macOS-style button colors */
.btn-close { background: #ff5f57; }
.btn-minimize { background: #ffbd2e; }
.btn-maximize { background: #28ca42; }

.terminal-title {
    margin-left: 10px;
    font-size: 12px;
    color: var(--text-dim);
}

.terminal-content {
    padding: 20px;
}

/* ====================================
   HEADER SECTION
   ==================================== */
.header {
    text-align: center;
    padding: 40px 20px;
}

/* ASCII art styling */
.ascii-art {
    font-size: 12px;
    color: var(--text-primary);
    white-space: pre;           /* Preserve spacing and line breaks */
    margin-bottom: 20px;
    text-shadow: 0 0 10px var(--glow);
}

/* Main name styling */
.name {
    font-size: 2.5rem;
    color: var(--text-primary);
    text-shadow: 0 0 20px var(--glow);
    margin-bottom: 10px;
}

/* Title/role styling */
.title {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 20px;
}

/* Terminal prompt styling */
.prompt {
    color: var(--text-primary);
    display: inline-block;
}

/* Blinking cursor animation */
.cursor {
    display: inline-block;
    background: var(--text-primary);
    width: 8px;
    height: 20px;
    animation: blink 1s infinite;
}

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

/* ====================================
   NAVIGATION MENU
   ==================================== */
.nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

/* Navigation items styled as terminal commands */
.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.3s ease;
    background: transparent;
    cursor: pointer;
}

/* Navigation hover effects */
.nav-item:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
    box-shadow: 0 0 10px var(--glow);
    transform: translateY(-2px);
}

/* ====================================
   SECTION STYLING
   ==================================== */
.section {
    margin: 40px 0;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

/* Staggered animation for sections */
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.4s; }
.section:nth-child(4) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section headers with terminal-style arrow */
.section-header {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header::before {
    content: '>';
    color: var(--accent);
}

/* ====================================
   ABOUT SECTION
   ==================================== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.about-text {
    font-size: 16px;
    line-height: 1.8;
}

/* Highlighted text in about section */
.about-text .highlight {
    color: var(--text-primary);
    background: rgba(0, 255, 0, 0.1);
    padding: 2px 4px;
    border-radius: 2px;
}

/* ====================================
   SKILLS SECTION
   ==================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.skill-item {
    background: var(--bg-primary);
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s ease;
}

/* Skill item hover effects */
.skill-item:hover {
    border-color: var(--text-primary);
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--glow);
}

/* ====================================
   PROJECTS SECTION
   ==================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Individual project cards */
.project-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
}

/* Project card hover effects */
.project-card:hover {
    border-color: var(--text-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 0, 0.1);
}

.project-title {
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.project-description {
    margin-bottom: 15px;
    color: var(--text-dim);
}

/* Technology tags */
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tech-tag {
    background: rgba(0, 255, 0, 0.1);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

/* Project links */
.project-links {
    display: flex;
    gap: 15px;
}

.project-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

/* ====================================
   CONTACT SECTION
   ==================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.contact-info {
    margin: 1rem 0;
    font-size: 0.9rem;
}

.contact-info p {
    margin: 0.5rem 0;
}

.contact-info a {
    color: #00ff00;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.experience-item {
    margin-bottom: 2rem;
}

.experience-item h4 {
    color: #00ff00;
    margin-bottom: 0.5rem;
}

.experience-item .date {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.experience-item ul {
    list-style-type: disc;
    margin-left: 1.5rem;
}

.experience-item li {
    margin-bottom: 0.5rem;
}

.skill-category {
    margin-bottom: 2rem;
}

.skill-category h3 {
    color: #00ff00;
    margin-bottom: 1rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

.skill-category .skill-item {
    display: inline-block;
    margin: 0.5rem;
    padding: 0.5rem 1rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
}

/* Contact item cards */
.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

/* Contact item hover effect */
.contact-item:hover {
    border-color: var(--text-primary);
    transform: translateX(10px);
}

.contact-icon {
    color: var(--accent);
    font-size: 1.2rem;
}

/* ====================================
   TERMINAL OUTPUT STYLING
   ==================================== */
.terminal-output {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid var(--border);
}

.output-line {
    margin-bottom: 10px;
}

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

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

.output-result {
    color: var(--text-dim);
    margin-left: 20px;
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

/* Tablet and smaller screens */
@media (max-width: 768px) {
    .terminal-window {
        margin: 10px;
    }
    
    .name {
        font-size: 2rem;
    }
    
    /* Stack navigation vertically on mobile */
    .nav {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    /* Single column layout for about and contact */
    .about-content,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Smaller ASCII art on mobile */
    .ascii-art {
        font-size: 10px;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    /* Single column for projects */
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    /* Smaller skills grid */
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

/* ====================================
   CUSTOM SCROLLBAR (Webkit browsers)
   ==================================== */
::-webkit-scrollbar {
    width: 8px;
}

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

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

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