/*
 * Brandon Na Homepage: shared styles (homepage + blog views).
 * Theme stylesheets now stay loaded, so every rule here is scoped to
 * body.bn-view and every class is prefixed bn- to avoid collisions.
 */

/* Fonts: self-hosted variable WOFF2 (SIL OFL, see assets/fonts). */
@font-face{
  font-family:"Bricolage Grotesque";
  src:url("../fonts/bricolage-grotesque-var-latin.woff2") format("woff2");
  font-weight:200 800; font-style:normal; font-display:swap;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:"Newsreader";
  src:url("../fonts/newsreader-var-latin.woff2") format("woff2");
  font-weight:200 800; font-style:normal; font-display:swap;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:"Newsreader";
  src:url("../fonts/newsreader-var-italic-latin.woff2") format("woff2");
  font-weight:200 800; font-style:italic; font-display:swap;
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Tokens. --panel is the dark card used by the Good Peoples card and the
   contact block; it stays dark in both modes (it used to flip to near-white
   in dark mode, leaving yellow text on white). */
:root{
  --bg:#F1F3FC; --bg-2:#E4E8F8; --ink:#1B1633; --muted:#57516F; --line:rgba(27,22,51,.14);
  --joy:#8A5800; --joy-fill:#F2B632; --on-joy:#1B1633; --sky:#3444B8; --digit:rgba(27,22,51,.24);
  --panel:#1B1633; --on-panel:#F1F3FC; --on-panel-muted:rgba(241,243,252,.72); --panel-line:rgba(241,243,252,.3);
  --display:"Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body:"Newsreader", Georgia, "Times New Roman", serif;
  --wrap:min(1180px, 100% - 2.5rem);
  --nav-h:64px;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#1B1533; --bg-2:#241C44; --ink:#F3F1FF; --muted:#B3ACD2; --line:rgba(243,241,255,.14);
    --joy:#F5BC3A; --joy-fill:#F5BC3A; --on-joy:#1B1533; --sky:#A4B5FF; --digit:rgba(243,241,255,.2);
    --panel:#2C2459; --on-panel:#F3F1FF; --on-panel-muted:rgba(243,241,255,.75); --panel-line:rgba(243,241,255,.28);
  }
}
:root[data-theme="dark"]{
  --bg:#1B1533; --bg-2:#241C44; --ink:#F3F1FF; --muted:#B3ACD2; --line:rgba(243,241,255,.14);
  --joy:#F5BC3A; --joy-fill:#F5BC3A; --on-joy:#1B1533; --sky:#A4B5FF; --digit:rgba(243,241,255,.2);
  --panel:#2C2459; --on-panel:#F3F1FF; --on-panel-muted:rgba(243,241,255,.75); --panel-line:rgba(243,241,255,.28);
}

/* Defensive reset against retained theme CSS (e.g. Divi sets heading colour,
   paragraph padding and link colour globally). */
html{scroll-behavior:smooth;scroll-padding-top:calc(env(safe-area-inset-top,0px) + 80px)}
body.bn-view{margin:0;padding:0 0 env(safe-area-inset-bottom,0px);background:var(--bg);color:var(--ink);font-family:var(--body);font-size:1.1875rem;font-weight:400;line-height:1.6;-webkit-font-smoothing:antialiased;overflow-x:hidden}
.bn-view,.bn-view *,.bn-view *::before,.bn-view *::after{box-sizing:border-box}
.bn-view :is(h1,h2,h3,h4,h5,h6){padding:0;color:inherit}
.bn-view p{padding:0}
.bn-view a{color:inherit}
.bn-view img{max-width:100%;height:auto}
.bn-view :is(input,textarea,button,select){font:inherit}
.bn-view :focus-visible{outline:3px solid var(--sky);outline-offset:3px;border-radius:4px}
.bn-wrap{width:var(--wrap);margin-inline:auto}

/* Nav */
.bn-nav{position:fixed;top:0;left:0;right:0;z-index:20;padding-top:env(safe-area-inset-top,0px);
  background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
.bn-nav .bn-wrap{display:flex;align-items:center;justify-content:space-between;height:var(--nav-h);gap:1rem}
.bn-view .bn-brand{font-family:var(--display);font-weight:800;font-size:clamp(1.1rem,4.2vw,1.3rem);line-height:1;text-decoration:none;letter-spacing:-.02em;white-space:nowrap;color:var(--ink)}
.bn-nav ul{display:flex;gap:1.75rem;list-style:none;margin:0;padding:0;font-family:var(--display);font-size:.98rem;line-height:1.4}
.bn-nav ul li{margin:0;padding:0}
.bn-view .bn-nav ul a{text-decoration:none;color:var(--muted)}
.bn-view .bn-nav ul a:hover{color:var(--ink)}
@media (max-width:820px){.bn-nav ul{display:none}}
.admin-bar .bn-nav{top:32px}
@media (max-width:782px){.admin-bar .bn-nav{top:46px}}

/* Buttons */
.bn-view .bn-btn{display:inline-flex;align-items:center;justify-content:center;font-family:var(--display);font-weight:600;font-size:1rem;line-height:1.2;
  padding:.8rem 1.35rem;border-radius:999px;text-decoration:none;border:2px solid transparent;cursor:pointer;transition:transform .15s ease;text-align:center}
.bn-view .bn-btn:hover{transform:translateY(-2px)}
.bn-view .bn-btn-joy{background:var(--joy-fill);color:var(--on-joy)}
.bn-view .bn-btn-ghost{border-color:var(--ink);color:var(--ink);background:transparent}
.bn-view .bn-nav .bn-btn{padding:.55rem 1.05rem;font-size:.95rem;white-space:nowrap}

/* Footer */
.bn-footer{padding:3rem 0 2.5rem;font-family:var(--display);font-size:.95rem;color:var(--muted)}
.bn-footer .bn-wrap{display:flex;flex-wrap:wrap;justify-content:space-between;gap:1rem}
.bn-footer nav{display:flex;flex-wrap:wrap;gap:.75rem 1.5rem}
.bn-view .bn-footer a{text-decoration:none;color:var(--muted)}
.bn-view .bn-footer a:hover{color:var(--ink)}

.bn-view .screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .bn-view .bn-btn{transition:none}
  .bn-view .bn-btn:hover{transform:none}
}
