:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --accent: #00d4aa;
    --accent-light: #4fffcf;
    --accent-dim: #00d4aa22;
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b0;
    --text-bright: #ffffff;
    --border: #2a2a3a;
    --gradient-1: linear-gradient(135deg, #00d4aa 0%, #00a3ff 100%);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Outfit', sans-serif; background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; }

.bg-grid {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 50px 50px; opacity: 0.2; z-index: -1;
}
.glow-orb {
    position: fixed; width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
    filter: blur(80px); z-index: -1; animation: float 20s ease-in-out infinite;
}
.glow-orb.orb-1 { top: -200px; right: -200px; }
.glow-orb.orb-2 { bottom: -200px; left: -200px; animation-delay: -10s; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, 30px); } }

.container { max-width: 1400px; margin: 0 auto; padding: 2rem; display: grid; grid-template-columns: 350px 1fr; gap: 2rem; }
@media (max-width: 1024px) { .container { grid-template-columns: 1fr; } }

.sidebar { position: sticky; top: 2rem; height: fit-content; display: flex; flex-direction: column; gap: 1.5rem; }
.profile-card, .hobbies-card, .education-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 1.5rem; }
.profile-card { text-align: center; padding: 2rem; }
.profile-avatar { width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--accent); object-fit: cover;  margin-bottom: 1rem; box-shadow: 0 0 20px rgba(0, 212, 255, 0.3); }
.profile-name { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-bright); }
.profile-title { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1rem; }
.profile-university { color: var(--accent-light); font-size: 0.85rem; padding: 0.5rem 1rem; background: var(--accent-dim); border-radius: 20px; display: inline-block; margin-bottom: 1.5rem; }
.profile-link svg { fill: var(--text-secondary); transition: fill 0.3s ease, transform 0.3s ease;}
.profile-link:hover svg { fill: var(--accent-light); transform: scale(1.1);}
.profile-links { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; }
.profile-link { width: 40px; height: 40px; border-radius: 10px; background: var(--bg-secondary); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); text-decoration: none; transition: all 0.3s ease; font-size: 1.2rem; }
.profile-link:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.stat-item { text-align: center; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--accent-light); }
.stat-label { font-size: 0.75rem; color: var(--text-secondary); }

.card-title { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; color: var(--text-bright); display: flex; align-items: center; gap: 0.5rem; }
.hobbies-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hobby-tag { display: flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.8rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 20px; font-size: 0.8rem; color: var(--text-secondary); transition: all 0.3s ease; }
.hobby-tag:hover { border-color: var(--accent); color: var(--accent-light); }
.education-list { display: flex; flex-direction: column; gap: 1rem; }
.edu-item { padding-left: 1rem; border-left: 2px solid var(--border); transition: border-color 0.3s ease; }
.edu-item:hover { border-left-color: var(--accent); }
.edu-degree { font-size: 0.85rem; font-weight: 600; color: var(--text-bright); margin-bottom: 0.2rem; }
.edu-school { font-size: 0.8rem; color: var(--text-secondary); }
.edu-status { font-size: 0.7rem; color: var(--accent-light); margin-top: 0.2rem; }

.main-content { display: flex; flex-direction: column; gap: 2rem; }
.section-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; color: var(--text-bright); }
.section-title::before { content: ''; width: 4px; height: 20px; background: var(--gradient-1); border-radius: 2px; }

.timeline-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.timeline-tab { padding: 0.5rem 1rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 20px; color: var(--text-secondary); cursor: pointer; font-family: inherit; font-size: 0.85rem; transition: all 0.3s ease; }
.timeline-tab:hover, .timeline-tab.active { border-color: var(--accent); color: var(--accent-light); background: var(--accent-dim); }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.project-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; transition: all 0.3s ease; cursor: pointer; text-decoration: none; color: inherit; }
.project-card:hover { border-color: var(--accent); transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0, 212, 170, 0.1); }
.project-icon { width: 50px; height: 50px; border-radius: 12px; background: var(--gradient-1); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1rem; }
.project-name { font-weight: 600; margin-bottom: 0.5rem; color: var(--text-bright); }
.project-desc { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.5; margin-bottom: 1rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { font-size: 0.7rem; padding: 0.25rem 0.75rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 20px; color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; }
.empty-state { text-align: center; padding: 2rem; color: var(--text-secondary); }

.chatbot-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; display: flex; flex-direction: column; height: 500px; overflow: hidden; }
.chat-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 1rem; }
.chat-status { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.chat-title { font-weight: 600; color: var(--text-bright); }
.chat-subtitle { font-size: 0.8rem; color: var(--text-secondary); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.message { max-width: 80%; padding: 1rem 1.25rem; border-radius: 16px; line-height: 1.6; font-size: 0.9rem; }
.message.bot { background: var(--bg-secondary); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; color: var(--text-primary); }
.message.bot strong { color: var(--accent-light); font-weight: 600; }
.message.user { background: var(--gradient-1); color: var(--bg-primary); align-self: flex-end; border-bottom-right-radius: 4px; font-weight: 500; }
.message.loading { display: flex; gap: 0.5rem; }
.message.loading span { width: 8px; height: 8px; background: var(--text-secondary); border-radius: 50%; animation: bounce 1.4s infinite ease-in-out; }
.message.loading span:nth-child(1) { animation-delay: -0.32s; }
.message.loading span:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }
.chat-input-container { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: 1rem; }
.chat-input { flex: 1; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem 1rem; color: var(--text-primary); font-family: inherit; font-size: 0.9rem; outline: none; }
.chat-input:focus { border-color: var(--accent); }
.chat-input::placeholder { color: var(--text-secondary); }
.chat-send { width: 48px; height: 48px; border-radius: 12px; background: var(--gradient-1); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: transform 0.3s ease; }
.chat-send:hover { transform: scale(1.05); }
.quick-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 1.5rem 1rem; }
.quick-btn { font-size: 0.75rem; padding: 0.5rem 1rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 20px; color: var(--text-secondary); cursor: pointer; transition: all 0.3s ease; font-family: inherit; }
.quick-btn:hover { border-color: var(--accent); color: var(--accent-light); }

.downloads-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; }
.download-item { display: flex; align-items: center; justify-content: space-between; padding: 1rem; background: var(--bg-secondary); border-radius: 12px; margin-bottom: 0.75rem; }
.download-item:last-child { margin-bottom: 0; }
.download-info { display: flex; align-items: center; gap: 1rem; }
.download-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-dim); display: flex; align-items: center; justify-content: center; color: var(--accent-light); }
.download-name { font-weight: 500; font-size: 0.9rem; color: var(--text-bright); }
.download-size { font-size: 0.75rem; color: var(--text-secondary); }
.download-btn { padding: 0.5rem 1rem; background: transparent; border: 1px solid var(--accent); border-radius: 8px; color: var(--accent-light); font-family: inherit; font-size: 0.8rem; cursor: pointer; text-decoration: none; transition: all 0.3s ease; }
.download-btn:hover { background: var(--accent); color: var(--bg-primary); }

/* AI Hero Section Styles */
.ai-hero-section { margin-bottom: 2rem; }
.ai-hero-section .chatbot-container {
    border: 2px solid var(--accent);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.2), 0 0 60px rgba(0, 212, 255, 0.1);
}

/* Animated Entrance */
.animated-entrance {
    animation: slideInUp 0.8s ease-out, glowPulse 2s ease-in-out infinite;
}
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(0, 212, 255, 0.2), 0 0 60px rgba(0, 212, 255, 0.1); }
    50% { box-shadow: 0 0 40px rgba(0, 212, 255, 0.3), 0 0 80px rgba(0, 212, 255, 0.15); }
}

/* Pulse Animation for Status */
.chat-status.pulse {
    animation: statusPulse 1.5s ease-in-out infinite;
}
@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

/* Typewriter Cursor */
.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--accent);
    margin-left: 2px;
    animation: blink 0.8s infinite;
    vertical-align: text-bottom;
}
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Welcome Emoji Pop */
.emoji-pop {
    display: inline-block;
    animation: emojiPop 0.6s ease-out;
}
@keyframes emojiPop {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.3) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Language badge for GitHub repos */
.project-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}
.lang-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    color: white;
    font-weight: 600;
}

.repo-name {
    color: var(--accent-light);
    font-weight: 600;
    font-size: 0.95rem;
}

.repo-lang {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    color: white;
}

.repo-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.repo-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
@media (max-width: 768px) { .container { padding: 1rem; } .sidebar { position: relative; top: 0; } .chatbot-container { height: 400px; } .message { max-width: 90%; } }

/* AI hero row: chatbot on the left, external site links stacked on the right.
   The two link cards size themselves from their images' real aspect ratio
   (no cropping); the chatbot panel then stretches to match their combined
   height instead of using a fixed height. */
.hero-row { display: flex; gap: 1.5rem; align-items: stretch; }
.hero-row .chatbot-container { flex: 1 1 50%; min-width: 0; height: auto; }
.hero-links-col {
    flex: 1 1 50%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-self: flex-start; /* size to content (the images) instead of being stretched */
}

.hero-link-card {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: var(--bg-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.hero-link-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 20px 40px rgba(0, 212, 170, 0.15); }
.hero-link-media { width: 100%; line-height: 0; }
.hero-link-media img { width: 100%; height: auto; display: block; }
.hero-link-caption { padding: 0.6rem 1rem; background: var(--bg-secondary); border-top: 1px solid var(--border); text-align: center; font-weight: 600; font-size: 0.9rem; color: var(--text-bright); }

@media (max-width: 1024px) {
    .hero-row { flex-direction: column; }
    .hero-row .chatbot-container { height: 500px; } /* back to a fixed height once it's no longer sharing a row with the images */
    .hero-links-col { flex-direction: column; align-self: stretch; }
}
@media (max-width: 768px) {
    .hero-row .chatbot-container { height: 400px; }
}

/* Contact Modal — previously missing, which is why the "Contact Eren" form never appeared */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 5, 10, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.active { display: flex; }

.contact-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalPop 0.25s ease-out;
}
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 1rem; right: 1rem;
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.modal-close:hover { border-color: var(--accent); color: var(--accent-light); }

.modal-title { font-size: 1.3rem; font-weight: 700; color: var(--text-bright); margin-bottom: 1.5rem; }

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.4rem; }
.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { min-height: 120px; resize: vertical; }

.file-upload {
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.file-upload:hover { border-color: var(--accent); }
.file-upload input[type="file"] { display: none; }
.file-upload-text { font-size: 0.8rem; color: var(--text-secondary); }
.file-upload-text small { display: block; margin-top: 0.25rem; color: var(--text-secondary); opacity: 0.7; }
.file-name { margin-top: 0.5rem; font-size: 0.8rem; color: var(--accent-light); word-break: break-all; }

.submit-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 10px;
    color: var(--bg-primary);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.submit-btn:hover { transform: translateY(-2px); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.form-status { margin-top: 1rem; font-size: 0.85rem; text-align: center; min-height: 1.2em; }
.form-status.success { color: var(--accent-light); }
.form-status.error { color: #ff6b6b; }
