:root{
  --bg1:#1e3c72;
  --bg2:#2a5298;
  --surface:#ffffff;
  --ink:#233244;
  --muted:#5c6b80;
  --brand:#1e3c72;
  --brand-2:#2a5298;
  --accent:#00c4ff;
  --shadow:0 8px 24px rgba(10,24,48,.15);
  --radius:14px;
  --gap:22px;
  --header-h:88px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:var(--header-h)}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji";
  line-height:1.6;
  color:var(--ink);
  background:linear-gradient(135deg,var(--bg1),var(--bg2)) fixed;
  background-size:200% 200%;
  animation:bgShift 18s ease-in-out infinite;
}
@keyframes bgShift{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}

.container{max-width:1100px;margin:0 auto;padding:clamp(16px,3vw,28px)}

header{
  position:sticky;top:0;z-index:50;
  backdrop-filter:saturate(120%) blur(8px);
  background:linear-gradient(0deg,rgba(255,255,255,.94),rgba(255,255,255,.88));
  border-bottom:1px solid rgba(0,0,0,.06);
}
header .bar{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:var(--header-h)}
.logo{display:inline-flex;align-items:center;gap:14px;text-decoration:none}
.logo svg{width:clamp(72px,7vw,100px);height:auto;display:block}
.logo span{font-size:clamp(22px,3vw,30px);font-weight:800;letter-spacing:.2px;color:var(--brand)}

.mainnav{display:flex;gap:clamp(10px,2.5vw,26px);align-items:center}
.mainnav a{position:relative;text-decoration:none;font-weight:700;color:var(--brand);padding:6px 2px;transition:color .25s ease}
.mainnav a::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;transform:scaleX(0);transform-origin:left;background:linear-gradient(90deg,var(--brand),var(--brand-2));transition:transform .25s ease}
.mainnav a:hover{color:var(--brand-2)}
.mainnav a:hover::after{transform:scaleX(1)}
.mainnav a.active{color:var(--brand-2)}
.mainnav a.active::after{transform:scaleX(1)}

.langswitch{margin-left:auto}
.langswitch .langlink{
  font-size:.85rem;
  padding:6px 12px;
  border-radius:8px;
  background:transparent;
  border:1px solid var(--brand-2);
  color:var(--brand-2);
  font-weight:600;
  text-decoration:none;
  transition:background-color .2s ease,color .2s ease;
}
.langswitch .langlink:hover{background-color:var(--brand-2);color:#fff}

section{max-width:1000px;margin:clamp(14px,2vw,22px) auto;background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);padding:clamp(18px,3vw,28px);scroll-margin-top:calc(var(--header-h) + 12px)}
section h2{margin-top:0;color:var(--brand)}
section p{margin:12px 0;color:var(--ink)}

footer{
  color:#0f1b2e;
  text-align:center;
  background:linear-gradient(0deg,rgba(255,255,255,.96),rgba(255,255,255,.9));
  border-top:1px solid rgba(0,0,0,.06);
}
footer .container{padding:22px}
footer a{color:var(--brand-2);font-weight:700;text-decoration:none}
footer a:hover{text-decoration:underline}
footer p{margin:.35rem 0}

/* Highlight OG-like preview card if used */
.meta-preview{border:1px solid #ddd;padding:12px;border-radius:8px;background:#fafafa;font-size:.9em;color:var(--muted)}

/* Links */
a{color:var(--brand-2)}
a:hover{text-decoration:underline}

@media(max-width:860px){.mainnav{gap:16px}}
@media(max-width:640px){
  :root{--header-h:120px}
  header .bar{flex-direction:column;align-items:flex-start}
  .mainnav{flex-wrap:wrap}
  .langswitch{margin-left:0;margin-top:8px}
}

:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

@media print{body{background:#fff}header,nav,footer{position:static;box-shadow:none}section{box-shadow:none;border:1px solid #ddd}}

/* Active nav highlight support */
.mainnav a[aria-current="true"]{color:var(--brand-2)}
.mainnav a[aria-current="true"]::after{transform:scaleX(1)}

