:root {
  color-scheme: light;
  --ink: #1f2b38;
  --text: #2c3e50;
  --muted: #5b6b78;
  --line: #e0e7ec;
  --soft-line: #edf0f2;
  --surface: #ffffff;
  --page: #f8f9fa;
  --blue: #4286ab;
  --blue-soft: #bbd7e7;
  --blue-band: #cfe0ec;
  --gold: #e2a33c;
  --shadow: 0 18px 40px rgba(44, 62, 80, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

button,
input {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  overflow-x: hidden;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 7vw;
  background: rgba(248, 249, 250, 0.86);
  border-bottom: 1px solid #e7eaed;
  backdrop-filter: blur(12px);
}

.brand {
  color: var(--ink);
  font-family: "Poppins", sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.brand span {
  color: var(--blue);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14.5px;
  font-weight: 500;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:not(.nav-cta):hover {
  color: var(--blue);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid #dbe4ea;
  border-radius: 999px;
  background: #fff;
}

.lang-switcher button {
  min-width: 38px;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.lang-switcher button.is-active {
  background: var(--blue);
  color: #fff;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero-band {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: 13%;
  min-width: 90px;
  background: var(--blue-band);
}

.hero-pattern,
.portrait-pattern,
.corner-pattern {
  position: absolute;
  pointer-events: none;
}

.hero-pattern {
  z-index: 0;
  border-radius: 50%;
  background: repeating-linear-gradient(48deg, #6fa3c4, #6fa3c4 4px, transparent 4px, transparent 12px);
}

.hero-pattern-left {
  top: -50px;
  left: -70px;
  width: 200px;
  height: 200px;
  opacity: 0.85;
}

.hero-pattern-bottom {
  bottom: -60px;
  left: -40px;
  width: 220px;
  height: 220px;
  opacity: 0.7;
}

.hero-dot {
  position: absolute;
  bottom: 40px;
  left: 40px;
  z-index: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: repeating-linear-gradient(48deg, var(--gold), var(--gold) 4px, transparent 4px, transparent 11px);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 9vh 7vw 10vh;
}

.hero-kicker {
  margin-bottom: 14px;
  color: var(--blue);
  font-family: "Poppins", sans-serif;
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 500;
}

.hero h1 {
  min-height: 3.3em;
  margin-bottom: 22px;
  color: var(--ink);
  font-family: "Poppins", sans-serif;
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
}

.hero h1 .typed-wrap {
  color: var(--blue);
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  margin-left: 2px;
  background: var(--blue);
  vertical-align: -1px;
  animation: blink 1s step-end infinite;
}

.hero-text {
  max-width: 500px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.75;
}

.social-links {
  display: flex;
  gap: 13px;
}

.social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1.5px solid #cdd6dd;
  border-radius: 50%;
  color: var(--blue);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.social-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.social-button:hover {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 10px 24px rgba(66, 134, 171, 0.18);
  transform: translateY(-3px);
}

.hero-media {
  display: flex;
  justify-content: center;
}

.portrait-wrap {
  position: relative;
  width: min(360px, 76vw);
}

.portrait-pattern {
  z-index: 0;
  border-radius: 50%;
}

.portrait-pattern-blue {
  top: 6px;
  left: -22px;
  width: 86px;
  height: 86px;
  background: repeating-linear-gradient(48deg, #6fa3c4, #6fa3c4 3px, transparent 3px, transparent 10px);
}

.portrait-pattern-gold {
  top: -14px;
  right: -6px;
  width: 120px;
  height: 120px;
  background: repeating-linear-gradient(48deg, var(--gold), var(--gold) 3px, transparent 3px, transparent 10px);
}

.portrait-frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 36px 36px 36px 96px;
  background: var(--blue-soft);
  box-shadow: 0 28px 60px rgba(44, 62, 80, 0.2);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.role-badge {
  position: absolute;
  bottom: 18px;
  left: -14px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 17px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(44, 62, 80, 0.18);
  font-size: 13px;
  font-weight: 600;
}

.role-badge .role-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
}

/* Keep portrait motion subtle and opt in only when motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
  .hero-media {
    animation: portrait-reveal 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .portrait-wrap {
    animation: portrait-float 6s ease-in-out 900ms infinite;
  }

  .portrait-wrap:hover {
    animation-play-state: paused;
  }

  .portrait-frame img {
    transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .portrait-wrap:hover .portrait-frame img {
    transform: scale(1.035);
  }
}

@keyframes portrait-reveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes portrait-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8vh 7vw;
}

.why-section {
  position: relative;
  overflow: hidden;
  padding-top: 9vh;
}

.corner-pattern {
  top: -50px;
  left: -40px;
  width: 200px;
  height: 200px;
  border-radius: 0 0 100% 0;
  background: repeating-linear-gradient(45deg, var(--blue), var(--blue) 5px, transparent 5px, transparent 15px);
  opacity: 0.3;
}

.section-heading {
  position: relative;
  margin-bottom: 48px;
  text-align: center;
}

.section-heading p {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-heading h2 {
  color: var(--ink);
  font-family: "Poppins", sans-serif;
  font-size: clamp(28px, 3.4vw, 52px);
  font-weight: 800;
  letter-spacing: 0;
}

.section-heading span {
  display: block;
  max-width: 560px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.reason-card {
  text-align: center;
  transition: transform 0.3s;
}

.reason-card:hover {
  transform: translateY(-10px);
}

.reason-visual {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(187, 215, 231, 0.96), rgba(207, 224, 236, 0.84));
  box-shadow: 0 14px 30px rgba(66, 134, 171, 0.18);
}

.reason-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.72), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(226, 163, 60, 0.18), transparent 22%),
    repeating-linear-gradient(48deg, rgba(111, 163, 196, 0.22), rgba(111, 163, 196, 0.22) 4px, transparent 4px, transparent 15px);
}

.reason-visual::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 132px;
  height: 132px;
  border: 1px solid rgba(66, 134, 171, 0.22);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.reason-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 34px rgba(44, 62, 80, 0.16);
  color: var(--blue);
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.reason-number {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  min-width: 46px;
  padding: 7px 11px;
  border: 1px solid rgba(66, 134, 171, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--blue);
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
}

.reason-icon .icon-svg {
  width: 42px;
  height: 42px;
  stroke-width: 1.75;
}

.reason-card:hover .reason-icon {
  background: #fff;
  box-shadow: 0 22px 42px rgba(44, 62, 80, 0.2);
  transform: translate(-50%, -50%) translateY(-7px) scale(1.04);
}

.reason-card:hover .reason-icon .icon-svg {
  animation: icon-breathe 1.2s ease-in-out infinite alternate;
}

.reason-card:hover .reason-visual::after {
  opacity: 0.72;
  transform: translate(-50%, -50%) scale(1.12);
}

.reason-card h3 {
  margin-bottom: 12px;
  color: var(--blue);
  font-family: "Poppins", sans-serif;
  font-size: 23px;
  font-weight: 700;
}

.reason-card p {
  max-width: 260px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 52px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 15px 30px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.primary-button {
  background: var(--blue);
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.primary-button::after {
  content: "→";
  margin-left: 9px;
}

.primary-button:hover {
  box-shadow: 0 14px 30px rgba(66, 134, 171, 0.4);
  transform: translateY(-2px);
}

.secondary-button {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s;
}

.secondary-button::before {
  content: "↓";
  margin-right: 9px;
}

.secondary-button:hover {
  border-color: var(--blue);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}

.skill-card {
  padding: 26px;
  border: 1px solid var(--soft-line);
  border-radius: 20px;
  background: #fff;
  transition: transform 0.25s, box-shadow 0.25s;
}

.skill-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.skill-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.skill-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(66, 134, 171, 0.1);
  color: var(--blue);
}

.icon-svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.skill-card h3 {
  font-family: "Poppins", sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.skill-tags span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid #e7eaed;
  border-radius: 999px;
  background: var(--page);
  font-size: 13.5px;
  font-weight: 500;
}

.skill-tags span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.experience-section {
  padding: 9vh 7vw;
  background: var(--text);
  color: #fff;
}

.experience-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.section-heading-dark h2 {
  color: #fff;
}

/* Company cards retain a shared timeline for successive roles. */
.timeline { display: grid; gap: 18px; }
.career-company { padding: 30px; border: 1px solid #ffffff20; border-radius: 20px; background: #ffffff06; }
.career-company-current { background: #ffffff0b; border-color: #a4cddd55; }
.career-header { display: flex; align-items: center; gap: 16px; }
.career-monogram { display: grid; place-items: center; flex: 0 0 50px; height: 50px; border-radius: 14px; background: #d3e6ed; color: #183c50; font-size: 15px; font-weight: 800; letter-spacing: -.5px; }
.career-monogram-om,.career-monogram-odc { background: #ff9b44; color: #362009; }
.career-monogram-4h { background: #c6e2f8; color: #1c4c6c; }
.career-monogram-ac { background: #b7e3d7; color: #165443; }
.career-employer { min-width: 0; }
.career-employer h3 { color: #fff; font-family: "Poppins", sans-serif; font-size: 19px; font-weight: 600; }
.career-employer p { color: #b9c9d6; font-size: 12px; line-height: 1.8; margin-top: 4px; }
.career-employer p span { display: inline-block; }
.career-employer p span::before { content: "·"; margin: 0 9px; }
.career-status { margin-left: auto; flex-shrink: 0; align-self: flex-start; color: #b9ebd8; background: #a2ddc610; border: 1px solid #a2ddc630; font-size: 10px; font-weight: 600; padding: 6px 10px; border-radius: 99px; }
.career-status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #a4dec7; }
.career-roles { margin: 24px 0 0 66px; }
.career-role + .career-role { margin-top: 28px; }
.career-roles-grouped { position: relative; padding-left: 24px; margin-left: 24px; border-left: 1px solid #ffffff26; }
.career-roles-grouped .career-role { position: relative; padding-left: 17px; }
.career-roles-grouped .career-role::before { content: ""; position: absolute; left: -29px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: #bed8e7; box-shadow: 0 0 0 5px #304353; }
.career-roles-grouped .career-role:first-child::before { background: #e2b366; }
.career-role-heading { display: flex; justify-content: space-between; gap: 12px 24px; align-items: baseline; flex-wrap: wrap; }
.career-role h4 { font-size: 16px; line-height: 1.6; font-weight: 600; color: #f6fafc; }
.career-date { color: #b7cddd; font-size: 12px; line-height: 1.7; }
.career-description,.career-achievements { color: #d5dfe7; font-size: 13.5px; line-height: 1.85; }
.career-description { margin-top: 15px; max-width: 740px; }
.career-achievements { margin-top: 10px; padding-left: 18px; }
.career-achievements li { padding-left: 4px; margin-top: 5px; }
.career-achievements li::marker { color: #a8c9da; }
.career-tags { display: flex; flex-wrap: wrap; list-style: none; gap: 7px; margin-top: 19px; }
.career-tags li { padding: 5px 10px; border: 1px solid #ffffff1c; border-radius: 6px; color: #c9dce7; background: #10253630; font-size: 10.5px; line-height: 1.5; }
@media (max-width: 600px) {
  .career-company { padding: 20px 16px; border-radius: 16px; }
  .career-header { gap: 12px; flex-wrap: wrap; }
  .career-employer { flex: 1; }
  .career-employer h3 { font-size: 16px; }
  .career-employer p span { display: block; }
  .career-employer p span::before { content: none; }
  .career-status { margin-left: 62px; }
  .career-monogram { flex-basis: 44px; height: 44px; }
  .career-roles { margin-left: 0; }
  .career-roles-grouped { margin-left: 7px; padding-left: 15px; }
  .career-roles-grouped .career-role { padding-left: 5px; }
  .career-roles-grouped .career-role::before { left: -20px; }
  .career-role-heading { display: block; }
  .career-date { margin-top: 5px; }
}

.cv-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(720px, 100%);
  margin: 10px 0 0 64px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.14);
}

.cv-strip-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: #fff;
  color: var(--blue);
}

.cv-strip-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.cv-strip-copy {
  min-width: 0;
  flex: 1;
}

.cv-strip-copy span {
  display: block;
  margin-bottom: 3px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.cv-strip-copy strong {
  display: block;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.cv-strip-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.cv-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.cv-button:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.cv-button-primary {
  border-color: var(--blue);
  background: var(--blue);
}

.cv-button-primary:hover {
  border-color: #5d9bbc;
  background: #5d9bbc;
}

.site-footer {
  padding: 7vh 7vw 4vh;
  background: var(--ink);
  color: #fff;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.footer-inner h2 {
  margin-bottom: 14px;
  font-family: "Poppins", sans-serif;
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: 0;
}

.footer-inner p {
  max-width: 480px;
  margin: 0 auto 28px;
  color: #aab6c2;
  font-size: 16px;
  line-height: 1.6;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  margin-bottom: 40px;
  padding: 14px 30px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 40px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}

.footer-links a:hover {
  background: rgba(66, 134, 171, 0.2);
}

.copyright {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #7c8a97;
  font-size: 13px;
}

.chat-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: min(360px, calc(100vw - 40px));
  height: 480px;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(44, 62, 80, 0.32);
  animation: pop 0.25s ease both;
}

.chat-panel[hidden] {
  display: none;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--text);
  color: #fff;
}

.chat-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.chat-header div:nth-child(2) {
  flex: 1;
}

.chat-header h2 {
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.chat-header p {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-size: 12px;
}

.chat-header p .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

.chat-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
}

.chat-messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 16px;
  background: var(--page);
}

.message {
  max-width: 82%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.message-bot {
  align-self: flex-start;
  border: 1px solid var(--soft-line);
  background: #fff;
  color: var(--text);
}

.message-user {
  align-self: flex-end;
  background: var(--text);
  color: #fff;
}

.message-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  border-radius: 999px;
  background: currentColor;
  vertical-align: -0.12em;
  animation: chatCursor 0.8s steps(2, start) infinite;
}

.message-loading {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 54px;
  min-height: 43px;
}

.message-loading span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--blue);
  animation: chatDot 0.9s ease-in-out infinite;
}

.message-loading span:nth-child(2) {
  animation-delay: 0.12s;
}

.message-loading span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes chatDot {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes chatCursor {
  0%,
  45% {
    opacity: 1;
  }

  46%,
  100% {
    opacity: 0;
  }
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--soft-line);
}

.chat-form input {
  min-width: 0;
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  font-size: 14px;
}

.chat-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(66, 134, 171, 0.12);
}

.chat-form button {
  display: grid;
  place-items: center;
  min-width: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}

.chat-form input:disabled,
.chat-form button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 61;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 12px 30px rgba(66, 134, 171, 0.45);
  color: #fff;
  cursor: pointer;
  font-size: 26px;
  animation: pulse 2.5s infinite;
}

.chat-launcher svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #edf6fc;
    --text: #d8e6ef;
    --muted: #a7b6c4;
    --line: #2d4253;
    --soft-line: #243748;
    --surface: #172534;
    --page: #0f1924;
    --blue: #6faed0;
    --blue-soft: #1b3b4f;
    --blue-band: rgba(66, 134, 171, 0.14);
    --gold: #e6b257;
    --shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  }

  .site-nav {
    border-bottom-color: #203140;
    background: rgba(15, 25, 36, 0.86);
  }

  .lang-switcher {
    border-color: #2c4152;
    background: #152331;
  }

  .lang-switcher button.is-active {
    color: #07131d;
  }

  .nav-cta,
  .primary-button,
  .footer-email,
  .cv-button-primary,
  .chat-form button,
  .chat-launcher {
    color: #07131d;
  }

  .hero-pattern,
  .portrait-pattern {
    opacity: 0.44;
  }

  .social-button {
    border-color: #304758;
  }

  .social-button:hover {
    background: #152333;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
  }

  .portrait-frame {
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.36);
  }

  .role-badge,
  .secondary-button,
  .skill-card {
    background: var(--surface);
    color: var(--text);
  }

  .role-badge {
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
  }

  .corner-pattern {
    opacity: 0.16;
  }

  .reason-visual {
    background: linear-gradient(135deg, rgba(27, 59, 79, 0.96), rgba(24, 48, 64, 0.9));
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  }

  .reason-visual::before {
    background:
      radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.08), transparent 28%),
      radial-gradient(circle at 82% 18%, rgba(230, 178, 87, 0.16), transparent 22%),
      repeating-linear-gradient(48deg, rgba(111, 174, 208, 0.16), rgba(111, 174, 208, 0.16) 4px, transparent 4px, transparent 15px);
  }

  .reason-icon {
    border-color: rgba(111, 174, 208, 0.26);
    background: rgba(19, 33, 47, 0.96);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.26);
  }

  .reason-card:hover .reason-icon {
    background: #182a3c;
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.34);
  }

  .reason-number {
    border-color: rgba(111, 174, 208, 0.22);
    background: rgba(15, 25, 36, 0.72);
  }

  .skill-card {
    border-color: var(--soft-line);
  }

  .skill-tags span {
    border-color: #2a3d4d;
    background: #101c28;
  }

  .experience-section {
    background: #172838;
  }

  .timeline-logo,
  .cv-strip-icon {
    background: #f6fbff;
    color: #172838;
  }

  .timeline-company {
    color: #a9b7c4;
  }

  .timeline-item p {
    color: #d5dee7;
  }

  .site-footer {
    background: #0b141e;
  }

  .chat-panel {
    background: #142231;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.44);
  }

  .chat-header {
    background: #0f1a25;
  }

  .chat-messages {
    background: var(--page);
  }

  .message-bot {
    border-color: #2a3d4d;
    background: var(--surface);
    color: var(--text);
  }

  .message-user {
    background: #28465b;
    color: #f8fbff;
  }

  .chat-form {
    border-top-color: var(--soft-line);
  }

  .chat-form input {
    border-color: var(--line);
    background: #101c28;
    color: var(--text);
  }

  .chat-form input::placeholder {
    color: #7f93a4;
  }
}

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

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes icon-breathe {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-2px) scale(1.04);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(66, 134, 171, 0.45);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(66, 134, 171, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(66, 134, 171, 0);
  }
}

@media (max-width: 880px) {
  .site-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .lang-switcher {
    align-self: flex-start;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 7vh;
  }

  .hero h1 {
    min-height: auto;
  }

  .hero-media {
    justify-content: flex-start;
  }

  .cv-strip {
    margin-left: 64px;
  }
}

@media (max-width: 560px) {
  .site-nav,
  .hero-inner,
  .section,
  .experience-section,
  .site-footer {
    padding-right: 24px;
    padding-left: 24px;
  }

  .nav-links {
    font-size: 13.5px;
  }

  .nav-cta {
    padding-right: 16px;
    padding-left: 16px;
  }

  .social-links {
    flex-wrap: wrap;
  }

  .role-badge {
    left: 10px;
  }

  .section-actions,
  .footer-links {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button,
  .footer-links a {
    width: 100%;
  }

  .cv-strip {
    align-items: stretch;
    flex-direction: column;
    margin-left: 0;
  }

  .cv-strip-actions {
    width: 100%;
  }

  .cv-button {
    flex: 1;
  }

  .chat-panel {
    right: 14px;
    bottom: 88px;
    width: calc(100vw - 28px);
    height: min(480px, calc(100vh - 110px));
  }

  .chat-launcher {
    right: 18px;
    bottom: 18px;
  }
}

/* Keep every navigation destination visible on smaller screens. */
.nav-links .nav-card { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid var(--blue); border-radius: 999px; white-space: nowrap; }
.nav-card svg { width: 19px; height: 19px; flex-shrink: 0; }
@media (max-width: 1100px) {
  .site-nav { flex-wrap: wrap; gap: 16px; }
  .nav-links { order: 3; width: 100%; flex-wrap: wrap; overflow: visible; gap: 8px 18px; }
  .nav-links a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 880px) {
  .site-nav { flex-direction: row; align-items: center; }
  .lang-switcher { align-self: auto; margin-left: auto; }
}

.career-monogram img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }

.footer-phone { display: flex; width: fit-content; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; min-height: 44px; margin: 14px auto 0; font-size: 16px; text-decoration: none; }
.footer-phone:hover { text-decoration: underline; text-underline-offset: 4px; }

.career-monogram-ac, .career-monogram-ci { background: #fff; border-radius: 8px; }
.career-monogram-ac img, .career-monogram-ci img { padding: 4px; }
