@import 'var.css';

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Roboto Mono Regular'), local('RobotoMono-Regular'),
       url('./assets/fonts/roboto_mono/static/RobotoMono-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Roboto Mono Bold'), local('RobotoMono-Bold'),
       url('./assets/fonts/roboto_mono/static/RobotoMono-Bold.ttf') format('truetype');
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: #000;
  color: #fff;
  line-height: 1.6;
}
header {
  height: 6rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #0c0c0c;
  padding: 0 1.5rem;
  z-index: 1000;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom: 0.0625rem solid #2a2a2a;
  box-shadow: 0 0.5rem 0.5rem rgba(0, 0, 0, 0.4);
}
/* Fallback for .header-content gap */
.header-content > *:not(:last-child) {
  margin-right: 1rem;
}
.header-content {
  display: flex;
  align-items: center;
}
/* Fallback for .logo-with-name gap */
.logo-with-name > *:not(:last-child) {
  margin-right: 1rem;
}
.logo-with-name {
  display: flex;
  align-items: center;
}
.logo {
  height: 2rem;
  width: auto;
}
.logo-text {
  font-size: 1.3em;
  font-weight: bold;
  color: #D2232A;
  letter-spacing: 0.0625rem;
  text-decoration: none;
}
.title {
  font-size: 1.3em;
  font-weight: bold;
  color: #FFF;
  margin: 1rem 0;
  letter-spacing: 0.0625rem;
}
.sections-container {
  height: 100vh;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  padding-top: 6rem;
  scroll-padding-top: 6rem;
  box-sizing: border-box;
}
.scroll-snap-section {
  min-height: calc(100vh - 6rem);
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  text-align: center;
  position: relative;
  padding: 2vh 22vw;
}
.section-content {
  max-width: 60rem;
  width: 100%;
  padding: 2rem;
  box-sizing: border-box;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
  background-color: #1a1a1a;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.scroll-snap-section:not(.footer-snap):hover .section-content {
  transform: translateY(-0.5rem);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.5);
}
.section-content h2 {
  font-size: 1.5em;
  margin-bottom: 1rem;
  color: #FFF;
  font-weight: 700;
  border-bottom: 0.0625rem solid #333;
  padding-bottom: 1rem;
}
.section-content p {
  font-size: 1.1em;
  color: #ccc;
  padding-top: 1rem;
}
.learn-more {
  display: inline-block;
  background-color: #4CAF50;
  background-color: #b01c20;
  color: #fff;
  padding: 0.5rem 1.5rem;
  font-size: 1em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
  box-shadow: 0 0.5rem 0.5rem rgba(0, 0, 0, 0.3);
}
.learn-more:hover {
  background-color: #b01c20;
  transform: translateY(-0.5rem);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
}
.read-article-btn {
  display: inline-block;
  color: #D2232A;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 700;
  transition: color 0.3s ease, text-decoration 0.3s ease;
  padding: 0.5rem 0;
  background: none;
  border: none;
}
.read-article-btn:hover {
  color: #ff4d52;
  text-decoration: underline;
  background: none;
}
#developer-logs {
  background-color: #000;
  font-family: 'Roboto Mono', monospace;
  text-align: center;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
}
#developer-logs .section-content {
  cursor: pointer;
  background-color: rgba(10, 10, 10, 0.9);
  box-shadow: 0 0 1rem rgba(210, 35, 42, 0.4), 0 0 0.5rem rgba(210, 35, 42, 0.2) inset;
  border-radius: 0.5rem;
  width: 100%;
  max-width: 90ch;
  text-align: left;
  margin: 0;
  border: 0.0625rem solid rgba(210, 35, 42, 0.3);
  position: relative;
  box-sizing: border-box;
}
#developer-logs .section-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom, transparent 0, transparent 0.0625rem, rgba(0, 0, 0, 0.1) 0.0625rem, rgba(0, 0, 0, 0.1) 0.125rem
  );
  pointer-events: none;
  opacity: 0.1;
  z-index: 1;
}
#developer-logs .terminal-line {
  display: block;
  margin-bottom: 1rem;
  line-height: 1.5;
  position: relative;
  z-index: 2;
}
#developer-logs .commit-hash {
  color: #a0a0a0;
  padding: 0.2em 0;
  font-weight: 700;
  font-size: 1em;
  max-width: calc(100vw - (20vw * 2) - 2em);
  display: flex;
  align-items: baseline;
  overflow-x: auto;
  scrollbar-width: none;
}
/* Hide horizontal scrollbar for .commit-hash */
#developer-logs .commit-hash::-webkit-scrollbar {
  display: none; /* This hides the scrollbar */
}
#developer-logs .commit-hash .prompt {
  color: #a0a0a0;
  font-weight: bold;
  margin-right: 0.5rem;
}
#developer-logs .log-date {
  color: #D2232A;
  font-weight: 600;
  margin-right: 0.5rem;
  white-space: nowrap;
}
#developer-logs .log-id {
  color: #a0a0a0;
  cursor: pointer;
  text-decoration: underline dotted;
  transition: color 0.2s ease;
}
#developer-logs .log-id:hover {
    color: #ff4d52; /* Lighter red on hover */
}
#developer-logs .commit-message {
  color: #eceff4;
  font-size: 1em;
  margin-top: 0.5rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
          line-clamp: 3;
  -webkit-box-orient: vertical;
}
#developer-logs .greeting-message {
  color: #e0e6ff;
  margin-top: 2rem;
  margin-bottom: 2rem;
  line-height: 1.8;
  font-size: 1.1em;
  font-weight: 500;
  text-align: center;
  padding: 1rem 0;
  background: linear-gradient(to right, transparent, rgba(210, 35, 42, 0.3) 10%, rgba(210, 35, 42, 0.3) 90%, transparent);
  background-size: 100% 0.0625rem;
  background-position: 0 0, 0 100%;
  background-repeat: no-repeat;
  text-shadow: 0 0 0.5rem rgba(210, 35, 42, 0.7);
  box-sizing: border-box;
  overflow: unset;
  display: -webkit-box;
  -webkit-line-clamp: unset;
          line-clamp: unset;
  -webkit-box-orient: unset;
}
#developer-logs .cta-line {
  margin-top: 2rem;
  font-size: 1.1em;
}
#developer-logs .learn-more {
  margin-top: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: fit-content;
}
.log-badge {
  margin-left: 0.5rem;
  padding: 0.25em 1em;
  font-size: 0.8em;
  transform: translateY(-0.1em);
  font-weight: 500;
  text-decoration: none;
  color: #CCC;
  background-color: rgba(210, 35, 42, 0.05);
  border-radius: 18px;
  border: 0.03rem solid rgba(210, 35, 42, 0.15);
  box-shadow: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
 }
.log-badge:hover {
  color: #D2232A;
  background-color: rgba(210, 35, 42, 0.2);
  border-color: #D2232A;
  transform: translateY(-0.1rem);
  box-shadow: 0 0.05rem 0.15rem rgba(0, 0, 0, 0.2);
}
#log-boxes-wrapper {
    display: block;
    align-content: center;
    position: fixed;
    top: 6rem;
    right: 2vw;
    width: calc(50vw - 4vw - 45ch);
    height: calc(100vh - 10rem);
    padding-top: 2rem;
    min-width: 18vw;
    z-index: 1000;
    overflow-y: auto;
    pointer-events: none;
}
/* Fallback for .log-boxes-wrapper gap */
#log-boxes-wrapper > *:not(:last-child) {
  margin-bottom: 2rem; /* Applies for desktop layout */
}
.log-box {
    background-color: #0d0d0d; /* Even darker, almost black background */
    border: 1px solid rgba(210, 35, 42, 0.2); /* Very subtle, thin border */
    border-radius: 0.75rem; /* Consistent rounding */
    box-shadow: 0 0.8rem 2.5rem rgba(0, 0, 0, 0.6); /* Soft, prominent shadow, no inner glow for cleaner look */
    display: flex; /* Always flex for internal content layout */
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #e0e0e0; /* Softer white for text */
    font-family: 'Roboto Mono', monospace;
    line-height: 1.6; /* Improved readability for description */
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0.3s ease-out;
    opacity: 0;
    visibility: hidden;
    padding: 2rem;
    max-height: 90vh; /* Max height for individual box content, but wrapper handles main scroll */
    -webkit-overflow-scrolling: touch;
    position: relative; /* Needed for positioning the close button */
    pointer-events: all; /* Ensure clicks are caught by the boxes themselves */
        margin:auto;
}

/* Show/Hide States for individual log boxes */
.log-box.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0); /* Reset transform as it's within flex context */
}

.log-box.hide {
    opacity: 0;
    visibility: hidden;
}

/* Scrollbar Style for individual log boxes (optional, but good for aesthetics) */
.log-box::-webkit-scrollbar {
    width: 6px;
}
.log-box::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 10px;
}
.log-box::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}
.log-box::-webkit-scrollbar-thumb:hover {
    background: #444;
}


/* Close Button */
.log-box .close-log-box-btn { /* Changed from .close-popup-btn */
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.log-box .close-log-box-btn:hover {
    color: #D2232A;
    transform: rotate(90deg);
}

/* Title */
.log-box .log-box-title { /* Changed from .popup-title */
    color: #D2232A;
    font-size: 1.5em;
    font-weight: 700;
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Image */
.log-box .log-box-image { /* Changed from .popup-image */
    max-width: 90%;
    max-height: 25vh;
    height: auto;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.3rem 0.8rem rgba(0, 0, 0, 0.5);
    display: block; /* Ensure it respects width/height properly */
}

/* Description */
.log-box .log-box-description { /* Changed from .popup-description */
    font-size: 1em;
    line-height: 1.7;
    color: #c0c0c0;
    margin-bottom: 2rem;
    padding: 0 0.25rem;
}

/* Link(s) Container */
.log-box .log-box-links-container { /* Changed from .popup-links-container */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    align-items: center;
}

/* Individual Link Button */
.log-box .log-box-link { /* Changed from .popup-link */
    display: flex;
    justify-content: center;
    align-items: center;

    background-color: #1a1a1a;
    color: #eceff4;
    border: 1px solid rgba(210, 35, 42, 0.3);

    padding: 0.8rem 1.5rem;
    font-size: 0.9em;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 0.5rem;
    text-decoration: none;

    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
    box-shadow: 0 0.2rem 0.6rem rgba(0, 0, 0, 0.3);

    width: 85%;
    max-width: 20ch;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.log-box .log-box-link:hover {
    background-color: #282828;
    border-color: #D2232A;
    color: #D2232A;
    transform: translateY(-0.15rem);
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.4);
}
#knowledge-hub {
  background-color: #0d0d0d;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}
#knowledge-hub .section-content {
  text-align: center;
  width: 100%;
  max-width: 88rem;
  background-color: #1a1a1a;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
  box-sizing: border-box;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
#knowledge-hub .section-content h2 {
  font-size: 2.5em;
  font-weight: 700;
  color: #4CAF50;
  letter-spacing: 0.05em;
  margin-top: 0;
  margin-bottom: 0.5rem;
  padding-bottom: 0;
  border-bottom: none;
  text-shadow: 0 0 0.5rem rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
}
#knowledge-hub .section-content p {
  font-size: 1.15em;
  line-height: 1.7;
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  color: #c0c0c0;
  padding-top: 0;
}
#knowledge-hub .learn-more {
  background-color: #4CAF50;
}
#knowledge-hub .learn-more:hover {
  background-color: #4CAF50;
}
/* Fallback for .article-teasers gap */
.article-teasers > *:not(:last-child) {
  margin-right: 2rem; /* Applies for desktop layout */
}
.article-teasers {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
  padding: 0;
  width: 100%;
}
.teaser-item {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  background-color: #2a2a2a;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 0.5rem 0.5rem rgba(0, 0, 0, 0.5);
  flex-basis: calc(33.333% - 1rem);
  box-sizing: border-box;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  word-break: break-word;
  overflow-wrap: break-word;
}
.teaser-item:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.6);
}
.teaser-item .article-content-flex-grow {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allow this wrapper to take up available space */
    justify-content: flex-start; /* Align content to the top */
}
.teaser-item h3 {
  color: #FFF;
  font-size: 1.3em;
  margin-top: 0;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  word-wrap: break-word;
}
.teaser-item p {
  color: #ccc;
  font-size: 0.95em;
  line-height: 1.6;
  padding-top: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}
.teaser-item .read-article-btn {
  display: block;
   width: fit-content;
  color: #4CAF50;
  font-size: 1.1em;
  margin: 0.5rem auto 0 auto;
}
footer.scroll-snap-section {
  min-height: 6rem;
  background-color: #000;
  padding: 2rem 1rem;
  border-top: 0.0625rem solid #1a1a1a;
  flex-shrink: 0;
}
/* Fallback for .footer-content gap */
.footer-content > *:not(:last-child) {
  margin-right: 1rem;
}
.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  font-size: 0.9em;
  color: #888;
}
footer a {
  color: #888;
  text-decoration: none;
  transition: color 0.3s ease;
}
footer a:hover {
  color: #fff;
  text-decoration: underline;
}
footer span {
  color: #888;
}
.flying-menu {
  position: fixed;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  padding: 0.5rem 0;
  display: none;
}
.flying-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.flying-menu li {
  margin-bottom: 0.5rem;
}
.flying-menu li:last-child {
  margin-bottom: 0;
}
.flying-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: rgba(160, 160, 160, 0.6);
  text-decoration: none;
  font-size: 0.85em;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: background-color 0.1s ease, color 0.1s ease, transform 0.1s ease;
  text-transform: uppercase;
  letter-spacing: 0.03125rem;
  white-space: nowrap;
}
.flying-menu a:hover {
  background-color: rgba(210, 35, 42, 0.1);
  color: #D2232A;
  transform: translateX(0.5rem);
}
.flying-menu a.active {
  background-color: rgba(210, 35, 42, 0.3);
  color: #D2232A;
  font-weight: 700;
  transform: translateX(0);
}
.flying-menu a.active-green {
  background-color: rgba(76, 175, 80, 0.3);
  color: #4CAF50;
  font-weight: 700;
  transform: translateX(0);
}
.products-section-content {
  width: 100%;
  max-width: calc(100vw - (22vw * 2));
}
.products-section-content h2 {
  font-size: 2.5em;
  font-weight: 700;
  color: #f0f0f0;
  letter-spacing: 0.05em;
  padding-bottom: 0;
  margin: 0;
  margin-bottom: 1rem;
  border-bottom: none;
  text-shadow: 0 0 0.5rem rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
}
/* Fallback for .product-grid gap in mobile media query */
.product-grid > *:not(:last-child) {
  margin-right: 5vw;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  margin-bottom: 2rem;
  box-shadow: 0 0 1rem rgba(210, 35, 42, 0.4), 0 0 0.5rem rgba(210, 35, 42, 0.2) inset;
  border-radius: 0.5rem;
  border: 0.0625rem solid rgba(210, 35, 42, 0.3);
  padding: 1rem 2rem;
}
.product-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.product-item a .product-img {
  max-width: 15vw;
  object-fit: fit-width;
  border-radius: 0;
  background-color: #000;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.7);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 1rem;
}
.product-item a .product-img:hover {
  transform: scale(1.02);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.8);
}
.product-item h3 {
  color: #FFF;
  font-size: 1.5em;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}
.product-item p {
  color: #b0b0b0;
  font-size: 0.9em;
  line-height: 1.4;
  margin-bottom: 1rem;
  flex-grow: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
          line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}
#products .learn-more {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: fit-content;
  padding: 0.5rem 1.5rem;
  font-size: 1em;
}
.product-item .read-article-btn {
  font-size: 0.9em;
}

@media (min-width: 2000px) {
  #log-boxes-wrapper {
      width: calc(50vw - 16vw - 45ch);
  }
}
@media (min-width: 1199px) {
  .flying-menu {
    display: block;
  }
  .product-item a .product-img {
    max-height: 50vh;
  }
  .sections-container {
    scroll-snap-type: y mandatory;
  }
  .scroll-snap-section {
    scroll-snap-align: start;
  }
  footer.scroll-snap-section {
    scroll-snap-align: end;
  }
  #developer-logs {
    scroll-snap-align: start;
  }
  #knowledge-hub {
    scroll-snap-align: start;
  }
  #products {
    scroll-snap-align: start;
  }
}

@media (max-width: 1200px) {
  html {
   overflow-y: scroll;
   webkit-overflow-scrolling: touch;
  }
  .flying-menu {
    display: none;
  }
  header {
    height: 4rem;
  }
  #log-boxes-wrapper {
    display: none;
  }
  .log-box {
    display: none;
  }
  .sections-container {
    height: unset;
    overflow-y: unset;
    padding-top: 4rem;
    scroll-padding-top: 4rem;
  }
  footer.scroll-snap-section {
    min-height: 4rem;
  }
  .logo-text {
    font-size: 1.1em;
  }
  .title {
    font-size: 1.1em;
  }
  .scroll-snap-section {
    padding: 4vh 10vw;
    min-height: calc(100vh - 4rem);   /* Fallback for older browsers */
  }
  #developer-logs .commit-hash {
    max-width: calc(100vw - (8vw * 2) - 2em);
  }
  #developer-logs .terminal-line {
    font-size: 0.9em;
  }
  #developer-logs .commit-message {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
            line-clamp: 4;
    -webkit-box-orient: vertical;
  }
  #developer-logs .greeting-message {
    font-size: 1.1em;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    overflow: unset;
    display: -webkit-box;
    -webkit-line-clamp: unset;
            line-clamp: unset;
    -webkit-box-orient: unset;
  }
  #knowledge-hub {
    box-sizing: border-box;
  }
  #knowledge-hub .section-content h2 {
    font-size: 1.5em;
  }
  #knowledge-hub .section-content p {
    margin-top: 1em;
  }
  /* Fallback for .article-teasers gap in mobile media query */
  .article-teasers > *:not(:last-child) {
    margin-bottom: 1rem; /* Column direction, so margin-bottom */
    margin-right: unset;
  }
  .article-teasers {
    flex-direction: column;
  }
  .teaser-item {
    flex-basis: calc(50% - 0.5rem);
  }
  .products-section-content {
    max-width: calc(100vw - (2.5vw * 2));
  margin: 1rem;
  }
  /* Fallback for .product-grid gap in mobile media query */
  .product-grid > *:not(:last-child) {
    margin-right: unset;
    margin-bottom: 2vh;
  }
  .product-grid {
    grid-template-columns: 1fr;
    margin-bottom: 1rem;
  }
  #products {
    padding: 0 2.5vw;
  }
  #products h2 {
    margin-bottom: 1rem;
  }
  .product-item {
    flex-direction: row;
  }
  .product-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .product-item a .product-img {
    padding: 0;
    max-width: 80%;
    width: auto;
  }
  .product-item h3 {
    font-size: 1.3em;
  }
  .product-item p {
    font-size: 0.85em;
    max-width: 90%;
    margin-bottom: 1rem;
    margin-left: 5vw;
    margin-right: 5vw;
  }
  #products .learn-more {
    padding: 0.5rem 1rem;
    font-size: 0.9em;
  }
}

@media (max-width: 800px) {
  .header-content {
    justify-content: space-between;
    width: 100%;
  }
  .log-entry-badges {
    gap: 0.3rem;
    margin-top: 0.75rem;
  }
  .log-badge {
   padding: 0.15em 0.4em;
   font-size: 0.7em;
   transform: translateY(-0.3em);
 }
  /* Fallback for .logo-with-name gap */
  .logo-with-name > *:not(:last-child) {
    margin-right: 1rem;
  }
  .logo-with-name {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
  }
  .title {
    font-size: 0.8em;
    display: flex;
    flex-direction: column;
    align-items: end;
  }
  .title-name {
    color: rgba(160, 160, 160, 0.6);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
            line-clamp: 1;
    -webkit-box-orient: vertical;
  }
  .title-description {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
            line-clamp: 1;
    -webkit-box-orient: vertical;
  }
  .title-delimiter {
    display: none;
  }
  .logo-text {
    font-size: 1em;
  }
  #developer-logs .commit-message {
    font-size: 1em;
  }
  .section-content {
    padding: 1.5rem;
  }
  .section-content h2 {
    font-size: 1.4em;
    padding-bottom: 0.5rem;
  }
  .section-content p {
    font-size: 1em;
    padding-top: 0.5rem;
  }
  #knowledge-hub .section-content {
    padding: 2rem 2rem;
  }
  /* Fallback for .footer-content gap in 800px media query */
  .footer-content > *:not(:last-child) {
    margin-right: 0.5rem; /* Specific gap for this breakpoint */
  }
  footer.scroll-snap-section {
    padding: 1rem 1rem;
  }
}

@media (max-width: 600px) {
  #developer-logs .terminal-line {
    font-size: 0.85em;
  }
  #developer-logs .commit-message {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
            line-clamp: 3;
    -webkit-box-orient: vertical;
  }
  #developer-logs .greeting-message {
    font-size: 1em;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    overflow: unset;
    display: -webkit-box;
    -webkit-line-clamp: unset;
            line-clamp: unset;
    -webkit-box-orient: unset;
  }
  #products h2 {
    padding: 0 1rem;
    font-size: 1.3em;
    margin-bottom: 1.5rem;
  }
  .product-item h3 {
    font-size: 1.5em;
  }
  .product-item p {
    font-size: 0.8em;
    margin-bottom: 1rem;
    max-width: 95%;
  }
  .product-item a .product-img {
    padding: 0 0;
    max-width: 80%;
    width: auto;
    padding: 0.5rem;
    margin-bottom: 1rem;
  }
  .product-item .read-article-btn {
    font-size: 0.8em;
  }
  #products .learn-more {
    margin-top: 2rem;
    padding: 0.5rem 1rem;
    font-size: 0.85em;
  }
  .footer-content > *:not(:last-child) {
    margin-bottom: 0.5rem; /* Apply vertical margin for column layout */
    margin-right: 0; /* Clear previous margin-right from broader scope */
  }
  .footer-content {
    flex-direction: column;
    font-size: 0.8em;
  }
}

@media (max-width: 400px) {
  #developer-logs .commit-message {
    font-size: 0.95em;
  }
  #developer-logs .greeting-message {
    font-size: 1em;
    margin-top: 1rem;
    align-item: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
  }
  .section-content {
    padding: 1rem;
  }
  .section-content h2 {
    font-size: 1.3em;
    padding-bottom: 0.5rem;
  }
  .section-content p {
    font-size: 0.95em;
    padding-top: 0.5rem;
  }
  footer.scroll-snap-section {
    padding: 1rem 1rem;
  }
}

@media (max-width: 350px) {
  .product-item h3 {
    font-size: 1em;
  }
  .product-item p {
    font-size: 0.75em;
    margin-bottom: 0.5rem;
  }
}