:root {
  --navy-900: #002060;
  --navy-800: #143a63;
  --navy-700: #1c4e82;
  --blue-500: #3e7cb1;
  --blue-300: #7fa9cf;
  --blue-100: #dce8f3;
  --bg: #f6f8fb;
  --white: #ffffff;
  --text: #1c2733;
  --text-muted: #5a6b7c;
  --border: #e1e7ee;
}

* { box-sizing: border-box; }

html, body {
  background-color: var(--bg);
  background-image: url('/assets/images/puzzle-tile-bg.svg');
  background-repeat: repeat;
  background-size: 480px 480px;
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Lato', -apple-system, 'Segoe UI', sans-serif;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, .brand {
  font-family: 'Lato', -apple-system, 'Segoe UI', sans-serif;
  font-weight: 800;
  color: var(--navy-900);
}

a { color: var(--blue-500); }
a:hover { color: var(--navy-800); }

/* ---------- Navbar ---------- */
.site-navbar {
  background-color: var(--navy-900) !important;
  box-shadow: 0 2px 10px rgba(0, 32, 96, 0.15);
  padding-top: .75rem;
  padding-bottom: .75rem;
}

.brand {
  color: var(--white) !important;
  font-size: 1.15rem;
  letter-spacing: .01em;
}

.nav-link-custom {
  color: rgba(255, 255, 255, 0.78) !important;
  font-weight: 600;
  padding: .5rem 1rem !important;
  border-radius: 6px;
  transition: background-color .15s ease, color .15s ease;
}

.nav-link-custom:hover {
  color: var(--white) !important;
  background-color: rgba(255, 255, 255, 0.08);
}

.nav-link-custom.active {
  color: var(--white) !important;
  background-color: var(--blue-500);
}

/* ---------- Footer ---------- */
.site-footer {
  background-color: var(--navy-900);
  color: rgba(255, 255, 255, 0.75);
  padding: 1.5rem 0;
  margin-top: 4rem;
  font-size: .9rem;
}

.site-footer a { color: var(--blue-300); }
.site-footer a:hover { color: var(--white); }

/* ---------- Hero ---------- */
.hero {
  background-image:
    url('/assets/images/puzzle-tile-bg-dark.svg'),
    linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  background-repeat: repeat, no-repeat;
  background-size: 480px 480px, cover;
  background-attachment: fixed, scroll;
  color: var(--white);
  padding: 4rem 0 5rem;
}

.hero h1 { color: var(--white); font-size: 2.6rem; margin-bottom: .25rem; }
.hero .tagline { color: var(--blue-100); font-size: 1.25rem; font-weight: 500; margin-bottom: 1.5rem; }
.hero .hero-bullet { color: rgba(255,255,255,0.92); margin-bottom: .5rem; }

.hero-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 5px solid rgba(255,255,255,0.85);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  object-fit: cover;
}

.hero-btn {
  background-color: var(--blue-500) !important;
  color: var(--white) !important;
  font-weight: 700 !important;
  border: none !important;
}
.hero-btn:hover { background-color: var(--navy-700) !important; }

.hero-btn-outline {
  background-color: transparent !important;
  color: var(--white) !important;
  border: 2px solid rgba(255,255,255,0.7) !important;
  font-weight: 700 !important;
}
.hero-btn-outline:hover { background-color: rgba(255,255,255,0.12) !important; border-color: var(--white) !important; }

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section-title {
  font-size: 1.8rem;
  margin-bottom: .5rem;
}
.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}
.section-alt {
  background-color: var(--white);
  background-image: url('/assets/images/puzzle-tile-bg.svg');
  background-repeat: repeat;
  background-size: 480px 480px;
  background-attachment: fixed;
}

/* ---------- Cards ---------- */
.pillar-card {
  border-radius: 12px;
  padding: 1.5rem;
  height: 100%;
  cursor: pointer;
  user-select: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.pillar-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 32, 96, 0.14);
}
.pillar-card.piece-light { background: rgba(220, 232, 243, 0.8); border: 1px solid var(--border); }
.pillar-card.piece-pale { background: rgba(172, 199, 224, 0.8); }
.pillar-card.piece-mid { background: rgba(62, 124, 177, 0.8); }
.pillar-card.piece-dark { background: rgba(0, 32, 96, 0.8); }
.pillar-card.pillar-selected {
  box-shadow: 0 0 0 3px var(--blue-500), 0 10px 24px rgba(0, 32, 96, 0.18);
}

.pillar-icon {
  font-size: 1.8rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  margin-bottom: .9rem;
}
.piece-mid .pillar-icon, .piece-dark .pillar-icon { background: rgba(255, 255, 255, 0.16); }
.piece-pale .pillar-icon { background: rgba(255, 255, 255, 0.4); }

/* ---------- Skills "In Depth" cards: icon-as-bullet row layout ---------- */
.skill-card-row {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
}
.skill-bullet-icon {
  flex: 0 0 auto;
  width: 1.6rem;
  font-size: 1.25rem;
  line-height: 1.4;
  text-align: center;
}
.skill-card-body { flex: 1 1 auto; min-width: 0; }

.credentials-col-cards .info-card { height: auto; }

@media (min-width: 992px) {
  .skills-col-cards { flex: 0 0 60% !important; max-width: 60% !important; }
  .skills-col-detail { flex: 0 0 40% !important; max-width: 40% !important; }
  .credentials-col-timeline { flex: 0 0 60% !important; max-width: 60% !important; }
  .credentials-col-cards { flex: 0 0 40% !important; max-width: 40% !important; }
  .employment-col-timeline { flex: 0 0 60% !important; max-width: 60% !important; }
  .employment-col-detail { flex: 0 0 40% !important; max-width: 40% !important; }
}

.pillar-card.piece-light h5, .pillar-card.piece-light p, .pillar-card.piece-light .pillar-eyebrow,
.pillar-card.piece-pale h5, .pillar-card.piece-pale p, .pillar-card.piece-pale .pillar-eyebrow { color: var(--navy-900); }
.pillar-card.piece-light p, .pillar-card.piece-pale p { color: var(--navy-800); opacity: .85; }
.pillar-card.piece-mid h5, .pillar-card.piece-mid p, .pillar-card.piece-mid .pillar-eyebrow,
.pillar-card.piece-dark h5, .pillar-card.piece-dark p, .pillar-card.piece-dark .pillar-eyebrow { color: var(--white); }
.pillar-card.piece-mid p, .pillar-card.piece-dark p { color: rgba(255, 255, 255, 0.85); }

.pillar-card h5 { margin-bottom: .4rem; font-weight: 700; }
.pillar-card p { margin-bottom: 0; font-size: .93rem; }

.pillar-hint {
  margin-top: .8rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .01em;
  opacity: .8;
}
.pillar-card.piece-light .pillar-hint, .pillar-card.piece-pale .pillar-hint { color: var(--navy-900); }
.pillar-card.piece-mid .pillar-hint, .pillar-card.piece-dark .pillar-hint { color: var(--white); }

.pillar-detail-panel-container {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  height: 100%;
  min-height: 320px;
  position: sticky;
  top: 90px;
}
.pillar-detail-panel-container h5 { margin-bottom: 1rem; }

.detail-panel-scroll {
  max-height: 550px;
  overflow-y: auto;
}

.pillar-back-link {
  display: block;
  width: fit-content;
  background: none;
  border: none;
  padding: 0;
  margin: .6rem auto 0;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  color: var(--blue-500);
  opacity: .75;
}
.pillar-back-link:hover { opacity: 1; text-decoration: underline; }
.pillar-back-link-hidden { display: none; }

.pillar-col-stack .pillar-card { height: 180px; overflow: hidden; }

.pillar-eyebrow {
  text-transform: uppercase;
  letter-spacing: .09em;
  font-size: .75rem;
  font-weight: 800;
  opacity: .7;
  margin-bottom: .8rem;
}
.pillar-detail-card {
  cursor: default;
}
.pillar-detail-card:hover { transform: none; }
.pillar-detail-card .pillar-icon { margin-bottom: 1rem; }
.pillar-detail-card h5 { font-size: 1.35rem; margin-bottom: .7rem; }
.pillar-detail-text {
  font-size: .96rem !important;
  opacity: 1 !important;
  line-height: 1.6;
  margin-bottom: 0;
}
ul.pillar-detail-text { padding-left: 1.2rem; }
ul.pillar-detail-text li { margin-bottom: .55rem; }
ul.pillar-detail-text li:last-child { margin-bottom: 0; }
.pillar-card.piece-light .pillar-detail-text { color: var(--navy-800); }
.pillar-card.piece-mid .pillar-detail-text,
.pillar-card.piece-dark .pillar-detail-text { color: rgba(255, 255, 255, 0.9); }

@media (max-width: 991px) {
  .pillar-detail-panel-container { position: static; margin-top: 1rem; }
}

.puzzle-bg-panel {
  background-image: url('/assets/images/puzzle-scatter-bg.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.quote-block { text-align: center; position: relative; }
.quote-line {
  font-style: italic;
  color: var(--navy-800);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.quote-line:last-child { margin-bottom: 0; }

.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
}
.contact-item { display: flex; align-items: center; gap: .7rem; margin-bottom: .9rem; color: var(--text); }
.contact-item:last-child { margin-bottom: 0; }
.contact-item i { color: var(--blue-500); width: 20px; text-align: center; }

/* ---------- Skill badges ---------- */
.skill-group { margin-bottom: 1.6rem; }
.skill-group h6 {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: .65rem;
}
.skill-badge {
  display: inline-block;
  background: var(--blue-100);
  color: var(--navy-800);
  border-radius: 999px;
  padding: .35rem .85rem;
  margin: 0 .4rem .4rem 0;
  font-size: .86rem;
  font-weight: 600;
}
.skill-badge.basic {
  background: transparent;
  border: 1px solid var(--blue-300);
  color: var(--blue-500);
}

/* ---------- Timeline (experience) ---------- */
.timeline { position: relative; padding-left: 2rem; border-left: 3px solid var(--blue-100); }
.timeline-item { position: relative; padding-bottom: 1.6rem; cursor: pointer; user-select: none; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -2.42rem;
  top: .3rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue-500);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 3px var(--blue-100);
  transition: box-shadow .15s ease, background-color .15s ease;
}
.timeline-item-content {
  padding: .7rem .9rem;
  border-radius: 8px;
  transition: background-color .15s ease;
}
.timeline-item:hover .timeline-item-content { background: rgba(62, 124, 177, 0.07); }
.timeline-item.job-selected .timeline-item-content { background: var(--blue-100); }
.timeline-item.job-selected .timeline-dot {
  background: var(--navy-900);
  box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--blue-500);
}
.timeline-item h5 { color: var(--navy-900); margin-bottom: .1rem; }
.timeline-org { color: var(--blue-500); font-weight: 600; margin-bottom: .1rem; }
.timeline-date { color: var(--text-muted); font-size: .88rem; margin-bottom: .6rem; }
.timeline-summary { color: var(--text); margin-bottom: .4rem; font-size: .93rem; }
.timeline-hint { color: var(--blue-500); font-size: .8rem; font-weight: 700; letter-spacing: .01em; }
.timeline-item ul { color: var(--text); padding-left: 1.1rem; margin-bottom: 0; }
.timeline-item li { margin-bottom: .35rem; }

.timeline.timeline-static .timeline-item { cursor: default; }
.timeline.timeline-static .timeline-item:hover .timeline-item-content { background: none; }
.timeline.timeline-static .timeline-item-content { padding: 0 .9rem; }
.timeline.timeline-static .timeline-item p { color: var(--text); font-size: .93rem; }

/* ---------- Job detail panel (Experience page) ---------- */
.pillar-detail-panel-container.job-detail-panel { background: rgba(255, 255, 255, 0.4); }
.job-detail-org { color: var(--blue-500); font-weight: 600; margin-bottom: .1rem; }
.job-detail-dates { color: var(--text-muted); font-size: .88rem; margin-bottom: 1rem; }
.job-detail-intro { line-height: 1.6; margin-bottom: 1.1rem; }
.job-detail-panel h6 {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: .6rem;
}
.job-detail-bullets { padding-left: 1.15rem; margin-bottom: 1.3rem; }
.job-detail-bullets li { margin-bottom: .55rem; line-height: 1.55; }
.job-detail-bullets li:last-child { margin-bottom: 0; }

/* ---------- Info cards (education / fellowships / in-depth skills) ---------- */
.info-card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  height: 100%;
}
.info-card h6 { color: var(--navy-900); font-weight: 700; margin-bottom: .3rem; }
.info-card .muted { color: var(--text-muted); font-size: .88rem; }

.info-card.piece-light { background: rgba(220, 232, 243, 0.8); border: 1px solid var(--border); }
.info-card.piece-pale { background: rgba(172, 199, 224, 0.8); border: none; }
.info-card.piece-mid { background: rgba(62, 124, 177, 0.8); border: none; }
.info-card.piece-dark { background: rgba(0, 32, 96, 0.8); border: none; }
.info-card.piece-light h6, .info-card.piece-light .muted,
.info-card.piece-pale h6, .info-card.piece-pale .muted { color: var(--navy-900); }
.info-card.piece-light .muted, .info-card.piece-pale .muted { color: var(--navy-800); opacity: .85; }
.info-card.piece-mid h6, .info-card.piece-mid .muted,
.info-card.piece-dark h6, .info-card.piece-dark .muted { color: var(--white); }
.info-card.piece-mid .muted, .info-card.piece-dark .muted { color: rgba(255, 255, 255, 0.85); }

.info-card.skill-clickable {
  cursor: pointer;
  user-select: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.info-card.skill-clickable:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 32, 96, 0.14);
}
.info-card.skill-clickable.pillar-selected {
  box-shadow: 0 0 0 3px var(--blue-500), 0 10px 24px rgba(0, 32, 96, 0.18);
}
.info-card.skill-clickable .pillar-hint { margin-top: .6rem; display: block; }
.info-card.piece-light .pillar-hint, .info-card.piece-pale .pillar-hint { color: var(--navy-900); }
.info-card.piece-mid .pillar-hint, .info-card.piece-dark .pillar-hint { color: var(--white); }

/* ---------- Portfolio ---------- */
.portfolio-tabs-wrapper { border-bottom: none !important; }
.portfolio-tabs { border-bottom: 2px solid var(--border) !important; }
.portfolio-tab {
  color: var(--navy-800) !important;
  font-weight: 600 !important;
  border-radius: 8px 8px 0 0 !important;
  background-color: var(--white) !important;
  border: 1px solid var(--border) !important;
  border-bottom: none !important;
  padding: .75rem 1.1rem !important;
}
.portfolio-tab--selected {
  background-color: var(--navy-900) !important;
  color: var(--white) !important;
  border-color: var(--navy-900) !important;
}
.portfolio-panel-img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(14,42,77,0.08);
  margin-bottom: 1rem;
}
.poster-thumb {
  width: 55%;
  display: block;
  margin: 0 auto 1rem;
  cursor: zoom-in;
  transition: opacity .15s ease;
}
.poster-thumb:hover { opacity: .85; }
.portfolio-caption {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 2.5rem;
}
.pub-item { margin-bottom: .9rem; padding-left: 1.6rem; text-indent: -1.6rem; color: var(--text); font-size: .95rem; }
.pub-item .pub-num { color: var(--blue-500); font-weight: 700; }
.pub-link { color: var(--navy-800); text-decoration: underline; text-decoration-color: var(--blue-300); text-underline-offset: 2px; }
.pub-link:hover { color: var(--blue-500); text-decoration-color: var(--blue-500); }

/* ---------- Misc ---------- */
.divider {
  height: 1px;
  background: var(--border);
  margin: 2.5rem 0;
}
.cv-download-btn {
  background-color: var(--blue-500) !important;
  border: none !important;
  font-weight: 700 !important;
}
.cv-download-btn:hover { background-color: var(--navy-800) !important; }

@media (max-width: 767px) {
  .hero { padding: 2.5rem 0 3rem; text-align: center; }
  .hero-photo { margin-bottom: 1.5rem; }
  .timeline { padding-left: 1.4rem; }
  .timeline-dot { left: -1.82rem; }
}

/* ---------- Portfolio article ---------- */
.article-section .section-title,
.article-body,
.article-glossary-item,
.article-subtitle,
.article-section > .container > p.section-subtitle {
  max-width: 720px;
}
.article-body {
  line-height: 1.7;
  margin-bottom: 1rem;
  font-size: 1.02rem;
  color: var(--text);
}
.article-subtitle {
  color: var(--navy-900);
  font-size: 1.35rem;
  margin-top: .5rem;
  margin-bottom: .8rem;
}
.article-glossary-item {
  margin-bottom: .8rem;
  line-height: 1.6;
  color: var(--text);
}
.article-glossary-item strong { color: var(--navy-900); }
