@font-face {
    font-family: 'CustomFont';
    src: url('../fonts/GNF.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #0d1117;
    color: #c9d1d9;
    font-family: 'CustomFont', 'Consolas', 'Monaco', monospace;
    text-align: center;
}

#p5-canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 5%;
    z-index: 10;
    background: rgba(13, 17, 23, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

nav a {
    font-family: 'CustomFont', 'Consolas', 'Monaco', monospace;
    color: #c9d1d9;
    text-decoration: none;
    margin: 0 20px;
    font-size: 1.1em;
    transition: color 0.3s;
}

nav a:hover,
nav a.active {
    color: #00ddff;
}

.lang-switcher a {
    color: #c9d1d9;
    text-decoration: none;
    font-size: 1.1em;
    margin: 0 5px;
    font-weight: bold;
}

.lang-switcher a.active {
    color: #00ddff;
}

.page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 100px 20px 40px;
    box-sizing: border-box;
}

.page {
    display: none;
    width: 100%;
}

.page.active {
    display: block;
    animation: fadeIn 0.6s ease-out forwards;
}

.page.is-exiting {
    animation: fadeOut 0.4s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.content {
    background-color: rgba(13, 17, 23, 0.85);
    padding: 40px;
    border-radius: 6px;
    border: 1px solid #30363d;
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    font-size: 2.5em;
    color: #00ddff;
    margin-bottom: 15px;
    overflow-wrap: break-word;
}

h1::after {
    content: '_';
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

p {
    font-size: 1.1em;
    line-height: 1.7;
    text-align: left;
    overflow-wrap: break-word;
}

.contact-links {
    margin-top: 25px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.skills {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid #00ddff;
    color: #00ddff;
    padding: 8px 15px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.3s, transform 0.2s;
}

.button-link:hover {
    background-color: rgba(0, 221, 225, 0.1);
    transform: translateY(-2px);
}

.button-link img {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.project-card {
    background: rgba(20, 25, 33, 0.8);
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 20px;
    text-align: left;
    transition: transform 0.3s, border-color 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: #00ddff;
}

.project-card .tech-stack {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-card .tech-stack span {
    background: #30363d;
    color: #c9d1d9;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 15px;
    }
    
    nav {
        margin-bottom: 10px;
    }
    
    nav a {
        margin: 0 10px;
    }

    .page-container {
        padding-top: 120px;
    }

    .content {
        padding: 20px;
        max-width: 100%;
    }
    
    h1 {
        font-size: 2em;
    }
    
    p {
        font-size: 1em;
    }

    .skills {
        grid-template-columns: repeat(3, 1fr);
    }

    .button-link {
        padding: 6px 10px;
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .skills {
        grid-template-columns: repeat(2, 1fr);
    }
}
