:root {
  --ink: #17211f;
  --muted: #5f6d69;
  --green: #1e6a5b;
  --green-dark: #173f38;
  --mint: #dcebe5;
  --cream: #f4f1e9;
  --paper: #fbfaf6;
  --line: rgba(23, 33, 31, 0.14);
  --shadow: 0 24px 70px rgba(19, 49, 43, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}
body.chat-open { overflow: hidden; }
a { color: inherit; }
button, textarea { font: inherit; }
button { cursor: pointer; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.site-header {
  position: absolute; inset: 0 0 auto; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0;
}
.brand {
  display: grid; place-items: center; width: 46px; height: 46px;
  color: white; background: var(--green-dark); border-radius: 50%;
  font-weight: 800; letter-spacing: -0.05em; text-decoration: none;
}
nav { display: flex; align-items: center; gap: 30px; }
nav a { font-size: 14px; font-weight: 600; text-decoration: none; }
.nav-chat {
  padding: 10px 18px; color: white; border: 0; border-radius: 999px;
  background: var(--green-dark); font-weight: 700;
}

.hero {
  position: relative; min-height: 760px; overflow: hidden;
  display: grid; grid-template-columns: 1.08fr 0.92fr; align-items: center;
  gap: clamp(36px, 6vw, 90px); padding: 120px max(24px, calc((100vw - 1180px) / 2)) 72px;
  background: var(--cream);
}
.hero::before {
  content: ""; position: absolute; width: 460px; height: 460px; left: -190px; top: 130px;
  border: 1px solid rgba(30, 106, 91, 0.2); border-radius: 50%;
}
.hero-copy, .hero-visual { position: relative; z-index: 1; }
.eyebrow, .section-number {
  margin: 0 0 16px; color: var(--green); font-size: 12px; font-weight: 800;
  letter-spacing: 0.18em;
}
.hero h1 { margin: 0; font-size: clamp(70px, 10vw, 134px); line-height: 0.9; letter-spacing: -0.08em; }
.hero-role { margin: 24px 0 0; color: var(--green); font-size: clamp(22px, 3vw, 34px); font-weight: 700; }
.hero-intro { max-width: 580px; margin: 24px 0 0; color: #46534f; font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px;
  padding: 0 24px; border: 1px solid transparent; border-radius: 4px;
  font-weight: 700; text-decoration: none; transition: transform 180ms ease, box-shadow 180ms ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary { color: white; background: var(--green-dark); box-shadow: 0 12px 30px rgba(23, 63, 56, 0.2); }
.button.secondary { border-color: var(--ink); background: transparent; }
.button.light { color: var(--green-dark); background: white; }
.contact-list {
  display: flex; flex-wrap: wrap; gap: 14px 28px; padding: 0; margin: 38px 0 0; list-style: none;
}
.contact-list li { display: flex; flex-direction: column; }
.contact-list span { color: var(--muted); font-size: 12px; }
.contact-list a, .contact-list strong { font-size: 14px; font-weight: 700; text-decoration: none; }
.hero-visual { justify-self: end; width: min(100%, 480px); }
.portrait-frame {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 220px 220px 18px 18px;
  background: var(--mint); box-shadow: var(--shadow);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.experience-card {
  position: absolute; left: -42px; bottom: 42px; display: flex; align-items: center; gap: 12px;
  padding: 18px 22px; color: white; background: var(--green-dark); box-shadow: var(--shadow);
}
.experience-card strong { font-size: 42px; line-height: 1; }
.experience-card span { width: 50px; font-size: 13px; line-height: 1.3; }

.section {
  display: grid; grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.7fr);
  gap: clamp(40px, 8vw, 130px); width: min(1180px, calc(100% - 48px)); margin: 0 auto;
  padding: 112px 0;
}
.section + .section { border-top: 1px solid var(--line); }
.section h2 { margin: 0; font-size: clamp(38px, 5vw, 66px); line-height: 1.12; letter-spacing: -0.045em; }
.about-content { max-width: 720px; }
.about-content > p { color: var(--muted); font-size: 17px; }
.about-content .lead { margin-top: 0; color: var(--ink); font-size: clamp(24px, 3vw, 34px); line-height: 1.45; }
.education {
  display: grid; grid-template-columns: 120px 1fr; gap: 24px; margin-top: 42px; padding-top: 24px;
  border-top: 1px solid var(--line);
}
.education > span { color: var(--green); font-size: 13px; font-weight: 800; }
.education strong { font-size: 20px; }
.education p { margin: 2px 0 0; color: var(--muted); }

.timeline-item { display: grid; grid-template-columns: 160px 1fr; gap: 28px; padding: 0 0 54px; }
.timeline-item + .timeline-item { padding-top: 54px; border-top: 1px solid var(--line); }
.timeline-meta { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 13px; }
.timeline-meta time { color: var(--green); font-weight: 800; }
.timeline-content h3 { margin: -6px 0 0; font-size: 27px; }
.job-title { margin: 1px 0 16px; color: var(--green); font-weight: 800; }
.timeline-content > p:not(.job-title) { color: var(--muted); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 24px 0 0; list-style: none; }
.tag-list li { padding: 6px 12px; background: var(--mint); border-radius: 999px; color: var(--green-dark); font-size: 12px; font-weight: 700; }

.strength-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); }
.strength-grid article { min-height: 230px; padding: 30px; background: var(--paper); }
.strength-grid span { color: var(--green); font-size: 12px; font-weight: 800; }
.strength-grid h3 { margin: 38px 0 8px; font-size: 22px; }
.strength-grid p { margin: 0; color: var(--muted); font-size: 15px; }

.cta { padding: 104px max(24px, calc((100vw - 1180px) / 2)); color: white; background: var(--green-dark); }
.cta .eyebrow { color: #92c6b9; }
.cta h2 { margin: 0 0 32px; font-size: clamp(44px, 7vw, 84px); line-height: 1.06; letter-spacing: -0.055em; }
footer {
  display: flex; justify-content: space-between; gap: 20px; padding: 30px max(24px, calc((100vw - 1180px) / 2));
  color: var(--muted); background: var(--paper); font-size: 13px;
}

.chat-fab {
  position: fixed; z-index: 30; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 9px;
  padding: 13px 18px; color: white; border: 0; border-radius: 999px; background: var(--green-dark);
  box-shadow: 0 14px 40px rgba(12, 35, 31, 0.3); font-weight: 750;
}
.chat-fab-dot, .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #7ce3b7; box-shadow: 0 0 0 4px rgba(124, 227, 183, 0.16); }
.chat-backdrop { position: fixed; z-index: 39; inset: 0; background: rgba(10, 20, 18, 0.42); backdrop-filter: blur(2px); }
.chat-panel {
  position: fixed; z-index: 40; top: 16px; right: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px));
  display: grid; grid-template-rows: auto 1fr auto auto; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 18px; background: #f8f7f2;
  box-shadow: 0 30px 90px rgba(10, 30, 26, 0.3); transform: translateX(calc(100% + 40px));
  visibility: hidden; transition: transform 260ms ease, visibility 260ms ease;
}
.chat-panel.open { transform: translateX(0); visibility: visible; }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 18px; color: white; background: var(--green-dark); }
.chat-header > div { display: flex; align-items: center; gap: 12px; }
.chat-header strong, .chat-header small { display: block; }
.chat-header small { margin-top: 1px; color: rgba(255, 255, 255, 0.7); font-size: 11px; }
.chat-header button { width: 34px; height: 34px; color: white; border: 0; background: transparent; font-size: 26px; line-height: 1; }
.chat-messages { overflow-y: auto; padding: 20px 16px; }
.message { display: flex; margin-bottom: 12px; }
.message.user { justify-content: flex-end; }
.message-bubble { max-width: 85%; padding: 11px 14px; border-radius: 4px 16px 16px; background: white; box-shadow: 0 4px 16px rgba(20, 48, 42, 0.06); white-space: pre-wrap; }
.message.user .message-bubble { color: white; border-radius: 16px 4px 16px 16px; background: var(--green); }
.message.loading .message-bubble { color: var(--muted); }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.suggestions button { padding: 8px 11px; color: var(--green); border: 1px solid rgba(30, 106, 91, 0.24); border-radius: 999px; background: transparent; font-size: 12px; }
.chat-form { display: flex; align-items: flex-end; gap: 8px; margin: 0 14px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.chat-form textarea { flex: 1; max-height: 110px; resize: none; padding: 5px; border: 0; outline: 0; background: transparent; line-height: 1.45; }
.chat-form button { flex: 0 0 auto; padding: 9px 14px; color: white; border: 0; border-radius: 9px; background: var(--green); font-weight: 700; }
.chat-form button:disabled { opacity: 0.5; cursor: wait; }
.chat-disclaimer { margin: 8px 14px 12px; color: #7c8784; text-align: center; font-size: 10px; }

@media (max-width: 800px) {
  .site-header { width: calc(100% - 32px); padding-top: 18px; }
  nav a { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 110px 20px 70px; }
  .hero h1 { font-size: clamp(66px, 23vw, 100px); }
  .hero-visual { justify-self: center; width: min(88vw, 430px); margin-top: 12px; }
  .experience-card { left: -10px; bottom: 24px; }
  .section { grid-template-columns: 1fr; gap: 38px; width: calc(100% - 40px); padding: 76px 0; }
  .timeline-item { grid-template-columns: 1fr; gap: 14px; }
  .timeline-meta { flex-direction: row; justify-content: space-between; }
  .strength-grid { grid-template-columns: 1fr; }
  .strength-grid article { min-height: 190px; }
  footer { flex-direction: column; gap: 0; }
}

@media (max-width: 480px) {
  .hero-actions .button { width: 100%; }
  .contact-list { display: grid; grid-template-columns: 1fr 1fr; }
  .contact-list li:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .education { grid-template-columns: 1fr; gap: 8px; }
  .chat-fab { right: 16px; bottom: 16px; }
  .chat-panel { inset: 0; width: 100%; border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
