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

:root {
    --primary-color: #0a0a0a;
    --secondary-color: #1a1a1a;
    --accent-color: #00d4ff;
    --text-color: #ffffff;
    --text-secondary: #cccccc;
    --background-color: #0a0a0a;
    --section-bg: #1a1a1a;
    --border-color: #333333;
    --hover-color: #00d4ff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --primary-color: #ffffff;
    --secondary-color: #f8f9fa;
    --accent-color: #007bff;
    --text-color: #212529;
    --text-secondary: #6c757d;
    --background-color: #ffffff;
    --section-bg: #f8f9fa;
    --border-color: #dee2e6;
    --hover-color: #0056b3;
}

#dark-loader {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #0a0020 0%, #000 70%);
}

.particles::before,
.particles::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent-color);
    animation: float 8s infinite linear;
}

.particles::before {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.particles::after {
    top: 60%;
    right: 30%;
    animation-delay: 3s;
    background: #00ff88;
    box-shadow: 0 0 20px #00ff88;
}

@keyframes float {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

.reveal-text {
    font-size: 5.5rem;
    font-weight: 900;
    letter-spacing: 12px;
    background: linear-gradient(90deg, #00d4ff, #00ff88, #ff00aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: revealName 5s forwards;
    text-shadow: 0 0 40px rgba(0, 212, 255, 0.6);
}

.tagline {
    margin-top: 20px;
    font-size: 1.3rem;
    color: #00d4ff;
    opacity: 0;
    animation: fadeIn 2s 2s forwards;
    letter-spacing: 6px;
    font-weight: 300;
}

@keyframes revealName {
    0% { opacity: 0; transform: translateY(50px); filter: blur(10px); }
    30% { opacity: 1; transform: translateY(0); filter: blur(0); }
    70% { opacity: 1; }
    100% { opacity: 0; filter: blur(20px); }
}

@keyframes fadeIn {
    to { opacity : 0.7};
}

body.loaded #dark-loader {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s ease-out;
    pointer-events: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: var(--transition);
}

/* Header */
header {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

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

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

nav ul li a:hover {
    color: var(--accent-color);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: 50%;
}

.theme-toggle:hover {
    background-color: var(--secondary-color);
    transform: scale(1.1);
}

/* Hero Section */
#hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-color);
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 40%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin-bottom: 2rem;
    border: 4px solid var(--accent-color);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.3);
    transition: var(--transition);
}

.profile-pic:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.4);
}

#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-color), #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    font-weight: 300;
    opacity: 0.9;
}

.hero-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.hero-link:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

/* Sections */
section {
    padding: 80px 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-color);
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), #00ff88);
    border-radius: 2px;
}

/* About */
#about p {
    text-align: center;
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Skills */
#skills .skills-category {
    background-color: var(--section-bg);
    margin: 1.5rem 0;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

#skills .skills-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.5s;
}

#skills .skills-category:hover::before {
    left: 100%;
}

#skills .skills-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.15);
    border-color: var(--accent-color);
}

#skills .skills-category h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
}

#skills .skills-category p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Projects */
#projects {
    background-color: var(--section-bg);
    padding: 20px 0;
}

#projects h3 {
    font-size: 2.1rem;
    margin: 4.5rem 0 2rem 0;
    color: var(--accent-color);
    text-align: center;
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

#projects h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #00ff88);
    border-radius: 2px;
}

/* Grid container */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Individual project cards */
.project {
    background-color: var(--primary-color);
    margin: 0;
    padding: 2.3rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border-left: 5px solid transparent;
}

.project::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-color), #00ff88);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s ease;
}

.project:hover::before {
    transform: scaleX(1);
}

.project:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 45px rgba(0, 212, 255, 0.25);
    border-color: var(--accent-color);
    border-left-color: var(--accent-color);
}

/* Project title inside cards */
.project h4 {
    margin: 0 0 1rem 0;
    font-size: 1.38rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-color), #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Project description */
.project p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1.2rem;
    font-size: 1rem;
}

/* Tech tags */
.tech {
    display: inline-block;
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(0, 212, 255, 0.3);
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.tech:hover {
    background: var(--accent-color);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

/* Light mode support for tech tags */
[data-theme="light"] .tech {
    background: rgba(0, 123, 255, 0.12);
    color: #007bff;
    border-color: rgba(0, 123, 255, 0.3);
}

[data-theme="light"] .tech:hover {
    background: #007bff;
    color: white;
}

/* AI Integrations */
#ai-integrations {
    background-color: var(--background-color);
}

.ai-integration {
    background-color: var(--section-bg);
    margin: 2rem 0;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.ai-integration::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #ff6b6b, #ffa500);
    opacity: 0;
    transition: var(--transition);
}

.ai-integration:hover::before {
    opacity: 1;
}

.ai-integration:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(255, 107, 107, 0.15);
    border-color: #ff6b6b;
}

.ai-integration h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-color);
}

.ai-integration p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Contact */
#contact {
    background-color: var(--primary-color);
    color: var(--text-color);
}

#contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#contact-form input,
#contact-form textarea {
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--section-bg);
    color: var(--text-color);
    font-family: inherit;
    transition: var(--transition);
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

#contact-form button {
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-color), #00ff88);
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 1rem;
}

#contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        gap: 1rem;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    .hero-links {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    section {
        padding: 60px 0;
    }

    section h2 {
        font-size: 2rem;
    }

    #skills .skills-category {
        padding: 1.5rem;
    }

    .project,
    .ai-integration {
        padding: 2rem;
    }

    .project h3,
    .ai-integration h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    #hero {
        padding: 100px 0 60px;
    }

    #hero h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1.1rem;
    }

    .profile-pic {
        width: 140px;
        height: 140px;
    }

    section {
        padding: 50px 0;
    }

    .project,
    .ai-integration {
        padding: 1.5rem;
    }
}