/* ==================== Global Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #0a0e27;
    --secondary-bg: #1a1f3a;
    --tertiary-bg: #252d47;
    --accent-color: #6366f1;
    --accent-light: #818cf8;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
    --success-color: #10b981;
    --hover-bg: rgba(99, 102, 241, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==================== Navbar ==================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.navbar-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: 700;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 5px 0;
    border-radius: 3px;
    transition: var(--transition);
}

/* ==================== Hero Section ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    position: relative;
    overflow: hidden;
    margin-top: 60px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    animation: slideUp 0.8s ease-out;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--accent-light);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.cta-button {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6);
}

.cta-button:active {
    transform: translateY(-1px);
}

/* ==================== Common Section Styles ==================== */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
    position: relative;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--accent-light) 100%);
    border-radius: 2px;
}

/* ==================== About Section ==================== */
.about {
    background-color: var(--secondary-bg);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.9;
    animation: fadeIn 0.8s ease-out;
}

/* ==================== Skills Section ==================== */
.skills {
    background-color: var(--primary-bg);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-card {
    background-color: var(--secondary-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-align: center;
    animation: slideUp 0.6s ease-out;
}

.skill-card:hover {
    background-color: var(--tertiary-bg);
    border-color: var(--accent-color);
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.2);
}

.skill-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--accent-light);
}

.skill-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.skill-card.future {
    border: 2px solid var(--accent-color);
    background: rgba(99, 102, 241, 0.05);
}

.skill-card.future h3 {
    color: var(--accent-light);
}

/* ==================== Projects Section ==================== */
.projects {
    background-color: var(--secondary-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background-color: var(--primary-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    transition: left 0.6s ease;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-12px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.3);
}

.project-header {
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    min-height: 50px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1.5rem;
}

.tag {
    display: inline-block;
    background-color: rgba(99, 102, 241, 0.15);
    color: var(--accent-light);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
    transition: var(--transition);
}

.tag:hover {
    background-color: rgba(99, 102, 241, 0.25);
    border-color: var(--accent-color);
}

.project-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.project-btn {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--accent-color);
    background-color: transparent;
    color: var(--accent-light);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.project-btn.demo {
    background-color: var(--accent-color);
    color: white;
}

.project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.project-btn.demo:hover {
    background-color: var(--accent-light);
}

.project-btn.code:hover {
    background-color: rgba(99, 102, 241, 0.15);
}

/* ==================== Contact Section ==================== */
.contact {
    background-color: var(--primary-bg);
}

.contact-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
    animation: slideUp 0.8s ease-out;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.social-links {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.social-links h3 {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--accent-light);
}

.social-icons {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-bg);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    color: var(--accent-color);
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.social-icon svg {
    width: 24px;
    height: 24px;
}

/* ==================== Footer ==================== */
.footer {
    background-color: var(--secondary-bg);
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==================== Animations ==================== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-30px);
    }
}

/* ==================== Scroll Animation ==================== */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== Mobile Responsive ==================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--secondary-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.5);
        gap: 0;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        padding: 2rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover {
        background-color: var(--tertiary-bg);
        color: var(--accent-color);
    }

    .hero {
        padding: 2rem 1rem;
        margin-top: 0;
    }

    section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-buttons {
        flex-direction: column;
    }

    .social-icons {
        gap: 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .cta-button {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    .section-container {
        padding: 0 1rem;
    }

    .about-content p {
        font-size: 0.95rem;
    }

    .skill-card,
    .project-card {
        padding: 1.5rem;
    }

    .skills-grid,
    .projects-grid {
        gap: 1.5rem;
    }

    .contact-wrapper {
        padding: 0 1rem;
    }

    .social-icons {
        gap: 1rem;
    }

    .social-icon {
        width: 45px;
        height: 45px;
    }

    .social-icon svg {
        width: 20px;
        height: 20px;
    }
}