:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #141922;
    --bg-tertiary: #1c2330;
    --text-primary: #e6e8f0;
    --text-secondary: #a0a8c0;
    --text-muted: #6b7394;
    --accent-primary: #4a9eff;
    --accent-secondary: #00d9ff;
    --accent-warm: #ff6b6b;
    --border-color: #2a3142;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 14, 20, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--accent-secondary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

nav ul {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

nav a:hover {
    color: var(--accent-secondary);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-secondary);
    transition: width 0.3s ease;
}

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

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

section {
    min-height: 100vh;
    padding: 8rem 0;
    position: relative;
}

/* Hero Section */
#hero {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(74, 158, 255, 0.08) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(5deg); }
    66% { transform: translate(-20px, 20px) rotate(-5deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 50px;
    color: var(--accent-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 4.5rem;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(74, 158, 255, 0.3);
}

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 217, 255, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-label {
    color: var(--accent-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.section-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Section */
#blog {
    background: var(--bg-secondary);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.blog-tag {
    background: rgba(74, 158, 255, 0.1);
    color: var(--accent-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 500;
}

.blog-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.blog-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.blog-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-secondary);
    margin-top: 1rem;
    font-weight: 500;
    text-decoration: none;
}

.blog-link:hover {
    gap: 0.75rem;
}

/* Projects Section */
.projects-grid {
    display: grid;
    gap: 3rem;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.project-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.project-image {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.project-content {
    padding: 2.5rem;
}

.project-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: rgba(74, 158, 255, 0.08);
    color: var(--accent-secondary);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(74, 158, 255, 0.2);
}

.project-links {
    display: flex;
    gap: 1rem;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    text-align: center;
}

footer .social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

footer .social-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

footer .social-links a:hover {
    color: var(--accent-secondary);
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    nav ul {
        gap: 1.5rem;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 5rem 0;
    }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }

/* ========================================
   Blog Post Page Styles
   ======================================== */

.blog-post {
    min-height: auto;
    padding-top: 8rem;
    padding-bottom: 4rem;
}

.blog-post-header {
    max-width: 800px;
    margin: 0 auto 3rem auto;
    padding: 0 2rem;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.blog-post-title {
    font-family: 'DM Serif Display', serif;
    font-size: 3rem;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
    background: none;
}

.blog-post-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.blog-post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.blog-post-content h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.blog-post-content h3 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.blog-post-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.blog-post-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

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

.blog-post-content a:hover {
    border-bottom-color: var(--accent-secondary);
}

.blog-post-content blockquote {
    border-left: 3px solid var(--accent-primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.blog-post-content pre {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.blog-post-content code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
}

.blog-post-content p code {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

/* Back to blog link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: gap 0.3s ease;
}

.back-link:hover {
    gap: 0.75rem;
}

/* Blog post footer */
.blog-post-footer {
    max-width: 800px;
    margin: 4rem auto 0 auto;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .blog-post-title {
        font-size: 2rem;
    }

    .blog-post-content h2 {
        font-size: 1.5rem;
    }

    .blog-post-content p {
        font-size: 1rem;
    }
}
