/* -----------------------------------------------------------
   GLOBAL THEME VARIABLES
   Change these for default (black/gold) theme,
   or override via URL params (primary, primary-dark, etc.)
----------------------------------------------------------- */
:root {
  --primary: #f4c542;
  --primary-dark: #f4c542;
  --accent: #000000;
  --text: #000000; /* Always black for main content */
  --sidebar-text: #ffffff; /* Navigation text color */
  --background-dark: #1a1a1d;
  --background-light: #ffffff;
  --shadow: rgba(0, 0, 0, 0.35);
}

/* -----------------------------------------------------------
   GLOBAL
----------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(180deg, #f8f8fa, #ececf1);
  color: var(--text);
}

/* -----------------------------------------------------------
   SIDEBAR (Desktop)
----------------------------------------------------------- */
.sidebar {
  width: 120px;
  background: var(--background-dark);
  color: var(--sidebar-text);
  border-right: 4px solid var(--accent);
  padding: 20px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  box-shadow: 3px 0 12px var(--shadow);
  transition: left 0.3s ease;
  z-index: 1000;
}

.sidebar nav a {
  display: block;
  color: #ddd;
  padding: 10px 0;
  text-decoration: underline;
  font-weight: 500;
}

.sidebar nav a.active {
  color: var(--sidebar-text);
  font-weight: bold;
}

.sidebar nav a:hover {
  color: var(--sidebar-text);
}

.profile-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
}

.profile-img {
  width: 90%;
  max-width: 120px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  border: 2px solid var(--accent);
}

/* -----------------------------------------------------------
   MAIN CONTENT
----------------------------------------------------------- */
main {
  margin-left: 140px;
  padding: 0 40px 20px 40px;
  width: calc(100% - 140px);
  box-sizing: border-box;
}

/* -----------------------------------------------------------
   HERO BANNER
----------------------------------------------------------- */
.hero {
  background:
    linear-gradient(rgba(0,0,0,0.20), rgba(0,0,0,0.20)),
    url('hero.png') center/cover no-repeat;
  color: #ffffff;
  padding: 40px 0;
  border-bottom: 5px solid var(--primary);
  margin: 0 -20px 25px -20px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 3px 3px 8px rgba(0,0,0,0.75);
}

.hero p {
  font-size: 1.2rem;
  text-shadow: 3px 3px 8px rgba(0,0,0,0.75);
}

/* -----------------------------------------------------------
   SECTION TITLES
----------------------------------------------------------- */
.section-title {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  font-size: 1.7rem;

  margin: 50px auto 25px;
  padding-bottom: 10px;

  width: fit-content;

  /* IMPORTANT:
     Remove shadows from the container so the underline stays clean.
  */
  box-shadow: none;
  text-shadow: none;  

  /* Reveal animation baseline */
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-title::after {
  content: "";
  display: block;
  width: 200px;                 /* Length of underline */
  height: 6px;                 /* Thickness */
  margin: 10px auto 0 auto;    /* Centered under title */
  background: linear-gradient(
      to right,
      var(--primary) 60%,
      var(--accent) 40%
  );
  border-radius: 3px;
}

.section-title.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Apply the glow ONLY to the text, not the underline */
.section-title span {
  text-shadow: 2px 2px 6px var(--shadow);
}

/* -----------------------------------------------------------
   METRICS + IDENTITY SUMMARY
----------------------------------------------------------- */
.identity-summary {
  margin: 0 auto 30px auto;
  text-align: center;
}

.identity-text {
  font-size: 1rem;
  line-height: 1.6;
  background: var(--background-light);
  padding: 20px 25px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
  border-left: 6px solid var(--primary);
  font-weight: 500;
  color: var(--text);
}

.identity-layout {
  display: flex;
  align-items: center;
  gap: 25px;
}

.identity-inner {
  display: flex;
  align-items: center;
  gap: 25px;
}

.identity-copy {
  flex: 1;
}

.identity-image img {
  max-width: 220px;      /* medium-sized image inside card */
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.identity-has-image {
  position: relative;
  padding-right: 260px; /* reserve space for the image */
}

.identity-action {
  position: absolute;
  top: 50%;
  right: 25px;
  transform: translateY(-50%);

  max-height: 100%;
  max-width: 220px;
  width: auto;

  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
  justify-content: center;
}

.key-measurables {
  text-align: center;
  margin: 25px auto;
}

.key-measurables h2 {
  font-size: 2rem;
  margin-bottom: 25px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.measurable-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.measurable-card {
  background: var(--background-light);
  padding: 10px 15px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
  border-left: 6px solid var(--primary-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--text);
}

.measurable-card h3 {
  margin: 0 0 6px 0;
  padding: 0;
  font-size: 1.15rem;
}

.measurable-card p {
  margin: 2px 0;
  padding: 0;
  line-height: 1.35;
}

.measurable-card,
.metric {
  border-top: 3px solid var(--accent);
}

.metric {
  background: var(--background-light);
  padding: 12px 18px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
  font-size: 1rem;
  min-width: 130px;
  text-align: center;
  border-left: 5px solid var(--primary-dark);
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text);
}

/* -----------------------------------------------------------
   GRID + CARD
----------------------------------------------------------- */
.container-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.card {
  background: var(--background-light);
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
  color: var(--text);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}

.card:active {
  transform: scale(0.98);
}

.card h3 {
  border-bottom: 3px solid var(--primary-dark);
  padding-bottom: 6px;
  margin-bottom: 15px;
}

/* Twitter embed spacing */
.twitter-tweet {
  margin-top: 10px !important;
  margin-bottom: 0 !important;
}

/* -----------------------------------------------------------
   EXPANDABLE CARD
----------------------------------------------------------- */
.expandable .more {
  display: none;
  margin-top: 10px;
  line-height: 1.5;
}

.expandable.open .more {
  display: block;
}

.toggle {
  margin-top: 10px;
  background: var(--background-dark);
  color: var(--background-light);
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.toggle:hover {
  background: var(--primary);
  color: var(--text);
}

/* -----------------------------------------------------------
   DOWNLOAD BUTTON
----------------------------------------------------------- */
.btn-download {
  display: inline-block;
  background: var(--background-light);  /* Light background for contrast */
  color: var(--text);                /* Black text against light background */
  padding: 12px 18px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);  /* Helps it pop on dark sidebar */
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

/* Force PDF button text color */
.btn-download,
.btn-download:visited,
.btn-download:hover,
.btn-download:active {
  color: var(--text) !important;  /* Always black */
  text-decoration: none !important;
}

/* -----------------------------------------------------------
   OVERLAY (Mobile Menu Background Dim)
----------------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 900;
}

.overlay.show {
  opacity: 1;
  pointer-events: all;
}

/* -----------------------------------------------------------
   HAMBURGER
----------------------------------------------------------- */
.hamburger {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  font-size: 2rem;
  background: var(--primary);
  color: var(--background-light);
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  z-index: 1001;
  cursor: pointer;
}

/* -----------------------------------------------------------
   FOOTER
----------------------------------------------------------- */
footer {
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  color: #999;
  padding: 20px 0 10px 0;
  margin-top: 40px;
  border-top: 1px solid #2a2a2a;
}

/* -----------------------------------------------------------
   SCROLL REVEAL
----------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* -----------------------------------------------------------
   MOBILE
----------------------------------------------------------- */
@media (max-width: 768px) {

  .hamburger {
    display: block;
  }

  .sidebar {
    width: 200px;
    left: -260px;        /* fully offscreen */
  }

  .sidebar.open {
    left: 0;
  }

  main {
    margin-left: 0;
    width: 100%;
    padding-top: 0;
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero {
    margin: 0 -20px 25px -20px;
    padding-top: 20px;
  }

  .summary {
    flex-direction: column;
  }

  .identity-layout {
    flex-direction: column-reverse;
    text-align: left;
  }

  .identity-inner {
    flex-direction: column;
  }

  .identity-image img {
    max-width: 100%;
  }
  
  .identity-action {
    display: none;
  }

  .identity-has-image {
    padding-right: 25px; /* normal text padding */
  }
}
