:root {
    --bg-color: #f3f4f6;
    --text-color: #111827;
    --accent-color: #2563eb;
    --secondary-text: #4b5563;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --font-main: 'Inter', sans-serif;
    --font-display: 'Playfair Display', serif;
}

.dark-mode {
    --bg-color: #0a0a0a;
    --text-color: #ffffff;
    --accent-color: #3b82f6;
    --secondary-text: #a1a1aa;
    --card-bg: #171717;
    --border-color: #262626;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Hide default cursor for custom one */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Custom Cursor */
.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-color);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--secondary-text);
}

a, button {
    cursor: none; /* Ensure links don't show default cursor */
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: rgba(243, 244, 246, 0.8);
    backdrop-filter: blur(10px);
}

.dark-mode header {
    background: rgba(10, 10, 10, 0.8);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent-color);
}

.theme-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.theme-btn:hover {
    transform: rotate(15deg);
}

/* Hamburger Menu (Hidden on Desktop) */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.reveal-text {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: reveal 0.8s forwards;
}

.reveal-text:nth-child(1) { animation-delay: 0.2s; }
.reveal-text:nth-child(2) { animation-delay: 0.4s; }
.reveal-text:nth-child(3) { animation-delay: 0.6s; }

@keyframes reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro-text {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.sub-hero {
    font-size: 1.2rem;
    color: var(--secondary-text);
    max-width: 600px;
    margin-bottom: 2rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

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

.btn.secondary {
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn:hover {
    transform: translateY(-3px);
}

/* Marquee */
.marquee-container {
    background: var(--accent-color);
    color: #fff;
    padding: 1rem 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.marquee-content {
    display: inline-block;
    animation: marquee 20s linear infinite;
    font-weight: 700;
    font-size: 1.2rem;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Sections */
.section-padding {
    padding: 6rem 5%;
}

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

.section-header h2 {
    font-family: var(--font-display);
    font-size: 3rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--secondary-text);
}

.cert-list {
    list-style: none;
}

.cert-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Experience Timeline */
.timeline {
    border-left: 2px solid var(--border-color);
    padding-left: 2rem;
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.6rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background: var(--accent-color);
    border-radius: 50%;
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

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

.timeline-content h4 {
    color: var(--secondary-text);
    margin-bottom: 1rem;
}

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

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

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
}

.tags span {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-top: 1rem;
}

/* Contact */
.contact-wrapper {
    text-align: center;
}

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

.contact-link {
    font-size: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.contact-link:hover {
    border-color: var(--accent-color);
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: var(--font-main);
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.3s, background-color 0.3s;
}

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

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.chat-window.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.chat-header {
    background-color: var(--accent-color);
    color: #fff;
    padding: 1rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.message {
    max-width: 80%;
    padding: 0.8rem;
    border-radius: 10px;
    font-size: 0.9rem;
}

.message.bot {
    background-color: var(--bg-color);
    color: var(--text-color);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.message.user {
    background-color: var(--accent-color);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

.chat-input-area input {
    flex: 1;
    padding: 0.8rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    outline: none;
}

.chat-input-area button {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 1.2rem;
    cursor: pointer;
}

footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-text);
}

/* Responsive */
@media (max-width: 768px) {
    /* General Adjustments */
    .section-padding {
        padding: 4rem 5%;
    }

    header {
        padding: 1rem 5%;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .sub-hero {
        font-size: 1rem;
    }

    /* Mobile Navigation */
    .hamburger {
        display: block;
        z-index: 101;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background: var(--bg-color);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        z-index: 100;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 2.5rem;
    }
    
    nav a {
        font-size: 1.2rem;
    }

    /* Layout Stacking */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Disable Custom Cursor on Touch */
    .cursor-dot, .cursor-outline {
        display: none;
    }
    
    * {
        cursor: auto;
    }

    .chat-window {
        width: 300px;
        height: 400px;
    }
}

@media (max-width: 480px) {
    .hero-btns {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        text-align: center;
        width: 100%;
    }

    .contact-links {
        flex-wrap: wrap;
        gap: 1rem;
    }
}