/* Color Scheme Variables */
:root {
    /* Default/Current Scheme */
    --primary-color: #03A6A1;
    --primary-color-rgb: 3, 166, 161;
    --secondary-color: #FFA673;
    --secondary-color-rgb: 255, 166, 115;
    --accent-color: #ffffff;
    --text-color: #333333;
    --gradient-start: #4a4a4a;
    --gradient-mid: #2a2a2a;
    --gradient-end: #1a1a1a;
    /* Link tiles: homepage + hub non-home tiles (hubs override --nav-tile-bg in showcase.css) */
    --nav-tile-bg: linear-gradient(135deg, #4e4f52 0%, #38393c 50%, #2c2d30 100%);
    /* Home tile (hub): reversed — same greys as filled tiles, as ink + border on transparent */
    --nav-tile-home-ink: #4e4f52;
    --nav-tile-home-border: #4e4f52;
}

/* Color Scheme 1: Summer Palette */
.color-scheme-1 {
    --primary-color: #36BA98;
    --primary-color-rgb: 54, 186, 152;
    --secondary-color: #E9C46A;
    --secondary-color-rgb: 233, 196, 106;
    --accent-color: #F4A261;
    --text-color: #333333;
    --gradient-start: #4a4a4a;
    --gradient-mid: #2a2a2a;
    --gradient-end: #1a1a1a;
}

/* Color Scheme 2: Orange/Navy Palette */
.color-scheme-2 {
    --primary-color: #FE7743;
    --primary-color-rgb: 254, 119, 67;
    --secondary-color: #273F4F;
    --secondary-color-rgb: 39, 63, 79;
    --accent-color: #447D9B;
    --text-color: #333333;
    --gradient-start: #4a4a4a;
    --gradient-mid: #2a2a2a;
    --gradient-end: #1a1a1a;
}

/* Color Scheme 3: Blue/Orange Palette */
.color-scheme-3 {
    --primary-color: #77BEF0;
    --primary-color-rgb: 119, 190, 240;
    --secondary-color: #FFCB61;
    --secondary-color-rgb: 255, 203, 97;
    --accent-color: #FF894F;
    --text-color: #333333;
    --gradient-start: #4a4a4a;
    --gradient-mid: #2a2a2a;
    --gradient-end: #1a1a1a;
}

/* Color Scheme 4: Earthy Palette */
.color-scheme-4 {
    --primary-color: #780C28;
    --primary-color-rgb: 120, 12, 40;
    --secondary-color: #CAE0BC;
    --secondary-color-rgb: 202, 224, 188;
    --accent-color: #EAFAEA;
    --text-color: #333333;
    --gradient-start: #4a4a4a;
    --gradient-mid: #2a2a2a;
    --gradient-end: #1a1a1a;
}

/* Color Scheme 5: Space Palette */
.color-scheme-5 {
    --primary-color: #0B1D51;
    --primary-color-rgb: 11, 29, 81;
    --secondary-color: #725CAD;
    --secondary-color-rgb: 114, 92, 173;
    --accent-color: #8CCDEB;
    --text-color: #333333;
    --gradient-start: #4a4a4a;
    --gradient-mid: #2a2a2a;
    --gradient-end: #1a1a1a;
}

/* Color Scheme 6: Retro Palette */
.color-scheme-6 {
    --primary-color: #BB3E00;
    --primary-color-rgb: 187, 62, 0;
    --secondary-color: #F7AD45;
    --secondary-color-rgb: 247, 173, 69;
    --accent-color: #657C6A;
    --text-color: #333333;
    --gradient-start: #4a4a4a;
    --gradient-mid: #2a2a2a;
    --gradient-end: #1a1a1a;
}

/* Color Scheme 7: Bright Palette */
.color-scheme-7 {
    --primary-color: #59D5E0;
    --primary-color-rgb: 89, 213, 224;
    --secondary-color: #F5DD61;
    --secondary-color-rgb: 245, 221, 97;
    --accent-color: #FAA300;
    --text-color: #333333;
    --gradient-start: #4a4a4a;
    --gradient-mid: #2a2a2a;
    --gradient-end: #1a1a1a;
}

/* Color Scheme 8: Purple Gradient Palette */
.color-scheme-8 {
    --primary-color: #5A639C;
    --primary-color-rgb: 90, 99, 156;
    --secondary-color: #7776B3;
    --secondary-color-rgb: 119, 118, 179;
    --accent-color: #9B86BD;
    --text-color: #333333;
    --gradient-start: #4a4a4a;
    --gradient-mid: #2a2a2a;
    --gradient-end: #1a1a1a;
}

/* Reset and Body Styling */
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial Black', 'Arial', sans-serif;
    --font-body: Arial, sans-serif;
    background: #ffffff;
    color: #333333;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Floating Bubbles */
.floating-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(var(--primary-color-rgb, 3, 166, 161), 0.4), rgba(var(--primary-color-rgb, 3, 166, 161), 0.3) 100%);
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 0 20px rgba(var(--primary-color-rgb, 3, 166, 161), 0.4),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
    pointer-events: auto;
}

.bubble.popped {
    animation: pop 0.5s ease-out forwards;
}

@keyframes pop {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.8;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.bubble-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    animation: floaty-wobble 12s ease-in-out infinite;
    animation-delay: 0s;
}

.bubble-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation: floaty-wobble 15s ease-in-out infinite;
    animation-delay: 8s;
}

.bubble-3 {
    width: 80px;
    height: 80px;
    top: 40%;
    right: 30%;
    animation: floaty-wobble 10s ease-in-out infinite;
    animation-delay: 15s;
}

/*
 * Bubbles sit behind page chrome (z-index 0). Pointer-events pass-through on layout
 * wrappers lets empty areas reach bubbles; bubbles.js also uses elementsFromPoint
 * for clicks through non-interactive overlays. Links and text keep pointer-events: auto.
 */
body > .site-header,
body > header.site-header {
    pointer-events: none;
}

body > .site-header a,
body > .site-header button,
body > .site-header .brand-link,
body > .site-header .header-logo-container,
body > .site-header .social-links,
body > .site-header .social-links a {
    pointer-events: auto;
}

body > main,
body > footer {
    pointer-events: none;
}

body > main *,
body > footer * {
    pointer-events: auto;
}

/* Full-width section wrappers capture hits in gutters; pass through to bubbles. */
body > main > section.projects {
    pointer-events: none;
}

body > main > section.projects > .container,
body > main > section.projects > .container * {
    pointer-events: auto;
}

/* Long-form discourse: article spans the column; empty areas should not block bubbles. */
body > main article.discourse-article {
    pointer-events: none;
}

body > main article.discourse-article * {
    pointer-events: auto;
}

body > section.legal-content {
    pointer-events: none;
}

body > section.legal-content * {
    pointer-events: auto;
}

body > main .link-list {
    pointer-events: none;
}

body > main .link-list > li > a {
    pointer-events: auto;
}

/* PWA install sits as a body sibling after main (index); the wrap can sit over fixed bubbles. */
body > .pwa-install-wrap {
    pointer-events: none;
}

body > .pwa-install-wrap * {
    pointer-events: auto;
}

body > .color-scheme-float-wrap {
    pointer-events: none;
}

body > .color-scheme-float-wrap .color-scheme-changer {
    pointer-events: auto;
}

body > .herbie-site-owner-bar {
    pointer-events: none;
}

body > .herbie-site-owner-bar * {
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    .bubble,
    .bubble-1,
    .bubble-2,
    .bubble-3 {
        animation: none;
    }
}

/* Header Logo Styling */
.header-logo-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: none;
}

.header-logo-container:hover {
    transform: scale(1.1) rotate(-5deg);
    filter: none;
}

.header-main-logo, .header-hover-logo {
    max-height: 1.5em;
    width: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.header-main-logo {
    opacity: 1;
    transform: rotate(0deg);
}

.header-hover-logo {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: rotate(0deg);
}

.header-logo-container:hover .header-main-logo {
    opacity: 0;
    transform: rotate(-5deg);
}

.header-logo-container:hover .header-hover-logo {
    opacity: 1;
    transform: rotate(-5deg);
}

/* Container Styling */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}



/* Projects Section */
.projects {
    padding: 40px 0;
}

/* Hub titles + CV/About name header (name-header.php) */
.page-title,
#name-header,
#name-header.header-text-style {
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    text-align: center;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow:
        2px 2px 0px var(--primary-color),
        4px 4px 0px var(--secondary-color),
        6px 6px 0px #333333;
    -webkit-text-stroke: 1px #000000;
    text-stroke: 1px #000000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Enhanced Link List — Flexbox */
.link-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 0;
    list-style: none;
    max-width: 1000px;
    margin: 0 auto;
}

/* Container for fluid type: label font scales with tile width (link-in-bio uniform tiles). */
.link-list li {
    width: calc((100% - 4rem) / 3);
    min-width: 0;
    container-type: inline-size;
    container-name: link-tile;
}

.project-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    /* Fixed footprint: every tile same height (industry pattern for grid cards). */
    height: 11.5rem;
    min-height: 11.5rem;
    max-height: 11.5rem;
    padding: 1.35rem 1.25rem;
    text-decoration: none;
    background: var(--nav-tile-bg, linear-gradient(135deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end)));
    color: #ffffff;
    border-radius: 20px;
    border: 3px solid #ffffff;
    transition: all 0.4s ease;
    box-shadow: 
        0 0 8px rgba(var(--primary-color-rgb, 3, 166, 161), 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    font-weight: bold;
    text-shadow: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a.project-link.project-link--home {
    background: transparent;
    color: var(--nav-tile-home-ink);
    border-color: var(--nav-tile-home-border);
    box-shadow: none;
}

a.project-link.project-link--home::before {
    background: linear-gradient(90deg, transparent, rgba(78, 79, 82, 0.12), transparent);
}

.project-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.project-link:hover::before {
    left: 100%;
}

.project-link i {
    font-size: 2.5rem;
    margin-bottom: 0.65rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

/* Fluid type from tile width + max 2 lines so height never grows the card. */
.project-link span {
    font-size: clamp(0.65rem, 5.5cqi + 0.48rem, 1.25rem);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    width: 100%;
    align-self: stretch;
    margin-bottom: 0;
    min-height: 0;
    flex: 0 1 auto;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow-wrap: break-word;
    word-break: break-word;
}

.project-link small {
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center;
}

.project-link:hover {
    transform: translateY(-15px) perspective(1000px) rotateX(10deg) scale(1.05);
    box-shadow: 
        0 0 12px rgba(var(--primary-color-rgb, 3, 166, 161), 0.4),
        0 0 18px rgba(var(--primary-color-rgb, 3, 166, 161), 0.3),
        inset 0 0 30px rgba(255, 255, 255, 0.5);
    border-color: var(--secondary-color);
}

.project-link:hover i {
    transform: scale(1.2);
}

a.project-link.project-link--home:hover {
    background: rgba(78, 79, 82, 0.06);
    box-shadow: 0 0 0 1px rgba(78, 79, 82, 0.15);
    border-color: var(--nav-tile-home-border);
    color: #38393c;
}

a.project-link.project-link--home:hover::before {
    background: linear-gradient(90deg, transparent, rgba(78, 79, 82, 0.18), transparent);
}

a.project-link.project-link--home:focus-visible {
    border-color: var(--secondary-color);
}

/*
 * Essay variant: same tile shell as .project-link but taller to fit a blockquote.
 * Used by the Discourse hub to render essay previews with the regular card look.
 * Scoped with a modifier so regular hubs are unaffected.
 */
.link-list__item--essay {
    width: 100%;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.project-link--essay {
    height: auto;
    min-height: 11.5rem;
    max-height: none;
    padding: 1.5rem 1.5rem 1.65rem;
    gap: 0.35rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.project-link--essay > span:not(.project-link__quote) {
    font-size: clamp(1rem, 3.2cqi + 0.6rem, 1.35rem);
    -webkit-line-clamp: 3;
    line-clamp: 3;
    max-width: 100%;
    text-align: center;
}

.project-link__quote {
    display: -webkit-box;
    width: 100%;
    max-width: 34rem;
    margin: 0.55rem auto 0;
    padding: 0.1rem 0 0.1rem 0.9rem;
    border-left: 3px solid rgba(255, 255, 255, 0.55);
    font-family: var(--font-body, Arial, sans-serif);
    font-size: 0.95rem;
    font-style: italic;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.96);
    text-align: left;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px) translateX(0px);
    }
    10% {
        transform: translateY(-20px) translateX(15px);
    }
    20% {
        transform: translateY(-40px) translateX(-10px);
    }
    30% {
        transform: translateY(-60px) translateX(25px);
    }
    40% {
        transform: translateY(-30px) translateX(40px);
    }
    50% {
        transform: translateY(-50px) translateX(-30px);
    }
    60% {
        transform: translateY(-20px) translateX(50px);
    }
    70% {
        transform: translateY(-70px) translateX(-20px);
    }
    80% {
        transform: translateY(-40px) translateX(35px);
    }
    90% {
        transform: translateY(-60px) translateX(-15px);
    }
    100% {
        transform: translateY(0px) translateX(0px);
    }
}

@keyframes floaty-wobble {
    0% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
    }
    10% {
        transform: translateY(-15px) translateX(8px) rotate(2deg);
    }
    20% {
        transform: translateY(-25px) translateX(-5px) rotate(-1deg);
    }
    30% {
        transform: translateY(-35px) translateX(12px) rotate(1deg);
    }
    40% {
        transform: translateY(-20px) translateX(18px) rotate(-0.5deg);
    }
    50% {
        transform: translateY(-30px) translateX(-8px) rotate(1.5deg);
    }
    60% {
        transform: translateY(-10px) translateX(22px) rotate(-1deg);
    }
    70% {
        transform: translateY(-40px) translateX(-12px) rotate(0.5deg);
    }
    80% {
        transform: translateY(-25px) translateX(15px) rotate(-0.8deg);
    }
    90% {
        transform: translateY(-35px) translateX(-6px) rotate(1.2deg);
    }
    100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
    }
}

/* Client Footer - Using CV Logo Bar Styling */
.client-footer {
    background: transparent;
    border: none;
    padding: 1em 0;
    text-align: center;
    margin: 0;
}

.client-footer h3 {
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    text-transform: none;
    letter-spacing: normal;
}

.client-logos-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    margin: 0 auto;
}

.footer-logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 0.25em;
    background: transparent;
    transition: all 0.3s ease;
    height: 3.5em;
}

.footer-logo-item:hover {
    background: transparent;
    transform: translateY(-0.125em);
    box-shadow: 0 0.125em 0.5em rgba(0, 0, 0, 0.1);
}

.footer-client-logo {
    max-width: 100px;
    height: 100%;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

.footer-logo-item:hover .footer-client-logo {
    transform: scale(1.05);
}

/* WNDR logo - make dark grey instead of white */
.footer-client-logo[src*="03 WNDR_LOGO_WHITE.svg"] {
    filter: grayscale(100%) brightness(0.3) opacity(0.7);
}

/* Specific logo hover effects with color overlays */
/* Nike logo - maroon overlay on hover */
.footer-logo-item:hover .footer-client-logo[src*="01 Logo_NIKE.svg"] {
    filter: grayscale(0%) opacity(1);
    transform: scale(0.85);
}

.footer-logo-item:hover:has(.footer-client-logo[src*="01 Logo_NIKE.svg"]) {
    background-color: var(--primary-color);
    border-radius: 0.2em;
    padding: 0.1em;
}

/* WNDR logo - purple overlay on hover */
.footer-logo-item:hover .footer-client-logo[src*="03 WNDR_LOGO_WHITE.svg"] {
    filter: grayscale(0%) opacity(1);
    transform: scale(0.85);
}

.footer-logo-item:hover:has(.footer-client-logo[src*="03 WNDR_LOGO_WHITE.svg"]) {
    background-color: var(--secondary-color);
    border-radius: 0.2em;
    padding: 0.1em;
}

/* Walt Disney Family Museum logo - gold overlay on hover */
.footer-logo-item:hover .footer-client-logo[src*="04 waltdisneyfm.svg"] {
    filter: grayscale(0%) opacity(1);
    transform: scale(0.85);
}

.footer-logo-item:hover:has(.footer-client-logo[src*="04 waltdisneyfm.svg"]) {
    background-color: var(--accent-color);
    border-radius: 0.2em;
    padding: 0.1em;
}

/* Responsive — Tablet */
@media (max-width: 1024px) {
    .link-list li {
        width: calc((100% - 2rem) / 2);
    }
}

/* Responsive — Mobile */
@media (max-width: 600px) {
    .link-list {
        gap: 1rem;
    }

    .link-list li {
        width: 100%;
    }
    
    .project-link {
        padding: 1rem 1.25rem;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        height: 6.25rem;
        min-height: 6.25rem;
        max-height: 6.25rem;
    }
    
    .project-link i {
        font-size: 1.5rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .project-link span {
        font-size: clamp(0.62rem, 7cqi + 0.42rem, 1.05rem);
        text-align: left;
        -webkit-line-clamp: 2;
        flex: 0 1 auto;
        width: auto;
        max-width: 75%;
        min-width: 0;
        align-self: center;
    }

    /* Essay variant: keep column stack + blockquote on mobile */
    .project-link--essay {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 1.1rem 1.1rem 1.25rem;
        gap: 0.4rem;
        height: auto;
        min-height: 11.5rem;
        max-height: none;
    }

    .project-link--essay > span:not(.project-link__quote) {
        text-align: center;
        max-width: 100%;
        align-self: auto;
    }

    .project-link__quote {
        font-size: 0.9rem;
        padding-left: 0.75rem;
        -webkit-line-clamp: 5;
        line-clamp: 5;
    }

    .link-list__item--essay {
        max-width: none;
    }

    .page-title,
    #name-header,
    #name-header.header-text-style {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .client-logos-footer {
        gap: 1rem;
    }

    .footer-logo-item {
        height: 40px;
    }
    
    .footer-client-logo {
        height: 2em;
    }
}

/* Color Scheme Changer Button */
.color-scheme-changer {
    position: static;
    background: transparent;
    border: none;
    color: rgba(0, 0, 0, 0.2);
    padding: 2px 4px;
    font-size: 8px;
    font-weight: 200;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.2;
    font-family: 'Arial', sans-serif;
    text-transform: lowercase;
    letter-spacing: 0.3px;
    margin-top: 10px;
    display: inline-block;
}

.color-scheme-changer:hover {
    opacity: 0.4;
    color: rgba(0, 0, 0, 0.4);
    transform: scale(1.02);
}

.color-scheme-changer:active {
    transform: scale(0.98);
}

/* Skip-to-content link (accessibility) */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    z-index: 10000;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    top: 0;
}

/* Focus-visible outlines for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.project-link:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 4px;
    border-color: var(--secondary-color);
}

/* Discourse Hub — same default body background as other hubs (see showcase.css for hub theme vars only) */
.discourse-hub {
    position: relative;
    z-index: 2;
}

/* Utility: visually-hidden span (used by discourse article pages) */
body.hub-discourse .discourse-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.discourse-source-card,
.discourse-post-section,
.discourse-note {
    background: rgba(255, 255, 255, 0.94);
    border: 3px solid rgba(var(--primary-color-rgb, 3, 166, 161), 0.35);
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
}

.discourse-kicker,
.discourse-section-label {
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.discourse-source-card h2,
.discourse-post-section h2,
.discourse-note h2 {
    margin: 0.55rem 0 0.75rem;
    color: #232323;
    font-size: 1.35rem;
    line-height: 1.2;
}

.discourse-source-card a,
.discourse-copy a,
.discourse-note a,
.discourse-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.discourse-source-card a:hover,
.discourse-copy a:hover,
.discourse-note a:hover,
.discourse-breadcrumb a:hover {
    color: var(--secondary-color);
}

.discourse-source-card p,
.discourse-note p,
.discourse-note li {
    color: #333333;
    font-family: Arial, sans-serif;
    line-height: 1.65;
}

.discourse-article {
    position: relative;
    z-index: 2;
    padding: 40px 0 70px;
}

.discourse-article__container {
    max-width: 980px;
}

.discourse-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-weight: 700;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}

.discourse-breadcrumb a {
    color: #ffffff;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.discourse-hero {
    margin-bottom: 2rem;
    color: #ffffff;
    text-align: center;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.discourse-hero h1 {
    margin: 0.35rem auto 1rem;
    font-size: clamp(2.25rem, 7vw, 4.5rem);
    line-height: 0.95;
}

.discourse-deck {
    max-width: 760px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    font-size: 1.1rem;
    line-height: 1.65;
}

/* Essay layout on default body (same white ground as other hubs) */
.discourse-article .discourse-breadcrumb {
    color: #333333;
    text-shadow: none;
}

.discourse-article .discourse-breadcrumb a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.discourse-article .discourse-breadcrumb a:hover {
    color: var(--secondary-color);
}

.discourse-article .discourse-hero {
    color: #232323;
    text-shadow: none;
}

.discourse-article .discourse-deck {
    color: #333333;
}

.discourse-source-card,
.discourse-post-section,
.discourse-note {
    padding: clamp(1.25rem, 3vw, 2rem);
}

.discourse-source-card {
    margin-bottom: 1.5rem;
}

.discourse-public-lead {
    margin-bottom: 1.5rem;
}

.discourse-public-lead .discourse-embed {
    margin-top: 0;
}

.discourse-embed {
    margin: 1.25rem 0;
    overflow: hidden;
    border: 2px solid rgba(var(--primary-color-rgb, 3, 166, 161), 0.24);
    border-radius: 18px;
    background: #ffffff;
}

.discourse-embed iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 560px;
    border: 0;
}

.discourse-embed-fallback {
    margin: 0.5rem 0 0;
    font-family: Arial, sans-serif;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #4a4a4a;
    text-align: center;
}

.discourse-source-card__button {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.8rem 1rem;
    background: var(--primary-color);
    color: #ffffff !important;
    border-radius: 999px;
    font-weight: 900;
    text-decoration: none;
}

.discourse-source-card__button:hover {
    background: var(--secondary-color);
    color: #232323 !important;
}

.discourse-post-section {
    margin-bottom: 1.5rem;
}

.discourse-copy {
    padding: clamp(1rem, 3vw, 2rem);
    background: #ffffff;
    border: 2px dashed rgba(var(--primary-color-rgb, 3, 166, 161), 0.35);
    border-radius: 18px;
}

.discourse-copy p {
    color: #222222;
    font-family: var(--font-body, Arial, sans-serif);
    font-size: 1.08rem;
    line-height: 1.75;
}

.discourse-copy p:first-child {
    margin-top: 0;
}

.discourse-copy p:last-child {
    margin-bottom: 0;
}

.discourse-notes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.discourse-note ul {
    margin: 0;
    padding-left: 1.2rem;
}

.discourse-note li + li {
    margin-top: 0.6rem;
}

@media (max-width: 900px) {
    .discourse-notes-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .discourse-article {
        padding-top: 24px;
    }

    .discourse-copy p {
        font-size: 1rem;
    }
}

/* PWA Install Button */
.pwa-install-wrap {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.pwa-install-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb, 3, 166, 161), 0.3);
    transition: all 0.3s ease;
}

.pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--primary-color-rgb, 3, 166, 161), 0.45);
}

/* Debug Panel */
.debug-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #000;
    color: #fff;
    padding: 20px;
    font-size: 14px;
    z-index: 9999;
    max-height: 300px;
    overflow-y: auto;
    border: 3px solid var(--primary-color);
}

.debug-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.debug-panel__title {
    font-size: 16px;
}

.debug-panel__close {
    background: #ff4444;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

.debug-panel__info {
    line-height: 1.4;
}

/* Debug Access Button */
.debug-access-wrap {
    text-align: center;
    margin-top: 20px;
    position: relative;
    z-index: 1000;
}

.debug-access-btn {
    width: 30px;
    height: 30px;
    background: #fff;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1001;
    display: inline-block;
}

/* Legal Links */
.legal-links {
    text-align: center;
    margin-top: 12px;
    position: relative;
    z-index: 1000;
}

.legal-links a {
    color: rgba(0, 0, 0, 0.35);
    font-size: 11px;
    text-decoration: none;
    margin: 0 8px;
    font-family: Arial, sans-serif;
}

.legal-links a:hover {
    color: var(--primary-color);
}

.legal-links__sep {
    color: rgba(0, 0, 0, 0.2);
    font-size: 11px;
}

/* Color Scheme Wrap */
.color-scheme-wrap {
    text-align: center;
    margin-top: 10px;
}
