/* css styles */

/* ── Profile image: circular with accent border ───────────────────── */
img.about-image {
  border-radius: 50% !important;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  border: 4px solid #2780e3;
  box-shadow: 0 4px 20px rgba(39, 128, 227, 0.18);
}

/* ── Section headings ─────────────────────────────────────────────── */
.about-contents h2 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #2780e3;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 0.4rem;
  margin-top: 2rem;
  margin-bottom: 1.25rem;
}

/* ── About paragraph ──────────────────────────────────────────────── */
.about-contents p {
  font-size: 0.93rem;
  line-height: 1.75;
  color: #3d3d3d;
}

/* ── Experience Timeline ──────────────────────────────────────────── */
.timeline {
  border-left: 3px solid #2780e3;
  padding-left: 1.5rem;
  margin-left: 0.2rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-bottom: 0.25rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.95rem;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #2780e3;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #2780e3;
}

.timeline-item > p {
  font-size: 1rem !important;
  font-weight: 700;
  color: #212529 !important;
  margin-bottom: 0.5rem;
}

/* Role list inside each timeline item */
.role-list ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.role-list li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.18rem 0;
  font-size: 0.88rem;
}

.role-title {
  color: #343a40;
}

.role-date {
  font-size: 0.8rem;
  color: #868e96;
  white-space: nowrap;
}

/* ── Education Cards ──────────────────────────────────────────────── */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin-top: 0.25rem;
}

.edu-card {
  background-color: #f8f9fa;
  border-left: 4px solid #2780e3;
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.2rem;
}

.edu-card p {
  margin: 0 !important;
  font-size: 0.88rem !important;
  line-height: 1.65 !important;
  color: #495057 !important;
}

.edu-card p strong {
  font-size: 0.95rem;
  color: #212529;
  display: block;
  margin-bottom: 0.15rem;
}

/* ── Interests section ────────────────────────────────────────────── */
.about-contents section:last-of-type p {
  color: #495057;
}

/* ── CV download button ───────────────────────────────────────────── */
.cv-button {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  padding: 0.55rem 1rem;
  background-color: #2780e3;
  color: #fff !important;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background-color 0.15s ease;
}

.cv-button:hover {
  background-color: #1a6fc4;
}

/* ── Sidebar "Get in touch" button (outline variant) ─────────────── */
.contact-button {
  display: block;
  text-align: center;
  margin-top: 0.6rem;
  padding: 0.55rem 1rem;
  background-color: transparent;
  color: #2780e3 !important;
  border: 1.5px solid #2780e3;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.contact-button:hover {
  background-color: #2780e3;
  color: #fff !important;
}

/* ── Sidebar typewriter loop (interests) ──────────────────────────── */
.typewriter-line {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
  text-align: center;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2780e3;
  min-height: 1.4rem;
  white-space: nowrap;
}

.typewriter-cursor {
  display: inline-block;
  animation: tw-blink 0.8s step-end infinite;
}

@keyframes tw-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ── Sidebar secondary link (e.g. to Consulting page) ─────────────── */
.sidebar-link {
  display: block;
  text-align: center;
  margin-top: 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #868e96 !important;
  text-decoration: none !important;
}

.sidebar-link:hover {
  color: #2780e3 !important;
  text-decoration: underline !important;
}

/* ── Responsive: stack edu cards on narrow screens ───────────────── */
@media (max-width: 600px) {
  .edu-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════════
   Shared styling for standard content pages (Consulting, Work, etc.)
   Mirrors the look of the About page so the whole site feels of a
   piece: accent-blue uppercase h2s, timeline entries, card grids.
   ══════════════════════════════════════════════════════════════════ */

.page-contents h2 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #2780e3;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 0.4rem;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
}

.page-contents h2:first-child {
  margin-top: 0;
}

.page-contents h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: #212529;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.page-contents p,
.page-contents li {
  font-size: 0.93rem;
  line-height: 1.75;
  color: #3d3d3d;
}

.page-contents ul {
  padding-left: 1.2rem;
}

.page-contents li {
  margin-bottom: 0.4rem;
}

/* Muted inline tag for funder / amount references */
.tag {
  color: #868e96;
  font-size: 0.85rem;
  font-weight: 400;
}

/* Prominent call-to-action button (mailto links etc.) */
.cta-button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1.4rem;
  background-color: #2780e3;
  color: #fff !important;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background-color 0.15s ease;
}

.cta-button:hover {
  background-color: #1a6fc4;
}

/* Understated back-to-home style link */
.back-link {
  display: inline-block;
  margin-top: 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2780e3 !important;
  text-decoration: none !important;
}

.back-link:hover {
  text-decoration: underline !important;
}

@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════════
   Publications / Reports cards
   ══════════════════════════════════════════════════════════════════ */

.pub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  margin-top: 0.25rem;
}

.pub-card {
  position: relative;
  background-color: #f8f9fa;
  border-radius: 6px;
  padding: 1.1rem 1.3rem;
}

.pub-card h3 {
  font-size: 1rem !important;
  font-weight: 700;
  color: #212529;
  margin: 0 0 0.3rem 0 !important;
  padding-right: 5.5rem;
}

.pub-meta {
  font-size: 0.82rem;
  color: #868e96;
  margin-bottom: 0.6rem;
}

.pub-meta strong {
  color: #495057;
  font-weight: 600;
}

.pub-card p.pub-abstract {
  font-size: 0.9rem !important;
  line-height: 1.65 !important;
  color: #495057 !important;
  margin: 0 0 0.85rem 0 !important;
}

.pub-card p.pub-note {
  font-size: 0.82rem !important;
  color: #868e96 !important;
  margin: 0 0 0.6rem 0 !important;
}

.pub-type-badge {
  position: absolute;
  top: 1.1rem;
  right: 1.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2780e3;
  background-color: rgba(39, 128, 227, 0.1);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pub-link-btn {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.32rem 0.75rem;
  border-radius: 5px;
  text-decoration: none !important;
  border: 1.5px solid #2780e3;
  color: #2780e3 !important;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.pub-link-btn:hover {
  background-color: #2780e3;
  color: #fff !important;
}

.pub-link-btn.is-code {
  border-color: #495057;
  color: #495057 !important;
}

.pub-link-btn.is-code:hover {
  background-color: #495057;
  color: #fff !important;
}

@media (max-width: 600px) {
  .pub-card h3 {
    padding-right: 0;
  }

  .pub-type-badge {
    position: static;
    display: inline-block;
    margin-bottom: 0.5rem;
  }
}
