/* fixes.css — overrides and additions for accessibility, CTA, and cleanup */

/* =====================================================
   CSS Custom Properties (theme colors)
   ===================================================== */
:root {
  --primary: #5050f5;
  --primary-hover: #3d3dd4;
  --bg-dark: #222;
  --bg-card: #333;
  --bg-card-alt: #444;
  --border: #555;
  --text-primary: #f5f5f5;
  --text-body: #d5d5d5;
  --text-secondary: #c0c0c0;  /* bumped from #aaa for WCAG AA contrast */
  --text-muted: #999;
  --error: #ff4c4c;
  --success: #4caf50;
}

/* =====================================================
   Link color — match theme (override template cyan)
   ===================================================== */
a {
  color: var(--primary);
}

a:hover,
a:focus {
  color: var(--primary-hover);
}

/* =====================================================
   Focus states — visible outlines for keyboard users
   ===================================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.btn:focus-visible,
.nav-anim:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* =====================================================
   Color contrast fixes (WCAG AA compliance)
   ===================================================== */

/* Secondary text — bump from #aaa/#a5a6a7 to #c0c0c0 */
.item-company,
.item-period,
.copyrights,
.fun-fact-block-text,
.lm-info-block-text,
.info-list .title {
  color: var(--text-secondary);
}

/* Muted text should still be readable */
.help-block {
  color: var(--text-muted);
}

/* =====================================================
   Skip-to-content link (visible on focus)
   ===================================================== */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 8px 20px;
  border-radius: 0 0 6px 6px;
  z-index: 10000;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: 0;
  color: #fff;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* =====================================================
   h1 in sidebar — match original h2 sizing
   ===================================================== */
.header-titles h1 {
  font-size: 36px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2em;
}

.header-subtitle {
  font-size: 18px;
  font-weight: 300;
  color: #bbb;
  margin: 4px 0 0 0;
}

@media only screen and (max-width: 1024px) {
  .header-titles h1 {
    font-size: 30px;
    margin-bottom: 10px;
  }

  .header-subtitle {
    font-size: 17px;
  }
}

/* =====================================================
   Home page CTA buttons
   ===================================================== */
.home-cta {
  margin-top: 30px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.home-cta .btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.home-cta .btn-primary {
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--primary);
}

.home-cta .btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.home-cta .btn-secondary {
  background: transparent;
  color: var(--text-body);
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.home-cta .btn-secondary:hover {
  border-color: var(--primary);
  color: #fff;
}

/* =====================================================
   Download CV button in sidebar
   ===================================================== */
.header-buttons {
  text-align: center;
  margin: 15px 0;
}

.header-buttons .btn-primary {
  display: inline-block;
  padding: 8px 24px;
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--primary);
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.header-buttons .btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* =====================================================
   Layout and element fixes
   ===================================================== */

/* Ensure nav wrapper doesn't break existing menu styles */
header nav {
  display: block;
}

/* Fix button reset for menu-toggle (changed from div to button) */
button.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
}

/* Footer styling in sidebar */
footer.copyrights {
  display: block;
}

/* Remove arrow navigation */
.lmpixels-arrows-nav {
  display: none !important;
}

/* =====================================================
   Native scroll (replacing perfect-scrollbar)
   ===================================================== */
.animated-section {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
}

.animated-section::-webkit-scrollbar {
  width: 6px;
}

.animated-section::-webkit-scrollbar-track {
  background: transparent;
}

.animated-section::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.animated-section::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Hide perfect-scrollbar rail remnants */
.ps__scrollbar-y-rail,
.ps__rail-y {
  display: none !important;
}
