/* Custom style overrides */

/* Body font */
body main {
    line-height: 1.8em;
}

/* Visited links — apply theme's visited color everywhere, not just blog list */
a:visited {
    color: var(--visited-color);
}

/* Override theme's monospace date — unify with body font */
time {
    font-family: inherit;
    font-size: inherit;
}

/* Code font */
code,
pre,
kbd,
samp {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9em;
}

/* Blog post header */
main > h1 {
    line-height: 1.4em;
}

/* Blog post meta (date + reading time) */
.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75em;
    color: #9e93c0;
    margin-top: 0;
    margin-bottom: 2.75em;
}

@media (prefers-color-scheme: dark) {
    .post-meta {
        color: #7a709e;
    }
}

.reading-time {
    font-style: italic;
}

.reading-time::before {
    content: "·";
    margin-right: 0.75em;
    opacity: 0.5;
}

/* Inline code in blog content */
content code {
    background: rgba(168, 156, 216, 0.12);
    padding: 0.15em 0.4em;
    border-radius: 4pt;
}

@media (prefers-color-scheme: dark) {
    content code {
        background: rgba(168, 156, 216, 0.15);
    }
}

/* Blockquote */
blockquote {
    border-left: 3px solid rgba(168, 156, 216, 0.45);
    margin-left: 0;
    margin-right: 0;
    padding-left: 1.25em;
}

@media (prefers-color-scheme: dark) {
    blockquote {
        border-left-color: rgba(168, 156, 216, 0.3);
    }
}

/* Swup page transitions */
main {
    transition: opacity 0.2s ease;
}

html.is-animating main {
    opacity: 0;
}

/* Text selection */
::selection {
    background: #fde98a;
    color: #1a1030;
}

@media (prefers-color-scheme: dark) {
    ::selection {
        background: #fad85a;
        color: #0d0820;
    }
}

body {
    background: linear-gradient(150deg, #fdfcfa 0%, #f4f2fc 100%);
    min-height: 100vh;
}

@media (prefers-color-scheme: dark) {
    body {
        background: #01242e;
    }
}

/* Section headers */
h3.h-prefix {
    display: flex;
    align-items: baseline;
    gap: 0.4em;
    margin: 2em 0 0.65em;
}

h3.h-prefix::before {
    content: "/";
    color: #a89cd8;
    font-weight: 400;
}

.highlight {
    background-color: #f0eef8;
    margin-left: calc(-12px - 0.5em);
    margin-right: calc(-12px - 0.5em);
    padding: 1.25em calc(12px + 0.5em);
    border-radius: 12px;
}

@media (prefers-color-scheme: dark) {
    .highlight {
        background-color: rgba(168, 156, 216, 0.08);
    }
}

.highlight pre {
    background-color: transparent !important;
    margin: 0;
    padding: 0;
}

.highlight pre code {
    padding: 0;
}

/* App cards */
.apps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5em;
    margin: 1.75em 0;
}

.app-card {
    background: rgba(168, 156, 216, 0.06);
    border-radius: 18px;
    border: 1px solid rgba(168, 156, 216, 0.2);
    padding: 1.6em;
    display: flex;
    flex-direction: column;
    gap: 1.1em;
    text-decoration: none;
    color: inherit;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.app-card:hover {
    text-decoration: none;
    transform: scale(1.03);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.09);
}

.app-screenshot {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: rgba(168, 156, 216, 0.12);
    border-radius: 12px;
    overflow: hidden;
}

.coming-soon-overlay {
    position: absolute;
    top: 0.65em;
    right: 0.65em;
    padding: 0.45em 1em;
    background: rgba(30, 20, 60, 0.88);
    backdrop-filter: blur(6px);
    border-radius: 999px;
    font-size: 0.65em;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
}

.app-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.app-screenshot img.align-top {
    object-position: top;
}

.app-title {
    display: flex;
    align-items: center;
    gap: 0.4em;
    flex-wrap: wrap;
    margin-bottom: 0.5em;
}

.app-title strong {
    color: var(--heading-color);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.badge {
    font-size: 0.65em;
    font-weight: 600;
    padding: 0.3em 0.5em;
    border-radius: 4px;
    letter-spacing: 0.03em;
    line-height: 1;
}

.badge-ios {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-macos {
    background: #ede9fe;
    color: #6d28d9;
}

.app-info p {
    margin: 0;
    font-size: 0.875em;
    line-height: 1.5;
    color: #666;
}

/* Site title — flex row so monogram and name share a baseline */
.title {
    display: block;
    color: inherit;
    margin-bottom: 0.3em;
}

.title h2 {
    display: flex;
    align-items: center;
    gap: 0.4em;
    margin: 0;
}

/* CSS monogram — JB interlocked letters in a gradient rounded rect */
.site-monogram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 1.1em;
    color: #fff;
    line-height: 1;
    letter-spacing: 0;
    padding: 0.18em 0.22em;
    background: linear-gradient(135deg, #3131de 0%, #8b6fcb 100%);
    border-radius: 0.28em;
    transition: filter 0.18s ease;
    user-select: none;
}

.title:hover .site-monogram {
    filter: brightness(1.22);
}

.title:hover .name-grotesk {
    opacity: 0.7;
}

.title:focus {
    outline: none;
}

.title:focus-visible {
    outline: 2px solid #a89cd8;
    outline-offset: 5px;
    border-radius: 4px;
}

.site-monogram span:last-child {
    margin-left: -0.09em;
}

@media (prefers-reduced-motion: reduce) {
    .site-monogram,
    .title .name-grotesk {
        transition: none;
    }
}

/* Site title — Space Grotesk */
.title .name-grotesk {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: opacity 0.18s ease;
}

/* Reusable infobox */
.infobox {
    margin: 1.5em 0 2em;
    padding: 1.1em 1.4em;
    background: rgba(168, 156, 216, 0.06);
    border: 1px solid rgba(168, 156, 216, 0.2);
    border-radius: 14px;
}

@media (prefers-color-scheme: dark) {
    .infobox {
        background: rgba(168, 156, 216, 0.04);
        border-color: rgba(168, 156, 216, 0.15);
    }
}

/* Get in touch row */
.get-in-touch {
    display: flex;
    align-items: center;
    gap: 0.4em;
    margin: 0.6em 0 1.75em;
}

.get-in-touch .contact-links {
    margin: 0;
    padding-left: 1em;
}

/* Contact icon links */
.contact-links {
    display: flex;
    align-items: center;
    gap: 1.1em;
}

.contact-links a {
    display: flex;
    align-items: center;
    color: #777;
    text-decoration: none;
    transition:
        color 0.15s ease,
        transform 0.15s ease;
}

.contact-links a:hover {
    color: #8b6fcb;
    transform: translateY(-2px);
    text-decoration: none;
}

.contact-links svg {
    width: 1.35em;
    height: 1.35em;
}

@media (prefers-color-scheme: dark) {
    .contact-links a {
        color: #8a8898;
    }

    .contact-links a:hover {
        color: #b3a8e0;
    }
}

/* External link icon */
.icon-external-link {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.25em;
    position: relative;
    top: -0.1em;
    width: 1em;
    height: 1em;
}

/* Blog posts list */
ul.blog-posts li {
    padding: 0.45em 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

ul.blog-posts li:last-child {
    border-bottom: none;
}

@media (max-width: 480px) {
    .apps-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    padding: 1.5em 0 0.5em;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.footer-content .contact-links {
    margin: 0;
}

.footer-content .contact-links a {
    color: #aaa;
}

.footer-content .contact-links a:hover {
    color: #8b6fcb;
}

@media (prefers-color-scheme: dark) {
    .footer-content .contact-links a {
        color: #555;
    }

    .footer-content .contact-links a:hover {
        color: #b3a8e0;
    }
}

.footer-content small {
    color: #aaa;
    font-size: 0.8em;
}

@media (prefers-color-scheme: dark) {
    .footer-content {
        border-top-color: rgba(255, 255, 255, 0.08);
    }

    .footer-content small {
        color: #555;
    }
}

@media (max-width: 480px) {
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5em;
    }
}
