:root {
    --bg-color: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #555555;
    --accent: #000000;
    --surface-bg: #f5f5f5;
    --border-color: #e0e0e0;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Icon Colors */
    --color-mail: #EA4335;
    --color-linkedin: #0A66C2;
    --color-github: #24292F;
    --color-kaggle: #20BEFF;
    --color-medium: #000000;
}

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

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
}

#network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.app-layout {
    display: flex;
    width: 100%;
    height: 100dvh;
    position: relative;
    z-index: 10;
}

.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    padding: 2rem;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    animation: fadeIn 1s ease-out;
}

h1 {
    font-size: 3.5rem;
    font-weight: 600;
    letter-spacing: -0.05em;
    color: var(--accent);
}

h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.summary {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.summary strong {
    color: var(--text-main);
    font-weight: 600;
}

.social-links {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.social-links a {
    color: var(--text-muted);
    transition: var(--transition);
    display: inline-flex;
    padding: 0.5rem;
    border-radius: 50%;
    background: var(--surface-bg);
}

.social-links svg {
    width: 24px;
    height: 24px;
}

.social-links a.icon-mail:hover {
    color: #fff;
    background: var(--color-mail);
    transform: translateY(-5px);
}

.social-links a.icon-linkedin:hover {
    color: #fff;
    background: var(--color-linkedin);
    transform: translateY(-5px);
}

.social-links a.icon-github:hover {
    color: #fff;
    background: var(--color-github);
    transform: translateY(-5px);
}

.social-links a.icon-kaggle:hover {
    color: #fff;
    background: var(--color-kaggle);
    transform: translateY(-5px);
}

.social-links a.icon-medium:hover {
    color: #fff;
    background: var(--color-medium);
    transform: translateY(-5px);
}

/* Chat Sidebar */
.chat-sidebar {
    width: 0;
    background-color: var(--bg-color);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

body.chat-open .chat-sidebar {
    width: 400px;
}

body.chat-open .main-content {
    /* Flex container will automatically shrink main-content when sidebar expands */
}

.chat-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    min-width: 400px;
}

.chat-header span {
    font-weight: 600;
    font-size: 1rem;
}

.chat-header button {
    background: var(--surface-bg);
    border: none;
    color: var(--text-main);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.chat-header button:hover {
    background: var(--border-color);
}

.chat-header button svg {
    width: 18px;
    height: 18px;
}

.chat-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 400px;
    overflow: hidden;
}

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

.messages::-webkit-scrollbar {
    width: 6px;
}

.messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.message {
    max-width: 85%;
    padding: 1rem 1.25rem;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.6;
    animation: fadeIn 0.3s ease-out;
    word-break: break-word;
}

.message p {
    margin-bottom: 0.5rem;
}

.message p:last-child {
    margin-bottom: 0;
}

.message ul, .message ol {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.message li {
    margin-bottom: 0.25rem;
}

.message strong {
    font-weight: 600;
}

.message.user {
    align-self: flex-end;
    background-color: #f0f0f0;
    border-bottom-right-radius: 2px;
}

.message.assistant {
    align-self: flex-start;
    background-color: rgba(10, 102, 194, 0.1);
    color: #053b73;
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(10, 102, 194, 0.2);
}

.message.loading {
    align-self: flex-start;
    background: none;
    padding: 0.5rem;
    display: flex;
    gap: 4px;
}

.dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-muted);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
    animation-delay: -0.32s;
}

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

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

.chat-input input {
    flex: 1;
    background-color: var(--surface-bg);
    border: 1px solid transparent;
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 20px;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

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

.chat-input button {
    background-color: var(--accent);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.chat-input button:hover {
    transform: scale(1.05);
}

.chat-input button svg {
    width: 20px;
    height: 20px;
}

/* Floating Action Button for Chat */
.fab-chat {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--accent);
    color: #fff;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 20;
    transition: var(--transition);
}

.fab-chat:hover {
    transform: scale(1.1) translateY(-5px);
}

.fab-chat svg {
    width: 28px;
    height: 28px;
}

body.chat-open .fab-chat {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .hero {
        padding: 1.5rem;
        gap: 1rem;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .summary {
        font-size: 0.95rem;
    }

    body.chat-open .chat-sidebar {
        width: 100%;
        height: 100dvh;
        position: fixed;
        right: 0;
        top: 0;
        z-index: 100;
    }

    body.chat-open .main-content,
    body.chat-open #network-canvas {
        display: none;
    }

    .chat-header,
    .chat-body {
        min-width: 100%;
    }
}