/*
Theme Name: Pentest Machine
Theme URI: https://pentestmachine.com
Author: Pentest Machine
Description: Blog theme matching pentestmachine.com (Precision Dark).
Version: 1.0.0
Requires PHP: 8.1
Text Domain: pentestmachine
*/

/* Blog-specific rules; design tokens live in base.css (copied from the main site). */
.blog-head { padding-block: clamp(48px, 6vw, 80px) clamp(32px, 4vw, 48px); display: flex; flex-direction: column; gap: 14px; max-width: 820px; }
.blog-head h1 { font-size: clamp(34px, 4vw, 52px); letter-spacing: -0.025em; line-height: 1.05; }
.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-bottom: clamp(48px, 6vw, 80px); }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.post-card:hover { border-color: var(--muted); transform: translateY(-2px); }
.post-card a { color: inherit; display: flex; flex-direction: column; height: 100%; }
.post-card .cover { aspect-ratio: 16 / 9; background: var(--surface-2); object-fit: cover; width: 100%; }
.post-card .cover-ph { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--surface-2), var(--bg)); display: grid; place-items: center; color: var(--accent); }
.post-card .body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.post-card .meta .cat { color: var(--accent); }
.post-card h2, .post-card h3 { font-size: 20px; line-height: 1.25; }
.post-card p { font-size: 14px; }
.pagination { display: flex; gap: 8px; justify-content: center; padding-bottom: 64px; font-family: var(--mono); font-size: 13px; }
.pagination .page-numbers { padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
.pagination .page-numbers.current { background: var(--surface-2); color: var(--text); }

.article-hero { padding-block: clamp(48px, 6vw, 80px) 32px; display: flex; flex-direction: column; gap: 18px; max-width: 820px; }
.article-hero h1 { font-size: clamp(32px, 4vw, 52px); letter-spacing: -0.025em; line-height: 1.05; }
.article-hero .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
.article-hero .meta .cat { color: var(--accent); }
.article-cover { max-width: 820px; margin-bottom: 40px; }
.article-cover img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; height: auto; }

.prose { max-width: 720px; font-size: 17px; line-height: 1.75; color: #d5dae1; }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { font-size: 28px; margin-top: 2em; }
.prose h3 { font-size: 22px; margin-top: 1.6em; }
.prose h4 { font-size: 18px; margin-top: 1.4em; }
.prose p { color: inherit; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--accent); color: var(--muted); font-style: italic; }
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; overflow-x: auto; font: 13.5px/1.7 var(--mono); color: var(--text); }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose img { border-radius: 8px; border: 1px solid var(--line); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: var(--surface); font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: .5em; }

.article-tags { max-width: 720px; margin-top: 40px; display: flex; flex-wrap: wrap; gap: 6px; }
.article-cta { max-width: 720px; margin: 56px 0 clamp(48px, 6vw, 96px); padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.article-cta h2 { font-size: 26px; }
.article-nav { max-width: 720px; display: flex; justify-content: space-between; gap: 16px; padding-bottom: 64px; font-size: 14px; }
.article-nav a { color: var(--muted); } .article-nav a:hover { color: var(--text); }
.translations { display: flex; gap: 8px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.translations a { color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; }
.translations a:hover, .translations a[aria-current="true"] { color: var(--text); border-color: var(--accent); }
.search-form { display: flex; gap: 8px; max-width: 480px; }
.search-form .input { flex: 1; }
.empty { padding: 64px 0; color: var(--muted); }

@media (max-width: 1100px) { .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .posts-grid { grid-template-columns: 1fr; } .prose { font-size: 16px; } }
