:root { --menu-width: 360px; --edge-gap: 12px; --dot-visual-size: 30px; --hit-area: 44px; }
html { overflow-y: scroll; scrollbar-gutter: stable; background: #000 !important; }
* { margin: 0; padding: 0; box-sizing: border-box; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.3) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.5); }
*::-webkit-scrollbar-corner { background: transparent; }
body { background: #000 !important; color: #fff; font-family: 'Lato', sans-serif; overflow-x: hidden; }
h1, h2, h3, .mosaic-item h3 { font-family: 'Lustria', serif; font-weight: 400; }
blockquote, q, .quote-text { font-family: 'Cousine', monospace; font-size: 0.95rem; background: #111; padding: 15px; border-left: 3px solid #444; }
.break-out-box, .tag-cloud-wrapper, .side-panel-header, .search-field, .post-meta { font-family: 'Sofia Sans Condensed', sans-serif; text-transform: uppercase; letter-spacing: 0.5px; }
a:link { color: #fff; text-decoration: none; border-bottom: 1px dotted rgb(171, 170, 170); }
a:visited { color: #b3b1b1; }
.mosaic-item, .panel-logo, .menu-toggle a, .side-nav a, .back-link, .post-tags a, .tag-cloud-wrapper a, .side-panel-footer a { border-bottom: none !important; }

body.single .content #callout { background: #1a1a1a; border: 1px solid #333; padding: 1.2rem 1.4rem; margin: 1.5rem 0 1.5rem 1.5rem; border-radius: 6px; font-family: 'Cousine', monospace; font-size: 0.95rem; line-height: 1.55; color: #ddd; float: right; width: min(280px, 40%); box-shadow: 0 0 20px rgba(0,0,0,0.25); }
body.single .content #callout p { margin-bottom: 0.8rem; }
body.single .content #callout strong { color: #fff; }
@media (max-width: 800px) { body.single .content #callout { float: none; width: 100%; margin-left: 0; } }

.stack-container { position: relative; width: 100%; }
.layer { position: fixed; top: 0; left: 0; height: 100vh; width: 100%; display: flex; align-items: center; justify-content: center; background: #000; transform-style: preserve-3d; perspective: 1500px; pointer-events: none; opacity: 0; visibility: hidden; z-index: 1; will-change: transform, opacity; }
.layer.active { pointer-events: auto; opacity: 1; visibility: visible; z-index: 10; }
.layer.hero-layer .hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 1; opacity: 0.3; }
.layer.hero-layer .hero-bg::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
.hero-logo { width: min(60vw, 600px); height: auto; position: relative; z-index: 2; }
.layer.is-headline { z-index: 20; position: fixed; }
.layer.is-headline .bg-image { position: absolute; inset: 0; height: 100%; background-size: cover; background-position: center; z-index: 1; pointer-events: none; }
.layer.is-headline .content { position: relative; z-index: 2; display: block; width: 90%; max-width: 680px; margin: 0 auto; }
.headline-frosted-card { display: block; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(15px); padding: 40px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.1); position: relative; pointer-events: auto !important; cursor: pointer; z-index: 100; transition: transform 0.2s ease, border-color 0.2s ease; }
.headline-frosted-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.3); }
.headline-title { display: block; font-size: clamp(1.6rem, 4.5vw, 2.4rem) !important; margin-bottom: 1.5rem; text-align: left; color: #fff; line-height: 1.2; }
.headline-introtext { display: block; opacity: 0.9; font-size: 1rem; line-height: 1.7; color: #eee; max-height: 40vh; overflow-y: auto; text-align: justify; }

.grid-layer-wrapper { padding: 10vh 0; display: flex; align-items: flex-start; justify-content: center; background: #000; min-height: 100vh; }
.headline-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; width: 100%; max-width: 1400px; padding: 0 40px 100px; }
@media (max-width: 700px) { .headline-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding: 0 20px 80px; gap: 20px; } }
.headline-frosted-card.small-card { padding: 0; aspect-ratio: 16/10; position: relative; overflow: hidden; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.1); transition: transform 0.2s ease, border-color 0.2s ease; }
.headline-frosted-card.small-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.3); }
.headline-frosted-card.small-card .bg-image { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 1; transition: transform 0.5s ease; }
.headline-frosted-card.small-card:hover .bg-image { transform: scale(1.05); }
.headline-frosted-card.small-card .card-content { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 20px; z-index: 2; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.headline-frosted-card.small-card .headline-title { font-size: 1.1rem !important; margin-bottom: 8px !important; line-height: 1.3; color: #fff; }
.headline-frosted-card.small-card .headline-introtext { font-size: 0.85rem; line-height: 1.4; color: #ccc; max-height: none; overflow: visible; }

.menu-toggle { position: fixed; top: var(--edge-gap); right: var(--edge-gap); width: 50px; height: 50px; border-radius: 50%; background: #000; border: 1px solid #fff; cursor: pointer; z-index: 10000; display: flex; align-items: center; justify-content: center; transition: opacity 0.3s ease; }
.menu-toggle img { width: 85%; height: auto; filter: invert(1); }
.scroll-nav { position: fixed; right: calc(var(--edge-gap) + 25px - (var(--hit-area) / 2)); top: 75px; z-index: 4999; display: flex; flex-direction: column; }
.dot-wrapper { width: var(--hit-area); height: var(--hit-area); display: flex; align-items: center; justify-content: center; cursor: pointer; margin-top: -24px; }
.dot { width: var(--dot-visual-size); height: var(--dot-visual-size); border: 2px solid #fff; border-radius: 50%; background: rgba(0,0,0,0.6); opacity: 0.6; transition: all 0.4s; }
.dot-wrapper.active .dot { background: #fff; transform: scale(1.1); opacity: 1; }
.side-panel { position: fixed; top: 0; right: calc(-1 * var(--menu-width)); width: var(--menu-width); height: 100vh; background: #000 !important; z-index: 10500; padding: 2rem; transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); border-left: 1px solid #222; }
.side-panel.open { transform: translateX(calc(-1 * var(--menu-width))); }
.side-panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.panel-logo { width: 90px; height: auto; cursor: pointer; }
.search-wrapper .search-form-inline { display: flex; background: #111; border: 1px solid #222; border-radius: 4px; overflow: hidden; }
.search-wrapper .search-field { flex: 1; background: transparent; border: none; color: #fff; padding: 10px; outline: none; }
.search-wrapper .search-submit-icon { background: #222; border: none; color: #888; padding: 0 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s, color 0.2s; }
.search-wrapper .search-submit-icon:hover { background: #333; color: #fff; }
.tag-cloud-wrapper a { display: inline-block !important; margin-right: 12px; margin-bottom: 8px; color: #888 !important; }

body.single .article-header h1, body.single .post-meta, body.single .content, body.single .content > *, body.single .article-footer hr, body.single .article-footer .back-link, body.single #footer .footer-content p { max-width: min(790px, 70ch); margin-left: auto; margin-right: auto; padding-inline: 1.5rem; }
body.single .content { font-size: 1.18rem; line-height: 1.7; }
body.single .content p { margin-bottom: 1.2rem; }
body.single .content h2 { font-size: 1.6rem; margin: 2.2rem 0 1rem; line-height: 1.3; }
body.single .content h3 { font-size: 1.3rem; margin: 1.8rem 0 0.8rem; line-height: 1.35; }
body.single .content img { margin: 1.5rem 0; border-radius: 6px; height: auto; max-width: 100%; }
body.single .content .alignright { float: right; margin: 0.5rem 0 1rem 1.5rem; }
body.single .content .alignleft { float: left; margin: 0.5rem 1.5rem 1rem 0; }
body.single .content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
body.single .content a img { display: block; }
body.single blockquote { margin: 1.5rem 0; line-height: 1.6; }
body.single .article-footer hr { border: none; border-top: 1px solid #444; margin: 0 0 1rem 0; }
body.single .article-footer .back-link { display: block; margin-bottom: 1rem; }
body.single #footer { max-width: min(790px, 70ch); margin-left: auto; margin-right: auto; padding-inline: 1.5rem; }
body.single #footer .footer-content p { margin: 0; padding: 0rem 0; }

.post-navigation-social { width: 100%; max-width: 900px; margin: 0 auto; }
.post-navigation { display: flex; gap: 1.5rem; margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.nav-link { flex: 1; display: flex; flex-direction: column; padding: 1.5rem; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; transition: all 0.3s ease; text-decoration: none; min-width: 0; }
.nav-link:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.3); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.nav-label { font-family: 'Sofia Sans Condensed', sans-serif; text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.75rem; color: #666; margin-bottom: 0.75rem; flex-shrink: 0; }
.nav-title { font-family: 'Lustria', serif; font-size: 1rem; color: #fff; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nav-next { text-align: right; }
.social-share { text-align: center; }
.social-share h3 { font-family: 'Lustria', serif; font-size: 1rem; margin-bottom: 1.5rem; color: #888; font-weight: normal; }
.share-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.share-button { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.25rem; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; color: #fff; text-decoration: none; transition: all 0.3s ease; font-family: 'Lato', sans-serif; font-size: 0.85rem; }
.share-button:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.3); transform: translateY(-2px); }
.share-button svg { width: 18px; height: 18px; flex-shrink: 0; }
.share-button span { white-space: nowrap; }
@media (max-width: 768px) { .post-navigation { flex-direction: column; gap: 1rem; } .nav-next { text-align: left; } .share-buttons { flex-direction: column; align-items: stretch; } .share-button { justify-content: center; } }

.callout, #callout, div[id="callout"] { background: rgba(26, 26, 26, 0.5); border: 1px solid #333; padding: 1.2rem 1.4rem; margin: 1.5rem 0 1.5rem 1.5rem; border-radius: 6px; font-family: 'Cousine', monospace; font-size: 0.95rem; line-height: 1.55; float: right; width: min(280px, 40%); clear: right; }
.callout p, #callout p, div[id="callout"] p { margin-bottom: 0.75rem; }
.callout p:last-child, #callout p:last-child, div[id="callout"] p:last-child { margin-bottom: 0; }
@media (max-width: 768px) { .callout, #callout, div[id="callout"] { float: none; width: 100%; margin-left: 0; margin-right: 0; } }

body.single .post-content-area .content h1, body.single .post-content-area .content h2, body.single .post-content-area .content h3, body.single .post-content-area .content h4, body.single .post-content-area .content h5, body.single .post-content-area .content h6 { margin-top: 2rem; }
body.single .post-content-area .content h1:first-child, body.single .post-content-area .content h2:first-child, body.single .post-content-area .content h3:first-child, body.single .post-content-area .content h4:first-child, body.single .post-content-area .content h5:first-child, body.single .post-content-area .content h6:first-child { margin-top: 0; }

body.single .legacy-hero-layer { position: relative; width: 100%; height: 100vh; overflow: hidden; }
body.single .legacy-hero-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: contain; background-position: center; background-repeat: no-repeat; will-change: transform; }
body.single .legacy-hero-header { position: absolute; top: 20vh; left: 50%; transform: translateX(-50%); width: 90%; max-width: 800px; padding: 2rem; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 8px; will-change: transform; z-index: 2; }
body.single .legacy-hero-header h1 { margin: 0 0 1rem 0; font-family: 'Lustria', serif; font-size: 2.5rem; color: #fff; }
body.single .legacy-hero-header .post-meta { font-family: 'Sofia Sans Condensed', sans-serif; text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.9rem; color: #aaa; }
body.single .legacy-hero-header .post-meta a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.3); }
body.single .post-content-area { position: relative; background: #000; width: 100%; min-height: 100vh; padding: 3rem 2rem; z-index: 2; }

.side-nav a {
    display: block !important;
    padding: 0;
    border-bottom: 1px solid #222;
}

.side-nav .tag-cloud-wrapper a {
    display: inline-block !important;
    padding: 0;
    border-bottom: none !important;
}

.side-panel {
    overflow-y: auto;
}

.side-nav a:last-of-type {
    border-bottom: none;
}