:root {
  --ink: #102033;
  --navy: #0b1f33;
  --teal: #087e76;
  --mint: #cdece4;
  --cream: #f4f1e9;
  --paper: #fbfaf7;
  --page-background: var(--paper);
  --text: var(--ink);
  --muted: #5d6874;
  --surface: #fff;
  --surface-soft: var(--cream);
  --feature-surface: #eef7f4;
  --accent: var(--teal);
  --accent-surface: var(--mint);
  --line: rgba(16, 32, 51, .14);
  --navigation-background: rgba(251, 250, 247, .9);
  --strong-surface: var(--navy);
  --strong-text: #fff;
  --strong-muted: rgba(255, 255, 255, .72);
  --strong-accent: #82d4c6;
  --media-surface: #061422;
  --focus: var(--teal);
  --hero-glow: rgba(205, 236, 228, .65);
  --shadow: 0 24px 70px rgba(6, 30, 48, .12);
}

html[data-theme="dark"] {
  --page-background: #0f1b27;
  --text: #e9f0f4;
  --muted: #aebbc6;
  --surface: #172634;
  --surface-soft: #142330;
  --feature-surface: #14312f;
  --accent: #63d2c5;
  --accent-surface: #173b39;
  --line: rgba(222, 235, 242, .17);
  --navigation-background: rgba(15, 27, 39, .92);
  --strong-surface: #0a2032;
  --strong-text: #f5f8fa;
  --strong-muted: rgba(235, 243, 247, .76);
  --strong-accent: #79d9ce;
  --media-surface: #07131e;
  --focus: #79d9ce;
  --hero-glow: rgba(28, 94, 88, .42);
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  color: var(--text);
  background: var(--page-background);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.65;
}
a { color: inherit; }
img, iframe { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: .7rem 1rem;
  color: var(--ink);
  background: #fff;
  border-radius: .4rem;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.15rem 3rem;
  background: var(--navigation-background);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; font-weight: 700; }
.brand-mark {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  color: var(--strong-text);
  background: var(--navy);
  border-radius: 50%;
  font-family: "Manrope", sans-serif;
  font-size: .78rem;
  letter-spacing: .08em;
}
.site-nav { display: flex; align-items: center; gap: clamp(1.1rem, 2.2vw, 2rem); }
.site-nav a { text-decoration: none; font-size: .92rem; font-weight: 600; }
.site-nav a:not(.nav-cta):hover { color: var(--accent); }
.nav-cta { padding: .7rem 1.1rem; color: var(--strong-text); background: var(--strong-surface); border-radius: 99px; }
.nav-toggle { display: none; }
.theme-control { display: flex; align-items: center; }
.theme-control select { min-height: 40px; padding: .55rem 1.8rem .55rem .75rem; color: var(--text); background-color: var(--surface); border: 1px solid var(--line); border-radius: 99px; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }

.hero, .section, footer { max-width: 1200px; margin-inline: auto; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
  gap: 3.25rem;
  align-items: center;
  min-height: calc(100svh - 5.25rem);
  padding: 2.75rem 3rem 3.25rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 25%, var(--hero-glow), transparent 26%),
    linear-gradient(120deg, var(--page-background) 55%, var(--surface-soft));
}
.eyebrow { margin: 0 0 1.2rem; color: var(--accent); font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { font-family: "Manrope", sans-serif; line-height: 1.13; letter-spacing: -.035em; }
h1 { max-width: 820px; margin: 0; font-size: clamp(2.75rem, 3.45vw, 3.5rem); }
h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.4rem); }
h3 { font-size: 1.25rem; }
.hero-lede { max-width: 650px; margin: 1.5rem 0; color: var(--muted); font-size: 1.12rem; }
.hero-name { margin: 0 0 .45rem; font-family: "Manrope", sans-serif; font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 800; letter-spacing: -.035em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-actions .button { padding: .8rem 1.05rem; font-size: .9rem; }
.button { display: inline-flex; align-items: center; gap: .4rem; padding: .95rem 1.35rem; border: 1px solid var(--text); border-radius: 99px; text-decoration: none; font-weight: 700; transition: transform .2s, box-shadow .2s; }
.button:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(11,31,51,.13); }
.button.primary { color: var(--strong-text); background: var(--strong-surface); border-color: var(--strong-surface); }
.button.secondary { background: transparent; }
.hero-card { position: relative; min-width: 0; padding: 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 1.4rem; box-shadow: var(--shadow); transform: rotate(1.5deg); }
.portrait-frame { position: relative; display: grid; aspect-ratio: 1; place-items: center; margin-bottom: 1.5rem; overflow: hidden; background: var(--accent-surface); border-radius: 50%; }
.portrait-frame::after { position: absolute; inset: 0; content: ""; border: 1px solid rgba(255,255,255,.7); border-radius: inherit; box-shadow: inset 0 0 0 8px rgba(255,255,255,.14); pointer-events: none; }
.portrait-frame img { display: block; width: 100%; max-width: 100%; height: 100%; object-fit: cover; }
.hero-card > div:not(.portrait-frame) { padding-inline: .6rem; }
.hero-card h2 { font-size: 1.55rem; }
.hero-card p { color: var(--muted); }
.card-kicker { margin-bottom: .35rem !important; color: var(--accent) !important; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.availability { display: flex; align-items: center; gap: .6rem; margin: 1.1rem 0 .4rem; padding-top: 1rem !important; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.availability span { width: .55rem; height: .55rem; background: #28a77d; border-radius: 50%; box-shadow: 0 0 0 4px rgba(40,167,125,.12); }

.section { padding: 8rem 3rem; }
.about, .experience, .leadership, .credentials { display: grid; grid-template-columns: .8fr 1.2fr; gap: 7rem; }
#projects { grid-template-columns: 1fr; gap: 3.5rem; }
#projects .section-heading { max-width: 760px; }
#projects .section-heading h2 { max-width: 680px; }
.section-heading h2 { max-width: 500px; }
.about-copy > p { margin-top: 0; color: var(--muted); font-size: 1.12rem; }
.capabilities { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2.2rem; }
.capabilities span { padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 99px; font-size: .82rem; font-weight: 600; }

.impact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding-top: 0; }
.impact-card { min-height: 310px; padding: 2rem; color: var(--strong-text); background: var(--strong-surface); border-radius: 1rem; }
.impact-card:nth-child(2) { color: var(--text); background: var(--accent-surface); }
.impact-card:nth-child(3) { color: var(--text); background: var(--surface-soft); }
.impact-number { margin: 0 0 4rem; font-family: "Manrope", sans-serif; font-size: 2.6rem; font-weight: 800; letter-spacing: -.05em; }
.impact-card p:last-child { opacity: .75; }

.experience { background: var(--surface-soft); }
.timeline-item { display: grid; grid-template-columns: 150px 1fr; gap: 2rem; padding: 0 0 2.6rem; border-bottom: 1px solid var(--line); }
.timeline-item + .timeline-item { padding-top: 2.6rem; }
.timeline-meta p { margin: 0; color: var(--accent); font-weight: 700; }
.timeline-meta span { color: var(--muted); font-size: .88rem; }
.timeline-content h3 { margin-top: 0; font-size: 1.45rem; }
.timeline-content p { margin-bottom: 0; color: var(--muted); }

.leadership-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.leadership-card { padding: 2rem; border: 1px solid var(--line); border-radius: 1rem; }
#leadership .leadership-card:first-child, .project-primary-card { grid-column: 1 / -1; background: var(--feature-surface); }
.featured-project-card { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.25fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: center; background: var(--feature-surface); }
.featured-project-copy h3 { margin: .35rem 0 .8rem; font-size: clamp(1.6rem, 2.4vw, 2.15rem); }
.featured-project-copy > p:not(.card-kicker) { color: var(--muted); }
.project-relevance { padding-left: 1rem; border-left: 3px solid var(--accent); }
.project-relevance strong { color: var(--text); }
.customer-success-card { background: var(--surface-soft); }
.marginpilot-card { background: var(--surface); }
.side-projects-card { grid-column: 1 / -1; margin-top: 1rem; }
.side-projects-card h3 { margin: .25rem 0 1.25rem; font-size: 1.35rem; }
.side-project-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.side-project-list a { font-weight: 700; text-decoration: none; }
.side-project-list a:hover { color: var(--accent); }
.side-project-list li > span { display: block; margin-top: .35rem; color: var(--muted); font-size: .95rem; }
.leadership-card p:last-child { color: var(--muted); }
.capstone-card { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 2rem; align-items: center; }
.capstone-copy h3 { margin: .35rem 0 .8rem; font-size: 1.6rem; }
.project-meta { margin: 1rem 0; color: var(--muted); font-size: .9rem; }
.featured-project-preview, .poster-preview, .recognition-preview { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); box-shadow: var(--shadow); }
.featured-project-preview img, .poster-preview img, .recognition-preview img { display: block; width: 100%; height: auto; }
.featured-project-preview:focus-visible, .poster-preview:focus-visible, .recognition-preview:focus-visible { outline-color: var(--focus); }

.video-panel { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 2rem; align-items: center; margin-top: 1rem; padding: 2rem; color: var(--strong-text); background: var(--strong-surface); border-radius: 1.25rem; box-shadow: var(--shadow); }
.video-copy h3 { margin: .35rem 0 .8rem; font-size: 1.6rem; }
.video-copy p:not(.card-kicker) { margin-bottom: 0; color: var(--strong-muted); }
.video-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--media-surface); border-radius: .9rem; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.credential-list > div { display: grid; grid-template-columns: 120px 1fr; gap: 1.5rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.credential-list > div > * { min-width: 0; }
.credential-list span { color: var(--accent); font-weight: 700; }
.credential-list p { margin: 0; color: var(--muted); }
.credential-list strong { color: var(--text); }
.credential-link { display: inline-block; margin-top: .65rem; color: var(--accent); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.recognition-preview { max-width: 540px; margin-top: 1rem; }

.contact { margin-top: 2rem; padding: 6rem; color: var(--strong-text); text-align: center; background: var(--strong-surface); border-radius: 1.5rem; }
.contact .eyebrow { color: var(--strong-accent); }
.contact h2 { max-width: 850px; margin: 0 auto; }
.contact p:not(.eyebrow) { margin: 1.3rem auto 2rem; color: var(--strong-muted); }
.opportunity-note { display: grid; gap: .3rem; max-width: 720px; margin: 0 auto 2rem; padding: 1rem 1.25rem; color: var(--strong-muted); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); border-radius: 1rem; }
.opportunity-note strong { color: var(--strong-text); }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }
.button.light { color: var(--navy); background: #fff; border-color: #fff; }
footer { display: flex; justify-content: space-between; padding: 2.5rem 3rem; color: var(--muted); font-size: .85rem; }
footer a { text-decoration: none; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 850px) {
  .site-header { padding: 1rem 1.3rem; }
  .brand-name { display: none; }
  .nav-toggle { display: flex; flex-direction: column; justify-content: center; min-width: 44px; min-height: 44px; gap: 4px; padding: .65rem; background: none; border: 0; }
  .nav-toggle > span:not(.sr-only) { display: block; width: 22px; height: 2px; background: var(--ink); }
  html[data-theme="dark"] .nav-toggle > span:not(.sr-only) { background: var(--text); }
  .site-nav { position: absolute; top: 100%; left: 1rem; right: 1rem; display: none; max-height: calc(100vh - 5.5rem); flex-direction: column; align-items: stretch; gap: 0; padding: .8rem; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border: 1px solid var(--line); border-radius: .8rem; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .9rem; }
  .theme-control { padding: .35rem .45rem; }
  .theme-control select { width: 100%; min-height: 46px; }
  .nav-cta { margin-top: .3rem; text-align: center; }
  .hero { grid-template-columns: 1fr; gap: 3rem; min-height: auto; padding: 5rem 1.3rem; }
  .hero-card { max-width: 420px; transform: none; }
  .section { padding: 5rem 1.3rem; }
  .about, .experience, .leadership, .credentials { grid-template-columns: 1fr; gap: 3rem; }
  .impact { grid-template-columns: 1fr; }
  .featured-project-card, .capstone-card { grid-template-columns: 1fr; }
  .video-panel { grid-template-columns: 1fr; padding: 1.5rem; }
  .impact-card { min-height: auto; }
  .impact-number { margin-bottom: 2rem; }
  .contact { margin: 1rem; padding: 4rem 1.5rem; }
  footer { padding: 2rem 1.3rem; }
}

@media (max-width: 520px) {
  h1 { font-size: clamp(2.25rem, 11vw, 2.85rem); }
  h2 { font-size: clamp(1.85rem, 8.5vw, 2.35rem); }
  .hero { gap: 2.25rem; padding-top: 3.75rem; padding-bottom: 4.25rem; }
  .hero-lede { margin: 1.5rem 0; font-size: 1.05rem; }
  .section { padding-top: 4rem; padding-bottom: 4rem; }
  .hero-actions .button { width: 100%; justify-content: center; }
  .timeline-item { grid-template-columns: 1fr; gap: .8rem; }
  .leadership-grid { grid-template-columns: 1fr; }
  .leadership-card, .impact-card { padding: 1.35rem; }
  #leadership .leadership-card:first-child, .project-primary-card, .featured-project-card { grid-column: auto; }
  .side-projects-card { grid-column: auto; }
  .side-project-list { grid-template-columns: 1fr; }
  .credential-list > div { grid-template-columns: 1fr; gap: .4rem; }
  .credential-list p, .credential-link { overflow-wrap: anywhere; }
  .button { max-width: 100%; min-height: 44px; justify-content: center; text-align: center; line-height: 1.35; white-space: normal; }
  .featured-project-preview, .poster-preview, .recognition-preview { width: 100%; }
  .video-panel { padding: 1.25rem; }
  .contact { padding: 3.5rem 1.25rem; }
  .contact .button { width: 100%; }
  footer { flex-direction: column; gap: .65rem; }
  footer p { margin: 0; }
}

@media (min-width: 851px) and (max-width: 1050px) {
  .site-header { padding-inline: 2rem; }
  .site-nav { gap: 1.15rem; }
  .site-nav a { font-size: .86rem; }
  .hero { gap: 2.5rem; }
}

@media (min-width: 851px) and (max-width: 960px) {
  .featured-project-card { grid-template-columns: 1fr; }
}
