/* Timeline custom component */
.timeline-card {
  position: relative;
  margin-left: 16px;
}

.timeline-card:before {
  content: "";
  display: inline-block;
  position: absolute;
  background-color: #fff;
  border-radius: 100%;
  width: 24px;
  height: 24px;
  top: 16px;
  left: -12px;
  border: 5px solid;
  z-index: 2;
}

.timeline-body {
  border-left: 2px solid #e6e9ed;
}

.timeline-card-primary:before {
  border-color: var(--bs-primary);
}

.timeline-card-info:before {
  border-color: var(--bs-info);
}

.timeline-card-secondary:before {
  border-color: var(--bs-secondary);
}

.timeline-card-success:before {
  border-color: var(--bs-teal);
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
}

.container {
  max-width: 1140px;
}

.site-title {
  font-size: 1.25rem;
  line-height: 2.5rem;
}

.nav-link {
  padding: 0;
  font-size: 1rem;
  line-height: 2.5rem;
  color: inherit;
  opacity: 0.8;
}

.header-social .nav-link {
  font-size: 1.25rem;
}

.nav-link:hover,
.nav-link:focus {
  color: inherit;
  opacity: 1;
}

.nav-item + .nav-item {
  margin-left: 1rem;
}

.cover {
  height: 380px;
}

@media screen and (max-width: 1030px) {
  .cover {
    height: 420px;
  }
}

.cover > img {
  -o-object-fit: cover;
  object-fit: cover;
  width: auto;
}

.progress-bar {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 1px;
}

/* Collapsible skill categories */
.skill-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: linear-gradient(135deg, #5bc0de 0%, #31b0d5 100%);
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.skill-category-header:hover {
  background: linear-gradient(135deg, #31b0d5 0%, #269abc 100%);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.skill-category-header.bg-secondary-style {
  background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
}

.skill-category-header.bg-secondary-style:hover {
  background: linear-gradient(135deg, #545b62 0%, #3d4348 100%);
}

.skill-category-header .skill-toggle-icon {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.skill-category-header.expanded .skill-toggle-icon {
  transform: rotate(180deg);
}

.skill-category-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease, margin 0.3s ease;
  padding-top: 0;
  margin-top: 0;
}

.skill-category-body.expanded {
  max-height: 600px;
  padding-top: 8px;
  margin-top: 4px;
}

/* Skill categories — compact single-column layout */
.skill-category-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
}

.skill-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 450;
  padding: 4px 10px;
  margin: 0 4px 6px 0;
  letter-spacing: 0.2px;
  border-radius: 3px;
  background: rgba(56, 189, 248, 0.07);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.15);
  transition: background 0.2s, border-color 0.2s;
}

.skill-badge:hover {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.3);
}

.text-small {
  font-size: 0.85rem;
}

.text-teal {
  color: var(--bs-teal);
}

footer a:not(.nav-link) {
  color: inherit;
  border-bottom: 1px dashed;
  text-decoration: none;
  cursor: pointer;
}

@media (min-width: 48em) {
  .site-title {
    float: left;
  }
  .site-nav {
    float: right;
  }
}

@media (max-width: 767px) {
  /* disable animations on mobile */
  [data-aos] {
    opacity: 1 !important;
    transform: translate(0) scale(1) !important;
  }
  .p-5 {
    padding: 2.5rem 2rem !important;
  }
  .portfolio-section .m-5 {
    margin: 2rem 0 1rem !important;
  }
  .portfolio-reverse {
    flex-direction: column-reverse;
  }
  .portfolio-reverse .text-end {
    text-align: start !important;
  }
}
.mask {
  display: flex;
  flex-wrap: wrap;
}
.avatar-box.left {
  margin-top: 40px;
  flex: 0 0 auto; /* Don't grow or shrink, maintain initial width */
  /* border: 1px solid #000; */
  padding: 20px; /* Adjust as needed */
  box-sizing: border-box; /* Include padding in width calculation */
}
.avatar-box.right {
  flex: 1; /* Grow to take remaining space */
  /* border: 1px solid #000; */
  padding: 20px; /* Adjust as needed */
  box-sizing: border-box; /* Include padding in width calculation */
}
/* Media query for smaller screens */
@media screen and (max-width: 800px) {
  .avatar-box.left {
    padding: 0px; /* Adjust as needed */
    height: fit-content;
  }
  .avatar-box {
    width: 100%; /* Make the boxes take full width */
  }
  .cover {
    height: 600px;
  }
  .me-conditional {
    margin-right: 0.1rem !important;
    margin-left: 0.1rem !important;
  }
}
@media screen and (min-width: 800px) {
  .avatar-box.left {
    margin: 10px;
    width: 25%;
  }
  .avatar-box.right {
    margin-right: 150px;
  }
  .me-conditional {
    margin-right: 0.75rem !important;
    margin-left: 0.75rem !important;
  }
}
.avatar img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  margin: auto;
}
.avatar-box {
  display: flex;
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically */
}

/* =============================================
   Dark Theme — Tailwind Slate palette
   Background: #0f172a  Surface: #1e293b
   Accent: #38bdf8       Muted: #94a3b8
   ============================================= */

:root {
  --bg-primary: #0f172a;
  --bg-surface: #1e293b;
  --bg-elevated: #273549;
  --border: #334155;
  --text-body: #cbd5e1;
  --text-heading: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --accent-secondary: #64748b;
}

body.bg-light {
  background-color: var(--bg-primary) !important;
  color: var(--text-body);
}

/* Cards and surfaces */
.bg-white,
.shadow-1-strong {
  background-color: var(--bg-surface) !important;
  color: var(--text-body);
}

.shadow-1-strong {
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--text-heading);
}

.text-muted {
  color: var(--text-muted) !important;
}

.former-name {
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.4;
  font-weight: 400;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.text-dark {
  color: var(--text-heading) !important;
}

p, div {
  color: inherit;
}

span {
  color: inherit;
}

a {
  color: var(--accent);
}
a:hover {
  color: var(--accent-hover);
}

/* Header */
.site-title {
  color: var(--text-heading);
}

.nav-link {
  color: var(--text-muted);
}
.nav-link:hover,
.nav-link:focus {
  color: var(--text-heading);
}

/* Header banner */
.bg-info {
  background-color: var(--bg-surface) !important;
  background-image: linear-gradient(135deg, #1a2d40 0%, #0f172a 100%);
}

/* Timeline */
.timeline-card:before {
  background-color: var(--bg-surface);
}

.timeline-body {
  border-left-color: var(--border);
}

.timeline-card-info:before {
  border-color: var(--accent);
}

.timeline-card-success:before {
  border-color: #34d399;
}

.timeline-card-secondary:before {
  border-color: var(--accent-secondary);
}

/* Buttons */
.btn-outline-light {
  color: var(--text-body);
  border-color: var(--border);
}
.btn-outline-light:hover {
  background-color: var(--border);
  color: var(--text-heading);
}

.btn-info {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #0f172a !important;
}
.btn-info:hover {
  background-color: var(--accent-hover) !important;
}

/* Form elements */
.form-control {
  background-color: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text-body) !important;
}
.form-control::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.6;
}
.form-control:focus {
  background-color: var(--bg-elevated);
  border-color: var(--accent);
  color: var(--text-heading) !important;
}

.form-label {
  color: var(--text-muted) !important;
}

.form-outline .form-control:focus ~ .form-label {
  color: var(--accent) !important;
}

/* Footer */
footer {
  color: var(--text-muted) !important;
}

/* Bio section links */
.about-section a,
.bio-section a {
  color: var(--accent);
}

/* Progress bars (if any remain) */
.progress {
  background-color: var(--bg-elevated);
}

/* Dark theme list items in timeline cards */
.timeline-body ul {
  color: var(--text-body);
}
.timeline-body ul li {
  margin-bottom: 3px;
}
.timeline-body ul li:last-child {
  margin-bottom: 0;
}

/* Interests section */
.links-section a.text-dark,
.links-section a.fw-bolder {
  color: var(--accent) !important;
}
.links-section .text-danger {
  color: #f87171 !important;
}
.links-section .text-info {
  color: var(--accent) !important;
}
.links-section .text-secondary {
  color: var(--text-muted) !important;
}

/* Header text overrides for dark banner */
.bg-info.text-white,
.bg-info .text-white {
  color: var(--text-heading) !important;
}

.text-white-50 {
  color: var(--text-muted) !important;
}

@media print {
  @page { margin: 1.6cm 1.4cm; size: A4; }

  /* =========================================================
     LAYER 1 — kill every dark-theme leak at the root
     ========================================================= */

  /* white page */
  html, body, .page-content, .container, .resume-container,
  .shadow-1-strong, .bg-white, .bg-light, .bg-info,
  .cover, .mask, #intro, #about, #skills, #experience,
  #education, #links, .about-section, .skills-section,
  .work-experience-section, .education-section, .links-section {
    background: #fff !important;
    box-shadow: none !important;
  }

  /* black text — kills var(--text-body) / var(--text-heading) leaks */
  html, body, p, div, span, li, a, td, th,
  h1, h2, h3, h4, h5, h6,
  .h1, .h2, .h3, .h4, .h5, .h6,
  .text-white, .text-dark, .text-muted, .fw-bolder,
  .skill-badge, .skill-category-label, .skill-category-header,
  .timeline-head .h5, .timeline-head .h6,
  .timeline-body, .timeline-body ul, .timeline-body li,
  .timeline-body p, .timeline-body div,
  .about-section p, .about-section a,
  .links-section a, .links-section span,
  .header-bio p, .header-bio span, .header-bio div {
    color: #1a1a1a !important;
  }

  /* softer grey for secondary text */
  .text-muted, .timeline-body .text-muted, .timeline-body .text-small {
    color: #666 !important;
  }

  /* ---- body ---- */
  body {
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 10pt;
    line-height: 1.45;
  }

  /* ---- hide chrome ---- */
  header, footer, nav, .d-print-none,
  .header-social, .btn, button, form, iframe,
  .skill-toggle-icon, .former-name,
  .site-title, .site-nav,
  #contact {
    display: none !important;
  }

  /* ---- kill animations ---- */
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }

  /* ---- layout: compact spacing ---- */
  .container { max-width: 100%; padding: 0; }
  .resume-container > .my-5 { margin: 0 !important; }
  .shadow-1-strong { margin-bottom: 12pt !important; }
  .p-5 { padding: 12pt 0 !important; }
  .p-4 { padding: 10pt 0 !important; }

  /* ---- banner: picture left, name right ---- */
  .cover { height: auto !important; margin-bottom: 6pt; }
  .cover > img { display: none; }
  .mask {
    backdrop-filter: none !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 18px;
    padding: 10pt 14pt !important;
    border-bottom: 1.5pt solid #1a1a1a;
  }
  .avatar-box.left {
    display: block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .avatar-box.left img {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 1.5pt solid #ccc !important;
  }
  .avatar-box.right {
    display: block !important;
    flex: 1 !important;
    text-align: left !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* ---- header typography ---- */
  #intro { margin-bottom: 0 !important; }
  #intro .h1 { font-size: 18pt; margin: 0 0 2pt 0; font-weight: 700; }
  #intro p { font-size: 9pt; margin: 0 0 2pt 0; }
  #intro .text-white-50 { display: none !important; }

  /* ---- section headings ---- */
  h2.h2 {
    font-size: 10.5pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1pt;
    border-bottom: 1pt solid #1a1a1a;
    padding-bottom: 3pt;
    margin: 12pt 0 5pt 0;
    page-break-after: avoid;
  }

  /* ---- about section ---- */
  .about-section { padding: 0 !important; }
  .about-section h2 { display: none; }
  .about-section .row.mt-2 { font-size: 8pt; }
  .about-section .col-sm-5 i,
  .about-section .col-sm-7 i { display: none; }

  /* ---- skills: inline text ---- */
  .skill-category-body { max-height: none !important; overflow: visible !important; }
  .skill-category-header {
    background: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    font-size: 9pt !important;
    margin-bottom: 2pt;
  }
  .skill-category-label {
    font-size: 9pt;
    font-weight: 700;
    border: none;
    padding: 0;
  }
  .skill-badge {
    display: inline !important;
    font-size: 9pt;
    padding: 0;
    margin: 0;
    background: none !important;
    border: none !important;
  }
  .skill-badge::after { content: " · "; }
  .skill-badge:last-child::after { content: ""; }

  /* ---- timeline: keep structure ---- */
  .timeline-card { page-break-inside: avoid; }
  .timeline-card:before { display: none !important; }
  .timeline-body { border-left: 1.5pt solid #ccc !important; }
  .timeline-head .h5 { font-size: 10pt; font-weight: 700; }
  .timeline-head .h6 { font-size: 9pt; display: inline; margin-left: 4pt; }
  .timeline-body ul { font-size: 9pt; padding-left: 14pt; }
  .timeline-body ul li { margin-bottom: 2pt; line-height: 1.3; }

  /* ---- interests: compact ---- */
  .links-section .row { display: block; }
  .links-section .col-md-6 { display: inline; width: auto; }
  .links-section .mb-4, .links-section .mb-3 { display: inline; margin: 0 8pt 0 0 !important; }
  .links-section i { display: none; }
  .links-section .text-muted { display: none; }
}
