@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.05);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent-color: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #c026d3 100%);
    --surface-glass: rgba(255, 255, 255, 0.8);
    --radius-lg: 24px;
    --radius-md: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.5rem 0;
    backdrop-filter: blur(12px);
    background: var(--surface-glass);
    border-bottom: 1px solid var(--card-border);
}

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

.logo {
    display: inline-flex;
    align-items: center;
}
.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

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

/* Hero Section */
.hero {
    padding: 180px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
    z-index: -1;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-title span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Sections */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

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

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.card-thumb {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

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

/* Article Overlay Card */
.article-overlay-card {
    height: 280px !important;
    position: relative;
    border: none !important;
    background: none !important;
}

.card-link-wrapper {
    display: block;
    height: 100%;
    width: 100%;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.article-overlay-card .card-thumb {
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 60%, transparent 100%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 1; /* Default visible */
    transition: var(--transition);
}

.overlay-content {
    transition: var(--transition);
}

.article-overlay-card:hover .card-overlay {
    background: linear-gradient(to top, rgba(124, 58, 237, 0.95) 0%, rgba(15, 23, 42, 0.4) 60%, transparent 100%);
}

.article-overlay-card .card-title {
    color: white;
    margin-bottom: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
}

.article-overlay-card .card-tag {
    background: var(--accent-gradient);
    padding: 3px 10px;
    border-radius: 20px;
    color: white !important;
    width: fit-content;
    margin-bottom: 10px;
    font-size: 0.7rem;
}

.article-overlay-card .card-meta {
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* Sidebar Widgets in Home */
.modern-sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.widget {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.skill-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
}

/* Footer */
.site-footer {
    padding: 100px 0 50px;
    margin-top: 100px;
    border-top: 1px solid var(--card-border);
    background: #f1f5f9;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: block;
}

.footer-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.social-link:hover {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-5px);
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cta-button {
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.2);
    filter: brightness(1.05);
}

.cta-button:active {
    transform: translateY(-1px);
}

.card-title a:hover {
    color: var(--accent-color);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Selections */
::selection {
    background: var(--accent-color);
    color: white;
}

/* Fix for single post content */
.post-content code {
    background: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

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

/* Responsive Refinements */
@media (max-width: 1024px) {
    .container { max-width: 95%; }
    .hero-title { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    :root {
        --radius-lg: 16px;
    }
    
    .hero {
        padding: 140px 0 60px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .card-thumb {
        height: 200px;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .post-hero {
        padding: 150px 0 80px !important;
    }
    
    .post-hero h1 {
        font-size: 2.2rem !important;
        padding: 0 1rem;
    }
    
    .content-wrapper {
        padding: 1.5rem !important;
        margin-top: -30px !important;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 10px !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .hero-btns .cta-button {
        margin-right: 0 !important;
        width: 100%;
    }
    
    .logo {
        font-size: 1.25rem;
    }
}

.no-scroll {
    overflow: hidden;
}
