:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --soft: #64748b;
  --line: #d9e2ea;
  --panel: #f7fafc;
  --panel-strong: #eef5f7;
  --surface: #ffffff;
  --hero-bg: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.88);
  --browser-bar: #f8fafc;
  --brand-bg: #f8fbfb;
  --hero-wash: rgba(15, 118, 110, 0.08);
  --device-bezel: #111827;
  --device-metal: #d9e0e8;
  --device-metal-dark: #9ba7b5;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #d8f3ee;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0b1120;
  --ink: #eef6ff;
  --muted: #b7c4d6;
  --soft: #8fa0b7;
  --line: #26354a;
  --panel: #111a2b;
  --panel-strong: #152033;
  --surface: #0f172a;
  --hero-bg: #0b1120;
  --header-bg: rgba(11, 17, 32, 0.88);
  --browser-bar: #172235;
  --brand-bg: #122a32;
  --hero-wash: rgba(20, 184, 166, 0.1);
  --accent: #2dd4bf;
  --accent-strong: #5eead4;
  --accent-soft: #123c3b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0b1120;
    --ink: #eef6ff;
    --muted: #b7c4d6;
    --soft: #8fa0b7;
    --line: #26354a;
    --panel: #111a2b;
    --panel-strong: #152033;
    --surface: #0f172a;
    --hero-bg: #0b1120;
    --header-bg: rgba(11, 17, 32, 0.88);
    --browser-bar: #172235;
    --brand-bg: #122a32;
    --hero-wash: rgba(20, 184, 166, 0.1);
    --device-bezel: #050816;
    --device-metal: #1f2937;
    --device-metal-dark: #111827;
    --accent: #2dd4bf;
    --accent-strong: #5eead4;
    --accent-soft: #123c3b;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 0.9rem;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}

.nav-shell,
.section-shell,
.hero-shell {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.nav-shell {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 9px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 700;
}

.nav-links a,
.theme-toggle {
  transition: color 180ms ease;
}

.nav-links a:hover,
.theme-toggle:hover {
  color: var(--accent-strong);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.theme-toggle {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.theme-icon {
  display: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

:root:not([data-theme]) .theme-icon-system,
html[data-theme='light'] .theme-icon-light,
html[data-theme='dark'] .theme-icon-dark {
  display: block;
}

.hero-section {
  --section-bg: var(--hero-bg);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(115deg, var(--hero-wash), rgba(15, 118, 110, 0) 36%),
    linear-gradient(var(--section-bg), var(--section-bg));
}

.hero-shell {
  display: block;
  padding: clamp(3.25rem, 8vw, 6rem) 0 clamp(3.5rem, 7vw, 5rem);
}

.hero-copy {
  max-width: 900px;
}

.hero-copy h1,
.split-heading h2,
.stack-section h2,
.leadership-section h2,
.contact-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.5rem, 7vw, 5.35rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.96;
}

.hero-lede {
  max-width: 680px;
  margin: 1.75rem 0 0;
  color: var(--muted);
  font-size: clamp(1.12rem, 2vw, 1.35rem);
  font-weight: 500;
  line-height: 1.55;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0.72rem 1rem;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.1;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.button.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button.secondary:hover {
  border-color: #b7c8c8;
  color: var(--accent-strong);
}

.hero-facts {
  display: grid;
  gap: 1rem;
  margin: 2.8rem 0 0;
}

.hero-facts div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.hero-facts dt {
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-facts dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.desktop-frame,
.phone-frame {
  overflow: hidden;
  background: var(--device-bezel);
  box-shadow: var(--shadow);
}

.desktop-frame {
  overflow: visible;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px 18px 12px 12px;
  padding: 14px 14px 18px;
}

.phone-frame {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 42px;
  padding: 8px;
  background:
    linear-gradient(145deg, #293444, #0b1020 42%, #1f2937);
}

.stack-section,
.precareer-section,
.experience-section,
.leadership-section,
.contact-section {
  padding: 6.5rem 0;
  background: var(--section-bg);
}

main > section:nth-of-type(odd) {
  --section-bg: var(--bg);
}

main > section:nth-of-type(even) {
  --section-bg: var(--panel);
}

.stack-section {
  border-bottom: 1px solid var(--line);
}

.experience-section {
  border-bottom: 1px solid var(--line);
}

.precareer-section {
  border-bottom: 1px solid var(--line);
}

.stack-section h2 {
  max-width: 620px;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.stack-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 0.7rem;
  margin-top: 2.25rem;
  padding: 0;
  list-style: none;
}

.stack-card,
.leadership-points span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.stack-card {
  display: flex;
  min-height: 64px;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

.stack-card strong {
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: normal;
}

.tech-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: contain;
}

.tech-logo-wide {
  width: 42px;
}

.leadership-points span {
  padding: 0.7rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 800;
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.8fr);
  gap: 4rem;
  align-items: start;
}

.split-heading h2,
.leadership-section h2,
.contact-section h2 {
  font-size: clamp(2rem, 4vw, 3.55rem);
  line-height: 1.05;
}

.split-heading p,
.leadership-section p,
.contact-section p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.75;
}

.precareer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 3rem;
  align-items: start;
  margin-top: 3rem;
}

.precareer-story {
  display: grid;
  gap: 1rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.precareer-story p {
  margin: 0;
}

.precareer-metrics {
  display: grid;
  gap: 0.85rem;
}

.precareer-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 1rem;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.05);
}

.precareer-metrics span {
  display: block;
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.precareer-metrics strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink);
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.95;
}

.timeline {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
}

.role-card {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 1.35rem;
}

.role-meta {
  display: grid;
  align-content: start;
  gap: 0.45rem;
}

.role-logo {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.role-logo img {
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
}

.role-meta > span:not(.role-logo) {
  color: var(--soft);
  font-size: 0.83rem;
  font-weight: 800;
  text-transform: uppercase;
}

.role-meta strong {
  font-size: 1.08rem;
}

.role-body h3 {
  margin: 0;
  font-size: 1.32rem;
  line-height: 1.2;
}

.role-body p {
  margin: 0.65rem 0 0;
  color: var(--muted);
}

.role-body ul {
  display: grid;
  gap: 0.4rem;
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.role-body li::marker {
  color: var(--accent);
}

.roborecon-section {
  overflow: clip;
  border-bottom: 1px solid var(--line);
  background: var(--section-bg);
  padding: 6.5rem 0;
}

.roborecon-heading {
  margin-bottom: 3rem;
}

.showcase {
  height: 360vh;
  width: min(1280px, calc(100% - 40px));
  margin-inline: auto;
}

.showcase-topic-window {
  overflow: hidden;
  padding-block: 0.3rem;
}

.showcase-copy {
  display: flex;
  gap: 1rem;
  will-change: transform;
}

.showcase-step {
  flex: 0 0 clamp(320px, 42vw, 520px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  padding: 1.1rem 1.2rem;
  opacity: 0.48;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.showcase-step.is-active {
  border-color: var(--accent);
  background: var(--surface);
  opacity: 1;
  transform: translateY(-3px);
}

.showcase-step span {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
}

.showcase-step h3 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.12;
}

.showcase-step p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-weight: 500;
}

.showcase-sticky {
  position: sticky;
  top: 88px;
  display: grid;
  grid-template-rows: auto minmax(560px, 680px);
  align-content: start;
  gap: 1.5rem;
  height: calc(100vh - 104px);
  min-height: 780px;
}

.showcase-devices {
  position: relative;
  height: 100%;
  min-height: 0;
}

.showcase-desktop {
  position: absolute;
  top: 4px;
  right: 0;
  width: min(1080px, 94%);
}

.showcase-phone {
  position: absolute;
  left: 2%;
  top: 38%;
  z-index: 2;
  width: min(360px, 30vw);
}

.scroll-window {
  overflow: hidden;
  background: var(--surface);
}

.desktop-window {
  aspect-ratio: 16 / 10;
  border-radius: 7px;
}

.phone-window {
  aspect-ratio: 9 / 19.45;
  border-radius: 32px;
}

.scroll-window img {
  width: 100%;
  max-width: none;
  will-change: transform;
}

.macbook-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 2;
  width: 76px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 0 0 10px 10px;
  background: var(--device-bezel);
}

.macbook-base {
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 108%;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 0 0 42px 42px;
  background: linear-gradient(180deg, var(--device-metal), var(--device-metal-dark));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.macbook-base::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 17%;
  height: 5px;
  transform: translateX(-50%);
  border-radius: 0 0 10px 10px;
  background: rgba(15, 23, 42, 0.18);
  content: '';
}

.iphone-island {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 3;
  width: 76px;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #030712;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.iphone-button {
  position: absolute;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #64748b, #111827);
}

.iphone-button.volume {
  top: 98px;
  left: -3px;
  height: 54px;
}

.iphone-button.action {
  top: 64px;
  left: -3px;
  height: 24px;
}

.iphone-button.power {
  top: 112px;
  right: -3px;
  height: 70px;
}

.leadership-section {
  border-bottom: 1px solid var(--line);
}

.leadership-shell,
.contact-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.58fr);
  gap: 4rem;
  align-items: center;
}

.leadership-section p,
.contact-section p {
  margin-top: 1.2rem;
}

.leadership-points {
  display: grid;
  gap: 0.75rem;
}

.leadership-points span {
  background: var(--surface);
}

.contact-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--soft);
  font-size: 0.93rem;
  font-weight: 700;
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 1.5rem;
  align-items: start;
}

.footer-shell p {
  margin: 0;
}

.footer-contact {
  display: grid;
  gap: 0.7rem;
  justify-items: start;
}

.footer-contact > p:first-child {
  color: var(--ink);
  font-weight: 800;
}

.turnstile-box {
  min-height: 65px;
}

.footer-contact-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0.55rem 0.8rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.footer-contact-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.footer-contact-status {
  color: var(--soft);
  font-size: 0.85rem;
  font-weight: 700;
}

.footer-contact-link {
  color: var(--accent-strong);
  font-weight: 800;
}

@media (max-width: 980px) {
  .hero-shell,
  .split-heading,
  .showcase,
  .precareer-grid,
  .leadership-shell,
  .contact-shell {
    grid-template-columns: 1fr;
  }

  .hero-shell {
    padding-top: 4rem;
  }

  .showcase-sticky {
    position: relative;
    top: auto;
    order: -1;
    grid-template-rows: auto 520px;
    height: 680px;
    min-height: 0;
  }

  .showcase-desktop {
    top: 10px;
    right: 0;
    width: 92%;
  }

  .showcase-phone {
    top: 300px;
    left: 0;
    width: min(300px, 40vw);
  }

  .showcase-step {
    min-height: auto;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .nav-shell,
  .section-shell,
  .hero-shell,
  .showcase {
    width: min(100% - 28px, 1120px);
  }

  .nav-shell {
    min-height: 62px;
  }

  .nav-links {
    display: none;
  }

  .hero-shell {
    padding: 3rem 0 3.25rem;
  }

  .hero-facts div,
  .role-card {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .stack-section,
  .precareer-section,
  .experience-section,
  .leadership-section,
  .contact-section,
  .roborecon-section {
    padding: 4.25rem 0;
  }

  .precareer-grid {
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .stack-list {
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    gap: 0.55rem;
  }

  .stack-card {
    aspect-ratio: 1;
    min-height: 0;
    justify-content: center;
    padding: 0.6rem;
  }

  .stack-card strong {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .tech-logo {
    width: 32px;
    height: 32px;
  }

  .tech-logo-wide {
    width: 38px;
  }

  .roborecon-heading {
    margin-bottom: 2rem;
  }

  .showcase {
    height: 240vh;
  }

  .showcase-sticky {
    position: sticky;
    top: 76px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 1rem;
    height: calc(100vh - 92px);
    min-height: 590px;
  }

  .showcase-topic-window {
    order: 0;
    overflow: hidden;
    padding-block: 0;
  }

  .showcase-copy {
    display: flex;
    gap: 0.75rem;
  }

  .showcase-step {
    flex: 0 0 min(100%, 340px);
    padding: 0.9rem;
  }

  .showcase-step.is-active {
    transform: translateY(-2px);
  }

  .showcase-step h3 {
    font-size: 1.15rem;
  }

  .showcase-step p {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .showcase-devices {
    order: 0;
    display: block;
    height: 100%;
    min-height: 0;
  }

  .showcase-desktop {
    position: absolute;
    top: 8px;
    right: auto;
    left: 0;
    width: 100%;
    padding: 8px 8px 12px;
  }

  .showcase-phone {
    position: absolute;
    top: 190px;
    left: 50%;
    width: min(245px, 64%);
    transform: translateX(-50%);
  }

  .desktop-window {
    aspect-ratio: 16 / 10.5;
  }

  .phone-window {
    border-radius: 30px;
  }

  .macbook-notch {
    top: 8px;
    width: 46px;
    height: 11px;
    border-radius: 0 0 7px 7px;
  }

  .macbook-base {
    bottom: -10px;
    height: 10px;
  }

  .iphone-island {
    top: 18px;
    width: 68px;
    height: 20px;
  }

  .footer-shell {
    grid-template-columns: 1fr;
  }
}

@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;
  }
}
