/*
 * Frutiger Aero Theme — Huw Fulcher
 *
 * Glossy gradients, translucent glass panels, nature-inspired blues
 * and greens, bubble decorations, and mid-2000s optimism.
 * Inspired by Windows Vista/7, early iPhone, and Web 2.0 aesthetics.
 */

/* ------------------------------
   Global resets
--------------------------------*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

/* ------------------------------
   Palette & typography
--------------------------------*/
:root {
    /* Frutiger Aero uses humanist sans-serifs */
    --font-heading: 'Segoe UI', 'Frutiger', 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Segoe UI', 'Frutiger', 'Helvetica Neue', Arial, sans-serif;

    font-size: 62.5%;

    /* Sky & nature palette */
    --color-sky-top: #0b7dda;
    --color-sky-mid: #4db8ff;
    --color-sky-light: #b8e4ff;
    --color-sky-pale: #e3f4ff;

    --color-grass-dark: #2d8c3c;
    --color-grass: #4db848;
    --color-grass-light: #8ede8a;

    --color-leaf: #7bc67e;
    --color-water: #3da8d5;
    --color-bubble: rgba(255, 255, 255, 0.6);

    --color-white: #ffffff;
    --color-text: #1a3a4a;
    --color-text-light: #4a6a7a;
    --color-text-muted: #7a9aaa;

    /* Glass effects */
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-bg-strong: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.9);
    --glass-shadow: 0 8px 32px rgba(0, 80, 160, 0.15);
    --glass-shadow-hover: 0 12px 40px rgba(0, 80, 160, 0.22);
    --glass-glow: 0 0 20px rgba(77, 184, 255, 0.15);

    /* Glossy highlight */
    --gloss: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.0) 50%,
        rgba(255, 255, 255, 0.1) 100%
    );

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    /* Code block */
    --code-bg: #0d2137;
    --code-border: #1a3652;
    --code-text: #e8f0f8;
    --code-keyword: #7fd4f8;
    --code-string: #a8e6a0;
    --code-number: #ffd97a;
    --code-func: #68b5ff;
    --code-comment: #6a8a9a;
    --code-selection: rgba(77, 184, 255, 0.3);
}

/* ------------------------------
   Body & background
--------------------------------*/
html {
    min-height: 100vh;
}

body {
    font-family: var(--font-body);
    font-size: 1.8rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    color: var(--color-text);
    max-width: 920px;
    margin: 0 auto;
    padding: 0 2.4rem 3rem;

    /* The classic Frutiger Aero sky-to-grass gradient */
    background:
        /* Subtle cloud wisps */
        radial-gradient(ellipse 80% 30% at 20% 25%, rgba(255,255,255,0.5) 0%, transparent 70%),
        radial-gradient(ellipse 60% 25% at 70% 15%, rgba(255,255,255,0.4) 0%, transparent 65%),
        radial-gradient(ellipse 50% 20% at 45% 35%, rgba(255,255,255,0.3) 0%, transparent 60%),
        /* Sky gradient */
        linear-gradient(
            180deg,
            #62b8f5 0%,
            #8fd0ff 20%,
            #b8e4ff 40%,
            #d4f0ff 55%,
            #e8f7ee 70%,
            #c4e8a0 82%,
            #8ece68 92%,
            #6ab84a 100%
        );
    background-attachment: fixed;
}

/* Decorative floating bubbles via pseudo-elements on body */
body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}

body::before {
    width: 200px;
    height: 200px;
    top: 15%;
    right: 5%;
    background: radial-gradient(
        circle at 35% 35%,
        rgba(255,255,255,0.8) 0%,
        rgba(255,255,255,0.2) 40%,
        rgba(77,184,255,0.1) 70%,
        transparent 100%
    );
    border: 1px solid rgba(255,255,255,0.4);
    animation: float 8s ease-in-out infinite;
}

body::after {
    width: 120px;
    height: 120px;
    top: 55%;
    left: 3%;
    background: radial-gradient(
        circle at 35% 35%,
        rgba(255,255,255,0.7) 0%,
        rgba(255,255,255,0.15) 40%,
        rgba(100,220,120,0.1) 70%,
        transparent 100%
    );
    border: 1px solid rgba(255,255,255,0.3);
    animation: float 11s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.04); }
}

/* ------------------------------
   Headings
--------------------------------*/
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.6rem;
    overflow-wrap: break-word;
    color: var(--color-text);
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

h1 { font-size: 3.8rem; margin-top: 3rem; }
h1.title { font-size: 3.4rem; margin-bottom: 2rem; }
h2 { font-size: 2.8rem; margin-top: 3.6rem; }
h3 { font-size: 2.2rem; }

:where(h1) {
    margin-block: 0.67em;
    font-size: 2em;
}

/* Glossy underline accent */
h2::after {
    content: "";
    display: block;
    height: 4px;
    width: 80px;
    margin-top: 0.5rem;
    background: linear-gradient(90deg, var(--color-sky-mid), var(--color-grass));
    border-radius: var(--radius-pill);
    box-shadow: 0 1px 4px rgba(0,120,220,0.3);
}

/* ------------------------------
   Paragraphs & lists
--------------------------------*/
p {
    margin: 1.6rem 0 1.8rem;
    font-size: 1.8rem;
    line-height: 1.7;
}

ul, ol {
    padding-left: 2.2rem;
    font-size: 1.8rem;
}

ul > li,
ol > li {
    margin: 1rem 0;
}

/* ------------------------------
   Links — glossy pill hover
--------------------------------*/
a {
    color: var(--color-sky-top);
    text-decoration: none;
    text-underline-offset: 0.2em;
    transition: color 0.2s, text-shadow 0.2s;
}
a:hover {
    color: #0960b0;
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(77, 184, 255, 0.3);
}

/* ------------------------------
   Navigation — frosted glass bar
--------------------------------*/
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border: 1px solid var(--glass-border);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow:
        var(--glass-shadow),
        inset 0 1px 0 rgba(255,255,255,0.9);
    padding: 1rem 0;
    margin: 0 -0.5rem;
}

/* Glossy sheen on nav */
nav::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, transparent 100%);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    pointer-events: none;
}

nav > .header { text-align: center; position: relative; }

nav > .header > p > a {
    font-family: var(--font-heading);
    font-size: 3.6rem;
    color: var(--color-sky-top);
    font-weight: 700;
    letter-spacing: -0.3px;
    text-shadow:
        0 1px 0 rgba(255,255,255,0.9),
        0 2px 8px rgba(0,120,220,0.15);
}

nav > .header > p > a:hover {
    color: var(--color-sky-top);
    text-decoration: none;
}

nav > .nav-links {
    text-align: center;
    padding: 0.2rem 1.6rem 0.2rem;
    position: relative;
}

nav > .nav-links a {
    display: inline-block;
    font-size: 1.7rem;
    padding: 0.5rem 1.4rem;
    margin: 0.2rem 0.2rem;
    line-height: 2.4rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    color: var(--color-text);
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

/* Glossy pill hover effect */
nav > .nav-links a:hover {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.95) 0%,
        rgba(200,230,255,0.6) 100%
    );
    border-color: rgba(77,184,255,0.5);
    box-shadow:
        0 2px 8px rgba(0,120,220,0.15),
        inset 0 1px 0 rgba(255,255,255,0.9);
    color: var(--color-sky-top);
    text-decoration: none;
    text-shadow: none;
}

nav > .nav-links a[aria-current="page"] {
    background: linear-gradient(180deg,
        rgba(77,184,255,0.9) 0%,
        rgba(11,125,218,0.85) 100%
    );
    border-color: rgba(0,100,200,0.4);
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    box-shadow:
        0 2px 8px rgba(0,100,200,0.25),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

/* ------------------------------
   Main content — glass card
--------------------------------*/
main {
    position: relative;
    z-index: 1;
    margin-top: 3.2rem;
    margin-bottom: 4rem;
    padding: 3rem 3.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow:
        var(--glass-shadow),
        inset 0 1px 0 rgba(255,255,255,0.8);
}

/* Inner sheen on main */
main::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    pointer-events: none;
}

/* ------------------------------
   Footer
--------------------------------*/
footer {
    position: relative;
    z-index: 1;
    margin-top: 2rem;
    padding: 2rem 3rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px) saturate(1.5);
    -webkit-backdrop-filter: blur(12px) saturate(1.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow:
        var(--glass-shadow),
        inset 0 1px 0 rgba(255,255,255,0.7);
    text-align: center;
    font-size: 1.5rem;
    color: var(--color-text-light);
}

/* ------------------------------
   Homepage section cards
--------------------------------*/
.section-card {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.7) 0%,
        rgba(230,245,255,0.5) 100%
    );
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: var(--radius-md);
    padding: 2rem 2.4rem;
    margin: 2rem 0;
    box-shadow:
        0 4px 16px rgba(0,80,160,0.08),
        inset 0 1px 0 rgba(255,255,255,0.9);
    transition: box-shadow 0.2s, transform 0.2s;
}

.section-card:hover {
    box-shadow:
        0 8px 24px rgba(0,80,160,0.14),
        inset 0 1px 0 rgba(255,255,255,0.9);
    transform: translateY(-1px);
}

.section-card h3 {
    margin-top: 0;
    color: var(--color-sky-top);
    font-size: 2.2rem;
}

.section-card h3::after { display: none; }

.section-card ul {
    list-style: none;
    padding: 0;
}

.section-card li {
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(0,120,220,0.08);
    font-size: 1.7rem;
}

.section-card li:last-child {
    border-bottom: none;
}

.section-card li span {
    color: var(--color-text-muted);
    font-size: 1.5rem;
}

.section-card .see-all {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.6rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(180deg, #5cbcff 0%, #0b7dda 100%);
    border: 1px solid rgba(0,100,200,0.3);
    border-radius: var(--radius-pill);
    text-decoration: none;
    box-shadow:
        0 2px 6px rgba(0,100,200,0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transition: all 0.2s;
}

.section-card .see-all:hover {
    background: linear-gradient(180deg, #74c8ff 0%, #1088e8 100%);
    box-shadow:
        0 4px 12px rgba(0,100,200,0.3),
        inset 0 1px 0 rgba(255,255,255,0.35);
    text-decoration: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
    color: white;
}

/* ------------------------------
   Blockquotes — glass note
--------------------------------*/
blockquote {
    font-style: italic;
    margin: 1.2rem 1rem;
    padding: 1.2rem 1.6rem;
    background: linear-gradient(180deg,
        rgba(255,255,255,0.85) 0%,
        rgba(220,240,255,0.6) 100%
    );
    border: 1px solid rgba(255,255,255,0.9);
    border-left: 4px solid var(--color-sky-mid);
    border-radius: var(--radius-sm);
    box-shadow:
        0 4px 12px rgba(0,80,160,0.1),
        inset 0 1px 0 rgba(255,255,255,0.9);
}

/* ------------------------------
   Responsive layout
--------------------------------*/
.row { display: flex; flex-direction: column; }
.column { padding-top: 2rem; }
.column > p { margin: 1rem 0; }

@media (min-width: 768px) {
    .row { flex-direction: row; gap: 1.6rem; }
    .column { flex: 1; padding: 0 1.5rem; }
}

/* ------------------------------
   Dropdown
--------------------------------*/
.dropdown { position: relative; display: inline-block; }
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(16px);
    min-width: 200px;
    box-shadow: var(--glass-shadow);
    z-index: 1;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.4rem;
}
.dropdown-content a {
    font-size: 1.7rem;
    color: var(--color-text);
    padding: 0.8rem 1rem;
    text-decoration: none;
    display: block;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
}
.dropdown-content a:hover {
    background: rgba(77,184,255,0.15);
}
.dropdown:hover .dropdown-content { display: block; }

/* ------------------------------
   Thoughts
--------------------------------*/
.thought-item > a { font-size: 1.6rem; }

.thought-separator {
    padding: 0;
    margin: 3rem 0;
    width: 100%;
    text-align: center;
    font-size: 3rem;
    color: var(--color-sky-mid);
    opacity: 0.6;
}

/* ------------------------------
   Forms — glossy buttons
--------------------------------*/
input, button, textarea, select { font: inherit; }
input, textarea, select {
    border: 1px solid rgba(0,120,220,0.2);
    background: rgba(255,255,255,0.9);
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-sky-mid);
    box-shadow:
        inset 0 1px 3px rgba(0,0,0,0.06),
        0 0 0 3px rgba(77,184,255,0.2);
}

button {
    border: 1px solid rgba(0,120,220,0.3);
    background: linear-gradient(180deg,
        #ffffff 0%,
        #e8f4ff 50%,
        #d0eaff 100%
    );
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-weight: 600;
    color: var(--color-sky-top);
    box-shadow:
        0 2px 8px rgba(0,100,200,0.12),
        inset 0 1px 0 rgba(255,255,255,0.9);
    transition: all 0.2s;
}
button:hover {
    background: linear-gradient(180deg,
        #ffffff 0%,
        #d0eaff 50%,
        #b8e0ff 100%
    );
    box-shadow:
        0 4px 14px rgba(0,100,200,0.18),
        inset 0 1px 0 rgba(255,255,255,0.9);
}

/* Submit / primary button */
button[type="submit"],
.btn-primary {
    background: linear-gradient(180deg, #5cbcff 0%, #0b7dda 100%);
    color: white;
    border-color: rgba(0,80,180,0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
    box-shadow:
        0 2px 8px rgba(0,100,200,0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
}
button[type="submit"]:hover,
.btn-primary:hover {
    background: linear-gradient(180deg, #74c8ff 0%, #1088e8 100%);
    box-shadow:
        0 4px 14px rgba(0,100,200,0.3),
        inset 0 1px 0 rgba(255,255,255,0.35);
}

/* ------------------------------
   Media
--------------------------------*/
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

img.image {
    display: block;
    margin: 2rem auto;
    max-width: 320px;
    border-radius: var(--radius-md);
    border: 3px solid rgba(255,255,255,0.8);
    box-shadow:
        0 8px 24px rgba(0,80,160,0.15),
        0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
img.image:hover {
    transform: translateY(-3px);
    box-shadow:
        0 14px 32px rgba(0,80,160,0.2),
        0 4px 10px rgba(0,0,0,0.08);
}

.thumb img { height: 200px; object-fit: cover; }

figure {
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 6px 20px rgba(0,80,160,0.12);
    background: rgba(255,255,255,0.7);
    width: max-content;
    max-width: 100%;
    margin: 2.4rem auto;
}

figure.no-centre { margin: 2.4rem 0; }
figure > img { border-bottom: 1px solid rgba(0,120,220,0.1); }
figure.no-fig { background: transparent; border: none; box-shadow: none; }
figure.half-width { max-width: 50%; }
figure.third-width { max-width: 33%; }
figure.tiny { max-width: 18%; }
figure.floatleft { float: left; margin: .7rem; }
figure.floatright { float: right; margin: .7rem; }
figure.marginright { margin-right: 1rem; }

figcaption {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    padding: 0.8rem 1.2rem 1.2rem;
}

.image-grid {
    padding-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 1.6rem;
}
.image-grid figure { margin: 0; }

.image-grid.square .grid-cell {
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
}

.image-grid.square .grid-cell::before {
    content: "";
    display: block;
    padding-top: 100%;
}

.image-grid.square figure,
.image-grid.square picture,
.image-grid.square img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.image-grid.square img {
    object-fit: cover;
    object-position: center;
}

.image-grid .thumb-link {
    display: block;
    height: 100%;
    border-radius: inherit;
}
.image-grid .thumb-link:focus-visible {
    outline: 2px dashed currentColor;
    outline-offset: 4px;
}

/* ------------------------------
   Utility: callouts
--------------------------------*/
aside, .callout {
    background: linear-gradient(180deg,
        rgba(255,255,255,0.75) 0%,
        rgba(220,245,220,0.5) 100%
    );
    border: 1px solid rgba(100,220,120,0.3);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0,120,60,0.08);
    padding: 1.2rem 1.6rem;
    margin: 2rem 0;
}

/* ------------------------------
   Metadata (blog posts)
--------------------------------*/
.metadata {
    margin-bottom: 1rem;
}
.metadata p {
    font-size: 1.5rem;
    color: var(--color-text-muted);
}
.metadata a {
    color: var(--color-sky-top);
}

/* Post list on section pages */
.post-list {
    list-style: none;
    padding: 0;
}
.post-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0,120,220,0.06);
    font-size: 1.7rem;
}
.post-list li:last-child {
    border-bottom: none;
}
.post-list time {
    color: var(--color-text-muted);
    font-size: 1.5rem;
}

/* ------------------------------
   Responsive
--------------------------------*/
@media (max-width: 480px) {
    body { padding-left: 1.6rem; padding-right: 1.6rem; }
    nav > .header > p > a { font-size: 2.8rem; }
    nav > .nav-links a {
        font-size: 1.4rem;
        padding: 0.4rem 0.8rem;
    }
    main { padding: 2rem 2rem; }
    body::before, body::after { display: none; }
}

nav, footer {
    position: relative;
}

nav {
    position: sticky;
}

/* ==========================================
   Pagefind UI — Frutiger Aero Styling
========================================== */

article #search {
    margin-top: 2rem;
}

.pagefind-ui {
    --pf-radius-sm: var(--radius-sm);
    --pf-radius-md: var(--radius-md);
}

.pagefind-ui__form {
    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(220,240,255,0.7));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
    padding: 0.6rem;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.6rem;
    position: sticky;
    top: 60px;
    z-index: 10001;
    backdrop-filter: blur(12px);
}

.pagefind-ui__input {
    font: inherit;
    color: var(--color-text);
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,120,220,0.2);
    border-radius: var(--radius-sm);
    padding: 1rem 1.2rem;
    outline: none;
    width: 100%;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
    transition: border-color .15s, box-shadow .15s;
}
.pagefind-ui__input::placeholder {
    color: var(--color-text-muted);
}
.pagefind-ui__input:focus {
    border-color: var(--color-sky-mid);
    box-shadow:
        inset 0 1px 3px rgba(0,0,0,0.06),
        0 0 0 3px rgba(77,184,255,0.2);
}

.pagefind-ui__button {
    font: inherit;
    border: 1px solid rgba(0,120,220,0.3);
    background: linear-gradient(180deg, #ffffff, #e8f4ff);
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-weight: 600;
    color: var(--color-sky-top);
    transition: all .15s;
    box-shadow: 0 2px 8px rgba(0,100,200,0.1);
}
.pagefind-ui__button:hover {
    background: linear-gradient(180deg, #ffffff, #d0eaff);
    box-shadow: 0 4px 14px rgba(0,100,200,0.18);
}

.pagefind-ui__results {
    margin-top: 1.4rem;
    border-top: 1px solid rgba(0,120,220,0.1);
    padding-top: 1.6rem;
}

.pagefind-ui__result {
    background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(230,245,255,0.6));
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.4rem;
    box-shadow: 0 4px 12px rgba(0,80,160,0.08);
    margin-bottom: 1.2rem;
    transition: all .15s;
}
.pagefind-ui__result:hover {
    box-shadow: 0 8px 20px rgba(0,80,160,0.14);
    transform: translateY(-1px);
}

.pagefind-ui__result-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin: 0 0 0.4rem 0;
    color: var(--color-sky-top);
}
.pagefind-ui__result-title a {
    color: inherit;
    text-decoration: none;
    transition: color .15s;
}
.pagefind-ui__result-title a:hover {
    color: #0960b0;
}

.pagefind-ui__result-url {
    font-size: 1.4rem;
    color: var(--color-text-muted);
    margin-bottom: 0.6rem;
    word-break: break-all;
}

.pagefind-ui__result-excerpt {
    font-size: 1.6rem;
    color: var(--color-text);
    line-height: 1.6;
}

.pagefind-ui__result-excerpt mark,
.pagefind-ui__excerpt mark {
    background: rgba(77,184,255,0.2);
    border: 1px solid rgba(77,184,255,0.3);
    color: inherit;
    padding: 0.05em 0.25em;
    border-radius: 4px;
}

.pagefind-ui__result-tags,
.pagefind-ui__result-extra {
    margin-top: 0.8rem;
    font-size: 1.4rem;
    color: var(--color-text-muted);
}

.pagefind-ui__results-area .pagefind-ui__button {
    margin-top: 1.2rem;
}

.pagefind-ui__message {
    margin: 0.8rem 0 0;
    font-size: 1.5rem;
    color: var(--color-text-muted);
}

.pagefind-ui__filters {
    margin-top: 1.2rem;
    padding: 1rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(220,240,255,0.5));
}
.pagefind-ui__filter {
    margin: 0.4rem 0.6rem 0.4rem 0;
    display: inline-block;
}
.pagefind-ui__filter input[type="checkbox"] {
    accent-color: var(--color-sky-top);
}

@media (max-width: 560px) {
    .pagefind-ui__form { top: 52px; }
    .pagefind-ui__result { padding: 1rem; }
    .pagefind-ui__result-title { font-size: 1.8rem; }
}

/* ------------------------------
   Code blocks
--------------------------------*/
code, kbd, samp {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.92em;
    background: var(--code-bg);
    color: var(--code-string);
    padding: 0.2em 0.4em;
    border-radius: var(--radius-sm);
    border: 1px solid var(--code-border);
}

pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 1.4rem 1.8rem;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--code-border);
    box-shadow: 0 6px 22px rgba(0,0,0,0.18), 0 2px 5px rgba(0,0,0,0.08);
    line-height: 1.55;
    font-size: 1.6rem;
    margin: 2.4rem 0;
}

pre code {
    padding: 0;
    background: none;
    color: inherit;
    font-size: inherit;
    border: none;
}

pre.linenums {
    counter-reset: linenumber;
    padding-left: 4.2rem;
}
pre.linenums code > span {
    display: block;
    counter-increment: linenumber;
}
pre.linenums code > span::before {
    content: counter(linenumber);
    display: inline-block;
    width: 2.6rem;
    margin-right: 1.6rem;
    text-align: right;
    color: var(--code-comment);
}

/* Chroma token colours */
.chroma .k,
.chroma .kt { color: var(--code-keyword); }
.chroma .s,
.chroma .sb,
.chroma .sc,
.chroma .sd,
.chroma .s2 { color: var(--code-string); }
.chroma .mi,
.chroma .mf { color: var(--code-number); }
.chroma .nf,
.chroma .nn { color: var(--code-func); }
.chroma .c {
    color: var(--code-comment);
    font-style: italic;
}
.chroma .o,
.chroma .p { color: var(--code-text); }

pre ::selection,
code::selection { background: var(--code-selection); }

/* ------------------------------
   Related posts
--------------------------------*/
.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0,120,220,0.1);
}
.related-posts h2 { font-size: 2.2rem; margin-top: 0; }
.related-posts ul { list-style: none; padding: 0; }
.related-posts li { margin: 0.8rem 0; font-size: 1.7rem; }
.related-posts time { color: var(--color-text-muted); font-size: 1.5rem; }

/* ------------------------------
   Tag cloud & pills — glossy chips
--------------------------------*/
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1.2rem;
    background: linear-gradient(180deg, #ffffff 0%, #e8f4ff 100%);
    border: 1px solid rgba(77,184,255,0.35);
    border-radius: var(--radius-pill);
    font-size: 1.6rem;
    color: var(--color-sky-top);
    text-decoration: none;
    box-shadow:
        0 1px 4px rgba(0,100,200,0.08),
        inset 0 1px 0 rgba(255,255,255,0.9);
    transition: all 0.15s;
}
.tag-pill:hover {
    background: linear-gradient(180deg, #5cbcff 0%, #0b7dda 100%);
    border-color: rgba(0,100,200,0.3);
    color: white;
    text-decoration: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
    box-shadow:
        0 3px 10px rgba(0,100,200,0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
}
.tag-count {
    font-size: 1.3rem;
    color: var(--color-text-muted);
}
.tag-pill:hover .tag-count {
    color: rgba(255,255,255,0.75);
}

/* 5 ▏Responsive tweak – narrow screens */
@media (max-width: 480px) {
    pre { font-size: 1.4rem; }
    pre.linenums { padding-left: 3.6rem; }
}

/* ------------------------------
   Decorative bubbles (homepage)
--------------------------------*/
.aero-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.aero-bubbles .bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255,255,255,0.7) 0%,
        rgba(255,255,255,0.1) 50%,
        transparent 70%
    );
    border: 1px solid rgba(255,255,255,0.4);
}

.aero-bubbles .bubble:nth-child(1) {
    width: 60px; height: 60px;
    top: 10%; right: 8%;
    animation: float 7s ease-in-out infinite;
}
.aero-bubbles .bubble:nth-child(2) {
    width: 35px; height: 35px;
    top: 30%; right: 3%;
    animation: float 9s ease-in-out infinite 1s;
}
.aero-bubbles .bubble:nth-child(3) {
    width: 45px; height: 45px;
    top: 60%; left: 5%;
    animation: float 8s ease-in-out infinite 2s;
}
.aero-bubbles .bubble:nth-child(4) {
    width: 25px; height: 25px;
    top: 75%; right: 12%;
    animation: float 10s ease-in-out infinite 0.5s;
}
.aero-bubbles .bubble:nth-child(5) {
    width: 40px; height: 40px;
    top: 45%; left: 2%;
    animation: float 6s ease-in-out infinite 3s;
}

/* Intro section on homepage */
.intro-section {
    position: relative;
    z-index: 1;
}
