:root {
    /* Light theme variables */
    --primary-color: #2563eb;
    --secondary-color: #3b82f6;
    --background-color: #ffffff;
    --text-color: #1f2937;
    --gray-light: #f3f4f6;
    --transition-speed: 0.3s;
}

/* Dark theme variables */
:root[data-theme="dark"] {
    --primary-color: #60a5fa;
    --secondary-color: #3b82f6;
    --background-color: #111827;
    --text-color: #f3f4f6;
    --gray-light: #1f2937;
    --home-gradient: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

/* System preference dark mode */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --primary-color: #60a5fa;
        --secondary-color: #3b82f6;
        --background-color: #111827;
        --text-color: #f3f4f6;
        --gray-light: #1f2937;
    }
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

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

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-brand-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-pic {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
    overflow: hidden;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    order: 2;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    order: 1;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 2rem;
    transition: color var(--transition-speed);
}

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

/* Section Styles */
.section {
    min-height: 100vh;
    padding: 6rem 0;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    position: relative;
}

/* Ensure main container handles section positioning */
main {
    position: relative;
    min-height: 100vh;
}

/* Home Section */
#home {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--home-gradient, linear-gradient(135deg, #f6f7f9 0%, #ffffff 100%));
}

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

.subtitle {
    font-size: 1.5rem;
    color: #4b5563;
    margin-bottom: 2rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-speed);
    margin: 0.5rem;
}

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

.btn.secondary {
    background-color: var(--gray-light);
    color: var(--text-color);
}

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

/* AI Interview Section */
.chat-interface {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    background: var(--background-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.chat-messages {
    flex: 1;
    padding: 2rem;
    padding-bottom: 100px; /* Space for floating input */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 60px; /* Height of navbar */
}

.chat-input {
    display: flex;
    padding: 1rem 1.5rem;
    background: var(--gray-light);
    gap: 1rem;
    width: calc(100% - 3rem);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    position: fixed;
    bottom: 1rem;
    left: 1.5rem;
    right: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.chat-input input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
    background: var(--background-color);
    color: var(--text-color);
}

.message {
    max-width: 80%;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    animation: fadeIn 0.3s ease-in-out;
    font-size: 1rem;
    line-height: 1.5;
}

.user-message {
    background: var(--primary-color);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.ai-message {
    background: var(--gray-light);
    color: var(--text-color);
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .chat-interface {
        height: 100vh;
    }

    .chat-messages {
        padding: 1rem;
        padding-bottom: 90px; /* Slightly less padding on mobile */
        margin-top: 60px;
    }

    .chat-input {
        padding: 0.8rem 1rem;
        width: calc(100% - 2rem);
        left: 1rem;
        right: 1rem;
        bottom: 0.8rem;
    }

    .message {
        max-width: 90%;
        font-size: 0.95rem;
    }
}

/* Dark mode adjustments */
[data-theme="dark"] .chat-input {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .chat-input input {
    background: var(--background-color);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

/* Dark theme adjustments */
[data-theme="dark"] .ai-message {
    background: var(--gray-light);
    color: var(--text-color);
}

[data-theme="dark"] .user-message {
    background: var(--primary-color);
    color: white;
}

/* Tablet and larger screens */
@media (min-width: 769px) {
    .chat-messages {
        padding: 2rem;
    }

    .chat-input {
        padding: 1.5rem;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .chat-messages {
        padding: 2rem 3rem;
    }

    .chat-input {
        padding: 1.5rem 3rem;
    }
}

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

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    transition: border-color var(--transition-speed);
}

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

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

/* Footer */
footer {
    background: var(--gray-light);
    padding: 2rem 0;
    text-align: center;
}

.social-links {
    margin-bottom: 1rem;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    margin: 0 0.5rem;
    transition: color var(--transition-speed);
}

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

/* Mobile Navigation */
.nav-toggle {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        padding: 1rem;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        margin: 0.5rem 0;
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
        padding: 0.5rem;
    }

    .nav-toggle {
        display: block;
    }

    /* Hamburger animation */
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* Improve section padding for mobile */
    .section {
        padding: 4rem 1rem;
    }

    /* Adjust project grid for mobile */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Tablet specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .btn:hover {
        transform: none;
    }

    .nav-links a:hover {
        background-color: var(--gray-light);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.5rem 1rem;
    background-color: var(--gray-light);
    border-radius: 12px;
    width: fit-content;
    margin: 0.5rem 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: var(--text-color);
    border-radius: 50%;
    opacity: 0.4;
    animation: typing 1s infinite;
}

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

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

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

/* Theme toggle button styles */
.theme-toggle {
    background: transparent;
    color: var(--text-color);
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.theme-toggle:hover {
    background-color: var(--gray-light);
}

.theme-toggle i {
    font-size: 1.2rem;
}

/* Dark mode specific adjustments */
[data-theme="dark"] {
    background-color: var(--background-color);
}

[data-theme="dark"] .navbar {
    background: rgba(17, 24, 39, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .section {
    background-color: var(--background-color);
}

[data-theme="dark"] #home {
    background: var(--home-gradient);
}

[data-theme="dark"] .subtitle {
    color: #9ca3af;
}

/* Resume section specific styles */
#resume .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

#resume .resume-content {
    width: 100%;
    background: var(--background-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

#resume img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Dark mode adjustments for resume */
[data-theme="dark"] #resume .resume-content {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Mobile adjustments for resume */
@media (max-width: 768px) {
    #resume .container {
        padding: 1rem;
    }
    
    #resume .resume-content {
        padding: 1rem;
        border-radius: 0;
        box-shadow: none;
    }
}

.profile-pic img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover;
}

.project-card {
    display: block;
    text-decoration: none;
    background: var(--background-color);
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.project-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.project-card p {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.project-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
    font-size: 0.9rem;
    color: #666;
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.project-meta i {
    font-size: 0.8rem;
}

.error-message {
    text-align: center;
    padding: 2rem;
    color: #ef4444;
    background: #fee2e2;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Dark mode adjustments */
[data-theme="dark"] .project-card {
    border-color: #374151;
    background: var(--gray-light);
}

[data-theme="dark"] .project-meta {
    color: #9ca3af;
}

[data-theme="dark"] .error-message {
    background: #7f1d1d;
    color: #fecaca;
}

#resume .resume-header {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 2rem;
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: 8px;
}

#resume .contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#resume .contact-info a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#resume .skills-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

#resume .experience-item {
    margin-bottom: 2rem;
}

#resume .experience-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

#resume .experience-item .date {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

#resume .experience-item ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #resume .resume-header {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem;
    }

    #resume .container {
        padding: 0;
    }

    #resume .resume-content {
        padding: 1rem;
    }
}

/* Dark theme adjustments */
[data-theme="dark"] #resume .experience-item h3 {
    color: var(--primary-color);
}

[data-theme="dark"] #resume .experience-item .date {
    color: var(--text-color);
    opacity: 0.7;
}

/* Resume Image Viewer Styles */
#resume-image-viewer body, #resume-image-viewer {
    font-family: Arial, sans-serif;
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
}
#resume-image-viewer .container {
    max-width: 800px;
    margin: 20px auto;
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
#resume-image-viewer img {
    max-width: 800px;
    width: 100%;
    height: auto;
    display: block;
}
@media (max-width: 900px) {
    #resume-image-viewer .container {
        max-width: 100%;
        padding: 10px;
    }
    #resume-image-viewer img {
        max-width: 100%;
    }
}

.loading-dots {
    display: inline-block;
    position: relative;
    color: var(--text-color);
    font-style: italic;
}

.loading-dots::after {
    content: '...';
    position: absolute;
    animation: loadingDots 1.5s infinite;
    width: 1em;
    text-align: left;
    margin-left: 0.2em;
}

@keyframes loadingDots {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
    100% { content: '.'; }
}

.message.loading {
    opacity: 0.8;
    background: var(--gray-light);
    border: 1px solid var(--primary-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.8; }
    50% { opacity: 0.6; }
    100% { opacity: 0.8; }
}

.message.loading p {
    font-style: italic;
    color: var(--text-color);
} 