:root {
    --bg: #050816;
    --bg-elevated: rgba(15, 23, 42, 0.9);
    --bg-card: rgba(15, 23, 42, 0.85);
    --border-subtle: rgba(148, 163, 184, 0.3);
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --accent: #38bdf8;
    --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.45);
    --radius-xl: 1.5rem;
    --radius-full: 999px;
    --transition-fast: 160ms ease-out;
    --transition-med: 220ms ease-out;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.bg-gradient {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top left, #22d3ee11 0, transparent 50%),
                radial-gradient(circle at bottom right, #a855f711 0, transparent 55%),
                radial-gradient(circle at top right, #22c55e11 0, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

.bg-orb {
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.orb-1 {
    background: #0ea5e9;
    top: -120px;
    right: 5%;
}

.orb-2 {
    background: #a855f7;
    bottom: -160px;
    left: 10%;
}

.page-shell {
    position: relative;
    min-height: 100vh;
    max-width: 1120px;
    margin: 0 auto;
    padding: 2.25rem 1.5rem 2.75rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 1;
}

/* Header */

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.65));
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.03em;
    background: radial-gradient(circle at 30% 30%, #38bdf8, #0f172a);
    color: white;
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.45);
}

.brand-text h1 {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e5e7eb;
}

.brand-text p {
    margin: 0.1rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.badge {
    padding: 0.35rem 0.8rem;
    font-size: 0.78rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), rgba(15, 23, 42, 0.9));
    color: var(--text-muted);
    white-space: nowrap;
}

/* Intro */

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.intro {
    max-width: 640px;
}

.intro h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    letter-spacing: 0.03em;
}

.intro p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* App grid */

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    align-items: stretch;
}

.app-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.05rem;
    border-radius: 1.35rem;
    background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.16), rgba(15, 23, 42, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.35);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition:
        transform var(--transition-med),
        box-shadow var(--transition-med),
        border-color var(--transition-med),
        background var(--transition-med),
        translate var(--transition-med);
}

.app-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.4), transparent 40%, transparent 60%, rgba(168, 85, 247, 0.4));
    opacity: 0;
    transition: opacity var(--transition-med);
    pointer-events: none;
}

.app-card:hover {
    transform: translateY(-4px);
    border-color: rgba(248, 250, 252, 0.55);
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.95);
}

.app-card:hover::before {
    opacity: 0.18;
}

.app-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Icon images */

.app-icon-wrapper {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 1.5rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 20% 0%, rgba(248, 250, 252, 0.1), transparent 60%);
    border: 1px solid rgba(148, 163, 184, 0.6);
}

.app-icon-img {
    width: 100%;
    height: 100%;
    display: block;
}

/* App text */

.app-body h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.app-body p {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.app-link-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    color: #cbd5f5;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.5);
    backdrop-filter: blur(12px);
}

/* Footer */

.site-footer {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.footer-links {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.9);
    font-size: 0.8rem;
}

.footer-links a {
    color: var(--text-main);
    text-decoration: none;
    position: relative;
    padding-bottom: 1px;
}

.footer-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(to right, #38bdf8, #a855f7);
    opacity: 0;
    transform: scaleX(0.6);
    transform-origin: center;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.footer-links a:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

.footer-links .dot {
    color: var(--text-muted);
}

/* Responsive tweaks */

@media (max-width: 768px) {
    .page-shell {
        padding: 1.75rem 1.1rem 2.25rem;
    }

    .site-header {
        border-radius: 1.2rem;
    }

    .badge {
        width: 100%;
        text-align: center;
    }

    .app-card {
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
