@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@100..900&display=swap');

:root[data-bs-theme="light"] {
  --text: #0f1116;
  --background: #fbfbfc;
  --primary: #556bc2;
  --secondary: #c1adc6;
  --accent: #ae8aa9;
  --card-background: #ffffff;
  --card-background-elevated: #fdfdfd;
  --card-border: rgba(0, 0, 0, 0.08);
  --skill-hover-bg: rgba(0, 0, 0, 0.04);
  --skill-name-hover: #2d4dd2;
}
:root[data-bs-theme="dark"] {
  --text: #eaecf1;
  --background: #020203;
  --primary: #3d52a9;
  --secondary: #4c3851;
  --accent: #755271;
  --card-background: #111217;
  --card-background-elevated: #1b1f2c;
  --card-border: rgba(255, 255, 255, 0.12);
  --skill-hover-bg: rgba(255, 255, 255, 0.08);
  --skill-name-hover: #97a9e9;
}


body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;

  font-family: 'Alexandria', Tahoma, Geneva, Verdana, sans-serif !important;
  font-weight: 300 !important;
  color: var(--text) !important;
  background-color: var(--background) !important;

  overflow-x: hidden;
}

.profile-image {
  object-fit: cover;
  aspect-ratio: 1 / 1 !important;
  object-position: top;

  max-width: 300px;
  max-height: 300px;

  flex-grow: 1;

  border-radius: 25% 0% 25% 25%;
}

.about-text {
  white-space: pre-line;
  max-width: 720px;
}

.description {
  white-space: pre-line;
}

.about-header {
  display: flex;
  flex-direction: column;
  align-items: end;
}

.cv-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0.65rem 0 1rem;
  padding: 0.75rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(85, 107, 194, 0.22);
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.cv-download-button:hover {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 12px 26px rgba(85, 107, 194, 0.3);
}

.cv-download-button:focus-visible {
  color: #fff;
  outline: 3px solid rgba(174, 138, 169, 0.55);
  outline-offset: 3px;
  box-shadow: 0 10px 24px rgba(85, 107, 194, 0.28);
}

.cv-download-button:active {
  transform: translateY(0);
}

.lang-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.2rem;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 200ms ease, box-shadow 200ms ease;
  text-decoration: none;
}

.lang-toggle:hover,
.lang-toggle:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.2rem;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  filter: brightness(1.05);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Misc */

.animation .letter {
    transition-duration: 0.3s;
}

/* ─── Experience / Timeline Section ───────────────────────────── */

.experience-section {
  position: relative;
  padding-bottom: 2rem;
}

/* The vertical spine */
.timeline {
  position: relative;
  padding: 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  opacity: 0.18;
  border-radius: 2px;
  transform: translateX(-50%);
}

.timeline-items {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item + .timeline-item {
  margin-top: -2rem;
}

/* Each experience row */
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  border: none;
  background: transparent !important;
  opacity: 0;
  transform: translateY(28px);
  transition: transform 600ms cubic-bezier(.2,.9,.2,1), opacity 500ms ease;
}

.timeline-item.in-view {
  opacity: 1;
  transform: none;
}

/* The centre marker column */
.timeline-marker {
  grid-column: 2;
  position: relative;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 14px rgba(0,0,0,0.1),
    0 0 0 4px var(--background);
  transition: transform 280ms ease, box-shadow 280ms ease;
}

.timeline-item.in-view:hover .timeline-marker {
  transform: scale(1.12);
  box-shadow:
    0 6px 20px rgba(0,0,0,0.14),
    0 0 0 4px var(--background);
}

.timeline-marker i {
  font-size: 1.1rem;
  line-height: 1;
  color: #fff;
}

/* Card placement: odd items → left, even items → right */
.timeline-item .card-body {
  background: var(--card-background);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  position: relative;
  transition: transform 280ms ease, box-shadow 280ms ease, border-color 280ms ease;
}

.timeline-item:nth-child(odd) .card-body {
  grid-column: 1;
  grid-row: 1;
  margin-right: 1.25rem;
  border-left: 3px solid var(--primary);
}

.timeline-item:nth-child(even) .card-body {
  grid-column: 3;
  grid-row: 1;
  margin-left: 1.25rem;
  border-right: 3px solid var(--accent);
}

/* Hover lift */
.timeline-item.in-view:hover .card-body {
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.09);
  border-color: transparent;
  border-left-color: var(--primary);
}

.timeline-item:nth-child(even).in-view:hover .card-body {
  border-left-color: transparent;
  border-right-color: var(--accent);
}

/* Card inner layout */
.exp-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.exp-company {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.exp-dates {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--primary);
  white-space: nowrap;
  opacity: 0.85;
  letter-spacing: 0.02em;
}

.exp-description {
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 0.85rem;
  color: var(--text);
  opacity: 0.82;
}

/* Skill tags */
.exp-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.exp-skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 400;
  background: rgba(85,107,194,0.08);
  color: var(--primary);
  border: 1px solid rgba(85,107,194,0.15);
  transition: background-color 200ms ease, transform 200ms ease;
  cursor: default;
}

.exp-skill-tag i {
  font-size: 0.8rem;
}

.exp-skill-tag:hover {
  background: rgba(85,107,194,0.16);
  transform: translateY(-1px);
}

/* ─── Responsive: mobile single-column ─────────────────────── */
@media (max-width: 768px) {
  .timeline-line {
    left: 22px;
  }

  .timeline-items {
    gap: 1.75rem;
  }

  .timeline-item + .timeline-item {
    margin-top: 0;
  }

  .timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 0;
  }

  .timeline-marker {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .timeline-marker i {
    font-size: 0.95rem;
  }

  .timeline-item .card-body {
    margin-left: 1rem !important;
    margin-right: 0 !important;
    border-right: none !important;
    border-left: 3px solid var(--primary) !important;
  }

  .exp-header {
    flex-direction: column;
    gap: 0.2rem;
  }
}

/* Academic section styles */
.academic-row { margin-top: 1rem; gap: 1.5rem; }
.academic-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.academic-item {
  padding: 10px 6px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: transform 200ms ease, box-shadow 220ms ease, background-color 200ms ease;
}
.academic-item h4 { margin: 0 0 4px 0; font-size: 1.05rem; }
.academic-item .meta { color: #666; font-size: 0.9rem; }

.academic-item:hover,
.academic-item:focus-within {
  transform: translateY(-4px);
  background-color: rgba(0,0,0,0.02);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.academic-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.01));
  border-radius: 8px;
  padding: 12px;
  min-height: 220px;
}
.academic-img img { max-width: 100%; max-height: 380px; object-fit: contain; border-radius: 8px; }

@media (max-width: 768px) {
  .about-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .about-header {
    align-items: stretch;
    order: -1;
  }

  .about-header h1,
  .about-header h4 {
    text-align: center;
  }

  .cv-download-button {
    width: 100%;
    min-height: 46px;
  }

  .profile-image {
    align-self: center;
  }

  .academic-row { display: block; }
  .academic-placeholder { margin-top: 1rem; }
}

.exp-role {
  margin: 0.2rem 0 0;
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 500;
}

/* Skills Section Styles */

/* Skills Categories Layout */
.skills-categories-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.skill-category {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-category-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  opacity: 0.8;
  margin: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--card-border);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.skill-card {
  background: var(--card-background);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
  cursor: default;
}

.skill-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  background-color: var(--card-background-elevated);
  border-color: transparent;
}

.skill-icon {
  font-size: 1.5rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px; 
}

.skill-name {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 400;
  line-height: 1.2;
}

/* Languages and core competencies */
.skills-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.skill-item {
  transition: transform 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
  will-change: transform, box-shadow;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: var(--card-background);
}

/* Subtle hover effect for competencies */
@media (hover: hover) and (pointer: fine) {
  .skill-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.06);
    background-color: var(--skill-hover-bg);
  }

  .skill-item:hover .skill-name {
    color: var(--skill-name-hover);
  }

}

.skill-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.skill-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.skill-detail {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .skill-grid {
    grid-template-columns: 1fr;
  }
  
  .skills-list {
    grid-template-columns: 1fr;
  }
}
