/* ==========================================
   1. Global Resets & Scaled Viewport Baseline
   ========================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

@media (max-width: 639px) {
  html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
  }

  #scaled-wrapper {
    width: 640px;
    transform: scale(calc(100vw / 640px));
    transform-origin: top left;
  }
}

html, body {
  margin: 0;
  padding: 0;
  font-size: 22px;
  scroll-padding-top: 100px; 
  scroll-behavior: smooth;
  line-height: 1.5;
}

/* ==========================================
   2. Header & Branding
   ========================================== */

header {
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: center;
  background: linear-gradient(180deg, rgba(130,58,0,1) 0%, rgba(0,0,0,1) 100%);
  overflow: hidden; 
}

#logo {
  display: block; /* Fixes inline baseline shift */
  text-decoration: none;
  color: #ffee99;
  font-size: 42px;
  height: 100px;
  line-height: 100px; /* Vertically centers text inside the 100px block */
  text-align: center;
  /* Stacked shadows merged into a single comma-separated rule */
  text-shadow: -1px -1px 2px #eeff99, 1px 1px 2px black;
}

/* 
  Desktop Header Rules (>= 640px):
  Ensures margin clearance is ALWAYS present on desktop.
*/
@media (min-width: 640px) {
  /* Reserves 100px for fixed header layer + 30px breathing space above h1 */
  #main-tagline {
    margin-top: 130px !important;
  }

  @supports (animation-timeline: scroll()) {
    header {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100px;
      z-index: 10;
      animation-name: ScrollAnimation;
      animation-timeline: scroll();
    }
    
    .breadcrumb {
      padding-top: 108px;
    }

    @keyframes ScrollAnimation {
      from {
        top: 0px;
      }
      to {
        top: -100px;
      }
    }
  }
}

/* ==========================================
   3. Main Content & Grid Layout
   ========================================== */

#main-tagline {
  padding: 0;
  margin: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-indent: 0px;
  font-weight: normal;
}

section p {
  font-size: min(1.1em, 5.0vw);
}

.summary {
  column-gap: 25px;
  margin: 8px;
  margin-bottom: 20px;
  font-size: 24px;
  display: grid;
  grid-template-columns: minmax(0, 480px) 1fr;
}

.summary .sidebar-nav {
  grid-column: 1;
}

.summary .bub-format {
  background: #d3ecbc;
  padding: 20px;
  border-radius: 25px;
  height: fit-content; /* Prevents card from stretching past internal content */
}

.summary > nav ol > li > .like-logo {
  text-decoration: none;
  color: #cc6633;
  line-height: 100px;
}

.summary .auto-img {
  width: min(100%, 480px);
  height: auto;
  margin: auto;
  display: block;
}

.summary nav ol > li > a {
  line-height: 40px;
} 

/* --- Main Column Layout --- */

.summary > .main-col {
  grid-column: 2; /* Pinned to column 2 even without sidebar-nav */
  margin: 20px;
  font-size: 24px;
}

.summary > .main-col p {
  font-size: min(1.1em, 6.0vw);
}

/* ==========================================
   4. Article Grid / Bubbles
   ========================================== */

.bubbles > article p {
  font-size: min(1.1em, 6.0vw);
}

.bubbles {
  display: grid;
  gap: 32px;
  justify-content: center;
  margin: 20px;
  grid-template-columns: 1fr 1fr 1fr;
}

.bubbles > article {
  padding: 20px;
  border: 2px solid silver;
  border-radius: 25px;
}

@media screen and (max-width: 1520px) {
  .bubbles {
    grid-template-columns: 1fr 1fr;
  }
}   


@media screen and (max-width: 1023px) {
  .bubbles {
    grid-template-columns: 1fr;
  }
  
  .summary { 
    grid-template-columns: 1fr;
  }

  /* Matching selector specificity (0,2,0) so mobile layout wins over desktop */
  .summary > .sidebar-nav,
  .summary > .main-col,
  .summary > * {
    grid-column: 1 / -1;
  }
}


/* ==========================================
   5. Typography, Links & Navigation Elements
   ========================================== */

a[emoji] {
  line-height: 50px;
}

a[emoji]::before {
  content: "\1F449"; /* Unicode for 👉 */
}

a {
  text-decoration: none;
  color: #010a7d;
}

a:hover {
  text-decoration: underline;
}

.breadcrumb {
  padding: 15px 3px 8px 8px;
  line-height: 30px;
  background: #eee;
  font-family: "Roboto", sans-serif;
}

.breadcrumb > ol {
  margin: 0;
  padding: 0;
}

.breadcrumb > ol > li {
  list-style-type: none;
  display: inline; 
}

.breadcrumb > ol > li::before {
  content: ' | ';
}

.breadcrumb > ol > li:first-child::before {
  content: '';
}

.breadcrumb a {
  margin: 30px 15px 0px 15px;
}

li.no-num {
  list-style-type: none;
}

#profile {
  float: left;
  margin-right: 10px;
}

.favicon img {
  margin: 3px;
  width: 32px;
  height: 32px;
  vertical-align: middle;
  object-fit: contain;
}

.favicon ~ hr {
  width: 25%;
  margin: 30px 0;
  clear: left;
}

/* ==========================================
   6. Footer
   ========================================== */

footer {
  background: linear-gradient(180deg, rgba(130,58,0,1) 0%, rgba(0,0,0,1) 100%);
  color: #ffffbb;
  text-indent: 30px;
  margin: 40px 0 0 0;
  height: 40px;
  padding: 0;
}

footer a {
  color: #ffffbb;
  line-height: 30px;
}

footer.bottom {
  position: fixed;
  bottom: 0;
  width: 100%;
  display: block;
  margin: 50px 0 0 0;
}
