/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: linear-gradient(135deg, #1a0f3f 0%, #2b1056 50%, #43125f 75%, #4b1c73 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Plus Pattern Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(255, 255, 255, 0.03) 2px, transparent 2px),
        radial-gradient(circle at 75px 75px, rgba(255, 255, 255, 0.03) 2px, transparent 2px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    pointer-events: none;
    z-index: -1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Spacing */
section {
    padding: 80px 0;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section Title */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    background: linear-gradient(135deg, #a855f7, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loader Styles */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a0f3f, #2b1056);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loader.fade-out {
    opacity: 0;
    transform: scale(1.1);
}

.loader-content {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(168, 85, 247, 0.3);
    border-top: 3px solid #a855f7;
    border-radius: 50%;
    animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 15, 63, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a855f7, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #a855f7;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #a855f7, #3b82f6);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: #a855f7;
    position: relative;
}

.nav-link.active::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #e2e8f0;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(135deg, #a855f7, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typing-text {
    font-size: 1.8rem;
    font-weight: 600;
    color: #a855f7;
    margin-bottom: 30px;
    min-height: 2.2rem;
}

.hero-description {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.3);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #a855f7, #3b82f6);
    color: white;
}

.btn-primary.liquid-glass {
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.3);
}

.btn-primary.liquid-glass:hover {
    background: rgba(168, 85, 247, 0.3);
    box-shadow: 0 12px 40px rgba(168, 85, 247, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #e2e8f0;
    border: 2px solid rgba(168, 85, 247, 0.5);
}

.btn-secondary:hover {
    background: rgba(168, 85, 247, 0.1);
    border-color: #a855f7;
}

/* Hero Image - Code Editor Look */
.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-editor {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 500px;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    animation: codeEditorFloat 6s ease-in-out infinite;
}

@keyframes codeEditorFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.editor-header {
    background: rgba(30, 41, 59, 0.8);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.editor-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.control-btn.close {
    background: #ef4444;
}

.control-btn.minimize {
    background: #f59e0b;
}

.control-btn.maximize {
    background: #10b981;
}

.control-btn:hover {
    opacity: 0.8;
}

.editor-title {
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 500;
}

.editor-content {
    display: flex;
    background: rgba(15, 23, 42, 0.9);
    min-height: 300px;
}

.line-numbers {
    background: rgba(30, 41, 59, 0.5);
    padding: 16px 12px;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.6;
    user-select: none;
    border-right: 1px solid rgba(168, 85, 247, 0.1);
}

.line-numbers span {
    display: block;
    text-align: right;
}

.code-content {
    flex: 1;
    padding: 16px;
    color: #e2e8f0;
    font-size: 0.85rem;
    line-height: 1.6;
}

.code-line {
    margin-bottom: 2px;
    opacity: 0;
    animation: codeFadeIn 0.5s ease forwards;
}

.code-line:nth-child(1) { animation-delay: 0.5s; }
.code-line:nth-child(2) { animation-delay: 0.7s; }
.code-line:nth-child(3) { animation-delay: 0.9s; }
.code-line:nth-child(4) { animation-delay: 1.1s; }
.code-line:nth-child(5) { animation-delay: 1.3s; }
.code-line:nth-child(6) { animation-delay: 1.5s; }
.code-line:nth-child(7) { animation-delay: 1.7s; }
.code-line:nth-child(8) { animation-delay: 1.9s; }
.code-line:nth-child(9) { animation-delay: 2.1s; }
.code-line:nth-child(10) { animation-delay: 2.3s; }
.code-line:nth-child(11) { animation-delay: 2.5s; }
.code-line:nth-child(12) { animation-delay: 2.7s; }
.code-line:nth-child(13) { animation-delay: 2.9s; }

@keyframes codeFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Code Syntax Highlighting */
.keyword {
    color: #c792ea;
    font-weight: 600;
}

.variable {
    color: #82aaff;
}

.property {
    color: #ffcb6b;
}

.string {
    color: #c3e88d;
}

.method {
    color: #82aaff;
    font-style: italic;
}

.template-string {
    color: #c3e88d;
}

/* Typing cursor effect */
.typing-cursor::after {
    content: '|';
    color: #a855f7;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Projects Section */
.projects {
    background: rgba(15, 23, 42, 0.3);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(168, 85, 247, 0.3);
}

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: rgba(168, 85, 247, 0.4);
    transform: scale(1.1);
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #e2e8f0;
}

.project-content p {
    color: #cbd5e1;
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Experience Section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(135deg, #a855f7, #3b82f6);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    width: 50%;
    padding: 0 40px;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
    transform: translateX(50px);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-dot {
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #a855f7, #3b82f6);
    border-radius: 50%;
    border: 4px solid #1a0f3f;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-content {
    background: rgba(15, 23, 42, 0.6);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.timeline-date {
    color: #a855f7;
    font-weight: 600;
    margin-bottom: 10px;
}

.timeline-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.timeline-content h4 {
    color: #3b82f6;
    margin-bottom: 15px;
}

.timeline-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.skill-tag {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* Skills Section */
.skills {
    background: rgba(15, 23, 42, 0.3);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.skill-category {
    background: rgba(15, 23, 42, 0.6);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(168, 85, 247, 0.2);
    text-align: center;
}

.skill-category h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: #a855f7;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: rgba(168, 85, 247, 0.1);
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 100px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-item:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 30px rgba(168, 85, 247, 0.2);
}

.skill-item i {
    font-size: 2rem;
    color: #a855f7;
}

.skill-item span {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Skill Progress Bars */
.skill-progress {
    width: 100%;
    height: 4px;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 5px;
}

.skill-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #a855f7, #3b82f6);
    border-radius: 2px;
    transition: width 0.8s ease;
    width: 0 !important;
    animation: progressFill 1.5s ease-out forwards;
}

@keyframes progressFill {
    to {
        width: var(--progress-width) !important;
    }
}

/* Timeline Achievements */
.timeline-achievements {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(168, 85, 247, 0.2);
}

.timeline-achievements h5 {
    color: #a855f7;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.timeline-achievements ul {
    list-style: none;
    padding: 0;
}

.timeline-achievements li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.4;
}

.timeline-achievements li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-weight: bold;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 50px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #a855f7;
}

.contact-details h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.contact-details p {
    color: #cbd5e1;
}

.contact-form {
    background: rgba(15, 23, 42, 0.6);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #a855f7;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 50%;
    color: #a855f7;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover {
    background: rgba(168, 85, 247, 0.4);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(168, 85, 247, 0.3);
}

/* Footer */
.footer {
    background: rgba(15, 23, 42, 0.8);
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-text p {
    color: #cbd5e1;
    margin-bottom: 5px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #a855f7;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(26, 15, 63, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 30px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left;
        padding-left: 60px;
    }

    .timeline-dot {
        left: 10px !important;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    section {
        padding: 60px 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .typing-text {
        font-size: 1.4rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}
