:root {
  --bg: #FFFFFF;
  --bg2: #FFFFFF;
  --bg3: #FFFFFF;
  --border: #E3E8C9;
  --text: #3c4433;
  --text-bright: #16231a;
  --muted: #6b7460;
  --shadow: 0 1px 3px rgba(30, 40, 10, 0.06), 0 8px 24px rgba(30, 40, 10, 0.05);

  /* Bright fills — buttons, bars, badges, borders. Not for small text (contrast). */
  --accent: #06D6A0;
  --cyan: #1B9AAA;
  --pink: #EF476F;
  --gold: #FFC43D;

  /* Darkened variants — safe for text/links on the light background. */
  --accent-text: #067a58;
  --cyan-text: #12707c;
  --pink-text: #b32b52;
  --gold-text: #8a5c07;

  /* Exact palette — used full-strength as section backgrounds. */
  --cream: #F8FFE5;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

section { position: relative; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-mark { font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--text-bright); text-decoration: none; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { font-size: 12px; color: var(--muted); text-decoration: none; letter-spacing: .04em; transition: color .15s; }
.nav-links a:hover { color: var(--text-bright); }
.nav-cta {
  font-size: 11px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 6px;
  color: var(--text) !important; letter-spacing: .04em; transition: border-color .15s, color .15s;
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent-text) !important; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
#hero {
  min-height: 100vh; overflow: hidden;
  background: var(--cream);
}
.hero-art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.hero-art-vivid {
  opacity: 0;
  filter: saturate(1.8) brightness(1.08);
  transition: opacity .3s ease;
  -webkit-mask-image: radial-gradient(circle 190px at var(--mx, 50%) var(--my, 50%), black 0%, transparent 100%);
  mask-image: radial-gradient(circle 190px at var(--mx, 50%) var(--my, 50%), black 0%, transparent 100%);
}
#hero:hover .hero-art-vivid { opacity: 1; }
.hero-content {
  position: relative; z-index: 1;
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 60px;
}
.hero-eyebrow { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.hero-name { font-size: clamp(38px, 7vw, 76px); font-weight: 700; color: var(--text-bright); letter-spacing: -0.01em; }
.hero-title { font-size: clamp(14px, 2vw, 18px); color: var(--accent-text); margin-top: 14px; letter-spacing: .02em; font-weight: 600; }
.hero-sub { max-width: 560px; margin: 22px auto 0; font-size: 14px; color: var(--muted); line-height: 1.75; }
.hero-links { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; justify-content: center; }
.hero-btn {
  font-size: 12px; padding: 11px 20px; border-radius: 7px; text-decoration: none;
  letter-spacing: .04em; transition: transform .15s, border-color .15s, background .15s;
}
.hero-btn.primary { background: var(--accent); color: #07231a; font-weight: 600; }
.hero-btn.primary:hover { transform: translateY(-1px); }
.hero-btn.secondary { border: 1px solid var(--border); color: var(--text); background: var(--bg2); }
.hero-btn.secondary:hover { border-color: var(--muted); }
.hero-scroll { position: absolute; bottom: 34px; font-size: 10px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(6px);} }

/* ── Section headers ─────────────────────────────────────────────────────── */
.sec-head {
  text-align: center;
  width: min(620px, calc(100% - 40px));
  margin: 56px auto 0;
  padding: 32px 28px;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.sec-eyebrow { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-text); font-weight: 700; }
.sec-title { font-size: clamp(22px, 3.4vw, 32px); color: var(--text-bright); margin-top: 10px; font-weight: 600; }
.sec-desc { max-width: 560px; margin: 14px auto 0; font-size: 13px; color: var(--muted); line-height: 1.7; }

/* ── Skill tree section ──────────────────────────────────────────────────── */
#tree-section { padding: 20px 0 60px; background: var(--accent); }
#tree-app {
  display: flex; height: 640px; max-width: 1180px; margin: 24px auto 0; padding: 0 24px;
  gap: 0;
}
#canvas-wrap {
  flex: 1; position: relative; overflow: hidden;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px 0 0 12px;
  box-shadow: var(--shadow);
  min-width: 0;
}
canvas { display: block; position: absolute; top: 0; left: 0; cursor: grab; }
canvas.panning { cursor: grabbing; }

.zoom-controls {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  display: flex; flex-direction: column; gap: 6px;
}
.zoom-controls button {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.9);
  color: var(--text); font-size: 15px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); transition: border-color .15s, color .15s;
}
.zoom-controls button:hover { border-color: var(--accent); color: var(--accent-text); }
#zoom-reset { font-size: 13px; }

#panel {
  width: 264px; background: var(--bg2); border: 1px solid var(--border); border-left: none;
  border-radius: 0 12px 12px 0;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; flex-shrink: 0; overflow-y: auto;
}
.p-header { padding: 16px; border-bottom: 1px solid var(--border); }
.p-header h1 { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.p-name { font-size: 16px; font-weight: 600; color: var(--text-bright); margin-top: 4px; }
.p-title { font-size: 11px; color: var(--muted); margin-top: 2px; }
.p-bar-wrap { height: 2px; background: var(--border); margin-top: 10px; border-radius: 1px; overflow: hidden; }
.p-bar { height: 100%; border-radius: 1px; background: var(--accent); transition: width .4s; }
.pts { font-size: 11px; color: var(--muted); margin-top: 5px; display: flex; justify-content: space-between; }
.pts span { color: var(--text); }

.stats { padding: 12px 16px; }
.sec-lbl { font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.cat-row { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.cat-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cat-name { font-size: 11px; color: var(--muted); flex: 1; }
.cat-bw { width: 50px; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.cat-bf { height: 100%; border-radius: 2px; transition: width .3s; }
.cat-ct { font-size: 10px; min-width: 26px; text-align: right; }

.hint { padding: 12px 16px; border-top: 1px solid var(--border); margin-top: auto; font-size: 10.5px; color: var(--muted); line-height: 1.6; }

/* ── Evidence pop-out modal ──────────────────────────────────────────────── */
#modal-backdrop {
  position: fixed; inset: 0; background: rgba(16, 20, 8, 0.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity .18s;
  padding: 24px;
}
#modal-backdrop.open { opacity: 1; pointer-events: auto; }
#modal {
  width: 100%; max-width: 480px; max-height: 84vh; overflow-y: auto;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 20px 60px rgba(20, 30, 10, 0.18);
  padding: 26px 26px 20px;
  transform: translateY(8px) scale(.98); transition: transform .18s;
}
#modal-backdrop.open #modal { transform: translateY(0) scale(1); }
.m-close {
  position: absolute; top: 14px; right: 18px; background: none; border: none; color: var(--muted);
  font-size: 20px; cursor: pointer; line-height: 1; padding: 4px;
}
.m-close:hover { color: var(--text-bright); }
.m-badge { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 9px; border-radius: 4px; display: inline-block; }
.m-name { font-size: 20px; font-weight: 700; color: var(--text-bright); margin-top: 10px; }
.m-desc { font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: 8px; }

.m-gauge-wrap { margin-top: 20px; }
.m-gauge-row { display: flex; align-items: baseline; justify-content: space-between; }
.m-gauge-lbl { font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.m-gauge-val { font-size: 12px; font-weight: 600; }
.m-gauge-dots { display: flex; gap: 5px; margin-top: 8px; }
.m-dot { flex: 1; height: 6px; border-radius: 3px; background: var(--border); }
.m-dot.on { background: var(--dot-color, var(--accent)); }
.m-gauge-summary { font-size: 12.5px; color: var(--text); line-height: 1.7; margin-top: 12px; }

.m-evidence { margin-top: 20px; }
.m-evidence-item { padding: 10px 0; border-top: 1px solid var(--border); }
.m-evidence-item:first-child { border-top: none; }
.m-ev-src { font-size: 10.5px; color: var(--muted); margin-bottom: 3px; }
.m-ev-src b { color: var(--text); font-weight: 600; }
.m-ev-detail { font-size: 12.5px; color: var(--text); line-height: 1.6; }

.m-no-evidence { font-size: 12px; color: var(--muted); margin-top: 18px; font-style: italic; }

.m-req { font-size: 11px; color: var(--muted); margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }

.m-shadow { margin-top: 14px; padding: 10px 12px; border-left: 2px solid var(--pink); background: #FDEEF2; border-radius: 0 6px 6px 0; }
.m-shadow-lbl { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: #9c2c50; margin-bottom: 3px; }
.m-shadow-txt { font-size: 11.5px; color: #7a2038; line-height: 1.55; }

/* ── Experience timeline ─────────────────────────────────────────────────── */
#experience { padding: 20px 0 60px; background: var(--cyan); }
.timeline {
  width: min(760px, calc(100% - 40px));
  margin: 24px auto 0;
  padding: 6px 32px;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.tl-item { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid var(--border); }
.tl-item:first-child { border-top: none; }
.tl-dates { font-size: 11px; color: var(--muted); padding-top: 2px; letter-spacing: .02em; }
.tl-org { font-size: 15px; font-weight: 600; color: var(--text-bright); }
.tl-role { font-size: 12.5px; color: var(--cyan-text); margin-top: 2px; font-weight: 600; }
.tl-bullets { margin-top: 10px; }
.tl-bullets li { font-size: 12.5px; color: var(--text); line-height: 1.7; list-style: none; padding-left: 14px; position: relative; }
.tl-bullets li::before { content: '—'; position: absolute; left: 0; color: var(--muted); }

/* ── Footer / contact ─────────────────────────────────────────────────────── */
#contact { padding: 60px 24px 70px; text-align: center; background: var(--pink); }
.contact-links {
  display: flex; gap: 26px; justify-content: center; flex-wrap: wrap;
  width: min(560px, calc(100% - 40px));
  margin: 24px auto 0;
  padding: 22px 28px;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.contact-links a { font-size: 13px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); padding-bottom: 2px; transition: color .15s, border-color .15s; }
.contact-links a:hover { color: var(--pink-text); border-color: var(--pink); }
footer { text-align: center; padding: 24px; font-size: 10.5px; color: var(--text-bright); background: var(--gold); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  #tree-app { flex-direction: column; height: auto; padding: 0 16px; }
  #canvas-wrap { flex: 0 0 460px; height: 460px; border-radius: 12px 12px 0 0; }
  #panel { width: 100%; border-radius: 0 0 12px 12px; border-left: 1px solid var(--border); border-top: none; max-height: 320px; }
  .tl-item { grid-template-columns: 1fr; gap: 6px; }
}
