:root {
  --resume-bg: var(--color-bg, #F0F7FF);
  --resume-paper: var(--color-surface, #FFFFFF);
  --resume-ink: var(--color-ink, #0B192C);
  --resume-text: var(--color-text, #1E293B);
  --resume-muted: var(--color-muted, #475569);
  --resume-faint: var(--color-faint, #64748B);
  --resume-border: var(--border, rgba(2, 132, 199, 0.18));
  --resume-accent: var(--color-primary, #0284C7);
  --resume-accent-soft: var(--theme-surface-3, #E0F2FE);
  --resume-font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --resume-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--resume-bg);
  color: var(--resume-text);
  font-family: var(--resume-font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--resume-ink);
  font-family: var(--resume-display);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
}

a {
  color: var(--resume-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--resume-accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 50;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  background: var(--resume-ink);
  color: #ffffff;
  font-size: 0.78rem;
  transform: translateY(-150%);
}

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

.resume-toolbar {
  padding: 0.9rem 1.25rem;
  background: var(--header-bg, #0369A1);
  color: var(--theme-header-text, #FFFFFF);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px var(--theme-glow, rgba(2, 132, 199, 0.28));
}

.resume-toolbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  width: min(100%, 62rem);
  margin-inline: auto;
}

.resume-toolbar__brand {
  color: #FFFFFF;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1;
  text-decoration: none;
}

.resume-toolbar__brand span {
  color: var(--theme-accent, #38BDF8);
}

.resume-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.resume-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.3;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.resume-button:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.resume-button--ghost {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.resume-button--ghost:hover {
  border-color: #FFFFFF;
  background: rgba(255, 255, 255, 0.24);
  color: #FFFFFF;
}

.resume-button--primary {
  background: var(--theme-header-cta-bg, #FFFFFF);
  color: var(--theme-header-cta-text, var(--color-primary, #0284C7));
  font-weight: 700;
}

.resume-button--primary:hover {
  background: var(--color-bg, #F0F7FF);
  color: var(--color-secondary, #0369A1);
}

.resume-toolbar__notice {
  width: min(100%, 62rem);
  margin: 0.7rem auto 0;
  color: rgba(248, 244, 240, 0.75);
  font-size: 0.7rem;
  line-height: 1.5;
}

.resume-toolbar__notice i {
  margin-right: 0.25rem;
}

.resume {
  width: min(100% - 2rem, 56rem);
  margin: 2rem auto;
  padding: 2.6rem;
  border-radius: 10px;
  background: var(--resume-paper);
  box-shadow: 0 24px 60px -34px rgba(15, 31, 56, 0.35);
}

.resume__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--resume-ink);
}

.resume__eyebrow {
  margin-bottom: 0.35rem;
  color: var(--resume-accent);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.resume h1 {
  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.resume__role {
  margin-top: 0.4rem;
  color: var(--resume-muted);
  font-family: var(--resume-display);
  font-size: 1rem;
  font-weight: 600;
}

.resume__contact {
  display: grid;
  gap: 0.3rem;
  color: var(--resume-muted);
  font-size: 0.78rem;
  text-align: right;
}

.resume__contact i {
  margin-right: 0.3rem;
  color: var(--resume-accent);
}

.resume__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 2.4rem;
  margin-top: 1.8rem;
}

.resume-section + .resume-section {
  margin-top: 1.8rem;
}

.resume-section > h2 {
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--resume-border);
  color: var(--resume-accent);
  font-family: var(--resume-font);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.resume-section > p {
  margin-top: 0.7rem;
  color: var(--resume-text);
  font-size: 0.84rem;
  line-height: 1.7;
}

.resume-role {
  padding-top: 1.1rem;
}

.resume-role + .resume-role {
  margin-top: 1.1rem;
  border-top: 1px dashed var(--resume-border);
}

.resume-role__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.resume-role h3,
.resume-projects h3,
.resume-education h3 {
  font-size: 0.95rem;
}

.resume-role__company,
.resume-education__meta {
  margin-top: 0.15rem;
  color: var(--resume-muted);
  font-size: 0.77rem;
}

.resume-role__period {
  flex: none;
  padding-top: 0.15rem;
  color: var(--resume-faint);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.resume-role__summary {
  margin-top: 0.35rem;
  color: var(--resume-text);
  font-size: 0.81rem;
  font-style: italic;
}

.resume-role ul {
  display: grid;
  gap: 0.28rem;
  margin-top: 0.5rem;
}

.resume-role li {
  position: relative;
  padding-left: 0.95rem;
  color: var(--resume-text);
  font-size: 0.8rem;
  line-height: 1.6;
}

.resume-role li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--resume-accent);
}

.resume-projects {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.resume-projects h3 span {
  margin-left: 0.35rem;
  color: var(--resume-faint);
  font-family: var(--resume-font);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.resume-projects p {
  margin-top: 0.2rem;
  color: var(--resume-text);
  font-size: 0.79rem;
  line-height: 1.6;
}

.resume-projects__tech {
  color: var(--resume-accent) !important;
  font-size: 0.7rem !important;
  font-weight: 600;
}

.resume__aside {
  padding-left: 2rem;
  border-left: 1px solid var(--resume-border);
}

.resume-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.8rem;
}

.resume-tags li {
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--resume-border);
  border-radius: 4px;
  background: var(--resume-accent-soft);
  color: var(--resume-accent);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.5;
}

.resume-education {
  margin-top: 0.8rem;
}

.resume-education p:last-child {
  margin-top: 0.35rem;
  color: var(--resume-text);
  font-size: 0.78rem;
  line-height: 1.6;
}

.resume-list {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.resume-list li {
  position: relative;
  padding-left: 1rem;
  color: var(--resume-text);
  font-size: 0.78rem;
  line-height: 1.55;
}

.resume-list li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 5px;
  height: 5px;
  border: 1px solid var(--resume-accent);
  border-radius: 50%;
}

.resume__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  margin-top: 2.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--resume-border);
  color: var(--resume-faint);
  font-size: 0.68rem;
}

@media (max-width: 820px) {
  .resume {
    padding: 1.75rem;
  }

  .resume__header {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .resume__contact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    text-align: left;
  }

  .resume__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
  }

  .resume__aside {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 540px) {
  .resume {
    width: calc(100% - 1rem);
    margin-block: 0.5rem;
    padding: 1.2rem;
  }

  .resume-toolbar {
    padding-inline: 0.8rem;
  }

  .resume-toolbar__actions {
    width: 100%;
  }

  .resume-button {
    flex: 1 1 auto;
    justify-content: center;
  }

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

  .resume-role__head {
    flex-direction: column;
    gap: 0.2rem;
  }

  .resume-role__period {
    order: -1;
  }

  .resume__footer {
    flex-direction: column;
  }
}

@media print {
  @page {
    size: letter;
    margin: 0.55in 0.6in;
  }

  body {
    background: #ffffff;
    color: #111827;
    font-size: 9.6pt;
    line-height: 1.45;
  }

  .skip-link,
  .resume-toolbar {
    display: none !important;
  }

  .resume {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .resume__header {
    padding-bottom: 0.55rem;
    border-bottom-width: 1.5pt;
  }

  .resume h1 {
    font-size: 24pt;
  }

  .resume__eyebrow {
    font-size: 6.5pt;
  }

  .resume__role {
    font-size: 9.5pt;
  }

  .resume__contact {
    gap: 0.1rem;
    font-size: 7.6pt;
  }

  .resume__layout {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 0.3in;
    margin-top: 0.16in;
  }

  .resume__aside {
    padding-left: 0.17in;
  }

  .resume-section + .resume-section {
    margin-top: 0.17in;
  }

  .resume-section > h2 {
    padding-bottom: 0.06in;
    font-size: 6.8pt;
  }

  .resume-section > p,
  .resume-role li,
  .resume-projects p,
  .resume-education p:last-child,
  .resume-list li {
    font-size: 8.2pt;
    line-height: 1.42;
  }

  .resume-role {
    padding-top: 0.08in;
    break-inside: avoid;
  }

  .resume-role + .resume-role {
    margin-top: 0.08in;
  }

  .resume-role h3,
  .resume-projects h3,
  .resume-education h3 {
    font-size: 9pt;
  }

  .resume-role__company,
  .resume-education__meta {
    font-size: 7.6pt;
  }

  .resume-role__period {
    font-size: 7.2pt;
  }

  .resume-role__summary {
    font-size: 8pt;
  }

  .resume-role ul {
    gap: 0.02in;
    margin-top: 0.04in;
  }

  .resume-role li {
    padding-left: 0.11in;
  }

  .resume-tags {
    gap: 0.03in;
  }

  .resume-tags li {
    padding: 0.02in 0.05in;
    font-size: 6.8pt;
  }

  .resume-projects {
    gap: 0.05in;
    margin-top: 0.07in;
  }

  .resume-projects__tech {
    font-size: 7pt !important;
  }

  .resume-list {
    gap: 0.02in;
    margin-top: 0.06in;
  }

  .resume__footer {
    margin-top: 0.18in;
    padding-top: 0.06in;
    font-size: 6.6pt;
  }

  a {
    color: #111827;
    text-decoration: none;
  }

  .resume-role,
  .resume-education,
  .resume-projects > article,
  .author-card {
    break-inside: avoid;
  }
}
