/* Fast Wuzz — custom styles */

/* --- CSS Variables --- */
:root {
    --color-bg: #0f172a;
    --color-surface: #1e293b;
    --color-surface-2: #334155;
    --color-text: #f8fafc;
    --color-text-muted: #94a3b8;
    --color-primary: #6366f1;
    --color-primary-hover: #4f46e5;
    --color-accent: #22d3ee;
    --color-border: rgba(148, 163, 184, 0.2);
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    --max-width: 1200px;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: var(--font-sans);
    --transition: 0.2s ease;
}

/* --- Reset / Base --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
}

p {
    margin: 0 0 1rem;
}

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

a:hover,
a:focus {
    color: var(--color-primary);
    text-decoration: underline;
}

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

/* --- Layout --- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    padding-top: 3rem;
    padding-bottom: 4rem;
}

.content-wrap {
    min-width: 0;
}

@media (max-width: 900px) {
    .content-area {
        grid-template-columns: 1fr;
    }
}

/* --- Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

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

.site-branding {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.site-title:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.site-description {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* --- Navigation --- */
.site-nav .nav-menu {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    font-weight: 500;
    color: var(--color-text-muted);
}

.site-nav a:hover,
.site-nav .current-menu-item a {
    color: var(--color-text);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--color-text);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .site-nav {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        padding: 1rem 1.5rem;
        transform: translateY(-150%);
        opacity: 0;
        pointer-events: none;
        transition: transform var(--transition), opacity var(--transition);
    }

    .site-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .site-nav .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }
}

/* --- Page Header --- */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.page-title {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.archive-description {
    color: var(--color-text-muted);
}

/* --- Post Grid --- */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.post-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.post-card-image {
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.post-card-body {
    padding: 1.25rem;
}

.post-card .entry-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

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

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

.entry-meta {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.entry-meta a {
    color: var(--color-text-muted);
}

.entry-meta a:hover {
    color: var(--color-accent);
}

.entry-summary {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    color: var(--color-primary);
}

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

/* --- Single Post --- */
.single-content {
    max-width: 860px;
}

.entry-single {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.entry-hero {
    margin: -2rem -2rem 2rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
}

.entry-hero img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

.entry-single .entry-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.entry-content {
    color: var(--color-text);
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content blockquote {
    margin: 1.5rem 0;
    padding-left: 1.25rem;
    border-left: 4px solid var(--color-primary);
    color: var(--color-text-muted);
    font-style: italic;
}

.entry-content pre {
    background: var(--color-bg);
    padding: 1rem;
    border-radius: var(--radius);
    overflow-x: auto;
}

.entry-content code {
    background: var(--color-bg);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.5rem;
}

.alignwide {
    max-width: 100%;
}

.alignfull {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* --- Page --- */
.entry-page {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

/* --- Sidebar --- */
.widget-area {
    position: sticky;
    top: 92px;
    align-self: start;
}

.widget {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

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

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget li {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--color-border);
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--color-text-muted);
}

.widget a:hover {
    color: var(--color-text);
}

/* --- Pagination --- */
.pagination,
.nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
}

.page-numbers,
.nav-links a,
.nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-weight: 600;
    color: var(--color-text);
}

.page-numbers.current,
.nav-links span.current {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.page-numbers:hover,
.nav-links a:hover {
    background: var(--color-surface-2);
    text-decoration: none;
}

/* --- Footer --- */
.site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

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

.footer-menu {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu a {
    color: var(--color-text-muted);
}

.footer-menu a:hover {
    color: var(--color-text);
}

.footer-copy {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* --- 404 --- */
.error-404 {
    text-align: center;
    padding: 4rem 0;
}

.error-404 .page-title {
    font-size: 2.5rem;
}

.search-form {
    display: flex;
    max-width: 400px;
    margin: 1.5rem auto 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: var(--color-surface);
    color: var(--color-text);
    outline: none;
}

.search-form button {
    padding: 0 1.25rem;
    border: none;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.search-form button:hover {
    background: var(--color-primary-hover);
}

/* --- Hero Section --- */
.hero-section {
    padding: 5rem 0 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-surface) 100%);
    border-bottom: 1px solid var(--color-border);
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text {
    font-size: 1.125rem;
    color: var(--color-text-muted);
}

/* --- Recent Posts Section --- */
.recent-posts-section {
    padding: 3rem 0;
}

.section-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

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

    background: var(--color-primary-hover);
}

/* --- Utilities --- */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* --- WordPress alignments --- */
.alignleft {
    float: left;
    margin-right: 1.5rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
