/* ===== THEME VARIABLES ===== */
:root {
    /* Light Theme Colors */
    --primary-color: #2c3e50;
    --secondary-color: #7f8c8d;
    --background-color: #ffffff;
    --accent-color: #f5f5f5;
    --text-color: #2c3e50;
    --border-color: #ecf0f1;
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.98);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-code: 'JetBrains Mono', monospace;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    --transition: transform 0.3s ease, color 0.3s ease, background-color 0.3s ease;
    --glow-color: rgba(44, 62, 80, 0.1);
    --particle-color: #000000;
    --particle-line-color: #000000;
}

/* Dark Theme Colors */
[data-theme="dark"] {
    --primary-color: #bdc3c7;
    --secondary-color: #95a5a6;
    --background-color: #1a1a1a;
    --accent-color: #2c2c2c;
    --text-color: #ecf0f1;
    --border-color: #34495e;
    --card-bg: #2c2c2c;
    --nav-bg: rgba(26, 26, 26, 0.98);
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    --glow-color: rgba(189, 195, 199, 0.1);
    --particle-color: #ffffff;
    --particle-line-color: #ffffff;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: none;
    color: var(--primary-color);
    font-size: 18px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    box-shadow: var(--box-shadow);
    will-change: transform;
}

.theme-toggle:hover {
    transform: translateY(-2px);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--background-color);
    transition: background-color 0.3s ease;
    background: var(--background-color);
    position: relative;
    z-index: 1;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 8rem 0;
}

.section-header {
    margin-bottom: 4rem;
    text-align: left;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    font-family: var(--font-code);
}

.section-header h2::before {
    content: "<h2>";
    position: absolute;
    top: -20px;
    left: 0;
    font-family: var(--font-code);
    font-size: 1rem;
    color: var(--secondary-color);
    opacity: 0.5;
}

.section-header h2::after {
    content: "</h2>";
    position: absolute;
    bottom: -20px;
    left: 0;
    font-family: var(--font-code);
    font-size: 1rem;
    color: var(--secondary-color);
    opacity: 0.5;
}

.section-line {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin-top: 0.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    line-height: 1.2;
    transition: color 0.3s ease;
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 1rem;
}

p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: 2px solid var(--primary-color);
    border-radius: 100px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--primary-color), 
        transparent,
        var(--primary-color)
    );
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover::before {
    opacity: 0.3;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--background-color);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
}

.secondary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Header and Navigation */
header {
    padding: 2rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    transition: background-color 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.logo-bracket {
    color: var(--secondary-color);
}

.logo-text {
    margin: 0 5px;
}

.logo-dot {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--glow-color);
}

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

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

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
    position: relative;
}

.highlight {
    color: var(--secondary-color);
}

.hero-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: var(--transition);
}

.social-icons a:hover {
    transform: translateY(-3px);
    color: var(--secondary-color);
}

/* Projects Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--accent-color);
    padding: 2rem;
    border-radius: 1rem;
    transition: transform 0.3s ease;
    will-change: transform;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

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

.project-card h3 {
    margin-bottom: 1rem;
}

.project-card p {
    margin-bottom: 1.5rem;
}

.project-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.project-link i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.project-link:hover {
    color: var(--secondary-color);
}

.project-link:hover i {
    transform: translateX(5px);
}

/* Portfolio Filter */
.portfolio-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    background-color: var(--accent-color);
    border: none;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active, 
.filter-btn:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.skill-item {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--accent-color);
    border-radius: 1rem;
    transition: transform 0.3s ease;
    will-change: transform;
}

.skill-item:hover {
    transform: translateY(-5px);
}

.skill-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-icon i {
    font-size: 2rem;
    color: var(--primary-color);
}

.skill-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Contact Form */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.contact-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.contact-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--accent-color);
    border-radius: 0.5rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: var(--background-color);
    color: var(--primary-color);
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--accent-color);
    padding: 3rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Chat Bot Styles */
.chat-bot {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.chat-bot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.chat-bot-toggle i {
    font-size: 1.5rem;
}

.chat-bot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #ff3b30;
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
}

.chat-bot-container {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.chat-bot.active .chat-bot-container {
    transform: scale(1);
    opacity: 1;
    visibility: visible;
}

.chat-bot-header {
    padding: 15px 20px;
    background-color: var(--primary-color);
    color: var(--background-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-bot-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-bot-title i {
    font-size: 1.2rem;
}

.chat-bot-title h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--background-color);
}

.chat-bot-close {
    background: none;
    border: none;
    color: var(--background-color);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-bot-close:hover {
    opacity: 0.8;
}

.chat-bot-messages {
    height: 400px;
    padding: 20px;
    overflow-y: auto;
    background-color: var(--background-color);
}

.chat-message {
    margin-bottom: 15px;
    max-width: 80%;
}

.chat-message.bot {
    margin-right: auto;
}

.chat-message.user {
    margin-left: auto;
}

.chat-message-content {
    padding: 12px 15px;
    border-radius: 18px;
    position: relative;
}

.chat-message.bot .chat-message-content {
    background-color: var(--accent-color);
    border-bottom-left-radius: 5px;
}

.chat-message.user .chat-message-content {
    background-color: var(--primary-color);
    color: var(--background-color);
    border-bottom-right-radius: 5px;
}

.chat-time {
    font-size: 0.7rem;
    color: var(--secondary-color);
    margin-top: 5px;
    display: block;
}

.chat-bot-input {
    padding: 15px;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.chat-bot-input input {
    flex: 1;
    border: none;
    background-color: var(--background-color);
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--primary-color);
    outline: none;
    transition: var(--transition);
}

.chat-bot-input input:focus {
    box-shadow: 0 0 0 2px var(--primary-color);
}

.chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--background-color);
    border: none;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.chat-send:hover {
    transform: scale(1.05);
}

.chat-send i {
    font-size: 1rem;
}

/* Loading Spinner */
.chat-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 15px;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--accent-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.chat-bot-input.disabled input,
.chat-bot-input.disabled button {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Timeline for Experience Section */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    z-index: 0;
}

[data-theme="dark"] .timeline::after {
    background-color: var(--border-color);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    margin-bottom: 40px;
    z-index: 1;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border: 4px solid var(--background-color);
    border-radius: 50%;
    z-index: 2;
    top: 15px;
    box-shadow: 0 0 0 4px var(--accent-color);
}

[data-theme="dark"] .timeline-dot {
    box-shadow: 0 0 0 4px var(--border-color);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-date {
    display: inline-block;
    padding: 5px 15px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.timeline-content {
    padding: 20px;
    background-color: var(--accent-color);
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

.timeline-content h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.timeline-content h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.timeline-content ul {
    margin-top: 15px;
}

.timeline-content li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.timeline-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Responsive Styles */
@media screen and (max-width: 991px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
}

@media screen and (max-width: 768px) {
    section {
        padding: 5rem 0;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--background-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s ease;
        transform: translateX(-100%);
        z-index: 999;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-links li {
        margin: 1.5rem 0;
    }
    
    .hamburger {
        display: block;
        z-index: 1000;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
        text-align: left;
    }
    
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 21px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

@media screen and (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .chat-bot-container {
        width: 300px;
    }
    
    .chat-bot-toggle {
        width: 50px;
        height: 50px;
    }
    
    .chat-bot-toggle i {
        font-size: 1.2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.typed-text {
    display: inline-block;
}

.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--primary-color);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--background-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 99;
    box-shadow: var(--box-shadow);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
} 