/*
Theme Name: srand.info Child Theme
Template: generatepress
Version: 1.1.0
Description: Child theme for srand.info personal blog
Author: srandall
*/

/* ============================================
   Base Styles - Editorial Design Direction
   ============================================ */

:root {
    --color-text: #2d3748;
    --color-text-light: #718096;
    --color-heading: #1a202c;
    --color-accent: #2b6cb0;
    --color-accent-hover: #1e4e8c;
    --color-bg: #ffffff;
    --color-bg-alt: #f7fafc;
    --color-border: #e2e8f0;
    --font-body:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "SF Mono", "Monaco", "Inconsolata", "Fira Mono", monospace;
    --max-width: 1200px;
    --content-width: 720px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
}

/* ============================================
   Typography - Editorial / Journal Style
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-heading);
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}
h2 {
    font-size: 1.875rem;
}
h3 {
    font-size: 1.5rem;
}

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

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

/* Code blocks */
pre,
code {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

pre {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 1.5rem;
    overflow-x: auto;
}

code {
    background: var(--color-bg-alt);
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

pre code {
    background: none;
    padding: 0;
}

/* ============================================
   Navigation - Projects Dropdown
   ============================================ */

.projects-dropdown {
    position: relative;
}

.projects-dropdown > a {
    cursor: pointer;
}

.projects-dropdown .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    padding: 0.5rem 0;
    z-index: 1000;
    list-style: none;
    margin: 0;
}

.projects-dropdown:hover .sub-menu,
.projects-dropdown:focus-within .sub-menu {
    display: block;
}

.projects-dropdown .sub-menu li {
    margin: 0;
}

.projects-dropdown .sub-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-text);
}

.projects-dropdown .sub-menu a:hover {
    background: var(--color-bg-alt);
    color: var(--color-accent);
}

/* ============================================
   Project Page Template Styles
   ============================================ */

/* Project Overview Section */
.project-overview {
    margin-bottom: 4rem;
}

.project-meta {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--color-bg-alt);
    border-left: 4px solid var(--color-accent);
    border-radius: 4px;
}

.project-stack {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--color-accent);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.project-link:hover {
    background: var(--color-accent-hover);
    color: white;
}

/* Project Posts Section */
.project-posts {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--color-border);
}

.project-posts-heading {
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--color-heading);
}

/* Posts Grid Layout */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Individual Post Card */
.post-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.post-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--color-bg-alt);
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.post-card-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
}

.post-card-title a {
    color: var(--color-heading);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.post-card-meta {
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.post-card-excerpt {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text);
}

.post-card-link {
    display: inline-block;
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.post-card-link:hover {
    color: var(--color-accent-hover);
}

/* Responsive Design */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-posts-heading {
        font-size: 1.5rem;
    }

    .project-links {
        flex-direction: column;
    }

    .project-link {
        text-align: center;
    }
}

/* Notice when no category specified */
.project-posts-notice {
    margin-top: 2rem;
    padding: 1rem;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

/* ============================================
   Homepage / Front Page Styles
   ============================================ */

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

/* Hero / Personal Statement */
.home-hero {
    max-width: var(--content-width);
    margin: 0 auto 4rem;
    text-align: center;
}

.hero-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.hero-content p:first-child {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-heading);
}

/* Section Headings */
.section-heading {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

/* Featured Projects Grid */
.home-projects {
    margin-bottom: 4rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.project-card {
    display: block;
    padding: 1.5rem;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-card-title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    color: var(--color-heading);
}

.project-card-description {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

.project-card-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-accent);
}

/* Latest Posts Section */
.home-posts {
    margin-bottom: 4rem;
}

.post-card-project {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.no-posts-message {
    text-align: center;
    color: var(--color-text-light);
    font-style: italic;
}

/* ============================================
   Single Post Styles
   ============================================ */

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

.single-post .entry-header {
    margin-bottom: 2rem;
    text-align: center;
}

.single-post .entry-title {
    margin-bottom: 1rem;
}

.single-post .entry-meta {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.single-post .entry-meta .entry-date {
    margin-right: 1rem;
}

.single-post .entry-project {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-bg-alt);
    border-radius: 4px;
    font-size: 0.85rem;
}

.single-post .entry-project a {
    color: var(--color-accent);
    text-decoration: none;
}

.single-post .entry-thumbnail {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.single-post .entry-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.single-post .entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.single-post .entry-content p {
    margin-bottom: 1.5rem;
}

.single-post .entry-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.single-post .entry-tags {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.single-post .entry-tags a {
    color: var(--color-accent);
}

/* ============================================
   Related Projects Section (on posts)
   ============================================ */

.related-projects {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--color-bg-alt);
    border-radius: 8px;
}

.related-projects-heading {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--color-heading);
}

.related-projects-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-project-link {
    display: block;
    padding: 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    text-decoration: none;
    transition: border-color 0.2s ease;
}

.related-project-link:hover {
    border-color: var(--color-accent);
}

.related-project-link .project-name {
    display: block;
    font-weight: 600;
    color: var(--color-heading);
    margin-bottom: 0.25rem;
}

.related-project-link .project-description {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ============================================
   Post Navigation
   ============================================ */

.post-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation .nav-subtitle {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    margin-bottom: 0.25rem;
}

.post-navigation .nav-title {
    font-weight: 600;
    color: var(--color-accent);
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
    :root {
        --content-width: 100%;
    }

    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    h3 {
        font-size: 1.25rem;
    }

    .front-page,
    .single-post {
        padding: 1rem;
    }

    .hero-content p:first-child {
        font-size: 1.25rem;
    }

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

    .post-navigation .nav-links {
        flex-direction: column;
    }

    .post-navigation .nav-next {
        text-align: left;
    }
}
