@font-face {
  font-family: "Butler";
  src: url("/assets/fonts/butler-medium.woff2") format("woff2"),
    url("/assets/fonts/butler-medium.woff") format("woff");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #1e1e2e;
  --bg-elevated: #181825;
  --sidebar-bg: #313244;
  --surface-0: #313244;
  --surface-1: #45475a;
  --surface-2: #585b70;
  --border: #6c7086;
  --text: #cdd6f4;
  --muted: #a6adc8;
  --muted-strong: #bac2de;
  --primary: #89b4fa;
  --secondary: #f38ba8;
  --success: #a6e3a1;
  --shadow: 0 1.6rem 4rem rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 0.75rem 2rem rgba(0, 0, 0, 0.18);
  --radius-lg: 1.4rem;
  --radius-md: 1rem;
  --radius-sm: 999px;
  --container: 1200px;
  --sidebar-width: 25%;
  --serif: "Butler", Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eff1f5;
  --bg-elevated: #e6e9ef;
  --sidebar-bg: #dce0e8;
  --surface-0: #ffffff;
  --surface-1: #ccd0da;
  --surface-2: #bcc0cc;
  --border: #9ca0b0;
  --text: #4c4f69;
  --muted: #5c5f77;
  --muted-strong: #6c6f85;
  --primary: #1e66f5;
  --secondary: #d20f39;
  --success: #40a02b;
  --shadow: 0 1.6rem 3rem rgba(76, 79, 105, 0.12);
  --shadow-soft: 0 0.75rem 1.5rem rgba(76, 79, 105, 0.08);
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.7 var(--sans);
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: var(--primary);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

button,
input,
textarea,
select {
  font: inherit;
}

:focus-visible {
  outline: 0.18rem solid var(--secondary);
  outline-offset: 0.2rem;
}

.skip-link,
.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;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.85rem 1rem;
  clip: auto;
  background: var(--surface-0);
  color: var(--text);
  border-radius: 0.8rem;
  box-shadow: var(--shadow-soft);
  z-index: 10;
}

.utl-print-only {
  display: none;
}

.utl-screen-only {
  display: inline-flex;
}

.layout {
  min-height: 100vh;
}

.container {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding-inline: 1.5rem;
}

.header {
  padding: 2rem 0 0.4rem;
}

.main {
  padding-bottom: 2rem;
}

.sidebar {
  background: var(--sidebar-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.vcard {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.vcard__avatar {
  width: 11rem;
  height: 11rem;
  flex: 0 0 11rem;
  border-radius: 50%;
  border: 0.3125rem solid rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  background: var(--surface-0);
  margin-right: 2rem;
}

.vcard__content {
  flex: 1 1 24rem;
  min-width: 0;
  padding-top: 1rem;
}

.vcard__title,
.vcard__social {
  display: flex;
  flex-wrap: wrap;
}

.vcard__title {
  align-items: baseline;
  gap: 0.65rem 1.25rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
}

h1 {
  font-size: clamp(2.85rem, 6vw, 4.75rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

h3 {
  font-size: 1.45rem;
}

p {
  margin: 0;
}

.lead {
  max-width: 60ch;
  font-size: clamp(1.12rem, 2.7vw, 1.45rem);
  font-weight: 300;
  line-height: 1.55;
}

.vcard__subtitle {
  margin: 0.65rem 0 1rem;
  color: var(--muted-strong);
}

.vcard__contact {
  display: block;
}

.vcard__social {
  margin-top: 0.15rem;
  gap: 0 0.4rem;
}

.vcard__link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-right: 1rem;
  margin-bottom: 0.35rem;
}

.vcard__link-text {
  min-width: 0;
}

.vcard__social .icon {
  width: 1.05rem;
  height: 1.05rem;
}

.icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.actions {
  display: flex;
  justify-content: center;
  padding: 0.75rem 0;
}

.actions__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.96);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0.5rem 0.75rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.actions__btn:hover,
.actions__btn:focus-visible {
  background: rgba(0, 0, 0, 0.22);
  text-decoration: none;
  transform: translateY(-1px);
}

.actions__btn .icon {
  width: 1.15rem;
  height: 1.15rem;
}

.actions__icon--moon {
  display: inline-flex;
}

:root[data-theme="light"] .actions__icon--moon {
  display: none;
}

:root[data-theme="light"] .actions__icon--sun {
  display: inline-flex;
}

.actions__icon--sun {
  display: none;
}

:root[data-theme="light"] .sidebar {
  border-top-color: rgba(76, 79, 105, 0.12);
}

:root[data-theme="light"] .footer {
  border-top-color: rgba(76, 79, 105, 0.12);
}

:root[data-theme="light"] .actions__btn {
  color: #4c4f69;
  background: transparent;
}

:root[data-theme="light"] .actions__btn:hover,
:root[data-theme="light"] .actions__btn:focus-visible {
  background: rgba(76, 79, 105, 0.12);
}

.section {
  padding-block: 1.9rem;
  page-break-inside: avoid;
}

.section__title {
  margin-bottom: 1.5rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}

.section__lead {
  margin-bottom: 1.5rem;
  max-width: 64ch;
}

.section__subheading {
  margin-bottom: 0.9rem;
  font-size: 1.15rem;
  color: var(--muted-strong);
}

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

.markdown > * + *,
.entry__content > * + * {
  margin-top: 1rem;
}

.entry__content ul,
.entry__content ol,
.markdown ul,
.markdown ol {
  padding-left: 1.3rem;
}

.entry__content li + li,
.markdown li + li {
  margin-top: 0.3rem;
}

.entrylist,
.repolist,
.bulletlist,
.taglist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.entrylist {
  position: relative;
  padding-left: 1rem;
}

.entrylist::before {
  content: "";
  position: absolute;
  top: 2.1rem;
  left: 1rem;
  bottom: 0.25rem;
  width: 1px;
  background: linear-gradient(
    to bottom,
    rgba(166, 173, 200, 0),
    rgba(166, 173, 200, 1) 4rem,
    rgba(166, 173, 200, 1)
  );
}

.entrylist--starts-no-time::before {
  top: 0.55rem;
}

.entrylist > * + * {
  margin-top: 1.6rem;
}

.entrylist__item {
  position: relative;
  padding-left: 1.65rem;
}

.entrylist__item::before {
  content: "";
  position: absolute;
  top: 2.1rem;
  left: 0;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--secondary);
  border: 0.16rem solid var(--bg);
  transform: translate(-50%, 0);
}

.entrylist__item--no-time::before {
  top: 0.55rem;
}

.entry__header {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.entry__time {
  order: -1;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.entry__organization {
  font-size: 1.02rem;
  color: var(--muted-strong);
}

.entry__content {
  max-width: 60ch;
  margin-top: 0.7rem;
}

.grid {
  display: grid;
  gap: 1.5rem 2rem;
}

.skills-layout {
  display: grid;
  gap: 1.5rem 2rem;
}

.skills {
  display: grid;
  gap: 1rem;
}

.skill-group,
.project-card {
  background: rgba(49, 50, 68, 0.78);
  border: 1px solid rgba(166, 173, 200, 0.18);
  box-shadow: var(--shadow-soft);
}

:root[data-theme="light"] .skill-group,
:root[data-theme="light"] .project-card {
  background: rgba(255, 255, 255, 0.96);
}

.skill-group {
  padding: 1rem 1rem 1.05rem;
  border-radius: var(--radius-md);
}

.skill-group__title {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  font-size: 1.1rem;
}

.skill-group__title .icon {
  color: var(--primary);
}

.skills__tools {
  align-self: start;
  padding: 1rem 1.05rem 1.15rem;
  border: 1px solid rgba(166, 173, 200, 0.18);
  border-radius: var(--radius-md);
  background: rgba(24, 24, 37, 0.72);
}

:root[data-theme="light"] .skills__tools {
  background: rgba(255, 255, 255, 0.96);
}

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

.taglist--dense {
  gap: 0.65rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(137, 180, 250, 0.14);
  border: 1px solid rgba(137, 180, 250, 0.22);
  color: var(--text);
  line-height: 1.35;
}

:root[data-theme="light"] .tag {
  background: rgba(30, 102, 245, 0.08);
  border-color: rgba(30, 102, 245, 0.14);
}

.tag--tool {
  background: rgba(243, 139, 168, 0.12);
  border-color: rgba(243, 139, 168, 0.22);
}

:root[data-theme="light"] .tag--tool {
  background: rgba(210, 15, 57, 0.08);
  border-color: rgba(210, 15, 57, 0.14);
}

.tag__icon {
  width: 0.95rem;
  height: 0.95rem;
}

.tag__meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.bulletlist {
  padding-left: 1.25rem;
}

.bulletlist li {
  position: relative;
}

.bulletlist li + li {
  margin-top: 0.55rem;
}

.bulletlist li::before {
  content: "";
  position: absolute;
  top: 0.72rem;
  left: -1rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--secondary);
}

.project-list {
  display: grid;
  gap: 1rem;
}

.project-card {
  padding: 1.15rem 1.15rem 1.2rem;
  border-radius: var(--radius-lg);
  border-top: 0.32rem solid var(--primary);
}

.project-card__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem 1rem;
  align-items: flex-start;
}

.project-card__type {
  font-size: 0.8rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.project-card__title {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}

.project-card__action {
  white-space: nowrap;
  color: var(--muted-strong);
}

.project-card__summary {
  margin: 1rem 0 1.1rem;
  max-width: 58ch;
}

.project-card__url {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.repolist {
  display: block;
}

.repolist__title {
  font-family: var(--sans);
  font-size: 1.18rem;
  font-weight: 700;
}

.repolist__item + .repolist__item {
  margin-top: 1.4rem;
}

.repolist__url,
.repolist__desc {
  margin-top: 0.3rem;
}

.repolist__url {
  color: var(--muted);
  font-size: 0.92rem;
  word-break: break-word;
}

.repolist__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.2rem;
  margin-top: 0.8rem;
  color: var(--muted-strong);
  font-size: 0.95rem;
}

.repolist__stats p {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.repolist__stats .icon {
  width: 0.95rem;
  height: 0.95rem;
}

@media (min-width: 42rem) {
  .grid--split {
    grid-template-columns: 1fr 1fr;
  }

  .project-list,
  .skills-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 59rem) {
  .layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    grid-template-areas:
      "sidebar header"
      "sidebar main"
      "sidebar footer";
  }

  .header {
    grid-area: header;
    padding: 2rem 0 0.4rem;
  }

  .main {
    grid-area: main;
  }

  .sidebar {
    grid-area: sidebar;
    border-top: 0;
  }

  .footer {
    grid-area: footer;
  }

  .header .container,
  .main .container,
  .footer .container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: 7%;
    padding-right: 7%;
  }

  .sidebar .container {
    width: 100%;
    height: 100%;
    padding-inline: 0;
  }

  .vcard {
    position: relative;
    align-items: flex-start;
    min-height: 11rem;
  }

  .vcard__content {
    padding-top: 1rem;
  }

  .vcard__avatar {
    position: fixed;
    top: 3rem;
    right: 75%;
    transform: translateX(25%);
    transition: transform 0.22s ease;
    margin: 0;
  }

  .js-scrolled .vcard__avatar {
    transform: translateX(25%) scale(0.8);
  }

  .actions {
    position: fixed;
    top: 13.75rem;
    right: 75%;
    flex-direction: column;
    align-items: center;
    padding: 0 0.5rem;
    height: min-content;
  }

  .sidebar {
    display: flex;
  }

  .skills-layout {
    grid-template-columns: 1.65fr 1fr;
  }
}

@media print {
  @page {
    margin: 0.6in 0.75in;
  }

  :root,
  :root[data-theme="light"] {
    color-scheme: light;
    --bg: #ffffff;
    --bg-elevated: #ffffff;
    --sidebar-bg: #ffffff;
    --surface-0: #ffffff;
    --surface-1: #ffffff;
    --surface-2: #ffffff;
    --border: #a0a0a0;
    --text: #111111;
    --muted: #4f4f4f;
    --muted-strong: #333333;
    --primary: #000000;
    --secondary: #000000;
    --shadow: none;
    --shadow-soft: none;
  }

  html,
  body {
    background: #ffffff !important;
    color: #111111 !important;
    font-size: 11px;
    overflow: visible;
  }

  *,
  *::before,
  *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    transition: none !important;
    animation: none !important;
  }

  a {
    color: #111111 !important;
    text-decoration: none;
  }

  .layout {
    display: block;
  }

  .container,
  .header .container,
  .main .container,
  .footer .container {
    width: 100% !important;
    max-width: none !important;
    margin: 0;
    padding-inline: 0;
  }

  .header {
    padding: 0 0 0.6rem;
  }

  .sidebar,
  .actions,
  .skip-link,
  .utl-screen-only {
    display: none !important;
  }

  .utl-print-only {
    display: block !important;
  }

  .footer {
    background: transparent !important;
    border-top-color: #c7c7c7;
  }

  .section {
    padding-block: 1rem;
    page-break-inside: auto;
    break-inside: auto;
  }

  .section__title {
    border-bottom-color: #b5b5b5;
    margin-bottom: 0.8rem;
    page-break-after: avoid;
    break-after: avoid;
  }

  .vcard {
    align-items: flex-start;
  }

  .vcard__avatar {
    position: static !important;
    transform: none !important;
    border-color: #ffffff;
    width: 5.4rem;
    height: 5.4rem;
  }

  .entrylist::before,
  .entrylist__item::before,
  .bulletlist li::before,
  .credential__marker,
  .credential-list::before {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .skill-group,
  .project-card,
  .tag {
    background: transparent !important;
    border-color: #d2d2d2 !important;
  }

  .entrylist {
    page-break-inside: auto;
    break-inside: auto;
  }

  .entrylist__item,
  .entry,
  .project-card,
  .skill-group {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .project-list,
  .repolist,
  .grid--split {
    display: block;
  }

  .project-list > *,
  .repolist > *,
  .grid--split > * + * {
    margin-top: 0.85rem;
  }
}
