@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600;700&family=Inter:wght@400;500;600;700&display=swap');

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

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #0f1420;
    --bg-card: #1a1f3a;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-primary: #00f0ff;
    --accent-secondary: #a855f7;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success: #10b981;
    --shadow: rgba(0, 240, 255, 0.2);
    --glow: rgba(0, 240, 255, 0.4);
}

[data-theme="light"] {
    --bg-primary: #f0f4ff;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --shadow: rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
    position: relative;
    overflow-x: hidden;
}

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

/* Mountains Silhouette */
.mountains-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.3;
}

.mountains {
    width: 100%;
    height: 100%;
    color: var(--text-primary);
    filter: blur(2px);
}

[data-theme="light"] .mountains {
    opacity: 0.15;
    color: #1e293b;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] nav {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

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

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

.nav-buttons {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.resume-btn {
    background: var(--accent-gradient);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    display: inline-block;
}

.resume-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--shadow);
}

.theme-toggle {
    background: var(--bg-card);
    border: none;
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

section {
    min-height: 100vh;
    padding: 6rem 2rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.home-section {
    position: relative;
    overflow: hidden;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

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

[data-theme="light"] .star {
    background: rgba(255, 255, 255, 0.8);
    opacity: 0.5;
}

.home-content {
    text-align: center;
    position: relative;
    z-index: 3;
}

.profile-photo {
    width: 280px;
    height: 350px;
    border-radius: 25px;
    object-fit: cover;
    border: 4px solid var(--accent-primary);
    margin-bottom: 2rem;
    box-shadow: 0 0 40px var(--shadow);
}

[data-theme="light"] .profile-photo {
    border: 4px solid rgba(59, 130, 246, 0.5);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
}

h1 {
    font-family: 'Fira Code', monospace;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-height: 80px;
}

[data-theme="light"] h1 {
    background: linear-gradient(135deg, #1e40af, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* New Highlight Box Styles */
.highlight-box {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 2px solid;
    border-image: linear-gradient(135deg, #00f0ff, #a855f7) 1;
    border-radius: 15px;
    padding: 1.5rem 2rem;
    margin: 2rem auto;
    max-width: 600px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 240, 255, 0.2);
    animation: highlightGlow 3s ease-in-out infinite;
}

[data-theme="light"] .highlight-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-image: linear-gradient(135deg, #3b82f6, #8b5cf6) 1;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
}

@keyframes highlightGlow {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(0, 240, 255, 0.2);
    }
    50% {
        box-shadow: 0 8px 40px rgba(0, 240, 255, 0.4);
    }
}

.highlight-line {
    font-family: 'Fira Code', monospace;
    font-size: 1.3rem;
    line-height: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.code-symbol {
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 1.5rem;
    opacity: 0.7;
}

[data-theme="light"] .code-symbol {
    color: #3b82f6;
}

.gradient-text {
    background: linear-gradient(135deg, #00f0ff 0%, #a855f7 50%, #00f0ff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    font-weight: 700;
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
}

[data-theme="light"] .gradient-text {
    background: linear-gradient(135deg, #1e40af 0%, #7c3aed 50%, #1e40af 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: var(--accent-primary);
    margin-left: 5px;
    animation: blink 1s infinite;
}

[data-theme="light"] .typing-cursor {
    background-color: #1e40af;
}

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

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.3s;
    border: 2px solid transparent;
}

[data-theme="light"] .social-link {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.social-link:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px var(--shadow);
}

.about-section, .contact-section {
    background: rgba(15, 20, 32, 0.5);
}

[data-theme="light"] .about-section,
[data-theme="light"] .contact-section {
    background: rgba(255, 255, 255, 0.5);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.about-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 240, 255, 0.2);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .about-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow);
}

.about-card h3 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

[data-theme="light"] .about-card h3 {
    color: #3b82f6;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.skill-tag {
    background: rgba(0, 217, 255, 0.1);
    color: var(--accent-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

[data-theme="light"] .skill-tag {
    background: rgba(59, 130, 246, 0.15);
    color: #1e40af;
}

.tech-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
    align-items: center;
}

.tech-icon {
    font-size: 2.2rem;
    transition: all 0.3s;
    filter: grayscale(20%);
}

.tech-icon:hover {
    transform: scale(1.3) translateY(-5px);
    filter: grayscale(0%) drop-shadow(0 0 10px var(--glow));
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 240, 255, 0.15);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .project-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gradient);
}

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

.project-badge {
    background: var(--success);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.project-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    text-decoration: none;
    margin-top: 1rem;
    transition: gap 0.3s;
    font-weight: 600;
}

[data-theme="light"] .project-link {
    color: #3b82f6;
}

.project-link:hover {
    gap: 1rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 3rem auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.3s;
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

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

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

.submit-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 30px;
    background: var(--accent-gradient);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
}

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

.success-message {
    display: none;
    background: var(--success);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    text-align: center;
}

.success-message.show {
    display: block;
    animation: slideIn 0.5s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* QR Code Section */
.qr-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid var(--accent-primary);
    text-align: center;
    box-shadow: 0 10px 40px var(--shadow);
}

[data-theme="light"] .qr-card {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #3b82f6;
}

.qr-card h3 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

[data-theme="light"] .qr-card h3 {
    color: #3b82f6;
}

#qrcode {
    margin: 1.5rem auto;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    display: inline-block;
}

.qr-hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.page-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-intro {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Chatbot Styles */
#chatbot-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
}

.chatbot-toggle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 30px var(--shadow);
    transition: all 0.3s;
    position: relative;
    overflow: visible;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 40px var(--glow);
}

.chatbot-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.avatar-emoji {
    font-size: 2rem;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.chatbot-badge {
    position: absolute;
    top: -10px;
    left: -130px; 
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap;
    box-shadow: 0 4px 15px var(--shadow);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.chatbot-window {
    position: fixed;  
    bottom: 110px;    
    right: 2rem;      
    width: 400px;
    max-width: calc(100vw - 4rem); 
    height: 600px;
    max-height: calc(100vh - 140px);  
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid var(--accent-primary);
}

[data-theme="light"] .chatbot-window {
    background: white;
    border: 2px solid #3b82f6;
}

.chatbot-window.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header {
    background: var(--accent-gradient);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chatbot-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.chatbot-header h4 {
    margin: 0;
    font-size: 1rem;
}

.chatbot-status {
    font-size: 0.8rem;
    opacity: 0.9;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    gap: 0.75rem;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.message-content {
    flex: 1;
}

.message-content p {
    background: rgba(0, 240, 255, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 15px;
    margin: 0;
    line-height: 1.5;
}

[data-theme="light"] .message-content p {
    background: rgba(59, 130, 246, 0.1);
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: var(--accent-secondary);
}

.user-message .message-content p {
    background: var(--accent-gradient);
    color: white;
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.quick-reply {
    background: var(--bg-card);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

[data-theme="light"] .quick-reply {
    background: white;
    border: 1px solid #3b82f6;
    color: #3b82f6;
}

.quick-reply:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
}

[data-theme="light"] .quick-reply:hover {
    background: #3b82f6;
}

.typing-indicator {
    display: flex;
    gap: 0.3rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 240, 255, 0.1);
    border-radius: 15px;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.chatbot-input-container {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .chatbot-input-container {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

#chatbot-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    font-family: inherit;
}

[data-theme="light"] #chatbot-input {
    background: rgba(0, 0, 0, 0.05);
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

#chatbot-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.chatbot-send:hover {
    background: var(--accent-secondary);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    nav ul {
        gap: 1rem;
    }

    .nav-buttons {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

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

    .profile-photo {
        width: 220px;
        height: 280px;
    }

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

    .highlight-box {
        padding: 1rem 1.5rem;
        margin: 1.5rem auto;
    }

    .highlight-line {
        font-size: 1rem;
        flex-wrap: wrap;
    }

    .code-symbol {
        font-size: 1.2rem;
    }

    .chatbot-window {
        width: calc(100vw - 2rem);  
        right: 1rem;               
        bottom: 90px;              
        height: 500px;             
    }

    .chatbot-badge {
        display: none;
    }

    #chatbot-container {
        bottom: 1rem;
        right: 1rem;
    }
    
    .chatbot-toggle {
        width: 60px;              
        height: 60px;            
    }
    
    .avatar-emoji {
        font-size: 1.8rem;        
    }
}