:root {
    /* Color Palette */
    --bg-dark: #f0f4f8;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-primary: #4f46e5;
    --accent-secondary: #db2777;
    --border-color: rgba(0, 0, 0, 0.08);
    
    /* Typography */
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Background Animations */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    filter: blur(120px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out alternate;
    opacity: 0.6;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
    animation-delay: -10s;
}

.blob-3 {
    top: 40%;
    left: 30%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 15%) scale(1.2); }
}

/* Header & Glassmorphism */
.glass-header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-secondary);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    padding: 6rem 0 4rem;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero h1 span {
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Posts Grid */
.posts-section {
    padding: 2rem 0 6rem;
    flex: 1;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

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

/* Portfolio Section */
.portfolio-section {
    padding: 2rem 0 4rem;
}

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

.portfolio-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.portfolio-card:hover {
    transform: translateY(-10px);
    background: var(--bg-card-hover);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.portfolio-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.portfolio-tags span {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-family: var(--font-mono);
}

/* Post Card */
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.post-card:hover {
    transform: translateY(-10px);
    background: var(--bg-card-hover);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.post-meta {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-secondary);
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.read-more {
    font-weight: 600;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.post-card:hover .read-more {
    color: var(--text-primary);
}

/* Markdown Content Styling (for post.html) */
.post-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 4rem;
    backdrop-filter: blur(10px);
}

.post-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.post-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.post-content h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: var(--accent-primary);
}

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

.post-content pre {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.post-content code {
    font-family: var(--font-mono);
    color: var(--accent-secondary);
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 3rem; }
    .post-content { padding: 1.5rem; }
}
