* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Poppins, system-ui, sans-serif;
  font-size: 17px;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); }
a:hover { color: var(--ink-fixed); }
[data-theme="dark"] a:not(.btn) { color: var(--lavender); }
[data-theme="dark"] a:hover { color: #fff; }
[data-theme="dark"] a.btn:hover { color: #fff; }
.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--purple);
  color: #fff;
  padding: 0.5rem 0.8rem;
  z-index: 20;
}
.skip:focus { left: 0.5rem; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.announce {
  background: var(--lavender);
  color: var(--ink-fixed);
  padding: 10px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
}
.announce a {
  color: var(--ink-fixed);
  font-weight: 700;
  text-underline-offset: 3px;
}
.announce a:hover { color: var(--ink-fixed); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 20px max(24px, calc(50vw - 600px));
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.logo { height: 32px; width: auto; }
.header-nav {
  display: flex;
  gap: 1.15rem;
  align-items: center;
  flex-wrap: wrap;
}
.header-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-transform: none;
}
.header-nav a:hover { color: var(--ink); }
.header-nav a.btn {
  color: #fff;
  background: var(--purple);
}
.header-nav a.btn:hover { color: #fff; }
.header-nav a.btn-nav {
  padding: 12px 20px;
  font-size: 15px;
}
.nav-drop { position: relative; }
.nav-drop-btn {
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.nav-drop-btn:after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  transform: translateY(2px);
}
.nav-drop-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 180px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
  box-shadow: var(--shadow);
  z-index: 12;
  display: none;
  gap: 2px;
}
.nav-drop-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 500;
}
.nav-drop-menu a:hover { background: var(--ice); }
.nav-drop.is-open .nav-drop-menu { display: grid; }
a.nav-profile {
  background: transparent;
  color: var(--ink) !important;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
}
a.nav-profile:hover { filter: none; background: color-mix(in srgb, var(--purple) 10%, transparent); }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  box-shadow: 0 6px 0 var(--ink), 0 -6px 0 var(--ink);
}
.account {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 14rem;
}
.account-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ice);
  color: var(--purple);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}
.account-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}
.account-meta strong {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-meta span {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: capitalize;
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  min-height: 44px;
}

.site-footer {
  padding: 72px max(24px, calc(50vw - 600px)) 32px;
  background: #17162b;
  color: #c9c7de;
  font-size: 15px;
}
.site-footer a { color: #c9c7de; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-inner { display: flex; flex-direction: column; gap: 48px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand p { margin: 0; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-head { color: #fff; font-weight: 700; }
.footer-copy {
  border-top: 1px solid #3a3857;
  padding-top: 24px;
  font-size: 13px;
  color: #a8a6bf;
}
.logo-foot {
  height: 24px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  object-position: left center;
  align-self: flex-start;
  flex-shrink: 0;
}
.footer-social {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff !important;
  font-weight: 600;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: grid; place-items: center; }
  .header-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    padding: 1rem 24px 1.2rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
  }
  .header-nav.is-open { display: flex; }
  .nav-drop { width: 100%; }
  .nav-drop-menu {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 4px 0 4px 12px;
    min-width: 0;
    background: transparent;
  }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
