/* Navigation Components */
.content-nav {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
    padding-bottom: 15px;
}

.nav-button {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 16px;
    cursor: pointer;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-family: inherit;
}

.nav-button.active {
    color: var(--text-color);
    border-bottom-color: var(--accent-color);
}

.nav-button:hover {
    color: var(--text-color);
}

.content-section {
    display: block;
}

/* Work Components */
.expertise-tags {
    font-size: 14px;
    color: var(--secondary-color);
    letter-spacing: 0.03em;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}

.summary-section {
    margin-bottom: 40px;
}

.summary-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    font-style: italic;
}

.current-work {
    background: rgba(128, 128, 128, 0.05);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.work-item {
    margin-bottom: 15px;
}

.work-item:last-child {
    margin-bottom: 0;
}

.company {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 5px;
}

.role {
    color: var(--secondary-color);
    font-size: 15px;
}

.work-description {
    color: var(--secondary-color);
    font-size: 14px;
    line-height: 1.5;
    margin-top: 8px;
}

.company-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.company-tag {
    background: rgba(128, 128, 128, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--secondary-color);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transition: background 0.3s ease;
}

.company-tag:hover {
    background: rgba(128, 128, 128, 0.15);
}

.company-tag::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-color);
    color: var(--bg-color);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    width: 300px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.company-tag:hover::after {
    opacity: 1;
    visibility: visible;
}

.company-tag::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text-color);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
}

.company-tag:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Project Components */
.project-sentences {
    margin-bottom: 30px;
}

.project-sentence {
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-color);
}

.project-sentence:last-child {
    margin-bottom: 0;
}

.project-sentence a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.project-sentence a:hover {
    border-bottom-color: var(--accent-color);
}

.project-list {
    list-style: none;
    margin-bottom: 30px;
}

.project-list li {
    margin-bottom: 12px;
    font-size: 15px;
}

.project-list a {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(128, 128, 128, 0.3);
    transition: border-color 0.3s ease;
}

.project-list a:hover {
    border-bottom-color: var(--accent-color);
}

.project-stats {
    color: var(--secondary-color);
    font-size: 13px;
    margin-left: 8px;
}

/* Community Components */
.community-items {
    margin-bottom: 30px;
}

.community-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
}

.community-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.community-role {
    font-weight: 500;
    color: var(--text-color);
    font-size: 15px;
}

.community-org {
    color: var(--accent-color);
    font-size: 14px;
    margin-bottom: 8px;
}

.community-description {
    color: var(--secondary-color);
    font-size: 14px;
    line-height: 1.5;
}

/* Patent Components */
.patent-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
}

.patent-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.patent-title {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.4;
}

.patent-authors {
    color: var(--secondary-color);
    font-size: 14px;
    margin-bottom: 5px;
}

.patent-date {
    color: var(--secondary-color);
    font-size: 13px;
}

/* Writings Components */
.writings {
    display: none;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    padding: 60px 40px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.writings.active {
    display: block;
}

.writings-container {
    max-width: 650px;
    margin: 0 auto;
}

.writings-header {
    margin-bottom: 50px;
}

.writings-title {
    font-size: 28px;
    font-weight: 400;
    color: var(--text-color);
    margin-bottom: 0;
}

.writings-content {
    line-height: 1.8;
}

.writing-item {
    margin-bottom: 15px;
}

.writing-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    background: linear-gradient(120deg, transparent 0%, transparent 100%);
    background-repeat: no-repeat;
    background-size: 0% 100%;
    background-position: 0 0;
}

.writing-link:hover {
    background: linear-gradient(120deg, rgba(74, 144, 226, 0.3) 0%, rgba(74, 144, 226, 0.3) 100%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: 0 0;
    color: var(--text-color);
    text-decoration: none !important;
    border-bottom: none !important;
}

.writing-tags {
    margin-top: 4px;
    font-size: 14px;
    color: rgba(136, 136, 136, 0.7);
    letter-spacing: 0.05em;
    font-weight: 300;
}

[data-theme="light"] .writing-tags {
    color: rgba(102, 102, 102, 0.7);
}

.writing-tag {
    /* No special styling - just text with separators */
}

.writing-meta {
    color: var(--secondary-color);
    font-size: 14px;
    font-style: italic;
    margin-top: 5px;
}

.writing-categories {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
}

.category-title {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 18px;
}

.category-tags {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.category-tag {
    color: var(--secondary-color);
    font-size: 14px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.category-tag:hover,
.category-tag.active {
    color: var(--text-color);
    background: rgba(128, 128, 128, 0.1);
}

/* Writing post styles */
.writing-post {
    display: none;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    padding: 60px 40px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.writing-post.active {
    display: block;
}

.post-header {
    margin-bottom: 40px;
}

.post-title {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-meta {
    color: var(--secondary-color);
    font-size: 14px;
    font-style: italic;
}

.post-content {
    line-height: 1.7;
    font-size: 16px;
}

.post-content p {
    margin-bottom: 20px;
    color: var(--text-color);
}

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

.company-link {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.company-link:hover {
    border-bottom-color: var(--accent-color);
}

/* Additional styles for markdown articles - Add to styles/components.css */

/* Loading and Error States */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary-color);
}

.error-state {
    text-align: center;
    padding: 60px 20px;
}

.error-state h2 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 500;
}

.error-state p {
    color: var(--secondary-color);
    margin-bottom: 25px;
}

.retry-button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.retry-button:hover {
    background: var(--accent-color);
    opacity: 0.9;
}

.error-message {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.error-details {
    font-size: 14px;
    color: var(--secondary-color);
    font-family: monospace;
    margin-top: 10px;
}

/* Article Content Styling */
.post-content h1,
.post-content h2,
.post-content h3 {
    color: var(--text-color);
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 500;
}

.post-content h1 {
    font-size: 24px;
    margin-top: 0;
}

.post-content h2 {
    font-size: 20px;
}

.post-content h3 {
    font-size: 18px;
}

.post-content strong {
    color: var(--text-color);
    font-weight: 600;
}

.post-content em {
    color: var(--secondary-color);
    font-style: italic;
}

.post-content blockquote {
    border-left: 3px solid var(--accent-color);
    padding-left: 20px;
    margin: 25px 0;
    color: var(--secondary-color);
    font-style: italic;
}

.post-content code {
    background: rgba(128, 128, 128, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    color: var(--text-color);
}

.post-content pre {
    background: rgba(128, 128, 128, 0.08);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid rgba(128, 128, 128, 0.1);
}

.post-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

.post-content ul,
.post-content ol {
    padding-left: 25px;
    margin: 20px 0;
}

.post-content li {
    margin-bottom: 8px;
    color: var(--text-color);
}

.post-content hr {
    border: none;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
    margin: 40px 0;
}

/* Post Header and Footer */
.post-date {
    color: var(--secondary-color);
    font-size: 14px;
    margin-top: 5px;
}

.post-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(128, 128, 128, 0.15);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-tag {
    background: rgba(128, 128, 128, 0.1);
    color: var(--secondary-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
}

/* Enhanced writing meta styling */
.writing-meta {
    color: var(--secondary-color);
    font-size: 14px;
    font-style: italic;
    margin-top: 3px;
    margin-bottom: 5px;
}

/* No writings state */
.no-writings {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-color);
}