/* About Section Styles */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Code Block */
.code-block {
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    color: #e0e0e0;
}

/* Light mode code block styling - ensure text is visible */
.code-block .code-content {
    color: #e0e0e0;
}

.code-block .code-line {
    color: #e0e0e0;
}

/* Special characters styling - ensure brackets, commas, etc. are visible */
.code-block .code-line {
    color: #e0e0e0;
}

/* Override specific element colors while keeping special characters visible */
.code-block .keyword {
    color: #569cd6;
}

.code-block .variable {
    color: #9cdcfe;
}

.code-block .property {
    color: #9cdcfe;
}

.code-block .string {
    color: #ce9178;
}

.code-block .comment {
    color: #6a9955;
}

.code-header {
    background: #2d2d2d;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #404040;
}

.file-name {
    color: #4fc3f7;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
}

.file-path {
    color: #888;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
}

.code-content {
    padding: 20px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    width: 100%;
    overflow-x: auto;
    word-wrap: break-word;
    word-break: break-word;
    text-align: left;
    color: #e0e0e0;
}

@media (max-width: 768px) {
    .code-content {
        padding: 16px;
        font-size: 1rem;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    .code-content {
        padding: 12px;
        font-size: 1.1rem;
        line-height: 1.8;
    }
}

.code-content .code-line {
    margin-bottom: 4px;
    width: 100%;
    overflow-x: auto;
    word-wrap: break-word;
    word-break: break-word;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.code-content .code-line br {
    display: block;
    margin: 0;
    line-height: 1.4;
}

.about-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    overflow-x: hidden;
    text-align: left;
}

.experience-timeline {
    margin-top: 2rem;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
    word-break: break-word;
}

.timeline-date {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 120px;
}

.timeline-content h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.timeline-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.experience-details {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.experience-details li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.experience-details li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    overflow-x: hidden;
    max-width: 100%;
}

.tech-stack .tech-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    word-wrap: break-word;
    word-break: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: left;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Dark mode about styles */
[data-theme="dark"] .about {
    background: var(--bg-secondary);
}

[data-theme="dark"] .timeline-item,
[data-theme="dark"] .stat-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .code-block {
    background: #0d1117;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .code-header {
    background: #161b22;
    border-bottom-color: var(--border-color);
}

/* Mobile About Styles */
@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 0 10px;
    }

    .about-stats {
        flex-direction: row;
        justify-content: space-around;
        gap: 1rem;
    }

    /* Improve code block readability on mobile */
    .code-block {
        margin: 0 auto 2rem auto;
        max-width: 100%;
        border-radius: 8px;
    }

    .code-content {
        padding: 16px;
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .code-content .code-line {
        margin-bottom: 3px;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .about-description {
        font-size: 0.95rem;
        line-height: 1.6;
        padding: 0 5px;
		margin-top: 1.5rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    /* Improve timeline on mobile */
    .timeline-item {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .timeline-date {
        min-width: auto;
        margin-bottom: 0.75rem;
        font-size: 0.9rem;
    }

    .timeline-content h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .timeline-content p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .tech-stack {
        justify-content: center;
        gap: 0.5rem;
    }

    .tech-stack .tech-tag {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .about-stats {
        flex-direction: column;
        gap: 1rem;
        padding: 0 5px;
    }

    .stat-item {
        padding: 1.2rem;
    }

    .stat-number {
        font-size: 2.2rem;
    }

    .timeline-item {
        flex-direction: column;
        text-align: center;
        padding: 1.2rem;
        margin-bottom: 1rem;
    }

    .timeline-date {
        min-width: auto;
        margin-bottom: 0.5rem;
        font-size: 0.85rem;
    }

    .timeline-content h4 {
        font-size: 1rem;
    }

    .timeline-content p {
        font-size: 0.85rem;
    }

    .tech-stack {
        justify-content: center;
        gap: 0.4rem;
    }

    .tech-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .code-content {
        font-size: 0.8rem;
        line-height: 1.4;
        padding: 12px;
    }
    
    .code-content .code-line {
        margin-bottom: 3px;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .code-content .code-line .code {
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .code-content .code-line .string {
        white-space: normal;
        word-break: break-word;
    }
}
