:root {
  color-scheme: light dark;
  --section-sticky-top: 82px;
  --ink: #172b3a;
  --ink-soft: #3d5362;
  --muted: #71818c;
  --line: #dce4e8;
  --paper: #f5f7fa;
  --experience-surface: #eef2f5;
  --white: #fff;
  --teal: #087d76;
  --teal-dark: #06655f;
  --teal-light: #d8eeeb;
  --navy: #102633;
  --heading: #102633;
  --brand-mark-text: #fff;
  --font-body: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e4ecef;
  --ink-soft: #c1cdd2;
  --muted: #9aabb3;
  --line: #30424b;
  --paper: #111b21;
  --experience-surface: #17242b;
  --white: #19262d;
  --teal: #68c9bb;
  --teal-dark: #85d9cd;
  --teal-light: #243c40;
  --navy: #0b151b;
  --heading: #e8f0f3;
  --brand-mark-text: #e4ecef;
}

:root[data-theme="light"] {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--section-sticky-top) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.resume-load-status,
.resume-load-error {
  width: min(1080px, calc(100% - 3rem));
  margin: 3rem auto;
  color: var(--ink-soft);
}

.resume-load-error {
  color: #b42318;
}

a {
  color: inherit;
}

a:focus-visible,
.theme-toggle:focus-visible {
  outline: 3px solid #e5a642;
  outline-offset: 4px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 0.9rem;
  transform: translateY(-150%);
  background: var(--white);
  color: var(--ink);
}

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

.site-header {
  position: sticky;
  z-index: 5;
  top: 0;
  width: 100%;
  min-height: 82px;
  padding-inline: max(1.5rem, calc((100% - 1080px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background-color: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: flex-start;
  color: var(--ink);
  text-decoration: none;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.brand-title {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 550;
  letter-spacing: 0;
  line-height: 1.35;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--navy);
  color: var(--brand-mark-text);
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2.2vw, 1.7rem);
}

.site-nav a {
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease;
}

.site-nav a:hover,
.contact-links a:hover,
.site-footer a:hover {
  color: var(--teal);
}

.theme-toggle {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 650;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.theme-toggle:hover {
  border-color: var(--teal);
  background: var(--teal-light);
  color: var(--ink);
}

.theme-toggle-icon {
  font-size: 1rem;
  line-height: 1;
}

.theme-toggle-label {
  display: none;
}

.section-shell {
  width: min(1080px, calc(100% - 3rem));
  margin-inline: auto;
}

.hero {
  min-height: 610px;
  padding-block: 6.2rem 4.8rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  align-items: center;
  column-gap: 5rem;
  position: relative;
}

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

.eyebrow,
.section-index,
.card-label,
.card-focus-label {
  margin: 0;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  display: block;
}

.status-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: #37a895;
  box-shadow: 0 0 0 4px #d9efeb;
  vertical-align: middle;
}

.eyebrow-separator {
  margin-inline: 0.35rem;
  color: var(--muted);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  margin: 1.15rem 0 1.2rem;
  color: var(--heading);
  font-family: var(--font-display);
  font-size: clamp(3.15rem, 7vw, 5.45rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 1.02;
}

.hero h1 span {
  color: var(--teal);
  font-style: italic;
  font-weight: 400;
}

.hero-summary {
  max-width: 590px;
  margin-bottom: 1.8rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.8;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.3rem;
  margin-top: 1.65rem;
}

.contact-links a {
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease;
}

.hero-card {
  min-height: 330px;
  padding: 1.4rem;
  align-self: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(ellipse at top right, rgba(189, 229, 221, 0.58), transparent 58%),
    var(--white);
  box-shadow: 0 18px 40px rgba(31, 61, 72, 0.07);
}

.hero-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-label {
  font-size: 0.66rem;
}

.card-spark {
  color: var(--teal);
  font-size: 1.25rem;
  line-height: 1;
}

.hero-card-stat {
  margin: 1.5rem 0 0;
  color: var(--heading);
  font-family: var(--font-display);
  font-size: 5.5rem;
  letter-spacing: -0.09em;
  line-height: 1;
}

.hero-card-stat span {
  color: var(--teal);
  font-size: 3.5rem;
  vertical-align: top;
}

.hero-card-caption {
  margin: 0.2rem 0 1.25rem;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.25;
}

.card-rule {
  height: 1px;
  margin: 1rem 0;
  background: var(--line);
}

.card-focus-label {
  margin-bottom: 0.35rem;
  font-size: 0.64rem;
}

.card-focus {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.65;
}

.scroll-cue {
  position: absolute;
  bottom: 1.45rem;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.76rem;
  text-decoration: none;
}

.scroll-cue span {
  color: var(--teal);
  font-size: 1rem;
}

.section-block {
  padding-block: 3rem;
}

.about-section {
  border-top: 1px solid var(--line);
}

.about-section > .contact-links {
  margin-top: 0;
  margin-bottom: 1.7rem;
}

.section-index {
  position: sticky;
  z-index: 4;
  top: var(--section-sticky-top);
  padding-block: 0.4rem;
  margin-bottom: 1.2rem;
  background: var(--paper);
}

.section-index span {
  color: var(--muted);
}

.about-content > p {
  text-align: justify;
  margin-bottom: 1rem;
  color: var(--ink-soft);
  line-height: 1.85;
}

.core-areas {
  margin: -0.5rem 0 1rem;
  padding-left: 1.25rem;
  color: var(--ink-soft);
}

.core-areas li {
  padding-left: 0.15rem;
  margin-bottom: 0.35rem;
}

.core-areas li::marker {
  color: var(--teal);
}

.about-tag-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.7rem;
}

.about-tag-group h3 {
  margin-bottom: 0.75rem;
  color: var(--heading);
  font-size: 0.88rem;
}

.focus-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.focus-tags span,
.focus-tags .skill-tag-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--teal-light);
  border-radius: 999px;
  background: var(--teal-light);
  color: var(--teal-dark);
  font-size: 0.77rem;
  font-weight: 650;
}

.focus-tags .skill-tag-link {
  text-decoration: none;
}

.focus-tags .skill-tag-link:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.experience-section {
  background: var(--experience-surface);
}

.experience-section .section-index {
  margin-bottom: 1.2rem;
  background-color: var(--experience-surface);
}

.timeline {
  border-top: 1px solid var(--line);
}

.job-card {
  padding: 1.7rem 0 1.55rem;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.job-date {
  margin: 0;
  color: var(--ink);
  font-size: 0.77rem;
  font-weight: 750;
}

.job-location {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.job-location a {
  text-decoration-color: var(--muted);
  text-underline-offset: 2px;
}

.job-location a:hover {
  color: var(--teal);
  text-decoration-color: currentColor;
}

.external-link-arrow {
  display: inline-block;
  margin-left: 0.12em;
  font-size: 0.82em;
  text-decoration: none;
  transition: transform 160ms ease;
}

.job-location a:hover .external-link-arrow,
.job-company a:hover .external-link-arrow {
  transform: translate(2px, -2px);
}

.job-details h3 {
  margin: -0.22rem 0 0.65rem;
  color: var(--heading);
  font-size: 1.04rem;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.5;
}

.job-company {
  color: var(--teal);
  font-weight: 650;
}

.job-company a {
  text-decoration-color: var(--teal);
  text-underline-offset: 3px;
}

.job-company a:hover {
  color: var(--teal-dark);
  text-decoration-color: currentColor;
}

.job-details ul {
  margin: 0;
  padding-left: 1.05rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.job-details li {
  padding-left: 0.15rem;
  margin-bottom: 0.4rem;
}

.job-details li::marker {
  color: var(--teal);
}

.tech-list {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.6;
}

.skills-section {
  display: block;
}

.skill-group {
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.skill-group:first-child,
.education-group:first-child {
  padding-top: 0;
}

.skill-group h3,
.education-group h3 {
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-size: 0.88rem;
}

.education-group {
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.education-group p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.55;
}

.education-inline-details + .education-inline-details {
  margin-top: 0.45rem;
}

.site-footer {
  width: min(1180px, calc(100% - 3rem));
  min-height: 74px;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: center;
}

.site-footer p,
.site-footer a {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-decoration: none;
  transition: color 160ms ease;
}

:root[data-theme="dark"] .hero-card {
  background:
    radial-gradient(ellipse at top right, rgba(65, 143, 132, 0.18), transparent 58%),
    var(--white);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

:root[data-theme="dark"] .experience-section {
  background: var(--experience-surface);
}

@media (max-width: 900px) {
  .site-header {
    gap: 1rem;
  }

  .brand-title {
    font-size: 0.62rem;
  }

  .site-nav {
    gap: 0.85rem;
  }

  .site-nav a {
    font-size: 0.78rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 2.5rem;
  }

  .hero-card {
    min-height: 310px;
  }

}

@media (max-width: 680px) {
  .site-header {
    width: 100%;
    min-height: 72px;
    padding-inline: max(1rem, calc((100% - 540px) / 2));
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    padding-block: 0.75rem;
  }

  .site-nav {
    width: 100%;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
  }

  .site-nav a {
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .section-shell,
  .site-footer {
    width: min(100% - 2rem, 540px);
  }

  .hero {
    min-height: unset;
    padding-block: 4rem 4.5rem;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .hero h1 {
    font-size: clamp(3rem, 13vw, 4.5rem);
  }

  .hero-summary {
    font-size: 1rem;
  }

  .hero-card {
    width: min(100%, 360px);
    min-height: unset;
  }

  .scroll-cue {
    bottom: 1rem;
  }

  .section-block {
    padding-block: 2rem;
  }

  .about-tag-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .job-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
  }

  .job-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.2rem 0.75rem;
  }

  .job-location {
    margin-top: 0;
  }

  .site-footer {
    min-height: 70px;
  }
}

@media (max-width: 380px) {
  .brand {
    font-size: 0.88rem;
  }

  .site-nav {
    gap: 0.75rem;
  }

  .contact-links {
    gap: 0.8rem;
  }
}

@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[data-theme="dark"] {
    color-scheme: light;
    --ink: #172b3a;
    --ink-soft: #3d5362;
    --muted: #71818c;
    --line: #dce4e8;
    --paper: #fff;
    --white: #fff;
    --teal: #087d76;
    --teal-dark: #06655f;
    --teal-light: #d8eeeb;
    --navy: #102633;
    --heading: #102633;
  }

  body {
    background: var(--white);
  }

  .site-header,
  .scroll-cue,
  .site-footer {
    display: none;
  }

  .section-index {
    position: static;
  }

  .hero,
  .section-block,
  .experience-section .section-block {
    width: 100%;
    min-height: 0;
    padding-block: 1.5rem;
  }

  .hero {
    display: block;
  }

  .hero-card {
    display: none;
  }

  .experience-section {
    background: var(--white);
  }

  .job-card {
    break-inside: avoid;
  }
}
