.post-card {
    position: relative;
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    flex: 0 0 auto; /* Allow post cards to maintain their natural size */
    width: 270px; /* Reduced by 10% from 300px */
    margin: 0 10px; /* Add margin for spacing between cards */
    box-sizing: border-box;
    padding: 10px;
    height: 400px; /* Increase height to accommodate more text */
    /* Remove box-shadow and animation for better performance */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Remove the transform on hover since we'll use different effects */
.post-card:hover {
    transform: none;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.2),
        0 0 30px rgba(79, 70, 229, 0.15),
        0 0 50px rgba(168, 85, 247, 0.15);
}

/* Add a pseudo-element for the border animation */
.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 2px; /* Border width */
    background: linear-gradient(
        45deg,
        #ff3366,
        #00ccff,
        #ff3366
    );
    background-size: 200% 200%;
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    /* Removed the animation for better performance */
}

/* Add a subtle glow effect on hover */
.post-card:hover::before {
    opacity: 1;
}

/* Add a subtle background glow */
.post-card:hover {
    background: radial-gradient(
        circle at center,
        rgba(40, 40, 40, 1) 0%,
        rgba(26, 26, 26, 1) 100%
    );
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Ensure the content stays above the border animation */
.post-card > * {
    position: relative;
    z-index: 1;
}

.spanreed-animation {
    width: 100%;
    height: 200px;
    position: relative;
    background: #000;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}

.typing-container {
    position: absolute;
    width: 65%;
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 20px;
    font-family: 'Courier New', monospace;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    overflow: hidden;
}

.spanreed-frame {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    height: 150px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.spanreed-text {
    font-family: monospace;
    color: #fff;
    font-size: 14px;
    white-space: pre;
}

.spanreed-particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s infinite;
}

.spanreed-particle:nth-child(1) { width: 60px; height: 60px; left: 10%; top: 20%; animation-delay: 0s; }
.spanreed-particle:nth-child(2) { width: 40px; height: 40px; left: 30%; top: 50%; animation-delay: 1s; }
.spanreed-particle:nth-child(3) { width: 70px; height: 70px; left: 50%; top: 30%; animation-delay: 2s; }
.spanreed-particle:nth-child(4) { width: 50px; height: 50px; left: 70%; top: 60%; animation-delay: 3s; }
.spanreed-particle:nth-child(5) { width: 45px; height: 45px; left: 80%; top: 40%; animation-delay: 4s; }
.spanreed-particle:nth-child(6) { width: 55px; height: 55px; left: 20%; top: 70%; animation-delay: 5s; }

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-20px) translateX(10px);
    }
}

.spanreed-animation canvas {
    position: absolute;
    right: -35px;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    height: 120px;
    border-radius: 4px;
}

@keyframes backgroundMove {
    0% {
        background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    }
    100% {
        background-position: -400px -400px, -400px -390px, -390px -410px, -410px -400px;
    }
}

.typing-text {
    width: 400px;
    white-space: pre-wrap;
    line-height: 0.9;
}

.typing-line {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid transparent;
    margin-bottom: -4px;
    height: 12px;
}

.typing-line:last-child {
    border-right: 2px solid rgba(255, 255, 255, 0.8);
    animation: blink 0.75s step-end infinite;
}

/* Letter by letter typing with loop */
.typing-line:nth-child(1) { 
    animation: typeLine1 8s steps(10) infinite;
    opacity: 0;
}
.typing-line:nth-child(2) { 
    animation: typeLine2 8s steps(25) infinite;
    opacity: 0;
}
.typing-line:nth-child(3) { 
    animation: typeLine3 8s steps(27) infinite;
    opacity: 0;
}

@keyframes typeLine1 {
    0% { width: 0; opacity: 0; }
    2% { width: 0; opacity: 1; }
    25% { width: 100%; opacity: 1; }
    85% { width: 100%; opacity: 1; }
    90% { width: 0; opacity: 0; }
    100% { width: 0; opacity: 0; }
}

@keyframes typeLine2 {
    0%, 25% { width: 0; opacity: 0; }
    27% { width: 0; opacity: 1; }
    50% { width: 100%; opacity: 1; }
    85% { width: 100%; opacity: 1; }
    90% { width: 0; opacity: 0; }
    100% { width: 0; opacity: 0; }
}

@keyframes typeLine3 {
    0%, 50% { width: 0; opacity: 0; }
    52% { width: 0; opacity: 1; }
    75% { width: 100%; opacity: 1; }
    85% { width: 100%; opacity: 1; }
    90% { width: 0; opacity: 0; }
    100% { width: 0; opacity: 0; }
}

@keyframes blink {
    from, to { border-color: transparent }
    50% { border-color: rgba(255, 255, 255, 0.8); }
}

/* Add grid layout styles at the top of the file */
.posts-grid {
    display: flex;
    width: max-content; /* Allow grid to accommodate all cards */
    overflow: visible; /* Allow grid to expand based on content */
    transition: transform 0.5s ease;
    padding: 0 10px; /* Add padding to prevent cards from touching edges */
}

.post-card {
    flex: 0 0 auto; /* Let cards maintain their natural size */
    box-sizing: border-box;
    margin: 0 10px; /* Add margin between cards */
    width: 270px; /* Reduced by 10% from 300px */
    height: 400px; /* Fixed height for consistent sizing */
    transform: scale(0.95);
    transition: 
        transform 0.4s ease,
        box-shadow 0.4s ease,
        background-color 0.4s ease;
}

/* Add a scale effect for the active/center card */
.post-card.active {
    transform: scale(1);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(79, 70, 229, 0.2),
        0 0 60px rgba(168, 85, 247, 0.2);
}

/* Add hover effect for post cards */
.post-card:hover {
    transform: scale(1) translateY(-5px);
    z-index: 5;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 0 50px rgba(79, 70, 229, 0.25),
        0 0 70px rgba(168, 85, 247, 0.25);
}

.vibecoding-canvas-container {
    width: 100%;
    height: 200px;
    position: relative;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.vibecoding-canvas-container canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
}

.vibecoding-image-container {
    width: 100%;
    height: 200px;
    position: relative;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.vibecoding-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.post-card:hover .vibecoding-thumbnail {
    transform: scale(1.05);
}

.posts-section {
    position: relative;
    padding-top: 0;
    margin-top: 0;
    background: none;
}

.posts-header {
    width: 100%;
    display: flex;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto 40px;     /* Increased from 20px to 40px */
    padding: 0 20px;
}

.posts-title {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 2px;
    margin: 30px 0 0px 0;    /* Added 20px top margin, kept 40px bottom margin */
    padding: 0;
    display: inline-block;
}

.posts-grid {
    position: relative;
    z-index: 2;
}

.post-card {
    transform: translateZ(0);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    background: rgba(20, 18, 35, 0.8); /* Blended blue-magenta background */
}

.post-card:hover {
    transform: translateZ(10px);
    background: rgba(25, 20, 40, 0.9); /* Slightly lighter on hover */
    box-shadow: 
        0 0 30px rgba(88, 65, 255, 0.05),  /* Blue glow */
        0 0 50px rgba(255, 61, 255, 0.03);  /* Magenta glow */
}

body {
    min-height: 100vh;  /* Make body at least full viewport height */
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

/* Push footer to bottom by making main content grow */
.index-page-title-container,
.posts-section {
    flex: 1;  /* Allow these sections to grow */
}

.footer {
    padding: 20px 0;
    width: 100%;
    position: relative;
    margin-top: 40px;           /* Reduced from 80px */
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(88, 65, 255, 0.2) 30%,
        rgba(255, 61, 255, 0.2) 50%,
        rgba(88, 65, 255, 0.2) 70%,
        transparent 100%
    );
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(20, 18, 35, 0.4) 20%,
        rgba(20, 18, 35, 0.4) 80%,
        transparent 100%
    );
    backdrop-filter: blur(10px);
}

.footer-nav {
    display: flex;
    justify-content: center;  /* Changed back from flex-direction: column */
    align-items: center;
    padding: 10px 0;
}

.footer-links {
    display: flex;
    gap: 40px;  /* Increased gap between links */
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    padding: 5px 10px;
}

.footer-link:hover {
    color: rgba(255, 255, 255, 1);
}

/* Add this to adjust the hero container spacing */
.hero-container {
    margin-bottom: 20px;      /* Reduced bottom margin */
}

.posts-header {
    margin-bottom: 30px;      /* Reduced from 40px */
}

/* Add styles for the posts scroller */
.posts-scroller {
    width: 100%;
    position: relative; /* Needed to position buttons */
    overflow: hidden; /* Hide overflow so we can control scrolling via JS */
    padding: 0 40px; /* Add space for the buttons */
    box-sizing: border-box;
}

/* Hide scrollbar for webkit browsers */
.posts-scroller::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for other browsers */
.posts-scroller {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.scroll-button {
    height: 400px; /* Match the height of the post cards */
    width: 60px; /* Wider buttons for easier clicking */
    top: 0; /* Align with the top of the container */
    bottom: 0; /* Extend to the bottom of the container */
    background: rgba(0, 0, 0, 0.3); /* Semi-transparent background */
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    position: absolute;
    z-index: 10;
    opacity: 0.3; /* Start with low opacity */
    transition: 
        opacity 0.3s ease, 
        background 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-button:hover {
    background: rgba(0, 0, 0, 0.5); /* Darker on hover */
    opacity: 0.8; /* Increase opacity on hover */
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.scroll-button:active {
    opacity: 1; /* Full opacity when clicked */
    transform: scale(0.95);
}

.scroll-button.left {
    left: 0;
    border-radius: 0 4px 4px 0; /* Round the right corners */
}

.scroll-button.right {
    right: 0;
    border-radius: 4px 0 0 4px; /* Round the left corners */
}

/* Ensure the description text has enough space */
.post-card p {
    margin: 10px 0;
    font-size: 1em; /* Adjust font size if needed */
    line-height: 1.4; /* Ensure good readability */
}

/* Simple styling for the button pulse state */
.scroll-button.pulse {
    background: rgba(20, 18, 35, 0.6);
} 