:root {
  --bg: #070b14;
  --bg-elevated: #0d1422;
  --bg-soft: #121b2c;
  --card: rgba(18, 27, 44, 0.82);
  --text: #f5f7fb;
  --muted: #a9b5c8;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --accent: #5dd6ff;
  --accent-2: #8d7dff;
  --accent-3: #75f0b8;
  --accent-ink: #03151d;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --max: 1180px;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --header-h: 78px;
}

html[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-elevated: #ffffff;
  --bg-soft: #edf2f8;
  --card: rgba(255, 255, 255, 0.84);
  --text: #101725;
  --muted: #536176;
  --line: rgba(16, 23, 37, 0.1);
  --line-strong: rgba(16, 23, 37, 0.18);
  --accent: #007da7;
  --accent-2: #5c4dcb;
  --accent-3: #15815b;
  --accent-ink: #ffffff;
  --shadow: 0 28px 80px rgba(36, 56, 85, 0.13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 85% 8%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 28rem),
    radial-gradient(circle at 5% 38%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, Roboto, Aptos, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 800;
  transition: top 120ms ease;
}
.skip-link:focus { top: 12px; }

.site-shell { width: min(calc(100% - 34px), var(--max)); margin: 0 auto; }

.topbar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 220px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #071019;
  font-weight: 900; letter-spacing: -0.04em; box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 18%, transparent);
}
.brand-copy { display: grid; line-height: 1.2; }
.brand-copy strong { font-size: 0.98rem; }
.brand-copy small { color: var(--muted); font-size: 0.77rem; margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 0.92rem; font-weight: 650; }
.nav a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.icon-button {
  width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text); display: grid; place-items: center; cursor: pointer;
}
.icon-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.button {
  display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 8px;
  padding: 0 19px; border: 1px solid transparent; border-radius: 15px; background: var(--accent); color: var(--accent-ink);
  text-decoration: none; font-weight: 800; letter-spacing: -0.01em; cursor: pointer; transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 12px 34px color-mix(in srgb, var(--accent) 19%, transparent); }
.button-small { min-height: 42px; padding: 0 15px; font-size: 0.9rem; }
.button-ghost { color: var(--text); border-color: var(--line-strong); background: transparent; }
.button-light { background: #f6fbff; color: #09101c; }
.button-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }

.section-pad { padding-left: clamp(6px, 2vw, 22px); padding-right: clamp(6px, 2vw, 22px); }
.hero { padding-top: clamp(68px, 10vw, 130px); padding-bottom: clamp(70px, 9vw, 120px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: clamp(36px, 7vw, 90px); align-items: center; }
.eyebrow { margin: 0 0 15px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 850; }
h1, h2, h3 { text-wrap: balance; }
h1 { margin: 0; max-width: 880px; font-size: clamp(3.25rem, 7.3vw, 6.7rem); line-height: .96; letter-spacing: -0.065em; font-weight: 820; }
.lede { max-width: 760px; margin: 26px 0 0; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.28rem); line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 30px; color: var(--muted); font-size: .86rem; }
.hero-meta span:not(:last-child)::after { content: "·"; margin-left: 18px; color: var(--line-strong); }

.hero-panel {
  min-height: 520px; border-radius: var(--radius-xl); position: relative; overflow: hidden; padding: 28px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--bg-soft) 88%, transparent), color-mix(in srgb, var(--accent-2) 12%, var(--bg-soft)));
  border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-panel::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 42px 42px; opacity: .32; mask-image: linear-gradient(to bottom, #000, transparent 76%); }
.signal-art { position: absolute; inset: 38px 28px 190px; }
.node { position: absolute; width: 24px; height: 24px; border: 6px solid var(--bg-soft); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 30px color-mix(in srgb, var(--accent) 38%, transparent); }
.node-a { left: 8%; top: 15%; }
.node-b { right: 10%; top: 35%; background: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2), 0 0 30px color-mix(in srgb, var(--accent-2) 38%, transparent); }
.node-c { left: 33%; bottom: 8%; background: var(--accent-3); box-shadow: 0 0 0 1px var(--accent-3), 0 0 30px color-mix(in srgb, var(--accent-3) 38%, transparent); }
.node-d { right: 4%; bottom: 0; }
.signal { position: absolute; height: 2px; transform-origin: left center; background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: .82; }
.signal-1 { width: 76%; left: 11%; top: 21%; transform: rotate(16deg); }
.signal-2 { width: 53%; left: 16%; top: 25%; transform: rotate(60deg); }
.signal-3 { width: 52%; left: 40%; bottom: 15%; transform: rotate(-10deg); background: linear-gradient(90deg, var(--accent-3), var(--accent)); }
.panel-label { position: relative; z-index: 1; margin: 0 0 14px; color: var(--muted); font-weight: 750; }
.discipline-list { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 9px; }
.discipline-list span { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--bg) 40%, transparent); font-size: .8rem; font-weight: 750; }

.trust-strip { display: grid; grid-template-columns: repeat(8, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-strip span { padding: 22px 8px; text-align: center; color: var(--muted); font-size: .74rem; font-weight: 820; letter-spacing: .04em; text-transform: uppercase; border-right: 1px solid var(--line); }
.trust-strip span:last-child { border-right: 0; }

.section { padding-top: clamp(84px, 10vw, 140px); padding-bottom: clamp(84px, 10vw, 140px); border-bottom: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .52fr); gap: 40px; align-items: end; margin-bottom: 46px; }
.section-heading.compact { grid-template-columns: 1fr; }
.section-heading h2, .about-grid h2, .education-card h2, .contact-card h2 { margin: 0; font-size: clamp(2rem, 4.3vw, 4rem); line-height: 1.04; letter-spacing: -0.05em; }
.section-heading > p { margin: 0; color: var(--muted); max-width: 520px; justify-self: end; }

.expertise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.expertise-card { position: relative; min-height: 270px; padding: 27px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); overflow: hidden; }
.expertise-card::after { content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%; right: -75px; top: -75px; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.card-index { color: var(--accent); font-size: .8rem; font-weight: 850; }
.expertise-card h3 { margin: 66px 0 10px; font-size: 1.33rem; letter-spacing: -0.025em; }
.expertise-card p { margin: 0; color: var(--muted); }

.project-stack { border-top: 1px solid var(--line-strong); }
.project-row { display: grid; grid-template-columns: .42fr 1.18fr .55fr; gap: 28px; align-items: start; padding: 34px 0; border-bottom: 1px solid var(--line); }
.project-kicker { color: var(--accent); font-size: .8rem; font-weight: 850; text-transform: uppercase; letter-spacing: .1em; }
.project-row h3 { margin: 0 0 8px; font-size: 1.42rem; letter-spacing: -0.03em; }
.project-row p { margin: 0; color: var(--muted); }
.project-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.project-tags span { border: 1px solid var(--line); padding: 6px 9px; border-radius: 999px; color: var(--muted); font-size: .75rem; font-weight: 750; }

.experience-section { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg-soft) 50%, transparent), transparent); }
.timeline { margin-top: 10px; }
.timeline-item { display: grid; grid-template-columns: 180px 1fr; gap: 40px; }
.timeline-meta { display: flex; gap: 10px; align-items: flex-start; padding-top: 5px; color: var(--muted); font-weight: 750; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-3) 12%, transparent); margin-top: 7px; }
.timeline-body { padding-left: 30px; border-left: 1px solid var(--line-strong); }
.timeline-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.timeline-title h3 { margin: 0; font-size: 1.65rem; letter-spacing: -0.035em; }
.timeline-title p { margin: 5px 0 0; color: var(--muted); }
.timeline-title a { color: var(--accent); text-decoration: none; font-size: .88rem; font-weight: 750; }
.timeline-body ul { margin: 26px 0 0; padding-left: 20px; color: var(--muted); }
.timeline-body li { margin: 11px 0; padding-left: 4px; }

.cert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cert-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); }
.cert-card h3 { margin: 0 0 18px; color: var(--accent); font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
.cert-card ul { list-style: none; margin: 0; padding: 0; }
.cert-card li { display: flex; align-items: baseline; justify-content: space-between; gap: 22px; padding: 12px 0; border-top: 1px solid var(--line); }
.cert-card li strong { font-size: .94rem; }
.cert-card li span { color: var(--muted); font-size: .78rem; white-space: nowrap; }

.about-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 80px; align-items: start; }
.about-copy { font-size: 1.08rem; color: var(--muted); }
.about-copy p { margin-top: 0; margin-bottom: 18px; }
.systems-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.systems-grid div { padding: 24px; border-right: 1px solid var(--line); background: var(--card); }
.systems-grid div:last-child { border-right: 0; }
.systems-grid span { display: block; margin-bottom: 8px; color: var(--accent); text-transform: uppercase; font-size: .72rem; letter-spacing: .1em; font-weight: 850; }
.systems-grid strong { font-size: .93rem; }

.education-section { padding-top: 70px; padding-bottom: 70px; }
.education-card { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding: 42px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: linear-gradient(135deg, var(--card), color-mix(in srgb, var(--accent-2) 8%, var(--card))); }
.education-card > div > p:last-child, .education-card > p { margin-bottom: 0; color: var(--muted); }

.contact { padding-top: 80px; padding-bottom: 80px; }
.contact-card { min-height: 360px; padding: clamp(34px, 6vw, 70px); border-radius: var(--radius-xl); background: linear-gradient(135deg, #0c6c8c, #4c3fb6 62%, #5d2f9d); color: #fff; display: grid; grid-template-columns: 1.35fr .65fr; gap: 50px; align-items: end; overflow: hidden; position: relative; }
.contact-card::after { content: ""; position: absolute; width: 350px; height: 350px; border-radius: 50%; right: -90px; top: -160px; border: 70px solid rgba(255,255,255,.08); }
.contact-card .eyebrow { color: #d8f6ff; }
.contact-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; position: relative; z-index: 1; }

.footer { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); }
.footer a { text-decoration: none; }

@media (max-width: 980px) {
  .nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-panel { min-height: 390px; }
  .trust-strip { grid-template-columns: repeat(4, 1fr); }
  .trust-strip span:nth-child(4) { border-right: 0; }
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .project-row { grid-template-columns: .38fr 1fr; }
  .project-tags { grid-column: 2; justify-content: flex-start; }
  .systems-grid { grid-template-columns: repeat(2, 1fr); }
  .systems-grid div:nth-child(2) { border-right: 0; }
  .systems-grid div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .about-grid { gap: 50px; }
}

@media (max-width: 720px) {
  .site-shell { width: min(calc(100% - 22px), var(--max)); }
  .brand-copy small { display: none; }
  .brand { min-width: auto; }
  .nav-actions .button { display: none; }
  .hero { padding-top: 60px; }
  h1 { font-size: clamp(3rem, 16vw, 5.2rem); }
  .hero-meta span::after { display: none; }
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .trust-strip span:nth-child(even) { border-right: 0; }
  .section-heading, .about-grid, .contact-card { grid-template-columns: 1fr; gap: 24px; }
  .section-heading > p { justify-self: start; }
  .expertise-grid, .cert-grid { grid-template-columns: 1fr; }
  .project-row { grid-template-columns: 1fr; gap: 12px; }
  .project-tags { grid-column: 1; }
  .timeline-item { grid-template-columns: 1fr; gap: 12px; }
  .timeline-body { padding-left: 18px; }
  .timeline-title { flex-direction: column; }
  .systems-grid { grid-template-columns: 1fr; }
  .systems-grid div { border-right: 0; border-bottom: 1px solid var(--line); }
  .systems-grid div:last-child { border-bottom: 0; }
  .education-card { align-items: flex-start; flex-direction: column; }
  .contact-actions { justify-content: flex-start; }
  .footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 28px 5px; }
}

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

@media print {
  :root, html[data-theme="light"] { --bg: #fff; --text: #111; --muted: #444; --line: #d5d5d5; --line-strong: #aaa; --card: #fff; --accent: #006f93; --accent-2: #5444b7; --accent-3: #287a59; }
  body { background: #fff !important; color: #111; font-size: 10.5pt; }
  .site-shell { width: 100%; }
  .topbar, .hero-panel, .trust-strip, .hero-actions, .contact, .footer, .project-tags { display: none !important; }
  .hero { padding: 0 0 22px; }
  h1 { font-size: 34pt; }
  .lede { font-size: 12pt; color: #333; }
  .section { padding: 24px 0; break-inside: auto; }
  .section-heading { margin-bottom: 18px; }
  .section-heading h2, .about-grid h2, .education-card h2 { font-size: 22pt; }
  .expertise-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .expertise-card, .cert-card, .education-card { break-inside: avoid; box-shadow: none; background: #fff; }
  .expertise-card { min-height: 0; padding: 14px; }
  .expertise-card h3 { margin: 24px 0 6px; }
  .project-row { break-inside: avoid; padding: 16px 0; }
  .timeline-body { break-inside: avoid; }
  .systems-grid { break-inside: avoid; }
  a { text-decoration: none; }
  @page { size: Letter; margin: 0.55in; }
}
