@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Fira+Code:wght@400;600&display=swap');

:root {
    --bg-color: #010409;
    --primary-glow: #00f7ff;
    --secondary-glow: #f5f5f5;
    --border-color: rgba(0, 247, 255, 0.3);
    --border-hover-color: rgba(0, 247, 255, 0.8);
    --animation-stagger-ms: 100ms;
}

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

html {
    background-color: var(--bg-color);
}

body {
    font-family: 'Fira Code', monospace;
    background-color: var(--bg-color);
    color: var(--secondary-glow);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center; 
    padding: 20px;
}


.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(0, 247, 255, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 247, 255, 0.1) 1px, transparent 1px);
    animation: grid-scroll 10s linear infinite;
}

@keyframes grid-scroll {
    from { background-position: 0 0; }
    to { background-position: -40px -40px; }
}

nav {
    padding: 20px 0;
    background: rgba(1, 4, 9, 0.8);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    animation: nav-fade-in 1s ease-out forwards;
    opacity: 0;
}
nav a.home-link{
    all: unset;
}

.home-link img.home {
    height: 50px;
    width: 50px;
    border-radius: 50%;
    margin-top: -10px;
}
@keyframes nav-fade-in {
    to { opacity: 1; }
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
}

nav ul li {
    animation: nav-item-pop-in 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(-20px);
}

nav ul li:nth-child(1) { animation-delay: calc(1 * var(--animation-stagger-ms)); }
nav ul li:nth-child(2) { animation-delay: calc(2 * var(--animation-stagger-ms)); }
nav ul li:nth-child(3) { animation-delay: calc(3 * var(--animation-stagger-ms)); }
nav ul li:nth-child(4) { animation-delay: calc(4 * var(--animation-stagger-ms)); }
nav ul li:nth-child(5) { animation-delay: calc(5 * var(--animation-stagger-ms)); }
nav ul li:nth-child(6) { animation-delay: calc(6 * var(--animation-stagger-ms)); }


@keyframes nav-item-pop-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

nav a {
    color: var(--secondary-glow);
    text-decoration: none;
    font-size: 1em;
    font-weight: 600;
    padding: 10px 20px;
    border: 2px solid var(--border-color); 
    border-radius: 4px; 
    background: rgba(0, 247, 255, 0.05); 
    transition: all 0.3s ease;
    position: relative;
    text-shadow: 0 0 3px rgba(245, 245, 245, 0.5);
}

nav a:hover {
    color: var(--primary-glow);
    border-color: var(--border-hover-color);
    text-shadow: 0 0 10px var(--primary-glow);
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.3);
    background: rgba(0, 247, 255, 0.15); 
    transform: translateY(-2px); 
}

header {
    text-align: center;
    margin: 40px 0;
    max-width: 800px;
    width: 95%; 
    background: rgba(1, 4, 9, 0.6);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 30px 40px;
    box-shadow: 0 0 20px rgba(0, 247, 255, 0.2);
    animation: content-fade-in 1s ease-out forwards;
    transform: translateY(20px);
    opacity: 0;
}

@keyframes content-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 34px;
    color: var(--secondary-glow);
    text-shadow: 0 0 12px var(--primary-glow);
    margin-bottom: 15px; 
}

header p {
    font-size: 1rem;
    color: rgba(245, 245, 245, 0.9);
    max-width: 600px; 
    margin: 0 auto; 
}

.projects-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: 1200px;
    padding: 20px 0;
}

.project-card {
    background: rgba(1, 4, 9, 0.6);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 25px 30px;
    transition: all 0.3s ease-in-out;
    opacity: 0; 
    transform: translateY(20px); 
    animation: card-pop-in 0.5s ease-out forwards;
}


.project-card:nth-child(1) { animation-delay: calc(1 * var(--animation-stagger-ms)); }
.project-card:nth-child(2) { animation-delay: calc(2 * var(--animation-stagger-ms)); }
.project-card:nth-child(3) { animation-delay: calc(3 * var(--animation-stagger-ms)); }


@keyframes card-pop-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover-color);
    box-shadow: 0 0 25px rgba(0, 247, 255, 0.3);
}

.project-card h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-glow);
    text-shadow: 0 0 8px var(--primary-glow);
    font-size: 1.5em;
    margin-bottom: 10px; 
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.project-card .technologies {
    font-size: 0.85em;
    font-style: italic;
    color: rgba(245, 245, 245, 0.7);
    margin-bottom: 20px;
}

.project-card .technologies a {
    color: var(--primary-glow);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project-card .technologies a:hover {
    text-shadow: 0 0 6px var(--primary-glow);
    text-decoration: underline;
}

.project-card ul {
    list-style: none;
    padding: 0;
}

.project-card li {
    padding: 8px 0 8px 25px;
    position: relative;
    font-size: 1em;
    transition: color 0.3s ease;
}

.project-card li::before {
    content: '>';
    position: absolute;
    left: 0;
    top: 8px;
    color: var(--primary-glow);
    text-shadow: 0 0 5px var(--primary-glow);
    font-weight: bold;
    transition: all 0.3s ease;
}

.project-card:hover li {
    color: var(--secondary-glow);
}

.project-card li:hover {
    color: var(--primary-glow);
}

.project-card li:hover::before {
    transform: translateX(5px);
    color: #fff;
}


@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    header {
        margin: 20px 0 30px 0;
        padding: 25px;
    }

    .projects-section {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    header {
        padding: 25px 20px;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 0.9rem;
    }

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

    .project-card {
        padding: 20px;
    }
}