:root {
    --accent: #D6454A;
    --muted: #6B7280;
    --light-font: #f7f7f7;
    --theme-green: #008753;
    --link_blue: #0000ee;
    --dimmed-bg: #f5e7e7;
    --dark-font: #222;
        --surface-bg: #ffffff;
        --surface-soft: #f8fafc;
        --surface-alt: #fdfdfd;
        --surface-muted: #f8f8f8;
        --border-color: #e0e0e0;
        --overlay-bg: rgba(0, 0, 0, 0.8);
        --header-grad-start: #ffffff;
        --header-grad-mid: #cecece;
        --header-grad-end: #000000;
    --max-width: 1200px;
    --gap: 1.25rem;
    --radius: 12px;
}

html[data-theme="dark"] {
        --accent: #ff8d8d;
        --muted: #9ca3af;
        --light-font: #ffff;
        --dark-font: #e5e7eb;
        --link_blue: #7ab7ff;
        --dimmed-bg: #132038;
        --surface-bg: #0b1220;
        --surface-soft: #0f172a;
        --surface-alt: #111827;
        --surface-muted: #0a1222;
        --border-color: #243247;
        --overlay-bg: rgba(3, 8, 20, 0.92);
        --header-grad-start: #0f172a;
        --header-grad-mid: #1f2937;
        --header-grad-end: #050b16;
}

.bbh-bogle-regular {
  font-family: "BBH Bogle", sans-serif;
  font-weight: 400;
  font-style: normal;
}


/* Keep browser UI and native controls aligned with the active theme. */
html {
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background-color: var(--surface-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--theme-green);
    border-radius: 10px;
}


* {
    box-sizing: border-box;
    color: var(--link_blue);
    padding: 0;
    font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

html {
    color: var(--theme-green);
}

body {
    position: relative;
    background-color: var(--surface-muted);
    color: var(--dark-font);
    line-height: 1.6;
    margin: 0;
    color: var(--muted);
}

.sidenav {
    position: fixed;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: calc(var(--gap) * 3);
    padding: 2em;
    background: var(--overlay-bg);
    backdrop-filter: blur(10px);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform .3s ease-in;
}

.sidenav ul {
    display: flex;
    flex-direction: column;
}

.close-btn {
    position: absolute;
    top: 3em;
    right: 3em;
    background: transparent;
    color: var(--accent);
    border: none;
}

.sidenav.show {
    transform: translateX(0);
}

.sidenav .logo a {
    color: var(--theme-green);
    font-family: "BBH Bogle";
    font-size: 1.3rem;
    font-weight: 600;
}

.sidenav .logo a .logo_span {
    color: #fff;
    font-family: "BBH Bogle";
}

.sidenav ul li{
    border-bottom: 1px solid #fff;
    padding-bottom: 2px;
    width: fit-content;
}


.sidenav nav ul li a {
    color: #fff;
}

.sidenav nav ul li a:hover {
    color: var(--theme-green);
    text-decoration: underline;
}

.sidenav .sidebar-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #fff;
}

a {
    color: var(--link_blue);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.5s ease;
}

a:hover{
    text-decoration: underline;
}

.muted {
        color: var(--muted);
    font-size: 0.95rem;
}

#loader {
  position: fixed;
  inset: 0;
    background: var(--surface-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader-logo {
  width: 120px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 0.6; }
}

#content {
  display: none;
}

/* LAYOUT CONTAINER */
.site {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--gap);
}




/* NAVIGATION */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, var(--header-grad-start), var(--header-grad-mid), var(--theme-green), var(--header-grad-end));
    backdrop-filter: blur(10px);
    color: #fff;
    border: 1.5px solid var(--theme-green);
    border-radius: 12.5px;
    margin: auto;
    padding: calc(var(--gap) * 0.75);
    box-shadow: 0 4px 6px 3px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
    position: sticky; 
    top: 0.6125rem;
    z-index: 99;
    transition: backdrop-filter .9s ease-out, background .9s ease-out;
}

/*header:hover {
    background: rgba(200,200,200,0.4);
    backdrop-filter: blur(20px);
    box-shadow: 0 6px 10px 5px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
}*/

.brand {
    display: flex;
    align-items: center;
    gap: var(--gap);
}

.logo {
    font-weight: 700;
    font-size: 1.7rem;
    font-family: "BBH Bogle";
    letter-spacing: -0.02em;
    cursor: pointer;
    color: var(--theme-green);
    text-transform: uppercase;
}

.brand .logo .logo_span {
    color: #fff;
    font-family: "BBH Bogle";
}

.brand .tagline {
    font-size: 0.9rem;
    color: var(--dark-font);
}

.show {
    color: var(--light-font);
}

.hamburger .button {
    display: none;
    border-radius: 3px;
    color: #FFF;
    background: transparent;
}

ion-icon {
    font-size: 30px;
}

ion-icon:focus {
    border: 2px solid var(--theme-green);
}

nav ul {
    display: flex;
    gap: 1rem;
    list-style: none;
}


nav ul li a {
    color: var(--light-font);
}

nav ul li a:hover {
    color: var(--theme-green);
    text-decoration: none;
}

.kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-green);
}

/*typing animation for latest news header in articles.html*/
.layout section .muted_diff {
    margin: 1rem 0;
    font-size: 1.4rem;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid ;
    width: 0;
    animation: type 3s steps(12, end) forwards, blinking 0.7s ease 1 5s forwards;
    text-transform: uppercase;
}
/*had to change animation names because of class conflict and difference in length of text*/
@keyframes type {
    from{ width: 0;}
    to { width: 12ch;}
}

@keyframes blinking {
    0% {
        border-color: #000;
    }
    100% {
        border-color: transparent;
    }
}
/*for all the other .muted*/
.layout section .muted {
    margin: 1rem 0;
    font-size: 1.4rem;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid ;
    width: 0;
    animation: typing 3s steps(14, end) forwards, blink 0.7s ease 1 5s forwards;
    text-transform: uppercase;
}

@keyframes typing {
    from{ width: 0;}
    to { width: 14ch;}
}

@keyframes blink {
    0% {
        border-color: #000;
    }
    100% {
        border-color: transparent;
    }
}








/* GRID LAYOUT FOR MAIN SECTION */
.layout section, .layout aside {
    margin: 2rem auto;
}

.layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--gap);
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}

.card {
  display: flex;
  flex-direction: column;
    background: var(--surface-alt);
  border-radius: 14px;
  overflow: hidden;
    border: 1px solid var(--border-color);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover{
    transform: translateY(-5px) scale(1.02); 
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.card:hover img {
    transform: scale(1.05);
}

.card-body {
  padding: 0.9rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.card-title {
  font-size: 1.05rem;
  line-height: 1.35;
}

.card-title a {
  color: var(--dark-font);
  text-decoration: none;
  display: -webkit-box;
  --webkit-line-clamp: 2;
  --webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a:hover {
  text-decoration: underline;
}

.meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.card-skeleton {
    pointer-events: none;
    border-color: color-mix(in srgb, var(--border-color) 65%, transparent);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
    min-height: 330px;
}

.card-skeleton:hover {
    transform: none;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
}

.card-skeleton .card-body {
    padding: 1rem 1rem 1.25rem;
    gap: 0.5rem;
}

.skeleton-media,
.skeleton-line {
    background: linear-gradient(
        100deg,
        color-mix(in srgb, var(--surface-soft) 86%, transparent) 18%,
        color-mix(in srgb, var(--surface-bg) 96%, #ffffff 4%) 42%,
        color-mix(in srgb, var(--surface-soft) 86%, transparent) 65%
    );
    background-size: 250% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.skeleton-media {
    width: 100%;
    aspect-ratio: 16 / 8.5;
    min-height: 198px;
    border-bottom: 1px solid color-mix(in srgb, var(--border-color) 65%, transparent);
}

.skeleton-line {
    height: 0.9rem;
    border-radius: 999px;
}

.skeleton-line.kicker {
    width: 34%;
    height: 0.68rem;
}

.skeleton-line.title {
    width: 94%;
    height: 1.04rem;
}

.skeleton-line.title-short {
    width: 76%;
    height: 1.04rem;
}

.skeleton-line.meta {
    width: 64%;
    height: 0.78rem;
}

.grid-status {
    grid-column: 1 / -1;
    padding: 0.95rem 1rem;
    border: 1px dashed color-mix(in srgb, var(--border-color) 75%, transparent);
    border-radius: 12px;
    background: linear-gradient(120deg, var(--surface-soft), color-mix(in srgb, var(--surface-bg) 92%, transparent));
    color: var(--muted);
    font-size: 0.95rem;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}


@media (hover: hover) {
  .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(2, 6, 23, 0.14);
  }
}







/* SIDEBAR */
.about, .newsletter, .popular {
    padding: var(--gap);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: var(--surface-alt);
}

.about img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.8rem;
}

.author-row {
    display: flex;
    align-items: center;
}

.newsletter form {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.subButton {
    padding: 0.6rem;
    border-radius: 8px;
    border: 1.5px solid transparent;
    background: var(--theme-green);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.subButton:hover {
    background-color: var(--surface-bg);
    color: var(--theme-green);
    border-radius: 8px;
    padding: 0.6rem;
    letter-spacing: 0.1rem;
    animation: twirl 0.6s ease infinite;
}

@keyframes twirl {
    25% {
        border-top: 1.5px solid var(--theme-green);
    }
    50% {
        border-left: 1.5px solid var(--theme-green);
    }
    75% {
        border-bottom: 1.5px solid var(--theme-green);
    }
    100% {
        border-right: 1.5px solid var(--theme-green);
    }
}





/* FOOTER */
.footer {
    background-color: var(--surface-alt);
  border-top: 4px solid var(--theme-green); /* Nigerian green */
  font-family: "Segoe UI", sans-serif;
    color: var(--dark-font);
  margin-top: 3rem;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-brand h2 {
  color: var(--theme-green);
  font-family: "BBH Bogle";
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
}

.footer-brand p {
  font-size: 0.95rem;
    color: var(--muted);
}

.footer-links h4 {
  margin-bottom: 0.8rem;
  font-size: 1rem;
  color: var(--theme-green);
  font-weight: 700;
  text-transform: uppercase;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  text-decoration: none;
  color: #0057d9; /* link blue */
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #003c99;
  text-decoration: underline;
}

.footer-bottom {
    background-color: var(--surface-muted);
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
    color: var(--muted);
}



/* MOBILE OVERRIDES */
@media (max-width: 980px) {
    .layout {
        grid-template-columns: 2fr 1fr;
    }
    .grid {
        grid-template-columns: 1fr 1fr;
    }
    .tagline {
        display: none;
    }
    .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    }

    .footer-brand {
    grid-column: 1 / -1; /* brand spans full width */
    text-align: center;
    }
}

@media (max-width: 620px) {
    header {
        padding: 0.6125rem var(--gap);
        
    }
    header nav {
        display: none;
    }
    header .brand .logo {
        font-size: 1rem;
    }
    .hamburger .button {
        display: block;
    }
    .layout {
        grid-template-columns: 1fr;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .card {
        border-radius: 12px;
    }

    .card-body {
        padding: 0.8rem 0.9rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .meta {
        font-size: 0.78rem;
    }

    .card-skeleton {
        min-height: 350px;
    }

    .card-skeleton .card-body {
        padding: 0.95rem 1rem 1.15rem;
        gap: 0.55rem;
    }

    .skeleton-media {
        min-height: 210px;
    }

    .skeleton-line.title,
    .skeleton-line.title-short {
        height: 1rem;
    }

    .grid .card:first-child {
        grid-column: auto;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .footer-brand h2 {
        font-size: 1.4rem;
    }

    .footer-links h4 {
        margin-top: 1.5rem;
    }

    .footer-links ul {
        padding-left: 0;
    }
}

@media (min-width: 2480px) {
    .site {
        min-width: 2000px;
    }
}
