:root {
    --bg-color: #080808;
    --text-color: #dcdcdc;
    --accent-color: #333;
    --font-main: 'Inter', sans-serif; /* Replaced custom font with Google Font */
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    z-index: 100;
    mix-blend-mode: difference; /* Ensures text is visible on light/dark bg */
}

.logo { font-size: 20px; font-weight: 500; text-transform: uppercase; }
.menu-btn { cursor: pointer; text-transform: uppercase; font-size: 14px; }

/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-transform: uppercase;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content h1 {
    font-size: clamp(40px, 8vw, 100px);
    line-height: 0.9;
    text-align: center;
    color: #ffffff;
}

.hero-content p {
    font-size: 24px;
    text-align: center;
    margin-top: 20px;
    color: #ffffff;
    opacity: 0.9;
}

.hero-details {
    position: absolute;
    bottom: 40px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    font-size: 12px;
    text-transform: uppercase;
    color: #ffffff;
    z-index: 2;
}

/* Overview Section */
.overview {
    padding: 100px 40px;
    min-height: 60vh;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.col-title { 
    grid-column: span 4; 
}

.col-text { 
    grid-column: span 6; 
    grid-column-start: 6; 
}

.col-text p {
    font-size: 24px;
    line-height: 1.4;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
}

@media (max-width: 768px) {
    .col-title { grid-column: span 12; }
    .col-text { grid-column: span 12; grid-column-start: 1; }
}

/* --- THE STACKING EFFECT (Core Feature) --- */
.stack-wrapper {
    position: relative;
    /* This wrapper holds all cards */
}

.sticky-card {
    height: 100vh;
    width: 100%;
    position: sticky; /* The Magic CSS Property */
    top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-top: 1px solid #222; /* visual separator */
    background-color: var(--bg-color); /* Ensures cards cover each other */
}

/* Background Images for Cards */
.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Dark overlay for dimmed effect */
.card-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65); /* Adjust darkness (0.5-0.8 works well) */
    z-index: 1;
}

/* Specific styling for each card */
#card-1 .card-bg { 
    background-image: url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=1920&q=80');
    /* Replace with your own image URL */
}

#card-2 .card-bg { 
    background-image: url('https://images.unsplash.com/photo-1519681393784-d120267933ba?w=1920&q=80');
}

#card-3 .card-bg { 
    background-image: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920&q=80');
}

/* Fallback colors if images don't load */
#card-1 { background-color: #0f0f0f; }
#card-2 { background-color: #141414; }
#card-3 { background-color: #1a1a1a; }

.card-content {
    position: relative; /* Ensure it sits above the background */
    text-align: center;
    z-index: 2;
    transform: translateY(20px);
    transition: transform 0.5s ease;
    color: var(--text-color); /* Ensure text is visible */
}

.card-content h2 {
    font-size: 80px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.btn-view {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 40px;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 12px;
    transition: background 0.3s, color 0.3s;
}

.btn-view:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* Phase Cards Styling */
.phase-card .card-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phase-label {
    display: block;
    font-size: 12px;
    letter-spacing: 2px;
    opacity: 0.6;
    margin-bottom: 10px;
}

.phase-desc {
    font-size: 18px;
    opacity: 0.8;
    margin-bottom: 20px;
}

.phase-explanation {
    font-size: 14px;
    opacity: 0.7;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Blog Posts Section */
.posts-section {
    padding: 120px 40px;
    background-color: var(--bg-color);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-header h2 {
    font-size: clamp(40px, 6vw, 60px);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.section-header p {
    font-size: 18px;
    opacity: 0.7;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.post-card-layrid {
    background: #0f0f0f;
    border: 1px solid #222;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.post-card-layrid:hover {
    transform: translateY(-5px);
    border-color: #444;
}

.post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

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

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

.post-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.post-card-content {
    padding: 30px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-date {
    opacity: 0.6;
}

.post-category {
    padding: 4px 10px;
    border: 1px solid var(--text-color);
    opacity: 0.8;
}

.post-title {
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 15px;
    font-weight: 500;
}

.post-excerpt {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.7;
    margin-bottom: 20px;
}

.read-more-link {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.post-card-layrid:hover .read-more-link {
    opacity: 1;
}

.empty-state {
    text-align: center;
    padding: 100px 40px;
}

.empty-state h3 {
    font-size: 32px;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 16px;
    opacity: 0.7;
}

/* Footer */
.footer {
    padding: 80px 40px;
    border-top: 1px solid #222;
    background-color: #0a0a0a;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-brand h3 {
    font-size: 24px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 14px;
    opacity: 0.7;
}

.footer-info {
    text-align: right;
}

.footer-info p {
    font-size: 12px;
    opacity: 0.6;
    margin-bottom: 8px;
}

/* Post Page Styling */
.post-page {
    min-height: 100vh;
}

.post-hero {
    width: 100%;
    height: 60vh;
    min-height: 400px;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

.post-hero-image {
    width: 100%;
    height: 100%;
    position: relative;
}

.post-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(8,8,8,1));
}

.post-article {
    padding: 60px 40px 120px;
    background: var(--bg-color);
}

.container-post {
    max-width: 800px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    margin-bottom: 40px;
}

.back-link:hover {
    opacity: 1;
}

.back-link svg {
    width: 16px;
    height: 16px;
}

.post-header-content {
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid #222;
}

.post-meta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-date-header {
    opacity: 0.6;
}

.post-category-header {
    padding: 4px 10px;
    border: 1px solid var(--text-color);
    opacity: 0.8;
}

.post-title-main {
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.2;
    font-weight: 600;
    margin: 0;
}

.post-content-body {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-color);
}

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

.post-content-body strong {
    color: var(--text-color);
    font-weight: 600;
}

.post-content-body em {
    font-style: italic;
    opacity: 0.95;
}

/* Book Recommendations Section */
.book-recommendations-section {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid #222;
}

.book-recommendations-section h2 {
    font-size: 32px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.book-recommendations-intro {
    font-size: 16px;
    opacity: 0.7;
    margin-bottom: 40px;
}

.books-grid-layrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.book-card-layrid {
    background: #0f0f0f;
    border: 1px solid #222;
    padding: 30px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.book-card-layrid:hover {
    transform: translateY(-5px);
    border-color: #444;
}

.book-title-layrid {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 10px;
    font-weight: 600;
}

.book-author-layrid {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 15px;
}

.book-relevance-layrid {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.8;
    margin-bottom: 20px;
}

.book-link-layrid {
    display: inline-block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color);
    text-decoration: none;
    padding: 12px 24px;
    border: 1px solid var(--text-color);
    transition: background 0.3s ease, color 0.3s ease;
}

.book-link-layrid:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* Responsive */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-info {
        text-align: left;
    }
    
    .post-hero {
        height: 40vh;
        min-height: 300px;
    }
    
    .post-article {
        padding: 40px 20px 80px;
    }
    
    .post-title-main {
        font-size: 28px;
    }
    
    .post-content-body {
        font-size: 16px;
    }
    
    .books-grid-layrid {
        grid-template-columns: 1fr;
    }
}