@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;900&display=swap');

:root {
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --dark: #0f172a;
    --darker: #020617;
    --light: #f1f5f9;
    --gray: #64748b;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--darker);
    color: var(--light);
    overflow-x: hidden;
    cursor: none;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    font-weight: 600;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Cursor */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10001;
    transition: 0.15s ease-out;
    transform: translate(-50%, -50%);
    will-change: transform;
}

.cursor-follower {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%, -50%);
    will-change: transform;
    opacity: 1;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    transition: background 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--primary);
    outline: none;
}

.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.15), transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.hero-content {
    text-align: center;
    z-index: 1;
    padding: 0 2rem;
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.line {
    display: block;
    opacity: 0;
    animation: fadeInUp 0.8s forwards;
}

.line:nth-child(1) {
    animation-delay: 0.2s;
    font-size: 2rem;
    font-weight: 400;
    color: var(--gray);
}

.line:nth-child(2) {
    animation-delay: 0.4s;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--gray);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s forwards 0.6s;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    opacity: 0;
    animation: fadeInUp 0.8s forwards 0.8s;
    border: none;
    cursor: pointer;
}

.cta-button:hover,
.cta-button:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    outline: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Section */
.about {
    background: var(--dark);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

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

.hobby-card {
    background: var(--dark);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(99, 102, 241, 0.1);
    cursor: pointer;
}

.hobby-card:hover,
.hobby-card:focus {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    outline: none;
}

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

.hobby-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--light);
}

.hobby-card p {
    color: var(--gray);
    line-height: 1.6;
}

/* Contact Section */
.contact {
    background: var(--dark);
}

.contact-intro {
    text-align: center;
    font-size: 1.3rem;
    color: var(--gray);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

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

.contact-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.contact-card:hover,
.contact-card:focus {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-5px);
    border-color: var(--primary);
    outline: none;
}

.contact-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.contact-info h3 {
    color: var(--light);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.contact-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    background: var(--darker);
    color: var(--gray);
    border-top: 1px solid rgba(99, 102, 241, 0.1);
}

/* Flappy Bird Game Modal */
#flappyEasterEgg {
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

#gameContainer {
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

#closeFlappyBtn {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#closeFlappyBtn:hover,
#closeFlappyBtn:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    outline: none;
}

#flappyEasterEgg button {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 28px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#flappyEasterEgg button:hover,
#flappyEasterEgg button:focus {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    outline: none;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-bg {
        animation: none;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    .cursor,
    .cursor-follower {
        display: none !important;
    }

    .navbar {
        padding: 1rem 0;
        position: sticky;
        top: 0;
    }

    .nav-container {
        flex-direction: row;
        gap: 1rem;
        padding: 0 1rem;
        justify-content: space-between;
    }

    .nav-menu {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
        flex: 1;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 0.3rem 0.6rem;
    }

    .logo {
        font-size: 1.3rem;
        flex-shrink: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .line:nth-child(1) {
        font-size: 1.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    section {
        padding: 3rem 0;
    }

    .container {
        padding: 0 1rem;
    }

    .hobbies-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hobby-card {
        padding: 1.5rem 1rem;
        border-radius: 15px;
    }

    .hobby-icon {
        font-size: 2.5rem;
    }

    .hobby-card h3 {
        font-size: 1.2rem;
    }

    .hobby-card p {
        font-size: 0.95rem;
    }

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

    .contact-card {
        padding: 1.2rem;
        flex-direction: row;
        gap: 1rem;
    }

    .contact-icon {
        font-size: 2rem;
    }

    .contact-info h3 {
        font-size: 1rem;
    }

    .about-text p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .contact-intro {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.75rem 0;
    }

    .nav-container {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0 0.75rem;
    }

    .nav-menu {
        gap: 0.3rem;
        justify-content: flex-end;
    }

    .nav-link {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .hero {
        min-height: 80vh;
    }

    .hero-title {
        font-size: 2rem;
    }

    .line:nth-child(1) {
        font-size: 1rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

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

    section {
        padding: 2rem 0;
    }

    .container {
        padding: 0 0.75rem;
    }

    .hobbies-grid {
        gap: 0.75rem;
    }

    .hobby-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .hobby-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .hobby-card h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .hobby-card p {
        font-size: 0.85rem;
    }

    .contact-card {
        padding: 1rem;
        gap: 0.75rem;
    }

    .contact-icon {
        font-size: 1.8rem;
    }

    .contact-info h3 {
        font-size: 0.95rem;
        margin-bottom: 0.25rem;
    }

    .about-text p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 0.75rem;
    }

    .cta-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

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

    .contact-links {
        gap: 0.75rem;
    }

    #flappyEasterEgg {
        padding: 5px;
    }

    #gameContainer {
        border-radius: 8px;
    }

    #closeFlappyBtn {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    #startScreen h2,
    #gameOverScreen h2,
    #winScreen h2 {
        font-size: 1.5rem;
    }

    #giftBox {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
}
