:root {
    --accent: #06b6d4;
    --sea: #0f4c81;
    --jade: #115e59;
    --ink: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --surface: #ffffff;
    --background: #f8fafc;
    --shadow: 0 10px 40px -10px rgba(15, 76, 129, 0.15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--background);
    font-family: "Be Vietnam Pro", sans-serif;
}

button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }

.top {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 22px rgba(15, 76, 129, 0.06);
    backdrop-filter: blur(14px);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    height: 88px;
    margin: auto;
    padding: 0 28px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--sea); }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }

.logo {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: var(--sea);
    box-shadow: 0 5px 16px rgba(15, 76, 129, 0.25);
    font-weight: 900;
}

.navlinks { display: flex; gap: 28px; margin-left: auto; margin-right: 24px; }
.navlinks a { padding: 12px 0; color: #475569; font-size: 14px; font-weight: 700; }
.navlinks a:hover, .navlinks a.active { color: var(--sea); }

.home {
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--sea);
    background: #fff;
    font-weight: 700;
}

.page { padding-bottom: 70px; }

.hero {
    position: relative;
    overflow: hidden;
    padding: 70px 28px 105px;
    color: #fff;
    background: linear-gradient(125deg, var(--sea), #147d87);
    text-align: center;
}

.hero::before, .hero::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    content: "";
}

.hero::before { top: -220px; right: -100px; width: 420px; height: 420px; }
.hero::after { bottom: -150px; left: 8%; width: 220px; height: 220px; }
.eyebrow { color: #fbbf24; font-size: 13px; font-weight: 800; letter-spacing: 0.18em; }
.hero h1 { max-width: 850px; margin: 14px auto; font-size: clamp(38px, 4.5vw, 64px); line-height: 1.12; }
.hero p { max-width: 720px; margin: auto; color: #e2e8f0; line-height: 1.7; }

.explorer { position: relative; z-index: 3; max-width: 1240px; margin: -55px auto 0; padding: 0 24px; }

.tools {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 76, 129, 0.16);
}

.input {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    outline: none;
    color: var(--ink);
    background: var(--background);
}

.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12); }
.periods { display: flex; gap: 9px; overflow: auto; padding: 22px 2px; }

.chip {
    padding: 9px 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #475569;
    background: #fff;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.05);
    white-space: nowrap;
    cursor: pointer;
}

.chip.active, .chip:hover { border-color: var(--accent); color: #fff; background: var(--accent); }

.timeline { position: relative; max-width: 1160px; margin: 10px auto 0; padding-left: 42px; }
.timeline::before { position: absolute; top: 0; bottom: 0; left: 13px; width: 2px; background: linear-gradient(var(--accent), #cbd5e1); content: ""; }

.event {
    position: relative;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 25px;
    margin-bottom: 22px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 8px 30px rgba(15, 76, 129, 0.08);
    cursor: pointer;
    transition: 0.2s;
}

.event:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 16px 38px rgba(15, 76, 129, 0.16); }
.event::before { position: absolute; top: 31px; left: -36px; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgba(6, 182, 212, 0.18); content: ""; }
.time { color: var(--accent); font-size: 21px; font-weight: 800; }
.period { margin-top: 8px; color: var(--muted); font-size: 13px; }
.event h2 { margin: 0 0 8px; color: var(--sea); font-size: 23px; }
.event p { display: -webkit-box; overflow: hidden; margin: 0; color: #475569; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.counts { margin-top: 15px; color: var(--muted); font-size: 12px; }
.media-thumb { width: 100%; height: 230px; margin-top: 16px; border-radius: 15px; background: #eef2f7; object-fit: cover; }

.pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 30px; }
.pager button { padding: 10px 14px; border: 1px solid #cbd5e1; border-radius: 10px; color: var(--sea); background: #fff; cursor: pointer; }
.pager button:disabled { cursor: not-allowed; opacity: 0.45; }
.empty { padding: 80px; color: var(--muted); text-align: center; }

.modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(6px); }
.modal.open { display: flex; }
.detail { width: min(900px, 100%); max-height: 92vh; overflow: auto; border: 1px solid var(--line); border-radius: 24px; color: var(--ink); background: #fff; box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25); }
.detail-head { display: flex; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); background: var(--background); }
.detail-head h2 { margin: 5px 0 0; }
.close { width: 34px; height: 34px; border: 0; border-radius: 50%; color: #334155; background: #e2e8f0; cursor: pointer; }
.detail-body { padding: 25px; }
.cover { width: 100%; max-height: 380px; border-radius: 18px; object-fit: cover; }
.video { width: 100%; margin-top: 18px; border-radius: 15px; }
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.card { display: block; padding: 12px; border-radius: 15px; color: var(--ink); background: #f1f5f9; }
.card img { width: 100%; height: 110px; border-radius: 10px; object-fit: cover; }
.card b { display: block; margin-top: 8px; font-size: 13px; }

@media (max-width: 900px) { .navlinks { display: none; } }

@media (max-width: 700px) {
    .nav { padding: 0 16px; }
    .hero { padding: 48px 18px 90px; }
    .explorer { padding: 0 14px; }
    .tools, .event { grid-template-columns: 1fr; }
    .tools { padding: 12px; }
    .timeline { padding-left: 30px; }
    .event { gap: 8px; padding: 20px; }
    .event::before { left: -24px; }
    .empty { padding: 50px 15px; }
}
