/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background-color: rgb(24,24,24);
    color: #ffffff;
    line-height: 1.6;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffffff;
    line-height: 1;
    text-decoration: none;
    transition: text-decoration 0.2s ease;
}

header h1:hover {
    text-decoration: underline;
    cursor: pointer;
}

header h1 a {
    color: #ffffff;
    text-decoration: none;
}

header h1 a:hover {
    color: rgb(234,88,12);
    text-decoration: underline;
}

/* Typewriter effect */
.typewriter {
    white-space: nowrap;
    margin: 0 auto;
    position: relative;
    display: inline-block;
    min-height: 1.2em;
}

.typewriter::before {
    content: "";
    animation: typing 4s steps(10, end) forwards;
}

.typewriter::after {
    content: "|";
    color: #ffffff;
    position: absolute;
    right: -0.6em;
    animation: 
        blink-cursor 1s infinite,
        hide-cursor 0s 9s forwards;
}

@keyframes typing {
    0% { content: ""; }
    10% { content: "{"; }
    20% { content: "{ "; }
    30% { content: "{ x"; }
    40% { content: "{ xm"; }
    50% { content: "{ xmr"; }
    60% { content: "{ xmr."; }
    70% { content: "{ xmr.e"; }
    80% { content: "{ xmr.ee"; }
    90% { content: "{ xmr.ee "; }
    100% { content: "{ xmr.ee }"; }
}

@keyframes blink-cursor {
    from, to { opacity: 0; }
    50% { opacity: 1; }
}

@keyframes hide-cursor {
    to { opacity: 0; }
}

.author-badge {
    display: inline-block;
    background-color: rgb(49,49,49);
    color: #ffffff;
    padding: 5px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
    margin-top: 8px;
    width: auto;
    height: auto;
}

/* Main content */
main {
    margin-top: 20px;
}

/* Article sections */
.article-section {
    margin-bottom: 50px;
    position: relative;
}

.article-section:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent);
}

.article-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #ffffff;
    text-align: center;
}

/* Cards grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 320px));
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
}

/* Card styling - matching the design */
.card {
    background-color: rgb(49,49,49);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
    width: 320px;
    height: 350px;
    display: flex;
    flex-direction: column;
}


.card-header {
    background-color: rgb(234,88,12);
    color: #ffffff;
    padding: 0px 16px;
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
    flex-shrink: 0;
    line-height: 1.3;
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image {
    width: 100%;
    height: calc(100% - 82px);
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
}

.card-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    text-align: center;
    z-index: 2;
}

.read-more-btn {
    display: inline-block;
    background-color: rgb(37,99,235);
    color: #ffffff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    width: 100%;
    text-align: center;
    margin-top: auto;
    flex-shrink: 0;
}

.read-more-btn:hover {
    background-color: rgb(29,78,216);
}

/* Article page styles */
.article-page {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    text-align: center;
    margin-bottom: 30px;
}

.article-category {
    display: inline-block;
    background-color: rgb(234,88,12);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.article-header h1 {
    font-size: 2.2rem;
    color: #ffffff;
    margin-bottom: 10px;
}

.article-date {
    color: #bdc3c7;
    font-size: 0.9rem;
}

.article-image {
    margin-bottom: 30px;
    text-align: center;
}

.article-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.article-content {
    background-color: rgb(49,49,49);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.article-content h1,
.article-content h2,
.article-content h3 {
    color: #ffffff;
    margin-bottom: 15px;
}

.article-content h1 {
    font-size: 1.8rem;
}

.article-content h2 {
    font-size: 1.5rem;
}

.article-content h3 {
    font-size: 1.3rem;
}

.article-content p {
    color: #bdc3c7;
    margin-bottom: 15px;
    line-height: 1.7;
}

.article-content a {
    color: #3498db;
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

.article-content strong {
    color: #ffffff;
}

.article-footer {
    text-align: center;
}

.back-btn {
    display: inline-block;
    background-color: #95a5a6;
    color: #ffffff;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.back-btn:hover {
    background-color: #7f8c8d;
}

/* Error page */
.error-page {
    text-align: center;
    padding: 50px 20px;
}

.error-page h1 {
    color: #e74c3c;
    margin-bottom: 20px;
}

.error-page p {
    color: #bdc3c7;
    margin-bottom: 30px;
}

/* Responsive design */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .article-header h1 {
        font-size: 1.8rem;
    }
    
    .article-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .card-content {
        padding: 15px;
    }
    
    .article-content {
        padding: 15px;
    }
}
