:root {
    /* Minimalist black and white theme */
    --primary: #000000;      /* Black */
    --background: #ffffff;   /* White background */
    --surface: #f8f9fa;      /* Light gray surface */
    --text: #000000;         /* Black text */
    --text-secondary: #666666; /* Gray text */
    --border: #e0e0e0;       /* Light border */
    --hover: #f0f0f0;        /* Light hover */
    --pixel-size: 1px;       /* Thin lines */
    --header-height: 60px;   /* Clean header */
    --container-width: 1200px; /* Wider for grid layout */
    --border-radius: 8px;    /* Subtle rounded corners */
}

[data-active="false"] {
    display: none;
}

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

/* Performance optimizations */
html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.02em;
    transform: translateZ(0); /* Force hardware acceleration */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* Clean Header */
.pixel-header {
    background: rgba(255, 255, 255, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    border-bottom: var(--pixel-size) solid var(--border);
}

.pixel-nav {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 2rem;
}

.logo {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.pixel-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.pixel-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s ease;
}

.pixel-nav a:hover {
    color: var(--text);
}

/* Clean Sections */
.pixel-section {
    padding: calc(var(--header-height) + 3rem) 2rem 4rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

/* Clean Hero */
.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 0;
}

.glitch-text {
    font-size: 48px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.subtitle {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    letter-spacing: -0.01em;
}

/* Clean About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    padding: 2rem 0;
}

.about-text {
    position: relative;
}

.about-text p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.about-text p strong {
    color: var(--text);
    font-weight: 600;
}

.skills {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

.skills h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 6px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.skill-item:hover {
    border-color: var(--text);
}

.skill-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    min-width: 80px;
}

.skill-level {
    height: 6px;
    flex: 1;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.skill-level-fill {
    height: 100%;
    background: var(--text);
    border-radius: 3px;
}

/* Neal.fun Style Projects Section */
.projects-container {
    margin-top: 3rem;
}

        .project-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
            max-width: 1200px;
            margin: 0 auto;
        }

        .project-card {
            background: var(--background);
            border: 2px solid var(--border);
            border-radius: var(--border-radius);
            overflow: hidden;
            transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
            cursor: pointer;
            aspect-ratio: 1;
            display: grid;
            grid-template-rows: 1fr auto;
            position: relative;
            will-change: transform;
            transform: translateZ(0); /* Force hardware acceleration */
        }

.project-card:hover {
    border-color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

        .project-image {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--surface);
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .ai-badge {
            position: absolute;
            top: 8px;
            right: 8px;
            background: rgba(0, 0, 0, 0.9);
            color: #fff;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-size: 9px;
            font-weight: 600;
            z-index: 10;
            letter-spacing: 0.3px;
        }

        .project-image svg {
            width: 100%;
            height: 100%;
            object-fit: cover;
            shape-rendering: optimizeSpeed; /* Optimize SVG rendering */
            image-rendering: optimizeSpeed;
        }

        .project-content {
            position: relative;
            z-index: 5;
            padding: 1.5rem;
            background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 80%, transparent 100%);
            margin-top: auto;
            will-change: transform;
        }

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

        .project-title {
            font-size: 16px;
            font-weight: 700;
            color: var(--text);
            letter-spacing: -0.01em;
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
            line-height: 1.3;
        }

.project-year {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

        .project-description {
            font-size: 14px;
            line-height: 1.4;
            color: var(--text);
            margin-bottom: 0.75rem;
            text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
        }

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.tech-tag {
    font-size: 11px;
    color: var(--text-secondary);
    padding: 0.125rem 0.375rem;
    background: var(--surface);
    border-radius: 4px;
    font-weight: 400;
}

.project-links {
    display: flex;
    gap: 0.5rem;
}

.project-link {
    flex: 1;
    text-align: center;
    padding: 0.375rem 0.75rem;
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    background: var(--surface);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
}

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

/* Clean Contact Section */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.5;
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: grid;
    gap: 0.5rem;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--text);
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
}

.contact-submit {
    background: var(--text);
    color: var(--background);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-submit:hover {
    opacity: 0.9;
}

.contact-alternatives {
    margin-top: 3rem;
    text-align: center;
}

.contact-alternatives h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.social-links-alt {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.social-link:hover {
    color: var(--text);
}

/* Clean Section Titles */
.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    text-align: center;
}

/* Contact Section */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
}

.contact-link:hover {
    border-color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    font-size: 32px;
    margin-bottom: 0.5rem;
}

.contact-info {
    text-align: center;
}

.contact-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.contact-value {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-links {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .pixel-nav {
        padding: 0 1rem;
    }
    
    .pixel-nav ul {
        gap: 1rem;
    }
    
    .glitch-text {
        font-size: 32px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 24px;
    }
}

@media (max-width: 1024px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

*:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

.skip-to-main {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--text);
    color: var(--background);
    padding: 0.75rem;
    z-index: 1001;
    transition: top 0.2s;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

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