:root {
  color-scheme: light;

  /* Typography */
  --font-sans: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, Segoe UI,
    Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --font-display: "Baloo 2", var(--font-sans);

  /* Spacing (4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 96) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-4-5: 20px;
  --space-5: 24px;
  --space-6: 32px;
  --space-6-5: 40px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Layout */
  --max-width: 1120px;

  /* Radii */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;

  /* Color tokens (Option A: Sky Pop) */
  --bg: #f7fbff;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --surface-2: rgba(243, 247, 255, 0.92);

  --text: #182033;
  --text-strong: #0f172a;
  --muted: rgba(75, 88, 117, 0.94);
  --muted-2: rgba(75, 88, 117, 0.78);

  --border: rgba(24, 32, 51, 0.18);
  --border-strong: rgba(24, 32, 51, 0.26);

  --accent: #3aa8ff; /* links + focus */
  --accent-2: #a78bfa;
  --accent-warm: #ff5aa5; /* primary CTA */
  --accent-sun: #ffd34e;
  --accent-quiet: rgba(58, 168, 255, 0.14);

  --danger: #ff4d4d;

  /* Shadows (candy) */
  --shadow-1: 0 10px 0 rgba(24, 32, 51, 0.12),
    0 18px 30px rgba(58, 168, 255, 0.18);
  --shadow-2: 0 14px 0 rgba(24, 32, 51, 0.12),
    0 26px 42px rgba(58, 168, 255, 0.22);

  --focus-ring: 0 0 0 3px rgba(58, 168, 255, 0.42),
    0 0 0 7px rgba(58, 168, 255, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(900px 560px at 18% -8%, rgba(191, 233, 255, 0.95), transparent 60%),
    radial-gradient(820px 520px at 90% 10%, rgba(255, 211, 78, 0.40), transparent 58%),
    radial-gradient(920px 620px at 55% 98%, rgba(255, 90, 165, 0.18), transparent 62%),
    linear-gradient(180deg, #bfe9ff 0%, var(--bg) 55%, var(--bg-2) 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(255, 90, 165, 0.22);
  color: var(--text-strong);
}

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

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -999px;
  left: -999px;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #071018;
  font-weight: 900;
}

.skip-link:focus {
  top: var(--space-3);
  left: var(--space-3);
}

/* Layout shell */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.section {
  padding: clamp(56px, 7vw, 92px) var(--space-5);
}

.section--muted {
  background: linear-gradient(180deg, rgba(58, 168, 255, 0.10), rgba(255, 255, 255, 0.65));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-head {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 900;
  color: rgba(11, 74, 165, 0.78);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.018em;
  line-height: 1.15;
  color: var(--text-strong);
}

h1,
h2 {
  font-family: var(--font-display);
}

h1 {
  font-size: clamp(2.25rem, 4.6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
}

h3 {
  font-size: clamp(1.12rem, 1.7vw, 1.35rem);
}

p {
  margin: 0;
}

.lede {
  color: var(--muted);
  font-size: clamp(1.02rem, 1.2vw, 1.16rem);
  max-width: 72ch;
}

/* Header + nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(247, 251, 255, 0.78);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-3) var(--space-5);
  display: flex;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: grid;
  gap: 4px;
}

.brand-top {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-weight: 800;
  font-size: 13px;
  color: var(--muted-2);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.nav a {
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--muted);
  font-weight: 900;
  border: 1px solid transparent;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease,
    transform 140ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  text-decoration: none;
  color: var(--text-strong);
  background: rgba(58, 168, 255, 0.10);
  border-color: var(--border);
}

.nav a.active {
  color: #0b4aa5;
  background: rgba(58, 168, 255, 0.16);
  border-color: rgba(58, 168, 255, 0.30);
}

.nav-toggle {
  display: none;
  grid-template-columns: 18px auto;
  grid-template-rows: repeat(3, 2px);
  column-gap: 10px;
  row-gap: 4px;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-strong);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease,
    box-shadow 140ms ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(58, 168, 255, 0.10);
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 8px 0 rgba(24, 32, 51, 0.10), 0 16px 26px rgba(58, 168, 255, 0.14);
}

.nav-toggle:active {
  transform: translateY(1px);
  box-shadow: 0 6px 0 rgba(24, 32, 51, 0.10), 0 12px 20px rgba(58, 168, 255, 0.14);
}

.nav-toggle::after {
  content: "Menu";
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
  letter-spacing: 0.02em;
}

.nav-toggle[data-state="open"]::after {
  content: "Close";
}

.nav-toggle span {
  grid-column: 1;
  width: 18px;
  height: 2px;
  background: var(--text-strong);
  border-radius: 999px;
  transition: transform 160ms ease, opacity 160ms ease;
  transform-origin: center;
}

.nav-toggle span:nth-child(1) {
  grid-row: 1;
}

.nav-toggle span:nth-child(2) {
  grid-row: 2;
}

.nav-toggle span:nth-child(3) {
  grid-row: 3;
}

.nav-toggle[data-state="open"] span:nth-child(1),
.nav-toggle[data-state="open"] span:nth-child(3) {
  grid-row: 2;
}

.nav-toggle[data-state="open"] span:nth-child(1) {
  transform: rotate(45deg);
}

.nav-toggle[data-state="open"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[data-state="open"] span:nth-child(3) {
  transform: rotate(-45deg);
}

@media (max-width: 940px) {
  .nav {
    position: fixed;
    inset: 70px var(--space-4) auto var(--space-4);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    background: rgba(247, 251, 255, 0.98);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-2);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    justify-content: center;
    border-radius: var(--radius-md);
  }

  .nav-toggle {
    display: inline-grid;
  }
}

/* Components */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.92),
    rgba(243, 247, 255, 0.78)
  );
  box-shadow: var(--shadow-1);
  padding: var(--space-5);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.card--compact {
  padding: var(--space-4);
}

.card--hover:hover {
  border-color: rgba(58, 168, 255, 0.32);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 2px solid rgba(24, 32, 51, 0.22);
  background: linear-gradient(180deg, rgba(255, 131, 190, 0.98), rgba(255, 90, 165, 0.98));
  box-shadow: var(--shadow-1);
  color: #ffffff;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, border-color 140ms ease,
    box-shadow 140ms ease;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
  transform: translateY(-1px);
  filter: saturate(1.04);
  border-color: rgba(24, 32, 51, 0.30);
  box-shadow: var(--shadow-2);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 7px 0 rgba(24, 32, 51, 0.12), 0 14px 20px rgba(58, 168, 255, 0.18);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.88);
  border-color: var(--border);
  color: var(--text-strong);
  box-shadow: 0 8px 0 rgba(24, 32, 51, 0.10), 0 16px 26px rgba(58, 168, 255, 0.14);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-strong);
  box-shadow: none;
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: rgba(58, 168, 255, 0.10);
}

.btn--sm {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 900;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 900;
  font-size: 0.92rem;
  width: fit-content;
}

.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-warm);
  box-shadow: 0 0 0 6px rgba(255, 90, 165, 0.18);
}

/* Hero */
.hero-grid {
  display: grid;
  gap: var(--space-5);
  align-items: start;
}

@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: 1.55fr 1fr;
  }
}

.hero-copy {
  display: grid;
  gap: var(--space-3);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.hero-aside {
  display: grid;
  gap: var(--space-3);
}

.portrait {
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.stat-grid {
  display: grid;
  gap: var(--space-3);
}

.stat {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.stat .label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--muted-2);
}

.stat .value {
  display: block;
  margin-top: 4px;
  color: var(--text-strong);
  font-weight: 900;
}

.stat .desc {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Grids */
.grid-3 {
  display: grid;
  gap: var(--space-4);
}

/* Hero illustration (character-forward placeholder) */
.hero-illustration {
  display: grid;
  gap: var(--space-3);
  place-items: center;
  text-align: center;
  overflow: hidden;
}

.hero-illustration__img {
  width: min(260px, 80%);
  height: auto;
  filter: drop-shadow(0 10px 0 rgba(24, 32, 51, 0.12))
    drop-shadow(0 18px 30px rgba(58, 168, 255, 0.22));
}

.hero-illustration__stickers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

@media (min-width: 920px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cards {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 860px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1140px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Badges */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.74);
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--text-strong);
}

.badge--accent {
  color: #0b4aa5;
  border-color: rgba(58, 168, 255, 0.26);
  background: rgba(58, 168, 255, 0.14);
}

/* Prototype cards */
.case-top {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.overline {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--muted-2);
}

.case p {
  color: var(--muted);
}

.case p strong {
  color: var(--text-strong);
}

.tradeoff {
  border-left: 3px solid rgba(58, 168, 255, 0.44);
  padding-left: var(--space-3);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* Skills */
.list {
  margin: var(--space-3) 0 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

/* Timeline */
.timeline {
  display: grid;
  gap: var(--space-4);
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: baseline;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(58, 168, 255, 0.26);
  background: rgba(58, 168, 255, 0.14);
  color: #0b4aa5;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 980px) {
  .contact-grid {
    grid-template-columns: 1.25fr 1fr;
    align-items: start;
  }
}

.contact-cards {
  margin-top: var(--space-4);
  display: grid;
  gap: var(--space-3);
}

@media (min-width: 700px) {
  .contact-cards {
    grid-template-columns: 1fr 1fr;
  }
}

form {
  display: grid;
  gap: var(--space-3);
}

.field {
  display: grid;
  gap: 6px;
}

label {
  font-weight: 800;
  color: var(--text-strong);
}

input,
textarea {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 12px;
  font: inherit;
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.90);
}

textarea {
  min-height: 132px;
  resize: vertical;
}

.error {
  color: var(--danger);
  font-weight: 800;
}

/* Footer */
footer {
  padding: var(--space-6) var(--space-5) var(--space-7);
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(243, 247, 255, 0.92));
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Resume helpers */
.resume-wrap {
  max-width: 880px;
}

.resume-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

/* Print */
@media print {
  :root {
    color-scheme: light;
  }

  body {
    background: #ffffff !important;
    color: #111827 !important;
  }

  .site-header,
  footer,
  .skip-link {
    display: none !important;
  }

  a {
    color: #111827 !important;
    text-decoration: underline;
  }

  .card {
    box-shadow: none !important;
    background: transparent !important;
    border-color: rgba(17, 24, 39, 0.2) !important;
  }
}

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