/* style.css */

:root {
    --bg-dark: #0b0f19;
    --primary-cyan: #00ffff;
    --secondary-purple: #bd00ff;
    --text-light: #e0e0e0;
    --card-bg: rgba(30, 30, 46, 0.7);
    --accent-gradient: linear-gradient(45deg, var(--primary-cyan), var(--secondary-purple));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

}

/* فونت فارسی */
body.fa {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    text-align: right;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
}

.binary-loader {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 20px;
}

.binary-loader span {
    font-family: 'Fira Code', monospace;
    font-size: 2rem;
    color: var(--primary-cyan);
    animation: binaryFade 1.5s infinite;
}

.binary-loader span:nth-child(1) { animation-delay: 0s; }
.binary-loader span:nth-child(2) { animation-delay: 0.1s; }
.binary-loader span:nth-child(3) { animation-delay: 0.2s; }
.binary-loader span:nth-child(4) { animation-delay: 0.3s; }
.binary-loader span:nth-child(5) { animation-delay: 0.4s; }
.binary-loader span:nth-child(6) { animation-delay: 0.5s; }
.binary-loader span:nth-child(7) { animation-delay: 0.6s; }
.binary-loader span:nth-child(8) { animation-delay: 0.7s; }

@keyframes binaryFade {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

.loader p {
    font-size: 1.2rem;
    color: var(--text-light);
}

/* Particle Background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Scroll Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--accent-gradient);
    width: 0%;
    z-index: 1000;
    transition: width 0.3s ease;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    z-index: 999;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-cyan);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.language-toggle {
    margin-left: 2rem;
}

.language-toggle button {
    background: transparent;
    color: var(--primary-cyan);
    border: 1px solid var(--primary-cyan);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.language-toggle button:hover {
    background: var(--primary-cyan);
    color: var(--bg-dark);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 2;
}

.name {
    font-size: 6rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    min-height: 2rem;
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 1.5rem;
    background-color: var(--primary-cyan);
    margin-left: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Inter', sans-serif;
}

.btn.primary {
    background: var(--accent-gradient);
    color: var(--bg-dark);
}

.btn.secondary {
    background: transparent;
    color: var(--primary-cyan);
    border: 2px solid var(--primary-cyan);
}

.btn.tertiary {
    background: transparent;
    color: var(--secondary-purple);
    border: 2px solid var(--secondary-purple);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Floating Icons */
.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.icon {
    position: absolute;
    font-size: 2rem;
    color: rgba(0, 255, 255, 0.3);
    animation: float 6s ease-in-out infinite;
}

.icon:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.icon:nth-child(2) { top: 60%; left: 80%; animation-delay: 1s; }
.icon:nth-child(3) { top: 40%; left: 90%; animation-delay: 2s; }
.icon:nth-child(4) { top: 80%; left: 20%; animation-delay: 3s; }
.icon:nth-child(5) { top: 30%; left: 50%; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* Sections */
.section {
    padding: 6rem 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Section */
.bio {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 4rem;
    line-height: 1.8;
}

.bio p {
    margin-bottom: 1.5rem;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-gradient);
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.timeline-item:nth-child(odd) {
    padding-right: calc(50% + 30px);
    text-align: right;
}

.timeline-item:nth-child(even) {
    padding-left: calc(50% + 30px);
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent-gradient);
    border-radius: 50%;
    top: 15px;
    left: 50%;
    margin-left: -10px;
    box-shadow: 0 0 10px var(--primary-cyan);
}

.timeline-content {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-cyan);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-cyan);
    text-align: center;
}

.skill-bar {
    margin-bottom: 1.5rem;
}

.skill-bar span {
    display: block;
    margin-bottom: 0.5rem;
}

.bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 5px;
    width: 0;
    transition: width 1s ease;
}

.radar-chart {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

/* Projects Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: var(--accent-gradient);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(189, 0, 255, 0.3);
}

.project-card h3 {
    color: var(--primary-cyan);
    margin-bottom: 1rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag {
    background: rgba(0, 255, 255, 0.1);
    color: var(--primary-cyan);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.project-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.engineer-details {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
}

.engineer-details p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Experience Section */
.experience-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-gradient);
    left: 20px;
}

.experience-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 50px;
}

.experience-date {
    position: absolute;
    left: 0;
    top: 0;
    background: var(--accent-gradient);
    color: var(--bg-dark);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.experience-content {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.experience-content h3 {
    color: var(--primary-cyan);
    margin-bottom: 0.5rem;
}

.experience-content h4 {
    color: var(--secondary-purple);
    margin-bottom: 1rem;
    font-weight: 500;
}

/* AI Research Section */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.research-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.research-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 255, 0.3);
}

.research-card h3 {
    color: var(--primary-cyan);
    margin-bottom: 1rem;
}

.research-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.year {
    color: var(--secondary-purple);
}

.category {
    background: rgba(189, 0, 255, 0.2);
    color: var(--secondary-purple);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
}

/* GitHub Section */
.github-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.stat-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-cyan);
}

.count {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.repos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.repo-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.repo-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 255, 0.3);
}

.repo-card h3 {
    color: var(--primary-cyan);
    margin-bottom: 1rem;
}

.repo-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.language {
    color: var(--secondary-purple);
}

.stars {
    color: gold;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.contact-item i {
    color: var(--primary-cyan);
    font-size: 1.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 255, 0.1);
    background: rgba(30, 30, 46, 0.5);
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* Terminal Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.terminal-window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    height: 70vh;
    background: #1e1e2e;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.terminal-header {
    background: #2d2d44;
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.terminal-title {
    font-family: 'Fira Code', monospace;
    color: var(--primary-cyan);
    font-size: 0.9rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.terminal-body {
    height: calc(100% - 80px);
    padding: 1rem;
    overflow-y: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.output-line {
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.terminal-input-area {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    background: #2d2d44;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
}

.prompt {
    color: var(--primary-cyan);
    font-family: 'Fira Code', monospace;
    margin-right: 0.5rem;
}

#terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    outline: none;
}

/* Chatbot Widget */
.chatbot-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-toggle i {
    font-size: 1.5rem;
    color: var(--bg-dark);
}

.chatbot-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 450px;
    background: var(--card-bg);
    border-radius: 15px;
    display: none;
    flex-direction: column;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.chatbot-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    color: var(--primary-cyan);
}

.close-chat {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

.chatbot-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.message {
    margin-bottom: 1rem;
    display: flex;
}

.message.bot .message-content {
    background: rgba(0, 255, 255, 0.1);
    border-radius: 15px 15px 15px 0;
    padding: 0.8rem;
    max-width: 80%;
}

.message.user {
    justify-content: flex-end;
}

.message.user .message-content {
    background: rgba(189, 0, 255, 0.2);
    border-radius: 15px 15px 0 15px;
    padding: 0.8rem;
    max-width: 80%;
}

.chatbot-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
}

.chatbot-input input {
    flex: 1;
    padding: 0.5rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 255, 0.1);
    background: rgba(30, 30, 46, 0.5);
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
}

.chatbot-input button {
    background: var(--accent-gradient);
    border: none;
    color: var(--bg-dark);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-input button i {
    font-size: 1rem;
}

/* Footer */
footer {
    background: rgba(11, 15, 25, 0.8);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
}

footer p {
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-light);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-cyan);
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .name {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-links {
        display: none;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .research-grid,
    .repos-grid {
        grid-template-columns: 1fr;
    }
    
    .chatbot-window {
        width: 300px;
        height: 400px;
    }
    
    .experience-timeline::before {
        left: 15px;
    }
    
    .experience-item {
        padding-left: 40px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .name {
        font-size: 2.5rem;
    }
    
    .project-card,
    .repo-card {
        padding: 1.5rem;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding-left: 40px;
        padding-right: 0;
        text-align: left;
    }
	matrix-rain {
  	position: fixed;
  	top: 0;
  	left: 0;
 	 width: 100%;
 	 height: 100%;
 	 z-index: -1;
 	 opacity: 0.1;
}

}
