/*
Theme Name: James Bleifus
Theme URI: https://bleifus.com
Author: James Bleifus
Description: A minimal, privacy-first WordPress theme with self-hosted fonts and advanced customization.
Version: 2.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: james-bleifus
*/

/* --- Self-Hosted Fonts (Privacy First: No Google Calls) --- */

/* Cormorant Garamond */
@font-face {
    font-family: 'Cormorant Garamond';
    src: url('fonts/CormorantGaramond-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Cormorant Garamond';
    src: url('fonts/CormorantGaramond-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Cormorant Garamond';
    src: url('fonts/CormorantGaramond-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Cormorant Garamond';
    src: url('fonts/CormorantGaramond-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* EB Garamond */
@font-face {
    font-family: 'EB Garamond';
    src: url('fonts/EBGaramond-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'EB Garamond';
    src: url('fonts/EBGaramond-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'EB Garamond';
    src: url('fonts/EBGaramond-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'EB Garamond';
    src: url('fonts/EBGaramond-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* --- CSS Variables (Defaults, overridden by Customizer) --- */
:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --heading-color: #1a1a1a;
    --link-color: #333333;
    --link-hover-color: #000000;
    --font-headline: 'Cormorant Garamond', serif;
    --font-body: 'EB Garamond', serif;
}

/* --- Base Styles --- */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.65;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.site-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
.site-header {
    text-align: center;
    padding: 4rem 0 2rem;
}

.site-title {
    font-family: var(--font-headline);
    font-size: 4.5rem;
    font-weight: 400;
    font-style: normal;
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--heading-color);
}

.site-title a {
    text-decoration: none;
    color: inherit;
}

.site-title a:hover {
    opacity: 0.8;
}

/* --- Navigation --- */
.main-navigation {
    margin-top: 1rem;
}

.main-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.main-navigation a {
    font-family: var(--font-headline);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--link-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.main-navigation a:hover {
    color: var(--link-hover-color);
}

/* --- Main Content --- */
#primary {
    margin-top: 6rem;
}

.post-item {
    margin-bottom: 4rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 2.5rem;
}

.post-item:last-child {
    border-bottom: none;
}

.post-meta {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1rem;
    font-style: italic;
    font-family: var(--font-body);
}

.post-title {
    font-family: var(--font-headline);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
    color: var(--heading-color); /* Ensures it uses the Heading Color, not Link Color */
    text-decoration: none;       /* Removes underline */
    font-weight: inherit;        /* Allows Customizer to control weight */
    font-size: inherit;          /* Allows Customizer to control size */
    font-style: inherit;         /* Allows Customizer to control style */
}

/* Specifically target the link INSIDE the post title to remove link styles */
.post-title a {
    color: inherit;              /* Takes the color from .post-title */
    text-decoration: none;       /* Ensures no underline on the link */
    transition: opacity 0.2s ease;
}

.post-title a:hover {
    opacity: 0.8;                /* Subtle hover effect instead of underline */
}

.entry-content {
    font-size: 1.15rem;
    margin-top: 2rem;
    color: var(--text-color);
}

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

.entry-content a {
    color: var(--link-color);
    text-decoration: underline;
}

.entry-content a:hover {
    color: var(--link-hover-color);
    text-decoration: none;
}

/* --- Pagination --- */
.pagination {
    margin-top: 3rem;
    text-align: center;
}

.pagination .nav-links a {
    font-family: var(--font-headline);
    font-size: 1.1rem;
    text-decoration: none;
    color: var(--link-color);
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 2px;
    margin: 0 0.2rem;
}

.pagination .nav-links a:hover {
    background: #f9f9f9;
    border-color: #bbb;
}

/* --- Footer --- */
.site-footer {
    margin-top: 4rem;
    padding: 3rem 0;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #777;
}

.footer-left p {
    margin: 0;
}

.footer-right {
    min-width: 200px;
}

.footer-right .search-form {
    display: flex;
    gap: 0.5rem;
}

.footer-right .search-field {
    flex-grow: 1;
    padding: 0.4rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 0.85rem;
}

.footer-right .search-submit {
    padding: 0.4rem 1rem;
    background: var(--text-color);
    color: var(--bg-color);
    border: none;
    border-radius: 2px;
    cursor: pointer;
}

/* --- Newsletter Page --- */
.newsletter-signup {
    max-width: 500px;
    margin: 60px auto;
    text-align: center;
}

.newsletter-signup .post-title {
    margin-bottom: 10px;
}

.newsletter-intro {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 30px;
}

.newsletter-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.newsletter-form input[type="email"] {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 15px;
    font-family: var(--font-body);
}

.newsletter-form input[type="submit"] {
    padding: 12px 30px;
    font-size: 1em;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-body);
}

.newsletter-form input[type="submit"]:hover {
    background-color: #555;
}

.privacy-note {
    margin-top: 25px;
    font-size: 0.85em;
    color: #999;
    line-height: 1.5;
}
