:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #f8fafc;
    --accent: #f97316;
    --accent-hover: #fb923c;
    --accent-glow: rgba(249, 115, 22, 0.5);
    --text: #e2e8f0;
    --text-light: #94a3b8;
    --text-muted: #64748b;
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;
    --border: #1e293b;
    --border-light: #334155;
    --gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg-dark);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    color: var(--secondary);
    line-height: 1.2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Particles Canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Floating Icons Background */
.floating-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    font-size: 24px;
    color: rgba(59, 130, 246, 0.15);
    animation: float 20s infinite ease-in-out;
    filter: blur(0.5px);
}

.floating-icon:nth-child(odd) {
    color: rgba(139, 92, 246, 0.12);
}

.floating-icon:nth-child(3n) {
    color: rgba(249, 115, 22, 0.1);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-30px) rotate(5deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-15px) rotate(-3deg);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-40px) rotate(3deg);
        opacity: 0.5;
    }
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

header.scrolled {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
    border-bottom-color: var(--primary);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon {
    font-size: 1.2rem;
    color: var(--accent);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 5px var(--accent-glow)); }
    50% { filter: drop-shadow(0 0 15px var(--accent-glow)); }
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    position: relative;
}

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

.nav-links a:hover {
    color: var(--secondary);
}

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

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--secondary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

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

.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
    border-radius: 50%;
    animation: pulse-bg 8s infinite ease-in-out;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
    border-radius: 50%;
    animation: pulse-bg 6s infinite ease-in-out reverse;
}

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

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.hero-text h1 span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text .tagline {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

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

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.hero-image {
    display: flex;
    justify-content: center;
    animation: fadeInRight 1s ease;
}

.profile-img {
    width: 350px;
    height: 350px;
    border-radius: 30px;
    object-fit: cover;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-glow);
}

.profile-img::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: var(--gradient);
    border-radius: 33px;
    z-index: -1;
    animation: rotate-border 4s linear infinite;
    opacity: 0.7;
}

@keyframes rotate-border {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.profile-img i {
    font-size: 150px;
    color: rgba(255, 255, 255, 0.9);
}

/* Section Styles */
section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-header .line {
    width: 60px;
    height: 4px;
    background: var(--gradient);
    margin: 20px auto 0;
    border-radius: 2px;
}

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

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-light);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat {
    text-align: center;
    padding: 25px 20px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.stat:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: 20px;
    transition: all 0.4s ease;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    background: var(--bg-card-hover);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px var(--primary-glow);
}

.service-icon i {
    font-size: 30px;
    color: white;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Projects Section */
.projects {
    background: var(--bg-darker);
}

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

.project-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid var(--border);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.project-img {
    height: 200px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-img::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.project-card:hover .project-img::before {
    transform: translateX(100%);
}

.project-img i {
    font-size: 60px;
    color: rgba(255, 255, 255, 0.9);
}

.project-info {
    padding: 30px;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: var(--gradient-subtle);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border);
}

/* Tech Section */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.tech-item {
    background: var(--bg-card);
    padding: 25px 20px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.tech-item:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.tech-item i {
    font-size: 40px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.tech-item span {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Contact Section */
.contact {
    background: var(--bg-darker);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center top, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.contact-item-icon {
    width: 55px;
    height: 55px;
    background: var(--gradient-subtle);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.contact-item:hover .contact-item-icon {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.contact-item-icon i {
    font-size: 22px;
    color: var(--accent);
}

.contact-item-text span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.contact-item-text a,
.contact-item-text p {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    margin: 0;
    transition: color 0.3s ease;
}

.contact-item-text a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-link {
    width: 55px;
    height: 55px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--gradient);
    border-color: transparent;
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.social-link i {
    font-size: 22px;
}

/* Contact Form */
.contact-form {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-light);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-darker);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    background: var(--gradient);
    color: white;
    padding: 16px;
    font-size: 1.1rem;
    box-shadow: 0 5px 20px var(--primary-glow);
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

/* Footer */
footer {
    background: var(--bg-darker);
    color: var(--text);
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid var(--border);
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

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

/* Scroll Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .profile-img {
        width: 280px;
        height: 280px;
    }

    .about-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.98);
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .menu-toggle {
        display: flex;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

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

    .about-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .contact-form {
        padding: 25px;
    }

    .floating-icon {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }

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

    .btn {
        width: 100%;
        justify-content: center;
    }

    .profile-img {
        width: 220px;
        height: 220px;
    }

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