/*
Theme Name: ahiti
Theme URI: https://ahiti.dev
Author: Aymen Hiti
Description: Minimal ink-and-highlighter blog theme for ahiti.dev, notes on DevOps and DevSecOps.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: ahiti
*/

:root {
	--ah-ink: #1D2433;
	--ah-body: #3B4458;
	--ah-muted: #5B6478;
	--ah-line: #C9CDD6;
	--ah-hl: #FFE98A;
	--ah-cream: #FFF7D1;
	--ah-code: #F5F3EE;
	--ah-display: 'Bricolage Grotesque', system-ui, sans-serif;
	--ah-serif: 'Source Serif 4', Georgia, serif;
	--ah-sans: 'IBM Plex Sans', system-ui, sans-serif;
	--ah-mono: 'JetBrains Mono', ui-monospace, monospace;
}

body { background: #fff; color: var(--ah-ink); font-family: var(--ah-serif); }

a { color: var(--ah-ink); text-decoration: underline; text-decoration-color: #E5B800; text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover, a:focus { color: var(--ah-ink); background: var(--ah-hl); }

mark, .ah-hl { background: var(--ah-hl); color: inherit; padding: 0 3px; }

h1, h2, h3, h4 { font-family: var(--ah-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; }

/* layout wrapper */
.ah-wrap { max-width: 1160px; margin: 0 auto !important; padding: 0 48px; box-sizing: border-box; }
@media (max-width: 700px) { .ah-wrap { padding: 0 20px; } }

/* header */
.ah-header { max-width: 1160px; margin: 0 auto; padding: 40px 48px 28px; box-sizing: border-box; }
.ah-header-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 28px; border-bottom: 1.5px solid var(--ah-ink); }
.ah-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--ah-display); font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.ah-logo:hover { background: none; }
.ah-logo-tld { color: #8A93A6; }
.ah-nav { display: flex; gap: 28px; font-family: var(--ah-sans); font-size: 16px; font-weight: 500; }
.ah-nav a { text-decoration: none; padding: 10px 0; }
@media (max-width: 700px) { .ah-header { padding: 24px 20px 12px; } }

/* home */
.ah-home { padding-top: 28px; padding-bottom: 40px; }
.ah-cols { gap: 80px !important; }
.ah-avatar { width: 88px; height: 88px; border-radius: 50%; background: var(--ah-hl); display: flex; align-items: center; justify-content: center; font-family: var(--ah-display); font-weight: 800; font-size: 28px; color: var(--ah-ink); overflow: hidden; }
.ah-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ah-hello { font-size: 40px !important; margin: 18px 0 !important; }
.ah-side p { font-size: 19px; line-height: 1.65; }
.ah-box { border: 1.5px dashed var(--ah-ink); border-radius: 4px; padding: 22px 24px !important; margin: 32px 0 !important; }
.ah-box p { font-size: 17px !important; line-height: 1.7 !important; margin: 0 0 8px; }
.ah-box-title { font-family: var(--ah-display); font-weight: 700; font-size: 18px !important; }
.ah-side-title { font-size: 18px !important; font-weight: 700 !important; margin: 0 0 12px !important; }
.ah-topics a { font-family: var(--ah-mono); font-size: 14px !important; margin-right: 14px; display: inline-block; padding: 6px 0; }
.ah-topics a::before { content: '#'; }
.ah-sub { background: var(--ah-cream); border-radius: 4px; padding: 24px !important; margin-top: 32px !important; }
.ah-sub p { font-size: 16px !important; margin: 0 0 8px; }

/* post list */
.ah-posts .wp-block-post-template { list-style: none; padding: 0; margin: 0; }
.ah-post-item { padding: 0 0 40px; margin-bottom: 40px; border-bottom: 1.5px dashed var(--ah-line); }
.ah-post-item .wp-block-post-title { font-size: 26px; font-weight: 700; line-height: 1.25; margin: 6px 0 8px; }
.ah-post-item .wp-block-post-title a { text-decoration-color: #E5B800; }
.ah-posts .wp-block-post-template > li:first-child .wp-block-post-title { font-size: 44px; font-weight: 800; line-height: 1.1; }
.ah-post-item .wp-block-post-excerpt { font-size: 18px; line-height: 1.6; color: var(--ah-body); margin: 0 0 8px; }
.ah-post-item .wp-block-post-excerpt__more-text { display: none; }
.ah-meta, .ah-meta a { font-family: var(--ah-mono); font-size: 13px; color: var(--ah-muted); text-decoration: none; }

/* single post + pages */
.ah-single { padding-top: 40px; padding-bottom: 40px; }
.ah-single .ah-article { max-width: 720px; }
.ah-single .wp-block-post-title { font-size: clamp(36px, 5vw, 58px); line-height: 1.05; letter-spacing: -0.025em; margin: 20px 0 16px; }
.ah-back { font-family: var(--ah-sans); font-size: 15px; }
.ah-single .wp-block-post-content { font-size: 20px; line-height: 1.75; }
.ah-single .wp-block-post-content h2 { font-size: 32px; margin-top: 48px; }
.ah-single .wp-block-post-content h3 { font-size: 24px; margin-top: 36px; }
.ah-single .wp-block-post-content blockquote { border-left: 4px solid var(--ah-ink); margin: 32px 0; padding: 4px 0 4px 24px; font-family: var(--ah-display); font-size: 24px; line-height: 1.35; }
.ah-author { background: var(--ah-cream); border-radius: 4px; padding: 24px !important; margin-top: 56px !important; font-size: 17px; line-height: 1.6; }
.ah-postnav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; font-family: var(--ah-sans); font-size: 16px; }

/* code */
code, kbd, pre { font-family: var(--ah-mono); }
:not(pre) > code { background: var(--ah-code); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }
pre, .wp-block-code { background: var(--ah-code); border: 0; border-radius: 4px; padding: 20px 22px; font-size: 15px; line-height: 1.6; overflow-x: auto; }

/* footer */
.ah-footer { max-width: 1160px; margin: 40px auto 0; padding: 0 48px 40px; box-sizing: border-box; }
.ah-footer-inner { padding-top: 24px; border-top: 1.5px solid var(--ah-ink); font-family: var(--ah-sans); font-size: 14px; color: var(--ah-muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.ah-footer-inner a { color: var(--ah-muted); }
@media (max-width: 700px) { .ah-footer { padding: 0 20px 32px; } }

/* pagination */
.wp-block-query-pagination { font-family: var(--ah-sans); margin-top: 16px; }
