@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=Playfair+Display:ital,wght@0,700;1,700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #ffffff;
    --bg-alt: #f8fafc;
    --accent-primary: #0f172a; /* Slate 900 */
    --accent-secondary: #334155; /* Slate 700 */
    --text-main: #0f172a;
    --text-muted: #475569;
    --border-light: #e2e8f0;
    --card-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.1);
    --transition-smooth: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

/* Header Refinement */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: 1.25rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.search-container {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    pointer-events: none;
}

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

.nav-wrapper nav a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.search-container input {
    width: 100%;
    padding: 0.75rem 1.25rem 0.75rem 3rem;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    font-size: 0.9rem;
    background: var(--bg-alt);
    color: var(--text-main);
    transition: var(--transition-smooth);
}

.search-container input:focus {
    background: var(--bg-main);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.1);
}

/* Category Nav Styling */
.category-nav {
    display: flex;
    gap: 0.5rem;
    margin: 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.category-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.category-nav a.active {
    background: var(--accent-primary);
    color: #fff;
}

.category-nav a:hover:not(.active) {
    background: var(--bg-alt);
    color: var(--text-main);
}

/* Attractive Blog Feed */
.blog-feed {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 4rem;
}

.post-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2.5rem;
    padding: 1.5rem;
    border-radius: 24px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
    margin-bottom: 1rem;
}

.post-card:hover {
    background: var(--bg-alt);
    transform: translateX(10px);
}

.post-thumb {
    height: 220px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 24px -8px rgba(0,0,0,0.1);
}

.post-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.category-tag {
    background: #f1f5f9;
    color: var(--accent-primary);
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.snippet {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    padding: 2.5rem;
    border-radius: 24px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 3rem 0;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.2);
    flex-wrap: wrap;
    gap: 1.5rem;
}

.hero-banner h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.hero-banner p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.hero-btn {
    background: white;
    color: var(--accent-primary);
    box-shadow: none;
    white-space: nowrap;
}

.hero-btn:hover {
    background: var(--bg-alt);
    color: var(--accent-primary);
}

/* Post Detail Styling (Premium) */
.post-full-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.post-full-content p { margin-bottom: 2rem; }

.post-full-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    margin: 3rem 0 1.5rem;
    color: var(--text-main);
}

/* Sidebar Widgets */
.widget {
    background: var(--bg-alt);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--border-light);
    box-shadow: var(--card-shadow);
}

.widget-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 2rem;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2rem;
    background: var(--accent-primary);
    color: #fff;
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
}

.btn:hover {
    box-shadow: 0 15px 30px -10px rgba(79, 70, 229, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-alt);
    color: var(--text-main);
    border: 1px solid var(--border-light);
}

/* Mobile Screens */
@media (max-width: 992px) {
    .blog-feed { grid-template-columns: 1fr; }
    .post-card { grid-template-columns: 1fr; gap: 1.5rem; padding: 1rem; }
    .post-thumb { height: 260px; }
}

@media (max-width: 640px) {
    .container { padding: 0 1.25rem; }
    .nav-wrapper { flex-direction: column; gap: 1rem; align-items: stretch; text-align: center; }
    .nav-wrapper nav { justify-content: center; width: 100%; gap: 1rem; flex-wrap: wrap; }
    .search-container { width: 100%; }
    .post-thumb { height: 200px; }
    
    /* Improve spacing on mobile for core elements */
    .widget, #tool-interface { padding: 1.5rem !important; }
    .hero-banner { padding: 1.5rem; text-align: center; flex-direction: column; justify-content: center; }
    .hero-banner h2 { font-size: 1.5rem; }
    .hero-banner a { width: 100%; }
    
    /* Category scroll */
    .category-nav { overflow-x: auto; white-space: nowrap; flex-wrap: nowrap; padding-bottom: 0.5rem; -webkit-overflow-scrolling: touch; justify-content: flex-start; }
    .category-nav::-webkit-scrollbar { display: none; }
}

/* Modal Detail View */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-main);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    transition: var(--transition-smooth);
}

.close-btn:hover {
    color: var(--text-main);
}

.post-full-content {
    line-height: 1.8;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.post-full-content h3 {
    margin: 1.5rem 0 0.75rem;
    font-size: 1.4rem;
    color: var(--text-main);
}

.post-full-content p {
    margin-bottom: 1.25rem;
}

.post-full-content ul {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Tool Progress Bar */
.progress-container {
    width: 100%;
    background-color: var(--border-light);
    border-radius: 10px;
    height: 8px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px;
    transition: width 0.1s linear;
}
