/* ==========================================================
   Resume page – web-craftsman.com
   Load AFTER css/main.css:
   <link rel="stylesheet" href="css/resume-timeline.css">
   ========================================================== */

/* ---------- 1. Layout: timeline full width, side blocks below in 2 columns ---------- */
section[data-id="resume"] .col-md-8.subpage-block,
section[data-id="resume"] .row > .col-md-4 {
  float: none;
  width: 100%;
}

section[data-id="resume"] .row > .col-md-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 64px;
  align-items: start;
  margin-top: 24px;
}
section[data-id="resume"] .row > .col-md-4 > .subpage-block:nth-child(1) { grid-column: 1; grid-row: 1; }
section[data-id="resume"] .row > .col-md-4 > .subpage-block:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; }
section[data-id="resume"] .row > .col-md-4 > .subpage-block:nth-child(3) { grid-column: 1; grid-row: 2; }


/* ---------- 2. Experience timeline (staggered) ---------- */
section[data-id="resume"] .col-md-8 > .timeline {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 64px 1fr;
  row-gap: 24px;
  border-left: 0;
  padding: 8px 0 40px;
}

/* the line: solid at "now", fading into the past */
section[data-id="resume"] .col-md-8 > .timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-1px);
  background: linear-gradient(to bottom, #222 0%, #222 35%, #bbb 80%, rgba(187,187,187,0) 100%);
}

section[data-id="resume"] .col-md-8 > .timeline > .timeline-event {
  position: relative;
  padding: 0;
  text-align: left;
  max-width: 34em;           /* keeps lines near 65 characters */
}
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(odd)  { grid-column: 1; justify-self: end; width: 100%; }
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(even) { grid-column: 3; justify-self: start; width: 100%; }

/* each job spans two rows and starts one row after the previous one,
   so the two sides interlock instead of leaving empty gaps */
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(1)  { grid-row: 1 / span 2; }
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(2)  { grid-row: 2 / span 2; }
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(3)  { grid-row: 3 / span 2; }
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(4)  { grid-row: 4 / span 2; }
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(5)  { grid-row: 5 / span 2; }
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(6)  { grid-row: 6 / span 2; }
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(7)  { grid-row: 7 / span 2; }
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(8)  { grid-row: 8 / span 2; }
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(9)  { grid-row: 9 / span 2; }
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(10) { grid-row: 10 / span 2; }
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(11) { grid-row: 11 / span 2; }
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(12) { grid-row: 12 / span 2; }

/* square marker on the line */
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event::after {
  content: "";
  position: absolute;
  top: 4px;
  box-sizing: border-box;
  width: 13px;
  height: 13px;
  background: #fff;
  border: 2px solid #222;
  transition: background .2s;
}
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(odd)::after  { right: -38.5px; }
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(even)::after { left: -38.5px; }
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:first-child::after,
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:hover::after {
  background: #222;
}

/* date badge */
section[data-id="resume"] .col-md-8 > .timeline .event-date {
  margin: 0 0 3px;
  padding: 5px 8px;
  transition: transform .2s;
}
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(odd):hover .event-date  { transform: translateX(4px); }
section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(even):hover .event-date { transform: translateX(-4px); }

/* company and role */
section[data-id="resume"] .col-md-8 > .timeline .event-name {
  font-size: 19px;
  font-weight: 700;
  margin-top: 12px;
  color: #222;
}
section[data-id="resume"] .col-md-8 > .timeline .event-description {
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #767676;
  margin: 2px 0 10px;
}

/* paragraph and bullets */
section[data-id="resume"] .col-md-8 > .timeline p {
  margin: 0 0 12px;
}
section[data-id="resume"] .col-md-8 > .timeline ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
section[data-id="resume"] .col-md-8 > .timeline li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 4px;
}
section[data-id="resume"] .col-md-8 > .timeline li::before {
  content: "";
  position: absolute;
  top: .6em;
  left: 2px;
  width: 5px;
  height: 5px;
  background: #222;
}


/* ---------- 3. Education: bracket cards ---------- */
section[data-id="resume"] .col-md-4 .timeline {
  border-left: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
section[data-id="resume"] .col-md-4 .timeline-event {
  position: relative;
  padding: 18px 18px 6px;
  border: 1px solid #e5e5e5;
  transition: transform .2s;
}
section[data-id="resume"] .col-md-4 .timeline-event::before,
section[data-id="resume"] .col-md-4 .timeline-event::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  transition: width .3s, height .3s;
}
section[data-id="resume"] .col-md-4 .timeline-event::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid #222;
  border-left: 2px solid #222;
}
section[data-id="resume"] .col-md-4 .timeline-event::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid #222;
  border-right: 2px solid #222;
}
section[data-id="resume"] .col-md-4 .timeline-event:hover { transform: translateY(-2px); }
section[data-id="resume"] .col-md-4 .timeline-event:hover::before,
section[data-id="resume"] .col-md-4 .timeline-event:hover::after {
  width: calc(100% + 2px);
  height: calc(100% + 2px);
}
section[data-id="resume"] .col-md-4 .timeline .event-date {
  margin: 0 0 3px;
  padding: 5px 8px;
}
section[data-id="resume"] .col-md-4 .timeline .event-name { font-weight: 700; }


/* ---------- 4. Languages: five-block meters ---------- */
section[data-id="resume"] .skill-container {
  position: relative;
  height: 8px;
  border: 0;
  background: #e5e5e5;
  margin-bottom: 16px;
}
section[data-id="resume"] .skill-percentage {
  height: 8px;
  border: 0;
}
/* white gaps cut the bar into 5 blocks */
section[data-id="resume"] .skill-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to right,
    transparent 0, transparent calc(20% - 4px),
    #fff calc(20% - 4px), #fff 20%);
  pointer-events: none;
}
section[data-id="resume"] .skills-info h4 {
  font-size: 14px;
  margin-bottom: 6px;
}


/* ---------- 5. Social media: outlined buttons ---------- */
section[data-id="resume"] .col-md-4 > .subpage-block:nth-child(3) .skills-info:last-child ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
section[data-id="resume"] .col-md-4 > .subpage-block:nth-child(3) .skills-info:last-child a {
  display: inline-block;
  padding: 7px 14px;
  border: 2px solid #222;
  color: #222;
  font-size: 14px;
  text-decoration: none;
  transition: background .2s, color .2s;
}
section[data-id="resume"] .col-md-4 > .subpage-block:nth-child(3) .skills-info:last-child a:hover,
section[data-id="resume"] .col-md-4 > .subpage-block:nth-child(3) .skills-info:last-child a:focus-visible {
  background: #222;
  color: #fff;
}


/* ---------- Phones ---------- */
@media (max-width: 640px) {
  section[data-id="resume"] .row > .col-md-4 { display: block; }

  section[data-id="resume"] .col-md-8 > .timeline {
    grid-template-columns: 1fr;
    padding-left: 32px;
  }
  section[data-id="resume"] .col-md-8 > .timeline::before { left: 7px; }
  section[data-id="resume"] .col-md-8 > .timeline > .timeline-event,
  section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(n) {
    grid-column: 1;
    grid-row: auto;
    max-width: none;
  }
  section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(n)::after {
    left: -31.5px;
    right: auto;
  }
  section[data-id="resume"] .col-md-8 > .timeline > .timeline-event:nth-child(n):hover .event-date {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  section[data-id="resume"] *,
  section[data-id="resume"] *::before,
  section[data-id="resume"] *::after { transition: none !important; }
}