/*
Theme Name: Stuff Toucher Blue
Theme URI: https://stufftoucher.com
Author: pcpimp
Description: A custom blue and black theme for Stuff Touchers, inspired by GridRead layout.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stufftoucher-blue
Tags: blog, grid-layout, custom-menu, featured-images, threaded-comments
*/

/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */

:root {
    --st-black: #000000;
    --st-dark: #0a0a0a;
    --st-dark-alt: #111118;
    --st-navy: #0d1117;
    --st-card-bg: #161b22;
    --st-blue: #0066ff;
    --st-blue-light: #1a8cff;
    --st-blue-glow: #4da6ff;
    --st-blue-dark: #003d99;
    --st-text: #c9d1d9;
    --st-text-muted: #8b949e;
    --st-white: #f0f6fc;
    --st-border: #21262d;
    --st-border-blue: #0066ff33;
    --st-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    --st-radius: 8px;
    --st-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --st-font-heading: 'Oswald', 'Inter', sans-serif;
    --st-max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--st-font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--st-text);
    background-color: var(--st-dark);
    -webkit-font-smoothing: antialiased;
}

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

a:hover, a:focus {
    color: var(--st-blue-glow);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--st-font-heading);
    color: var(--st-white);
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }

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

p {
    margin: 0 0 1.2em;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* ==========================================================================
   Site Wrapper
   ========================================================================== */

.st-site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.st-container {
    max-width: var(--st-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.st-header {
    background: var(--st-black);
    border-bottom: 2px solid var(--st-blue);
    position: relative;
}

.st-header-inner {
    max-width: var(--st-max-width);
    margin: 0 auto;
    padding: 25px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.st-site-branding {
    flex-shrink: 0;
}

.st-site-title {
    margin: 0;
    font-size: 2rem;
    font-family: var(--st-font-heading);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.st-site-title a {
    color: var(--st-white);
    text-decoration: none;
    transition: color 0.2s ease;
}

.st-site-title a:hover {
    color: var(--st-blue-light);
}

.st-site-description {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--st-blue-light);
    font-style: italic;
}

.st-custom-logo-link img {
    max-height: 60px;
    width: auto;
}

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

.st-nav-wrapper {
    background: var(--st-dark-alt);
    border-bottom: 1px solid var(--st-border);
}

.st-nav-inner {
    max-width: var(--st-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.st-primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.st-primary-menu li {
    position: relative;
}

.st-primary-menu li a {
    display: block;
    padding: 14px 18px;
    color: var(--st-text);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.st-primary-menu li a:hover,
.st-primary-menu li.current-menu-item a,
.st-primary-menu li.current_page_item a {
    color: var(--st-blue-light);
    border-bottom-color: var(--st-blue);
    background: rgba(0, 102, 255, 0.05);
}

/* Dropdown */
.st-primary-menu li ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--st-card-bg);
    border: 1px solid var(--st-border);
    border-top: 2px solid var(--st-blue);
    box-shadow: var(--st-shadow);
    z-index: 999;
    list-style: none;
    padding: 0;
    margin: 0;
}

.st-primary-menu li:hover > ul.sub-menu {
    display: block;
}

.st-primary-menu li ul.sub-menu li a {
    padding: 10px 18px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--st-border);
}

.st-primary-menu li ul.sub-menu li:last-child a {
    border-bottom: none;
}

/* Mobile menu button */
.st-menu-toggle {
    display: none;
    background: var(--st-blue);
    color: var(--st-white);
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    width: 100%;
    text-align: left;
    letter-spacing: 0.5px;
}

.st-menu-toggle:hover {
    background: var(--st-blue-dark);
}

/* ==========================================================================
   Content Layout
   ========================================================================== */

.st-content-area {
    max-width: var(--st-max-width);
    margin: 30px auto;
    padding: 0 20px;
    display: flex;
    gap: 30px;
    flex: 1;
}

.st-main {
    flex: 1;
    min-width: 0;
}

.st-sidebar {
    width: 320px;
    flex-shrink: 0;
}

/* ==========================================================================
   Posts Heading
   ========================================================================== */

.st-posts-heading {
    background: var(--st-card-bg);
    border-left: 4px solid var(--st-blue);
    padding: 12px 20px;
    margin: 0 0 25px;
    font-size: 1.1rem;
    font-family: var(--st-font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--st-white);
    border-radius: 0 var(--st-radius) var(--st-radius) 0;
}

/* ==========================================================================
   Post Grid
   ========================================================================== */

.st-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.st-grid-post {
    background: var(--st-card-bg);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.st-grid-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.15);
    border-color: var(--st-blue);
}

.st-grid-post-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--st-navy);
}

.st-grid-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.st-grid-post:hover .st-grid-post-thumbnail img {
    transform: scale(1.05);
}

.st-grid-post-thumbnail .st-no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--st-navy) 0%, var(--st-blue-dark) 100%);
    color: var(--st-blue-light);
    font-size: 3rem;
}

.st-grid-post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 15px 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.st-grid-post-overlay .st-grid-post-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

.st-grid-post-overlay .st-grid-post-title a {
    color: var(--st-white);
}

.st-grid-post-overlay .st-grid-post-title a:hover {
    color: var(--st-blue-light);
}

.st-grid-post-overlay .st-grid-post-date {
    font-size: 0.75rem;
    color: var(--st-blue-light);
    margin-top: 5px;
}

/* ==========================================================================
   Non-Grid / List Posts
   ========================================================================== */

.st-post-list .st-post-item {
    background: var(--st-card-bg);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    padding: 25px;
    margin-bottom: 25px;
    transition: border-color 0.2s ease;
}

.st-post-list .st-post-item:hover {
    border-color: var(--st-blue);
}

.st-post-item .entry-header {
    margin-bottom: 15px;
}

.st-post-item .post-title {
    margin: 0 0 8px;
    font-size: 1.5rem;
}

.st-post-item .post-title a {
    color: var(--st-white);
}

.st-post-item .post-title a:hover {
    color: var(--st-blue-light);
}

/* ==========================================================================
   Single Post / Page
   ========================================================================== */

.st-single-post,
.st-single-page {
    background: var(--st-card-bg);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    padding: 35px;
    margin-bottom: 30px;
}

.st-single-post .entry-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--st-border);
}

.st-single-post .post-title,
.st-single-page .page-title {
    font-size: 2rem;
    margin: 0 0 12px;
    color: var(--st-white);
}

.st-single-post .entry-content,
.st-single-page .entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.st-single-post .entry-content a {
    color: var(--st-blue-light);
    text-decoration: underline;
    text-decoration-color: rgba(26, 140, 255, 0.3);
    text-underline-offset: 2px;
}

.st-single-post .entry-content a:hover {
    text-decoration-color: var(--st-blue-light);
}

.st-single-post .entry-content img {
    border-radius: var(--st-radius);
    margin: 15px 0;
}

.st-single-post .entry-content blockquote {
    border-left: 4px solid var(--st-blue);
    margin: 20px 0;
    padding: 15px 25px;
    background: rgba(0, 102, 255, 0.05);
    border-radius: 0 var(--st-radius) var(--st-radius) 0;
    color: var(--st-text);
    font-style: italic;
}

.st-single-post .entry-content pre {
    background: var(--st-dark);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    padding: 20px;
    overflow-x: auto;
    font-size: 0.9rem;
}

.st-single-post .entry-content code {
    background: var(--st-dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Post Meta */
.st-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--st-text-muted);
}

.st-post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.st-post-meta a {
    color: var(--st-text-muted);
}

.st-post-meta a:hover {
    color: var(--st-blue-light);
}

/* Post Tags */
.st-post-tags {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--st-border);
}

.st-post-tags a {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 6px 6px 0;
    background: rgba(0, 102, 255, 0.1);
    border: 1px solid var(--st-border-blue);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--st-blue-light);
    transition: all 0.2s ease;
}

.st-post-tags a:hover {
    background: var(--st-blue);
    color: var(--st-white);
    border-color: var(--st-blue);
}

/* Post Navigation */
.st-post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.st-post-navigation a {
    display: block;
    padding: 15px 20px;
    background: var(--st-card-bg);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    color: var(--st-text);
    flex: 1;
    transition: border-color 0.2s ease;
}

.st-post-navigation a:hover {
    border-color: var(--st-blue);
    color: var(--st-blue-light);
}

.st-post-navigation .nav-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--st-text-muted);
    margin-bottom: 4px;
}

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

/* Posts Pagination */
.st-pagination {
    margin-top: 30px;
    text-align: center;
}

.st-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.st-pagination .nav-links a,
.st-pagination .nav-links span {
    display: inline-block;
    padding: 8px 16px;
    background: var(--st-card-bg);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    color: var(--st-text);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.st-pagination .nav-links a:hover {
    background: var(--st-blue);
    border-color: var(--st-blue);
    color: var(--st-white);
}

.st-pagination .nav-links .current {
    background: var(--st-blue);
    border-color: var(--st-blue);
    color: var(--st-white);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.st-sidebar .widget {
    background: var(--st-card-bg);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    margin-bottom: 25px;
    overflow: hidden;
}

.st-sidebar .widget-title {
    margin: 0;
    padding: 14px 20px;
    font-size: 0.9rem;
    font-family: var(--st-font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--st-white);
    background: linear-gradient(135deg, var(--st-blue-dark), var(--st-blue));
    border-bottom: none;
}

.st-sidebar .widget > *:not(.widget-title):not(:first-child),
.st-sidebar .widget > ul,
.st-sidebar .widget > div,
.st-sidebar .widget > form {
    padding: 15px 20px;
}

.st-sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.st-sidebar .widget > ul {
    padding: 10px 20px;
}

.st-sidebar .widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--st-border);
}

.st-sidebar .widget ul li:last-child {
    border-bottom: none;
}

.st-sidebar .widget ul li a {
    color: var(--st-text);
    font-size: 0.9rem;
}

.st-sidebar .widget ul li a:hover {
    color: var(--st-blue-light);
}

/* Search Widget */
.st-sidebar .widget_search .search-form,
.st-sidebar .widget_search .st-search-form {
    padding: 15px 20px;
}

.st-search-form {
    display: flex;
}

.st-search-form .search-field {
    flex: 1;
    padding: 10px 14px;
    background: var(--st-dark);
    border: 1px solid var(--st-border);
    border-right: none;
    border-radius: var(--st-radius) 0 0 var(--st-radius);
    color: var(--st-text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.st-search-form .search-field:focus {
    border-color: var(--st-blue);
}

.st-search-form .search-submit {
    padding: 10px 18px;
    background: var(--st-blue);
    border: 1px solid var(--st-blue);
    border-radius: 0 var(--st-radius) var(--st-radius) 0;
    color: var(--st-white);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s ease;
}

.st-search-form .search-submit:hover {
    background: var(--st-blue-dark);
}

/* ==========================================================================
   Page Header (Archives, Search Results)
   ========================================================================== */

.st-page-header {
    background: var(--st-card-bg);
    border: 1px solid var(--st-border);
    border-left: 4px solid var(--st-blue);
    border-radius: 0 var(--st-radius) var(--st-radius) 0;
    padding: 20px 25px;
    margin-bottom: 25px;
}

.st-page-header .page-title {
    margin: 0;
    font-size: 1.3rem;
    color: var(--st-white);
}

.st-page-header .page-title span {
    color: var(--st-blue-light);
}

.st-page-header .archive-description {
    margin-top: 8px;
    color: var(--st-text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   Comments
   ========================================================================== */

.st-comments {
    background: var(--st-card-bg);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    padding: 30px;
    margin-bottom: 30px;
}

.st-comments .comments-title {
    font-size: 1.3rem;
    margin: 0 0 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--st-border);
}

.st-comments .comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.st-comments .comment-list .comment {
    padding: 20px 0;
    border-bottom: 1px solid var(--st-border);
}

.st-comments .comment-list .comment:last-child {
    border-bottom: none;
}

.st-comments .comment-author {
    font-weight: 600;
    color: var(--st-white);
    margin-bottom: 5px;
}

.st-comments .comment-author img {
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
    border: 2px solid var(--st-blue);
}

.st-comments .comment-metadata {
    font-size: 0.8rem;
    color: var(--st-text-muted);
    margin-bottom: 10px;
}

.st-comments .comment-body p {
    margin: 8px 0;
}

.st-comments .reply a {
    font-size: 0.8rem;
    color: var(--st-blue-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.st-comments .children {
    list-style: none;
    margin: 0;
    padding-left: 30px;
}

/* Comment Form */
.st-comments .comment-respond {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--st-border);
}

.st-comments .comment-respond .comment-reply-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.st-comments .comment-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: var(--st-text-muted);
}

.st-comments .comment-form input[type="text"],
.st-comments .comment-form input[type="email"],
.st-comments .comment-form input[type="url"],
.st-comments .comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--st-dark);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    color: var(--st-text);
    font-size: 0.95rem;
    font-family: var(--st-font);
    outline: none;
    transition: border-color 0.2s ease;
    margin-bottom: 15px;
}

.st-comments .comment-form input:focus,
.st-comments .comment-form textarea:focus {
    border-color: var(--st-blue);
}

.st-comments .comment-form .form-submit input[type="submit"] {
    padding: 12px 30px;
    background: var(--st-blue);
    border: none;
    border-radius: var(--st-radius);
    color: var(--st-white);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s ease;
}

.st-comments .comment-form .form-submit input[type="submit"]:hover {
    background: var(--st-blue-dark);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.st-footer-widgets {
    background: var(--st-dark-alt);
    border-top: 1px solid var(--st-border);
    padding: 40px 0;
}

.st-footer-widgets-inner {
    max-width: var(--st-max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.st-footer-widgets .widget {
    color: var(--st-text-muted);
}

.st-footer-widgets .widget-title {
    color: var(--st-white);
    font-size: 1rem;
    font-family: var(--st-font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--st-blue);
    display: inline-block;
}

.st-footer-widgets .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.st-footer-widgets .widget ul li {
    padding: 6px 0;
}

.st-footer-widgets .widget ul li a {
    color: var(--st-text-muted);
    font-size: 0.9rem;
}

.st-footer-widgets .widget ul li a:hover {
    color: var(--st-blue-light);
}

.st-copyright {
    background: var(--st-black);
    border-top: 2px solid var(--st-blue);
    padding: 20px 0;
    text-align: center;
}

.st-copyright-inner {
    max-width: var(--st-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.st-copyright p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--st-text-muted);
}

.st-copyright a {
    color: var(--st-blue-light);
}

/* ==========================================================================
   Back to Top
   ========================================================================== */

.st-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--st-blue);
    border: none;
    border-radius: 50%;
    color: var(--st-white);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.st-scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.st-scroll-top:hover {
    background: var(--st-blue-dark);
    transform: translateY(-2px);
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.st-404 {
    text-align: center;
    padding: 60px 30px;
    background: var(--st-card-bg);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
}

.st-404 h1 {
    font-size: 5rem;
    color: var(--st-blue);
    margin: 0;
    line-height: 1;
}

.st-404 p {
    font-size: 1.1rem;
    color: var(--st-text-muted);
    margin: 15px 0 25px;
}

.st-404 .st-search-form {
    max-width: 400px;
    margin: 0 auto;
}

/* ==========================================================================
   WordPress Defaults
   ========================================================================== */

.alignleft {
    float: left;
    margin: 0 20px 20px 0;
}

.alignright {
    float: right;
    margin: 0 0 20px 20px;
}

.aligncenter {
    display: block;
    margin: 20px auto;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 20px;
}

.wp-caption-text {
    font-size: 0.85rem;
    color: var(--st-text-muted);
    text-align: center;
    padding: 8px 0;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.gallery-item {
    flex: 1;
    min-width: 150px;
}

.gallery-item img {
    border-radius: var(--st-radius);
}

.sticky .st-grid-post,
.sticky .st-post-item {
    border-color: var(--st-blue);
    border-width: 2px;
}

.page-links {
    margin: 20px 0;
    font-weight: 600;
}

.page-links span,
.page-links a {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 4px;
    background: var(--st-card-bg);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
}

.page-links span {
    background: var(--st-blue);
    border-color: var(--st-blue);
    color: var(--st-white);
}

/* Featured Image on Single */
.st-featured-image {
    margin-bottom: 25px;
    border-radius: var(--st-radius);
    overflow: hidden;
}

.st-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

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

@media (max-width: 900px) {
    .st-content-area {
        flex-direction: column;
    }

    .st-sidebar {
        width: 100%;
    }

    .st-posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .st-single-post,
    .st-single-page {
        padding: 25px;
    }
}

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

    .st-primary-menu {
        display: none;
        flex-direction: column;
    }

    .st-primary-menu.toggled {
        display: flex;
    }

    .st-primary-menu li a {
        padding: 12px 18px;
        border-bottom: 1px solid var(--st-border);
    }

    .st-primary-menu li ul.sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-top: none;
        background: var(--st-dark);
    }

    .st-primary-menu li ul.sub-menu li a {
        padding-left: 36px;
    }

    .st-primary-menu li:hover > ul.sub-menu {
        display: block;
    }

    .st-header-inner {
        flex-direction: column;
        text-align: center;
    }

    .st-site-title {
        font-size: 1.5rem;
    }

    .st-posts-grid {
        grid-template-columns: 1fr;
    }

    .st-post-navigation {
        flex-direction: column;
    }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }
}

@media (max-width: 480px) {
    .st-single-post,
    .st-single-page {
        padding: 18px;
    }

    .st-comments {
        padding: 18px;
    }

    .st-grid-post-thumbnail {
        aspect-ratio: 4 / 3;
    }
}
