/* ============================================================
   1. Global and Generic Styles
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: inherit;
  transition: all 0.3s ease-in-out;
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
}

html,
body {
  height: 100%;
  box-sizing: border-box;
}

body {
  background-color: var(--themeBaseBackground);
  color: var(--themeBaseText);
  font-family: "Poppins", sans-serif;
  font-size: var(--fontSizeBase);
  margin: 0;
  padding: 0;
}

a {
  color: var(--themeBaseText);
  text-decoration: none;
  transition: color 0.3s ease-in-out;
}
a:hover {
  color: var(--brandingPrimary);
}
/* ============================================================
   2. Base Typography
   ============================================================ */

h1,
.pagetitle {
  font-size: var(--textTitles);
  margin: 0;
  font-style: italic;
  font-weight: 800;
  line-height: var(--textTitles);
  display: flex;
  align-items: center;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--themeBaseText);
  flex: none;
  order: 0;
  align-self: stretch;
  flex-grow: 0;
}

.pagetitle span {
  display: flex;
  width: 10rem;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  height: 0.125rem;
  align-self: stretch;
  background-color: var(--brandingPrimary);
}

h2 {
  color: var(--themeBaseText);
  font-size: var(--textH2);
  font-style: italic;
  font-weight: 500;
  line-height: 120%; /* 2.7rem */
  letter-spacing: 0.01125rem;
}

h3,
legend {
  font-size: var(--textH3);
  font-style: normal;
  font-weight: 600;
  line-height: 125%; /* 2.1875rem */
  color: var(--themeBaseText);
}

.subtitle {
  font-size: var(--textSubtitle);
  font-style: italic;
  font-weight: 200;
  line-height: 120%; /* 4.8rem */
  letter-spacing: -0.04rem;
  text-transform: uppercase;
  margin: 0;
  text-align: left;
  color: var(--themeBaseAltText);
}

/* ============================================================
   3. Layout Rules
   ============================================================ */

header {
  display: flex;
  background-size: cover;
  background-position: center;
  height: 100vh;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: left;
}

.container {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
  height: 100vh;
}

.stage {
  flex: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  order: 1;
  background-color: var(--themeBaseBackground);
  position: relative;
  width: 100%;
}
.stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}
.stage.nav-collapsed {
  flex: 1 1 100%;
}

.landing-page header {
  align-items: flex-start;
  justify-content: center;
  text-align: left;

  padding: var(--paddingXL);

  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100vh;
  width: inherit;
  clip-path: polygon(0 0, 100% 0%, 75% 100%, 0% 100%);
}

#slideshowNavigator {
  flex: 1;
  order: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 250px;
  transition: width 0.3s ease-in-out;
  background-color: var(--themeBaseDark);
}

/* Slide and fade out navigation when .hidden-menu is added */
#slideshowNavigator.hidden-menu {
  width: 0;

  display: none;
  transition: width 0.3s ease-in-out;
  pointer-events: none;
}
.nav-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  color: var(--themeBaseText);
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-section {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--themeBasePrimary);
  flex: 1 1 auto;
  border-bottom: var(--borderThickness) solid var(--themeBaseLight);
  margin: 0;
}

.nav-links-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  padding: var(--paddingMD);
  font-size: 1rem;
  font-weight: 700;
  color: var(--themeBaseText);
  background: var(--themeBasePrimary);
  cursor: pointer;
  flex: 1;
  box-sizing: border-box;
}

.nav-links-header:hover {
  background: var(--brandingLight);
  color: var(--themeBaseText);
}

.nav-links-header.active {
  background: var(--brandingPrimary);
  color: var(--themeBaseText);
}

.nav-links-header-text {
  order: 1;
}

.nav-links-header-count {
  margin-right: var(--paddingXS);
  font-size: var(--textCaption);
  color: var(--themeBaseMuted);
  padding: var(--paddingXXS) var(--paddingXS);
  border-radius: var(--radiusSM);
  order: 2;
}

.nav-links-header.active .nav-links-header-count {
  background-color: var(--branding-dark);
  color: var(--themeBaseText);
}

.nav-links-header .nav-chevron {
  order: 3;
  color: var(--themeBaseText);
  margin-left: auto;
  font-size: 1.2rem;
}

.nav-content {
  display: flex;
  flex-direction: column;
  background: var(--themeBaseDark);
  color: var(--themeBaseText);
}

.nav-link {
  display: flex;
  width: 100%;
  padding: var(--paddingLG) var(--paddingMD);
  color: var(--themeBaseText);
  text-decoration: none;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.nav-link .nav-number,
.nav-link .nav-label {
  display: inline-block;
  vertical-align: middle;
  color: var(--themeBaseText);
}

.nav-link:hover {
  background: var(--brandingLight);
  color: var(--themeBaseText);
}

.nav-link.active {
  background: var(--themeBasePrimary);
  border-left: var(--brandingPrimary) 4px solid;
  color: var(--themeBaseText);
}

.nav-number {
  font-style: italic;
  font-weight: 900;
  color: var(--themeBaseText);
  margin-right: var(--paddingMD);
  min-width: var(--minNumberWidth);
  text-align: center;
  z-index: 1;
}

.nav-label {
  flex: 1;
  color: var(--themeBaseText);
  z-index: 1;
}

.nav-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background-color: var(--brandingPrimary);
  z-index: 0;
  opacity: 0.25;
}

.nav-link .nav-chevron {
  display: none;
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
  position: absolute;
  color: var(--themeBaseText);
}

.nav-link.active .nav-chevron {
  display: flex;
  color: var(--themeBaseText);
}

.nav-footer-container,
.nav-header-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--paddingMD) var(--paddingSM);
  box-sizing: border-box;
  background: var(--themeBaseBackground);
  color: var(--themeBaseText);
  font-size: var(--fontSizeBase);
  font-weight: 500;
  margin-top: auto;
}

.nav-footer-container {
  color: var(--themeBaseMuted);
}

#total-slides {
  text-align: left;
}

#total-time {
  text-align: right;
}

#hamburger-menu {
  font-size: 2rem;
  color: var(--themeBaseText);
  z-index: 1001;
  cursor: pointer;
  position: absolute;
  right: var(--paddingLG);
  top: var(--paddingLG);
  transform: translateY(-50%);
}

/* ============================================================
   4. Components
   ============================================================ */

.dynamic-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.dynamic-overlay .overlay-content {
  position: relative;
  background: var(--themeBasePrimary);
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  border-radius: var(--radiusLG);
  padding: 20px;
}

.dynamic-overlay .close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--themeBaseText);
  cursor: pointer;
}

.dynamic-overlay.hidden {
  display: none;
}

#mobile-progress-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background-color: var(--themeBaseLight);
  z-index: 3000;
  display: none;
}

#mobile-progress-fill {
  height: 100%;
  width: 0%;
  background-color: var(--brandingPrimary);
}

#settings-container {
  position: absolute;
  background: var(--themeBasePrimary);
  border: 1px solid var(--themeBaseLight);
  border-radius: var(--radiusSM);
  padding: 0;
  z-index: 2000;
  display: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
  min-width: 200px;
  top: var(--paddingXL);
  left: 0;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--paddingSM) var(--paddingLG);
  background: var(--themeBasePrimary);
  color: var(--themeBaseText);
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
}

.setting-item:hover {
  background: var(--brandingLight);
  color: var(--themeBaseText);
}

.setting-item:last-child {
  margin-bottom: 0;
}

.btn:hover {
  background: var(--brandingLight);
}
.btn-primary {
  background: var(--brandingPrimary);
  color: var(--themeBaseText);
}
.btn-secondary {
  border: var(--borderThickness, 2px) solid var(--brandingPrimary);
  color: var(--themeBaseText);
  background: transparent;
}
.cta-buttons {
  display: flex;
  gap: var(--paddingMD);
  justify-content: left;
  margin: 0;
  align-items: start;
  margin-top: var(--paddingXL);
}

.footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  color: var(--themeBaseMuted);
  border-top: 1px solid var(--themeBaseLight);
  margin-top: 3rem;
}

.video-js {
  background-color: transparent;
}

button,
.btn {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--radiusSM);
  text-align: center;
  font-style: normal;
  text-transform: uppercase;
  padding: var(--paddingMD);
  min-height: var(--buttonsMain);
  border-width: 0px;
  cursor: pointer;
  text-decoration: none;
}

.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  color: var(--themeBaseText);
  background: var(--themeBasePrimary);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  z-index: 2000;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}

.theme-toggle input {
  margin-right: 0.5rem;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--themeBaseText);
}

.switch input {
  display: none;
}

.slider {
  position: relative;
  width: 40px;
  height: 20px;
  background-color: var(--themeBaseLight);
  border-radius: 20px;
  margin-right: 8px;
}

.slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background-color: var(--themeBaseBackground);
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: var(--brandingPrimary);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.slideNumberLabel {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: var(--themeBaseText);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 10px;
}

#progressBarFill {
  height: 5px;
  width: 0%;
  background: var(--brandingPrimary);
  margin-top: 10px;
}

.slide-video {
  width: 100%;
  max-height: 100%;
}

#playerControls {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

#transcriptPanel {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--themeBaseText);
}

#transcriptPanel.hidden #transcriptText {
  display: none;
}

#progressContainer {
  width: 100%;
  background: var(--themeBasePrimary);
  height: 5px;
  margin-top: 5px;
}

.end-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  color: var(--themeBaseText);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--paddingLG);
  z-index: 10000;
  text-align: center;
}

.end-modal h1 {
  margin-bottom: 0;
  color: var(--themeBaseText);
}

.end-modal-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-direction: column;
}

.modal-cta-buttons {
  display: flex;
  gap: var(--paddingMD);
  justify-content: center;
  align-items: center;
}

#ask-button,
#cancel-button {
  padding: var(--paddingMD);
  font-size: var(--fontSizeBase);
  border: none;
  border-radius: var(--radiusSM);
  cursor: pointer;
  color: var(--themeBaseText);
}

#ask-button {
  background-color: var(--brandingPrimary);
  color: var(--themeBaseText);
}

#cancel-button {
  border: 2px solid var(--brandingSecondary);
  color: var(--brandingSecondary);
  background-color: transparent;
}

.slide-audio {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.stage:not(:hover) .slide-audio {
  opacity: 0;
}

.nav-header {
  display: flex;
  align-items: center;
  padding: var(--paddingMD);
  background: var(--themeBasePrimary);
  color: var(--themeBaseText);
  box-sizing: border-box;
  border-bottom: var(--borderThickness) solid var(--themeBaseLight);
  width: 100%;
  position: relative;
}

.settings-icon {
  font-size: 2rem;
  color: var(--themeBaseText);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.header-names .header-title {
  font-family: Poppins;
  font-size: 2.25rem;
  font-style: normal;
  font-weight: 700;
  line-height: 120%;
  letter-spacing: 0.01125rem;
  color: var(--themeBaseText);
}

.header-title .primary {
  color: var(--themeBaseText);
}

.header-title .secondary {
  color: var(--brandingPrimary);
}

.header-skills {
  border-left: 2px solid var(--themeBaseText);
  padding-left: 4px;
}

.skills,
.languages {
  color: var(--themeBaseText);
  font-size: 0.125rem;
  font-family: Poppins;
  font-weight: 400;
  line-height: 1.4;
  word-wrap: break-word;
}

.page-title-outline {
  font-size: 300px;
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  display: flex;
  width: auto;
  height: 96rem;
  flex-direction: column;
  justify-content: center;
  position: absolute;
  left: 1.5rem;
  top: -40rem;
  color: transparent;
  -webkit-text-stroke: var(--borderThickness) var(--themeBaseText);
  text-shadow: none;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0.25;
}

/* ============================================================
   5. Utilities and Helpers
   ============================================================ */

/* (No explicit utility classes in original, this section is reserved for future helpers.) */

/* ============================================================
   6. Media Queries
   ============================================================ */

@media (max-width: 768px) {
  #hamburger-menu {
    display: block;
    margin-right: var(--paddingLG);
  }

  .stage {
    flex: 1;
  }

  #mobile-progress-bar {
    display: block;
  }
}

/* ============================================================
   7. Page-specific styles
   ============================================================ */

/* === Landing Page Styles === */

.landing-page {
  color: var(--themeBaseText);
  margin: 0;
  padding: 0;
}

.profilePicBack {
  height: 100vh;
  padding: 40px;
  width: 40%;
  position: absolute;
  left: 0;
  z-index: 0;
  top: 0;
  background-color: var(--brandingDark);
  clip-path: polygon(0px 0px, 100% 0%, 73% 100%, 0% 100%);
}
.profilePic {
  clip-path: polygon(74% 100%, 100% 0%, 0% 0%, 0% 100%);
  position: absolute;
  left: var(--paddingXL);
  z-index: 1;
  top: calc(var(--paddingXL) * 1);
  background-image: url("../img/me.jpg");
  background-size: cover;
  background-position: center;
  width: 40%;
  height: 85vh;
}

main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: var(--paddingLG);
  margin: var(--paddingLG);
  background-color: rgba(var(--themeBaseSurface-rgb), 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* for Safari support */
  text-align: left;
  width: 100%;
  border-radius: var(--radiusLG);
}

/* ============================================================
   8. Header + Main Wrapper
   ============================================================ */

.header-main-wrapper {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  height: 100vh;
  background-image: url("/assets/img/misc.png");
  background-size: cover;
  background-position: center;
  float: left;
}

.header-main-wrapper span,
.header-main-wrapper p,
.header-main-wrapper h1,
.header-main-wrapper h2 {
  padding: 0;
  margin: var(--paddingSM);
  width: 100%;
}

.header-main-wrapper .intro {
  width: 500px;
}

.header-main-wrapper .intro h1 strong {
  color: var(--brandingPrimary);
  margin-left: 16px;
}
.header-main-wrapper .material-icons {
  color: var(--brandingPrimary);
  font-size: 1.5rem;
  vertical-align: middle;
  width: var(--iconMED);
  margin-right: var(--paddingXS);
}

/* ============================================================
   09. loader styles
   ============================================================ */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* HTML: <div class="loader"></div> */
.loader {
  width: 60px;
  aspect-ratio: 1;
  border: var(--borderThickness) solid var(--brandingPrimary);
  border-radius: 50%;
  position: relative;
  transform: rotate(45deg);

  border: var(--borderThickness) solid var(--brandingPrimary);
  animation: l18 2s infinite linear;
}
@keyframes l18 {
  0% {
    clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);
  }
  25% {
    clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);
  }
  50% {
    clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);
  }
  75% {
    clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);
  }
  100% {
    clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);
  }
}

/* ============================================================
   10. Responsive Styles
   ============================================================ */

@media (max-width: 1024px) {
  .header-main-wrapper {
    flex-direction: column;
    height: 100vh;
  }

  .header-main-wrapper header,
  .header-main-wrapper main {
    flex: none;
    width: 100%;
    height: auto;
  }

  .header-main-wrapper .intro {
    width: 90%;
    max-width: 500px;
    margin: 0 auto;
  }

  .profilePicBack {
    width: 40vw;
    height: var(--borderThickness);
    margin: 0 auto;
  }

  .profilePic {
    background-position: center;
    background-size: cover;
    width: 40vw;
    height: 40vw;
    max-width: 300px;
    max-height: 300px;
    clip-path: circle(50% at 50% 50%);
    position: relative;
    left: auto;
    top: auto;
    margin: 0 auto;
  }
}
@media (max-width: 768px) {
  .header-main-wrapper span,
  .header-main-wrapper p,
  .header-main-wrapper h1,
  .header-main-wrapper h2 {
    margin: var(--paddingXS);
  }
  .cta-buttons {
    flex-direction: column;
    gap: var(--paddingLG);
    width: 100%;
  }

  .btn,
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .theme-toggle {
    top: var(--paddingSM);
    right: var(--paddingSM);
  }
  .page-title-outline {
    top: -8rem;
    left: 1rem;
  }
  .header-main-wrapper .intro {
    width: 100%;
    margin: 0 auto;
  }
  .header-main-wrapper header {
    clip-path: none;
  }
  .profilePic {
    width: 100%;
    max-width: 100%;
    height: 49vw;
    clip-path: none;
    position: relative;
    left: 0;
    top: 2px;
    margin: 0 auto;
  }
  .profilePicBack {
    width: 100%;
    clip-path: none;
    margin: 0 auto;
  }
}
