/* =========================================================
   THEME VARIABLES
   ========================================================= */

:root {
    color-scheme: light;

    --background: #ededed;
    --header-background: #e3e3e3;
    --background-art:
        linear-gradient(
            118deg,
            rgba(0, 0, 0, 0.2) 0%,
            transparent 30%,
            rgba(0, 0, 0, 0.1) 68%,
            transparent 100%
        ),
        linear-gradient(
            32deg,
            transparent 8%,
            rgba(0, 0, 0, 0.08) 46%,
            transparent 84%
        ),
        radial-gradient(
            ellipse 42% 68% at 4% 16%,
            rgba(0, 0, 0, 0.24),
            transparent 70%
        ),
        radial-gradient(
            ellipse 58% 46% at 98% 84%,
            rgba(0, 0, 0, 0.18),
            transparent 72%
        );
    --surface: #ffffff;

    --text: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-muted: #95a5a6;

    --border: #e5e7e9;
    --border-hover: #cfd5d8;

    --link: #34495e;
    --link-hover: #111820;

    --shadow: rgba(0, 0, 0, 0.07);

    --switch-background: #f4f5f6;
    --switch-border: #dfe3e5;
    --switch-active: #ffffff;
    --switch-icon: #8a959a;
    --switch-icon-active: #26353c;
    --switch-shadow: rgba(0, 0, 0, 0.14);
}


html[data-theme="dark"] {
    color-scheme: dark;

    --background: #111416;
    --header-background: #111416;
    --background-art:
        linear-gradient(
            118deg,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 30%,
            rgba(255, 255, 255, 0.06) 68%,
            transparent 100%
        ),
        linear-gradient(
            32deg,
            transparent 8%,
            rgba(255, 255, 255, 0.05) 46%,
            transparent 84%
        ),
        radial-gradient(
            ellipse 42% 68% at 4% 16%,
            rgba(255, 255, 255, 0.1),
            transparent 70%
        ),
        radial-gradient(
            ellipse 58% 46% at 98% 84%,
            rgba(255, 255, 255, 0.07),
            transparent 72%
        );
    --surface: #181c1f;

    --text: #e8ebed;
    --text-secondary: #a8b0b4;
    --text-muted: #7d878c;

    --border: #2b3135;
    --border-hover: #40494e;

    --link: #d9dfe2;
    --link-hover: #ffffff;

    --shadow: rgba(0, 0, 0, 0.28);

    --switch-background: #191e21;
    --switch-border: #31383c;
    --switch-active: #343b40;
    --switch-icon: #7d898f;
    --switch-icon-active: #ffffff;
    --switch-shadow: rgba(0, 0, 0, 0.35);
}


@media (prefers-color-scheme: dark) {

    html:not([data-theme="light"]):not([data-theme="dark"]) {
        color-scheme: dark;

        --background: #111416;
        --header-background: #111416;
        --background-art:
            linear-gradient(
                118deg,
                rgba(255, 255, 255, 0.1) 0%,
                transparent 30%,
                rgba(255, 255, 255, 0.06) 68%,
                transparent 100%
            ),
            linear-gradient(
                32deg,
                transparent 8%,
                rgba(255, 255, 255, 0.05) 46%,
                transparent 84%
            ),
            radial-gradient(
                ellipse 42% 68% at 4% 16%,
                rgba(255, 255, 255, 0.1),
                transparent 70%
            ),
            radial-gradient(
                ellipse 58% 46% at 98% 84%,
                rgba(255, 255, 255, 0.07),
                transparent 72%
            );
        --surface: #181c1f;

        --text: #e8ebed;
        --text-secondary: #a8b0b4;
        --text-muted: #7d878c;

        --border: #2b3135;
        --border-hover: #40494e;

        --link: #d9dfe2;
        --link-hover: #ffffff;

        --shadow: rgba(0, 0, 0, 0.28);

        --switch-background: #191e21;
        --switch-border: #31383c;
        --switch-active: #343b40;
        --switch-icon: #7d898f;
        --switch-icon-active: #ffffff;
        --switch-shadow: rgba(0, 0, 0, 0.35);
    }

}


/* =========================================================
   BASE
   ========================================================= */

html,
body {
    min-height: 100%;
}


body {
    min-height: 100vh;
}


html {
    background: var(--background);
}


body {
    box-sizing: border-box;

    margin: 0 !important;

    padding:
        76px
        20px
        72px !important;

    background-color: var(--background) !important;
    background-image: var(--background-art) !important;
    background-attachment: fixed !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;

    color: var(--text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Helvetica,
        Arial,
        sans-serif;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}


.container-narrow {
    box-sizing: border-box;

    width: 100% !important;
    max-width: 720px !important;

    margin-right: auto !important;
    margin-left: auto !important;
}


a,
a:visited {
    color: var(--link);

    text-decoration: none;
}


a:hover,
a:focus {
    color: var(--link-hover);

    text-decoration: none;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: fixed !important;

    z-index: 1000;

    top: 0;
    left: 0;

    box-sizing: border-box;

    display: flex !important;

    width: 100vw !important;
    height: 59px;

    align-items: center;
    justify-content: center;

    margin: 0 !important;
    padding: 0 20px !important;

    background: var(--header-background) !important;

    border: 0 !important;
    outline: 0 !important;

    box-shadow: none !important;
    -webkit-box-shadow: none !important;

    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;
}


.site-header::after {
    position: absolute !important;

    right: 0 !important;
    bottom: -3px !important;
    left: 0 !important;

    display: block !important;

    height: 4px !important;

    background: var(--header-background) !important;

    border: 0 !important;
    box-shadow: none !important;

    content: "" !important;

    pointer-events: none;
}


.site-header::before {
    display: none !important;

    content: none !important;
}


.site-nav {
    position: relative;

    z-index: 1;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 32px;

    margin: 0;
    padding: 0;
}


.site-nav a {
    padding: 5px 0;

    color: var(--text-secondary);

    font-size: 15px;
    font-weight: 400;

    text-decoration: none;
}


.site-nav a:hover {
    color: var(--text);
}


.site-nav a.active {
    color: var(--text);

    font-weight: 600;
}


.site-nav .home-link {
    color: var(--text-muted);
}


/* =========================================================
   HOME INTRO
   ========================================================= */

.home-intro {
    max-width: 640px;

    margin: 0 auto;

    padding: 28px 0 52px;

    text-align: center;
}


.home-intro h1 {
    margin: 0 0 20px;

    color: var(--text);

    font-size: 50px;
    font-weight: 500;
    line-height: 1.08;
}


.home-intro p {
    max-width: 600px;

    margin: 0 auto;

    color: var(--text-secondary);

    font-size: 20px;
    line-height: 1.6;
}


/* =========================================================
   LISTS
   ========================================================= */

.latest,
.archive-list {
    display: flex;

    flex-direction: column;

    gap: 18px;
}


/* =========================================================
   CARDS
   ========================================================= */

.card {
    position: relative;

    box-sizing: border-box;

    width: 100%;

    padding:
        28px
        28px
        20px;

    border: 1px solid var(--border);
    border-radius: 16px;

    background: var(--surface);

    cursor: pointer;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.2s ease;
}


.card:hover {
    border-color: var(--border-hover);

    box-shadow:
        0 10px 30px
        var(--shadow);

    transform: translateY(-2px);
}


.card-top {
    display: flex;

    align-items: center;

    gap: 18px;

    margin-bottom: 18px;
}


.card-icon {
    flex: 0 0 auto;
}


.card-icon img {
    display: block;

    width: 64px;
    height: 64px;

    object-fit: contain;

    border-radius: 14px;
}


.card-heading {
    min-width: 0;

    flex: 1;
}


.card-meta {
    margin-bottom: 5px;

    color: var(--text-muted);

    font-size: 12px;
    line-height: 1.4;
}


.card h2 {
    margin: 0;

    color: var(--text);

    font-size: 24px;
    font-weight: 500;
    line-height: 1.25;
}


.card h2 a {
    color: var(--text);

    text-decoration: none;
}


.card h2 a:hover {
    color: var(--link-hover);
}


.card-main-link::after {
    position: absolute;

    inset: 0;

    content: "";
}


.card p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 15px;
    line-height: 1.65;
}


/* =========================================================
   CARD ACTIONS
   ========================================================= */

.card-actions {
    position: relative !important;

    z-index: 4;

    display: flex !important;

    width: 100%;

    align-items: center;
    justify-content: center;

    gap: 10px;

    margin:
        12px
        0
        0 !important;

    padding: 0 !important;
}


/* =========================================================
   BADGES
   ========================================================= */

.store-badge,
.website-badge {
    box-sizing: border-box;

    display: inline-flex !important;

    height: 40px;

    align-items: center;

    gap: 7px;

    margin: 0 !important;

    padding:
        5px
        11px
        5px
        9px;

    border:
        1px solid
        rgba(255, 255, 255, 0.22);

    border-radius: 8px;

    background: #000000 !important;

    color: #ffffff !important;

    text-decoration: none !important;

    box-shadow:
        0 1px 2px
        rgba(0, 0, 0, 0.14);

    transition:
        transform 0.12s ease,
        background-color 0.12s ease,
        box-shadow 0.12s ease;
}


.store-badge:visited,
.website-badge:visited {
    color: #ffffff !important;
}


.store-badge:hover,
.website-badge:hover {
    background: #151515 !important;

    color: #ffffff !important;

    box-shadow:
        0 2px 5px
        rgba(0, 0, 0, 0.20);

    transform: translateY(-1px);
}


.store-badge:active,
.website-badge:active {
    background: #000000 !important;

    transform: translateY(0);
}


.badge-copy {
    display: flex;

    flex-direction: column;

    align-items: flex-start;
    justify-content: center;

    color: #ffffff;

    line-height: 1;
}


.badge-small {
    display: block;

    margin-bottom: 2px;

    color: #ffffff;

    font-size: 8px;
    font-weight: 400;
    line-height: 1;

    white-space: nowrap;
}


.badge-large {
    display: block;

    color: #ffffff;

    font-size: 14px;
    font-weight: 500;
    line-height: 1;

    letter-spacing: -0.15px;

    white-space: nowrap;
}


.store-badge-apple {
    display: block;

    width: 20px;

    color: #ffffff;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;

    font-size: 25px;
    font-weight: 400;
    line-height: 1;

    text-align: center;
}


.website-badge-icon {
    display: block;

    flex: 0 0 auto;

    width: 20px;
    height: 20px;

    margin: 0;
    padding: 0;

    color: #ffffff;

    fill: none !important;
    stroke: currentColor !important;
}


/* =========================================================
   ARCHIVE
   ========================================================= */

.archive {
    padding: 28px 0 40px;
}


.archive-header {
    max-width: 620px;

    margin: 0 auto 42px;

    text-align: center;
}


.archive-header h1 {
    margin: 0 0 14px;

    color: var(--text);

    font-size: 42px;
    font-weight: 500;
    line-height: 1.15;
}


.archive-description {
    color: var(--text-secondary);

    font-size: 18px;
    line-height: 1.6;
}


.archive-description p {
    margin: 0;
}


/* =========================================================
   PROJECT DETAIL CARD
   ========================================================= */

.project-detail-card {
    box-sizing: border-box;

    width: 100%;

    margin:
        28px
        auto
        40px;

    padding:
        32px
        32px
        22px;

    border: 1px solid var(--border);
    border-radius: 18px;

    background: var(--surface);

    box-shadow:
        0 8px 28px
        var(--shadow);
}


.project-detail-header {
    display: flex;

    align-items: center;

    gap: 20px;

    margin-bottom: 22px;
}


.project-detail-icon {
    flex: 0 0 auto;
}


.project-detail-icon img {
    display: block;

    width: 82px;
    height: 82px;

    object-fit: contain;

    border-radius: 18px;
}


.project-detail-heading {
    min-width: 0;

    flex: 1;
}


.project-detail-heading .content-meta {
    margin-bottom: 6px;
}


.project-detail-heading h1 {
    margin: 0;

    color: var(--text);

    font-size: 40px;
    font-weight: 500;
    line-height: 1.12;
}


.project-detail-description {
    margin:
        0
        0
        28px;

    color: var(--text-secondary);

    font-size: 18px;
    line-height: 1.6;
}


.project-detail-body {
    margin: 0;
}


.project-detail-actions {
    position: relative;

    z-index: 4;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 18px;
}


/* =========================================================
   LEGAL DETAIL CARD
   ========================================================= */

.legal-detail-card {
    box-sizing: border-box;

    width: 100%;

    margin:
        28px
        auto
        40px;

    padding:
        34px
        34px
        30px;

    border: 1px solid var(--border);

    border-radius: 18px;

    background: var(--surface);

    box-shadow:
        0 8px 28px
        var(--shadow);
}


.legal-detail-header {
    margin-bottom: 30px;

    text-align: center;
}


.legal-detail-meta {
    margin-bottom: 8px;

    color: var(--text-muted);

    font-size: 12px;
    font-weight: 500;

    letter-spacing: 0.04em;

    text-transform: uppercase;
}


.legal-detail-header h1 {
    margin:
        0
        0
        12px;

    color: var(--text);

    font-size: 40px;
    font-weight: 500;
    line-height: 1.12;
}


.legal-detail-description {
    max-width: 560px;

    margin: 0 auto;

    color: var(--text-secondary);

    font-size: 16px;
    line-height: 1.6;
}


.legal-detail-body {
    max-width: 620px;

    margin: 0 auto;
}


/* =========================================================
   CONTENT
   ========================================================= */

.content-page {
    max-width: 680px;

    margin: 0 auto;

    padding: 28px 0 45px;
}


.content-header {
    margin-bottom: 36px;

    text-align: center;
}


.content-meta {
    margin-bottom: 10px;

    color: var(--text-muted);

    font-size: 13px;
}


.content-header h1 {
    margin: 0 0 18px;

    color: var(--text);

    font-size: 46px;
    font-weight: 500;
    line-height: 1.12;
}


.content-description {
    max-width: 600px;

    margin: 0 auto;

    color: var(--text-secondary);

    font-size: 19px;
    line-height: 1.6;
}


.content-body {
    color: var(--text);

    font-size: 16px;
    line-height: 1.75;
}


.content-body p {
    margin:
        0
        0
        1.4em;
}


.content-body h2 {
    margin:
        38px
        0
        13px;

    color: var(--text);

    font-size: 23px;
    font-weight: 550;
    line-height: 1.3;
}


.content-body h2:first-child {
    margin-top: 0;
}


.content-body h3 {
    margin:
        30px
        0
        11px;

    color: var(--text);

    font-size: 18px;
}


.content-body ul,
.content-body ol {
    margin-bottom: 1.5em;
}


.content-body li {
    margin-bottom: 5px;
}


.content-body img {
    max-width: 100%;

    height: auto;

    border-radius: 10px;
}


/* =========================================================
   GENERIC CARD LINK
   ========================================================= */

.card-link {
    position: relative;

    z-index: 3;

    display: inline-block;

    margin-top: 16px;

    color: var(--link);

    font-size: 14px;
    font-weight: 500;

    text-decoration: none;
}


.card-link:hover {
    color: var(--link-hover);
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    position: fixed !important;

    z-index: 1000;

    right: 0;
    bottom: 0;
    left: 0;

    box-sizing: border-box !important;

    width: 100vw !important;
    height: 52px !important;

    margin: 0 !important;

    padding:
        0
        20px !important;

    background: var(--header-background) !important;

    border: 0 !important;
    border-top: 0 !important;

    outline: 0 !important;

    box-shadow: none !important;
    -webkit-box-shadow: none !important;

    -webkit-backdrop-filter: blur(12px) !important;
    backdrop-filter: blur(12px) !important;

    text-align: initial !important;
}


.site-footer::before {
    position: absolute !important;

    top: -4px !important;
    right: 0 !important;
    left: 0 !important;

    display: block !important;

    width: 100% !important;
    height: 5px !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;

    border: 0 !important;
    outline: 0 !important;

    box-shadow: none !important;

    content: "" !important;

    pointer-events: none;
}


.site-footer::after {
    display: none !important;

    content: none !important;
}


.site-footer-inner {
    position: relative;

    z-index: 1;

    box-sizing: border-box;

    display: grid !important;

    width: 100% !important;
    height: 100%;

    grid-template-columns:
        minmax(0, 1fr)
        auto
        minmax(0, 1fr);

    align-items: center;

    gap: 20px;

    margin: 0 !important;
    padding: 0 !important;
}


.footer-copy {
    min-width: 0;

    margin: 0 !important;
    padding: 0 !important;

    color: var(--text-muted);

    font-size: 12px;
    line-height: 1;

    text-align: left;

    white-space: nowrap;
}


.footer-legal {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    margin: 0;
    padding: 0;
}


.footer-legal a,
.footer-legal a:visited {
    color: var(--text-muted);

    font-size: 12px;
    font-weight: 400;
    line-height: 1;

    text-decoration: none;

    transition:
        color 0.15s ease;
}


.footer-legal a:hover {
    color: var(--text);
}


.footer-legal-separator {
    color: var(--text-muted);

    font-size: 12px;
    line-height: 1;

    opacity: 0.75;

    user-select: none;
}


.footer-appearance {
    display: flex;

    align-items: center;
    justify-content: flex-end;
}


/* =========================================================
   APPEARANCE
   ========================================================= */

.appearance-control {
    box-sizing: border-box;

    display: inline-flex !important;

    flex: 0 0 auto;

    height: 26px;

    align-items: center;
    justify-content: center;

    gap: 1px;

    margin: 0 !important;
    padding: 2px !important;

    border:
        1px solid
        var(--switch-border) !important;

    border-radius: 9px;

    background: var(--switch-background);

    box-shadow:
        inset 0 1px 2px
        rgba(0, 0, 0, 0.035);
}


.appearance-option,
button.appearance-option {
    box-sizing: border-box !important;

    display: flex !important;

    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;

    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;

    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 6px !important;

    outline: 0;

    background: transparent !important;
    background-image: none !important;

    box-shadow: none !important;

    color: var(--switch-icon) !important;

    font-size: 0 !important;
    line-height: 0 !important;

    text-shadow: none !important;

    cursor: pointer;

    appearance: none !important;
    -webkit-appearance: none !important;

    transition:
        color 0.15s ease,
        background-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.1s ease;
}


.appearance-option:hover,
button.appearance-option:hover {
    color: var(--text) !important;
}


.appearance-option:active {
    transform: scale(0.94);
}


.appearance-option.active,
button.appearance-option.active {
    background: var(--switch-active) !important;

    color: var(--switch-icon-active) !important;

    box-shadow:
        0 1px 3px
        var(--switch-shadow) !important;
}


.appearance-option:focus-visible {
    outline:
        2px solid
        var(--text-muted);

    outline-offset: 2px;
}


.appearance-option svg {
    display: block !important;

    width: 13px !important;
    height: 13px !important;

    margin: 0 !important;
    padding: 0 !important;

    fill: none !important;
    stroke: currentColor !important;

    vertical-align: middle;

    pointer-events: none;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 600px) {

    body {
        background-image: none !important;

        padding:
            68px
            16px
            64px !important;
    }


    .site-header {
        height: 53px;

        padding-right: 16px !important;
        padding-left: 16px !important;
    }


    .site-nav {
        gap: 24px;
    }


    .home-intro {
        padding:
            24px
            0
            42px;
    }


    .home-intro h1 {
        font-size: 38px;
    }


    .home-intro p {
        font-size: 18px;
    }


    .card {
        padding:
            22px
            22px
            16px;
    }


    .card-top {
        gap: 14px;
    }


    .card-icon img {
        width: 54px;
        height: 54px;

        border-radius: 12px;
    }


    .card h2 {
        font-size: 21px;
    }


    .card-actions {
        gap: 9px;

        margin-top: 10px !important;
    }


    .store-badge,
    .website-badge {
        height: 38px;

        gap: 6px;

        padding:
            4px
            10px
            4px
            8px;
    }


    .store-badge-apple {
        width: 19px;

        font-size: 23px;
    }


    .website-badge-icon {
        width: 19px;
        height: 19px;
    }


    .badge-small {
        font-size: 7.5px;
    }


    .badge-large {
        font-size: 13px;
    }


    .archive-header h1,
    .content-header h1 {
        font-size: 36px;
    }


    .project-detail-card {
        margin-top: 20px;

        padding:
            24px
            22px
            18px;

        border-radius: 16px;
    }


    .project-detail-header {
        gap: 15px;

        margin-bottom: 18px;
    }


    .project-detail-icon img {
        width: 64px;
        height: 64px;

        border-radius: 14px;
    }


    .project-detail-heading h1 {
        font-size: 30px;
    }


    .project-detail-heading .content-meta {
        font-size: 11px;
    }


    .project-detail-description {
        margin-bottom: 22px;

        font-size: 16px;
    }


    .project-detail-actions {
        gap: 9px;

        margin-top: 14px;
    }


    .legal-detail-card {
        margin-top: 20px;

        padding:
            26px
            22px
            24px;

        border-radius: 16px;
    }


    .legal-detail-header {
        margin-bottom: 24px;
    }


    .legal-detail-header h1 {
        font-size: 32px;
    }


    .legal-detail-description {
        font-size: 15px;
    }


    .legal-detail-body {
        font-size: 15px;
    }


    .content-page {
        padding-top: 24px;
    }


    .site-footer {
        height: 48px !important;

        padding-right: 12px !important;
        padding-left: 12px !important;
    }


    .site-footer-inner {
        gap: 8px;
    }


    .footer-copy {
        font-size: 10px;
    }


    .footer-legal {
        gap: 6px;
    }


    .footer-legal a,
    .footer-legal a:visited,
    .footer-legal-separator {
        font-size: 10px;
    }


    .appearance-control {
        height: 24px;
    }


    .appearance-option,
    button.appearance-option {
        width: 26px !important;
        min-width: 26px !important;
        max-width: 26px !important;

        height: 18px !important;
        min-height: 18px !important;
        max-height: 18px !important;
    }


    .appearance-option svg {
        width: 12px !important;
        height: 12px !important;
    }

}


@media (max-width: 420px) {

    .footer-copy {
        max-width: 76px;

        overflow: hidden;

        text-overflow: ellipsis;
    }


    .footer-legal {
        gap: 5px;
    }


    .footer-legal a,
    .footer-legal a:visited,
    .footer-legal-separator {
        font-size: 9.5px;
    }

}
