/*
Nexlab - Clean, Modern, Professional Style CSS
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background-color: #1a1a1a;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #242424;
    border-bottom: 1px solid #333;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo a:hover {
    color: #ddd;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: #aaa;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #fff;
}

.nav-hire {
    background: #4da6ff;
    color: #fff !important;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s ease !important;
}

.nav-hire:hover {
    background: #80bfff !important;
}

.nav-hire::after {
    display: none;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
}

.nav a:hover::after {
    width: 100%;
}

/* Main Content */
.main {
    margin-top: 80px;
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: #242424;
    border-bottom: 1px solid #333;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #999;
    font-weight: 400;
}

.hero-description {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    color: #ccc;
    line-height: 1.8;
}

/* Articles Section */
.articles {
    margin-bottom: 4rem;
}

.articles-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #fff;
    font-weight: 600;
}

/* Article List - Card Layout */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

.article-card {
    background: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid #333;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.article-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #333;
}

.article-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #fff;
    line-height: 1.3;
}

.article-card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #888;
}

.article-card-excerpt {
    color: #aaa;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.article-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.read-more {
    color: #4da6ff;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.3s ease;
}

.read-more:hover {
    gap: 0.5rem;
}

.read-more::after {
    content: "→";
}

/* Categories Section */
.categories {
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.categories-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #fff;
    font-weight: 600;
}

.categories-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: #2a2a2a;
    padding: 2rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #4da6ff;
    border: 1px solid #333;
}

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

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: #fff;
    font-weight: 600;
}

.category-card p {
    color: #888;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Article Page */
.article {
    background: #242424;
    padding: 3rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 1px solid #333;
}

.article-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #333;
    padding-bottom: 1.5rem;
}

.article-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
    line-height: 1.2;
    font-weight: 700;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: #888;
}

.article-date {
    color: #777;
}

.article-author {
    color: #4da6ff;
    font-weight: 500;
}

.article-categories {
    margin-top: 0.75rem;
}

.article-category {
    color: #4da6ff;
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    border: 1px solid #4da6ff;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.article-category:hover {
    background: #4da6ff;
    color: #fff;
}

/* Article Content */
.article-content {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: #fff;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.article-content h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid #333;
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.4rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    color: #ccc;
}

.article-content a {
    color: #4da6ff;
    text-decoration: none;
    border-bottom: 1px solid #4da6ff;
    transition: all 0.3s ease;
}

.article-content a:hover {
    color: #80bfff;
    border-bottom-color: #80bfff;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.article-content blockquote {
    border-left: 4px solid #4da6ff;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #aaa;
    background: #2a2a2a;
    padding: 1rem 1rem 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
}

.article-content code {
    background: #333;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #ff6b6b;
    font-size: 0.9em;
}

.article-content pre {
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid #333;
}

.article-content pre code {
    background: transparent;
    color: #ddd;
    padding: 0;
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
    color: #ccc;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* Article Footer */
.article-footer {
    border-top: 1px solid #333;
    padding-top: 2rem;
}

.article-tags {
    color: #888;
}

.article-tag {
    color: #888;
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    background: #333;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    transition: all 0.3s ease;
}

.article-tag:hover {
    background: #4da6ff;
    color: #fff;
}

/* Footer */
.footer {
    background: #1a1a1a;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid #333;
}

.footer-content {
    color: #888;
    text-align: center;
    line-height: 1.8;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-list {
        grid-template-columns: 1fr;
    }
    
    .article {
        padding: 2rem 1rem;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Selection Styles */
::selection {
    background: #4da6ff;
    color: #fff;
}

::-moz-selection {
    background: #4da6ff;
    color: #fff;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #4da6ff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Menu */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .nav.active {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #242424;
        border-top: 1px solid #333;
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    }
}

/* Article List Page */
.articles-list-page {
    max-width: 900px;
    margin: 0 auto;
}

.articles-list-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #fff;
    font-weight: 700;
    text-align: center;
}

.article-list-item {
    display: flex;
    gap: 1.5rem;
    background: #2a2a2a;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: 1px solid #333;
}

.article-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.article-list-image {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #333;
}

.article-list-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-list-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
}

.article-list-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.75rem;
}

.article-list-excerpt {
    color: #aaa;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-card {
    background: #2a2a2a;
    padding: 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
}

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

.project-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #fff;
}

.project-description {
    color: #aaa;
    line-height: 1.5;
    font-size: 0.9rem;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.project-language {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #333;
    color: #4da6ff;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    align-self: flex-start;
}

@media (max-width: 768px) {
    .article-list-item {
        flex-direction: column;
    }
    
    .article-list-image {
        width: 100%;
        height: 200px;
    }
}

/* Empty category message */
.empty-category {
    text-align: center;
    padding: 4rem 2rem;
    color: #7f8c8d;
}

.empty-category p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #00ff88;
    color: #0a0a0a;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #00cc6a;
    transform: translateY(-2px);
}
