:root {
    /* Standard Colors */
    --primary: #f59e0b; /* Amber 500 */
    --primary-dark: #d97706;
    --secondary: #10b981; /* Emerald 500 */
    --accent: #6366f1; /* Indigo 500 */

    /* Light Mode Variables (Default) */
    --bg-body: #ffffff;
    --bg-card: #f8fafc;
    --bg-nav: rgba(255, 255, 255, 0.8);
    --bg-footer: #0f172a;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-nav: rgba(15, 23, 42, 0.8);
    --bg-footer: #020617;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography Refinement */
h1, h2, h3 {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

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

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: 0.3s;
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-body);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--text-main);
    cursor: pointer;
}

.mobile-nav-links {
    list-style: none;
    text-align: center;
}

.mobile-nav-links li {
    margin: 1.5rem 0;
}

.mobile-nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: 800;
    transition: color 0.3s;
}

.mobile-nav-links a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    padding: 8rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.scrolling-text-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    margin: 1rem 0;
    padding: 0.5rem 0;
    background: rgba(245, 158, 11, 0.05);
}

.scrolling-text {
    display: inline-block;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--primary);
    letter-spacing: 0.2em;
    animation: scroll-left 20s linear infinite;
    padding-left: 100%;
}

@keyframes scroll-left {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

.subtitle {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1rem;
}

.description {
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: var(--text-muted);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary { background: var(--primary); color: #1e293b; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3); }
.btn-secondary { background: var(--bg-card); color: var(--text-main); border: 1px solid var(--border); }

/* Stats Bar */
.stats-bar {
    padding: 3rem 0;
    background: var(--bg-card);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Apps Section */
.apps { padding: 5rem 0; }

.app-showcase {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.app-tag {
    color: var(--secondary);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.app-features-list {
    display: grid;
    gap: 1.25rem;
    margin: 2rem 0;
}

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

.app-feature-item .icon { font-size: 1.5rem; }

.download-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.store-btn img {
    height: 40px;
    transition: transform 0.3s ease, filter 0.3s ease;
    border-radius: 8px;
}

.store-btn:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

[data-theme="dark"] .store-btn img {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.1);
}

.app-preview img {
    width: 100%;
    max-width: 320px;
    border-radius: 32px;
    box-shadow: var(--shadow);
    border: 8px solid var(--bg-card);
}

/* Web Projects Section */
.web-projects { padding: 5rem 0; background: var(--bg-card); }

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

.project-card {
    background: var(--bg-body);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.project-card:hover { transform: translateY(-5px); }

.project-image .placeholder-img {
    height: 150px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

/* Services */
.features { padding: 5rem 0; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2.5rem;
    background: var(--bg-card);
    border-radius: 24px;
    text-align: center;
    border: 1px solid var(--border);
}

.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }

/* Tech Stack Scroll */
.tech-stack {
    padding: 2rem 0;
    overflow: hidden;
    background: var(--bg-body);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.tech-track {
    display: flex;
    gap: 4rem;
    animation: tech-scroll 40s linear infinite;
    width: max-content;
}

.tech-track span {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-muted);
    opacity: 0.6;
}

@keyframes tech-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* About Section */
.about { padding: 5rem 0; background: var(--bg-card); }

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.developer-section {
    padding: 2rem;
    background: var(--bg-body);
    border-radius: 24px;
    border: 1px solid var(--border);
}

/* Testimonials */
.testimonials { padding: 5rem 0; }

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

.testimonial-card {
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    font-style: italic;
}

.user-info { margin-top: 1rem; font-style: normal; display: flex; flex-direction: column; }

/* Footer */
.footer {
    padding: 4rem 0;
    background: var(--bg-footer);
    color: #94a3b8;
    text-align: center;
}

.footer strong { color: #fff; }

.footer-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a { color: #94a3b8; text-decoration: none; font-size: 0.9rem; }

/* Responsive */
@media (max-width: 968px) {
    .app-showcase, .about-content { grid-template-columns: 1fr; text-align: center; }
    .hero-content h1 { font-size: 2.5rem; }
    .download-buttons { justify-content: center; }
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex; }
}

@media (max-width: 640px) {
    h2 { font-size: 2rem; }
    .nav-links { display: none; } /* Mobile menu needed */
}

/* Chatbot styles remain consistent but refined */
.chatbot-container { position: fixed; bottom: 20px; right: 20px; z-index: 2000; }
.chatbot-toggle {
    background: var(--primary);
    color: #1e1b4b;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    font-weight: 700;
}
.chatbot-window {
    display: none;
    flex-direction: column;
    width: 350px;
    height: 500px;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.chatbot-header { background: var(--primary); color: #1e1b4b; padding: 1rem; display: flex; justify-content: space-between; align-items: center; }
.chat-messages { flex: 1; padding: 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.75rem; }
.message { padding: 0.75rem 1rem; border-radius: 15px; max-width: 85%; font-size: 0.9rem; }
.bot-msg { background: var(--bg-card); align-self: flex-start; }
.user-msg { background: var(--primary); color: #1e1b4b; align-self: flex-end; }
.chat-input-area { padding: 1rem; display: flex; gap: 0.5rem; border-top: 1px solid var(--border); }
.chat-input-area input { flex: 1; border: 1px solid var(--border); padding: 0.5rem; border-radius: 10px; background: var(--bg-card); color: var(--text-main); }
