/* ================================
   Variables
================================ */

/* Dark theme (default) */
:root {
    /* Fonts */
    --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-mono: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
    --font-size: 1.15rem;
    --line-height: 1.5;

    /* Borders */
    --border-radius: 1rem;
    --border-radius-small: 0.5rem;

    /* Dark mode colors (default) */
    --color-background: #141729;
    --color-background-alt: #1e293b;
    --color-background-code: #1e293b;
    --color-text: #cbd5e1;
    --color-text-bright: #e2e8f0;
    --color-text-strong: #fff;
    --color-subtext: #94a3b8;
    --color-primary: #fff;
    --color-accent: #ffffff;
    --color-header-bg: rgba(0, 0, 0, 0.15); /* Dark mode header background */
}

/* Light mode toggle */
body.light-mode {
    --color-background: #f1f5f9;
    --color-background-alt: #fff;
    --color-background-code: #1e293b;
    --color-text: #334155;
    --color-text-bright: #1e293b;
    --color-text-strong: #020617;
    --color-subtext: #475569;
    --color-primary: #08639f;
    --color-accent: #000;
    --color-header-bg: rgba(0, 0, 0, 0.05); /* Lighter header for light mode */
}

/* ================================
   Global Styles
================================ */
* {
    margin: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
    font: var(--font-size)/var(--line-height) var(--font-sans);
    margin: 0 auto;
    height: 100%; 	
}



h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    color: var(--color-text-strong);
}

h1 { font-size: 2em; line-height: 1.25; margin-bottom: 2rem; }
h2 { margin: 2rem 0 1.5rem; }

p, ul, ol, li { margin-bottom: 1.5rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.5rem; }

a { color: var(--color-primary); text-decoration: none; }
strong { color: var(--color-text-strong); }

blockquote {
    margin: 1rem 0 2rem 1rem;
    padding: 0.6rem 1.5rem 0;
    border-left: 0.35rem solid var(--color-primary);
    font-style: italic;
}

pre {
    background-color: var(--color-background-code);
    font-family: var(--font-mono);
    font-size: 1rem;
    overflow: auto;
    border-radius: var(--border-radius-small);
    padding: 1.6rem 1.8rem 1.8rem;
    margin-bottom: 3rem;
}

:not(pre) > code {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--color-accent);
    font-weight: bold;
}

figure { margin: 2rem auto; text-align: center; }
figure img { max-width: 100%; height: auto; border-radius: var(--border-radius-small); }
figcaption { color: var(--color-subtext); font-size: 1rem; font-style: italic; text-align: center; padding-top: 0.5rem; }
header + figure { margin-top: 0; }

/* ================================
   Layout
================================ */
.content {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    max-width: 100rem;
    padding: 3rem 0;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.content > * { grid-column: 3 / span 8; }
.content > .full-width { grid-column: 2 / span 10; }

.content-inner {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
}
.content-inner > * { grid-column: 2 / span 8; }
.content-inner > .full-width { grid-column: 1 / -1; }

@media (max-width: 1024px) { body { font-size: 1.125rem; } }
@media (max-width: 768px) {
    .content { padding: 1rem 5vw; margin-bottom: 0; }
    .content > * { grid-column: 2 / span 10; }
    .content > .full-width { grid-column: 1 / -1; }
    .content-inner { grid-template-columns: repeat(12, 1fr); }
}
@media (max-width: 480px) { .content > *, .content-inner > * { grid-column: 1 / -1; } }

/* ================================
   Cards & Notes
================================ */
.card { position: relative; margin-bottom: 3rem; padding: 1.25rem 0 2.75rem; }
.card-background {
    background-color: var(--color-background-alt);
    border-radius: var(--border-radius);
    position: absolute;
    width: calc(100% + 10vw);
    height: 100%;
    inset: 0;
    margin-left: -5vw;
}
.card-content { position: relative; }

.note {
    background-color: var(--color-background-alt);
    border-radius: var(--border-radius);
    padding: 1.5rem 2rem;
    margin: 0.5rem 0 2rem;
    font-size: 1rem;
}
.note-header { margin-bottom: 0.75rem; }

/* ================================
   Header & Navigation
================================ */
.site-header { padding: 1rem 5vw;   background-color: var(--color-header-bg);}
.site-nav { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; margin: 0 auto; }

.logo-container { display: flex; align-items: center; gap: 0.5rem; }
.site-nav .logo {
    color: var(--color-accent);
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    padding: 1.5rem 0;
}



.menu, .menu-social { display: flex; list-style: none; margin: 0; padding: 0; gap: 1rem; justify-content: center }
.menu li, .menu-social li { position: relative; }
.menu a, .menu-social a, #theme-toggle { display: flex; align-items: center; color: var(--color-text-bright); text-decoration: none; background: none; border: none; cursor: pointer; padding: 0.25rem; }
.menu a:hover, .menu-social a:hover, #theme-toggle:hover { color: var(--color-primary); }

#theme-toggle { font-size: 1.5rem; margin-left: 0.5rem; }

.submenu { display: none; position: absolute; top: 100%; left: 0; background: #333; padding: 0.5rem 0; flex-direction: column; }
.submenu li a { padding: 0.5rem 1rem; color: #fff; }
.menu li:hover > .submenu { display: block; }

.menu-toggle { display: none; font-size: 2rem; background: none; border: none; color: var(--color-text-bright); cursor: pointer; }

/* ================================
   Mobile
================================ */
@media (max-width: 768px) {
    .menu, .main-menu, .menu-social { display: none; flex-direction: column; width: 100%; }
    .menu.active, .main-menu.active, .menu-social.active { display: flex; }
    .menu-toggle, #theme-toggle { display: block; margin: 0.2rem; }
    .main-menu li, .menu-social li { width: 100%; text-align: center; border-bottom: 1px solid var(--color-subtext); }
    .main-menu li:last-child, .menu-social li:last-child { border-bottom: none; }
    .submenu { display: none; width: 100%; background: #444; }
    .submenu.active { display: flex; }
    .menu-social { justify-content: center; gap: 0.5rem; margin-top: 1rem; }
}

/* ================================
   Hero
================================ */
.hero { display: flex; text-align: center; margin-bottom: 4rem; max-width: 100%; }
.hero img { border-radius: 50%; max-width: 250px; margin: 0 auto; display: block; }
@media (max-width: 1024px) { .hero { flex-direction: column-reverse; } .hero img { max-width: 250px; } }

/* ================================
   Footer
================================ */
.site-footer {
    max-width: 65rem;
    padding: 3rem 5vw 2rem;
    margin: 0 auto;
    text-align: center;
}
.site-footer p { color: var(--color-subtext); font-size: 1rem; margin-bottom: 1rem; }
.site-footer .menu { justify-content: center; gap: 1rem; }
.site-footer .menu a { padding: 0.5rem; }
.site-footer .menu-footer { display: flex; justify-content: center; gap: 1.5rem; list-style: none; margin: 0 0 0 0; padding: 0; transform: translateX(0);flex-direction: row; }
.site-footer .menu-footer li a, .site-footer #theme-toggle { display: flex; align-items: center; padding: 0.25rem; color: var(--color-text-bright); background: none; border: none; cursor: pointer; }
.site-footer .menu-footer li a:hover, .site-footer #theme-toggle:hover { color: var(--color-primary); }
@media (max-width: 768px) { .site-footer .menu-footer { transform: translateX(0); margin-top: 1rem; } }



/* ================================
   Blog / Posts
================================ */
.posts { margin-top: 1rem; }
.post-preview { margin-bottom: 1rem; background-color: var(--color-background-alt); padding: 25px; border-radius: 25px; }
.post-date, .single-date { color: var(--color-subtext); display: block; font-size: 1rem; font-style: italic; }

.single-header { max-width: 100%; margin-bottom: 3rem; }
.single-title { margin-bottom: 1rem; }


/* ================================
   Lab Single Page Styles
================================ */
/* Lab Single Page Styles */
.lab-single {
  max-width: 125rem; /* wider for more comfortable reading */
  margin: 2rem auto;
  padding: 0 1.5rem;
  font-family: var(--font-body, system-ui, sans-serif);
  line-height: 1.6;
  color: var(--color-text);
  /*background-color: var(--color-background-alt);*/
  border-radius: 8px;
  padding: 2rem;
}

.lab-single h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-text-strong);
}

.lab-meta {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: var(--color-subtext);
}

.lab-meta p {
  margin: 0.3rem 0;
}

/*
.lab-badge {
  display: inline-block;
  background-color: var(--color-subtext);
  color: var(--color-text-bright);
  padding: 0.25rem 0.6rem;
  border-radius: 5px;
  font-size: 0.85rem;
  margin-right: 0.3rem;
}
  */

.lab-content {
  margin-top: 1.5rem;
  color: var(--color-text);
}

.lab-single hr {
  border: none;
  border-top: 1px solid var(--color-subtext);
  margin: 2rem 0;
}



/* Lightbox overlay */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  border-radius: 8px;
}