@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
    --primary-blue: #2563eb;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-white: #ffffff;
    --bg-gray-50: #f9fafb;
    --bg-gray-100: #f3f4f6;
    --border-gray: #e5e7eb;
    --accent-yellow: #fbbf24;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gray-50);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Subtle pixel art background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 50px 50px, rgba(37, 99, 235, 0.03) 1px, transparent 0),
        radial-gradient(circle at 150px 150px, rgba(251, 191, 36, 0.02) 1px, transparent 0);
    background-size: 100px 100px, 200px 200px;
    pointer-events: none;
    z-index: -1;
}

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

/* Clean header */
header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-gray);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -8px;
    width: 6px;
    height: 6px;
    background: var(--accent-yellow);
    border-radius: 1px;
}

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

.nav-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 400;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
    position: relative;
}

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

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-blue);
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
    padding: 4px;
    background: var(--bg-gray-100);
    border-radius: 6px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-gray);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.lang-btn:hover,
.lang-btn.active {
    background: var(--bg-white);
    color: var(--text-dark);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Main content */
main {
    padding: 3rem 0;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Chat interface - professional style */
.chat-container {
    background: var(--bg-white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    max-width: 800px;
    margin: 2rem auto;
    height: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chat-header {
    background: var(--bg-gray-50);
    border-bottom: 1px solid var(--border-gray);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    color: white;
    position: relative;
}

.chat-avatar::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 6px;
    height: 6px;
    background: var(--accent-yellow);
    border-radius: 1px;
}

.chat-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.status {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: var(--bg-white);
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.message-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-blue);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: white;
}

.message.user {
    flex-direction: row-reverse;
}

.message-content {
    background: var(--bg-gray-50);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    max-width: 70%;
    word-wrap: break-word;
    color: var(--text-dark);
}

.message.user .message-content {
    background: var(--primary-blue);
    color: white;
}

.chat-input-container {
    padding: 1.5rem;
    border-top: 1px solid var(--border-gray);
    background: var(--bg-gray-50);
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    background: var(--bg-white);
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.send-btn {
    background: var(--primary-blue);
    border: none;
    border-radius: 8px;
    width: 48px;
    height: 48px;
    cursor: pointer;
    color: white;
    font-weight: 500;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    background: #1d4ed8;
}

/* Content sections */
.content-section {
    background: var(--bg-white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.content-section h1 {
    color: var(--text-dark);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
}

.content-section h2 {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
}

/* Pixel art decorations for headings */
.content-section h2::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--accent-yellow);
    border-radius: 1px;
}

.skill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.skill-item {
    background: var(--bg-gray-50);
    border: 1px solid var(--border-gray);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    color: var(--text-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    max-width: 100%;
}

.skill-item:hover {
    background: var(--bg-gray-100);
    transform: translateY(-1px);
}

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

.project-card {
    background: var(--bg-white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(0, 0, 0, 0.1);
}

.project-card h3 {
    color: var(--text-dark);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-card p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* Contact grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-item {
    background: var(--bg-gray-50);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-gray);
}

.contact-item h3 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--text-gray);
    font-family: 'JetBrains Mono', monospace;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    .chat-container {
        margin: 1rem;
        height: 500px;
    }

    .content-section {
        padding: 1.5rem;
        margin: 1rem 0;
    }

    .language-switcher {
        margin-left: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        display: none;
    }

    .logo {
        font-size: 1.25rem;
    }
}

/* Add spacing specifically for paragraphs inside the CV experience block to improve readability */
#cv [data-key="cv_exp_desc"] p {
    margin-bottom: 1rem;
}


/* === Responsive adjustments === */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 1rem;
    position: absolute;
    top: 60px;
    right: 20px;
    background: var(--bg-white);
    padding: 1rem;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 999;
  }
  .nav-links.active {
    display: flex;
  }
  .hamburger {
    display: block;
    font-size: 1.75rem;
    cursor: pointer;
    user-select: none;
    background: none;
    border: none;
    color: var(--text-dark);
  }
  .project-grid,
  .contact-grid,
  .skill-grid {
    display: grid;
    grid-template-columns: 1fr !important;
  }
}
.hamburger { display: none; }
@media (max-width: 480px) {
  .container { padding: 0 12px; }
}
.page.active { overflow-y: auto; }
