/* CSS Variables for Dark Theme */
:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --accent: #ffa07a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --sidebar-width: 380px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-secondary);
    background: var(--bg-primary);
    min-height: 100vh;
}

/* Layout Wrapper */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
}

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

/* Header */
header {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* Tab Navigation */
.tab-navigation {
    background: var(--bg-secondary);
    padding: 0;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    overflow: hidden;
}

.tab-button {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.95rem;
    border-bottom: 3px solid transparent;
    flex: 1;
    min-width: 120px;
}

.tab-button:hover {
    background: rgba(255, 160, 122, 0.1);
    color: var(--accent);
}

.tab-button.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: rgba(255, 160, 122, 0.05);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

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

/* Content Sections */
.content-section {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 10px;
}

/* Typography */
h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

h3 {
    color: var(--accent);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

p {
    margin-bottom: 0.75rem;
}

/* Experience and Education Items */
.experience-item,
.education-item {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.date {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
}

ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.project-card {
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 160, 122, 0.2);
    color: var(--text-secondary);
    padding: 0;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(255, 160, 122, 0.2);
}

.project-media {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.project-media img,
.project-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-media img,
.project-card:hover .project-media video {
    transform: scale(1.05);
}

.project-video {
    cursor: pointer;
}

.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: var(--accent);
}

.project-content p {
    margin: 0.5rem 0;
    line-height: 1.5;
}

.tech-stack {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1rem !important;
    font-style: italic;
}

.project-links {
    margin-top: auto;
    padding-top: 1rem;
}

.project-links a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    transition: border-color 0.3s ease;
    margin-right: 1rem;
}

.project-links a:hover {
    border-bottom-color: var(--accent);
}

/* Interests - New Row Layout */
.interests-container {
    margin-top: 1.5rem;
}

.interest-row {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border-left: 3px solid var(--accent);
    transition: all 0.3s;
}

.interest-row:hover {
    background: rgba(255, 160, 122, 0.05);
    transform: translateX(5px);
}

.interest-image {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 160, 122, 0.3);
}

.interest-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.interest-content {
    flex: 1;
}

.interest-content h3 {
    margin-top: 0;
    color: var(--accent);
    font-size: 1.3rem;
}

.interest-content p {
    margin: 0.5rem 0 0 0;
    line-height: 1.6;
}

/* Persistent Chat Sidebar */
.chat-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 2px solid rgba(255, 160, 122, 0.2);
    display: flex;
    flex-direction: column;
}

.chat-sidebar-header {
    padding: 1.5rem;
    background: var(--bg-primary);
    border-bottom: 2px solid var(--accent);
}

.chat-sidebar-header h3 {
    margin: 0;
    color: var(--accent);
    font-size: 1.3rem;
}

/* Chat Container */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

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

.message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.4;
}

.user-message {
    background: var(--accent);
    color: #000;
    margin-left: auto;
    border-bottom-right-radius: 3px;
}

.bot-message {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-bottom-left-radius: 3px;
}

.typing-indicator {
    display: none;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: fit-content;
    margin: 0 1rem 1rem 1rem;
}

.typing-indicator.active {
    display: block;
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    margin: 0 2px;
    animation: typing 1.4s infinite;
}

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

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

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

.chat-input-container {
    padding: 1rem;
    background: var(--bg-primary);
    border-top: 1px solid rgba(255, 160, 122, 0.2);
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid rgba(255, 160, 122, 0.3);
    border-radius: 8px;
    outline: none;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.chat-input:focus {
    border-color: var(--accent);
}

.chat-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: rgba(128, 128, 128, 0.3);
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.send-button {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.send-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 160, 122, 0.4);
}

.send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    color: var(--text-muted);
    margin-top: 2rem;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 320px;
    }
}

@media (max-width: 768px) {
    .layout-wrapper {
        flex-direction: column;
    }

    .main-content {
        margin-right: 0;
    }

    .chat-sidebar {
        position: static;
        width: 100%;
        height: 500px;
        border-left: none;
        border-top: 2px solid rgba(255, 160, 122, 0.2);
        order: 2;
    }

    h1 {
        font-size: 1.75rem;
    }

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

    .tab-button {
        font-size: 0.85rem;
        padding: 0.85rem 1rem;
        min-width: 100px;
    }

    .interest-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .interest-image {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    header {
        padding: 1rem;
    }

    .content-section {
        padding: 1rem;
    }

    .tab-button {
        flex: none;
        min-width: auto;
        font-size: 0.8rem;
        padding: 0.75rem 0.85rem;
    }

    .interest-image {
        width: 100px;
        height: 100px;
    }

    .chat-sidebar {
        height: 400px;
    }
}
