/* ==========================================================================
   ArcFox - Main Stylesheet
   ========================================================================== */

@import 'variables.css';

/* -- Reset & Base -- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-void);
    color: var(--color-text-main);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* -- Typography -- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: var(--color-text-main);
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.8rem;
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

p {
    margin-bottom: var(--space-md);
    color: var(--color-text-main);
    /* Ensure readability */
}

a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
    transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* -- Layout Utilities -- */
.container {
    width: 100%;
    max-width: var(--container-width-wide);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-reading {
    max-width: var(--container-width-reading);
}

/* -- Components: Header -- */
.site-header {
    height: var(--header-height);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.brand {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
    border: none;
    /* No underline for brand */
}

.nav-links {
    display: flex;
    gap: var(--space-md);
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    color: var(--color-text-dim);
    border: none;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-text-main);
}

/* -- Components: Hero / Section -- */
.hero {
    padding: var(--space-2xl) 0;
    border-bottom: 1px solid var(--color-border);
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--color-text-dim);
    max-width: 600px;
}

/* -- Components: Grid -- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.card {
    background-color: var(--color-onyx);
    border: 1px solid var(--color-border);
    transition: transform 0.2s var(--ease);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--color-text-dim);
}

.card-image {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    border-bottom: 1px solid var(--color-border);
}

.card-content {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: var(--space-sm);
    display: block;
    border: none;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--color-text-dim);
    margin-bottom: var(--space-md);
    font-family: var(--font-mono);
}

/* -- Components: Footer -- */
.site-footer {
    margin-top: auto;
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-dim);
    font-size: 0.9rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* -- Utility: Text -- */
.text-dim {
    color: var(--color-text-dim);
}

.text-mono {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

/* -- Components: Mobile Menu -- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-xs);
    z-index: 1001;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: rgba(10, 10, 10, 0.98);
        padding: var(--space-md);
        border-bottom: 1px solid var(--color-border);
        gap: var(--space-md);
        text-align: center;
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s var(--ease);
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: var(--space-sm) 0;
        font-size: 1.1rem;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}