/* === GLOBAL PAGE STYLING === */
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: var(--font-base-size);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
  background-color: #00001f;
  overflow-x: hidden;
  color: #fff;
}

/* === FIXED BACKGROUND IMAGE === */
.background-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../C2_Website_Assets/images/Wavy%20Animation%20Still.png'); /* 🔁 Update relative path if needed */
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  z-index: -2;
  pointer-events: none;
}

/* === HERO SECTION === */
.hero-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 2vh 2vw;
  position: relative;
  overflow: hidden;
}

.overlay-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 1em;
  max-width: 90%;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

.main-heading {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  margin: 0;
  letter-spacing: 1.8px;
}

.strapline {
  font-size: clamp(1rem, 3vw, 1.6rem);
  color: #fff;
  margin: 0 0 8px;
  font-weight: 300;
  letter-spacing: 2.8px;
  position: relative;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
  display: inline-block;
  overflow: hidden;
}

.strapline::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: sweep-flash 5s ease-in-out infinite;
}

@keyframes sweep-flash {
  0%, 6%   { left: -100%; opacity: 0; }
  26%      { left: 100%; opacity: 1; }
  28%,100% { left: 100%; opacity: 0; }
}

/* === NAVIGATION === */
.nav-buttons {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.nav-buttons a {
  color: white;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  backdrop-filter: blur(8px);
  font-size: 1.2rem;
  transition: all 0.1s ease;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
  animation: glowPulse 10.5s ease-in-out infinite;
}

.nav-buttons a:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.05);
    opacity: 0.3;
    background: rgba(0, 0, 31, 0);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    opacity: 1;
    background: rgba(255, 255, 255, 0.05);
  }
}

/* === GLOBAL TYPOGRAPHY SYSTEM === */
:root {
  /* === FONT SIZES (by hierarchy & usage context) === */

  /* 🔹 Top-Level Headings (outside .main-container) */
  --font-xlarge: 4rem;                /* Reserved for future <h1> use */
  --font-large: 3rem;                 /* Section titles: generic <h2> */

  /* 🔹 Main Container Headings */
  --font-main-heading: 2.8rem;        /* <h1> inside .main-container */
  --font-heading-secondary: 2.5rem;   /* <h2> inside .main-container */
  --font-heading-tertiary: 1.6rem;    /* <h3> inside .main-container */

  /* 🔹 Content Block Headings (inside .content-block) */
  --font-medium: 1.8rem;              /* <h3> inside .job-entry (e.g. CV blocks) */

  /* 🔹 Body Text & Subtext */
  --font-base-size: 1rem;             /* Standard <p>, body text */
  --font-small: 0.9rem;               /* Metadata <span>, date ranges etc. */

  /* 🔹 Certifications */
  --font-cert-heading: 2.0rem;        /* <h2> inside .cert-heading section */


  /* === LINE HEIGHTS (by readability) === */
  --line-height-tight: 1.2;           /* For headings and tight vertical rhythm */
  --line-height-normal: 1.5;          /* Standard paragraph readability */
  --line-height-loose: 1.75;          /* Comfortable reading in <p> blocks */


  /* === LETTER SPACING (by visual tone) === */
  --letter-spacing-tight: -0.5px;     /* For stylised compact headings */
  --letter-spacing-normal: 0.5px;     /* Default for all regular text */
  --letter-spacing-wide: 1px;         /* Emphasis for .strapline, buttons */
}


/* === CONTENT CONTAINER === */

.main-container {
  position: relative;
  width: 900px;
  height: 53vh;
  margin: 0 auto;
  padding: 5px 20px 5px 20px;
  background: rgba(0, 0, 31, 0.8);
  border-radius: 25px;
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.scroll-box {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  border-radius: 15px;
  backdrop-filter: blur(4px);
  scroll-behavior: smooth;
}

.scroll-box::-webkit-scrollbar {
  width: 10px;
  background: transparent;
}

.scroll-box::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
}

.scroll-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

.scroll-box:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.4);
}
/* === Main Container Heading === */
.main-container h1 {
  font-size: var(--font-main-heading);
  font-weight: 600;
  letter-spacing: var(--letter-spacing-wide);
  margin: 0 0 1rem;
  line-height: var(--line-height-tight);
}

/* === Main Container Subheading (e.g. Certificates) === */
.main-container h2 {
  font-size: var(--font-large);
  font-weight: 600;
  letter-spacing: var(--letter-spacing-normal);
  margin: 1.5rem 0 0.8rem;
  line-height: var(--line-height-normal);
}

.main-container h3 {
  font-size: var(--font-medium);
  font-weight: 600;
  letter-spacing: var(--letter-spacing-normal);
  line-height: var(--line-height-tight);
  margin: 1.2rem 0 0.8rem;
}


/* === JOB ENTRY SECTIONS === */
.content-block {
  margin-bottom: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(2px);
  transition: transform 0.2s ease;
}

.content-block:hover {
  transform: translateY(-2px);
}

.content-block h3 {
  font-size: var(--font-medium);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
}

.content-block span {
  font-size: var(--font-small);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
}

.content-block p {
  font-size: var(--font-base-size);
  line-height: var(--line-height-loose);
  letter-spacing: var(--letter-spacing-normal);
}

/* === LISTS INSIDE CONTENT BLOCKS === */
.content-block ul {
  padding-left: 1.5rem; /* or 2rem depending on design */
  margin-bottom: 1.5rem;
  list-style-type: disc;
  font-size: var(--font-base-size);
  line-height: var(--line-height-loose);
  letter-spacing: var(--letter-spacing-normal);
}

.content-block li {
  margin-bottom: 0.5rem;
}

/* === Diagram & Image Containers === */
.diagram-container {
  margin: 1rem ;
  text-align: left;
}

.diagram-container img.chapter-diagram {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.diagram-caption {
  font-size: var(--font-small);
  color: var(--text-secondary, #999);
  margin-top: 0.5rem;
  font-style: italic;
}

/* === SECTION DIVIDERS === */
.section-divider {
  height: 3.5px;
  width: 100%;
  margin: 0.5rem 0;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
  border-radius: 1px;
  animation: glowPulseDivider 8s ease-in-out infinite;
}

@keyframes glowPulseDivider {
  0%, 100% {
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.08);
  }
  50% {
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.2);
  }
}

/* === CHAPTER BUTTONS === */

.btn-chapter {
  display: inline-block;
  padding: 6px 12px;
  font-size: 1.2rem;
  font-weight: 500;
  color: white;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
  animation: glowPulse 10.5s ease-in-out infinite;
  transition: all 0.1s ease;
  pointer-events: auto;
}

.btn-chapter:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

 .btn-chapter.disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: default;
  border-style: dashed;
  box-shadow: none;
}


.chapter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* === CONTACTS PAGE SECTION === */

.contact-container {
  max-width: 600px;
  margin: 10vh auto;
  padding: 2rem 2.5rem;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 2rem;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.contact-content {
  text-align: left;
}

.contact-content h1 {
  font-size: var(--font-main-heading);
  margin-bottom: 1.5rem;
}

.contact-content p {
  font-size: 1.1rem;
  margin: 1rem 0;
  color: var(--text-light, #fff);
}

.contact-content a {
  color: #87cefa;
  text-decoration: none;
}

.contact-content a:hover {
  text-decoration: underline;
}

/* === CERTIFICATIONS SECTION === */

.cert-heading {
  font-size: var(--font-large);
  font-weight: 600;
  letter-spacing: var(--letter-spacing-normal);
  line-height: var(--line-height-tight);
  margin: 0.2rem 0;
  z-index: -1;
}

.badge-footer {
  margin: 0 auto;
  max-width: 960px;       /* or match your .main-container */
  width: 100%;
  padding: 3rem 2vw;
  text-align: center;
  background: transparent;
  backdrop-filter: none;
}

.cert-heading {
  font-size: var(--font-cert-heading); /* ✅ Or use --font-large */
  font-weight: 600;
  letter-spacing: var(--letter-spacing-normal);
  line-height: var(--line-height-tight);
  margin: 0.2rem 0 1rem;
  text-align: center;
  pointer-events: auto;
}

.badge-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 5px;
  pointer-events: auto;
}

.badge-grid img {
  width: 60px;
  height: auto;
  opacity: 0.85;
  transition: transform 0.3s ease-in-out, opacity 0.2s ease-in-out;
}

.badge-grid img:hover {
  transform: scale(1.08);
  opacity: 1;
}

/* === MOBILE STYLES (≤ 440px) === */
@media screen and (max-width: 440px) {

  .hero-container {
    align-items: center;
    justify-content: center;
    padding-top: 0.8rem;
    padding-bottom: 1.25rem;
  }

  .overlay-text {
    align-items: center;
    text-align: center;
  }

  .nav-buttons a {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 0.4rem;
  }

  .main-container {
    max-width: 90vw;
    width: 90vw;
    margin: 4% auto 0;
    padding: 10px 5px;
  }

  .scroll-box {
    padding: 0.6rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
  }

  .main-container h1,
  .main-container h2,
  .main-container h3 {
    font-size: 1.1rem;
    line-height: 1.3;
  }

  .chapter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .btn-chapter {
    font-size: 0.95rem;
    padding: 6px 12px;
    width: 100%;
    text-align: center;
  }

  .badge-grid {
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .badge-grid a {
    scroll-snap-align: center;
    flex-shrink: 0;
  }

  .badge-grid img {
    width: 35px;
  }

  .contact-container {
    width: 85vw;
    padding: 1rem;
    text-align: center;
  }

  .contact-container h1,
  .contact-container h2 {
    font-size: 1.1rem;
  }
}