:root {
    color-scheme: dark;
    --bg: #071014;
    --panel: rgba(12, 24, 31, 0.78);
    --panel-strong: #0d1b23;
    --line: rgba(137, 225, 255, 0.16);
    --text: #ecf7f8;
    --muted: #9fb4ba;
    --cyan: #55d7ff;
    --green: #9dff7a;
    --amber: #ffd166;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

main,
.footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 16, 20, 0.72);
    backdrop-filter: blur(18px);
}

.nav {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
}

.brand,
.nav-links,
.service-head,
.footer {
    display: flex;
    align-items: center;
}

.brand {
    gap: 12px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.nav-links {
    gap: 18px;
    color: var(--muted);
    font-size: 0.94rem;
}

.nav-links a:hover,
.footer a:hover {
    color: var(--cyan);
}

h2 {
    margin: 0;
    max-width: 780px;
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 0.98;
}

h2 {
    font-size: clamp(2.15rem, 5vw, 4.4rem);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 800;
}

.button.primary {
    background: linear-gradient(135deg, var(--cyan), var(--green));
    color: #061014;
    box-shadow: 0 16px 40px rgba(85, 215, 255, 0.22);
}

.button.secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.button:hover {
    transform: translateY(-2px);
}

.service-card,
.project-card,
.meme-frame,
.contact {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.section {
    padding: 88px 0;
}

.section-heading {
    margin-bottom: 30px;
}

.section-heading.narrow {
    display: block;
    max-width: 760px;
}

.section-heading p {
    margin: 20px auto 0;
    color: var(--muted);
}

.section-heading > p {
    max-width: 390px;
    margin: 0;
    color: var(--muted);
}

code {
    color: var(--green);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.status-grid + .status-grid {
    margin-top: 16px;
}

.status-grid-broken .service-card {
    border-color: rgba(255, 107, 107, 0.42);
}

.service-card {
    position: relative;
    overflow: hidden;
    padding: 22px 22px 18px;
    border-radius: 24px;
}

.service-card::before {
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    content: "";
    background: var(--muted);
}

.service-card.ok::before {
    background: var(--green);
}

.service-card.down::before {
    background: #ff6b6b;
}

.service-card.degraded::before,
.service-card.stale::before,
.service-card.pending::before {
    background: var(--amber);
}

.service-head {
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.service-head h3 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.service-head h3 a:hover {
    color: var(--cyan);
}

.status-pill {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.ok .status-pill {
    color: var(--green);
}

.down .status-pill {
    color: #ffb1b1;
}

.degraded .status-pill,
.stale .status-pill,
.pending .status-pill {
    color: var(--amber);
}

.history-bar {
    display: flex;
    gap: 3px;
    width: min(290px, 100%);
    margin-top: 14px;
}

.history-bar span {
    flex: 1 1 6px;
    min-width: 5px;
    max-width: 9px;
    height: 22px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.09);
}

.history-empty {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.history-bar .good {
    background: linear-gradient(180deg, var(--green), rgba(157, 255, 122, 0.52));
}

.history-bar .degraded {
    background: linear-gradient(180deg, var(--amber), rgba(255, 209, 102, 0.5));
}

.history-bar .down {
    background: linear-gradient(180deg, #ff6b6b, rgba(255, 107, 107, 0.48));
}

.history-bar .no-data {
    background: rgba(255, 255, 255, 0.07);
}

.service-time {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.project-card {
    display: grid;
    gap: 10px;
    padding: 22px;
    border-radius: 24px;
}

.project-card:hover {
    border-color: rgba(85, 215, 255, 0.34);
    transform: translateY(-2px);
}

.project-name {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.project-repo {
    color: var(--muted);
    font-size: 0.84rem;
}

.meme-section {
    padding-top: 108px;
}

.meme-title {
    margin-inline: auto;
    text-align: center;
}

.meme-frame {
    width: min(760px, 100%);
    margin: 34px auto 0;
    padding: 10px;
    border-radius: 30px;
}

.meme-frame img {
    width: 100%;
    border-radius: 22px;
}

.empty-state {
    margin: 12px 6px 4px;
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
}

.contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin: 54px 0 88px;
    padding: 34px;
    border-radius: 30px;
}

.contact p {
    max-width: 640px;
    margin: 16px 0 0;
    color: var(--muted);
}

.footer {
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    padding: 30px 0 46px;
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 820px) {
    .nav,
    .section-heading,
    .contact {
        align-items: flex-start;
        flex-direction: column;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .contact .button {
        width: 100%;
    }
}

@media (max-width: 520px) {
    main,
    .footer {
        width: min(100% - 22px, 1120px);
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .service-card,
    .contact {
        border-radius: 22px;
    }
}
