/* ============================================
   Portfolio Layout Styles
   ============================================ */

/* L Silhouette Background - Death Note Theme */
.l-background {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 500px;
    height: 600px;
    background-image: url('/l-silhouette.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom right;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

/* Multiple L letters floating effect - Death Note Gothic Style */
.l-letters-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.l-letters-bg::before {
    content: 'L';
    position: absolute;
    top: 10%;
    left: 5%;
    font-family: 'UnifrakturMaguntia', 'Old English Text MT', serif;
    font-size: 450px;
    color: rgba(139, 0, 0, 0.04);
    transform: rotate(-10deg);
}

.l-letters-bg::after {
    content: 'L';
    position: absolute;
    bottom: 5%;
    right: 5%;
    font-family: 'UnifrakturMaguntia', 'Old English Text MT', serif;
    font-size: 550px;
    color: rgba(139, 0, 0, 0.05);
    transform: rotate(5deg);
}

/* Navigation */
.portfolio-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 40px;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.l-icon-small {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-typewriter);
    font-size: 20px;
    color: var(--accent-red-bright);
    border: 2px solid var(--accent-red);
    border-radius: 4px;
    background: var(--bg-secondary);
}

.nav-name {
    font-family: var(--font-typewriter);
    font-size: 1.1rem;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-red-bright);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-red);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 5px;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu a:hover {
    color: var(--accent-red-bright);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 60px 60px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 700px;
}

.hero-badge {
    display: inline-block;
    background: rgba(139, 0, 0, 0.2);
    color: var(--accent-red-bright);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    border: 1px solid var(--accent-red);
}

.hero-title {
    font-family: var(--font-typewriter);
    font-size: 3.5rem;
    color: var(--text-primary);
    letter-spacing: 4px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-style: italic;
    border-left: 3px solid var(--accent-red);
    padding-left: 15px;
}

.hero-description {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.hero-stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-typewriter);
    font-size: 2rem;
    color: var(--accent-red-bright);
}

.stat-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-cta {
    display: flex;
    gap: 20px;
}

.cta-primary {
    background: var(--accent-red);
    color: white;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-red);
}

.cta-primary:hover {
    background: transparent;
    color: var(--accent-red-bright);
    box-shadow: 0 0 20px var(--accent-red-glow);
}

.cta-secondary {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: var(--text-secondary);
    padding: 14px 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.cta-secondary:hover {
    border-color: var(--accent-red);
    color: var(--accent-red-bright);
}

.hero-visual {
    position: relative;
}

.l-icon-large {
    font-family: var(--font-typewriter);
    font-size: 250px;
    color: rgba(139, 0, 0, 0.1);
    animation: pulse-glow 3s infinite;
}

/* Portfolio Sections */
.portfolio-section {
    padding: 100px 60px;
    position: relative;
    z-index: 1;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-typewriter);
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.title-accent {
    color: var(--accent-red-bright);
    font-size: 1.2rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
    margin-left: 20px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    align-items: start;
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-text strong {
    color: var(--accent-red-bright);
}

.about-text em {
    color: var(--text-muted);
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-typewriter);
    font-size: 20px;
    color: var(--accent-red-bright);
    border: 2px solid var(--accent-red);
    border-radius: 4px;
}

.card-header h3 {
    font-family: var(--font-typewriter);
    font-size: 0.9rem;
    color: var(--accent-red-bright);
    letter-spacing: 2px;
}

.card-content {
    padding: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.info-row .value {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.status-online {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #00ff00;
}

.status-online .dot {
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    animation: blink 2s infinite;
}

/* Timeline / Experience */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 40px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -34px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--accent-red);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.timeline-header h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
}

.timeline-company {
    color: var(--accent-red-bright);
    font-size: 0.9rem;
}

.timeline-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 15px;
    display: block;
}

.timeline-details {
    list-style: none;
    padding: 0;
}

.timeline-details li {
    color: var(--text-secondary);
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.timeline-details li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent-red);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-red-bright);
    font-size: 1rem;
    margin-bottom: 20px;
}

.skill-category h3 svg {
    fill: var(--accent-red-bright);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    border-color: var(--accent-red);
    color: var(--accent-red-bright);
    transform: translateY(-2px);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: var(--accent-red);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.2);
}

.project-card.featured {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--bg-card), rgba(139, 0, 0, 0.1));
    border-color: var(--accent-red);
}

.project-header {
    margin-bottom: 15px;
}

.project-label {
    display: inline-block;
    color: var(--accent-red-bright);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.project-header h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.project-tech span {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.project-stats {
    display: flex;
    gap: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.project-stat {
    text-align: center;
}

.project-stat .stat-value {
    display: block;
    font-family: var(--font-typewriter);
    font-size: 1.5rem;
    color: var(--accent-red-bright);
}

.project-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Publications Section */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.publication-card {
    display: flex;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
}

.publication-card:hover {
    border-color: var(--accent-red);
    transform: translateY(-3px);
}

.publication-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 0, 0, 0.1);
    border-radius: 10px;
}

.publication-icon svg {
    fill: var(--accent-red-bright);
}

.publication-content h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.publication-venue {
    color: var(--accent-red-bright);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.publication-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Education Section */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.education-card {
    display: flex;
    gap: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.education-card:hover {
    border-color: var(--accent-red);
}

.education-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 0, 0, 0.1);
    border-radius: 10px;
}

.education-icon svg {
    fill: var(--accent-red-bright);
}

.education-content h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 5px;
}

.education-school {
    color: var(--accent-red-bright);
    font-size: 0.9rem;
}

.education-date {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 5px;
}

.certifications-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.certifications-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.certification-tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.certification-tag:hover {
    border-color: var(--accent-red);
    color: var(--accent-red-bright);
}

/* Comments Section */
.comments-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.comment-form-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
}

.comment-intro {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.6;
}

.comment-form .form-group {
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 15px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent-red);
}

.comment-form textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-comment-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-red);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-comment-btn:hover {
    background: var(--accent-red-bright);
    transform: translateY(-2px);
}

.submit-comment-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.comment-status {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.comment-status.success {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.comment-status.error {
    background: rgba(255, 0, 0, 0.1);
    color: #ff6b6b;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.comments-list-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    max-height: 500px;
    overflow-y: auto;
}

.comments-list-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    border-left: 3px solid var(--accent-red);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author {
    color: var(--accent-red-bright);
    font-weight: 500;
    font-size: 0.95rem;
}

.comment-date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.comment-body {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

.loading-comments,
.no-comments {
    color: var(--text-muted);
    text-align: center;
    padding: 30px;
    font-style: italic;
}

@media (max-width: 900px) {
    .comments-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Contact Section */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 15px 25px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-link:hover {
    border-color: var(--accent-red);
    color: var(--accent-red-bright);
    transform: translateY(-3px);
}

.contact-link.consultation-link {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.15), rgba(139, 0, 0, 0.1));
    border-color: var(--accent-red);
    color: var(--accent-red-bright);
}

.contact-link.consultation-link:hover {
    background: var(--accent-red);
    color: white;
}

.contact-chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--accent-red);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-chat-btn:hover {
    background: var(--accent-red-bright);
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--accent-red-glow);
}

/* Footer */
.portfolio-footer {
    padding: 40px 60px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ============================================
   Floating Chat Button & Popup
   ============================================ */

/* Floating Action Button */
.chat-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-red-bright), var(--accent-red));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(139, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.chat-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(139, 0, 0, 0.6);
}

.chat-fab svg {
    fill: white;
}

.chat-fab .close-icon {
    display: none;
}

.chat-fab.active .chat-icon {
    display: none;
}

.chat-fab.active .close-icon {
    display: block;
}

.fab-tooltip {
    position: absolute;
    right: 70px;
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.chat-fab:hover .fab-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Chat Popup */
.chat-popup {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 400px;
    height: 550px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-popup.hidden {
    display: none;
}

.chat-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.popup-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.popup-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-red);
    color: white;
    font-family: var(--font-typewriter);
    font-size: 1.2rem;
    border-radius: 50%;
}

.popup-title h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0;
}

.popup-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.popup-status .status-dot {
    width: 6px;
    height: 6px;
    background: #00ff00;
    border-radius: 50%;
}

.popup-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.popup-close-btn:hover {
    background: var(--bg-tertiary);
    color: var(--accent-red-bright);
}

/* Chat Messages */
.chat-popup-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    gap: 10px;
    max-width: 85%;
    animation: message-fade-in 0.3s ease;
}

.message.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.bot-message {
    align-self: flex-start;
}

.message-content {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    line-height: 1.5;
    font-size: 0.9rem;
    word-wrap: break-word;
}

.user-message .message-content {
    white-space: pre-wrap;
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: white;
    border-radius: 12px 12px 4px 12px;
}

.bot-message .message-content {
    border-right: 3px solid var(--accent-red);
    border-radius: 12px 12px 12px 4px;
}

/* Markdown in messages */
.bot-message .message-content p {
    margin: 0 0 10px 0;
}

.bot-message .message-content p:last-child {
    margin-bottom: 0;
}

.bot-message .message-content strong {
    color: var(--accent-red-bright);
}

.bot-message .message-content code {
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

.bot-message .message-content ul,
.bot-message .message-content ol {
    margin: 10px 0;
    padding-left: 20px;
}

/* Typing Indicator in Popup */
.chat-popup .typing-indicator {
    display: flex;
    gap: 6px;
    padding: 10px 20px;
    align-items: center;
}

.chat-popup .typing-indicator.hidden {
    display: none;
}

/* Chat Input */
.chat-popup-input {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.quick-prompts-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.quick-prompt-mini {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-prompt-mini:hover {
    border-color: var(--accent-red);
    color: var(--accent-red-bright);
}

.popup-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.popup-input-wrapper textarea {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 15px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    resize: none;
    min-height: 44px;
    max-height: 100px;
}

.popup-input-wrapper textarea:focus {
    outline: none;
    border-color: var(--accent-red);
}

.popup-input-wrapper textarea::placeholder {
    color: var(--text-muted);
}

.popup-send-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-red);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.popup-send-btn:hover {
    background: var(--accent-red-bright);
}

.popup-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    .nav-menu-btn {
        display: block;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 100px 30px 60px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-visual {
        display: none;
    }

    .portfolio-section {
        padding: 60px 30px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card.featured {
        grid-column: span 1;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 600px) {
    .portfolio-nav {
        padding: 15px 20px;
    }

    .nav-name {
        display: none;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .chat-popup {
        width: calc(100vw - 20px);
        height: calc(100vh - 120px);
        right: 10px;
        bottom: 80px;
        border-radius: 12px;
    }

    .chat-fab {
        width: 56px;
        height: 56px;
        right: 20px;
        bottom: 20px;
    }
}
