:root {
  --bg: #f1f5f9;
  --tile: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent2: #7c3aed;
  --line: rgba(15, 23, 42, 0.08);
  --font: "Manrope", system-ui, sans-serif;
  --gap: 0.65rem;
  --pad: clamp(0.75rem, 2vw, 1.25rem);
  --page: min(72rem, 100% - 2rem);
  /* Type scale (single source for body copy & lists) */
  --text-body: 0.98rem;
  --text-lead: 1rem;
  --text-list: 0.9rem;
  --text-meta: 0.82rem;
  --text-caption: 0.8rem;
  --text-label: 0.72rem;
  --text-subhead: 0.78rem;
  --text-micro: 0.68rem;
  --line-prose: 1.6;
  --line-list: 1.55;
  --line-tight: 1.35;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: var(--line-prose);
  color: var(--ink);
  background: var(--bg);
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 200;
  padding: 0.65rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mosaic-page {
  width: var(--page);
  max-width: 100%;
  margin: 0 auto;
  padding: var(--pad);
  min-height: 100vh;
}

.mosaic {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .mosaic {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(min-content, auto);
  }

  .cell--nav {
    grid-column: 1 / -1;
  }

  .cell--hero {
    grid-column: 1 / -1;
  }

  .cell--about {
    grid-column: 1 / -1;
  }

  .cell--skills {
    grid-column: 1 / -1;
  }

  /* Same width as Skills */
  .cell--edu {
    grid-column: 1 / -1;
    align-self: start;
  }

  /* Experience (left); Credentials + Snapshot (right); sidebar stretches to match Experience height */
  .mosaic-band--work {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--gap);
    align-items: stretch;
    min-width: 0;
  }

  .mosaic-band--work .cell--xp {
    grid-column: 1 / 5;
  }

  .mosaic-band__sidebar {
    grid-column: 5 / -1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: var(--gap);
    min-width: 0;
    min-height: 100%;
  }

  /* Split leftover height between both cards; gap stays equal to column gutter */
  .mosaic-band__sidebar > .cell {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 719px) {
  .mosaic-band--work {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    grid-column: 1 / -1;
  }

  .mosaic-band__sidebar {
    flex-direction: column;
    justify-content: flex-start;
    gap: var(--gap);
  }

  .mosaic-band__sidebar > .cell {
    flex: 0 0 auto;
    display: block;
  }
}

.cell {
  background: var(--tile);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.cell--nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.75rem;
  padding: 0.85rem 1.1rem;
  min-width: 0;
  position: relative;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.45rem 0.65rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.nav-toggle:hover {
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--accent);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 1.1rem;
  height: 0.75rem;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.cell--nav.is-open .nav-toggle__bars span:nth-child(1) {
  transform: translateY(0.28rem) rotate(45deg);
}

.cell--nav.is-open .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}

.cell--nav.is-open .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-0.28rem) rotate(-45deg);
}

.nav-dropdown {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-links,
.nav-external {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.35rem;
  min-width: 0;
}

.nav-links {
  flex: 1 1 auto;
}

.nav-external {
  flex: 0 1 auto;
  border-left: 1px solid var(--line);
  padding-left: 0.65rem;
  margin-left: 0.15rem;
}

@media (min-width: 720px) {
  .cell--nav {
    justify-content: space-between;
  }

  .nav-toggle {
    display: none !important;
  }

  .nav-dropdown {
    display: flex !important;
    flex-direction: row;
  }
}

/* Small screens: hamburger + collapsible panel (when JS adds html.js-nav) */
@media (max-width: 719px) {
  html.js-nav .nav-toggle {
    display: inline-flex;
    align-self: flex-end;
    z-index: 2;
  }

  html.js-nav .cell--nav {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem clamp(0.65rem, 3vw, 1rem);
  }

  html.js-nav .nav-dropdown {
    display: none;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.65rem 0.75rem;
    background: var(--tile);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  }

  html.js-nav .cell--nav.is-open .nav-dropdown {
    display: flex;
  }

  html.js-nav .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }

  html.js-nav .nav-links a {
    display: block;
    padding: 0.45rem 0.5rem;
    border-radius: 6px;
  }

  html.js-nav .nav-external {
    border-left: 0;
    padding-left: 0;
    margin-left: 0;
    margin-top: 0.5rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }

  html.js-nav .nav-external a {
    display: block;
    padding: 0.45rem 0.5rem;
  }

  /* No JS: show full menu, hide button */
  html:not(.js-nav) .cell--nav {
    flex-direction: column;
    align-items: stretch;
  }

  html:not(.js-nav) .nav-toggle {
    display: none !important;
  }

  html:not(.js-nav) .nav-dropdown {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  html:not(.js-nav) .nav-links {
    flex-direction: column;
    align-items: stretch;
  }

  html:not(.js-nav) .nav-external {
    border-left: 0;
    padding-left: 0;
    margin-left: 0;
    margin-top: 0.5rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
  }
}

.cell--nav a {
  font-size: var(--text-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-decoration: none;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
}

.cell--nav a:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent);
}

.cell--nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cell--hero {
  background: linear-gradient(135deg, #eff6ff 0%, #faf5ff 100%);
  border-color: rgba(37, 99, 235, 0.15);
}

.cell--hero .intro-name {
  margin: 0 0 0.25rem;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.cell--hero .intro-tagline {
  margin: 0 0 1.25rem;
  font-size: var(--text-meta);
  font-weight: 600;
  line-height: var(--line-prose);
  color: var(--accent);
  letter-spacing: 0.02em;
}

.cell--hero #hero-title.hero-deck {
  margin: 0;
  font-size: clamp(0.8rem, 1.35vw, 0.88rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--muted);
  max-width: 38rem;
}

.about-split {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 640px) {
  .about-split {
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
    gap: 1.75rem;
    align-items: stretch;
  }
}

.about-split__text .intro-lead {
  margin: 0 0 1rem;
  font-size: var(--text-lead);
  font-weight: 500;
  line-height: var(--line-prose);
  color: var(--muted);
}

.cell--about .about-split__text p {
  color: var(--muted);
}

.intro-portrait {
  margin: 0;
  padding: 0;
  border: 0;
}

.about-split__portrait {
  justify-self: center;
  width: 100%;
  max-width: min(100%, 18rem);
}

@media (min-width: 640px) {
  .about-split__portrait {
    justify-self: end;
    width: 100%;
    max-width: min(100%, 18rem);
    margin-left: auto;
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }
}

.intro-portrait-slot {
  width: 100%;
  max-width: 15rem;
  margin-left: auto;
  margin-right: auto;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(160deg, #e2e8f0 0%, #f8fafc 100%);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

@media (min-width: 640px) {
  .intro-portrait-slot {
    max-width: none;
    flex: 1 1 auto;
    min-height: 16rem;
    margin-left: 0;
    margin-right: 0;
  }
}

.intro-portrait-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cell h2 {
  margin: 0 0 0.75rem;
  font-size: var(--text-label);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.cell p {
  margin: 0 0 1rem;
  font-size: var(--text-body);
  line-height: var(--line-prose);
  color: var(--muted);
}

.cell p:last-child { margin-bottom: 0; }

.meta {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.meta li {
  margin-bottom: 0.6rem;
  font-size: var(--text-list);
  line-height: var(--line-list);
  color: var(--muted);
}

.meta span {
  display: block;
  font-size: var(--text-micro);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.skill-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

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

.skill-grid h3 {
  margin: 0 0 0.5rem;
  font-size: var(--text-subhead);
  font-weight: 700;
  color: var(--accent);
}

.skill-grid ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: var(--text-list);
  line-height: var(--line-list);
  color: var(--muted);
}

.edu-grid {
  display: grid;
  gap: 1rem;
  align-items: start;
}

/* Tablet: SUU | Indiana; coursework full width row below */
@media (min-width: 600px) and (max-width: 849px) {
  .edu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .edu-block--coursework {
    grid-column: 1 / -1;
  }
}

/* Desktop: three equal columns — SUU | Indiana Tech | Relevant Coursework */
@media (min-width: 850px) {
  .edu-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
  }
}

.cell--edu .edu-block {
  margin: 0;
  min-width: 0;
}

.cell--edu {
  padding: 1.05rem 1.15rem;
}

.cell--edu h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
}

/* Matches skill-grid column titles; overrides school-name h3 above */
.cell--edu h3.edu-coursework-heading {
  margin: 0 0 0.5rem;
  font-size: var(--text-subhead);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
}

.edu-coursework {
  margin: 0;
  padding-left: 1.1rem;
  font-size: var(--text-list);
  line-height: var(--line-list);
  color: var(--muted);
}

.edu-coursework li {
  margin-bottom: 0.2rem;
}

.edu-coursework li:last-child {
  margin-bottom: 0;
}

.meta-line {
  margin: 0 0 0.5rem !important;
  font-size: var(--text-meta) !important;
  font-weight: 700 !important;
  color: var(--accent) !important;
  line-height: var(--line-prose);
}

.edu-list {
  margin: 0 0 0.65rem;
  padding-left: 1.1rem;
  font-size: var(--text-list);
  line-height: var(--line-list);
  color: var(--muted);
}

.edu-list li {
  margin-bottom: 0.25rem;
}

.edu-list li:last-child {
  margin-bottom: 0;
}

.edu-date {
  margin: 0;
  font-size: var(--text-meta);
  font-weight: 600;
  line-height: var(--line-prose);
  color: var(--muted);
}

.role {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.role:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.role header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.role h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: var(--line-tight);
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
}

.role time {
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--muted);
}

.org {
  margin: 0 0 0.6rem !important;
  font-weight: 700 !important;
  color: var(--accent) !important;
}

.role ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: var(--text-list);
  line-height: var(--line-list);
}

.cred {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cred li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-list);
  line-height: var(--line-list);
  color: var(--ink);
}

.cred li:last-child { border-bottom: 0; }

.cred span {
  font-size: var(--text-meta);
  line-height: var(--line-prose);
  color: var(--muted);
}

.hint {
  margin: 0.75rem 0 0 !important;
  font-size: 0.85rem !important;
  font-style: italic;
}

.cell--highlights {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.cell--highlights .meta {
  margin-top: 0;
}

.highlights-personal {
  margin: 1rem 0 0 !important;
  font-size: 0.9rem;
  line-height: 1.55;
}

.highlights-personal strong {
  color: var(--ink);
}

.cell--foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: var(--text-meta);
  line-height: var(--line-prose);
  color: var(--muted);
}

@media (min-width: 720px) {
  .cell--foot {
    grid-column: 1 / -1;
  }
}

.cell--foot p {
  margin: 0;
  font-size: var(--text-meta);
  line-height: var(--line-prose);
}

.cell--foot a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.cell--foot a:hover {
  text-decoration: underline;
}

.cell--foot a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
