/* ================================================
   MURDOCHIANISM — styles by Claude ✦
   ================================================ */
@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English&display=swap');
/* ── Color & theme variables ── */
:root {
    --header-bg: url('images/header.png');
     --site-bg: url("https://murdochianism.neocities.org/Images/propertilemurdoch.png");
    --accent-color: #a8b8cc;
    --accent-soft: #c8d8e8;
    --select-color: #1e2d48;

    --link-color: #8aafd4;

    --bg-color: #080c14;
    --bg-color2: #0e1420;
    --bg-tinted: #121a2a;

    --text-color: #d0dcea;
    --text-muted: #94a8be;

    --border-color: #3a5070;
    --border-soft: #2a3a54;

    --post-shadow-color: #00081880;
    --outline-color: #2e4468;
    --outline-color2: #1a2840;

    --glow-pink: 0 0 14px #a8b8cc44, 0 0 28px #a8b8cc18;
    --glow-blue: 0 0 14px #8aafd444, 0 0 28px #8aafd418;

    --radius-sm: 0.4em;
    --radius-md: 0.75em;
    --radius-lg: 1.25em;
    --radius-pill: 999px;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-color), var(--outline-color));
    border-radius: var(--radius-pill);
}

/* ── Selection ── */
::selection {
    background: var(--select-color);
    color: var(--border-color);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    background-image: var(--site-bg);
    background-repeat: repeat;
    background-position: top left;
    background-size: 287px;
    margin: 0;
    font-family: 'IM Fell English', serif;

    font-size: 16px;
    line-height: 1.6;

    color: var(--text-color);
}

p { line-height: 1.65em; }

/* ── Headings ── */
h1, h2 {
    font-family: 'IM Fell English', serif;
    letter-spacing: 0.05em; 
    font-weight: normal;   
}

h1 {
    font-size: 1.6em;
    color: var(--accent-soft);
    filter:
        drop-shadow(0 0 6px #a8b8cc55)
        drop-shadow(0 2px 4px #00000080);
}

h2 {
    font-size: 1.3em;
    color: var(--accent-soft);
    margin-top: 0.5em;
}

h3, h4, h5, h6 { color: var(--accent-color); }

/* ── Floating sparkles ── */
.sparkle-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.sparkle {
    position: absolute;
    color: var(--accent-color);
    opacity: 0;
    font-size: 1rem;
    animation: floatSparkle 8s ease-in-out infinite;
    user-select: none;
}

.sparkle:nth-child(1)  { left:  5%; animation-delay: 0s;    font-size: 0.7rem; color: #a8b8cc; }
.sparkle:nth-child(2)  { left: 15%; animation-delay: 1.5s;  font-size: 1rem;   color: #8aafd4; }
.sparkle:nth-child(3)  { left: 30%; animation-delay: 3s;    font-size: 0.6rem; color: #c8d8e8; }
.sparkle:nth-child(4)  { left: 50%; animation-delay: 0.8s;  font-size: 0.9rem; color: #8aafd4; }
.sparkle:nth-child(5)  { left: 65%; animation-delay: 2.2s;  font-size: 0.7rem; color: #a8b8cc; }
.sparkle:nth-child(6)  { left: 78%; animation-delay: 4s;    font-size: 1rem;   color: #6888aa; }
.sparkle:nth-child(7)  { left: 88%; animation-delay: 1s;    font-size: 0.6rem; color: #c8d8e8; }
.sparkle:nth-child(8)  { left: 95%; animation-delay: 3.5s;  font-size: 0.8rem; color: #8aafd4; }

@keyframes floatSparkle {
    0%   { transform: translateY(100vh) rotate(0deg);   opacity: 0; }
    10%  { opacity: 0.7; }
    90%  { opacity: 0.5; }
    100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* ── Header ── */
header {
    position: relative;
    background-color: var(--bg-color);
    background-image: var(--header-bg);
    background-size: cover;
    background-position: center;
    min-height: 280px;
    margin: 0 auto;
    border-bottom: 3px solid var(--outline-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    overflow: hidden;
}
header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            transparent        0%,
            color-mix(in srgb, var(--accent-color) 5%, transparent) 50%,
            transparent       100%),
        linear-gradient(180deg,
            #000000ff  0%,
            #020a14ff 18%,
            #040f1eff 36%,
            #06152aff 50%,
            #040f1eff 64%,
            #020a14ff 82%,
            #000000ff 100%);
    z-index: 0;
}
header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--accent-color) 30%,
        var(--accent-soft) 50%,
        var(--accent-color) 70%,
        transparent 100%);
    z-index: 1;
}
header > h1 {
    position: relative;
    z-index: 1;
    /* no font-family here — spans handle it */
    font-size: 3em;
    font-weight: normal;
    color: var(--accent-soft);
    margin: 0;
    padding: 0.3em 2em;
    letter-spacing: 0;          /* reset — spans set their own */
    text-align: center;
    white-space: nowrap;
    text-shadow:
        0 0 20px #8aafd460,
        0 0 40px #8aafd420,
        0 2px 4px #00000090;
    filter: none;
    border-top: 1px solid var(--outline-color);
    border-bottom: 1px solid var(--outline-color);
    outline: 3px solid var(--outline-color2);
    outline-offset: 6px;
    transition: text-shadow 0.4s ease;
}
header > h1::before,
header > h1::after {
    content: "✦";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    font-size: 0.55em;
    font-family: inherit;       /* keeps sparkle from inheriting IM Fell */
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
header > h1::before { right: calc(100% + 1em); }
header > h1::after  { left:  calc(100% + 1em); }
header > h1:hover {
    text-shadow:
        0 0 24px #8aafd480,
        0 0 48px #8aafd430,
        0 2px 4px #00000090;
}
header > h1:hover::before,
header > h1:hover::after {
    opacity: 1;
    transform: translateY(-50%) scale(1.3);
}
/* ── Dual-font title spans ── */
.title-murdoch {
    font-family: 'IM Fell English', Georgia, serif;
    font-style: italic;
    letter-spacing: 0.01em;
    color: var(--accent-soft);
}

.title-ianism {
    font-family: 'Silkscreen', monospace;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.04em;
    vertical-align: 0.08em;
    color: var(--accent-color);     /* slightly dimmer — nice contrast with the serif */
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* on hover, the pixel half gets a little extra glow */
header > h1:hover .title-ianism {
    color: var(--accent-soft);
    text-shadow: 0 0 10px #8aafd460;
}

/* subtle pixel-flicker on the ianism half — purely decorative, respects reduced-motion */
@media (prefers-reduced-motion: no-preference) {
    @keyframes pixelFlicker {
        0%, 94%, 100% { opacity: 1; }
        95%            { opacity: 0.75; }
        97%            { opacity: 1; }
        99%            { opacity: 0.85; }
    }

    .title-ianism {
        animation: pixelFlicker 6s ease-in-out infinite;
    }
}

.subtitle {
    position: relative;
    z-index: 1;
    font-family: 'Silkscreen', monospace;
    font-size: 0.95em;
    color: var(--accent-color);
    line-height: 1.6;
    text-align: center;
    margin: 0;
    letter-spacing: 0.03em;
    opacity: 0.85;
}

.subtitle-comment {
    display: block;
    font-family: 'Silkscreen', monospace;
    font-size: 0.82em;
    color: var(--accent-soft);
    opacity: 0.5;
    margin-top: 0.25em;
    letter-spacing: 0.02em;
}
/* ── Lists ── */
li {
    list-style-image: url("images/flower.png");
}

/* ── Nav ── */
nav { margin: 1em 0.5em; }

nav > ul {
    max-width: 960px;
    margin: auto;
    line-height: 3rem;
    list-style-type: none;
    padding-left: 0;
    justify-content: space-evenly;
}

nav li {
    text-align: center;
    list-style-image: none;
    margin: 0.2em 0;
}

nav li > a {
    display: inline-block;
    font-weight: 700;

    /* 🔑 updated font stack */
    font-family: 'IM Fell English', Georgia, 'Times New Roman', serif;

    background-color: var(--bg-tinted);
    border: 2px solid var(--outline-color);
    border-radius: var(--radius-sm);
    padding: 0.45em 2.5em;
    text-decoration: none;
    color: var(--text-color);
    transition: background-color 0.2s ease, color 0.2s ease,
                border-color 0.2s ease, box-shadow 0.2s ease,
                transform 0.15s ease;
}

nav li > a:visited { color: var(--link-color); }

nav li > a:hover {
    color: #0e1420;
    background: linear-gradient(135deg, #a8b8cc, #c8d8e8);
    border-color: var(--accent-color);
    box-shadow: var(--glow-pink);
    transform: translateY(-2px);
}

/* ── General links ── */
a {
    color: var(--link-color);
    border-radius: var(--radius-sm);
    transition: color 0.2s ease, text-shadow 0.2s ease;
}
a:visited { color: var(--text-muted); }
a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--select-color);
}

/* ── Layout ── */
#content {
    display: flex;
    max-width: 1200px;
    margin: auto;
    position: relative;
    z-index: 1;
    gap: 1.5em;
    padding: 0 1em;
    align-items: flex-start;
}
/* ── Left Sidebar ── */
#sidebar {
    background-color: var(--bg-color2);
    background-image:
        linear-gradient(180deg,
            color-mix(in srgb, var(--accent-color) 4%, transparent) 0%,
            transparent 40%,
            transparent 60%,
            color-mix(in srgb, var(--accent-color) 3%, transparent) 100%),
        linear-gradient(180deg,
            #0c1322 0%,
            #09101e 25%,
            #070d18 55%,
            #050b15 100%);
    color: var(--text-color);
    height: fit-content;
    width: 230px;
    min-width: 210px;
    max-width: 250px;
    flex-shrink: 0;
    margin-top: 1em;
    border-radius: var(--radius-md);
    border: 2px solid var(--outline-color);
    box-shadow:
        4px 4px 0 var(--bg-color),
        6px 6px 0 var(--outline-color),
        inset 0 1px 0 color-mix(in srgb, var(--accent-color) 15%, transparent),
        inset 0 -1px 0 color-mix(in srgb, var(--accent-color) 8%, transparent);
}

/* ── Right Sidebar ── */
#sidebar-right {
    background-color: var(--bg-color2);
    background-image:
        linear-gradient(180deg,
            color-mix(in srgb, var(--accent-color) 4%, transparent) 0%,
            transparent 40%,
            transparent 60%,
            color-mix(in srgb, var(--accent-color) 3%, transparent) 100%),
        linear-gradient(180deg,
            #0c1322 0%,
            #09101e 25%,
            #070d18 55%,
            #050b15 100%);
    color: var(--text-color);
    height: fit-content;
    width: 230px;
    min-width: 210px;
    max-width: 250px;
    flex-shrink: 0;
    margin-top: 1em;
    border-radius: var(--radius-md);
    border: 2px solid var(--outline-color);
    box-shadow:
        4px 4px 0 var(--bg-color),
        6px 6px 0 var(--outline-color),
        inset 0 1px 0 color-mix(in srgb, var(--accent-color) 15%, transparent),
        inset 0 -1px 0 color-mix(in srgb, var(--accent-color) 8%, transparent);
    padding: 0.75em;
    font-size: 13px;
}

#sidebar-right h3 {
    font-family: 'Fredoka One', 'Nunito', Verdana, sans-serif;
    font-size: 13px;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin: 0.6em 0 0.4em;
    padding-bottom: 0.35em;
    border-bottom: 1px dashed var(--outline-color);
}
#sidebar-right h3:first-of-type { margin-top: 0; }
#sidebar-right p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0.4em 0 0.8em;
    line-height: 1.6;
}

/* ── Poll widget dark theme override ── */
#sidebar-right form > div {
    background-color: var(--bg-tinted) !important;
    color: var(--text-color) !important;
    border: 1px solid var(--outline-color) !important;
    border-radius: var(--radius-sm) !important;
    width: auto !important;
    box-sizing: border-box !important;
}
#sidebar-right form label {
    color: var(--text-color) !important;
    width: auto !important;
    float: none !important;
    display: inline !important;
}
#sidebar-right form strong {
    color: var(--accent-soft) !important;
}
#sidebar-right form input[type="submit"] {
    background: var(--bg-tinted);
    color: var(--text-color);
    border: 1px solid var(--outline-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 3px 10px;
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s;
}
#sidebar-right form input[type="submit"]:hover {
    background: linear-gradient(135deg, var(--outline-color), var(--bg-tinted));
    border-color: var(--accent-color);
}
#sidebar-right form a {
    color: var(--link-color);
}
/* ── Avatar ── */
#avatar {
    margin: 0.75em 0.5em 0.5em;
    max-width: 320px;
    text-align: center;
}

.flower {
    width: 200px;
    aspect-ratio: 1;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius-md);
    border: 2px solid var(--outline-color);
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease, box-shadow 0.4s ease;
}

.flower:hover {
    transform: scale(1.03);
    filter: brightness(1.08);
    box-shadow: 0 0 16px var(--accent-color);
}

#bio {
    margin: 16px;
    padding: 0.4em 0.6em;
    background: linear-gradient(135deg, #0a1020 0%, #0d1828 100%);
    border: 3px double var(--outline-color);
    border-radius: 1.5em;
    font-size: small;
    color: var(--text-color);
}
#bio p { margin: 0.8em; }

/* ── Main content ── */
main {
    padding: 1em 0;
    flex: 1;
    min-width: 0;
}

/* ── Top/pinned article ── */
#top {
    background: linear-gradient(135deg, #0a1020 0%, #0e1830 100%);
    border: 2px solid var(--outline-color);
    border-radius: var(--radius-md);
    padding: 1em;
    margin-bottom: 1em;
    box-shadow: 4px 4px 0 var(--outline-color2);
}

#top section {
    background-color: var(--bg-color2);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    padding: 0.3em 1em;
    width: fit-content;
    border: 1px solid var(--outline-color);
}

/* ── Articles ── */
article {
    background-color: var(--bg-color2);
    padding: 1.2em 1.4em;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1.25em;
    box-shadow: 5px 5px 0 var(--post-shadow-color);
    transition: box-shadow 0.25s ease, transform 0.2s ease;
    animation: fadeSlideIn 0.4s ease both;
}

article:hover {
    box-shadow: 6px 6px 0 var(--border-color);
    transform: translateY(-2px);
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

article:nth-child(1) { animation-delay: 0.05s; }
article:nth-child(2) { animation-delay: 0.12s; }
article:nth-child(3) { animation-delay: 0.19s; }
article:nth-child(4) { animation-delay: 0.26s; }

article img {
    max-width: 100%;
    border-radius: var(--radius-sm);
}

/* ── Inline article image (float right) ── */
.img-right {
    float: right;
    margin: 0 0 0.75em 1.25em;
    max-width: 190px;
    flex-shrink: 0;
}

.img-right img {
    width: 100%;
    display: block;
    border-radius: var(--radius-md);
    border: 2px solid var(--outline-color);
    box-shadow: 4px 4px 0 var(--outline-color2);
    transition: box-shadow 0.3s ease, filter 0.3s ease;
}

.img-right img:hover {
    box-shadow: var(--glow-blue), 4px 4px 0 var(--outline-color);
    filter: brightness(1.06);
}

/* ── Utilities ── */
.center { text-align: center; }

.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

.small-text {
    font-size: 11px;
    color: var(--text-muted);
    text-shadow: var(--bg-color) 1px 1px;
}

/* ── Footer ── */
footer {
    text-align: center;
    font-size: small;
    font-family: 'Nunito', Verdana, sans-serif;
    margin: auto;
    padding: 0.6em;
    background: linear-gradient(90deg, #0e1420 0%, #121c30 50%, #0e1420 100%);
    border-top: 2px solid var(--outline-color);
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.footer-sparkle {
    color: var(--accent-color);
    display: inline-block;
    animation: twinkle 2s ease-in-out infinite;
    margin: 0 0.4em;
}
.footer-sparkle:last-child { animation-delay: 1s; }

@keyframes twinkle {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.85); }
}


/* ═══════════════════════════════════════════
   MURDOCH IN THE MACHINE
   ═══════════════════════════════════════════ */

.mitm {
    background: var(--bg-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    font-family: inherit;
    color: var(--text-color);
}

.mitm-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--border-soft);
}

.mitm-head strong {
    font-family: 'Fredoka One', 'Nunito', Verdana, sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--accent-soft);
    letter-spacing: 0.02em;
}

.mitm-head span {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

.mitm-post {
    background: var(--bg-tinted);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.mitm-post:last-of-type { margin-bottom: 0; }

.mitm-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 0.5rem;
}

.mitm-author {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-color);
    background: var(--outline-color2);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--outline-color);
}

.mitm-ts {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

.mitm-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-soft);
    margin: 0 0 0.5rem;
}

.mitm-grid { display: grid; gap: 4px; margin: 0.5rem 0; }
.mitm-grid.x2 { grid-template-columns: 1fr 1fr; }
.mitm-grid.x3 { grid-template-columns: 1fr 1fr 1fr; }

.mitm-grid img,
.mitm-grid .ph {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
    aspect-ratio: 1;
    width: 100%;
    object-fit: cover;
    display: block;
    background: var(--outline-color2);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.mitm-grid img:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.mitm-grid.wide img,
.mitm-grid.wide .ph { aspect-ratio: 16/6; }

.mitm-body {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0.4rem 0 0;
}

.mitm-footer {
    margin-top: 0.9rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mitm-badge {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

.mitm-link {
    font-size: 11px;
    color: var(--link-color);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.mitm-link:hover {
    color: var(--accent-color);
    text-shadow: 0 0 8px var(--select-color);
}


/* ═══════════════════════════════════════════
   MOBILE STYLES
   ═══════════════════════════════════════════ */
@media only screen and (max-width: 900px) {
    #content {
        flex-wrap: wrap;
        gap: 0;
        padding: 0;
    }

    #sidebar {
        margin: 0;
        width: 100%;
        min-width: unset;
        max-width: unset;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        border: none;
        border-radius: 0;
        border-bottom: 2px solid var(--outline-color);
        box-shadow: none;
    }

    #sidebar-right {
        width: 100%;
        min-width: unset;
        max-width: unset;
        margin: 0;
        border-radius: 0;
        border: none;
        border-top: 2px solid var(--outline-color);
        box-shadow: none;
        order: 3;
        display: flex;
        flex-wrap: wrap;
        gap: 1em 2em;
        padding: 1em 1.5em;
    }

    #sidebar-right h3 { width: 100%; }

    main { order: 2; padding: 1em; }

    header { min-height: 200px; }

    header > h1 {
        font-size: 1.8em;
        padding: 0.3em 1.2em;
        letter-spacing: 0.04em;
    }

    header > h1::before,
    header > h1::after { display: none; }

    nav > ul {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
    }

    nav li > a { padding: 0.4em 1.2em; }

    #bio { width: 50%; }

    #sidebar ul {
        line-height: 2em;
        display: flex;
        flex-wrap: wrap;
        gap: 1em;
    }

    #sidebar li { margin: 0.3em 1em; }

    .flower { width: 200px; }

    .sparkle-container { display: none; }

    article:hover { transform: none; }

    .img-right {
        float: none;
        display: block;
        max-width: 160px;
        margin: 0 auto 1em;
    }

    .mitm-grid.x3 { grid-template-columns: 1fr 1fr; }
}