/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #00d9ff;
    --border: #2a2a2a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
    background: radial-gradient(circle at 20% 50%, rgba(0, 217, 255, 0.1) 0%, transparent 50%);
}

header {
    position: sticky;
    top: 10;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(10, 10, 10, 0.8);
    border-bottom: 1px solid var(--border);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-current a {
    color: var(--accent);
}

main {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.hero {
    margin-bottom: 6rem;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fade-in 0.8s ease-out;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    animation: fade-in 0.8s ease-out 0.2s both;
}

.hero .description {
    max-width: 700px;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    animation: fade-in 0.8s ease-out 0.4s both;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 6rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.1);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.post-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.1);
}

.post-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.post-content {
    padding: 1.5rem;
}


.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.post-tag {
    background: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
}

.post-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.read-more {
    color: var(--accent);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.post-card:hover .read-more {
    gap: 1rem;
}

.post-full {
    max-width: 1200px;
    margin: 0 auto;
}

.post-full-header {
    margin-bottom: 3rem;
    text-align: center;
}

.post-full-tags a {
    display: inline-block;
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 1rem;
}

.post-full-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.post-full-excerpt {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.post-full-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: var(--text-secondary);
}

.post-full-image {
    margin: 0 0 3rem;
    border-radius: 16px;
    overflow: hidden;
}

.post-full-image img {
    width: 100%;
    height: auto;
}

.post-full-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-full-content h2,
.post-full-content h3 {
    margin: 2rem 0 1rem;
}

.post-full-content p {
    margin-bottom: 1.5rem;
}

.post-full-content a {
    color: var(--accent);
    text-decoration: none;
}

.post-full-content code {
    background: var(--bg-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.post-full-content pre {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.post-full-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.author-header,
.tag-header {
    text-align: center;
    margin-bottom: 4rem;
}

.author-profile-image-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 4rem;
}

.pagination a,
.pagination span {
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a:hover {
    border-color: var(--accent);
    box-shadow: 0 5px 15px rgba(0, 217, 255, 0.2);
}

.pagination .page-number {
    background: transparent;
    border: none;
}

footer {
    position: relative;
    z-index: 1;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    margin-top: 6rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent);
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--accent);
}

.footer-section p {
    color: var(--text-secondary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
}

.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent);
    width: 0%;
    z-index: 1000;
}

/* REQUIRED: Ghost Koenig Editor Classes */
.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin: auto calc(50% - 50vw);
    transform: translateX(calc(50vw - 50%));
}

.kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.kg-width-wide img,
.kg-width-full img {
    width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .kg-width-wide,
    .kg-width-full {
        width: 100%;
        left: 0;
        right: 0;
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
  }
}

@media (max-width: 640px) {
  .posts-grid {
    grid-template-columns: 1fr; /* 1 column on mobile */
  }
}