@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: 150ms;
}

* {
    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;
    min-height: 100vh;
}

.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;
}

@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); 
}

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
}


.profile-container {
    animation: content-fade-in 1.5s ease-out 0.5s forwards;
    opacity: 0;
    transform: translateY(30px);
}

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

.profile-img-wrapper {
    position: relative;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    padding: 5px;
}

.profile-img-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: conic-gradient(from 0deg, var(--bg-color), var(--primary-glow), var(--bg-color));
    border-radius: 50%;
    animation: rotate 4s linear infinite;
    z-index: 1;
}

.profile-img-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    border: 5px solid var(--bg-color);
    background-color: var(--bg-color);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


.header-text h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem); 
    color: var(--secondary-glow);
    text-shadow: 0 0 15px var(--primary-glow);
    position: relative;
    animation: text-flicker 3s linear infinite alternate;
}

.header-text h1::before,
.header-text h1::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    overflow: hidden;
}

.header-text h1::before {
    left: 2px;
    text-shadow: -2px 0 var(--primary-glow);
    animation: glitch-1 2s linear infinite reverse;
}

.header-text h1::after {
    left: -2px;
    text-shadow: 2px 0 #ff00c1; 
    animation: glitch-2 2s linear infinite reverse;
}

@keyframes glitch-1 {
    0%, 100% { clip-path: inset(50% 0 30% 0); }
    20% { clip-path: inset(10% 0 85% 0); }
    40% { clip-path: inset(45% 0 45% 0); }
    60% { clip-path: inset(70% 0 10% 0); }
    80% { clip-path: inset(90% 0 5% 0); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(70% 0 15% 0); }
    20% { clip-path: inset(90% 0 5% 0); }
    40% { clip-path: inset(30% 0 60% 0); }
    60% { clip-path: inset(10% 0 80% 0); }
    80% { clip-path: inset(40% 0 40% 0); }
}

@keyframes text-flicker {
    from { text-shadow: 0 0 10px var(--primary-glow), 0 0 10px var(--primary-glow); }
    to { text-shadow: 0 0 20px var(--primary-glow), 0 0 5px var(--primary-glow); }
}

.subtitle {
    font-size: 1.1em;
    color: rgba(245, 245, 245, 0.8);
    margin-bottom: 10px;
}

.typing-effect {
    font-size: 1.25em;
    font-weight: bold;
    color: var(--primary-glow);
    text-shadow: 0 0 8px var(--primary-glow);
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    border-right: 0.15em solid var(--primary-glow);
    margin: 0 auto;
    animation:
        typing 3s steps(24, end) 1s forwards,
        blink-caret .75s step-end infinite;
    animation-delay: 1.5s;
}

@keyframes typing {
    from { width: 0; }
    to { width: 24ch; } 
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-glow); }
}

.socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    animation: content-fade-in 1s ease-out 2s forwards;
    opacity: 0;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    text-decoration: none;
    color: var(--secondary-glow);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(1, 4, 9, 0.5);
}

.social-link:hover {
    transform: translateY(-5px) scale(1.05);
    background: rgba(0, 247, 255, 0.1);
    border-color: var(--border-hover-color);
    color: var(--primary-glow);
    box-shadow: 0 0 15px rgba(0, 247, 255, 0.5);
}

.social-logo-img {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.social-link:hover .social-logo-img {
    transform: scale(1.1);
}

.social-link span {
    font-size: 0.8em;
    font-weight: 600;
}


@media (max-width: 768px) {
    .profile-img-wrapper {
        width: 200px;
        height: 200px;
    }

    .socials {
        gap: 15px;
    }

    .social-link {
        width: 80px;
        height: 80px;
    }

    .social-logo-img {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    nav ul {
        gap: 10px;
    }

    nav a {
        padding: 8px 12px;
        font-size: 0.9em;
    }

    .profile-img-wrapper {
        width: 150px;
        height: 150px;
    }

    .typing-effect {
        font-size: 1.1em;
    }
}