/* General Reset */
body, h1, h2, p, ul, li, a {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background-color: #000000;
    padding: 0;
    margin: 0;
}

/* Header and Navigation */
header {
    background-color: #0057ff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #ffd700;
}

/* Main Content */
main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

main h1 {
    color: #0057ff;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

main h2 {
    color: #00b7eb;
    font-size: 1.8rem;
    margin: 1.5rem 0 1rem;
}

main p {
    margin-bottom: 1rem;
    line-height: 1.8;
    font-size: 1rem;
}

main a {
    color: #0057ff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

main a:hover {
    color: #003bbd;
}

/* Image Styling and Layout */
main img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
    margin: 1rem 0;
}

/* Specific image sizing classes */
.img-small {
    max-width: 250px;
}

.img-medium {
    max-width: 400px;
}

.img-large {
    max-width: 550px;
}

.img-extra-large {
    max-width: 700px;
}

/* Image positioning classes */
.img-left {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.img-right {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

.img-center {
    display: block;
    margin: 1.5rem auto;
}

/* Content containers for better text flow around images */
.content-with-image {
    overflow: hidden; /* Clearfix for floating images */
    margin-bottom: 2rem;
}

.content-with-image::after {
    content: "";
    display: table;
    clear: both;
}

/* Additional spacing for sections with images */
section {
    margin-bottom: 2rem;
}

/* Footer */
footer {
    background-color: #0057ff;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
    font-size: 0.9rem;
    clear: both; /* Ensure footer clears floating images */
}

/* Form Styles */
form {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

form label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

form input,
form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

form input:focus,
form textarea:focus {
    outline: none;
    border-color: #0057ff;
    box-shadow: 0 0 5px rgba(0, 87, 255, 0.5);
}

form button {
    background: #0057ff;
    color: white;
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button:hover {
    background: #003bbd;
}

h1, h2, h3, nav, footer, .callout {
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.03em;
}

/* Body text stays readable */
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}


nav ul {
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  white-space: nowrap;
  flex-wrap: nowrap;
  padding-bottom: .25rem;                 /* avoid clipping shadow */
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;                  /* Firefox hide */
}
nav ul::-webkit-scrollbar { display: none; }  /* WebKit hide */

nav a {
  display: inline-block;
  padding: .6rem .9rem;
  border-radius: 9999px;
  background: transparent;
  box-shadow: none;
  scroll-snap-align: start;
  transition: box-shadow .18s ease, background .18s ease, color .18s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Hover/focus */
nav a:hover { background: rgba(255,255,255,.06); }
nav a:focus-visible {
  outline: 2px solid #00b7eb;
  outline-offset: 2px;
  border-radius: 9999px;
}

/* Active tab (use aria-current="page" or .active) */
nav a[aria-current="page"],
nav a.active {
  color: #fff;
  background: rgba(255,255,255,.06);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.16),
    0 0 14px rgba(0,183,235,.35),
    inset 0 0 0 1px rgba(255,255,255,.06);
}

/* Mobile readability */
@media (max-width: 768px) {
  header { position: sticky; top: 0; }

  main {
    padding: 1.25rem 1rem 2.5rem;
  }

  h1 {
    font-size: clamp(1.4rem, 4.5vw + 1rem, 2rem);
  }

  h2 {
    font-size: clamp(1.1rem, 3vw + .8rem, 1.4rem);
  }

  p {
    line-height: 1.75;
    font-size: 0.95rem;
  }

  /* Mobile nav: horizontal scroll pills */
  nav ul {
    display: flex;
    flex-wrap: nowrap;
    gap: .6rem;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: .25rem;
    margin: 0;
    list-style: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }
  
  nav li { flex: 0 0 auto; }
  nav a { font-size: 0.95rem; }

  /* Center all images and remove floats */
  .img-left,
  .img-right {
    float: none;
    margin: 1rem auto;
    display: block;
  }

  /* Adjust image sizes for mobile */
  .img-medium { max-width: 280px; }
  .img-large { max-width: 320px; }
}

.logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #003bbd; /* deep blue to blend with header */
  padding: 0.3rem;
  border-radius: 9999px; /* pill/circle */
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.logo-link img {
  display: block;
  height: 40px; /* adjust as needed */
}

.logo-link:hover {
  background: #002f94; /* slightly darker on hover */
  box-shadow: 0 0 10px rgba(0, 183, 235, 0.4);
}

/* --- Logo pill --- */
nav .logo-item { margin-right: .4rem; }

nav a.logo-link {
  /* override default nav pill styles */
  padding: 0;
  background: none;
  box-shadow: none;
  border-radius: 9999px;          /* pill */
  overflow: hidden;                /* CLIPS the black image corners */
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* tasteful blue frame around the logo */
  background: linear-gradient(135deg, #003bbd, #0057ff);
  padding: 4px;                    /* ring thickness */
  transition: transform .06s ease, box-shadow .18s ease, filter .18s ease;
}

nav a.logo-link:hover {
  box-shadow:
    0 0 12px rgba(0,183,235,.35),
    inset 0 0 0 1px rgba(255,255,255,.08);
  filter: saturate(1.06);
}

nav a.logo-link:active { transform: translateY(1px); }

/* control logo size without stretching */

/* keep other nav pills as-is */
nav a:not(.logo-link) { padding: .6rem .9rem; }

/* mobile tweak: don’t let it dominate */
@media (max-width: 768px) {
  .logo-img { height: 38px; }
  nav .logo-item { margin-right: .2rem; }
}

/* Bigger logo + bigger pill */
:root{
  --logo-size: 60px;   /* image height inside the pill (try 64–72 if you want larger) */
  --logo-ring: 8px;    /* blue ring/padding thickness around the image */
}

/* spacing so the big pill doesn't crowd the first tab */
nav .logo-item { margin-right: .8rem; }

/* the pill */
nav a.logo-link{
  padding: var(--logo-ring);
  border-radius: 9999px;
  overflow: hidden; /* keeps the square image clipped into the pill */
  background: linear-gradient(135deg,#003bbd,#0057ff);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset;
}

/* bigger image inside */
.logo-img{
  height: var(--logo-size);
  width: auto;
  display: block;
}

/* give the header enough vertical room for the taller pill */
header{ padding: 0.6rem 0; }
nav{ align-items: center; }

/* keep it sane on mobile */
@media (max-width: 768px){
  :root{
    --logo-size: 48px;
    --logo-ring: 6px;
  }
  nav .logo-item { margin-right: .5rem; }
}

.logo-img {
  display: block;
  height: 82px;                    /* slightly larger as requested (try 48px if you want bigger) */
  width: auto;
}

/* Give a bit of spacing before the first text tab */
nav .logo-item { margin-right: .8rem; }

/* Make the pill's ring thin so the image dominates */
nav a.logo-link {
  padding: 1px 2px; /* was 2px all around — less vertical padding */
  border-radius: 9999px;
  overflow: hidden;                        /* clips square corners of the black logo */
  background: linear-gradient(135deg, #003bbd, #0057ff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Force the logo to be larger inside the pill */
nav a.logo-link > img.logo-img {
  display: block;
  height: 62px !important;                 /* adjust: 72–120px depending on taste */
  width: auto !important;
  max-width: none !important;              /* prevents earlier rules from shrinking it */
}

header {
  padding: 0.2rem 0;   /* was 0.8rem 0 */
}

/* Logo pill */
nav a.logo-link {
  padding: 1px;        /* very thin ring so the image fills more */
}

/* Logo image bigger relative to pill */
nav a.logo-link > img.logo-img {
  height: 70px;        /* try 68–74px until it looks right */
  width: auto;
}

.logo-link {
  overflow: hidden;
  border-radius: 9999px;
}

/* Zoom the image inside the pill */
.logo-link img.logo-img {
  height: 80px;         /* a bit larger than pill */
  width: auto;
  transform: scale(0.8);  /* zoom in */
  object-fit: cover;       /* crop to fit */
}

/* --- FINAL OVERRIDES: tighter pill, real zoom, hover --- */

/* Leaner header */
header { padding: .4rem 0; }

/* Tight pill: no padding; ring via box-shadow so it doesn't stretch */
nav a.logo-link{
  padding: 0 !important;
  border-radius: 9999px;
  overflow: hidden;
  background: #003bbd;                 /* underlay for any cropped edges */
  box-shadow: 0 0 0 2px #0057ff;       /* ring that doesn't change size */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 68px;                        /* pill height */
}

/* Zoom/crop the image inside the pill */
nav a.logo-link .logo-img{
  height: 100%;
  width: auto;
  display: block;
  object-fit: cover;
  transform: scale(1.8);              /* content “zoom” */
  transform-origin: center;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

/* If the artwork looks a bit left-heavy, nudge it slightly */
nav a.logo-link .logo-img { transform: translateX(-4%) scale(1.18); }

/* Hover effect: subtle glow + extra zoom */
nav a.logo-link:hover{
  box-shadow:
    0 0 0 2px #00b7eb,
    0 0 14px rgba(0,183,235,.35);
}
nav a.logo-link:hover .logo-img{
  transform: translateX(-4%) scale(1.28);
  filter: saturate(1.08) contrast(1.02);
}

/* Force logo image to be centered inside pill */
nav a.logo-link .logo-img {
  height: 100%;
  width: auto;
  display: block;
  object-fit: cover;

  /* zoom + shift left */
  transform: translateX(-8%) scale(1.18);
  transform-origin: center;
  transition: transform .18s ease, filter .18s ease;
}

/* On hover, zoom a bit more but keep same left shift */
nav a.logo-link:hover .logo-img {
  transform: translateX(-8%) scale(1.28);
  filter: saturate(1.08) contrast(1.02);
}

nav a.logo-link{
  padding: 0 !important;
  height: 56px;
  border-radius: 9999px;
  overflow: hidden;
  background: #003bbd;
  box-shadow: 0 0 0 2px #0057ff; /* ring without extra width */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Zoom + shift the image RIGHT (since it previously moved left) */
nav a.logo-link .logo-img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: translateX(8%) scale(1.18) !important; /* <- flip sign if needed */
  transform-origin: center;
  transition: transform .18s ease, filter .18s ease;
}

/* Hover: keep same shift, add a touch more zoom + glow */
nav a.logo-link:hover{
  box-shadow:
    0 0 0 2px #00b7eb,
    0 0 14px rgba(0,183,235,.35);
}
nav a.logo-link:hover .logo-img{
  transform: translateX(8%) scale(1.28) !important;
  filter: saturate(1.08) contrast(1.02);
}

/* Slightly lighter on small screens */
@media (max-width: 768px){
  nav a.logo-link{ height: 56px; }
  nav a.logo-link .logo-img{
    transform: translateX(6%) scale(1.14) !important;
  }
}

@media (max-width: 768px){
  /* Replace the flex scroller with a grid */
  nav ul{
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: .5rem .5rem;
    justify-items: center;
    align-items: center;

    /* kill the horizontal scroll behavior */
    overflow: visible !important;
    white-space: normal !important;
    padding-bottom: 0 !important;
    margin: 0;
  }

  /* Center the logo in top-middle cell */
  nav ul li.logo-item{
    grid-column: 2;
    grid-row: 1;
  }

  /* Ensure each item centers nicely */
  nav ul li{
    display: flex;
    justify-content: center;
  }

  /* Tighter pills on mobile so they fit cleanly */
  nav a{
    padding: .5rem .7rem;
    font-size: 0.95rem;
  }

  /* Keep the logo pill slim vertically (matches your latest sizing) */
  nav a.logo-link{
    height: 56px;         /* adjust if you want even slimmer */
    padding: 0 !important; /* ring handled by box-shadow already */
  }

  /* Maintain your logo zoom + shift while respecting the slimmer pill */
  nav a.logo-link .logo-img{
    height: 100%;
    width: auto;
    object-fit: cover;
    transform: translateX(6%) scale(1.14) !important;  /* your current mobile tweak */
  }
}

@media (max-width: 768px){
  /* Switch to grid and disable the old scroller */
  nav ul{
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    gap: .5rem;
    overflow: visible !important;
    white-space: normal !important;
    scroll-snap-type: none !important;
    -webkit-overflow-scrolling: auto !important;
    padding-bottom: 0 !important;
    margin: 0;
  }

  /* Let items actually shrink inside grid cells */
  nav ul, nav ul li, nav ul li > a { min-width: 0 !important; }

  /* Center the logo in the top-middle cell */
  nav ul li.logo-item{
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
  }

  /* Pill tweaks so long labels fit without horizontal scroll */
  nav ul li{
    display: flex;
    justify-content: center;
    align-items: center;
  }
  nav ul li > a{
    display: block;
    text-align: center;
    white-space: normal;      /* allow wrap (e.g., “Core Theory”) */
    line-height: 1.15;
    padding: .5rem .6rem;     /* slightly tighter for small screens */
    font-size: .95rem;
  }

  /* Keep your slimmer logo pill + zoom */
  nav a.logo-link{
    height: 56px;
    padding: 0 !important;
  }
  nav a.logo-link .logo-img{
    height: 100%;
    width: auto;
    object-fit: cover;
    transform: translateX(6%) scale(1.14) !important;
  }
}

@media (max-width: 768px){

  /* Kill the old flex scroller completely */
  header nav, header nav * { scroll-snap-type: none !important; }
  header nav ul {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: auto;
    gap: .5rem !important;
    width: 100% !important;
    overflow: visible !important;
    white-space: normal !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
  }

  /* Allow shrinking inside cells */
  header nav ul, 
  header nav ul li, 
  header nav ul li > a {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* Center content inside each cell */
  header nav ul li {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
  header nav ul li > a {
    display: block !important;
    text-align: center !important;
    white-space: normal !important;   /* lets "Core Theory" wrap */
    line-height: 1.15 !important;
    padding: .5rem .6rem !important;  /* tighter pills */
    font-size: .95rem !important;
  }

  /* Explicit placement: 
     1: logo, 2: Background, 3: Core Theory, 4: History, 5: Uses, 6: Praxis */
  header nav ul li:nth-child(1) { grid-column: 2; grid-row: 1; } /* logo center top */
  header nav ul li:nth-child(2) { grid-column: 1; grid-row: 1; } /* Background */
  header nav ul li:nth-child(3) { grid-column: 3; grid-row: 1; } /* Core Theory */
  header nav ul li:nth-child(4) { grid-column: 1; grid-row: 2; } /* History */
  header nav ul li:nth-child(5) { grid-column: 2; grid-row: 2; } /* Uses */
  header nav ul li:nth-child(6) { grid-column: 3; grid-row: 2; } /* Praxis */

  /* Slim logo pill on mobile stays intact */
  header nav a.logo-link{
    height: 56px !important;
    padding: 0 !important;
  }
  header nav a.logo-link .logo-img{
    height: 100% !important;
    width: auto !important;
    object-fit: cover !important;
    transform: translateX(6%) scale(1.14) !important;
  }
}

@media (max-width: 768px){
  /* Make sure the pill itself is centered in its grid cell */
  header nav ul li.logo-item { justify-self: center !important; }

  /* Tighter zoom + small left nudge so text doesn't bleed right */
  header nav a.logo-link .logo-img{
    height: 100% !important;
    width: auto !important;
    max-width: none !important;
    object-fit: cover !important;

    /* was translateX(6%) scale(1.14); now pull left and reduce zoom */
    transform: translateX(-2%) scale(1.10) !important;
    transform-origin: center;
  }
}

/* === FINAL OVERRIDES: header/nav sizing === */
header { padding: .25rem 0 !important; }          /* slimmer header bar */
nav a:not(.logo-link) { padding: .5rem .8rem !important; }  /* slightly slimmer pi

/* === FINAL OVERRIDES: logo pill === */
nav a.logo-link{
  height: 52px !important;      /* was ~56–68 in places → slimmer */
  padding: 0 !important;
  border-radius: 9999px;
  overflow: hidden;
  background: #003bbd;          /* underlay for cropped edges */

  /* Outline (ring) + subtle inner stroke */
  box-shadow:
    0 0 0 2px #0057ff,          /* blue outer ring */
    inset 0 0 0 1px rgba(255,255,255,.12); /* faint inner line */
}

nav a.logo-link .logo-img{
  height: 100% !important;
  width: auto !important;
  object-fit: cover;

  /* keep the tasteful crop/zoom but a hair gentler */
  transform: translateX(6%) scale(1.12) !important;
  transform-origin: center;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

nav a.logo-link:hover{
  box-shadow:
    0 0 0 2px #00b7eb,
    inset 0 0 0 1px rgba(255,255,255,.18),
    0 0 14px rgba(0,183,235,.35);
}

@media (max-width:768px){
  nav a.logo-link{ height: 48px !important; }     /* extra-slim on mobile */
}

nav ul { align-items: center !important; padding-bottom: 0 !important; }

nav ul li.logo-item { align-self: center !important; }
