:root {
    --mars-orange: #ffb347;
    --mars-dust: #e2a76f;
    --space-black: #0d0d0d;
    --crater-gray: #1a1a1a;
    --text-light: #f0f0f0;
    --text-dim: #a0a0a0;
    --acc-orange: rgba(255, 179, 71, 0.2);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--space-black);
    color: var(--text-light);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Nav */
header {
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    background: rgba(13, 13, 13, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    transition: padding 0.3s ease, background 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--mars-orange);
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo span {
    color: var(--text-dim);
}

.logo-container {
    display: flex;
    flex-direction: column;
}

.author-credit {
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.2rem;
    opacity: 0.6;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
}

.nav-links>a:first-of-type {
    margin-left: 0;
}

.nav-links a:hover {
    color: var(--mars-orange);
    opacity: 1;
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    text-align: center;
    background: linear-gradient(to bottom, rgba(13, 13, 13, 0.8), var(--space-black)), url('/static/mars_bg.jpg');
    background-size: cover;
    background-position: center;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--mars-orange);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.search-container {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    background: var(--crater-gray);
    padding: 0.5rem;
    border-radius: 50px;
}

.search-container input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 0.8rem 1.5rem;
    outline: none;
}

.search-container button {
    background: var(--mars-orange);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    color: var(--space-black);
    font-weight: 600;
    cursor: pointer;
}

/* Stats Widget */
.stats-grid {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 4rem;
}

.stat-item .value {
    display: block;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--mars-orange);
}

.stat-item .label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    font-size: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.lang-switcher:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 179, 71, 0.2);
}

.lang-switcher a {
    color: var(--text-dim) !important;
    font-weight: 700;
    margin-left: 0 !important;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.lang-switcher a.active {
    color: var(--mars-orange) !important;
}

.lang-switcher .sep {
    color: rgba(255, 255, 255, 0.1);
    font-weight: 300;
}

/* Post Grid */
.posts-section {
    padding: 5rem 0;
    max-width: 600px;
    margin: 0 auto;
}

.post-card-wrapper {
    margin-bottom: 5rem;
}

.post-card {
    background: var(--crater-gray);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s;
    border: 1px solid #222;
}

.post-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 179, 71, 0.1);
}

.post-visual {
    display: block;
    width: 100%;
    height: 380px;
    /* Reduced from 450px */
    background: #000;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.media-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.post-visual:hover .media-content {
    transform: scale(1.08);
}

.post-card-content {
    padding: 2.5rem;
    /* Reduced from 3rem */
}

.post-meta-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--mars-orange);
    font-weight: 600;
}

.post-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 1.5rem;
}

.post-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    /* Reduced from 2.8rem */
    line-height: 1.3;
    transition: color 0.3s;
}

.post-title-link:hover h2 {
    color: var(--mars-orange);
}

.post-excerpt {
    font-size: 1rem;
    /* Reduced from 1.1rem */
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 2rem;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    /* Reduced clamp */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-block;
    margin-top: 1.5rem;
    font-weight: 700;
    color: var(--mars-orange);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-decoration: none;
    transition: transform 0.3s;
}

.read-more:hover {
    transform: translateX(8px);
}

/* Footer */
footer {
    padding: 5rem 0 2rem;
    background: var(--crater-gray);
    margin-top: 5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-subscribe input {
    width: 100%;
    background: var(--space-black);
    border: 1px solid #333;
    padding: 1rem;
    color: white;
    margin: 1rem 0;
    border-radius: 8px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 2rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Social Actions Bar */
.post-actions-bar {
    display: flex;
    flex-wrap: wrap;
    /* Added for responsiveness */
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.action-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    border-color: rgba(255, 179, 71, 0.4);
    color: var(--mars-orange);
    background: rgba(255, 179, 71, 0.1);
    transform: translateY(-2px);
}

.action-btn .icon {
    font-size: 0.9rem;
}

.action-btn.liked {
    background: var(--mars-orange);
    color: var(--space-black);
    border-color: var(--mars-orange);
    box-shadow: 0 0 15px rgba(255, 179, 71, 0.3);
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--crater-gray);
    padding: 3rem;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    border: 1px solid #333;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.8rem;
    cursor: pointer;
}

.modal-content h2 {
    font-family: 'Playfair Display', serif;
    color: var(--mars-orange);
    margin-bottom: 1rem;
}

.modal-content p {
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-form input {
    background: var(--space-black);
    border: 1px solid #333;
    padding: 1rem;
    border-radius: 10px;
    color: white;
    outline: none;
}

.modal-form button {
    background: var(--mars-orange);
    color: var(--space-black);
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 600px) {
    .post-card h2 {
        font-size: 2rem;
    }

    .post-card-content {
        padding: 2rem;
    }
}