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

:root {
    --bg-primary: #0a0f0a;
    --bg-secondary: #0f1410;
    --bg-tertiary: #141914;
    --text-primary: #d4d4d4;
    --text-secondary: #8a8a8a;
    --accent-primary: #2d4a2d;
    --accent-secondary: #1a2e1a;
    --accent-glow: #3d5a3d;
    --border-color: #1a1f1a;
    --hover-glow: rgba(45, 74, 45, 0.4);
    --shadow-dark: rgba(0, 0, 0, 0.9);
    --shadow-glow: rgba(45, 74, 45, 0.5);
    --forest-green: #0d1b0d;
    --forest-dark: #051005;
    --forest-brown: #2a1f1a;
    --forest-accent: #4a5a3a;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Navigation */
.navbar {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(10, 10, 10, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    text-decoration: none;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-glow), var(--forest-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(45, 74, 45, 0.6));
    letter-spacing: 1px;
}

.logo a:hover {
    filter: drop-shadow(0 0 12px var(--accent-glow));
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-glow));
    transition: width 0.3s ease;
    box-shadow: 0 0 5px rgba(45, 74, 45, 0.5);
}

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 0.5rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--forest-dark) 0%, var(--bg-primary) 100%);
}

.forest-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/dark_forest.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.7;
    z-index: 1;
    filter: brightness(0.3) contrast(1.4) saturate(0.6) blur(0.5px);
    animation: forest-sway 20s ease-in-out infinite;
}

@keyframes forest-sway {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-10px); }
}

.fog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(0, 0, 0, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(0, 0, 0, 0.4) 0%, transparent 50%),
        linear-gradient(180deg, transparent 0%, rgba(10, 15, 10, 0.7) 100%);
    z-index: 2;
    animation: fog-drift 30s ease-in-out infinite;
}

@keyframes fog-drift {
    0%, 100% { opacity: 0.6; transform: translateX(0); }
    50% { opacity: 0.8; transform: translateX(20px); }
}

.hero-content {
    text-align: center;
    z-index: 3;
    padding: 2rem;
    max-width: 800px;
    position: relative;
    width: 100%;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
}

.glitch {
    position: relative;
    color: var(--text-primary);
    text-shadow: 
        0 0 10px rgba(45, 74, 45, 0.6),
        0 0 20px rgba(45, 74, 45, 0.4),
        0 0 30px rgba(45, 74, 45, 0.3),
        0 0 5px rgba(0, 0, 0, 0.8);
    animation: glitch 3s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent-primary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
    opacity: 0.8;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent-secondary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 1s infinite linear alternate-reverse;
    opacity: 0.8;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    20% { clip: rect(54px, 9999px, 77px, 0); }
    40% { clip: rect(28px, 9999px, 91px, 0); }
    60% { clip: rect(64px, 9999px, 98px, 0); }
    80% { clip: rect(10px, 9999px, 2px, 0); }
    100% { clip: rect(78px, 9999px, 97px, 0); }
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-style: italic;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--text-primary);
    box-shadow: 0 4px 15px var(--shadow-glow), 0 0 20px rgba(45, 74, 45, 0.4);
    border: 1px solid rgba(45, 74, 45, 0.5);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 10px rgba(45, 74, 45, 0.3);
}

.btn-secondary:hover {
    background: var(--accent-primary);
    box-shadow: 0 4px 15px var(--hover-glow);
}

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

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

/* Horror atmosphere elements */
.story-card:hover,
.story-card-large:hover {
    box-shadow: 0 10px 30px var(--shadow-glow), 0 0 20px rgba(45, 74, 45, 0.3);
}

/* Featured Stories */
.featured-stories {
    padding: 5rem 0;
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(ellipse at 0% 0%, rgba(139, 0, 0, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(139, 0, 0, 0.05) 0%, transparent 50%);
}

.featured-stories h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.story-card {
    background-color: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-glow);
    border-color: var(--accent-primary);
}

.story-image {
    height: 200px;
    background: linear-gradient(135deg, var(--forest-dark), var(--forest-green), var(--accent-primary), var(--forest-brown));
    position: relative;
    overflow: hidden;
    filter: brightness(0.6) contrast(1.3) saturate(0.8);
}

.story-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.9) 100%);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.story-card:hover .story-overlay {
    opacity: 0.7;
}

.story-content {
    padding: 1.5rem;
}

.story-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.story-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.read-more {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-shadow: 0 0 5px rgba(45, 74, 45, 0.5);
}

.read-more:hover {
    color: var(--accent-secondary);
    transform: translateX(5px);
}

.view-all {
    text-align: center;
}

/* Stories Listing */
.stories-grid-full {
    display: grid;
    gap: 3rem;
    padding: 2rem 0;
}

.story-card-large {
    background-color: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
}

.story-card-large:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 30px var(--shadow-glow);
    border-color: var(--accent-primary);
}

.story-card-large .story-image {
    height: 100%;
    min-height: 250px;
}

.story-card-large .story-content {
    padding: 2rem;
}

.story-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--accent-primary);
    color: var(--text-primary);
    border-radius: 15px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.story-excerpt {
    color: var(--text-secondary);
    margin: 1rem 0;
    line-height: 1.8;
}

.story-meta {
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Page Header */
.page-header {
    padding: 4rem 0 2rem;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-style: italic;
}

/* About Page */
.about-content {
    padding: 3rem 0 5rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.lead {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.author-silhouette {
    width: 200px;
    height: 300px;
    background: linear-gradient(180deg, var(--accent-primary) 0%, transparent 100%);
    border-radius: 50% 50% 0 0;
    opacity: 0.3;
    position: relative;
}

.author-silhouette::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.2;
}

.writing-philosophy {
    margin-top: 4rem;
}

.writing-philosophy h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.philosophy-item {
    background-color: var(--bg-tertiary);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.philosophy-item:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 5px 20px var(--hover-glow);
    transform: translateY(-3px);
}

.philosophy-item h3 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.philosophy-item p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Quote Section */
.quote-section {
    padding: 5rem 0;
    background-color: var(--bg-secondary);
    background-image: 
        linear-gradient(180deg, var(--forest-dark) 0%, var(--bg-secondary) 100%),
        radial-gradient(ellipse at center, rgba(45, 74, 45, 0.1) 0%, transparent 70%);
    text-align: center;
    position: relative;
}

.quote-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
}

.quote-section blockquote {
    font-size: 1.8rem;
    font-style: italic;
    color: var(--text-primary);
    max-width: 800px;
    margin: 0 auto 1rem;
    line-height: 1.8;
    position: relative;
    padding: 2rem;
}

.quote-section blockquote::before,
.quote-section blockquote::after {
    content: '"';
    font-size: 4rem;
    color: var(--accent-primary);
    opacity: 0.2;
    position: absolute;
    text-shadow: 0 0 10px rgba(45, 74, 45, 0.5);
}

.quote-section blockquote::before {
    top: -10px;
    left: 0;
}

.quote-section blockquote::after {
    bottom: -30px;
    right: 0;
}

.quote-author {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Story Page */
.story-page {
    padding: 3rem 0 5rem;
    max-width: 800px;
    margin: 0 auto;
}

.story-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.story-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.story-header .story-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.story-body {
    color: var(--text-secondary);
    line-height: 2;
    font-size: 1.1rem;
}

.story-body p {
    margin-bottom: 1.5rem;
}

.story-body h2 {
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    font-size: 2rem;
}

.story-body h3 {
    color: var(--text-primary);
    margin: 1.5rem 0 1rem;
    font-size: 1.5rem;
}

.story-navigation {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.nav-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-secondary);
    transform: translateX(5px);
}

.nav-link.prev {
    transform: translateX(-5px);
}

.nav-link.prev:hover {
    transform: translateX(-10px);
}

/* Footer */
footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    text-align: center;
    margin-top: 5rem;
}

footer p {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.footer-subtitle {
    font-style: italic;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-secondary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px var(--shadow-dark);
        padding: 2rem 0;
        border-top: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero {
        min-height: 80vh;
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
        margin: 0.5rem 0;
    }

    .forest-background {
        animation: none;
    }

    .fog-overlay {
        animation: none;
    }

    .stories-grid {
        grid-template-columns: 1fr;
    }

    .story-card-large {
        grid-template-columns: 1fr;
    }

    .story-card-large .story-image {
        min-height: 200px;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .philosophy-grid {
        grid-template-columns: 1fr;
    }

    .story-navigation {
        flex-direction: column;
    }

    .quote-section blockquote {
        font-size: 1.4rem;
        padding: 1.5rem;
    }

    .quote-section blockquote::before,
    .quote-section blockquote::after {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 70vh;
        padding: 1.5rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .tagline {
        font-size: 1rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .hero-content {
        padding: 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header {
        padding: 3rem 0 1.5rem;
    }

    .featured-stories h2,
    .writing-philosophy h2 {
        font-size: 2rem;
    }

    .featured-stories {
        padding: 3rem 0;
    }

    .quote-section {
        padding: 3rem 0;
    }

    .quote-section blockquote {
        font-size: 1.2rem;
        padding: 1rem;
        line-height: 1.6;
    }

    .quote-section blockquote::before,
    .quote-section blockquote::after {
        font-size: 2.5rem;
    }

    .story-header h1 {
        font-size: 2rem;
    }

    .story-body {
        font-size: 1rem;
    }

    .story-body h2 {
        font-size: 1.5rem;
    }

    .story-body h3 {
        font-size: 1.2rem;
    }

    .container {
        padding: 0 15px;
    }
}
