/* Theme: urban-noir | Author: Vin Dictive */

/* --- Base Styles --- */

/* ==========================================================================
   Base Structural Styles
   All colors/fonts reference CSS custom properties defined by themes.
   ========================================================================== */

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body, Arial, Helvetica, sans-serif);
    background: var(--color-bg);
    color: var(--color-text);
    padding: 0;
    margin: 0;
    line-height: var(--line-height, 1.6);
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading, var(--font-body, Arial, Helvetica, sans-serif));
    color: var(--color-heading, var(--color-text));
    line-height: 1.2;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }

p {
    margin-bottom: 1em;
    max-width: 65ch;
}

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

a:hover {
    color: var(--color-highlight);
}

/* Accessibility */
.visually-hidden:not(:focus):not(:active) {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

/* ==========================================================================
   Layout Wrapper
   ========================================================================== */
.site-wrapper {
    max-width: var(--content-width, 1100px);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav-menu {
    list-style-type: none;
    padding: 1rem 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: var(--nav-align, center);
}

.nav-item {
    display: inline;
}

.nav-link {
    text-decoration: none;
    color: var(--color-nav, var(--color-accent));
    padding: 0.5rem 1rem;
    display: inline-block;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    text-transform: var(--nav-transform, uppercase);
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
    color: var(--color-highlight);
    border-bottom-color: var(--color-highlight);
}

.nav-active {
    font-weight: bold;
    color: var(--color-highlight);
    border-bottom-color: var(--color-highlight);
}

/* ==========================================================================
   Hero / Home Page Container
   ========================================================================== */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 2rem auto;
    gap: 2rem;
}

@media (min-width: 768px) {
    .container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        gap: 3rem;
    }

    .text-section,
    .book-image {
        max-width: 48%;
    }
}

/* Text Section */
.text-section {
    padding: 1rem 0;
}

.text-section h2 {
    color: var(--color-heading, var(--color-accent));
    margin-bottom: 1rem;
}

.text-section p {
    margin-bottom: 1.25rem;
    color: var(--color-text-muted, var(--color-text));
}

/* ==========================================================================
   Book Image / Cover
   ========================================================================== */
.book-image {
    padding: 1rem;
    position: relative;
    transition: transform 0.3s ease;
}

.book-image a {
    display: inline-block;
}

.book-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border: var(--book-border, 2px solid var(--color-accent));
    border-radius: var(--book-radius, 6px);
    box-shadow: var(--book-shadow, 0 4px 20px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-image a:hover img {
    transform: scale(1.03);
    box-shadow: var(--book-hover-shadow, 0 8px 30px var(--color-accent-glow, rgba(0, 0, 0, 0.5)));
}

/* CTA below book image */
.book-image::after {
    display: block;
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--color-bg);
    background-color: var(--color-accent);
    padding: 0.6rem 1.2rem;
    border-radius: var(--button-radius, 4px);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.book-image a:hover + ::after,
.book-image:hover::after {
    background-color: var(--color-highlight);
    color: var(--color-text);
}

/* ==========================================================================
   Intro / Social Section
   ========================================================================== */
.intro {
    margin: 2rem auto;
    max-width: 650px;
    text-align: center;
}

.intro a {
    color: var(--color-accent);
    text-decoration: none;
    margin-right: 1rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.intro a:hover {
    color: var(--color-highlight);
}

/* ==========================================================================
   Blog Post List
   ========================================================================== */
.blog-list,
main ul {
    list-style: none;
    padding: 0;
}

.blog-list li,
main ul li {
    margin-bottom: 0.75rem;
}

.blog-list a,
main ul a {
    color: var(--color-accent);
    font-size: 1.05rem;
}

.blog-list a:hover,
main ul a:hover {
    color: var(--color-highlight);
}

/* ==========================================================================
   Blog Post (Single)
   ========================================================================== */
.links-nextprev {
    list-style: none;
    padding: 2rem 0 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
    margin-top: 2rem;
}

.links-nextprev li {
    flex: 1;
}

.links-nextprev-next {
    text-align: right;
}

/* ==========================================================================
   Top Nav Header (topnav layout)
   ========================================================================== */
.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
    margin-bottom: 2rem;
}

.header-brand a {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-heading, var(--color-text));
    text-decoration: none;
}

.site-header .nav-menu {
    padding: 0;
    margin: 0;
}

/* ==========================================================================
   Sidebar Layout
   ========================================================================== */
.site-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    flex-shrink: 0;
    padding: 2rem 1.5rem;
    background: color-mix(in srgb, var(--color-bg) 90%, black);
    border-right: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1;
}

/* Optional sidebar background image — set --sidebar-image in author overrides */
.sidebar.has-bg-image {
    background:
        linear-gradient(
            to bottom,
            color-mix(in srgb, var(--color-bg) 90%, black) 0%,
            color-mix(in srgb, var(--color-bg) 70%, transparent) 40%,
            color-mix(in srgb, var(--color-bg) 30%, transparent) 70%,
            transparent 100%
        ),
        var(--sidebar-image) bottom / cover no-repeat;
}

.sidebar-brand a {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-heading, var(--color-text));
    text-decoration: none;
    display: block;
    margin-bottom: 2rem;
}

.sidebar .nav-menu {
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
}

.sidebar .nav-link {
    display: block;
    padding: 0.6rem 0;
    border-bottom: none;
    font-size: 1rem;
}

.sidebar .nav-link:hover {
    border-bottom: none;
    padding-left: 0.5rem;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 2rem;
    font-size: 0.85rem;
    color: var(--color-text-muted, rgba(255, 255, 255, 0.6));
}

.sidebar-social {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.sidebar-social a {
    color: var(--color-accent);
    font-size: 0.85rem;
}

.site-layout .main-content {
    flex: 1;
    padding: 2.5rem 3rem;
    max-width: var(--content-width, 1100px);
}

@media (max-width: 768px) {
    .site-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 1rem 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
    }

    .sidebar-brand {
        margin-right: auto;
    }

    .sidebar-brand a {
        margin-bottom: 0;
    }

    .sidebar .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar .nav-link:hover {
        padding-left: 0;
    }

    .sidebar-footer {
        display: none;
    }

    .site-layout .main-content {
        padding: 1.5rem;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid var(--color-border, rgba(255, 255, 255, 0.1));
    color: var(--color-text-muted, rgba(255, 255, 255, 0.6));
    font-size: 0.9rem;
}


/* --- Theme Overrides --- */

/* ==========================================================================
   Theme: Urban Noir — Sidebar Layout
   Best for: Urban Fantasy, Dark Fantasy, Thriller, Detective Fiction
   ========================================================================== */
:root {
    /* Cool slate base with electric teal accent */
    --color-bg: #0b0e14;
    --color-text: #b8bcc8;
    --color-text-muted: rgba(184, 188, 200, 0.55);
    --color-heading: #eef0f6;
    --color-accent: #3dd8c5;
    --color-highlight: #7b6cf6;
    --color-nav: #5c6070;
    --color-border: rgba(255, 255, 255, 0.05);
    --color-accent-glow: rgba(61, 216, 197, 0.2);
    --sidebar-width: 260px;
    --sidebar-bg: rgba(8, 10, 16, 0.95);

    --font-body: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
    --font-heading: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
    --line-height: 1.7;

    --content-width: 1080px;
    --nav-align: center;
    --nav-transform: uppercase;

    --book-border: none;
    --book-radius: 8px;
    --book-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03);
    --book-hover-shadow: 0 24px 64px rgba(61, 216, 197, 0.12), 0 0 0 1px rgba(61, 216, 197, 0.1);
    --button-radius: 8px;
}

/* ==========================================================================
   BACKGROUND — layered ambient gradients
   ========================================================================== */
body {
    background: var(--color-bg);
}

/* ==========================================================================
   SITE LAYOUT — sidebar + main content
   ========================================================================== */
.site-layout {
    display: flex;
    min-height: 100vh;
}

/* ==========================================================================
   SIDEBAR — frosted glass with gradient accent line
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    padding: 2.5rem 0;
    z-index: 100;
    overflow-y: auto;
}

/* Gradient accent line on right edge */
.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: -1px;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--color-accent) 30%,
        var(--color-highlight) 70%,
        transparent 100%
    );
    opacity: 0.4;
}

/* Author name / brand */
.sidebar-brand {
    padding: 0 1.75rem 2rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.sidebar-brand a {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-heading);
    text-decoration: none;
    background: linear-gradient(135deg, #eef0f6 40%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Vertical nav */
.sidebar nav {
    flex: 1;
    padding: 0.5rem 0;
}

.sidebar .nav-menu {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    gap: 2px;
    list-style: none;
}

.sidebar .nav-item {
    display: block;
}

.sidebar .nav-link {
    display: block;
    padding: 0.65rem 1.75rem;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-nav);
    text-decoration: none;
    border-bottom: none;
    border-left: 2px solid transparent;
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.sidebar .nav-link:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.02);
    border-left-color: rgba(61, 216, 197, 0.3);
    border-bottom: none;
}

.sidebar .nav-active {
    border-bottom: none;
}

.sidebar .nav-active .nav-link,
.sidebar .nav-link.nav-active,
.sidebar li.nav-active .nav-link,
.sidebar li.nav-active a {
    color: var(--color-accent);
    border-left-color: var(--color-accent);
    background: linear-gradient(90deg, rgba(61, 216, 197, 0.06) 0%, transparent 100%);
    font-weight: 600;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

.sidebar-social {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.sidebar-social a {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-nav);
    text-decoration: none;
    transition: color 0.25s ease;
}

.sidebar-social a:hover {
    color: var(--color-accent);
}

.sidebar-footer p {
    font-size: 0.62rem;
    color: rgba(184, 188, 200, 0.3);
    letter-spacing: 0.04em;
    margin: 0;
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    padding: 3rem 4rem;
    background:
        radial-gradient(ellipse 50% 35% at 80% 0%, rgba(61, 216, 197, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 10% 100%, rgba(123, 108, 246, 0.03) 0%, transparent 50%),
        var(--color-bg);
}

/* Subtle grain texture */
.main-content::before {
    content: '';
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.main-content > * {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.025em;
}

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, #eef0f6 20%, var(--color-accent) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.6rem;
    color: var(--color-heading);
}

h3 { font-size: 1.25rem; }

p {
    color: var(--color-text);
    font-weight: 400;
}

.text-section h2 {
    color: var(--color-heading);
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

/* Accent bar on section headings */
.text-section h2::before {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-highlight));
    margin-bottom: 1rem;
    border-radius: 1px;
}

.text-section p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--color-text-muted);
}

/* ==========================================================================
   HERO / HOME CONTAINER
   ========================================================================== */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 2rem 0;
    gap: 3rem;
}

@media (min-width: 900px) {
    .container {
        flex-direction: row;
        text-align: left;
        gap: 5rem;
        align-items: center;
    }

    .text-section {
        flex: 1;
    }

    .book-image {
        flex: 0 0 auto;
        max-width: 320px;
    }

    .text-section h2::before {
        margin-left: 0;
    }
}

@media (max-width: 899px) {
    .text-section h2::before {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ==========================================================================
   BOOK COVERS — glow + lift on hover
   ========================================================================== */
.book-image {
    position: relative;
}

.book-image img {
    border: none;
    border-radius: var(--book-radius);
    transition: transform 0.5s cubic-bezier(0.2, 0, 0.2, 1),
                box-shadow 0.5s cubic-bezier(0.2, 0, 0.2, 1);
}

.book-image a:hover img {
    transform: translateY(-8px) scale(1.02);
}

/* Ambient glow behind covers */
.book-image::before {
    content: '';
    position: absolute;
    inset: 15% 10%;
    background: radial-gradient(ellipse, rgba(61, 216, 197, 0.12) 0%, transparent 70%);
    filter: blur(40px);
    z-index: -1;
    transition: opacity 0.5s ease;
    opacity: 0.6;
}

.book-image:hover::before {
    opacity: 1;
}

/* CTA Button */
.book-image::after {
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.85rem 2.5rem;
    border-radius: var(--button-radius);
    box-shadow: 0 4px 20px rgba(61, 216, 197, 0.15);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.book-image:hover::after {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(61, 216, 197, 0.25);
}

/* Books page covers */
main img[alt*="Cover"] {
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

main img[alt*="Cover"]:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(61, 216, 197, 0.12);
}

/* ==========================================================================
   INTRO SECTION
   ========================================================================== */
.intro {
    max-width: 600px;
    margin: 3rem 0;
    padding-top: 2.5rem;
    border-top: 1px solid var(--color-border);
    text-align: left;
}

.intro p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   BLOG LIST — subtle hover cards
   ========================================================================== */
.blog-list li,
main ul li {
    margin-bottom: 0.25rem;
}

.blog-list a,
main ul a {
    display: inline-block;
    font-weight: 500;
    font-size: 1.05rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: background 0.25s ease, color 0.25s ease;
}

.blog-list a:hover,
main ul a:hover {
    background: rgba(61, 216, 197, 0.05);
    color: var(--color-accent);
}

/* ==========================================================================
   BOOK PAGE headings
   ========================================================================== */
main > h2 {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.75rem;
}

/* ==========================================================================
   FOOTER (hidden when sidebar layout is active)
   ========================================================================== */
.layout-sidebar footer {
    display: none;
}

/* ==========================================================================
   LINKS
   ========================================================================== */
a {
    transition: color 0.25s ease;
}

/* ==========================================================================
   MOBILE — collapse sidebar to top bar
   ========================================================================== */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }

    .site-layout {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 1rem 1.25rem;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .sidebar::after {
        display: none;
    }

    .sidebar-brand {
        padding: 0 1rem 0 0;
        border-bottom: none;
        margin-bottom: 0;
    }

    .sidebar .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0;
    }

    .sidebar .nav-link {
        border-left: none;
        padding: 0.5rem 0.75rem;
        font-size: 0.68rem;
    }

    .sidebar .nav-link:hover {
        border-left: none;
    }

    .sidebar li.nav-active .nav-link,
    .sidebar li.nav-active a {
        border-left: none;
        background: rgba(61, 216, 197, 0.08);
        border-radius: 4px;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 2rem 1.5rem;
    }

    .main-content::before {
        left: 0;
    }
}

/* ==========================================================================
   SCROLLBAR
   ========================================================================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(61, 216, 197, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(61, 216, 197, 0.2);
}

html {
    scrollbar-color: rgba(61, 216, 197, 0.1) var(--color-bg);
    scrollbar-width: thin;
}

/* ==========================================================================
   SELECTION
   ========================================================================== */
::selection {
    background: rgba(61, 216, 197, 0.25);
    color: #eef0f6;
}


/* --- Author Overrides --- */

/* ==========================================================================
   Author Overrides: Vin Dictive
   Theme: urban-noir + arcane violet/crimson enhancements
   ========================================================================== */

/* --- Extended palette --- */
:root {
    --color-violet: #7b5ea7;
    --color-violet-light: #a78bdb;
    --color-crimson: #c43b5c;
    --color-accent: #3dd8c5;
    --color-highlight: #a78bdb;
    --bg-image: none;
}

/* ==========================================================================
   TOPNAV LAYOUT — override sidebar-specific spacing from theme
   ========================================================================== */
.layout-topnav .main-content {
    margin-left: 0;
}

.layout-topnav .main-content::before {
    left: 0;
}

/* ==========================================================================
   HERO — diagonal arcane lines
   ========================================================================== */
.home .main-content {
    position: relative;
}

.home .main-content::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        repeating-linear-gradient(
            -35deg,
            transparent,
            transparent 80px,
            rgba(123, 94, 167, 0.025) 80px,
            rgba(123, 94, 167, 0.025) 81px
        ),
        repeating-linear-gradient(
            35deg,
            transparent,
            transparent 120px,
            rgba(61, 216, 197, 0.018) 120px,
            rgba(61, 216, 197, 0.018) 121px
        );
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================================
   BOOK COVER — rotating conic gradient glow + orbital rings
   ========================================================================== */
.book-image {
    position: relative;
    z-index: 1;
}

/* Rotating conic gradient aura */
.book-image::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: conic-gradient(
        from 0deg,
        rgba(61, 216, 197, 0.18),
        rgba(123, 94, 167, 0.22),
        rgba(196, 59, 92, 0.15),
        rgba(123, 94, 167, 0.22),
        rgba(61, 216, 197, 0.18)
    );
    filter: blur(45px);
    border-radius: 50%;
    z-index: -1;
    animation: arcane-rotate 12s linear infinite;
    opacity: 0.7;
}

.book-image:hover::before {
    opacity: 1;
}

@keyframes arcane-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Orbital ring 1 — cyan */
.book-image a {
    position: relative;
}

.book-image a::before {
    content: '';
    position: absolute;
    inset: -18px;
    border: 1px solid rgba(61, 216, 197, 0.12);
    border-radius: 50%;
    animation: orbit-pulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
    /* Light dot via radial-gradient on the ring */
    background:
        radial-gradient(circle 3px at 15% 5%, rgba(61, 216, 197, 0.7), transparent 80%),
        radial-gradient(circle 3px at 85% 95%, rgba(61, 216, 197, 0.5), transparent 80%),
        transparent;
}

/* Orbital ring 2 — violet with light dots */
.book-image a::after {
    content: '';
    position: absolute;
    inset: -32px;
    border: 1px solid rgba(167, 139, 219, 0.08);
    border-radius: 50%;
    animation: orbit-pulse 6s ease-in-out infinite reverse;
    pointer-events: none;
    z-index: 2;
    background:
        radial-gradient(circle 2px at 90% 30%, rgba(167, 139, 219, 0.6), transparent 80%),
        radial-gradient(circle 2px at 10% 70%, rgba(167, 139, 219, 0.4), transparent 80%),
        radial-gradient(circle 2px at 50% 2%, rgba(196, 59, 92, 0.4), transparent 80%),
        transparent;
}

@keyframes orbit-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.02); }
}

/* ==========================================================================
   SECTION DIVIDERS — cyan → violet dual-color fade
   ========================================================================== */
.text-section h2::before {
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-violet-light));
    box-shadow: 0 0 8px rgba(61, 216, 197, 0.3), 0 0 16px rgba(123, 94, 167, 0.2);
}

.intro {
    border-image: linear-gradient(90deg, var(--color-accent), var(--color-violet-light), transparent) 1;
}

/* ==========================================================================
   GLOWING LABEL TEXT SHADOWS
   ========================================================================== */
.text-section h2 {
    text-shadow: 0 0 30px rgba(61, 216, 197, 0.08);
}

h1 {
    background: linear-gradient(135deg, #eef0f6 20%, var(--color-accent) 60%, var(--color-violet-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none; /* text-shadow doesn't work on clipped text, but prevents inheritance */
}

/* ==========================================================================
   TOP NAV — violet accent touches
   ========================================================================== */
.site-header {
    border-bottom-color: transparent;
    border-image: linear-gradient(90deg, var(--color-accent), var(--color-violet-light), transparent) 1;
}

.nav-link:hover {
    color: var(--color-violet-light);
    border-bottom-color: var(--color-violet-light);
}

.header-brand a {
    background: linear-gradient(135deg, #eef0f6 40%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   FEATURE CARDS — violet-tipped hover with glowing top-edge reveal
   ========================================================================== */
.blog-list a,
main ul a {
    position: relative;
    overflow: hidden;
}

/* Glowing top-edge reveal on hover */
.blog-list a::before,
main ul a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-violet-light));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 2px 2px 0 0;
}

.blog-list a:hover::before,
main ul a:hover::before {
    opacity: 1;
    box-shadow: 0 0 12px rgba(167, 139, 219, 0.4), 0 0 24px rgba(61, 216, 197, 0.2);
}

.blog-list a:hover,
main ul a:hover {
    background: linear-gradient(180deg, rgba(123, 94, 167, 0.06) 0%, rgba(61, 216, 197, 0.04) 100%);
    color: var(--color-violet-light);
}

/* ==========================================================================
   BUTTONS — inline CTA buttons
   ========================================================================== */
.btn {
    display: inline-block;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.85rem 2rem;
    border-radius: var(--button-radius, 8px);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    margin-right: 0.75rem;
    margin-bottom: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent), var(--color-violet));
    color: #0b0e14;
    box-shadow: 0 4px 20px rgba(61, 216, 197, 0.15), 0 4px 20px rgba(123, 94, 167, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(61, 216, 197, 0.25), 0 8px 32px rgba(123, 94, 167, 0.2);
    color: #0b0e14;
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.btn-outline:hover {
    border-color: var(--color-violet-light);
    color: var(--color-violet-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(123, 94, 167, 0.15);
}

/* Book image CTA override */
.book-image::after {
    background: linear-gradient(135deg, var(--color-accent), var(--color-violet)) !important;
    color: #0b0e14 !important;
    box-shadow: 0 4px 20px rgba(61, 216, 197, 0.15), 0 4px 20px rgba(123, 94, 167, 0.1);
}

.book-image:hover::after {
    box-shadow: 0 8px 32px rgba(61, 216, 197, 0.25), 0 8px 32px rgba(123, 94, 167, 0.2);
}

/* ==========================================================================
   SCROLLBAR — violet tint
   ========================================================================== */
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(61, 216, 197, 0.12), rgba(123, 94, 167, 0.12));
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(61, 216, 197, 0.25), rgba(123, 94, 167, 0.25));
}

/* ==========================================================================
   SELECTION — violet tint
   ========================================================================== */
::selection {
    background: rgba(123, 94, 167, 0.3);
    color: #eef0f6;
}

/* ==========================================================================
   MAIN CONTENT — enriched ambient gradients with violet
   ========================================================================== */
.main-content {
    background:
        radial-gradient(ellipse 50% 35% at 80% 0%, rgba(61, 216, 197, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 10% 100%, rgba(123, 94, 167, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 30% 30% at 90% 80%, rgba(196, 59, 92, 0.02) 0%, transparent 50%),
        var(--color-bg);
}

/* ==========================================================================
   MOBILE — adjust orbital rings
   ========================================================================== */
@media (max-width: 768px) {
    .home .main-content::after {
        left: 0;
    }

    .book-image::before {
        inset: -12px;
        filter: blur(30px);
    }

    .book-image a::before {
        inset: -10px;
    }

    .book-image a::after {
        inset: -20px;
    }
}
