/* =========================================================
   Eric Mugao Portfolio â€” cleaned shared stylesheet
   ========================================================= */

/* ---------- Theme and base ---------- */
:root {
  --site-primary: #2459e0;
  --site-on-primary: #ffffff;
  --site-secondary: #12203a;
  --site-on-secondary: #ffffff;
  --site-background: #f3f6fc;
  --site-on-background: #17233b;
  --site-font-body: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --site-font-heading: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --site-heading-scale: 1;
  --site-spacing-scale: 1;
  --site-radius-scale: 1;
  --site-decoration-opacity: 1;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--site-font-body);
  background: light-dark(#f3f6fc, #101827);
  color: light-dark(#17233b, #eef3ff);
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app {
  display: flex;
  min-height: 100vh;
  background-color: light-dark(var(--site-background), #101827);
  color: light-dark(var(--site-on-background), #eef3ff);
}

/* ---------- Sidebar and navigation ---------- */
.sidebar {
  display: flex;
  flex: 0 0 244px;
  flex-direction: column;
  gap: 24px;
  width: 244px;
  padding: 24px 15px;
  color: var(--site-on-secondary);
  background: #12203a;
  transition: width 0.25s, padding 0.25s;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}

.brand-mark {
  display: block;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 25%;
}

.brand-name {
  font-weight: 750;
  letter-spacing: 0.2px;
}

.brand-sub {
  margin-top: 3px;
  font-size: 12px;
  opacity: 0.65;
}

.nav {
  display: grid;
  gap: 7px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  border-radius: 12px;
  color: #c6d1e6;
  transition: background 0.15s;
}

.nav a:hover,
.nav a.active {
  color: white;
  background: #ffffff19;
}

.nav .ico {
  width: 22px;
  text-align: center;
  font-size: 18px;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 8px;
  font-size: 12px;
  opacity: 0.7;
}

.mobile-menu {
  display: none;
}

/* ---------- Main content and shared headers ---------- */
.main {
  flex: 1;
  min-width: 0;
  margin-left: 0;
  padding: 28px clamp(18px, 4vw, 48px) 38px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
  padding: 10px 0;
  background: transparent;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid light-dark(#dce3f0, #2b3950);
  border-radius: 12px;
  background: light-dark(#fff, #172338);
  color: inherit;
  cursor: pointer;
  font-size: 20px;
}

.theme-toggle {
  width: auto;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: calc(27px * var(--site-heading-scale));
  letter-spacing: -0.8px;
}

.eyebrow {
  color: var(--site-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 13px 7px 7px;
  border: 1px solid light-dark(#dce3f0, #2b3950);
  border-radius: 99px;
  background: light-dark(#fff, #172338);
  font-size: 13px;
  font-weight: 650;
}

.avatar {
  display: block;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  object-fit: cover;
}

/* ---------- Dashboard hero and cards ---------- */
.intro {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  overflow: hidden;
  padding: clamp(23px, 4vw, 38px);
  border-radius: 22px;
  background: linear-gradient(120deg, #2459e0, #497cf1 58%, #7c9eff);
  color: white;
}

.intro::after {
  position: absolute;
  top: -110px;
  right: 7%;
  width: 230px;
  height: 230px;
  border: 42px solid #ffffff20;
  border-radius: 50%;
  content: "";
  pointer-events: none;
  opacity: var(--site-decoration-opacity);
}

.intro-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.intro h2 {
  margin: 10px 0 12px;
  font-size: calc(clamp(27px, 4vw, 40px) * var(--site-heading-scale));
  letter-spacing: -1.3px;
  line-height: 1.12;
}

.intro p {
  max-width: 570px;
  margin: 0;
  color: #e7edff;
  line-height: 1.65;
}

.intro .mini-label {
  color: #e0e8ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 23px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.btn-light {
  background: white;
  color: #214fc4;
}

.btn-outline {
  border: 1px solid #ffffff80;
  background: #ffffff12;
  color: white;
}

.hero-symbol {
  position: relative;
  z-index: 1;
  margin-right: 3%;
  font-size: clamp(60px, 9vw, 105px);
  opacity: 0.95;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 30px 0 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.4px;
}

.section-head p {
  margin: 5px 0 0;
  color: light-dark(#72809a, #9eabc1);
  font-size: 13px;
}

.text-link {
  border: 0;
  background: none;
  color: var(--site-primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.widget-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.widget {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 166px;
  padding: 20px;
  border: 1px solid light-dark(#e0e6f1, #29364c);
  border-radius: 18px;
  background: light-dark(#fff, #172338);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s, border-color 0.18s;
}

.widget:hover {
  transform: translateY(-3px);
  border-color: #8aa7f8;
}

.widget-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.widget-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: light-dark(#edf2ff, #25365a);
  font-size: 20px;
}

.widget-arrow {
  color: light-dark(#8b98ad, #8796af);
}

.widget h3 {
  margin: 15px 0 5px;
  font-size: 16px;
}

.widget p {
  margin: 0;
  color: light-dark(#75829a, #a6b3c8);
  font-size: 12px;
  line-height: 1.5;
}

/* ---------- Panels, projects, tags, milestones ---------- */
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(250px, 1fr);
  gap: 16px;
}

.panel {
  padding: 21px;
  border: 1px solid light-dark(#e0e6f1, #29364c);
  border-radius: 18px;
  background: light-dark(#fff, #172338);
}

.project-list {
  display: grid;
  gap: 12px;
}

.project {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px;
  border: 1px solid light-dark(#edf0f6, #29364c);
  border-radius: 14px;
}

.project-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: light-dark(#edf2ff, #263757);
  font-size: 21px;
}

.project-info {
  flex: 1;
  min-width: 0;
}

.project-info h3 {
  margin: 0 0 5px;
  font-size: 14px;
}

.project-info p {
  margin: 0;
  color: light-dark(#75829a, #a6b3c8);
  font-size: 12px;
  line-height: 1.45;
}

.project .open {
  color: light-dark(#8491a7, #91a1bc);
  font-size: 19px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}

.tag {
  padding: 7px 9px;
  border-radius: 8px;
  background: light-dark(#f0f4fb, #202f47);
  color: light-dark(#53617b, #c1cce0);
  font-size: 11px;
  font-weight: 700;
}

.about-panel p {
  margin: 10px 0 16px;
  color: light-dark(#66758f, #b0bdd2);
  font-size: 13px;
  line-height: 1.7;
}

.contact-mini {
  display: grid;
  gap: 11px;
  padding-top: 15px;
  border-top: 1px solid light-dark(#e8edf5, #2b3950);
}

.contact-mini a {
  display: flex;
  align-items: center;
  gap: 9px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.contact-mini a span {
  color: var(--site-primary);
  font-size: 16px;
}

.section-panel {
  margin-top: 16px;
}

.milestone-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.milestone {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px;
  border: 1px solid light-dark(#edf0f6, #29364c);
  border-radius: 13px;
}

.milestone-mark {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: light-dark(#edf2ff, #263757);
}

.milestone h3 {
  margin: 1px 0 5px;
  font-size: 13px;
}

.milestone p {
  margin: 0;
  color: light-dark(#75829a, #a6b3c8);
  font-size: 12px;
  line-height: 1.55;
}

.cv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.cv-note {
  margin-top: 12px;
  color: light-dark(#75829a, #a6b3c8);
  font-size: 12px;
  line-height: 1.6;
}

.footer {
  padding-top: 28px;
  color: light-dark(#8793a8, #8797b0);
  font-size: 12px;
  text-align: center;
}

/* ---------- Portfolio showcase ---------- */
.showcase-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.showcase-controls button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--site-primary);
  border-radius: 50%;
  background: transparent;
  color: var(--site-primary);
  cursor: pointer;
  font-size: 18px;
}

.showcase-controls button:hover {
  background: var(--site-primary);
  color: white;
}

#showcase-counter {
  font-size: 13px;
  font-weight: 700;
}

.showcase-hint {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.75;
}

#portfolio-showcase {
  display: flex;
  align-items: center;
  height: 390px;
  min-height: 390px;
  overflow: hidden;
  box-sizing: border-box;
  background:
    linear-gradient(120deg, rgba(18, 32, 58, 0.78), rgba(18, 32, 58, 0.55)),
    url("https://raw.githubusercontent.com/ericmugao36/ericmugao36.github.io/main/images/picture.jpg") center 35% / cover no-repeat;
}

#portfolio-showcase[data-slide="edutrack"] {
  background:
    linear-gradient(120deg, rgba(18, 32, 58, 0.88), rgba(18, 32, 58, 0.25)),
    url("https://raw.githubusercontent.com/ericmugao36/ericmugao36.github.io/main/images/student.jpg") center / cover no-repeat;
}

#portfolio-showcase[data-slide="smp"] {
  background:
    linear-gradient(120deg, rgba(18, 32, 58, 0.88), rgba(18, 32, 58, 0.25)),
    url("https://raw.githubusercontent.com/ericmugao36/ericmugao36.github.io/main/images/gym.jpg") center / cover no-repeat;
}

#portfolio-showcase[data-slide="tools"] {
  background:
    linear-gradient(120deg, rgba(18, 32, 58, 0.88), rgba(18, 32, 58, 0.25)),
    url("https://raw.githubusercontent.com/ericmugao36/ericmugao36.github.io/main/images/laptop.jpg") center / cover no-repeat;
}

#showcase-title {
  display: -webkit-box;
  min-height: 2.4em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#showcase-description {
  display: -webkit-box;
  min-height: 6em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

/* ---------- EduTrack screenshot ---------- */
.edutrack-screenshots {
  width: 100%;
  margin-top: 16px;
}

.edutrack-screenshots img {
  display: block;
  width: 100%;
  max-height: 300px;
  border: 1px solid light-dark(#e0e6f1, #29364c);
  border-radius: 12px;
  background: light-dark(#f3f6fc, #101827);
  object-fit: contain;
  object-position: left center;
}

/* ---------- CV viewer ---------- */
.cv-viewer {
  width: 100%;
  max-width: 1100px;
  margin: 20px auto;
  overflow: hidden;
  border: 1px solid light-dark(#e0e6f1, #29364c);
  border-radius: 12px;
  background: light-dark(#f3f6fc, #101827);
}

.cv-viewer iframe {
  display: block;
  width: 100%;
  height: 900px;
  border: 0;
  background: white;
}

#cv .cv-viewer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 90%;
  height: calc(100vh - 125px);
  min-height: 350px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
}

#cv .cv-toolbar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

#cv .cv-pdf {
  display: block;
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: white;
}

/* ---------- Shop page header ---------- */
#cv .topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 110px;
  padding: 16px 24px;
  box-sizing: border-box;
  background: Canvas;
  color: CanvasText;
  border-bottom: 1px solid color-mix(in srgb, CanvasText 15%, transparent);
}

#cv .topbar .shop-heading {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 120px);
  min-width: 0;
  margin: 0;
  padding: 0;
  text-align: center;
  animation: shopHeadingIntro 0.8s ease-out both;
}


@keyframes shopHeadingIntro {
  from {
    opacity: 0;
    transform: translate(-50%, 16px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}



#cv .topbar .shop-heading h1 {
  margin: 0 0 8px;
  color: inherit;
}

#cv .topbar .shop-heading p {
  margin: 0;
  color: inherit;
}

#cv .topbar .top-left {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

#cv .shop-page {
  position: relative;
  display: block;
  width: 100%;
}

/* ---------- Blog article ---------- */
.full-blog-article {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 18px;
  padding: 20px;
  overflow-wrap: anywhere;
  border-top: 1px solid var(--site-border, #dbe2ee);
  line-height: 1.8;
  box-sizing: border-box;
}

.full-blog-article h1,
.full-blog-article h2,
.full-blog-article h3 {
  margin: 24px 0 12px;
  line-height: 1.3;
}

.full-blog-article h1 {
  font-size: 1.7rem;
}

.full-blog-article h2 {
  font-size: 1.35rem;
}

.full-blog-article h3 {
  font-size: 1.1rem;
}

.full-blog-article h4 {
  font-size: 1.05rem;
}

.full-blog-article p {
  margin: 12px 0;
}

.full-blog-article ul,
.full-blog-article ol {
  margin: 12px 0;
  padding-left: 26px;
}

.full-blog-article pre {
  max-width: 100%;
  padding: 14px;
  overflow-x: auto;
  border-radius: 8px;
  background: var(--site-background, #f3f6fc);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.full-blog-article code {
  overflow-wrap: anywhere;
}

.full-blog-article a {
  color: var(--site-primary, #2459e0);
  text-decoration: underline;
}
.full-blog-article img,
.full-blog-article video,
.full-blog-article iframe {
  max-width: 100%;
  height: auto;
}

.full-blog-article table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}


/* ---------- Single-file portfolio page views ---------- */
.page-view {
  display: none;
  min-width: 0;
  animation: pageFadeIn 0.2s ease;
}

.page-view.active-page {
  display: block;
}

.page-view[hidden] {
  display: none !important;
}

.page-view .content-grid {
  grid-template-columns: minmax(0, 1fr);
}

.page-view .about-panel {
  height: fit-content;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ---------- Sticky page heading component ---------- */
@media (min-width: 651px) {
  .page-sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    padding: 18px 24px;
    border-bottom: 1px solid color-mix(in srgb, CanvasText 15%, transparent);
    background: Canvas;
    color: CanvasText;
  }


  .page-sticky-header .page-heading {
    flex: 1;
    min-width: 0;
    margin-left: 48px;
    text-align: center;
  }

  .page-sticky-header .page-heading h1 {
    margin: 0 0 6px;
  }

  .page-sticky-header .page-heading p {
    margin: 0;
  }
}

/* ---------- Scroll reveal ---------- */
.scroll-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Desktop layout ---------- */
@media (min-width: 651px) {
  .app {
    display: block;
  }

    .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    width: 180px;
    max-width: 180px;
    height: 100vh;
    overflow-y: auto;
    box-sizing: border-box;
    flex: none;
  }

  .main {
    width: calc(100% - 180px);
    max-width: calc(100% - 180px);
    min-width: 0;
    margin-left: 180px;
    box-sizing: border-box;
  }

    /* Keep the theme toggle at the upper-right on laptop/desktop. */
  .main .topbar {
    position: fixed;
    top: 12px;
    right: 20px;
    left: auto;
    z-index: 1000;
    width: auto;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .main .top-left {
    justify-content: flex-end;
  }

}

/* ---------- Tablet and compact desktop ---------- */
@media (max-width: 1000px) {
  .widget-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero-symbol {
    margin-right: 0;
  }
}

/* ---------- Mobile layout ---------- */
@media (max-width: 650px) {
  .app {
    display: block;
  }


  .sidebar {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    overflow: visible;
    border-top: 1px solid #ffffff30;
    box-sizing: border-box;
    transform: none;
    transition: none;
  }

  .sidebar .nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  .sidebar .nav a {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 12.5%;
    max-width: 12.5%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 8px 0;
    box-sizing: border-box;
  }

  .sidebar .nav .ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    font-size: 20px;
    white-space: nowrap;
  }

   .sidebar .nav-label,
  .sidebar .sidebar-bottom {
    display: none !important;
  }

  /* The profile branding stays visible by default on mobile. */
  .sidebar .brand {
    position: fixed;
    top: 12px;
    right: 60px;
    left: 12px;
    z-index: 1002;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: light-dark(var(--site-on-background), #eef3ff);
    box-shadow: none;
    box-sizing: border-box;
  }

   .sidebar .brand-mark {
    display: block;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
  }

  .sidebar .brand-name,
  .sidebar .brand-sub {
    display: block;
    visibility: visible;
    white-space: normal;
  }

  .sidebar .brand-name {
    font-size: 14px;
  }

  .sidebar .brand-sub {
    font-size: 11px;
  }

    /* Theme control remains in the upper-right corner on mobile. */
  .theme-toggle,
  .topbar .profile-pill {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1003;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    box-sizing: border-box;
    background: light-dark(var(--site-background), #101827);
    color: light-dark(var(--site-on-background), #eef3ff);
    border-color: light-dark(#dce3f0, #2b3950);
  }

   .topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    min-height: 60px;
    margin: 0 0 20px;
    padding: 10px 12px;
    border-bottom: 1px solid light-dark(#dce3f0, #2b3950);
    background: light-dark(var(--site-background), #101827);
    color: light-dark(var(--site-on-background), #eef3ff);
    box-sizing: border-box;
  }

  .topbar h1 {
    font-size: 23px;
  }

  .profile-pill .profile-name {
    display: none;
  }

  .intro {
    padding: 25px 22px;
  }

  .hero-symbol {
    display: none;
  }

  .widget-grid {
    gap: 10px;
  }

   .widget {
    min-height: 150px;
    padding: 15px;
  }

  .panel {
    padding: 16px;
  }

  .section-head {
    margin-top: 24px;
  }

  .content-grid {
    gap: 12px;
  }

  main,
  .main-content {
    padding-bottom: 85px;
  }

  body {
    padding-bottom: 35px;
  }


   .cv-viewer {
    width: 100%;
    margin: 12px 0;
    border-radius: 8px;
  }

  .cv-viewer iframe {
    width: 100%;
    height: 65vh;
    min-height: 400px;
    max-height: 650px;
  }

  #cv .topbar {
    min-height: 100px;
    padding: 14px 12px;
    gap: 8px;
  }

  #cv .topbar .shop-heading h1 {
    font-size: 1.25rem;
  }

  #cv .topbar .shop-heading p {
    font-size: 0.85rem;
  }

  #portfolio-showcase {
    height: 500px;
    min-height: 500px;
  }

  .full-blog-article {
    padding: 12px 0;
  }

  .full-blog-article h1 {
    font-size: 24px;
  }

  .full-blog-article h2 {
    font-size: 20px;
  }

  body[data-page="projects"] .projects-page-content {
    padding-top: 80px;
  }

  /* Hide the profile picture and branding only on selected pages. */
  body:has(.main#cv) .sidebar .brand,
  body:has(.main#about) .sidebar .brand,
  body[data-page="projects"] .sidebar .brand {
    display: none !important;
  }


  /* Hide topbars on pages where a separate page heading is used. */
  body:has(.main#about) .topbar,
  body:has(.main#skills) .topbar,
  body:has(.main#learning) .topbar,
  body:has(.main#projects) .topbar {
    display: none;
  }

  /* Featured Projects: fixed and centered on phones */
  body[data-page="projects"] .mobile-page-title {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    margin: 0;
    padding: 12px 64px;
    color: light-dark(var(--site-on-background), #eef3ff);
    background: light-dark(#f3f6fc, #101827);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
  }

  body[data-page="projects"] .projects-page-content {
    padding-top: 80px;
  }


  /* Keep the Shop heading visible and centered on phones */
  #cv .topbar {
    position: sticky;
    display: flex;
    justify-content: center;
    min-height: 125px;
    padding: 18px 60px;
  }

  #cv .topbar .shop-heading {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 120px);
  margin: 0;
  text-align: center;
}

  #cv .topbar .shop-heading h1 {
    font-size: 21px;
    overflow-wrap: anywhere;
  }

  #cv .topbar .shop-heading p {
    font-size: 13px;
  }

}

/* Featured Projects: fixed and centered on desktop */
@media (min-width: 1001px) {
  body[data-page="projects"] .mobile-page-title {
    display: flex;
    position: fixed;
    top: 0;
    left: 180px;
    right: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    margin: 0;
    padding: 12px 24px;
    color: light-dark(var(--site-on-background), #eef3ff);
    background: light-dark(#f3f6fc, #101827);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
  }
}



/* Keep the Projects theme toggle at the top-right on desktop */
@media (min-width: 651px) {
  body[data-page="projects"] > .app > .top-left {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1003;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body[data-page="projects"] > .app > .top-left .theme-toggle {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
}


/* ---------- Reduced motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .page-view {
    animation: none;
  }

  .scroll-reveal,
  .scroll-reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ======================================
   FILTERABLE SHOP CATALOGUE
   ====================================== */

.catalog-page {
  --catalog-bg: #f0f5f5;
  --catalog-card: #ffffff;
  --catalog-text: #263443;
  --catalog-muted: #687786;
  --catalog-line: #dce5e7;
  --catalog-accent: #2459e0;

  max-width: 1400px;
  margin: 0 auto;
  padding: 28px;
  color: var(--catalog-text);
  box-sizing: border-box;
}

.catalog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.catalog-heading h2 {
  margin: 8px 0;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.catalog-heading p {
  margin: 0;
  color: var(--catalog-muted);
  line-height: 1.7;
}

.results-count {
  flex-shrink: 0;
  color: var(--catalog-muted);
  font-size: 0.9rem;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.catalog-filters {
  position: sticky;
  top: 20px;
  padding: 22px 18px;
  border: 1px solid var(--catalog-line);
  border-radius: 16px;
  background: var(--catalog-card);
}

.catalog-filters h3 {
  margin: 0 0 18px;
  font-size: 1rem;
}

.filter-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 15px 0;
  font-size: 0.9rem;
  line-height: 1.45;
  cursor: pointer;
}

.filter-option input {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--catalog-accent);
}

.filter-divider {
  height: 1px;
  margin: 24px 0;
  background: var(--catalog-line);
}

.catalog-search-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.catalog-search {
  width: 100%;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--catalog-line);
  border-radius: 9px;
  background: var(--catalog-card);
  color: var(--catalog-text);
  box-sizing: border-box;
}

.catalog-reset {
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid var(--catalog-line);
  border-radius: 9px;
  background: transparent;
  color: var(--catalog-text);
  cursor: pointer;
}

.catalog-reset:hover {
  border-color: var(--catalog-accent);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 16px;
}

.catalog-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--catalog-line);
  border-radius: 13px;
  background: var(--catalog-card);
  color: var(--catalog-text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.catalog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(25, 45, 65, 0.09);
}

.catalog-image {
  position: relative;
  display: flex;
  min-height: 155px;
  aspect-ratio: 1.25 / 1;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  background: #e5edf1;
}

.catalog-image-edutrack {
  background: #dce9f8;
}

.catalog-image-blog {
  background: #eee5f6;
}

.catalog-image-automation {
  background: #dceee9;
}

.catalog-image-data {
  background: #e2eaf5;
}

.catalog-image-digital {
  background: #f4e9d9;
}

.catalog-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  color: #263443;
}

.catalog-image-placeholder span {
  font-size: 2.4rem;
}

.catalog-image-placeholder strong {
  font-size: 0.95rem;
}

.catalog-image-placeholder small {
  font-size: 0.75rem;
  line-height: 1.5;
}

.catalog-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  border-radius: 6px;
  background: #2459e0;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
}

.catalog-card-body {
  padding: 16px;
}

.catalog-category {
  display: block;
  color: var(--catalog-accent);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1.5;
}

.catalog-card-body h3 {
  margin: 8px 0;
  font-size: 1.08rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.catalog-card-body p {
  color: var(--catalog-muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.catalog-price {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  margin: 12px 0;
  padding: 10px 12px;
  border-top: 1px solid var(--site-border, #d9deea);
  border-bottom: 1px solid var(--site-border, #d9deea);
}

.catalog-secondary-price {
  margin: 5px 0;
  font-size: 0.82rem !important;
}

.catalog-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--catalog-accent);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.catalog-link:hover {
  text-decoration: underline;
}

.catalog-empty {
  padding: 36px 20px;
  text-align: center;
  border: 1px dashed var(--catalog-line);
  border-radius: 14px;
}

.catalog-empty p {
  color: var(--catalog-muted);
}

.catalog-details {
  margin-top: 42px;
  padding: 30px;
  border: 1px solid var(--catalog-line);
  border-radius: 18px;
  background: var(--catalog-card);
  color: var(--catalog-text);
  scroll-margin-top: 25px;
}

.catalog-details > h2 {
  margin: 10px 0;
  line-height: 1.3;
}

.catalog-details > p {
  line-height: 1.8;
}

.catalog-details-lead {
  font-size: 1.1rem;
  font-weight: 700;
}

.catalog-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  margin: 28px 0;
}

.catalog-benefits h3 {
  margin-top: 0;
}

.catalog-benefits p,
.catalog-benefits li,
.catalog-package p,
.catalog-package li {
  font-size: 0.9rem;
  line-height: 1.8;
}

.catalog-benefits ul,
.catalog-package ul {
  padding-left: 20px;
}

.package-section-title {
  margin-top: 34px;
}

.catalog-packages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.catalog-package {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--catalog-line);
  border-radius: 14px;
  background: var(--catalog-card);
}

.catalog-package h3 {
  margin: 9px 0;
}

.catalog-package .btn {
  margin-top: auto;
  align-self: flex-start;
}

.catalog-contact {
  margin-top: 24px;
  padding: 24px;
  border-radius: 14px;
  text-align: center;
  background: var(--catalog-bg);
}

.catalog-contact h3 {
  line-height: 1.5;
}

.catalog-page [hidden] {
  display: none !important;
}

/* DARK THEME */
html[style*="color-scheme: dark"] #cv .catalog-page {
  --catalog-bg: #222f45;
  --catalog-card: #172033;
  --catalog-text: #f1f5f9;
  --catalog-muted: #c1cede;
  --catalog-line: #3b4960;
  --catalog-accent: #9bbaff;

  color: var(--catalog-text);
}

html[style*="color-scheme: dark"] #cv .catalog-image {
  background: #27354a;
}

html[style*="color-scheme: dark"] #cv .catalog-image-edutrack {
  background: #273c58;
}

html[style*="color-scheme: dark"] #cv .catalog-image-blog {
  background: #393047;
}

html[style*="color-scheme: dark"] #cv .catalog-image-automation {
  background: #24403e;
}

html[style*="color-scheme: dark"] #cv .catalog-image-data {
  background: #293950;
}

html[style*="color-scheme: dark"] #cv .catalog-image-digital {
  background: #453b2d;
}

html[style*="color-scheme: dark"] #cv .catalog-image-placeholder {
  color: #f1f5f9;
}

html[style*="color-scheme: dark"] #cv .catalog-contact {
  background: var(--catalog-bg);
  color: var(--catalog-text);
}

/* SCHEDULED FLASH SALE BANNER */
#cv .flash-sale-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 24px;
  padding: 24px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(120deg, #172554, #1d4ed8);
  box-shadow: 0 10px 28px rgba(23, 37, 84, 0.18);
}

#cv .flash-sale-banner[hidden] {
  display: none !important;
}

#cv .flash-sale-content {
  flex: 1;
  min-width: 0;
}

#cv .flash-sale-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #172554;
  background: #fde047;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

#cv .flash-sale-banner h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
}

#cv .flash-sale-banner p {
  margin: 6px 0;
  color: #dbeafe;
}

#cv .flash-sale-pricing {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-top: 12px;
}

#cv .flash-sale-pricing span {
  color: #dbeafe;
  text-decoration: line-through;
}

#cv .flash-sale-pricing strong {
  color: #ffffff;
  font-size: 1.6rem;
}

#cv .flash-sale-banner .flash-sale-savings {
  color: #bbf7d0;
  font-weight: 800;
}

#cv .flash-sale-banner .flash-sale-end-date {
  font-size: 0.85rem;
}

#cv #flashSaleViewButton {
  flex-shrink: 0;
  padding: 13px 20px;
  border: 0;
  border-radius: 10px;
  color: #172554;
  background: #fde047;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

#cv #flashSaleViewButton:hover {
  background: #fef08a;
}

#cv #flashSaleViewButton:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

/* Stack the banner neatly on small screens */
@media (max-width: 600px) {
  #cv .flash-sale-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px;
  }

  #cv #flashSaleViewButton {
    width: 100%;
  }
}

/* TABLETS */
@media (max-width: 1050px) {
  .catalog-layout {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-packages {
    grid-template-columns: 1fr;
  }

  .catalog-package .btn {
    align-self: stretch;
    text-align: center;
  }
}

/* PHONES */
@media (max-width: 650px) {
  .catalog-page {
    padding: 16px 12px;
  }

  .catalog-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .catalog-filters {
    position: static;
    padding: 18px;
  }

  .catalog-filters h3 {
    margin-bottom: 12px;
  }

  .filter-option {
    margin: 12px 0;
  }

  .catalog-search {
    font-size: 16px;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .catalog-image {
    aspect-ratio: 1.6 / 1;
  }

  .catalog-card-body {
    padding: 18px;
  }

  .catalog-details {
    padding: 20px 16px;
  }

  .catalog-benefits {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .catalog-packages {
    grid-template-columns: 1fr;
  }

  .catalog-package .btn {
    align-self: stretch;
    text-align: center;
  }
}


/* DISCOUNTED OFFERS POPUP */
.discount-offers-popup {
  position: fixed;
  left: auto;
  right: 24px;
  bottom: 82px;
  z-index: 1200;
  width: min(360px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 26px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  color: #17233b;
  background: linear-gradient(135deg, #fffde7, #fff3a6);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.25);
}

.discount-offers-popup[hidden] {
  display: none !important;
}

.discount-popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.discount-popup-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  font-weight: 800;
}

.discount-offers-popup h2 {
  margin: 0 0 10px;
  color: #172554;
  font-size: 1.4rem;
}

.discount-offers-popup p {
  margin: 0 0 18px;
  color: #475569;
  line-height: 1.6;
}

.discount-popup-primary,
.discount-popup-dismiss {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 10px;
  font: inherit;
  cursor: pointer;
}

.discount-popup-primary {
  border: 0;
  color: #ffffff;
  background: #1d4ed8;
  font-weight: 700;
}

.discount-popup-primary:hover {
  background: #1e40af;
}

.discount-popup-dismiss {
  margin-top: 8px;
  border: 1px solid #cbd5e1;
  color: #475569;
  background: #ffffff;
}

/* FIXED DISCOUNTED OFFERS BUTTON */
#discountOffersButton {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1199;
  padding: 13px 17px;
  border: 0;
  border-radius: 999px;
  color: #172554;
  background: #fde047;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.22);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

#discountOffersButton:hover {
  background: #facc15;
}

#discountOffersButton:focus-visible,
.discount-offers-popup button:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

/* Keep the button and popup clear of the mobile navigation */
@media (max-width: 650px) {
  #discountOffersButton {
    left: 12px;
    bottom: 82px;
    padding: 11px 14px;
    font-size: 0.88rem;
  }

    .discount-offers-popup {
    right: 10px;
    bottom: 135px;
    width: min(260px, calc(100vw - 20px));
    max-height: 30vh;
    overflow-y: auto;
    padding: 14px;
    border-radius: 14px;
  }
}

/* Dark theme discounted offers popup */
html[style*="color-scheme: dark"] .discount-offers-popup {
  background: linear-gradient(135deg, #6b5200, #3d3000);
  color: #fff8cc;
  border-color: #a78316;
}

html[style*="color-scheme: dark"] .discount-offers-popup h2 {
  color: #ffe680;
}

html[style*="color-scheme: dark"] .discount-offers-popup p {
  color: #fff0b3;
}

html[style*="color-scheme: dark"] .discount-offers-popup .discount-popup-dismiss {
  background: #4a3900;
  color: #fff3c4;
  border-color: #a78316;
}



/* SHOP CATALOGUE â€” SPACIOUS THREE-COLUMN LAYOUT */
.catalog-page {
  padding: 28px;
  max-width: 1500px;
  margin: 0 auto;
}

.catalog-intro {
  max-width: 800px;
  margin: 0 auto 32px;
  text-align: center;
}

.catalog-intro h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-bottom: 12px;
}

.catalog-intro p {
  line-height: 1.8;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.catalog-filters {
  padding: 22px;
  border: 1px solid var(--border, #dce2ed);
  border-radius: 16px;
}

.catalog-filters label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  line-height: 1.5;
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

#productSearch {
  width: 100%;
  max-width: 420px;
  padding: 13px 16px;
  border: 1px solid var(--border, #dce2ed);
  border-radius: 10px;
  font: inherit;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.catalog-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border, #dce2ed);
  border-radius: 16px;
  background: var(--card, #fff);
  box-shadow: 0 5px 18px rgba(20, 35, 60, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.catalog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(20, 35, 60, 0.11);
}

.catalog-card-toggle {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.catalog-card-image {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: #edf3ff;
  font-size: 30px;
}

.catalog-category {
  margin: 4px 0 0;
  color: var(--site-primary, #2459e0);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.catalog-card-title {
  font-size: 1.12rem;
  font-weight: 750;
  line-height: 1.4;
}

.catalog-card-summary {
  line-height: 1.7;
  opacity: 0.85;
}

.catalog-price {
  font-weight: 700;
  line-height: 1.6;
}

.catalog-expand-hint {
  margin-top: 4px;
  color: var(--site-primary, #2459e0);
  font-weight: 700;
}

.catalog-card-details {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border, #dce2ed);
  line-height: 1.7;
}

.catalog-card-details[hidden] {
  display: none !important;
}

.catalog-card-details a {
  display: inline-block;
  margin: 8px 12px 0 0;
}

.catalog-details {
  margin-top: 48px;
  padding: 28px;
  border: 1px solid var(--border, #dce2ed);
  border-radius: 18px;
}

.catalog-package-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.catalog-package {
  padding: 22px;
  border: 1px solid var(--border, #dce2ed);
  border-radius: 14px;
}

@media (max-width: 1100px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-package-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .catalog-page {
    padding: 18px;
  }

  .catalog-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .catalog-filters {
    padding: 18px;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .catalog-details {
    padding: 20px;
  }
}

/* Shop layout without category filters */
.catalog-layout {
  grid-template-columns: minmax(0, 1fr);
}

.catalog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 900px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}


/* Expand the selected product across the catalogue */
.catalog-card-open {
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
  order: -1;
}

.catalog-card-open .catalog-card-toggle {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  column-gap: 20px;
  align-items: center;
}

.catalog-card-open .catalog-card-image {
  grid-row: span 3;
}

.catalog-card-open .catalog-card-details {
  padding-top: 22px;
  margin-top: 22px;
}

.catalog-card {
  scroll-margin-top: 24px;
}



/* SHOP PAGE â€” LIGHT AND DARK THEME SUPPORT */

/* Light theme */
#cv .catalog-page {
  color: #17233b;
  background: transparent;
}

#cv .catalog-card,
#cv .catalog-filters,
#cv .catalog-details,
#cv .catalog-package {
  color: #17233b;
  background: #ffffff;
  border-color: #dce2ed;
}

#cv .catalog-card-summary,
#cv .catalog-card-details,
#cv .catalog-intro p {
  color: #475569;
}

#cv .catalog-card-toggle {
  color: inherit;
}

#cv .catalog-card-title,
#cv .catalog-intro h2,
#cv .catalog-details h2,
#cv .catalog-package h4 {
  color: #17233b;
}

#cv .catalog-price,
#cv .catalog-category,
#cv .catalog-expand-hint,
#cv .catalog-card-details a {
  color: #2459e0;
}

#cv #productSearch {
  color: #17233b;
  background: #ffffff;
  border-color: #dce2ed;
}

/* Dark theme */
html[style*="color-scheme: dark"] #cv .catalog-page {
  color: #e8edf7;
  background: transparent;
}

html[style*="color-scheme: dark"] #cv .catalog-card,
html[style*="color-scheme: dark"] #cv .catalog-filters,
html[style*="color-scheme: dark"] #cv .catalog-details,
html[style*="color-scheme: dark"] #cv .catalog-package {
  color: #e8edf7;
  background: #1b2638;
  border-color: #39465b;
}

html[style*="color-scheme: dark"] #cv .catalog-card-summary,
html[style*="color-scheme: dark"] #cv .catalog-card-details,
html[style*="color-scheme: dark"] #cv .catalog-intro p {
  color: #c3cede;
}

html[style*="color-scheme: dark"] #cv .catalog-card-title,
html[style*="color-scheme: dark"] #cv .catalog-intro h2,
html[style*="color-scheme: dark"] #cv .catalog-details h2,
html[style*="color-scheme: dark"] #cv .catalog-package h4 {
  color: #f1f5fb;
}

html[style*="color-scheme: dark"] #cv .catalog-price,
html[style*="color-scheme: dark"] #cv .catalog-category,
html[style*="color-scheme: dark"] #cv .catalog-expand-hint,
html[style*="color-scheme: dark"] #cv .catalog-card-details a {
  color: #91b4ff;
}

html[style*="color-scheme: dark"] #cv #productSearch {
  color: #f1f5fb;
  background: #101827;
  border-color: #39465b;
}

html[style*="color-scheme: dark"] #cv .catalog-card-image {
  background: #293957;
}

html[style*="color-scheme: dark"] #cv .catalog-card-details {
  border-top-color: #39465b;
}



/* Product page: theme-aware EduTrack package cards */
.catalog-package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.catalog-package-card {
  border: 1px solid var(--site-primary, #2459e0);
  border-radius: 14px;
  padding: 22px;
  background: var(--site-background, #f3f6fc);
  color: var(--site-on-background, #17233b);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  min-width: 0;
}

.catalog-package-card h3,
.catalog-package-card h4,
.catalog-package-card p,
.catalog-package-card li,
.catalog-package-card strong {
  color: inherit;
}

.catalog-package-card h3 {
  margin-top: 0;
  margin-bottom: 14px;
}

.catalog-package-card p,
.catalog-package-card li {
  line-height: 1.7;
}

.catalog-package-card ul {
  padding-left: 20px;
}

.catalog-package-card li {
  margin-bottom: 8px;
}

@media (max-width: 600px) {
  .catalog-package-grid {
    grid-template-columns: 1fr;
  }
}


/* Dark theme for the product page */
html[style*="color-scheme: dark"] body {
  background: #111827;
  color: #e8edf7;
}

#product .section-head,
#product .section-head h1,
#product .section-head p,
html[style*="color-scheme: dark"] #product .panel,
html[style*="color-scheme: dark"] #product .panel p,
html[style*="color-scheme: dark"] #product .panel h2,
html[style*="color-scheme: dark"] #product .panel h3,
html[style*="color-scheme: dark"] #product .panel li {
  color: #e8edf7;
}

#product .panel {
  background: light-dark(#ffffff, #1b2638);
  border-color: light-dark(#d9e1ef, #39465b);
}

#product .topbar {
  background: light-dark(#ffffff, #111827);
}

#product .footer {
  color: light-dark(#526079, #cbd5e1);
}


/* ---------- Product page: shared light and dark theme ---------- */

#product {
  background: light-dark(#f3f6fc, #111827);
  color: light-dark(#17233b, #e8edf7);
}

#product .main,
#product .page-view {
  background: light-dark(#f3f6fc, #111827);
  color: light-dark(#17233b, #e8edf7);
}

#product h1,
#product h2,
#product h3,
#product p,
#product li,
#product .section-head,
#product .panel {
  color: light-dark(#17233b, #e8edf7);
}

#product .panel {
  background: light-dark(#ffffff, #1b2638);
  border-color: light-dark(#d9e1ef, #39465b);
}

#product .topbar {
  background: light-dark(#ffffff, #111827);
}

#product .footer {
  color: light-dark(#526079, #cbd5e1);
}

#product .catalog-package-grid .catalog-package-card {
  background: light-dark(#ffffff, #1b2638);
  color: light-dark(#17233b, #e8edf7);
  border-color: light-dark(#d9e1ef, #39465b);
}

#product .catalog-package-card h3,
#product .catalog-package-card h4,
#product .catalog-package-card p,
#product .catalog-package-card li,
#product .catalog-package-card strong {
  color: inherit;
}


/* Hide scrollbars while keeping scrolling functional */
html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbars inside scrollable sections too */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
}




/* Shop page â€” solid background */
#cv .catalog-page {
  background-image: none;
  background-color: light-dark(#f3f6fc, #101827);
}


/* Contact page â€” keep widgets compact and aligned at the top */
#contact .content-grid {
  align-items: start;
}

#contact .panel {
  align-self: start;
  height: fit-content;
}

/* Contact page: two panels left, services panel right */
#contact .contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 16px;
}

#contact .contact-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

#contact .contact-layout > .panel,
#contact .contact-left > .panel {
  min-width: 0;
  height: fit-content;
  align-self: start;
}

#contact .contact-layout ul {
  padding-left: 22px;
}

#contact .contact-layout li {
  margin-bottom: 8px;
}

@media (max-width: 650px) {
  #contact .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.catalog-close-bottom {
  display: block;
  margin: 20px auto 0;
  padding: 10px 18px;
  border: 1px solid var(--site-primary);
  border-radius: 8px;
  background: transparent;
  color: var(--site-primary);
  font: inherit;
  cursor: pointer;
}

.catalog-close-bottom:hover {
  background: var(--site-primary);
  color: white;
}


/* FIX: Keep product prices on a full-width line */
#cv .catalog-card-toggle .catalog-price {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-column: 1 / -1;
  align-self: stretch;
  box-sizing: border-box;
  margin: 8px 0;
  padding: 4px 8px;
  text-align: center;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.6;
  border-top: 1px solid #dce2ed;
  border-bottom: 1px solid #dce2ed;
}


/* About Me: use the full available page width */
#about .content-grid {
  display: block;
  width: 100%;
  max-width: none;
}

#about .content-grid > .panel {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}


/* Center images within About Me article topics */

#about .about-topic-image {
  width: 100%;
  max-width: none;
  margin: 28px auto;
  text-align: center;
  box-sizing: border-box;
}

#about .about-topic-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: cover;
  margin: 0 auto;
  border-radius: 14px;
  border: 1px solid rgba(128, 128, 128, 0.2);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

@media (max-width: 650px) {
  #about .about-topic-image {
    max-width: 100%;
    margin: 22px auto;
  }
}


/* Welcoming typography for the About Me article */
#about .panel {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: 0.1px;
}

#about .panel h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 30px;
  margin-bottom: 14px;
}

#about .panel p {
  margin-bottom: 20px;
}

#about .panel strong {
  font-weight: 700;
}
