:root {
  color-scheme: light;
  --paper: #f8f9fd;
  --ink: #182238;
  --muted: #566176;
  --accent: #315bc8;
  --line: #dbe1ec;
  --on-accent: #ffffff;
  --surface-hover: #e9eefb;
  --surface-focus: #f0f3fa;
  --surface-section: #eef2f9;
  --surface-charitable: #edf5f2;
  --surface-portrait: #dfe9f8;
  --surface-card: #ffffff;
  --hero-glow: #d7e6ff;
  --soft-shadow: #1d315d12;
  --portrait-line: #c6d5ea;
  --card-line: #d9e0ec;
  --pill-surface: #e3eef0;
  --pill-line: #c6dde0;
  --status: #39735a;
  --primary-hover: #24489f;
  --connect-surface: #152644;
  --connect-ink: #f7f9ff;
  --connect-muted: #bdc9dc;
  --connect-eyebrow: #9ebaf0;
  --connect-line: #405475;
  --connect-hover: #a9c8ff;
  --code-surface: #17243c;
  --code-ink: #edf3ff;
  --code-shadow: #14213b2e;
  --icon-coral-surface: #f7e2e8;
  --icon-coral-ink: #8d3856;
  --icon-gold-surface: #f7edcf;
  --icon-gold-ink: #795b0f;
  --icon-green-surface: #deeee5;
  --icon-green-ink: #356247;
  --icon-purple-surface: #e8e3f6;
  --icon-purple-ink: #5f4a91;
  --icon-teal-surface: #daedef;
  --icon-teal-ink: #27636a;
  --mono: 'Cascadia Code', 'SFMono-Regular', Consolas, monospace;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --paper: #111827;
  --ink: #edf2ff;
  --muted: #b8c1d4;
  --accent: #8fb4ff;
  --line: #344158;
  --on-accent: #101a2e;
  --surface-hover: #25334d;
  --surface-focus: #1a2437;
  --surface-section: #151f31;
  --surface-charitable: #162721;
  --surface-portrait: #203454;
  --surface-card: #1b263a;
  --hero-glow: #1d3b6a;
  --soft-shadow: #00000026;
  --portrait-line: #38557e;
  --card-line: #35445c;
  --pill-surface: #203a3d;
  --pill-line: #335b5f;
  --status: #86c9a8;
  --primary-hover: #b2cbff;
  --connect-surface: #0b1322;
  --connect-ink: #f4f7ff;
  --connect-muted: #afbdd3;
  --connect-eyebrow: #8cace3;
  --connect-line: #31415b;
  --connect-hover: #a9c8ff;
  --code-surface: #0b1120;
  --code-ink: #edf3ff;
  --code-shadow: #00000055;
  --icon-coral-surface: #4d2d3a;
  --icon-coral-ink: #f2a8c2;
  --icon-gold-surface: #463b22;
  --icon-gold-ink: #e8ca74;
  --icon-green-surface: #243c31;
  --icon-green-ink: #91d0ad;
  --icon-purple-surface: #352d4c;
  --icon-purple-ink: #c2adee;
  --icon-teal-surface: #203b40;
  --icon-teal-ink: #8bcfd4;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --paper: #111827;
    --ink: #edf2ff;
    --muted: #b8c1d4;
    --accent: #8fb4ff;
    --line: #344158;
    --on-accent: #101a2e;
    --surface-hover: #25334d;
    --surface-focus: #1a2437;
    --surface-section: #151f31;
    --surface-charitable: #162721;
    --surface-portrait: #203454;
    --surface-card: #1b263a;
    --hero-glow: #1d3b6a;
    --soft-shadow: #00000026;
    --portrait-line: #38557e;
    --card-line: #35445c;
    --pill-surface: #203a3d;
    --pill-line: #335b5f;
    --status: #86c9a8;
    --primary-hover: #b2cbff;
    --connect-surface: #0b1322;
    --connect-ink: #f4f7ff;
    --connect-muted: #afbdd3;
    --connect-eyebrow: #8cace3;
    --connect-line: #31415b;
    --connect-hover: #a9c8ff;
    --code-surface: #0b1120;
    --code-ink: #edf3ff;
    --code-shadow: #00000055;
    --icon-coral-surface: #4d2d3a;
    --icon-coral-ink: #f2a8c2;
    --icon-gold-surface: #463b22;
    --icon-gold-ink: #e8ca74;
    --icon-green-surface: #243c31;
    --icon-green-ink: #91d0ad;
    --icon-purple-surface: #352d4c;
    --icon-purple-ink: #c2adee;
    --icon-teal-surface: #203b40;
    --icon-teal-ink: #8bcfd4;
  }
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}
body {
  margin: 0;
  background:
    radial-gradient(
      ellipse 640px 480px at 85% 280px,
      var(--hero-glow),
      transparent 70%
    ),
    var(--paper);
  color: var(--ink);
  font-family: 'Segoe UI', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-underline-offset: 0.25em;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
img {
  display: block;
  max-width: 100%;
}
.wrap {
  width: min(1200px, calc(100% - 96px));
  margin-inline: auto;
}
.skip-link {
  position: absolute;
  z-index: 10;
  top: -100px;
  left: 24px;
  padding: 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
}
.skip-link:focus {
  top: 16px;
}
.site-header {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.8px;
  text-decoration: none;
}
.brand-light {
  font-weight: 400;
}
.brand-mark {
  font-size: 32px;
  letter-spacing: -3px;
  border-right: 1px solid var(--line);
  padding-right: 20px;
}
.brand-mark span {
  color: var(--accent);
}
nav {
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
}
nav a {
  text-decoration: none;
}
nav a:hover,
.text-link:hover {
  color: var(--accent);
}
.theme-toggle {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.theme-toggle:hover {
  background: var(--surface-hover);
}
.nav-contact {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-card);
  padding: 12px 17px;
}
.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 64px;
  align-items: center;
  padding-block: 88px 100px;
}
.eyebrow {
  font: 11px/1.6 var(--mono);
  letter-spacing: 1.9px;
  font-weight: 600;
  margin: 0 0 24px;
}
.eyebrow a {
  color: inherit;
  text-decoration: none;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status);
  margin-right: 8px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(46px, 5.5vw, 76px);
  line-height: 1.04;
  letter-spacing: -3.5px;
  font-weight: 650;
  margin-bottom: 28px;
}
h1 span {
  color: var(--accent);
}
.hero-detail {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 30px;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.2s,
    background 0.2s;
}
.button:hover {
  transform: translateY(-2px);
}
.button-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.button-primary:hover {
  background: var(--primary-hover);
}
.button-outline {
  border: 1px solid var(--line);
  background: var(--surface-card);
}
.button-outline:hover {
  background: var(--surface-hover);
}
.mini-line {
  width: 24px;
  height: 1px;
  background: var(--muted);
}
.hero-art {
  position: relative;
  padding: 20px 0 60px 20px;
}
.portrait-frame {
  border: 1px solid var(--portrait-line);
  background: var(--surface-portrait);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 16px 40px var(--soft-shadow);
  transform: rotate(2deg);
}
.portrait-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
}
.portrait-signature {
  padding-top: 18px;
  font-size: 20px;
  font-weight: 650;
}
.portrait-signature span {
  display: block;
  margin-top: 5px;
  font: 10px var(--mono);
  color: var(--muted);
}
.code-note {
  position: absolute;
  right: -14px;
  bottom: 0;
  background: var(--code-surface);
  color: var(--code-ink);
  width: 244px;
  padding: 20px 24px;
  border-radius: 16px;
  box-shadow: 0 12px 30px var(--code-shadow);
  transform: rotate(-3deg);
}
.code-note p {
  font: 12px/1.8 var(--mono);
  margin-bottom: 0;
}
.code-comment {
  color: #b9b09f;
}
.code-key {
  color: #e6b9a2;
}
.code-value {
  color: #c5d6ab;
}
.code-string {
  color: #f3c498;
}
.focus-band {
  border-block: 1px solid var(--line);
  background: var(--surface-focus);
}
.focus-band .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-block: 26px;
  font-size: 13px;
  font-weight: 600;
}
.focus-label {
  font: 10px var(--mono);
  color: var(--muted);
  letter-spacing: 1.5px;
}
.section {
  padding-block: 96px;
}
h2 {
  font-size: clamp(30px, 3.4vw, 43px);
  line-height: 1.2;
  letter-spacing: -1.5px;
  font-weight: 600;
  margin-bottom: 20px;
}
.heading-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.heading-row h2 {
  margin-bottom: 20px;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}
.about-copy p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
}
.about-copy .lead,
.lead {
  font-size: 21px;
  color: var(--ink);
  line-height: 1.6;
}
.text-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding-block: 8px;
}
.text-link span {
  margin-left: 10px;
}
.github-icon {
  width: 16px;
  height: 16px;
  margin-right: 7px;
  vertical-align: -3px;
}
.projects-section {
  background: var(--surface-section);
  border-block: 1px solid var(--line);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  margin-bottom: 40px;
}
.section-heading p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0;
  max-width: 600px;
}
.section-heading > .text-link {
  flex-shrink: 0;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
.portfolio-card {
  background: var(--surface-card);
  border: 1px solid var(--card-line);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.portfolio-card:hover {
  border-color: var(--accent);
}
.project-card {
  grid-column: span 2;
}
.project-card:nth-child(n + 4) {
  grid-column: span 3;
}
.project-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px 0;
}
.project-icon {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--icon-coral-surface);
  color: var(--icon-coral-ink);
  font: 20px var(--mono);
}
.project-card:nth-child(2) .project-icon {
  background: var(--icon-gold-surface);
  color: var(--icon-gold-ink);
}
.project-card:nth-child(3) .project-icon {
  background: var(--icon-green-surface);
  color: var(--icon-green-ink);
}
.project-card:nth-child(4) .project-icon {
  background: var(--icon-purple-surface);
  color: var(--icon-purple-ink);
}
.project-card:nth-child(5) .project-icon {
  background: var(--icon-teal-surface);
  color: var(--icon-teal-ink);
}
.project-category {
  font: 10px var(--mono);
  color: var(--muted);
  letter-spacing: 1px;
  margin: 1px 0 7px;
}
h3 {
  font-size: 22px;
  letter-spacing: -0.6px;
  font-weight: 650;
  margin-bottom: 14px;
}
.project-card-heading h3 {
  margin-bottom: 0;
}
.project-copy {
  padding: 16px 20px 8px;
}
.project-copy p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 12px;
}
.project-copy p:last-child {
  margin-bottom: 0;
}
.project-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  min-height: 113px;
  border-top: 1px solid var(--line);
  padding: 12px 20px 8px;
}
.project-links .text-link {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  min-height: 44px;
  line-height: 1.5;
}
.project-links .github-icon,
.project-links .site-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
}
.project-links .site-icon {
  object-fit: contain;
}
.contribution {
  display: grid;
  grid-template-columns: 60px 1fr 215px;
  gap: 28px;
  padding-block: 34px;
  border-top: 1px solid var(--line);
}
.contribution:last-child {
  border-bottom: 1px solid var(--line);
}
.contribution-number {
  font: 14px var(--mono);
  color: var(--muted);
  padding-top: 5px;
}
.pill {
  display: inline-block;
  font: 9px var(--mono);
  letter-spacing: 1px;
  background: var(--pill-surface);
  border: 1px solid var(--pill-line);
  border-radius: 999px;
  padding: 6px 9px;
  margin-bottom: 16px;
}
.contribution h3 {
  font-size: 26px;
}
.contribution p:not(.pill) {
  max-width: 670px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 12px;
}
.contribution-topic {
  font: 10px/1.8 var(--mono);
  color: var(--muted);
  text-align: right;
  padding-top: 5px;
}
.secondary-link {
  margin-left: 20px;
}
.charitable-section {
  background: var(--surface-charitable);
  border-top: 1px solid var(--line);
}
.charitable-projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.charitable-project {
  min-width: 0;
}
.charitable-project:nth-child(2) .project-icon {
  background: var(--icon-teal-surface);
  color: var(--icon-teal-ink);
}
.charitable-project .project-copy {
  flex: 1;
}
.charitable-project .project-links {
  min-height: 65px;
}
.connect-section {
  background: var(--connect-surface);
  color: var(--connect-ink);
}
.connect-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 64px;
  padding-block: 80px;
}
.connect-inner .eyebrow {
  color: var(--connect-eyebrow);
}
.connect-inner h2 {
  font-size: clamp(36px, 4vw, 54px);
}
.connect-inner p:not(.eyebrow) {
  color: var(--connect-muted);
  line-height: 1.8;
  font-size: 15px;
  margin-bottom: 0;
}
.connect-links {
  width: 250px;
  flex-shrink: 0;
}
.connect-links a {
  display: flex;
  justify-content: space-between;
  text-decoration: none;
  font-size: 27px;
  border-bottom: 1px solid var(--connect-line);
  padding-block: 20px;
}
.connect-links a:hover {
  color: var(--connect-hover);
}
.connect-links a:focus-visible {
  outline-color: var(--connect-hover);
}
.connect-handle {
  display: block;
  margin-top: 20px;
  font: 11px var(--mono);
  color: var(--connect-muted);
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
  padding-block: 40px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.footer-brand {
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 10px;
}
.site-footer p {
  margin-bottom: 0;
}
.footer-meta {
  text-align: right;
}
.footer-meta a {
  display: inline-block;
  margin-left: 20px;
  margin-top: 10px;
}
.prose {
  max-width: 760px;
  min-height: 75vh;
}
.prose h1 {
  font-size: clamp(40px, 5vw, 64px);
}
.prose h2 {
  font-size: 26px;
  margin-top: 36px;
  letter-spacing: -0.7px;
}
.prose p {
  line-height: 1.8;
  color: var(--muted);
}
@media (max-width: 1000px) {
  .wrap {
    width: calc(100% - 64px);
  }
  .hero {
    gap: 32px;
    padding-block: 64px 80px;
  }
  h1 {
    letter-spacing: -2.5px;
  }
  .about-grid {
    gap: 40px;
  }
  .contribution {
    grid-template-columns: 40px 1fr;
  }
  .contribution-topic {
    display: none;
  }
  .code-note {
    right: 0;
    width: 210px;
  }
}
@media (max-width: 760px) {
  .wrap {
    width: calc(100% - 40px);
  }
  .site-header {
    min-height: 100px;
    padding-block: 20px;
    flex-wrap: wrap;
    gap: 18px;
  }
  .brand {
    font-size: 19px;
  }
  .brand-mark {
    font-size: 26px;
    padding-right: 14px;
  }
  nav {
    gap: 16px;
    font-size: 12px;
    width: 100%;
    justify-content: flex-start;
  }
  .nav-contact {
    border: 0;
    padding: 0;
    background: transparent;
  }
  .theme-toggle {
    margin-left: auto;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-block: 48px 56px;
  }
  h1 {
    font-size: clamp(43px, 8.5vw, 64px);
  }
  .hero-art {
    width: min(420px, 100%);
    justify-self: center;
  }
  .focus-band .wrap {
    justify-content: start;
    column-gap: 24px;
    font-size: 12px;
  }
  .focus-label {
    width: 100%;
  }
  .section {
    padding-block: 60px;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .section-heading {
    flex-direction: column;
    align-items: start;
    gap: 14px;
    margin-bottom: 28px;
  }
  .project-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .project-card,
  .project-card:nth-child(n + 4) {
    grid-column: span 1;
  }
  .project-card:last-child {
    grid-column: span 2;
  }
  .charitable-projects {
    gap: 14px;
  }
  .contribution {
    gap: 14px;
    grid-template-columns: 25px 1fr;
  }
  .contribution h3 {
    font-size: 23px;
  }
  .connect-inner {
    flex-direction: column;
    align-items: start;
    gap: 24px;
    padding-block: 56px;
  }
  .connect-links {
    width: 100%;
  }
  .site-footer {
    flex-direction: column;
    align-items: start;
    gap: 20px;
    padding-block: 28px;
  }
  .footer-meta {
    text-align: left;
  }
  .footer-meta a {
    margin-left: 0;
    margin-right: 20px;
  }
}
@media (max-width: 480px) {
  .wrap {
    width: calc(100% - 32px);
  }
  nav {
    gap: 12px;
    font-size: 11.5px;
  }
  .theme-toggle {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .project-card,
  .project-card:nth-child(n + 4),
  .project-card:last-child {
    grid-column: span 1;
  }
  .project-links {
    min-height: 0;
  }
  .charitable-projects {
    grid-template-columns: 1fr;
  }
  .button-row .button {
    width: 100%;
    justify-content: space-between;
  }
  .secondary-link {
    margin-left: 0;
    margin-right: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
