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

:root {
    /* Light Theme Variables */
    --bg-primary: #f4f7fb;
    --bg-secondary: #ffffff;
    --text-primary: #132238;
    --text-secondary: #5f728f;
    --border-color: #d9e3f0;
    
    --accent-primary: #1273ea;
    --accent-hover: #0e5fc0;
    --accent-light: rgba(18, 115, 234, 0.12);
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 24px rgba(18, 115, 234, 0.22);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Dark Theme Variables */
    --bg-primary: #0d1726;
    --bg-secondary: #142135;
    --text-primary: #f8fbff;
    --text-secondary: #9fb2cb;
    --border-color: #243247;
    
    --accent-primary: #5aa6ff;
    --accent-hover: #7bb7ff;
    --accent-light: rgba(90, 166, 255, 0.15);
    
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(129, 140, 248, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 0.5em;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary), #11b6b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1em;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 8px;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.5);
    color: white;
}

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

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

.btn-icon {
    padding: 10px;
    border-radius: var(--radius-full);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

/* Tags / Badges */
.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background-color: var(--accent-light);
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-primary);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 160px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-bg-accent {
    position: absolute;
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    opacity: 0.15;
    filter: blur(60px);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 24px;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 32px;
    padding: 0 20px;
}

/* Category Filters */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 64px;
    margin-bottom: 48px;
}

.filter-btn {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

/* Blog Cards */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-bottom: 64px;
}

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

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-light);
}

.card-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.card-title a {
    color: var(--text-primary);
}

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

.card-excerpt {
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: auto;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* Featured Post */
.featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 80px;
    box-shadow: var(--shadow-md);
}

.featured-post .card-img-wrapper {
    padding-top: 0;
    height: 100%;
    min-height: 350px;
}

.featured-post .card-content {
    padding: 48px;
    justify-content: center;
}

.featured-post .card-title {
    font-size: 2rem;
}

/* Detail Page specific */
.post-header {
    padding: 140px 0 60px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.post-meta-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.post-cover {
    width: 100%;
    max-height: 600px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    margin-bottom: 60px;
    box-shadow: var(--shadow-lg);
}

.post-content-wrapper {
    display: grid;
    grid-template-columns: 80px 1fr 300px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 80px;
}

.social-share {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.social-share span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 8px;
}

.post-body {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.post-body h2, .post-body h3 {
    color: var(--text-primary);
    margin-top: 2em;
    margin-bottom: 1em;
}

.post-body p {
    margin-bottom: 1.5em;
}

.post-body img {
    border-radius: var(--radius-md);
    margin: 2em 0;
}

.post-body blockquote {
    border-left: 4px solid var(--accent-primary);
    padding-left: 20px;
    font-style: italic;
    background-color: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-md);
    margin: 2em 0;
}

.post-sidebar .widget {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 32px;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.latest-post-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.latest-post-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.latest-post-item img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.latest-post-info a {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.latest-post-info a:hover {
    color: var(--accent-primary);
}

.latest-post-info .date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    font-weight: 600;
    transition: var(--transition);
}

.page-link:hover, .page-link.active {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* About Page / Contact */
.page-header {
    padding: 140px 0 80px;
    text-align: center;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin: 80px 0;
}

.contact-info-card {
    background-color: var(--bg-secondary);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.info-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.info-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--accent-light);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 80px 0 24px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--accent-primary);
    transform: translateX(4px);
}

.newsletter-form {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.newsletter-form input {
    flex-grow: 1;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.footer-socials a:hover {
    color: var(--accent-primary);
}
