:root {
  --bg: #f6f7fb;
  --bg-panel: rgba(255, 255, 255, 0.6);
  --heading-color: #1a2340;
  --body-color: #444b5e;
  --details-color: #737a8c;
  --accent: #d4a24c;
  --accent-text: #a9781f;
  --accent-soft: rgba(212, 162, 76, 0.16);
  --border: rgba(20, 30, 70, 0.12);
  --max-width: 860px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  color: var(--body-color);
  line-height: 1.7;
  background:
    radial-gradient(700px circle at 15% 15%, rgba(58, 95, 224, 0.22), transparent 60%),
    radial-gradient(750px circle at 85% 12%, rgba(37, 110, 235, 0.16), transparent 60%),
    radial-gradient(700px circle at 80% 85%, rgba(120, 100, 235, 0.16), transparent 60%),
    radial-gradient(550px circle at 15% 88%, rgba(212, 162, 76, 0.14), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

a { color: var(--accent-text); text-decoration: none; }
a:hover { color: color-mix(in srgb, var(--accent-text) 80%, black); }

.content-container {
  max-width: var(--max-width);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center { text-align: center; }

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.heading {
  font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--heading-color);
  font-weight: 600;
  transition: text-shadow 0.3s ease;
}
.heading.glow {
  animation: heading-glow 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.5s;
}
@keyframes heading-glow {
  0% { text-shadow: 0 0 0 var(--accent); }
  40% { text-shadow: 0 0 8px var(--accent), 0 0 15px var(--accent); }
  100% { text-shadow: 0 0 0 var(--accent); }
}

.heading-sm {
  font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--heading-color);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.section-label {
  color: var(--details-color);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 1.75rem 0 0.75rem;
}

.subheading {
  color: var(--accent-text);
  font-weight: 300;
  font-size: 1.3rem;
  margin: 0.5rem 0 1.25rem;
}

.body-text { color: var(--body-color); font-weight: 300; }

.details-text { color: var(--details-color); font-weight: 300; font-size: 0.95rem; }

.date-text { color: var(--accent-text); font-weight: 300; font-size: 0.9rem; }

.accent { color: var(--accent-text); }

/* Hero */

.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.85rem;
  color: var(--accent-text);
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  margin: 0 0 0.5rem;
}

.hero .body-text {
  max-width: 560px;
  margin: 0 auto 1rem;
  font-size: 1.05rem;
}
.hero .body-text:last-of-type { margin-bottom: 0; }

.hero-emphasis {
  font-weight: 500;
  color: var(--heading-color);
}

.hero nav { margin-top: 2.5rem; }
.hero nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}
.hero nav a { color: var(--heading-color); }
.hero nav a:hover { color: var(--accent-text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin: 0 auto;
  padding: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle-bar {
  width: 20px;
  height: 2px;
  background: var(--heading-color);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .hero nav ul {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
  }
  .hero nav ul.nav-open {
    max-height: 320px;
    opacity: 1;
    margin-top: 1.25rem;
  }
}

/* Sections */

.section {
  padding: 5rem 0;
}

.section-shaded .content-container {
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 3rem 2.5rem;
}

@media (max-width: 600px) {
  .section-shaded .content-container {
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
  }
}

.section h2.heading {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 2.5rem;
}

/* About */

.about-content {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
}

.about-text { flex: 1; }

.about-photo-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

.about-image {
  width: 170px;
  height: 170px;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  align-items: center;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent-text);
  line-height: 1.1;
}

.stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--details-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.2rem;
}

.about-details {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (max-width: 700px) {
  .about-content { flex-direction: column-reverse; text-align: center; }
  .about-photo-col { margin: 0 auto; }
}

/* Flip cards (Leadership Philosophy) */

.philosophy-hint {
  font-size: 0.85rem;
  color: var(--details-color);
  margin-top: -0.5rem;
  margin-bottom: 2rem;
}

.flip-card {
  perspective: 1200px;
  cursor: pointer;
  min-height: 190px;
}
.flip-card:focus-visible .flip-card-inner {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 190px;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--accent-soft);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.flip-card-front h3 { margin-top: 0.25rem; margin-bottom: 0; color: var(--accent-text); }

.flip-card-subtitle {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  color: var(--details-color);
}

.flip-card-back {
  transform: rotateY(180deg);
}
.flip-card-back p { margin: 0; font-size: 0.92rem; }
.flip-card-back p + p { margin-top: 0.75rem; }
.flip-card-back ul { text-align: left; width: 100%; }

#highlights .flip-card,
#highlights .flip-card-inner {
  min-height: 340px;
}

.flip-card-wide {
  grid-column: 1 / -1;
}
#highlights .flip-card-wide,
#highlights .flip-card-wide .flip-card-inner {
  min-height: 220px;
}
.flip-card-wide .flip-card-front h3 {
  max-width: 480px;
}
.flip-card-wide .flip-card-back p {
  max-width: 560px;
}

#skills .flip-card,
#skills .flip-card-inner {
  min-height: 220px;
}

/* Highlights (grouped) */

.impact-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
}

#skills .impact-groups {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 560px) {
  #skills .impact-groups {
    grid-template-columns: 1fr;
  }
}

.impact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.92rem;
}

.impact-list li {
  position: relative;
  padding-left: 1.1rem;
}
.impact-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.icon-card-icon-sm {
  width: 34px;
  height: 34px;
  margin-bottom: 0;
  flex-shrink: 0;
  border-radius: 10px;
}
.icon-card-icon-sm svg { width: 17px; height: 17px; }

/* Quote */

.quote {
  max-width: 600px;
  margin: 0 auto 3rem;
  padding: 0;
  text-align: center;
  border: none;
}

.about-quote {
  margin-top: 2.5rem;
  margin-bottom: 0;
  max-width: none;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 3rem 2rem;
  background: var(--accent-soft);
  border: 1px solid var(--border);
}

.about-quote .quote-main {
  color: var(--accent-text);
}
.about-quote .quote-sub {
  color: var(--body-color);
}

.quote-main {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--heading-color);
  margin: 0 0 0.85rem;
}

#experience .quote-main {
  color: var(--accent-text);
}

.quote-sub {
  font-size: 1rem;
  color: var(--body-color);
  margin: 0;
}

/* Country flags */

.country-flags {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  max-width: 520px;
  margin: 0 auto 1.5rem;
}

@media (max-width: 480px) {
  .country-flags { grid-template-columns: repeat(2, 1fr); }
}

.flag-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: none;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 0.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.flag-btn:hover,
.flag-btn[aria-expanded="true"] {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: var(--accent-soft);
}

.flag-emoji {
  font-size: 2rem;
  line-height: 1;
}

.flag-label {
  font-size: 0.8rem;
  color: var(--details-color);
}

.country-details {
  max-width: 520px;
  margin: 0 auto 2rem;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
}

.country-details h3 {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--heading-color);
}

.country-role {
  margin-bottom: 1rem;
}
.country-role:last-child { margin-bottom: 0; }

.country-role-title {
  font-weight: 500;
  color: var(--heading-color);
  font-size: 0.95rem;
}

.country-role-period {
  color: var(--accent-text);
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.linkedin-cta {
  max-width: 460px;
  margin: 0 auto 3rem;
  text-align: center;
  color: var(--details-color);
  font-size: 0.9rem;
  line-height: 1.6;
}

.btn-linkedin {
  display: inline-block;
  margin-top: 0.85rem;
  padding: 0.6rem 1.3rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent-text);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-linkedin:hover {
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* Experience timeline */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.timeline-item {
  border-left: 2px solid var(--border);
  padding-left: 1.25rem;
}
.timeline-item p { margin: 0.15rem 0 0; }

.education-block ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}
.education-block li { margin-bottom: 0.4rem; }

.education-block {
  margin-top: 3rem;
  padding-top: 2rem;
}

.education-intro {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.video-intro {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

.education-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 260px));
  justify-content: center;
  gap: 2rem;
}

@media (max-width: 480px) {
  .education-groups {
    grid-template-columns: minmax(180px, 260px);
  }
}

.education-group h3 {
  color: var(--accent-text);
  margin-bottom: 0.75rem;
}

/* Video */

.video-wrap {
  max-width: 360px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(20, 30, 70, 0.15);
}
.video-wrap video { width: 100%; display: block; }

/* Contact */

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.contact-link-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.contact-link-icon svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.contact-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 1.25rem 0 0;
  font-size: 0.85rem;
  color: var(--details-color);
}
.contact-location svg {
  width: 15px;
  height: 15px;
  color: var(--accent-text);
  flex-shrink: 0;
}

.contact-closing {
  text-align: center;
  margin: 2rem 0 0;
  font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent-text);
}

.site-footer {
  text-align: center;
  padding: 2rem;
  color: var(--details-color);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

.site-footer p { margin: 0.25rem 0; }

.footer-credit {
  font-size: 0.78rem;
  opacity: 0.75;
}

/* Chat widget */

.chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
}

.chat-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.chat-toggle svg { width: 26px; height: 26px; fill: #1a1a1a; }

.chat-panel {
  position: absolute;
  bottom: 4.2rem;
  right: 0;
  width: min(340px, 90vw);
  max-height: 480px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(20, 30, 70, 0.18);
  overflow: hidden;
}
.chat-panel[hidden] {
  display: none;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
}

.agent-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 30%;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.agent-info { flex: 1; }
.agent-info h3 { margin: 0; font-size: 0.95rem; color: var(--heading-color); font-weight: 500; }
.agent-info p { margin: 0; font-size: 0.75rem; color: var(--accent-text); }

.chat-close {
  background: none;
  border: none;
  color: var(--details-color);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.chat-message {
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  font-size: 0.9rem;
  max-width: 85%;
}

.chat-message-bot {
  background: var(--accent-soft);
  color: var(--body-color);
  align-self: flex-start;
}

.chat-message-user {
  background: var(--accent);
  color: #1a1a1a;
  align-self: flex-end;
}

.chat-form {
  display: flex;
  border-top: 1px solid var(--border);
}

.chat-form input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--body-color);
  padding: 0.8rem;
  font-size: 0.9rem;
  font-family: inherit;
}
.chat-form input:focus { outline: none; }

.chat-form button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0 1rem;
  display: flex;
  align-items: center;
}
.chat-form button svg { width: 18px; height: 18px; fill: var(--accent); }

/* ── Pull quote ─────────────────────────────────────────────────────────
   One line between the last panel and Contact. No panel, no border, no new
   font: it borrows the display face the headings already use and the accent
   already in the palette, so it reads as part of the page rather than as a
   widget dropped into it. */
.pull-quote {
  margin: 0 auto;
  max-width: 42rem;
  text-align: center;
  border: 0;
  padding: 0;
}

.pull-quote-text {
  font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-style: italic;
  font-weight: 500;
  /* Scales with the viewport but stops before it competes with the section
     headings either side — a quote that shouts is no longer a quote. */
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  line-height: 1.5;
  color: var(--heading-color);
  margin: 0 0 0.9rem;
  text-wrap: balance;
}

.pull-quote-author {
  display: block;
  font-style: normal;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--accent-text);
}
