:root {
    color-scheme: dark;
    --nav-height: 72px;
    --content-max-width: 820px;
    --surface: rgba(10, 14, 24, 0.72);
    --surface-strong: rgba(6, 10, 20, 0.82);
    --border-light: rgba(255, 255, 255, 0.14);
    --text-primary: #f7f8fb;
    --text-secondary: rgba(247, 248, 251, 0.82);
    --text-muted: rgba(247, 248, 251, 0.68);
    --shadow-heavy: 0 24px 60px rgba(0, 0, 0, 0.3);
    --radius-lg: 20px;
    --radius-pill: 999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    background-color: #02050b;
    overflow-x: hidden;
}

a {
    color: inherit;
}

.site-body {
    min-height: 100vh;
}

.navbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 120;
    background-color: rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

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

.navbar-brand {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.navbar-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 24px;
    list-style: none;
    flex-wrap: wrap;
}

.navbar-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.25s ease;
}

.navbar-links a::after {
    content: "";
    position: absolute;
    inset: auto 0 -3px;
    height: 2px;
    width: 0;
    background-color: #fff;
    transition: width 0.25s ease;
}

.navbar-links a:hover,
.navbar-links a[aria-current="page"] {
    color: #fff;
}

.navbar-links a:hover::after,
.navbar-links a[aria-current="page"]::after {
    width: 100%;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: var(--radius-pill);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.language-switcher button {
    min-width: 58px;
    min-height: 34px;
    padding: 0 14px;
    border: none;
    border-radius: var(--radius-pill);
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.language-switcher button:hover {
    color: #fff;
}

.language-switcher button.is-active {
    background-color: #fff;
    color: #111827;
    transform: translateY(-1px);
}

.slideshow-container {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: #000 center center / cover no-repeat;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    animation: fadeIn 0.5s ease-in;
}

.page-overlay {
    position: absolute;
    inset: 0;
    z-index: 15;
    background: linear-gradient(rgba(5, 8, 16, 0.42), rgba(5, 8, 16, 0.72));
}

.home-overlay {
    background: linear-gradient(rgba(4, 6, 12, 0.2), rgba(4, 6, 12, 0.55));
}

.page-wrapper {
    position: relative;
    z-index: 20;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-height) + 48px) 16px 112px;
}

.page {
    width: min(var(--content-max-width), calc(100% - 8px));
}

.page-card {
    padding: 36px;
    background-color: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.18;
    margin-bottom: 16px;
}

.hero-description {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.85;
    max-width: 760px;
}

.hero-actions {
    margin-top: 24px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

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

.button-primary {
    background-color: #fff;
    color: #111827;
}

.button-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.button-hermes {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(71, 85, 255, 0.28), rgba(114, 46, 209, 0.34)),
        rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(149, 128, 255, 0.38);
    box-shadow: 0 10px 24px rgba(78, 57, 184, 0.22);
}

.button-hermes::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.18) 50%, transparent 80%);
    transform: translateX(-120%);
    transition: transform 0.55s ease;
}

.button-hermes:hover {
    background:
        linear-gradient(135deg, rgba(85, 101, 255, 0.36), rgba(132, 57, 226, 0.42)),
        rgba(255, 255, 255, 0.1);
    border-color: rgba(177, 161, 255, 0.54);
    box-shadow: 0 14px 30px rgba(88, 67, 201, 0.3);
}

.button-hermes:hover::before {
    transform: translateX(120%);
}

.github-box {
    margin-top: 18px;
    padding: 18px;
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.22);
}

.github-box strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.github-box p {
    color: var(--text-secondary);
    line-height: 1.75;
}

.github-box a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.github-box code {
    display: block;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.28);
    color: #d7e6ff;
    overflow-wrap: anywhere;
}

.github-box a:hover code {
    text-decoration: underline;
}

.slideshow-controls {
    position: absolute;
    inset: auto 0 44px;
    z-index: 30;
    pointer-events: none;
}

.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 35;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.42);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
    transition: background-color 0.25s ease, transform 0.25s ease;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.slideshow-nav:hover {
    background-color: rgba(0, 0, 0, 0.62);
}

.slideshow-nav:active {
    transform: translateY(-50%) scale(0.96);
}

.slideshow-nav.prev {
    left: 18px;
}

.slideshow-nav.next {
    right: 18px;
}

.dots-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    pointer-events: auto;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.82);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.dot:hover {
    background-color: rgba(255, 255, 255, 0.72);
}

.dot.active {
    background-color: #fff;
    border-color: #fff;
}

.dot:active {
    transform: scale(1.12);
}

.icp-footer {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    z-index: 35;
    max-width: min(90vw, 520px);
    padding: 6px 12px;
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.32);
    color: rgba(255, 255, 255, 0.84);
    font-size: 12px;
    text-align: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.icp-footer a {
    text-decoration: none;
}

.icp-footer a:hover {
    text-decoration: underline;
}

.status-message {
    position: absolute;
    inset: 50% auto auto 50%;
    z-index: 40;
    transform: translate(-50%, -50%);
    width: min(640px, calc(100% - 32px));
    padding: 24px;
    border-radius: 18px;
    background-color: var(--surface-strong);
    border: 1px solid var(--border-light);
    text-align: center;
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.status-message p:first-child {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
}

.status-message p:last-child {
    margin-top: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 1024px) {
    .navbar-inner {
        width: min(100%, calc(100% - 24px));
        gap: 18px;
    }

    .navbar-links {
        gap: 18px;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 112px;
    }

    .navbar-inner {
        width: min(100%, calc(100% - 24px));
        flex-direction: column;
        justify-content: center;
        gap: 12px;
        padding: 14px 0;
    }

    .navbar-links {
        width: 100%;
        gap: 14px;
    }

    .navbar-actions {
        width: 100%;
        justify-content: center;
    }

    .page-wrapper {
        align-items: flex-start;
        padding-top: calc(var(--nav-height) + 28px);
        padding-bottom: 120px;
    }

    .page-card {
        padding: 24px;
    }

    .hero-description,
    .github-box p {
        font-size: 15px;
    }

    .slideshow-nav {
        width: 46px;
        height: 46px;
        font-size: 24px;
    }

    .slideshow-nav.prev {
        left: 12px;
    }

    .slideshow-nav.next {
        right: 12px;
    }

    .slideshow-controls {
        bottom: 60px;
    }

    .icp-footer {
        bottom: 6px;
        font-size: 10px;
        padding: 5px 10px;
        max-width: 92vw;
        word-break: break-word;
    }
}

@media (max-width: 540px) {
    .navbar-brand {
        font-size: 16px;
    }

    .navbar-links a {
        font-size: 13px;
    }

    .language-switcher button {
        min-width: 54px;
        min-height: 32px;
        padding: 0 12px;
    }

    .page-card {
        padding: 20px;
        border-radius: 18px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .dots-container {
        gap: 8px;
    }

    .dot {
        width: 14px;
        height: 14px;
    }
}

@media (max-height: 620px) {
    .page-wrapper {
        align-items: flex-start;
    }
}
