/* === ACCIDENTAL ANALYST THEME === */

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

body {
    background: #f2ead8;
    color: #1a1008;
    font-family: 'Special Elite', Georgia, serif;
    line-height: 1.8;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: repeating-linear-gradient(180deg, transparent 0px, transparent 28px, rgba(160,140,100,0.13) 28px, rgba(160,140,100,0.13) 29px);
    pointer-events: none;
    z-index: 0;
}

a { color: #1a1008; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
p { margin-bottom: 1.2rem; }

.aa-viewport { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; }
.aa-footer { margin-top: auto; }

/* === HEADER === */
.aa-header { background: #1a1008; border-bottom: 6px solid #1a1008; position: relative; z-index: 100; }
.aa-header-inner { max-width: 1100px; margin: 0 auto; padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; }
.aa-site-title { font-family: 'Permanent Marker', cursive; font-size: 26px; color: #f2ead8; letter-spacing: 1px; transform: rotate(-1deg); display: inline-block; text-decoration: none; }
.aa-site-title:hover { opacity: 0.85; text-decoration: none; }
.aa-nav ul { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; }
.aa-nav ul li { margin: 0; padding: 0; }
.aa-nav ul li a { font-family: 'Permanent Marker', cursive; font-size: 15px; color: #999; padding: 4px 14px; border: 2px solid #444; border-radius: 999px; display: inline-block; text-decoration: none; transition: all 0.15s; }
.aa-nav ul li a:hover, .aa-nav ul li.nav-current a { color: #1a1008; background: #f2ead8; border-color: #f2ead8; text-decoration: none; }

/* === HERO === */
.aa-hero { padding: 32px 28px 28px; display: flex; gap: 24px; align-items: flex-start; border-bottom: 5px solid #1a1008; background: #f7f0de; width: 100%; }
.aa-hero-inner { max-width: 1100px; margin: 0 auto; display: flex; gap: 24px; align-items: flex-start; width: 100%; }
.aa-hero-content { flex: 1; }
.aa-speech-bubble { background: #fff; border: 4px solid #1a1008; border-radius: 24px; padding: 22px 26px; position: relative; box-shadow: 5px 5px 0 #1a1008; margin-bottom: 28px; }
.aa-speech-bubble::after { content: ''; position: absolute; bottom: -22px; left: 44px; width: 0; height: 0; border-left: 14px solid transparent; border-right: 6px solid transparent; border-top: 22px solid #1a1008; }
.aa-speech-bubble::before { content: ''; position: absolute; bottom: -15px; left: 46px; width: 0; height: 0; border-left: 12px solid transparent; border-right: 5px solid transparent; border-top: 18px solid #fff; z-index: 1; }
.aa-bubble-eyebrow { font-family: 'Special Elite', serif; font-size: 11px; color: #aaa; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 8px; }
.aa-bubble-title { font-family: 'Permanent Marker', cursive; font-size: 36px; color: #1a1008; line-height: 1.05; margin-bottom: 0; }
.aa-bubble-title em { font-style: normal; border-bottom: 4px solid #1a1008; display: inline-block; transform: rotate(-1deg); }
.aa-bubble-desc { font-size: 14px; color: #666; line-height: 1.7; margin-top: 12px; }
.aa-hero-btn { display: inline-block; font-family: 'Permanent Marker', cursive; font-size: 16px; background: #1a1008; color: #f2ead8; padding: 10px 22px; border-radius: 3px; box-shadow: 3px 3px 0 #888; text-decoration: none; transition: transform 0.1s, box-shadow 0.1s; }
.aa-hero-btn:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 #888; color: #f2ead8; text-decoration: none; }
.aa-mascot { width: 160px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; padding-top: 10px; }
.aa-mascot svg { width: 120px; height: 140px; }
.aa-mascot-label { font-family: 'Permanent Marker', cursive; font-size: 13px; color: #999; margin-top: 6px; transform: rotate(2deg); display: inline-block; }

/* === SECTION BANNER === */
.aa-section-banner { background: #1a1008; padding: 10px 28px; display: flex; align-items: center; gap: 16px; width: 100%; }
.aa-banner-title { font-family: 'Permanent Marker', cursive; font-size: 22px; color: #f2ead8; white-space: nowrap; transform: rotate(-0.5deg); display: inline-block; }
.aa-zigzag { flex: 1; height: 10px; background: linear-gradient(135deg,#444 25%,transparent 25%) -6px 0, linear-gradient(225deg,#444 25%,transparent 25%) -6px 0, linear-gradient(315deg,#444 25%,transparent 25%), linear-gradient(45deg,#444 25%,transparent 25%); background-size: 12px 12px; background-color: #1a1008; opacity: 0.5; }
.aa-starburst { width: 28px; height: 28px; background: #f2ead8; clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%); flex-shrink: 0; }

/* === MAIN LAYOUT === */
.aa-main { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 240px; width: 100%; }
.aa-feed { padding: 24px 24px 24px 28px; border-right: 5px solid #1a1008; }

/* === POST CARDS === */
.aa-post-card { background: #fff; border: 4px solid #1a1008; margin-bottom: 22px; position: relative; border-radius: 4px; transition: transform 0.12s, box-shadow 0.12s; box-shadow: 6px 6px 0 #1a1008; }
.aa-post-card:hover { transform: translate(-3px,-3px); box-shadow: 9px 9px 0 #1a1008; }
.aa-card-image { width: 100%; max-height: 220px; object-fit: cover; border-bottom: 4px solid #1a1008; display: block; }
.aa-card-body { padding: 14px 18px 10px; }
.aa-card-tag { display: inline-block; font-family: 'Permanent Marker', cursive; font-size: 12px; background: #1a1008; color: #f2ead8; padding: 3px 12px; border-radius: 2px; transform: rotate(-1deg); margin-bottom: 8px; text-decoration: none; }
.aa-card-tag:hover { opacity: 0.8; text-decoration: none; color: #f2ead8; }
.aa-card-title { font-family: 'Permanent Marker', cursive; font-size: 22px; color: #1a1008; line-height: 1.2; margin-bottom: 8px; display: block; text-decoration: none; }
.aa-card-title:hover { text-decoration: underline; }
.aa-card-excerpt { font-size: 13px; color: #777; line-height: 1.65; }
.aa-card-footer { border-top: 3px dashed #ddd; padding: 10px 18px; display: flex; align-items: center; justify-content: space-between; }
.aa-read-more { font-family: 'Permanent Marker', cursive; font-size: 14px; color: #1a1008; text-decoration: none; }
.aa-read-more::after { content: ' →'; display: inline-block; animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 0%,100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
.aa-date-badge { background: #1a1008; color: #f2ead8; font-family: 'Permanent Marker', cursive; font-size: 13px; padding: 5px 12px; border-radius: 2px; transform: rotate(-2deg); display: inline-block; white-space: nowrap; flex-shrink: 0; }

/* Pagination */
.aa-feed .pagination { display: flex; justify-content: space-between; align-items: center; padding: 20px 0 4px; }
.aa-feed .pagination a { font-family: 'Permanent Marker', cursive; font-size: 14px; color: #1a1008; border: 3px solid #1a1008; padding: 6px 16px; border-radius: 3px; text-decoration: none; background: #f2ead8; box-shadow: 2px 2px 0 #1a1008; transition: all 0.1s; }
.aa-feed .pagination a:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 #1a1008; text-decoration: none; }

/* === SIDEBAR === */
.aa-sidebar { padding: 20px 16px; background: #ede4cc; }
.aa-widget { background: #fff; border: 4px solid #1a1008; padding: 14px; margin-bottom: 20px; position: relative; border-radius: 3px; box-shadow: 4px 4px 0 #1a1008; }
.aa-widget::before { content: ''; position: absolute; top: -9px; right: -9px; width: 32px; height: 32px; background: repeating-linear-gradient(45deg,#1a1008 0px,#1a1008 2px,transparent 2px,transparent 6px); border: 3px solid #1a1008; border-radius: 50%; }
.aa-widget-title { font-family: 'Permanent Marker', cursive; font-size: 18px; color: #1a1008; border-bottom: 3px solid #1a1008; padding-bottom: 7px; margin-bottom: 12px; display: block; }
.aa-author-card-small { text-align: center; }
.aa-author-avatar { width: 80px; height: 80px; border-radius: 50%; border: 4px solid #1a1008; object-fit: cover; margin: 0 auto 10px; display: block; }
.aa-author-name { font-family: 'Permanent Marker', cursive; font-size: 17px; color: #1a1008; margin-bottom: 6px; }
.aa-author-bio { font-size: 12px; color: #888; line-height: 1.6; }
.aa-newsletter-desc { font-size: 12px; color: #aaa; margin-bottom: 10px; line-height: 1.5; }
.aa-newsletter-form input[type="email"] { width: 100%; border: 3px solid #1a1008; background: #f7f0de; font-family: 'Special Elite', serif; font-size: 13px; padding: 7px 10px; margin-bottom: 8px; outline: none; border-radius: 2px; color: #1a1008; display: block; }
.aa-newsletter-form button { width: 100%; font-family: 'Permanent Marker', cursive; font-size: 15px; background: #1a1008; color: #f2ead8; border: none; padding: 9px; cursor: pointer; border-radius: 2px; }
.aa-newsletter-form button:hover { background: #333; }
.aa-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.aa-tag-chip { font-family: 'Permanent Marker', cursive; font-size: 12px; color: #1a1008; border: 2.5px solid #1a1008; padding: 3px 11px; border-radius: 999px; text-decoration: none; display: inline-block; background: #f2ead8; transition: all 0.1s; }
.aa-tag-chip:hover { background: #1a1008; color: #f2ead8; text-decoration: none; }
.aa-recent-post { padding: 7px 0; border-bottom: 1px dashed #ddd; }
.aa-recent-post:last-child { border-bottom: none; }
.aa-recent-post a { font-family: 'Permanent Marker', cursive; font-size: 13px; color: #1a1008; text-decoration: none; line-height: 1.3; display: block; }
.aa-recent-post a:hover { text-decoration: underline; }
.aa-recent-post span { font-size: 11px; color: #aaa; }

/* === SINGLE POST === */
.aa-post-full { padding: 28px 28px 60px; }
.aa-post-header { margin-bottom: 24px; }
.aa-post-title { font-family: 'Permanent Marker', cursive; font-size: 40px; color: #1a1008; line-height: 1.1; margin: 10px 0 14px; }
.aa-post-meta { font-size: 13px; color: #aaa; letter-spacing: 1px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-bottom: 3px dashed #ddd; padding-bottom: 18px; margin-bottom: 24px; }
.aa-post-image { width: 100%; border: 4px solid #1a1008; margin-bottom: 28px; box-shadow: 6px 6px 0 #1a1008; }
.aa-post-content { font-size: 21px; line-height: 1.85; color: #1a1008; max-width: 680px; font-family: 'Crimson Text', serif; }
.aa-post-content h1, .aa-post-content h2, .aa-post-content h3, .aa-post-content h4 { font-family: 'Permanent Marker', cursive; margin: 2rem 0 1rem; color: #1a1008; }
.aa-post-content h2 { font-size: 28px; border-bottom: 3px solid #1a1008; padding-bottom: 6px; }
.aa-post-content h3 { font-size: 22px; }
.aa-post-content p { margin-bottom: 1.7rem; }
.aa-post-content a { color: #1a1008; text-decoration: underline; }
.aa-post-content blockquote { border-left: 6px solid #1a1008; background: #fff; padding: 14px 20px; margin: 1.5rem 0; font-family: 'Permanent Marker', cursive; font-size: 18px; box-shadow: 4px 4px 0 #1a1008; }
.aa-post-content code { font-family: 'Courier New', monospace; background: #1a1008; color: #f2ead8; padding: 2px 6px; border-radius: 2px; font-size: 0.9em; }
.aa-post-content pre { background: #1a1008; color: #f2ead8; padding: 20px; overflow-x: auto; border-radius: 3px; margin: 1.5rem 0; box-shadow: 4px 4px 0 #888; }
.aa-post-content pre code { background: none; padding: 0; font-size: 14px; }
.aa-post-content ul, .aa-post-content ol { padding-left: 1.8rem; margin-bottom: 1.4rem; }
.aa-post-content img { border: 4px solid #1a1008; box-shadow: 4px 4px 0 #1a1008; margin: 1.5rem 0; }
.aa-post-footer { margin-top: 40px; padding-top: 24px; border-top: 5px solid #1a1008; }
.aa-author-card { background: #fff; border: 4px solid #1a1008; padding: 18px; display: flex; gap: 18px; align-items: flex-start; box-shadow: 5px 5px 0 #1a1008; border-radius: 3px; margin-bottom: 16px; }

/* === ARCHIVE HEADER === */
.aa-archive-header { max-width: 1100px; margin: 0 auto; padding: 32px 28px; border-bottom: 5px solid #1a1008; background: #f7f0de; }
.aa-archive-title { font-family: 'Permanent Marker', cursive; font-size: 36px; color: #1a1008; margin-bottom: 6px; }
.aa-archive-desc { font-size: 14px; color: #888; }

/* === 404 === */
.aa-error-page { text-align: center; padding: 80px 28px; }
.aa-error-code { font-family: 'Permanent Marker', cursive; font-size: 120px; color: #1a1008; line-height: 1; opacity: 0.15; }
.aa-error-title { font-family: 'Permanent Marker', cursive; font-size: 36px; color: #1a1008; margin: -20px 0 16px; }
.aa-error-desc { font-size: 15px; color: #888; margin-bottom: 28px; }

/* === FOOTER === */
.aa-footer { background: #1a1008; border-top: 5px solid #1a1008; padding: 16px 28px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.aa-footer-copy { font-family: 'Special Elite', serif; font-size: 12px; color: #555; }
.aa-footer-copy a { color: #888; text-decoration: none; }
.aa-footer-copy a:hover { color: #f2ead8; }
.aa-footer-mark { font-family: 'Permanent Marker', cursive; font-size: 16px; color: #f2ead8; transform: rotate(-1deg); display: inline-block; }

/* === KOENIG CARDS === */
.gh-content .kg-width-wide { margin-left: -60px; margin-right: -60px; }
.gh-content .kg-width-full { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; }
.gh-content .kg-image { max-width: 100%; }
.gh-content .kg-image-card { margin: 1.5rem 0; }
.gh-content .kg-image-card img { border: 4px solid #1a1008; box-shadow: 4px 4px 0 #1a1008; }
.gh-content .kg-image-card figcaption { font-size: 12px; color: #aaa; text-align: center; margin-top: 8px; }
.gh-content .kg-gallery-container { margin: 1.5rem 0; }
.gh-content .kg-gallery-row { display: flex; gap: 8px; margin-bottom: 8px; }
.gh-content .kg-gallery-image { flex: 1; }
.gh-content .kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; border: 3px solid #1a1008; }
.gh-content .kg-bookmark-card { background: #fff; border: 3px solid #1a1008; box-shadow: 4px 4px 0 #1a1008; margin: 1.5rem 0; }
.gh-content .kg-bookmark-container { display: flex; text-decoration: none; color: #1a1008; }
.gh-content .kg-bookmark-content { padding: 14px; flex: 1; }
.gh-content .kg-bookmark-title { font-family: 'Permanent Marker', cursive; font-size: 16px; margin-bottom: 4px; }
.gh-content .kg-bookmark-description { font-size: 12px; color: #888; line-height: 1.5; }
.gh-content .kg-bookmark-thumbnail { width: 140px; flex-shrink: 0; }
.gh-content .kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; border-left: 3px solid #1a1008; }
.gh-content .kg-callout-card { background: #fff; border: 3px solid #1a1008; border-left: 8px solid #1a1008; padding: 16px 20px; margin: 1.5rem 0; display: flex; gap: 12px; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .aa-main { grid-template-columns: 1fr; }
    .aa-sidebar { border-top: 5px solid #1a1008; }
    .aa-feed { border-right: none; }
    .aa-bubble-title { font-size: 26px; }
    .aa-mascot { display: none; }
    .gh-content .kg-width-wide { margin-left: 0; margin-right: 0; }
}
@media (max-width: 600px) {
    .aa-header-inner { padding: 12px 16px; }
    .aa-site-title { font-size: 20px; }
    .aa-hero { padding: 20px 16px; }
    .aa-feed { padding: 16px; }
    .aa-post-full { padding: 20px 16px 40px; }
    .aa-post-title { font-size: 28px; }
    .aa-footer { flex-direction: column; text-align: center; }
}

/* === MASCOT IMAGE === */
.aa-mascot-img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    border-radius: 50%;
    border: 4px solid #1a1008;
    box-shadow: 4px 4px 0 #1a1008;
    background: #fff;
}

/* Remove paper lines behind post content for readability */
.aa-post-full {
    background: #f2ead8;
    position: relative;
    z-index: 1;
}
.aa-post-full::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #f2ead8;
    z-index: -1;
}
