/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --accent-green: #3fb950;
    --accent-orange: #f0883e;
    --accent-blue: #58a6ff;
    --border-color: #30363d;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 16px;
    min-height: 100vh;
    position: relative;
}

/* ASCII Background */
#ascii-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    font-family: monospace;
    font-size: 32px;
    line-height: 1;
}

main {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.ascii-cat {
    font-size: 1.2rem;
    color: var(--accent-green);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.highlight {
    color: var(--accent-orange);
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Sections */
section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

section:last-of-type {
    border-bottom: none;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--accent-blue);
}

/* About Section */
.about ul {
    list-style: none;
    margin-top: 1rem;
}

.about li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

/* Tech Stack Badges */
.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.badge.go {
    background-color: #00ADD8;
    color: white;
}

.badge.powershell {
    background-color: #5391FE;
    color: white;
}

.badge.javascript {
    background-color: #F7DF1E;
    color: black;
}

.badge.qb64 {
    background-color: #444444;
    color: white;
}

/* Projects Section */
.project-category {
    margin-bottom: 2rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.project-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    border-color: var(--accent-green);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.project-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--accent-orange);
}

.project-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Fun Facts Section */
.fun-facts ul {
    list-style: none;
}

.fun-facts li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

.disclaimer {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

footer p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.github-link:hover {
    border-color: var(--accent-green);
    background-color: var(--bg-tertiary);
}

.github-link svg {
    fill: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 600px) {
    main {
        padding: 1.5rem 1rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .ascii-cat {
        font-size: 1rem;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .badges {
        justify-content: center;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background-color: var(--accent-green);
    color: var(--bg-primary);
}

/* Performance & Accessibility Optimizations */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

/* Improve link contrast */
a {
    color: var(--accent-blue);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-green);
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Better typography for readability */
p {
    margin-bottom: 1rem;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5rem;
}

/* Skip to main content link (hidden but accessible) */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-green);
    color: var(--bg-primary);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
}
