* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

:root {
    --bg-body: #e0e0e0;
    --bg-surface: #cfcfd4;
    --bg-card: #dbd7d7;
    --bg-side: #23324a;
    --bg-navbar: rgba(15, 23, 42, 0.86);
    --bg-navbar-mobile: rgba(15, 23, 42, 0.96);
    --bg-input: #ffffff;
    --bg-item: #ffffff;
    --bg-item-hover: #eff6ff;
    --bg-item-active: #dbeafe;
    --bg-toggle-track: rgba(148, 163, 184, 0.28);
    --bg-toggle-thumb: #ffffff;

    --text-main: #374151;
    --text-head: #1f3b63;
    --text-muted: #54585f;
    --text-light: #f8fafc;
    --text-subtle: #cbd5e1;
    --text-item: #1f2937;

    --bd-main: #d1d5db;
    --bd-soft: #bec1c7;
    --bd-light: rgba(148, 163, 184, 0.18);
    --bd-side: rgba(255, 255, 255, 0.12);
    --bd-input: #cbd5e1;
    --bd-card-hover: #c7d2e2;
    --bd-item-hover: #93c5fd;

    --link: #3565e9;
    --link-hover: #0044ff;
    --accent: #60a5fa;
    --accent-bg: #dbeafe;

    --shadow-card: 0 6px 18px rgba(15, 23, 42, 0.05);
    --shadow-card-hover: 0 10px 24px rgba(15, 23, 42, 0.08);
    --shadow-nav: 0 10px 30px rgba(15, 23, 42, 0.18);
    --shadow-mobile-nav: 0 16px 40px rgba(15, 23, 42, 0.22);

    --main-bd: #23324a;
}

html.dark-mode,
body.dark-mode {
    --bg-body: #0f172a;
    --bg-surface: #111827;
    --bg-card: #1e293b;
    --bg-side: #020617;
    --bg-navbar: rgba(2, 6, 23, 0.92);
    --bg-navbar-mobile: rgba(2, 6, 23, 0.98);
    --bg-input: #0f172a;
    --bg-item: #0f172a;
    --bg-item-hover: rgba(96, 165, 250, 0.12);
    --bg-item-active: rgba(96, 165, 250, 0.18);
    --bg-toggle-track: rgba(96, 165, 250, 0.32);

    --text-main: #d1d5db;
    --text-head: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #f8fafc;
    --text-subtle: #cbd5e1;
    --text-item: #e5e7eb;

    --bd-main: #334155;
    --bd-soft: #334155;
    --bd-light: rgba(148, 163, 184, 0.2);
    --bd-side: rgba(148, 163, 184, 0.2);
    --bd-input: #334155;
    --bd-card-hover: #475569;
    --bd-item-hover: #60a5fa;

    --link: #93c5fd;
    --link-hover: #0073ff;
    --accent: #0073ff;
    --accent-bg: rgba(96, 165, 250, 0.16);

    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.28);
    --shadow-card-hover: 0 12px 28px rgba(0, 0, 0, 0.34);
    --shadow-nav: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow-mobile-nav: 0 16px 40px rgba(0, 0, 0, 0.4);

    --main-bd: #334155;
}

body {
    background: var(--bg-body);
    color: var(--text-main);
    transition: background 0.35s ease, color 0.35s ease;
}

.hide-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scroll::-webkit-scrollbar {
    display: none;
}

.no-scroll {
    overflow: hidden;
}

.side-sec a:link,
.side-sec a:visited {
    color: var(--accent);
}

.side-sec a:hover {
    color: var(--link-hover);
}

.side-sec a:active {
    color: var(--link);
}

.empty-state {
    font-size: 15px;
    color: var(--text-muted);
    padding: 10px 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 999px;
    background: #4488e0;
    color: #1c4aac;
    white-space: nowrap;
}

/* NAVBAR */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 14px 20px 0;
    background: transparent;
}

.site-nav__inner {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    border: 1px solid var(--bd-light);
    background: var(--bg-navbar);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 18px;
    box-shadow: var(--shadow-nav);
    position: relative;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-nav__brand {
    justify-self: start;
}

.site-nav__logo {
    text-decoration: none;
    color: var(--text-light);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    transition: opacity 0.2s ease, color 0.25s ease;
}

.site-nav__logo:hover {
    opacity: 0.85;
}

.site-nav__links {
    list-style: none;
    display: flex;
    gap: 28px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.site-nav__links li {
    margin: 0;
    padding: 0;
}

.site-nav__links a {
    position: relative;
    text-decoration: none;
    color: var(--text-subtle);
    font-size: 0.98rem;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.site-nav__links a:hover {
    color: var(--text-light);
}

.site-nav__links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.22s ease;
}

.site-nav__links a:hover::after {
    transform: scaleX(1);
}

.site-nav__right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-nav__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-light);
    background: rgba(96, 165, 250, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.22);
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease, color 0.25s ease;
}

.site-nav__pill:hover {
    background: rgba(96, 165, 250, 0.22);
    transform: translateY(-1px);
}

.site-nav__mobile-actions {
    display: none;
    align-items: center;
    gap: 12px;
    justify-self: end;
}

/* HAMBURGER */
.site-nav__toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.site-nav__toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0;
    background: var(--text-light);
    border-radius: 999px;
}

/* THEME TOGGLE */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font: inherit;
    padding: 0;
}

.theme-toggle--icon {
    background: transparent !important;
    border: none;
    box-shadow: none;
    width: auto;
    height: auto;
    padding: 0;
}

.theme-toggle__track {
    width: 52px;
    height: 30px;
    border-radius: 999px;
    background: var(--bg-toggle-track);
    position: relative;
    transition: background 0.25s ease;
    border: none;
}

.theme-toggle__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-toggle-thumb);
    transition: transform 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.theme-toggle__label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
}

body.dark-mode .theme-toggle__thumb {
    transform: translateX(22px);
}

/* SHARED LAYOUT */
.layout {
    max-width: 1200px;
    margin: 22px auto;
}

.layout:not(.detail) {
    display: flex;
    background: var(--bg-surface);
    min-height: calc(100vh - 44px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: background 0.25s ease;
}

.layout.detail {
    padding: 28px 0;
}

.grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 22px;
    align-items: start;
}

.side {
    width: 355px;
    background: var(--bg-side);
    color: var(--text-light);
    padding: 30px;
    flex-shrink: 0;
    border-radius: 25px 0 0 25px;
    transition: background 0.25s ease, color 0.25s ease;
    overflow: hidden;
}

.side h1 {
    font-size: 28px;
    font-weight: normal;
    margin-bottom: 8px;
    color: var(--text-light);
}

.side-sec {
    margin-top: 22px;
}

.side-sec h2 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-light);
    border-bottom: 1px solid var(--bd-side);
    padding-bottom: 8px;
}

.side-sec p,
.side-sec li {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-light);
}

.side-sec ul {
    padding-left: 20px;
    margin-top: 4px;
}

.profile-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    object-position: center;
    margin: 0 auto 22px;
    border-radius: 10px;
}

.detail .pane {
    width: auto;
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--bd-main);
    border-radius: 10px;
    padding: 20px;
    position: sticky;
    top: 20px;
}

.detail .pane h1 {
    font-size: 38px;
    color: var(--text-head);
    margin-bottom: 16px;
}

.main {
    flex: 1;
    padding: 28px 28px 40px;
    border-radius: 0 25px 25px 0;
    border: 1px solid var(--bg-side);
    transition: border-color 0.25s ease;
}

.view {
    min-width: 0;
}

.sec {
    margin-bottom: 30px;
}

.sec h2 {
    font-size: 32px;
    font-weight: normal;
    color: var(--text-head);
    margin-bottom: 14px;
}

.txt {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-main);
}

.meta {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 18px;
}

.role {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-head);
}

.panel {
    background: var(--bg-surface);
    border: 1px solid var(--bd-main);
    border-radius: 10px;
    padding: 26px;
    min-height: 500px;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.panel h2 {
    font-size: 40px;
    font-weight: normal;
    color: var(--text-head);
    margin-bottom: 16px;
    line-height: 1.2;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.search {
    margin-bottom: 16px;
}

.search input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--bd-input);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-input);
    color: var(--text-main);
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.list {
    max-height: 70vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}

.item {
    display: block;
    text-decoration: none;
    color: var(--text-item);
    background: var(--bg-item);
    border: 1px solid var(--bd-main);
    border-radius: 8px;
    padding: 12px 14px;
    line-height: 1.5;
    transition: 0.2s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.item:hover {
    border-color: var(--bd-item-hover);
    background: var(--bg-item-hover);
}

.item.active {
    background: var(--bg-item-active);
    border-color: var(--accent);
    color: var(--link);
}

/* CARD */
.card {
    background: var(--bg-card) !important;
    border: 1px solid var(--bd-soft);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-card);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.25s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--bd-card-hover);
}

.card h3 {
    font-size: 28px;
    font-weight: normal;
    color: var(--text-head);
    margin: 0;
}

.card p {
    font-size: 15px;
    color: var(--text-main);
    line-height: 1.8;
    margin: 0;
}

.hd,
.ft {
    border: none;
    box-shadow: none;
    padding: 0;
    background: transparent;
}

.hd {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    border-bottom: 1px solid var(--bd-soft);
    padding-bottom: 12px;
}

.hd h3 {
    margin: 0;
    flex: 1;
}

.act {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.act a {
    color: var(--link);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.ft {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 6px;
}

.ft a {
    font-size: 14px;
    color: var(--link);
    text-decoration: none;
    font-weight: 500;
}

.links {
    margin-top: 14px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.links a {
    color: var(--link);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.ft a:hover,
.act a:hover,
.links a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 980px) {
    .layout:not(.detail) {
        flex-direction: column;
    }

    .side {
        width: 100%;
        border-radius: 25px;
    }

    .main {
        padding: 24px 20px 32px;
        border-radius: 25px;
    }

    .sec h2 {
        font-size: 28px;
    }

    .card h3 {
        font-size: 24px;
    }
}

@media (max-width: 900px) {
    .site-nav {
        padding: 12px 12px 0;
    }

    .site-nav__inner {
        grid-template-columns: 1fr auto;
        padding: 0 14px;
    }

    .site-nav__right {
        display: none;
    }

    .site-nav__mobile-actions {
        display: flex;
    }

    .site-nav__toggle {
        display: flex;
    }

    .site-nav__links {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        left: 12px;
        right: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 14px;
        background: var(--bg-navbar-mobile);
        border: 1px solid var(--bd-light);
        border-radius: 16px;
        box-shadow: var(--shadow-mobile-nav);
    }

    .site-nav__links.active {
        display: flex;
    }

    .site-nav__links a {
        width: 100%;
        padding: 10px 6px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .detail .pane {
        position: static;
    }

    .list {
        max-height: 260px;
    }

    .panel h2 {
        font-size: 30px;
    }
}

.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .nav-container {
        grid-template-columns: 1fr auto;
    }

    .nav-center {
        position: absolute;
        top: 60px;
        right: 0;
        flex-direction: column;
        background: #0f172a;
        width: 200px;
        display: none;
        padding: 20px;
    }

    .nav-center.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
        color: white;
        font-size: 24px;
        justify-self: end;
        cursor: pointer;
    }

    .nav-right {
        display: none;
    }
}