:root {
    --color-1: #4e1d4c;
    --color-2: #771d50;
    --color-3: #904d57;
    --color-4: #be6a62;
    --color-5: #ac2f45;
    --color-6: #e64639;
    --color-7: #ff8a32;
    --color-8: #f1b640;
    --color-9: #ffc5a3;
    --color-10: #686f9a;
    --color-11: #404974;
    --color-12: #283440;
    --color-13: #3d2935;
    --color-14: #291d2b;
    --color-15: #1b1f22;
    --color-16: #21181b;
    --primary: #e64639;
    --secondary: #f1b640;
    --accent: #ff8a32;
    --dark-bg: #1b1f22;
    --light-text: #ffc5a3;
    --border: #404974;
    --highlight: #771d50;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Orbitron', monospace;
    line-height: 1.6;
    color: var(--light-text);
    background-color: var(--dark-bg);
    background-image: 
        linear-gradient(0deg, transparent 24%, rgba(230, 70, 57, 0.05) 25%, rgba(230, 70, 57, 0.05) 26%, transparent 27%, transparent 74%, rgba(230, 70, 57, 0.05) 75%, rgba(230, 70, 57, 0.05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(230, 70, 57, 0.05) 25%, rgba(230, 70, 57, 0.05) 26%, transparent 27%, transparent 74%, rgba(230, 70, 57, 0.05) 75%, rgba(230, 70, 57, 0.05) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(230, 70, 57, 0.03),
            rgba(230, 70, 57, 0.03) 1px,
            transparent 1px,
            transparent 2px
        );
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.pixel-bg-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(180deg, var(--color-1) 0%, transparent 100%);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.pixel-bg-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(0deg, var(--color-2) 0%, transparent 100%);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.pixel-decoration {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: var(--border);
    opacity: 0.3;
    user-select: none;
}

.pixel-deco-1 {
    position: absolute;
    top: 50px;
    right: 20px;
    animation: float 4s ease-in-out infinite;
}

.pixel-deco-2 {
    position: absolute;
    bottom: 50px;
    left: 20px;
    animation: float 5s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.navbar {
    position: sticky;
    top: 0;
    background: var(--dark-bg);
    border-bottom: 4px solid var(--primary);
    box-shadow: 0 4px 0 var(--highlight);
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--secondary);
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0 var(--primary), 4px 4px 0 var(--highlight);
    animation: pixelFlicker 0.3s infinite;
}

.pixel-icon {
    display: inline-block;
    margin-right: 8px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--light-text);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border: 2px solid transparent;
}

.nav-links a:hover {
    color: var(--secondary);
    border: 2px dashed var(--accent);
    text-shadow: 0 0 8px var(--primary);
}

@keyframes pixelFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 2px 2px 0 var(--primary), 4px 4px 0 var(--highlight);
    }
    20%, 24%, 55% {
        text-shadow: 2px 2px 0 var(--accent), 4px 4px 0 var(--primary);
    }
}

.hero {
    padding: 6rem 20px 4rem;
    background: linear-gradient(135deg, var(--color-1) 0%, var(--color-2) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(230, 70, 57, 0.1) 35px, rgba(230, 70, 57, 0.1) 70px);
    pointer-events: none;
}

.hero .container {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    text-shadow: 
        3px 3px 0 var(--primary),
        6px 6px 0 var(--highlight),
        9px 9px 0 var(--border);
    line-height: 1.2;
    letter-spacing: 2px;
}

.pixel-char {
    display: inline-block;
    animation: pixelBounce 0.6s ease-in-out infinite;
}

.pixel-char:nth-child(1) { animation-delay: 0s; }
.pixel-char:nth-child(2) { animation-delay: 0.1s; }
.pixel-char:nth-child(3) { animation-delay: 0.2s; }
.pixel-char:nth-child(4) { animation-delay: 0.3s; }
.pixel-char:nth-child(5) { animation-delay: 0.4s; }
.pixel-char:nth-child(6) { animation-delay: 0.5s; }

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

.pixel-title {
    position: relative;
    z-index: 2;
}

.pixel-subtitle {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 1.5rem;
    font-family: 'Orbitron', monospace;
    letter-spacing: 1px;
    animation: blink 1s step-start infinite;
}

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

.description {
    font-size: 0.95rem;
    color: var(--light-text);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.8;
    font-family: 'Orbitron', monospace;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.pixel-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.65rem;
    letter-spacing: 1px;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    border: 2px solid;
    transition: all 0.2s ease;
    text-transform: uppercase;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    position: relative;
}

.pixel-btn:active {
    box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
    transform: translate(3px, 3px);
}

.btn {
    padding: 0.875rem 2rem;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid transparent;
    display: inline-block;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.btn-secondary {
    background: transparent;
    color: var(--light-text);
    border-color: var(--secondary);
}

.btn-secondary:hover {
    background: var(--secondary);
    color: #000;
    border-color: var(--secondary);
}

.section-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.8rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--secondary);
    text-shadow: 2px 2px 0 var(--primary);
    letter-spacing: 2px;
}

.projects {
    padding: 4rem 20px;
    background: linear-gradient(135deg, var(--color-14) 0%, var(--color-13) 100%);
    position: relative;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.pixel-card {
    background: var(--color-1);
    border: 3px solid var(--primary);
    box-shadow: 4px 4px 0 var(--highlight), 8px 8px 0 var(--border);
    position: relative;
    transition: all 0.2s ease;
}

.pixel-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 7px 7px 0 var(--highlight), 11px 11px 0 var(--border);
}

.pixel-card:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 var(--highlight), 4px 4px 0 var(--border);
}

.pixel-card-header {
    font-size: 2rem;
    margin-bottom: 1rem;
    animation: pixelPulse 1s ease-in-out infinite;
}

@keyframes pixelPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.project-card {
    padding: 1.5rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.1rem;
    color: var(--secondary);
    flex: 1;
    font-weight: 700;
    letter-spacing: 1px;
}

.languages {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lang {
    background: var(--color-2);
    color: var(--secondary);
    padding: 0.35rem 0.6rem;
    border: 2px solid var(--primary);
    font-size: 0.65rem;
    font-weight: 700;
    white-space: nowrap;
    font-family: 'Press Start 2P', cursive;
}

.lang-py { border-color: #3776ab; color: #3776ab; }
.lang-ts { border-color: #3178c6; color: #3178c6; }
.lang-rs { border-color: #ce422b; color: #ce422b; }
.lang-java { border-color: #f89820; color: #f89820; }
.lang-react { border-color: #61dafb; color: #61dafb; }

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

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

.project-links a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 700;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    letter-spacing: 1px;
    padding: 0.5rem 0.8rem;
    border: 2px solid var(--secondary);
    transition: all 0.2s ease;
    display: inline-block;
}

.project-links a:hover {
    background: var(--secondary);
    color: #000;
    box-shadow: 2px 2px 0 var(--primary);
}

.view-more {
    text-align: center;
}

.about {
    padding: 4rem 20px;
    background: linear-gradient(135deg, var(--color-16) 0%, var(--color-15) 100%);
}

.about .container {
    max-width: 900px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.pixel-text {
    color: var(--light-text);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.7;
}

.pixel-prompt {
    color: var(--secondary);
    font-weight: 700;
    margin-right: 0.5rem;
}

.skills {
    background: var(--color-1);
    padding: 1.5rem;
    border: 3px solid var(--primary);
    box-shadow: 3px 3px 0 var(--highlight);
}

.skills h3 {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-family: 'Press Start 2P', cursive;
    letter-spacing: 1px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill {
    background: var(--color-2);
    color: var(--secondary);
    padding: 0.5rem 0.8rem;
    border: 2px solid var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.contact {
    padding: 4rem 20px;
    background: linear-gradient(135deg, var(--color-2) 0%, var(--color-1) 100%);
}

.contact .container {
    max-width: 900px;
    text-align: center;
}

.pixel-contact-text {
    color: var(--light-text);
    margin-bottom: 3rem;
    font-size: 0.85rem;
    letter-spacing: 1px;
    font-family: 'Orbitron', monospace;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.pixel-contact-card {
    background: var(--color-14);
    border: 3px solid var(--accent);
    box-shadow: 3px 3px 0 var(--primary), 6px 6px 0 var(--highlight);
    text-decoration: none;
    color: var(--light-text);
    transition: all 0.2s ease;
}

.pixel-contact-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--primary), 8px 8px 0 var(--highlight);
}

.pixel-contact-card:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 var(--primary), 4px 4px 0 var(--highlight);
}

.contact-card {
    padding: 2rem;
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: pixelBounce 0.8s ease-in-out infinite;
}

.contact-card h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary);
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.contact-handle {
    color: var(--light-text);
    font-size: 0.85rem;
}

.footer {
    background: var(--dark-bg);
    color: var(--light-text);
    padding: 2rem 20px;
    text-align: center;
    font-size: 0.8rem;
    border-top: 4px solid var(--primary);
    font-family: 'Orbitron', monospace;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .nav-brand {
        font-size: 0.9rem;
    }

    .nav-links {
        gap: 0.5rem;
        font-size: 0.65rem;
    }

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

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

    .contact-links {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .pixel-btn {
        width: 100%;
        text-align: center;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .pixel-decoration {
        font-size: 0.6rem;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--background);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    position: sticky;
    top: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.hero {
    padding: 6rem 20px;
    background: linear-gradient(135deg, var(--surface) 0%, #f0f8ff 100%);
}

.hero .container {
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.highlight {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    display: inline-block;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.projects {
    padding: 4rem 20px;
    background: var(--surface);
}

.projects .container > h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(13, 71, 161, 0.15);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.25rem;
    color: var(--text);
    flex: 1;
}

.languages {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lang {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

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

.project-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.project-links a:hover {
    color: var(--accent);
    gap: 1rem;
}

.view-more {
    text-align: center;
}

.about {
    padding: 4rem 20px;
    background: linear-gradient(135deg, var(--background) 0%, #f0f8ff 100%);
}

.about .container {
    max-width: 900px;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.skills h3 {
    margin-bottom: 1.5rem;
    color: var(--text);
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.contact {
    padding: 4rem 20px;
    background: var(--surface);
}

.contact .container {
    max-width: 900px;
    text-align: center;
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact > .container > p {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.contact-card {
    background: var(--background);
    padding: 2rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(13, 71, 161, 0.15);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

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

.footer {
    background: var(--text);
    color: white;
    padding: 2rem 20px;
    text-align: center;
    font-size: 0.9rem;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

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

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

    .contact-links {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .projects .container > h2,
    .about h2,
    .contact h2 {
        font-size: 2rem;
    }
}
