/* ========================================
   andrewgadsden.com — Static Site Styles
   Dark theme, clean typography, responsive
   ======================================== */

:root {
    --bg: #0f1117;
    --bg-card: #1a1d27;
    --bg-card-hover: #222636;
    --text: #e4e4e7;
    --text-muted: #9ca3af;
    --text-heading: #f4f4f5;
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
    --border: #2a2d3a;
    --max-width: 1200px;
    --content-width: 720px;
}

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ---- Layout ---- */

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

/* ---- Header / Nav ---- */

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

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

.site-logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.site-logo:hover {
    color: var(--accent);
}

.site-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.site-nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.site-nav a:hover {
    color: var(--text-heading);
}

/* ---- Hero ---- */

.hero {
    padding: 5rem 0 3rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

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

/* ---- Section headings ---- */

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.section-title a {
    color: var(--text-heading);
}

.section-title a:hover {
    color: var(--accent);
}

/* ---- Project Cards ---- */

.projects-section {
    padding: 2rem 0 3rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.75rem;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.project-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0;
}

.project-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
    flex: 1;
}

.project-card .project-url {
    font-size: 0.8rem;
    color: var(--accent);
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* ---- Private Project Cards ---- */

.project-card-private {
    opacity: 0.45;
    cursor: default;
    border-color: var(--border);
}

.project-card-private:hover {
    background: var(--bg-card);
    border-color: var(--border);
    transform: none;
}

.project-card-private h3 {
    color: var(--text-muted);
}

.project-card-private p {
    color: var(--text-muted);
}

.private-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--border);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    margin-left: 0.6rem;
    vertical-align: middle;
}

/* ---- Writing / Article Cards ---- */

.writing-section {
    padding: 2rem 0 4rem;
    border-top: 1px solid var(--border);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.article-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.article-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.article-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.article-card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.article-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.article-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.view-all {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--accent);
    font-weight: 500;
}

.view-all:hover {
    color: var(--accent-hover);
}

/* ---- Writing Archive ---- */

.archive-header {
    padding: 3rem 0 1.5rem;
}

.archive-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.03em;
}

.archive-section {
    padding: 0 0 4rem;
}

.archive-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.archive-item {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.archive-item:hover {
    background: var(--bg-card);
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 6px;
}

.archive-item-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 6rem;
}

.archive-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
}

.archive-item-title:hover {
    color: var(--accent);
}

/* ---- Article Page ---- */

.article-header {
    padding: 3rem 0 1.5rem;
    max-width: var(--content-width);
    margin: 0 auto;
}

.article-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.03em;
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

.article-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.article-featured-image {
    max-width: var(--content-width);
    margin: 0 auto 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    display: block;
}

.article-body {
    max-width: var(--content-width);
    margin: 0 auto;
    padding-bottom: 4rem;
}

.article-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 2.5rem 0 1rem;
    letter-spacing: -0.02em;
}

.article-body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 2rem 0 0.75rem;
}

.article-body p {
    margin-bottom: 1.25rem;
}

.article-body blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-style: italic;
}

.article-body ul, .article-body ol {
    margin: 1rem 0 1.25rem 1.5rem;
}

.article-body li {
    margin-bottom: 0.4rem;
}

.article-body img {
    border-radius: 6px;
    margin: 1.5rem 0;
}

.article-body a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-nav {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2rem 0 4rem;
    border-top: 1px solid var(--border);
}

.article-nav a {
    font-weight: 500;
}

/* ---- Footer ---- */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---- Mobile ---- */

@media (max-width: 768px) {
    html {
        font-size: 16px;
    }

    .hero {
        padding: 3rem 0 2rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .article-header h1 {
        font-size: 1.7rem;
    }

    .archive-item {
        flex-direction: column;
        gap: 0.2rem;
    }

    .archive-item-date {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .site-header .container {
        flex-direction: column;
        gap: 0.75rem;
    }
}
