/* Shared styles across all pages */

/* ===== Import Atkinson Hyperlegible Font ===== */
@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* ===== CSS Variables for Theme Support ===== */
:root {
    --bg-white: #fdfdfd;
    --bg-grey: #e6e6e6;
    --bg-sky-light: #fdfdfd;
    --text-primary: #282728;
    --text-heading: #4a4a4a;
    --text-secondary: #adb5bd;
    --text-footer: #6c757d;
    --nav-active: #1a1a1a;
    --link-color: #007bff;
    --link-hover: #0056b3;
    --accent-color: #006cac;
    --accent-hover: #0056b3;
    --paper-desc: #006cac;
    --emphasis-color: #d63384;
    --button-bg: #f1f1f1;
    --button-text: #282728;
    --tooltip-bg: #fdfdfd;
    --header-shadow: rgba(0,0,0,0.1);
    --border-color: #ece9e9;
    --header-bg: rgba(255, 255, 255, 0.1);
    --nav-hover-bg: rgba(0, 0, 0, 0.05);
    --nav-active-bg: rgba(0, 108, 172, 0.13);
}

/* Dark theme */
[data-theme="dark"] {
    --bg-white: #212737;
    --bg-grey: #343f60;
    --bg-sky-light: #212737;
    --text-primary: #eaedf3;
    --text-heading: #f5f5f5;
    --text-secondary: #d0d0d0;
    --text-footer: #adb5bd;
    --nav-active: #ffffff;
    --link-color: #7db8ff;
    --link-hover: #a8d0ff;
    --accent-color: #ff6b01;
    --accent-hover: #ff8533;
    --paper-desc: #ff6b01;
    --emphasis-color: #ff6b9d;
    --button-bg: #343f60;
    --button-text: #eaedf3;
    --tooltip-bg: #2a3347;
    --header-shadow: rgba(0,0,0,0.3);
    --border-color: #3d4a6b;
    --header-bg: rgba(33, 39, 55, 0.1);
    --nav-hover-bg: rgba(255, 255, 255, 0.08);
    --nav-active-bg: rgba(255, 107, 1, 0.2);
}

/* System preference detection (used as default when no preference saved) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-white: #212737;
        --bg-grey: #343f60;
        --bg-sky-light: #212737;
        --text-primary: #eaedf3;
        --text-heading: #f5f5f5;
        --text-secondary: #d0d0d0;
        --text-footer: #adb5bd;
        --nav-active: #ffffff;
        --link-color: #7db8ff;
        --link-hover: #a8d0ff;
        --accent-color: #ff6b01;
        --accent-hover: #ff8533;
        --paper-desc: #ff6b01;
        --emphasis-color: #ff6b9d;
        --button-bg: #343f60;
        --button-text: #eaedf3;
        --tooltip-bg: #2a3347;
        --header-shadow: rgba(0,0,0,0.3);
        --border-color: #3d4a6b;
        --header-bg: rgba(33, 39, 55, 0.1);
        --nav-hover-bg: rgba(255, 255, 255, 0.08);
        --nav-active-bg: rgba(255, 107, 1, 0.2);
    }
}

/* Daft Punk mode */
[data-daftpunk="on"] {
    --bg-white: #09050f;
    --bg-grey: #12091f;
    --bg-sky-light: #05030c;
    --text-primary: #f7efcf;
    --text-heading: #ffe082;
    --text-secondary: #c6b5f9;
    --text-footer: #bfb0dd;
    --nav-active: #ffffff;
    --link-color: #36f6ff;
    --link-hover: #9dfbff;
    --accent-color: #ff2f73;
    --accent-hover: #ff6a9f;
    --paper-desc: #36f6ff;
    --emphasis-color: #ffd25a;
    --button-bg: rgba(25, 10, 41, 0.9);
    --button-text: #f7efcf;
    --tooltip-bg: rgba(10, 5, 22, 0.96);
    --header-shadow: rgba(0, 0, 0, 0.6);
    --border-color: rgba(255, 47, 115, 0.45);
    --header-bg: rgba(10, 5, 22, 0.78);
    --nav-hover-bg: rgba(54, 246, 255, 0.18);
    --nav-active-bg: rgba(255, 47, 115, 0.3);
}

[data-daftpunk="on"] {
    background-color: #05030c;
}

/* ===== Theme Transition Effect ===== */
*,
*::before,
*::after {
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease, filter 0.5s ease;
}

/* Disable transitions on page load to prevent flash */
.no-transition *,
.no-transition *::before,
.no-transition *::after {
    transition: none !important;
}

/* Apply theme variables to elements */
body {
    background-color: var(--bg-sky-light);
    color: var(--text-primary);
    font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    font-size: 16px;
}

[data-daftpunk="on"] body {
    background-image:
        linear-gradient(140deg, rgba(5, 3, 12, 0.34) 0%, rgba(18, 9, 31, 0.4) 42%, rgba(10, 6, 22, 0.36) 100%),
        radial-gradient(circle at 20% 15%, rgba(255, 209, 98, 0.18), transparent 38%),
        radial-gradient(circle at 80% 5%, rgba(54, 246, 255, 0.16), transparent 35%),
        radial-gradient(circle at 50% 100%, rgba(255, 47, 115, 0.12), transparent 55%),
        url("../img/Daft_Punk_bg.jpg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

[data-daftpunk="on"] h1,
[data-daftpunk="on"] h2,
[data-daftpunk="on"] h3 {
    text-shadow: 0 0 12px rgba(255, 210, 90, 0.25);
}

h1 {
    font-size: 32px;
    margin-top: 32px;
    margin-bottom: 16px;
}

h2 {
    font-size: 24px;
    /* margin-top: 32px; */
    /* margin-bottom: 1rem; */
}

h3 {
    font-size: 20px;
    /* margin-top: 2rem; */
    /* margin-bottom: 1rem; */
}

/* Ensure all text elements use Atkinson Hyperlegible */
p, span, a, li, b, strong, em, i, small, .blockquote, .enlist, enlist, .link, emph {
    font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* Ensure consistent font size for blockquote and enlist elements */
.blockquote, .enlist, enlist {
    font-size: 16px !important;
}

p {
    font-size: 16px !important;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Theme overrides for layout.min.css classes */
.bg-color-white { background: var(--bg-white) !important; }
.bg-color-grey { background: var(--bg-grey) !important; }
.bg-color-sky-light { background: var(--bg-sky-light) !important; }

[data-daftpunk="on"] .bg-color-white,
[data-daftpunk="on"] .bg-color-grey,
[data-daftpunk="on"] .bg-color-sky-light {
    background-color: rgba(9, 5, 15, 0.3) !important;
    background-image: linear-gradient(140deg, rgba(255, 47, 115, 0.05), rgba(54, 246, 255, 0.03));
}

[data-daftpunk="on"] .bg-color-grey {
    background-color: rgba(18, 9, 31, 0.34) !important;
}

[data-daftpunk="on"] .bg-color-sky-light {
    background-color: rgba(5, 3, 12, 0.28) !important;
}

p, .blockquote, .enlist { color: var(--text-primary); }
h1, h2, h3, h4, h5, h6 { color: var(--text-heading); }
h1 > a, h2 > a, h3 > a, h4 > a, h5 > a, h6 > a { color: var(--text-heading); }
span { color: var(--text-secondary); }
a {
    color: var(--link-color);
    text-decoration: none;
}
a:hover, a:focus, a:active {
    color: var(--link-hover);
    text-decoration: underline;
}
em, li { color: var(--text-heading); }
emph { color: var(--emphasis-color); }

.footer .footer-list-item { color: var(--text-footer); }
.form-control {
    background: var(--bg-grey);
    color: var(--text-primary);
}

/* Button overrides */
#show-more-news, #collapse-news, #nextImage, #show-selected, #show-unselected, #show-recent, #show-all {
    background-color: var(--button-bg);
    color: var(--button-text);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    /* padding: 8px 16px; */
    /* border-radius: 4px; */
    cursor: pointer;
}
#show-more-news:hover, #collapse-news:hover, #nextImage:hover, #show-selected:hover, #show-unselected:hover, #show-recent:hover, #show-all:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
#show-more-news:active, #collapse-news:active, #nextImage:active, #show-selected:active, #show-unselected:active, #show-recent:active, #show-all:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Active/highlighted state for publication filter buttons */
#show-selected.active, #show-unselected.active, #show-recent.active, #show-all.active {
    background-color: var(--accent-color);
    color: var(--bg-white);
    border-color: var(--accent-color);
    font-weight: bold;
}
#show-selected.active:hover, #show-unselected.active:hover, #show-recent.active:hover, #show-all.active:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* Tooltip overrides */
.tooltip-container {
    position: relative;
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    line-height: inherit;
    vertical-align: baseline;
}

.tooltip-text {
    background-color: var(--tooltip-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    width: max-content;
    max-width: min(320px, calc(100vw - 32px));
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: break-word;
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 15px 15px;
    line-height: 1;
    vertical-align: middle;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
}
.theme-toggle img {
    vertical-align: middle;
    display: block;
    transition: filter 0.3s ease;
}
.theme-toggle:hover {
    opacity: 1;
}

/* Theme toggle animations */

/* To light: gradually becomes yellow (from dark mode) */
@keyframes to-light {
    0% {
        filter: invert(1) hue-rotate(180deg) brightness(1) sepia(0) saturate(1);
    }
    100% {
        filter: invert(1) hue-rotate(180deg) brightness(10) sepia(1) saturate(10);
    }
}

/* To dark: gradually fades to black (from light mode) */
@keyframes to-dark {
    0% {
        filter: brightness(1) contrast(1);
    }
    100% {
        filter: brightness(0.0) contrast(0);
    }
}

.theme-toggle img.anim-light {
    animation: to-light 0.5s ease forwards;
}

.theme-toggle img.anim-dark {
    animation: to-dark 0.5s ease forwards;
}

/* Invert icons in dark mode */
[data-theme="dark"] img[src*="/icons/"],
[data-theme="dark"] img[src*="email.gif"],
[data-theme="dark"] img[src*="signature.png"] {
    filter: invert(1) hue-rotate(180deg);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) img[src*="/icons/"],
    :root:not([data-theme="light"]) img[src*="email.gif"],
    :root:not([data-theme="light"]) img[src*="signature.png"] {
        filter: invert(1) hue-rotate(180deg);
    }
}

[data-daftpunk="on"] img[src*="/icons/"],
[data-daftpunk="on"] img[src*="email.gif"],
[data-daftpunk="on"] img[src*="signature.png"] {
    filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(54, 246, 255, 0.52));
}

/* Modifier key helper class (applied by JS on less-obvious interactive targets) */
.modifier-hidden-interactive {
    outline: 2px solid var(--accent-color) !important;
    outline-offset: 2px;
}

/* Paper content layout - image on left, description on right */
.paper-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 10px;
}

.pimg {
    flex-shrink: 0;
    width: 300px;
}

/* Ensure paper images look good */
.pimg img {
    border-radius: 4px;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Dark mode specific adjustments */
[data-theme="dark"] .paper-description,
:root:not([data-theme="light"]) .paper-description {
    color: var(--paper-desc);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .paper-description {
        color: var(--paper-desc);
    }
}

/* Header styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--header-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 24px -20px var(--header-shadow);
}

[data-daftpunk="on"] .header {
    box-shadow: 0 12px 30px -16px rgba(54, 246, 255, 0.5), 0 10px 24px -20px var(--header-shadow);
}

.header .header-navbar {
    margin-bottom: 0;
    border: none;
    min-height: 0;
    padding: 0;
}

.header .header-shell {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
}

.header-brand {
    color: var(--text-heading) !important;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    white-space: nowrap;
}

.header-brand:hover,
.header-brand:focus {
    color: var(--nav-active) !important;
}

.header-menu-toggle {
    display: none;
    border: 1px solid var(--border-color);
    background-color: var(--button-bg);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    padding: 8px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.header-mobile-actions {
    display: none;
}

.header-menu-toggle-line {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background-color: var(--text-heading);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.header.menu-open .header-menu-toggle-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.header.menu-open .header-menu-toggle-line:nth-child(2) {
    opacity: 0;
}

.header.menu-open .header-menu-toggle-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.menu-container {
    flex: 0 1 auto;
    display: flex;
    justify-content: flex-start;
    margin-left: 8px;
}

.navbar-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    float: none;
    margin: 0;
    padding: 0;
}

.navbar-nav > li {
    list-style: none;
}

/* Override uppercase transformation for navigation items */
.header .nav-item-child {
    text-transform: none !important;
    color: var(--text-footer) !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    border-radius: 999px;
    padding: 10px 12px !important;
    white-space: nowrap;
}

.header .nav-item-child:hover,
.header .nav-item-child:focus,
.header .nav-item-child:active {
    color: var(--text-heading) !important;
    background-color: var(--nav-hover-bg);
    text-decoration: none !important;
}

/* Active navigation link styling */
.header .nav-item-child.nav-active {
    color: var(--nav-active) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    background-color: var(--nav-active-bg);
    box-shadow: inset 0 0 0 1px var(--border-color);
}

[data-daftpunk="on"] .header .nav-item-child.nav-active {
    box-shadow: inset 0 0 0 1px var(--border-color), 0 0 16px rgba(255, 47, 115, 0.45);
}

.header a.nav-item-child {
    text-decoration: none !important;
}

.header .theme-toggle {
    border: none;
    background: none;
    cursor: pointer;
    opacity: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.header .theme-toggle img {
    vertical-align: middle;
    display: block;
    transition: filter 0.3s ease;
}

.header .theme-toggle-label {
    display: none;
    color: inherit;
    font-size: 15px;
    font-weight: 600;
}

.header .theme-toggle:focus-visible,
.header .nav-item-child:focus-visible,
.header .header-brand:focus-visible,
.header .header-menu-toggle:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

body {
    padding-top: 88px;
    transition: opacity 0.3s ease;
}

body.page-transition {
    opacity: 0;
}

html {
    scroll-padding-top: 88px;
    scroll-behavior: smooth;
    font-size: 16px;
}

@media (max-width: 991px) {
    .header .header-shell {
        min-height: 64px;
        flex-wrap: wrap;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .header .header-mobile-actions {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-left: auto;
        order: 2;
    }

    .header .header-menu-toggle {
        display: inline-flex;
    }

    .header .menu-container {
        display: none;
        width: 100%;
        justify-content: stretch;
        margin-left: 0;
        order: 3;
        padding-bottom: 6px;
    }

    .header.menu-open .menu-container {
        display: block;
    }

    .header .navbar-nav {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 10px;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        background-color: var(--header-bg);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        box-shadow: 0 10px 24px -20px var(--header-shadow);
    }

    .header .nav-item-child {
        width: 100%;
        justify-content: flex-start;
        font-size: 15px !important;
    }

    .header .menu-container .theme-toggle {
        width: 100%;
        justify-content: flex-start;
    }

    .header .menu-container .theme-toggle-label {
        display: inline;
    }

    .header .nav-item-theme {
        display: none;
    }

    .header .theme-toggle-mobile {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        padding: 8px;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        background-color: var(--button-bg);
    }

    .header .theme-toggle-mobile .theme-toggle-label {
        display: none;
    }
}

@media (max-width: 576px) {
    .header .header-shell {
        min-height: 60px;
    }

    .header-brand {
        font-size: 19px;
    }

    .header .nav-item-child {
        font-size: 14px !important;
        padding: 9px 10px !important;
    }

    .header .theme-toggle {
        padding: 9px 10px;
    }
}

.container {
    max-width: 1200px;
}

/* Override layout.min.css padding for denser layout */
.content-md {
    padding-top: 30px;
    padding-bottom: 30px;
}

/* Navigation link styles */
.nav-external-link {
    color: var(--link-color) !important;
    font-weight: 600 !important;
}

/* Social icons styles */
.social-icons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 15px 0;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    color: var(--text-primary);
    font-size: 19px;
}

.daftpunk-scene {
    display: none;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 12px;
    margin-bottom: 4px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 47, 115, 0.45);
    background:
        linear-gradient(120deg, rgba(255, 47, 115, 0.2), rgba(54, 246, 255, 0.12)),
        radial-gradient(circle at 14% 20%, rgba(255, 210, 90, 0.22), transparent 42%),
        radial-gradient(circle at 86% 80%, rgba(54, 246, 255, 0.22), transparent 44%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.06),
        0 0 20px rgba(255, 47, 115, 0.24),
        0 0 30px rgba(54, 246, 255, 0.2);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.daftpunk-scene-copy {
    position: relative;
    z-index: 1;
    text-align: center;
}

.daftpunk-scene-title,
.daftpunk-scene-subtitle {
    margin: 0;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.daftpunk-scene-title {
    color: #ffe082;
    font-weight: 800;
    font-size: 16px;
    text-shadow: 0 0 8px rgba(255, 210, 90, 0.35), 0 0 18px rgba(255, 47, 115, 0.3);
    animation: daftpunk-title-flicker 2.6s ease-in-out infinite;
}

.daftpunk-scene-subtitle {
    color: #9dfbff;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(54, 246, 255, 0.35);
    animation: daftpunk-sub-pulse 2.2s ease-in-out infinite;
}

.daftpunk-scene-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    animation: daftpunk-glow 1.8s ease-in-out infinite alternate;
}

[data-daftpunk="on"] .daftpunk-scene {
    display: flex;
    animation: daftpunk-scene-float 3.2s ease-in-out infinite alternate;
}

@keyframes daftpunk-glow {
    0% {
        filter: brightness(0) invert(1) drop-shadow(0 0 4px rgba(255, 47, 115, 0.55));
    }
    100% {
        filter: brightness(0) invert(1) drop-shadow(0 0 12px rgba(54, 246, 255, 0.8));
    }
}

@keyframes daftpunk-scene-float {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-2px);
    }
}

@keyframes daftpunk-title-flicker {
    0%, 100% {
        opacity: 1;
        letter-spacing: 0.07em;
    }
    18% {
        opacity: 0.84;
    }
    42% {
        opacity: 0.95;
    }
    67% {
        opacity: 0.8;
        letter-spacing: 0.09em;
    }
}

@keyframes daftpunk-sub-pulse {
    0%, 100% {
        opacity: 0.9;
    }
    50% {
        opacity: 1;
    }
}

/* Common utility classes */
.content-section {
    padding-top: 15px;
    padding-bottom: 15px;
}

.home-content {
    padding-top: 8px;
}

#home {
    margin-top: 0;
    text-align: center;
}

.gallery-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.paper-description {
    color: var(--paper-desc);
}

/* Paper title styling */
.paper .blockquote p b {
    font-size: 20px;
    font-weight: 700;
}

.emphasis-large {
    font-size: 24px;
}

.color-inherit {
    color: inherit;
}

/* Footer styles */
.footer-text {
    text-align: center;
    font-size: 12px;
}

.footer {
    font-size: 12px;
    color: var(--text-footer);
}

/* Center trash div when gallery wraps (below lg breakpoint) */
@media (max-width: 1199px) {
    .trash {
        text-align: center;
        margin-top: 30px;
    }

    /* Only apply inline-block to the second paragraph (with images) */
    .trash p:last-child {
        display: inline-block;
        text-align: left;
    }
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    [data-daftpunk="on"] body {
        position: relative;
        z-index: 0;
        background-color: #05030c !important;
        background-image: none !important;
    }

    [data-daftpunk="on"] body::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background-color: #05030c;
        background-position:
            center center,
            20% 15%,
            80% 5%,
            50% 100%,
            50% 50%;
        background-image:
            linear-gradient(140deg, rgba(5, 3, 12, 0.34) 0%, rgba(18, 9, 31, 0.4) 42%, rgba(10, 6, 22, 0.36) 100%),
            radial-gradient(circle at 20% 15%, rgba(255, 209, 98, 0.18), transparent 38%),
            radial-gradient(circle at 80% 5%, rgba(54, 246, 255, 0.16), transparent 35%),
            radial-gradient(circle at 50% 100%, rgba(255, 47, 115, 0.12), transparent 55%),
            url("../img/Daft_Punk_bg.jpg");
        background-repeat: no-repeat;
        background-size:
            cover,
            38% 38%,
            35% 35%,
            55% 55%,
            100% auto;
        pointer-events: none;
        transform: translateZ(0);
        will-change: transform;
        z-index: -1;
    }

    .social-icons {
        justify-content: center;
        gap: 6px;
    }

    .daftpunk-scene {
        flex-direction: column;
        gap: 8px;
    }

    .daftpunk-scene-subtitle {
        letter-spacing: 0.04em;
    }

    .container {
        padding: 0 20px;
    }


    .col-lg-7, .col-lg-5 {
        margin-bottom: 30px;
    }

    .content-md {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    body {
        font-size: 16px;
        padding-top: 92px;
    }

    html {
        scroll-padding-top: 92px;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 22px;
    }

    h3 {
        font-size: 18px;
    }

    /* Ensure consistent font size for all text content on mobile */
    p, .blockquote, .enlist, enlist {
        font-size: 16px !important;
        line-height: 1.7;
    }

    /* Force Atkinson Hyperlegible on all mobile text elements */
    p, span, a, li, b, strong, em, i, small, .blockquote, .enlist, enlist, .link, emph, h1, h2, h3, h4, h5, h6 {
        font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    }

    /* Stack paper content vertically on mobile */
    .paper-content {
        flex-direction: column;
    }

    .pimg {
        width: 100%;
    }
}

/* Blog specific styles - matches .enlist styling */
.blog-post {
    position: relative;
    font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 395;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: -4px;
    display: block;
    padding-bottom: 1.5em;
}

.blog-date {
    display: inline;
    color: var(--text-primary);
    font-size: 16px;
}

.blog-title {
    font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 18px;
    color: var(--link-color);
}

/* Blog content (rendered markdown) */
#blog-content {
    font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
}

#blog-content h1,
#blog-content h2,
#blog-content h3,
#blog-content h4,
#blog-content h5,
#blog-content h6 {
    font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.3;
}

#blog-content p {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

#blog-content a {
    color: var(--link-color);
}

#blog-content a:hover {
    color: var(--link-hover);
}

/* Common display utility */
.display-block {
    display: block;
}

/* Tooltip width fix for images */
.tooltip-text img {
    max-width: 100%;
    height: auto;
}

.overflow-auto {
    overflow: auto;
}

/* Code styling */
code {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9em;
    color: var(--emphasis-color);
    padding: 0.2em 0.4em;
    background-color: var(--bg-grey);
    border-radius: 3px;
}

pre {
    padding: 1rem;
    margin: 1.5rem 0;
    background-color: var(--bg-grey);
    border-radius: 6px;
    overflow-x: auto;
}

pre code {
    padding: 0;
    background-color: transparent;
    line-height: 1.5;
}

/* Thumbnail styles */
.thumbnail-transparent {
    border: none;
    background-color: transparent;
}

/* Button font consistency and sizing */
#show-more-news, #collapse-news, #nextImage, #show-selected, #show-unselected, #show-recent, #show-all {
    font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: normal !important;
}

/* Fix links in bullet points to use proper link styling */
li a {
    color: var(--link-color) !important;
}

li a:hover {
    color: var(--link-hover) !important;
}

/* Icon hover effects for all linked images */
a img {
    transition: transform 0.2s ease, opacity 0.2s ease;
    vertical-align: middle;
}

.tooltip-container > img,
.tooltip-container > .media_control {
    vertical-align: middle;
}

a:hover img {
    transform: scale(1.15);
    opacity: 0.8;
}

/* Daft Punk icon pulse animation */
@keyframes audio-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.18);
    }
}

.media_control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: pointer;
    vertical-align: middle;
    line-height: 0;
    appearance: none;
    -webkit-appearance: none;
}


.media_control:hover .audio-icon {
    transform: scale(1.12);
}

.media_control .audio-icon {
    display: block;
}

.daftpunk-toggle .audio-icon {
    animation: audio-pulse 0.9s ease-in-out infinite;
}

.media_control:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.media_control.daftpunk-mode-on .audio-icon {
    filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255, 47, 115, 0.8)) drop-shadow(0 0 18px rgba(54, 246, 255, 0.7));
}

[data-daftpunk="on"] .audio-icon {
    filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255, 47, 115, 0.8)) drop-shadow(0 0 18px rgba(54, 246, 255, 0.7));
}
