:root {
  --navy: #1f3a5c;
  --accent: #2f6fb2;
  --ink: #1b1f24;
  --muted: #5a6470;
  --bg: #ffffff;
  --band: #f3f6f9;
  --line: #e2e7ed;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}
a { color: var(--accent); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 700; color: var(--navy); text-decoration: none; font-size: 18px; }
.nav nav { display: flex; align-items: center; gap: 22px; }
.nav nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.nav nav a:hover { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  background: var(--navy); color: #fff !important; text-decoration: none;
  font-weight: 600; font-size: 15px; border: 2px solid var(--navy);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--accent); border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--navy) !important; }
.btn-ghost:hover { color: #fff !important; }
.btn-small { padding: 7px 16px; font-size: 14px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Hero */
.hero { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.photo { width: 240px; height: 240px; border-radius: 50%; object-fit: cover; box-shadow: 0 10px 30px rgba(31,58,92,.18); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 700; color: var(--accent); margin: 0 0 8px; }
h1 { font-size: 42px; line-height: 1.15; margin: 0 0 16px; color: var(--navy); }
h2 { font-size: 28px; color: var(--navy); margin: 0 0 24px; }
h3 { font-size: 19px; margin: 0 0 6px; }
.lead { font-size: 18px; color: var(--muted); margin: 0; }

/* Sections */
section { padding: 64px 0; }
.band { background: var(--band); }
.two-col { display: grid; grid-template-columns: 220px 1fr; gap: 32px; }
.two-col p { margin: 0 0 14px; }

/* Experience */
.job { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 20px; background: #fff; }
.job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.org { color: var(--muted); font-size: 15px; margin: 0; }
.dates { color: var(--muted); font-size: 15px; white-space: nowrap; font-weight: 600; }
.job ul { margin: 14px 0 0; padding-left: 20px; }
.job li { margin-bottom: 6px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p { margin: 6px 0 0; font-size: 16px; }
.card .org { font-size: 14px; }

/* Contact & footer */
.contact { text-align: center; }
.contact .cta { justify-content: center; }
.footer { color: var(--muted); font-size: 14px; padding: 28px 24px; text-align: center; }

/* Mobile */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav nav a:not(.btn) { display: none; }
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 40px; gap: 24px; }
  .photo { width: 180px; height: 180px; margin: 0 auto; }
  .hero .cta { justify-content: center; }
  h1 { font-size: 32px; }
  .two-col { grid-template-columns: 1fr; gap: 8px; }
  .job-head { flex-direction: column; gap: 4px; }
  section { padding: 48px 0; }
}

/* Hero without photo */
.hero-solo { grid-template-columns: 1fr; max-width: 1040px; padding-top: 88px; padding-bottom: 80px; }
.hero-solo h1 { font-size: 48px; }
@media (max-width: 760px) { .hero-solo { text-align: left; padding-top: 48px; } .hero-solo .cta { justify-content: flex-start; } .hero-solo h1 { font-size: 34px; } }

.hero-solo > div { max-width: 760px; }

/* TRACE page */
.back { color: var(--accent); text-decoration: none; text-transform: none; letter-spacing: 0; font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.two-col-media { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
.two-col-media p { margin: 0 0 14px; }
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #0d1b2a; box-shadow: 0 10px 30px rgba(31,58,92,.15); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.slides { position: relative; background: linear-gradient(135deg, #1f3a5c, #2f6fb2); color: #fff; border-radius: 20px; padding: 48px 56px 28px; min-height: 340px; outline: none; }
.slide { display: none; max-width: 760px; }
.slide.active { display: block; animation: fade .35s ease; }
.slide h3 { font-size: 28px; margin: 6px 0 16px; color: #fff; }
.slide p { font-size: 18px; line-height: 1.6; color: rgba(255,255,255,.92); margin: 0 0 12px; }
.slide-num { font-size: 14px; letter-spacing: .15em; font-weight: 700; color: rgba(255,255,255,.7); }
.slides-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 28px; }
.slide-btn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); background: transparent; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.slide-btn:hover { background: rgba(255,255,255,.15); }
.dots { display: flex; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.4); cursor: pointer; padding: 0; }
.dot.active { background: #fff; width: 26px; border-radius: 5px; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; }
.stat-num { display: block; font-size: 38px; font-weight: 800; color: var(--navy); }
.stat-label { color: var(--muted); font-size: 15px; }
.more-link { display: inline-block; margin-top: 14px; font-weight: 600; text-decoration: none; }

@media (max-width: 760px) {
  .two-col-media { grid-template-columns: 1fr; gap: 20px; }
  .slides { padding: 32px 24px 22px; min-height: 380px; }
  .slide h3 { font-size: 23px; }
  .slide p { font-size: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
/* TRACE page v5 */
.t-hero { background: radial-gradient(1200px 500px at 85% -10%, #3b82c4 0%, transparent 60%), linear-gradient(135deg, #12263f 0%, #1f3a5c 55%, #24507f 100%); color: #fff; padding: 72px 0 80px; }
.t-hero-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.light { color: #fff !important; }
.eyebrow.light { color: #9cc7f0 !important; margin-top: 18px; }
.lead.light { color: rgba(255,255,255,.85) !important; }
.back.light { color: #9cc7f0 !important; font-size: 15px; text-decoration: none; }
.t-hero h1 { font-size: 48px; margin: 6px 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 14px; }
.t-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.t-stat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 16px; padding: 20px; color: rgba(255,255,255,.85); font-size: 14px; backdrop-filter: blur(4px); }
.t-num { display: block; font-size: 34px; font-weight: 800; color: #fff; line-height: 1.1; margin-bottom: 4px; }

.section-lead { margin: -12px 0 32px; max-width: 760px; }
.journey { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; position: relative; }
.journey li { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; counter-increment: step; }
.journey li::before { content: counter(step); position: absolute; top: 14px; right: 16px; font-weight: 800; color: #c9d6e3; font-size: 22px; }
.journey li:not(:last-child)::after { content: "→"; position: absolute; right: -14px; top: 40px; color: var(--accent); font-weight: 700; z-index: 1; }
.journey h3 { margin: 12px 0 6px; color: var(--navy); }
.journey p { margin: 0; font-size: 15px; color: var(--muted); }
.j-icon { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #1f3a5c, #2f6fb2); display: grid; place-items: center; }
.j-icon svg { width: 22px; height: 22px; fill: #fff; }

.issues { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.issue { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: 0 4px 14px rgba(31,58,92,.05); }
.issue p { margin: 10px 0 0; font-size: 16px; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.tag-red { background: #fde8e8; color: #b42318; }
.tag-amber { background: #fff4e0; color: #a15c07; }
.tag-blue { background: #e6f0fb; color: #1f5fa8; }
.tag-green { background: #e7f6ec; color: #18794e; }
.takeaways { margin: 8px 0 0; padding-left: 20px; }
.takeaways li { margin-bottom: 6px; }

@media (max-width: 900px) {
  .t-hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .journey { grid-template-columns: 1fr 1fr; }
  .journey li::after { display: none; }
}
@media (max-width: 760px) {
  .t-hero { padding: 48px 0 56px; }
  .t-hero h1 { font-size: 36px; }
  .journey { grid-template-columns: 1fr; }
  .issues { grid-template-columns: 1fr; }
  .nav nav a:not(.btn) { display: none; }
}
/* small skill tags on job cards */
.tags-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mini-tag { background: #e6f0fb; color: #1f5fa8; font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 999px; }

/* ===== v7 theme: bold name, richer look site-wide ===== */
:root { --grad: linear-gradient(135deg, #2f6fb2 0%, #5b8def 50%, #22c3a6 100%); }
body { background: #fbfcfe; }

/* Nav logo: monogram badge + bigger name */
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.badge { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--grad); color: #fff; font-size: 14px; font-weight: 800; letter-spacing: .02em; box-shadow: 0 4px 12px rgba(47,111,178,.35); }
.logo-name { background: linear-gradient(90deg, #12263f, #2f6fb2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { box-shadow: 0 2px 18px rgba(18,38,63,.06); }
.nav nav a:not(.btn) { position: relative; font-weight: 500; }
.nav nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--grad); transform: scaleX(0); transition: transform .2s ease; border-radius: 2px; }
.nav nav a:not(.btn):hover::after { transform: scaleX(1); }

/* Home hero */
.home-hero { position: relative; overflow: hidden; padding: 96px 0 72px; color: #fff;
  background: radial-gradient(900px 480px at 90% -10%, rgba(91,141,239,.55) 0%, transparent 60%),
              radial-gradient(700px 420px at -10% 110%, rgba(34,195,166,.30) 0%, transparent 60%),
              linear-gradient(135deg, #0d1c30 0%, #16304f 50%, #1f4673 100%); }
.home-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000 0%, transparent 90%); -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 90%); pointer-events: none; }
.home-hero-inner { position: relative; z-index: 1; }
.glow { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; pointer-events: none; animation: drift 14s ease-in-out infinite alternate; }
.g1 { width: 340px; height: 340px; background: #5b8def; top: -80px; right: 6%; }
.g2 { width: 260px; height: 260px; background: #22c3a6; bottom: -90px; left: 30%; animation-delay: -6s; opacity: .35; }
.g3 { width: 320px; height: 320px; background: #5b8def; top: -120px; left: -60px; opacity: .35; }
@keyframes drift { from { transform: translate(0,0); } to { transform: translate(40px, 30px); } }

.name { font-size: clamp(56px, 10vw, 112px); line-height: .95; font-weight: 900; letter-spacing: -.035em; margin: 8px 0 18px;
  background: linear-gradient(100deg, #ffffff 0%, #dbe9ff 45%, #7fd8c6 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: rise .7s ease both; }
.tagline { font-size: clamp(22px, 3vw, 30px); font-weight: 700; color: #fff; margin: 0 0 14px; animation: rise .7s .1s ease both; }
.home-hero .lead.light { max-width: 720px; animation: rise .7s .2s ease both; }
.home-hero .cta { animation: rise .7s .3s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.btn-bright { background: #fff; color: #12263f !important; border-color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.btn-bright:hover { background: #dbe9ff; border-color: #dbe9ff; }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.55); }
.btn-outline-light:hover { background: rgba(255,255,255,.14); border-color: #fff; }

.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 48px; animation: rise .7s .4s ease both; }
.hero-stats div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 16px 18px; font-size: 14px; color: rgba(255,255,255,.8); backdrop-filter: blur(6px); }
.hero-stats span { display: block; font-size: 30px; font-weight: 800; color: #fff; line-height: 1.1; margin-bottom: 2px; }

/* Section headings */
.kicker { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 6px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker.light { background: none; color: #7fd8c6 !important; }
h2 { font-size: 34px; letter-spacing: -.02em; position: relative; padding-bottom: 14px; }
h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 4px; background: var(--grad); }
.contact h2::after { left: 50%; transform: translateX(-50%); }
.band { background: linear-gradient(180deg, #f1f5fb 0%, #f7f9fc 100%); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.shown { opacity: 1; transform: none; }

/* Hobbies */
.hobbies { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 10px; }
.hobbies span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; color: var(--navy); box-shadow: 0 2px 8px rgba(18,38,63,.05); }

/* Experience timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--grad); opacity: .6; }
.timeline .job { position: relative; box-shadow: 0 6px 22px rgba(18,38,63,.06); transition: transform .2s ease, box-shadow .2s ease; }
.timeline .job::before { content: ""; position: absolute; left: -29px; top: 28px; width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 4px solid #2f6fb2; }
.timeline .job:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(18,38,63,.12); }
.dates { background: #e6f0fb; color: #1f5fa8; padding: 4px 12px; border-radius: 999px; font-size: 13px; }

/* Cards */
.card { position: relative; overflow: hidden; box-shadow: 0 6px 22px rgba(18,38,63,.06); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--grad); opacity: 0; transition: opacity .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(18,38,63,.13); border-color: #cfdcec; }
.card:hover::before { opacity: 1; }
.c-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: linear-gradient(135deg, #e6f0fb, #e3f7f2); margin-bottom: 14px; }
.card.project h3 { color: var(--navy); }

/* Dark contact band */
.contact-dark { position: relative; overflow: hidden; text-align: center; color: #fff; padding: 88px 0;
  background: radial-gradient(700px 380px at 100% 100%, rgba(34,195,166,.28) 0%, transparent 60%), linear-gradient(135deg, #0d1c30 0%, #1f4673 100%); }
.contact-dark .wrap { position: relative; z-index: 1; }
.contact-dark h2::after { left: 50%; transform: translateX(-50%); }
.contact-dark .lead { max-width: 640px; margin: 0 auto; }
.contact-dark .cta { justify-content: center; }

/* TRACE page: match the new hero colors */
.t-hero { position: relative; overflow: hidden;
  background: radial-gradient(900px 480px at 90% -10%, rgba(91,141,239,.55) 0%, transparent 60%),
              radial-gradient(700px 420px at -10% 110%, rgba(34,195,166,.30) 0%, transparent 60%),
              linear-gradient(135deg, #0d1c30 0%, #16304f 50%, #1f4673 100%); }
.t-hero h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 900; letter-spacing: -.03em;
  background: linear-gradient(100deg, #ffffff 0%, #dbe9ff 45%, #7fd8c6 100%); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.journey li, .issue { transition: transform .2s ease, box-shadow .2s ease; }
.journey li:hover, .issue:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(18,38,63,.12); }
.j-icon { background: var(--grad); }
.slides { background: radial-gradient(600px 300px at 100% 0%, rgba(34,195,166,.35), transparent 60%), linear-gradient(135deg, #12263f, #2f6fb2); }

@media (max-width: 760px) {
  .home-hero { padding: 56px 0 48px; }
  .hero-stats { grid-template-columns: 1fr 1fr; margin-top: 32px; }
  .hero-stats span { font-size: 24px; }
  .logo { font-size: 18px; }
  .badge { width: 32px; height: 32px; font-size: 13px; }
  h2 { font-size: 28px; }
  .timeline { padding-left: 22px; }
  .timeline .job::before { left: -23px; }
  .job { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .glow, .name, .tagline, .home-hero .lead.light, .home-hero .cta, .hero-stats { animation: none; }
}
/* v8 fixes */
.name { line-height: 1.05; padding-bottom: .08em; }
section.wrap { padding-top: 72px; padding-bottom: 72px; }
@media (max-width: 760px) { section.wrap { padding-top: 52px; padding-bottom: 52px; } }