:root {
    --aurora-deep: #030b1c;
    --aurora-mid: #072f75;
    --aurora-bright: #1c78eb;
    --aurora-soft: #96c8ff;
    --bg-light: #f6f9fe;
    --surface-white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.78);
    --glass-border: rgba(255, 255, 255, 0.9);
    --text-dark: #0a1931;
    --text-muted: #526582;
    --text-light: rgba(255, 255, 255, 0.92);
    --accent-blue: #1668dc;
    --accent-blue-light: #e8f2ff;
    --border-soft: #dce8f8;
    --shadow-soft: 0 10px 30px rgba(10, 35, 81, 0.07);
    --shadow-glass: 0 18px 45px rgba(9, 44, 105, 0.14);
}

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

.header {
    background:
        radial-gradient(ellipse 80% 55% at 50% 62%, rgba(56, 152, 255, 0.55), transparent 70%),
        linear-gradient(180deg, var(--aurora-deep) 0%, var(--aurora-mid) 38%, var(--aurora-bright) 68%, var(--aurora-soft) 86%, var(--bg-light) 100%);
    color: var(--surface-white);
    text-align: center;
    padding: 24px 32px 110px;
}

.topbar {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.brand {
    color: var(--surface-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.3px;
}

.nav {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

.nav a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.25s ease;
}

.nav a:hover {
    color: var(--surface-white);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-ghost,
.btn-solid {
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-ghost {
    color: var(--surface-white);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.btn-ghost:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.btn-solid {
    color: var(--text-dark);
    background-color: var(--surface-white);
}

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

.hero {
    max-width: 760px;
    margin: 64px auto 0;
}

.hero-badge {
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(8px);
    padding: 5px 18px 5px 6px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.slider-thumb {
    position: relative;
    z-index: 2;
    background-color: var(--surface-white);
    color: var(--aurora-mid);
    font-weight: 700;
    font-size: 11px;
    padding: 4px 11px;
    border-radius: 999px;
    cursor: grab;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.slider-thumb.is-dragging {
    cursor: grabbing;
    transition: none;
}

.slider-text {
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.hero-badge.is-dragging .slider-text {
    transition: none;
}

.header h1 {
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -1px;
    margin: 0 0 18px;
    color: var(--surface-white);
}

.header h1 em {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 400;
}

.sub {
    color: var(--text-light);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.6;
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

main {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.filter-controls {
    width: 100%;
    max-width: 720px;
    margin: -58px auto 36px;
    padding: 14px 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-glass);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.search-box {
    width: 100%;
}

.search-input {
    width: 100%;
    height: 42px;
    background-color: rgba(255, 255, 255, 0.85);
    color: var(--text-dark);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(22, 104, 220, 0.14);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.filter-btn {
    background-color: rgba(232, 242, 255, 0.7);
    color: var(--text-dark);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 7px 11px;
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background-color: var(--accent-blue-light);
    border-color: var(--accent-blue);
}

.filter-btn.active {
    background-color: var(--accent-blue);
    color: var(--surface-white);
    border-color: var(--accent-blue);
    font-weight: 600;
}

@media (min-width: 768px) {
    .filter-controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        gap: 16px;
    }

    .search-box {
        flex: 1 1 auto;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 760px;
    margin: 0 auto 50px;
}

.lang-tag {
    background-color: var(--surface-white);
    color: var(--text-dark);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.lang-tag:hover {
    transform: translateY(-2px);
    background-color: var(--accent-blue-light);
    border-color: var(--accent-blue);
    box-shadow: 0 12px 24px rgba(22, 104, 220, 0.12);
}

.lang-tag:active {
    transform: translateY(0);
}

.custom-modal {
    position: relative;
    width: calc(100% - 32px);
    max-width: 420px;
    margin: auto;
    padding: 28px 26px 24px;
    background-color: var(--surface-white);
    color: var(--text-dark);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    box-shadow: var(--shadow-glass);
}

.custom-modal::backdrop {
    background-color: rgba(3, 11, 28, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
    background-color: var(--accent-blue-light);
    color: var(--text-dark);
}

#modal-title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background-color: var(--accent-blue-light);
    color: var(--accent-blue);
    margin-bottom: 16px;
}

#modal-description {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-muted);
    text-align: left;
}

.os-title,
.projects-title {
    color: var(--text-dark);
    text-align: center;
    font-weight: 600;
    font-size: 32px;
    margin-top: 70px;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.os-container {
    max-width: 840px;
    margin: 0 auto;
    padding: 32px 36px;
    background-color: var(--surface-white);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.os-subtitle {
    color: var(--accent-blue);
    font-weight: 600;
    margin-top: 26px;
    margin-bottom: 10px;
    font-size: 20px;
}

.os-text {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.75;
    text-align: left;
    margin-bottom: 15px;
}

.os-text strong {
    color: var(--text-dark);
}

.projects-sub {
    color: var(--text-muted);
    text-align: center;
    font-size: 15px;
    margin-top: 24px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    max-width: 900px;
    margin: 30px auto;
}

.project-card {
    background-color: var(--surface-white);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-blue);
    box-shadow: 0 14px 34px rgba(22, 104, 220, 0.12);
}

.project-card h3 {
    color: var(--text-dark);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

.project-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.project-card a {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.project-card a:hover {
    text-decoration: underline;
}

footer {
    border-top: 1px solid var(--border-soft);
    padding: 24px 20px;
    background-color: var(--surface-white);
}

@media (max-width: 768px) {
    .topbar {
        flex-direction: column;
    }
}
