/*
Theme Name: Hubert Mann Theme
Theme URI: https://hubertmann.com/
Author: Hubert Mann
Description: A modern, minimalist editorial theme built on the principle of Aesthetic Utility.
Version: 1.6.6
Text Domain: hubertmann
Domain Path: /languages
Updated: April 25, 2026 - Enqueued theme stylesheet and hardened post typography
*/

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    selection-background-color: #10b981;
    selection-color: #fafaf9;
    font-size: 16px; /* Improved from default */
    line-height: 1.6; /* Better readability */
}

/* ============================================
   TYPOGRAPHY IMPROVEMENTS (Phase 1)
   ============================================ */

/* Article content - improved readability */
article p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 1.5em;
    letter-spacing: 0.3px;
}

article h1, article h2, article h3, article h4, article h5, article h6 {
    line-height: 1.4;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    font-weight: 700;
}

article h1 {
    margin-top: 0; /* No top margin for first heading */
}

article h2 {
    margin-top: 1.75em;
    padding-bottom: 0.5em;
}

article h3 {
    margin-top: 1.5em;
}

article h4 {
    margin-top: 1.25em;
    font-size: 1.1em;
}

/* Improve paragraph spacing in articles */
article p + p {
    margin-top: 0;
}

/* Better link styling */
article a {
    color: #0066cc;
    text-decoration: underline;
    transition: color 0.2s ease;
}

article a:hover {
    color: #b45309; /* Amber accent */
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid #b45309;
    outline-offset: 2px;
}

/* ============================================
   LAYOUT IMPROVEMENTS (Phase 2)
   ============================================ */

/* Improved content layout for desktop */
@media (min-width: 1024px) {
    .article-main {
        max-width: 800px;
    }

    .article-sidebar {
        position: sticky;
        top: 100px;
        height: fit-content;
    }

    .single-post header,
    .single-post .post-header,
    .single-post article > header {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }

    .single-post article > header .max-w-4xl,
    .single-post article > header .max-w-7xl {
        max-width: 80rem;
    }

    .single-post article > header h1 {
        white-space: nowrap;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* Skip-to-content link already in header.php */

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Image styling improvements */
article img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5em auto;
    border-radius: 4px;
}

article figure {
    margin: 1.5em 0;
    padding: 0;
}

article figcaption {
    font-size: 0.9em;
    color: #666;
    margin-top: 0.5em;
    font-style: italic;
}

/* ============================================
   LEGACY STYLES
   ============================================ */

.aligncenter { display: block; margin: 2rem auto; }
.wp-caption { border: 1px solid #e7e5e4; padding: 1rem; background: #fafaf9; }
.wp-caption-text { font-size: 10px; text-transform: uppercase; letter-spacing: 0.2em; color: #a8a29e; margin-top: 0.5rem; }

/* ============================================
   SINGLE POST CONTENT HARDENING (v1.6.3)
   Tailwind preflight resets margins. These rules
   restore editorial spacing for WordPress content.
   ============================================ */
.article-main,
.entry-content,
.wp-block-post-content {
    font-size: 18px;
    line-height: 1.8;
}

.article-main > *:first-child,
.entry-content > *:first-child,
.wp-block-post-content > *:first-child {
    margin-top: 0;
}

.article-main p,
.entry-content p,
.wp-block-post-content p {
    margin-top: 0;
    margin-bottom: 1.4rem;
    line-height: 1.8;
}

.article-main h1,
.entry-content h1,
.wp-block-post-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.article-main h2,
.entry-content h2,
.wp-block-post-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.article-main h3,
.entry-content h3,
.wp-block-post-content h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.25;
    margin-top: 2.25rem;
    margin-bottom: 0.85rem;
    font-weight: 800;
}

.article-main h4,
.entry-content h4,
.wp-block-post-content h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    line-height: 1.3;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.article-main h5,
.entry-content h5,
.wp-block-post-content h5 {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    line-height: 1.35;
    margin-top: 1.5rem;
    margin-bottom: 0.65rem;
    font-weight: 700;
}

.article-main h6,
.entry-content h6,
.wp-block-post-content h6 {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    line-height: 1.4;
    margin-top: 1.25rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.article-main blockquote,
.entry-content blockquote,
.wp-block-post-content blockquote {
    margin: 2rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid #b45309;
    background: #f5f5f4;
    font-style: italic;
}

.article-main blockquote p,
.entry-content blockquote p,
.wp-block-post-content blockquote p {
    margin-bottom: 0;
}

.article-main ul,
.article-main ol,
.entry-content ul,
.entry-content ol,
.wp-block-post-content ul,
.wp-block-post-content ol {
    margin: 0 0 1.4rem 1.5rem;
    padding-left: 1.25rem;
}

.article-main li,
.entry-content li,
.wp-block-post-content li {
    margin-bottom: 0.5rem;
}

.article-main figure,
.entry-content figure,
.wp-block-post-content figure {
    margin: 2rem 0;
}

.article-main img,
.entry-content img,
.wp-block-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}
