html {
    scroll-behavior: smooth;
}

.background,
.grid-overlay {
    pointer-events: none;
}

section {
    scroll-margin-top: 120px;
}


:root {
    --primary: #00ff9d;
    --secondary: #0066ff;
    --accent: #ff00ff;
    --dark: #0a0e27;
    --darker: #050814;
    --text: #e0e6ff;
    --glow: rgba(0, 255, 157, 0.3);
}

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

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--darker);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ---------- Background ---------- */
.background {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 102, 255, .1), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 255, .1), transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(0, 255, 157, .05), transparent 50%);
}

.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(0, 255, 157, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 157, .03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(50px);
    }
}

/* ---------- Header ---------- */
header {
    padding: 2rem 5%;
    position: relative;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- Links ---------- */
.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width .3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
    position: relative;
}

.hero-content {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    animation: fadeInUp 1s ease-out;
}

.hero-text {
    text-align: left;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-image {
    width: 400px;
    height: 400px;
    border-radius: 20px;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow:
        0 0 60px rgba(0, 255, 157, 0.3),
        0 20px 80px rgba(0, 0, 0, 0.5);
    animation: floatImage 6s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes floatImage {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

.image-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0.2;
    filter: blur(40px);
    animation: glowPulse 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-tag {
    font-size: 0.9rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-tag::before {
    content: '< ';
    color: var(--secondary);
}

.hero-tag::after {
    content: ' />';
    color: var(--secondary);
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary) 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.hero-description {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 3rem;
    color: rgba(224, 230, 255, 0.8);
    line-height: 1.8;
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    animation: fadeInUp 1s ease-out 0.8s backwards;
}

.btn {
    padding: 1rem 2.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--dark);
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 40px rgba(0, 255, 157, 0.5);
}

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

.btn-secondary:hover {
    background: var(--primary);
    color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 40px rgba(0, 255, 157, 0.3);
}

/* Floating Code Snippets */
.code-float {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: rgba(0, 255, 157, 0.3);
    opacity: 0;
    animation: floatCode 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatCode {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    10%,
    90% {
        opacity: 0.5;
    }

    50% {
        transform: translateY(-100px) rotate(5deg);
        opacity: 0.3;
    }
}

.code-float:nth-child(1) {
    top: 20%;
    right: 10%;
    animation-delay: 0s;
}

.code-float:nth-child(2) {
    top: 60%;
    right: 5%;
    animation-delay: 3s;
}

.code-float:nth-child(3) {
    top: 40%;
    left: 8%;
    animation-delay: 6s;
}

/* Projects Section */
.projects {
    padding: 8rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1.1rem;
    color: rgba(224, 230, 255, 0.6);
    max-width: 600px;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid rgba(0, 255, 157, 0.1);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.05), rgba(0, 102, 255, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(0, 255, 157, 0.2);
}

.project-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    color: rgba(0, 255, 157, 0.1);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.project-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.project-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

.project-description {
    color: rgba(224, 230, 255, 0.7);
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

.tech-badge {
    padding: 0.3rem 0.8rem;
    background: rgba(0, 102, 255, 0.15);
    border: 1px solid rgba(0, 102, 255, 0.3);
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 400;
}

.project-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--primary);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: var(--secondary);
    transform: translateX(5px);
}

/* Footer */
footer {
    padding: 4rem 5%;
    border-top: 1px solid rgba(0, 255, 157, 0.1);
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

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

.social-links a {
    color: var(--text);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-5px);
}

.footer-text {
    color: rgba(224, 230, 255, 0.5);
    font-size: 0.9rem;
}

/* Skills Section */
.skills {
    padding: 8rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

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

.skill-card {
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid rgba(0, 255, 157, 0.1);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 157, 0.1), transparent);
    transition: left 0.6s ease;
}

.skill-card:hover::before {
    left: 100%;
}

.skill-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 255, 157, 0.2);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.skill-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.skill-level {
    font-size: 0.85rem;
    color: rgba(224, 230, 255, 0.6);
}

/* About Section */
.about {
    padding: 8rem 5%;
    background: rgba(10, 14, 39, 0.3);
}

.about-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.about-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(0, 255, 157, 0.2);
    transition: all 0.4s ease;
}

.about-image:hover {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgba(0, 255, 157, 0.3);
}

.about-text h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-text p {
    color: rgba(224, 230, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.education {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 255, 157, 0.05);
    border-left: 4px solid var(--primary);
}

.education h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Hobbies Section */
.hobbies {
    padding: 8rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

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

.hobby-card {
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid rgba(0, 255, 157, 0.1);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    text-align: center;
}

.hobby-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 255, 157, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hobby-card:hover::before {
    opacity: 1;
}

.hobby-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(0, 255, 157, 0.3);
}

.hobby-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(0, 255, 157, 0.3));
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hobby-card:nth-child(1) .hobby-icon {
    animation-delay: 0s;
}

.hobby-card:nth-child(2) .hobby-icon {
    animation-delay: 0.2s;
}

.hobby-card:nth-child(3) .hobby-icon {
    animation-delay: 0.4s;
}

.hobby-card:nth-child(4) .hobby-icon {
    animation-delay: 0.6s;
}

.hobby-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.hobby-description {
    color: rgba(224, 230, 255, 0.7);
    line-height: 1.6;
    font-size: 0.95rem;
}

.hobby-accent {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    border: 2px solid rgba(0, 255, 157, 0.2);
    border-radius: 50%;
    transition: all 0.4s ease;
}

.hobby-card:hover .hobby-accent {
    transform: rotate(90deg);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.5);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-20px);
    }

    60% {
        transform: translateX(-50%) translateY(-10px);
    }
}

.scroll-indicator::before {
    content: '';
    display: block;
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

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

    .hero {
        min-height: 90vh;
    }

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

    .profile-image {
        width: 300px;
        height: 300px;
    }

    .image-glow {
        width: 320px;
        height: 320px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 968px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 8, 20, 0.9);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--dark);
    margin: 10% auto;
    padding: 3rem;
    border: 1px solid var(--primary);
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(0, 255, 157, 0.2);
    position: relative;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: var(--text);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--primary);
}

#passwordForm h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    margin-bottom: 1rem;
}

#passwordForm p {
    color: rgba(224, 230, 255, 0.8);
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#passwordInput {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 157, 0.3);
    border-radius: 5px;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

#passwordInput:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.2);
}

.video-container h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 2rem;
}

#nahVideo {
    border-radius: 10px;
    border: 2px solid var(--accent);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.3);
}