/* ==========================================================================
   1. CSS Variables & Global Styles
   ========================================================================== */

:root {
    --color-background: #0a0a0a;
    --color-secondary-bg: #121212;
    --color-text-primary: #ffffff;
    --color-text-secondary: #a3a3a3;
    --color-border: #262626;
    --color-primary-btn: #ffffff;
    --color-primary-btn-text: #000000;
    --color-danger: #e53e3e;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --container-width: 1120px;
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-background);
    color: var(--color-text-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   2. Utility & Component Styles
   ========================================================================== */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    letter-spacing: -1px;
    color: var(--color-text-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.btn-primary {
    background-color: var(--color-primary-btn);
    color: var(--color-primary-btn-text);
}

.btn-primary:hover {
    opacity: 0.85;
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text-primary);
    border-color: var(--color-border);
}

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

.btn-danger {
    background-color: transparent;
    color: var(--color-danger);
    border-color: var(--color-danger);
}

.btn-danger:hover {
    background-color: var(--color-danger);
    color: var(--color-text-primary);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* --- Back Button Style (Moved Here) --- */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

.btn-back:hover {
    color: var(--color-text-primary);
}


/* ==========================================================================
   3. Header & Navigation
   ========================================================================== */

.main-header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem; /* Adjust the space between buttons here */
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -1.5px;
    text-decoration: none;
    color: var(--color-text-primary);
}

.sticky-nav {
    position: sticky;
    top: 0;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
}

.sticky-nav .container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 2rem;
}

.sticky-nav nav ul {
    list-style: none;
    display: flex;
}

.sticky-nav nav a {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color var(--transition-speed) ease;
}

.sticky-nav nav a:hover {
    color: var(--color-text-primary);
}

.nav-welcome-message {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap; /* Prevents the text from wrapping on smaller screens */
    cursor: default; /* Makes the cursor a pointer, not a hand */
}

/* ==========================================================================
   4. Page Sections
   ========================================================================== */

.hero {
    padding: 6rem 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

#shuffling-text {
    transition: opacity 0.4s ease-in-out;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; 
}

.hero-image .hero-img-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    opacity: 0;
    transition: opacity 400ms ease-in-out;
}

.hero-image .hero-img-layer.is-active {
    opacity: 1;
}

.fade-out {
    opacity: 0;
}

#blog {
    background-color: var(--color-secondary-bg);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.blog-card {
    display: block;
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--color-text-secondary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.blog-card h3 {
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.blog-card p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.blog-card-date {
    font-size: 0.85rem;
    color: #666;
}

.no-posts-message {
    text-align: center;
    grid-column: 1 / -1;
}

.roadmap-section {
    background-color: var(--color-background);
    background-image: 
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 2rem 2rem;
}

.timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    list-style: none;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: var(--color-border);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 1rem 2.5rem;
    margin-bottom: 1rem;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    top: 1.5rem;
    width: 16px;
    height: 16px;
    background-color: var(--color-background);
    border: 3px solid var(--color-text-primary);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.timeline-item:nth-child(odd)::after {
    right: -8px;
}

.timeline-item:nth-child(even)::after {
    left: -8px;
}

.timeline-content {
    padding: 1rem 1.5rem;
    background-color: var(--color-secondary-bg);
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.timeline-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--color-text-primary);
}

.timeline-content p {
    font-size: 0.9rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.feature-card {
    background-color: var(--color-secondary-bg);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.feature-card .icon {
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
    font-size: 2rem;
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

.feature-card ul {
    list-style: disc;
    padding-left: 1.2rem;
}

.feature-card ul li {
    margin-bottom: 0.5rem;
}

.feature-card a {
    color: var(--color-text-primary);
    text-decoration: underline;
}

/* ==========================================================================
   5. Footer
   ========================================================================== */

.main-footer {
    padding: 3rem 0;
    border-top: 1px solid var(--color-border);
}

.main-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.footer-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color var(--transition-speed) ease;
}

.footer-links a:hover {
    color: var(--color-text-primary);
}

/* ==========================================================================
   6. Blog Post Page
   ========================================================================== */

.blog-post-body {
    padding: 6rem 0;
}

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

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

.blog-post-container .post-meta {
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
}

.blog-post-container p,
.blog-post-container ul {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.blog-post-container h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
}

.blog-post-container pre {
    background: var(--color-secondary-bg);
    padding: 1.5rem;
    border-radius: 5px;
    overflow-x: auto;
    border: 1px solid var(--color-border);
}

/* ==========================================================================
   7. Responsive Design
   ========================================================================== */

@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-image {
        order: -1;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    .section {
        padding: 4rem 0;
    }
    .section-title {
        font-size: 2rem;
        margin-bottom: 3rem;
    }
    .hero-content h1 {
        font-size: 2.8rem;
    }
    .sticky-nav nav a {
        padding: 0.8rem 1rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .main-footer .container {
        flex-direction: column;
        gap: 1rem;
    }
    .footer-links a {
        margin: 0 0.75rem;
    }
    .timeline::before {
        left: 10px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 2.5rem;
        padding-right: 1rem;
    }
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        text-align: left;
    }
    .timeline-item::after,
    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 2px;
    }
    .nav-welcome-message {
        display: none;
    }
    .header-actions {
        flex-grow: 1;
        justify-content: center;
    }
}

/* ==========================================================================
   8. Admin & Dashboard
   ========================================================================== */

.admin-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-container,
.dashboard-container {
    background-color: var(--color-secondary-bg);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    width: 100%;
    max-width: 500px;
    color: var(--color-text-primary);
}

.dashboard-container {
    max-width: 900px;
}

.login-container h2,
.dashboard-header h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text-primary);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-text-primary);
}

.flash-message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
    border: 1px solid transparent;
}

.flash-message.success {
    background-color: rgba(0, 245, 122, 0.1);
    color: #00F57A;
    border-color: rgba(0, 245, 122, 0.3);
}

.flash-message.error {
    background-color: rgba(229, 62, 62, 0.1);
    color: var(--color-danger);
    border-color: rgba(229, 62, 62, 0.3);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.dashboard-section {
    background-color: var(--color-background);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid var(--color-border);
}

.dashboard-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--color-text-primary);
}

.upload-form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.upload-form input[type="file"] {
    flex-grow: 1;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

th {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

td small {
    display: block;
    color: #666;
    font-size: 0.8rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.status-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.visible {
    background-color: rgba(0, 245, 122, 0.1);
    color: #00F57A;
}

.status-badge.hidden {
    background-color: rgba(163, 163, 163, 0.1);
    color: var(--color-text-secondary);
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.asset-card {
    background-color: var(--color-secondary-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}

.asset-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background-color: var(--color-background);
}

.asset-info {
    padding: 0.75rem;
}

.asset-filename {
    font-size: 0.8rem;
    word-break: break-all;
    margin-bottom: 0.75rem;
}

.asset-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ==========================================================================
   9. Roadmap - Final Item Styling
   ========================================================================== */

/* Target the second to last item (the trophy) to force it to be centered */
.timeline-item:nth-last-child(2) {
    width: 100%;
    left: 0;
    padding-top: 2rem;
    padding-bottom: 0;
}

/* The content wrapper for the trophy and text */
.timeline-end-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* The white circle containing the icon */
.timeline-end-item .icon-container {
    width: 70px;
    height: 70px;
    background-color: var(--color-primary-btn);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.5), 0 0 10px rgba(255, 255, 255, 0.3) inset;
}

/* The trophy icon itself */
.timeline-end-item .icon-container i {
    color: var(--color-primary-btn-text);
    font-size: 1.8rem;
}

/* The "Dream Job" text */
.timeline-end-item h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-top: 1rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Hide the default dot marker for the trophy item */
.timeline-item:nth-last-child(2)::after {
    display: none;
}

/* Target the very last item (the message box) to force it to be centered */
.timeline-item:last-child {
    width: 100%;
    left: 0;
    text-align: center; /* Center the content box */
    padding-bottom: 0;
}

/* Style the message box itself */
.timeline-item:last-child .timeline-content {
    display: inline-block; /* Allows the box to be centered */
    width: auto; /* Let content define the width */
    max-width: 350px; /* Set a max width */
    text-align: center;
}

/* Hide the dot for the final message box */
.timeline-item:last-child::after {
    display: none;
}