:root {
  color-scheme: light;
  --contact-light: block; --contact-dark: none;
  --page: #fdfcfe; --hero: #f5f2fc; --grid: #e8e3f280; --surface: #f5f4f8;
  --ink: #252338; --muted: #565565; --eyebrow: #64507e; --accent: #8057bf;
  --line: #d7d2e0; --button: #29263b; --button-text: #fff; --shadow: #b39dc9; --hover: #ece5f7;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  scroll-behavior: smooth;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --signature-filter: brightness(1.8) saturate(.72);
    --contact-light: none; --contact-dark: block;
    --page: #171620; --hero: #201c2c; --grid: #44395070; --surface: #1c1a26;
    --ink: #f5edf9; --muted: #c5bdd0; --eyebrow: #c7addf; --accent: #c19ce9;
    --line: #484054; --button: #decbf5; --button-text: #251e33; --shadow: #705783; --hover: #332c40;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --signature-filter: brightness(1.8) saturate(.72);
  --contact-light: none; --contact-dark: block;
  --page: #171620; --hero: #201c2c; --grid: #44395070; --surface: #1c1a26;
  --ink: #f5edf9; --muted: #c5bdd0; --eyebrow: #c7addf; --accent: #c19ce9;
  --line: #484054; --button: #decbf5; --button-text: #251e33; --shadow: #705783; --hover: #332c40;
}
* { box-sizing: border-box; }
header, nav, main, section, article, figure, footer { display: block; }
body {
  margin: 0; background: #fdfcfe; color: #252338; background: var(--page); color: var(--ink);
  font: 1rem/1.55 Arial, sans-serif; font-family: var(--sans);
  word-wrap: break-word; overflow-wrap: anywhere;
}
h1, h2, h3, p, figure { margin: 0; }
img { max-width: 100%; height: auto; }
[hidden], dialog:not([open]) { display: none !important; }
a { color: inherit; text-underline-offset: .2em; }
button { cursor: pointer; font: inherit; color: inherit; }
button, a { touch-action: manipulation; }
a:focus, button:focus { outline: 3px solid #946acf; outline-offset: 2px; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; }
.wrap { width: 90%; max-width: 74.5rem; margin: 0 auto; }
header, footer { background: var(--page); }
header { border-bottom: 1px solid var(--line); }
nav { padding: .65rem 0; }
nav, .brand, .navlinks, .navtools, .actions, .tags, .dialog-actions, footer .wrap {
  display: flex; align-items: center; flex-wrap: wrap;
}
nav { gap: .4rem 1.5rem; }
.brand, .navlinks a, .github, .btn, footer a { text-decoration: none; }
.brand { gap: .55rem; min-height: 2.75rem; font-size: 1.125rem; font-weight: 740; letter-spacing: -.03em; }
.brand-monogram, .cv-monogram { display: block; max-width: 100%; height: auto; filter: var(--signature-filter, none); }
.brand-monogram { width: 3.25rem; }
.cv-monogram { width: 3.5rem; }
.navlinks { gap: 0 .9rem; }
.navtools { gap: .35rem .75rem; }
.navlinks a, .github, .source, .textlink, footer a {
  display: inline-block; padding: .65rem .12rem; font-size: .94rem; line-height: 1.5; font-weight: 650;
}
.navlinks a { padding-left: .25rem; padding-right: .25rem; }
.navlinks a:hover, .source:hover, .textlink:hover, footer a:hover { color: var(--accent); text-decoration: underline; }
.github, .btn { border: 1.5px solid currentColor; border-radius: .4rem; }
.github { padding: .58rem .85rem; }
.github:hover, .light:hover { background: var(--hover); }
.theme-switch {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem;
  padding: 0; border: 0; border-radius: 2rem; background: transparent;
}
.theme-track {
  position: relative; display: grid; grid-template-columns: repeat(2, 1.7rem);
  place-items: center; padding: .16rem; border: 1px solid var(--eyebrow); border-radius: 2rem;
  background: var(--surface); color: var(--muted);
}
.theme-track::before {
  content: ''; position: absolute; top: .16rem; left: .16rem; width: 1.7rem; height: 1.7rem;
  border-radius: 50%; background: var(--button); transition: transform .18s ease-out;
}
.theme-track svg { position: relative; width: 1.7rem; height: 1.7rem; padding: .31rem; }
.theme-switch[aria-checked="false"] .theme-sun, .theme-switch[aria-checked="true"] .theme-moon { color: var(--button-text); }
.theme-switch[aria-checked="true"] .theme-track::before { transform: translateX(1.7rem); }
.theme-switch:hover .theme-track { background: var(--hover); }
@media (forced-colors: active) {
  .theme-track::before { background: Highlight; forced-color-adjust: none; }
  .theme-switch[aria-checked="false"] .theme-sun, .theme-switch[aria-checked="true"] .theme-moon {
    color: HighlightText; forced-color-adjust: none;
  }
}
.hero { background-color: var(--hero); border-bottom: 1px solid var(--line);
  background-image: linear-gradient(90deg,var(--grid) 1px,transparent 1px),linear-gradient(var(--grid) 1px,transparent 1px);
  background-size: 26px 26px;
}
.hero-inner { padding: 2rem 0 1rem; }
.eyebrow, .type { color: var(--eyebrow); font: 600 .875rem/1.45 monospace; font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: .55rem; }
.pixelplus { flex: 0 0 .7rem; width: .7rem; height: .7rem; background: var(--accent);
  clip-path: polygon(33% 0,66% 0,66% 33%,100% 33%,100% 66%,66% 66%,66% 100%,33% 100%,33% 66%,0 66%,0 33%,33% 33%);
}
h1 { font-size: 2.65rem; font-size: clamp(2rem,12vw,5.7rem); letter-spacing: -.075em; line-height: .98; margin: 1rem 0; }
h1 br { display: none; }
h1 span, h2 span { color: var(--accent); }
.lead { max-width: 29rem; font-size: 1.075rem; color: var(--muted); }
.actions, .dialog-actions { gap: .75rem; margin-top: 1.35rem; }
.btn { display: inline-block; max-width: 100%; min-height: 2.75rem; padding: .65rem 1rem; font: inherit; font-weight: 650; text-align: center; }
.primary { background: #29263b; color: white; background: var(--button); color: var(--button-text); border-color: var(--ink); box-shadow: 3px 3px var(--shadow); }
.light { background: var(--page); color: var(--ink); }
.workstation { max-width: 24rem; margin: .75rem auto 0; }
.workstation img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.section { padding: 2.3rem 0; scroll-margin-top: 1rem; }
.sectionhead { margin-bottom: 1.25rem; }
h2 { font-size: 2.4rem; font-size: clamp(1.75rem,6vw,4.3rem); letter-spacing: -.065em; line-height: 1.06; margin-top: .55rem; }
h3 { font-size: 1.43rem; letter-spacing: -.04em; line-height: 1.25; }
.projects { background: var(--surface); border-block: 1px solid var(--line); }
.worklist article { padding: 1.35rem 0; border-top: 1px solid var(--line); }
.worklist article:last-child { border-bottom: 1px solid var(--line); }
.type { display: block; margin-bottom: .45rem; }
.worklist p, .bio p, .skills-grid p { color: var(--muted); }
.worklist p { max-width: 40rem; margin-top: .45rem; }
.tags { gap: .45rem; margin-top: .7rem; }
.tags span { max-width: 100%; font: .85rem/1.4 monospace; font-family: var(--mono); border: 1px solid var(--line); border-radius: .25rem; padding: .18rem .45rem; }
.bio, .contact-list { margin-top: 1.35rem; }
.bio .bio-intro { font-size: 1.24rem; line-height: 1.45; color: var(--ink); margin-bottom: .85rem; }
.skills-grid article { border-top: 1px solid var(--line); padding: 1rem 0; }
.skills-grid p { margin-top: .45rem; }
.contact { background: var(--hero); border-top: 1px solid var(--line); }
.contact-list { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.contact-list a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.875rem; height: 2.875rem; min-width: 44px; min-height: 44px; border-radius: .65rem;
}
.contact-list img {
  display: block; display: var(--contact-light); width: 2.125rem; height: 2.125rem;
}
.contact-list .contact-dark { display: none; display: var(--contact-dark); }
@media (hover: hover) { .contact-list a:hover img { transform: translateY(-1px); } }
footer { border-top: 1px solid var(--line); }
footer .wrap { justify-content: space-between; gap: .5rem 1rem; padding: .75rem 0; color: var(--muted); }
.skip { position: absolute; left: 0; top: 0; transform: translateY(-140%); background: var(--page); padding: .65rem; }
.skip:focus { transform: none; z-index: 5; }
.cv-dialog {
  width: 88%; max-width: 23rem; max-height: 88vh; max-height: 88dvh; overflow: auto; margin: auto;
  padding: 1rem; padding: clamp(.8rem,4vw,1.8rem); color: var(--ink); background: var(--page);
  border: 3px solid currentColor; border-radius: .2rem; box-shadow: 5px 5px var(--shadow);
}
.cv-dialog::backdrop { background: rgba(19,14,33,.72); }
.cv-dialog h2 { font-size: 1.55rem; letter-spacing: -.045em; margin: .6rem 0; }
.pixel-track { display: flex; gap: .35rem; margin-top: .75rem; }
.pixel-track i { width: .72rem; height: .72rem; background: var(--accent); animation: pulse 1s steps(2,end) infinite; }
.pixel-track i:nth-child(2) { animation-delay: .12s; }
.pixel-track i:nth-child(3) { animation-delay: .24s; }
.pixel-track i:nth-child(4) { animation-delay: .36s; }
.pixel-track i:nth-child(5) { animation-delay: .48s; }
@keyframes pulse { 50% { opacity: .25; } }

@media (min-width: 40em) {
  .section { padding: 3rem 0; }
  .hero-inner { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1rem; align-items: center; padding: 3rem 0; }
  h1 { font-size: 4.5rem; font-size: clamp(3.75rem,8vw,7.6rem); }
  h1 br { display: initial; }
  .workstation { max-width: none; margin: 0; }
  .sectionhead { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; }
  .skills-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.25rem; }
}
@media (min-width: 50em) {
  .navlinks { margin-left: auto; }
  nav { min-height: 4.75rem; }
  .hero-inner { grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); }
  .about { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.35fr); gap: 2.5rem; }
  .bio, .contact-list { margin-top: 0; }
  .worklist article { display: grid; grid-template-columns: minmax(7rem,1fr) minmax(0,2.55fr) minmax(6rem,.6fr); gap: 1.5rem; align-items: start; }
  .source { justify-self: end; padding-top: .15rem; }
}
@media (min-width: 70em) {
  .hero-inner, .section { padding: 3.8rem 0; }
  .navlinks { gap: 1.5rem; }
}
@media (max-width: 27.99em) {
  nav { align-items: flex-start; gap: .25rem; }
  .brand, .navlinks, .navtools { width: 100%; }
}
@media (max-width: 20em) {
  .actions .btn { width: 100%; }
  .navlinks { column-gap: .65rem; }
}
@media (horizontal-viewport-segments: 2) {
  /* Keep each reading column and its controls on one surface of a spanned display. */
  .wrap { width: auto; max-width: none; margin: 0; padding-left: 1rem; padding-right: 1rem; }
  nav.wrap, footer .wrap {
    width: env(viewport-segment-width 0 0); margin-left: env(viewport-segment-left 0 0);
  }
  .hero-inner, .about, .projects .sectionhead, .worklist article, .skills-grid { display: grid; align-items: start;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    grid-template-columns: minmax(0,calc(env(viewport-segment-width 0 0) - 2rem)) minmax(0,calc(env(viewport-segment-width 1 0) - 2rem));
    column-gap: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0) + 2rem);
  }
  .hero-inner { align-items: center; }
  .worklist article { row-gap: 0; }
  .worklist .source { grid-column: 2; justify-self: start; }
  .sectionhead .textlink { justify-self: start; }
  .skills-grid { row-gap: 1rem; }
  .sectionhead { justify-content: start; }
  .navlinks { margin-left: 0; }
  .cv-dialog { max-width: min(23rem,calc(env(viewport-segment-width 0 0) - 2rem)); margin-left: max(1rem,calc((env(viewport-segment-width 0 0) - 23rem) / 2)); }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .pixel-track i { animation: none; }
  .theme-track::before { transition: none; }
}
.cv-page { max-width: 45rem; padding: 2rem 0; }
.cv nav { justify-content: space-between; }
.cv-page h1 { font-size: 2.6rem; font-size: clamp(2rem,8vw,4.75rem); }
.cv-page h2 { font-size: 1.7rem; }
.cv-page h3 { font-size: 1.15rem; margin-top: 1rem; letter-spacing: -.025em; }
.cv-page section { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1rem; }
.cv-page p, .cv-page ul { margin-top: .6rem; }
.cv-page ul { padding-left: 1.25rem; }
@media (horizontal-viewport-segments: 2) {
  .cv-page { width: env(viewport-segment-width 0 0); padding-left: 1rem; padding-right: 1rem; }
}

.opening-scene {
  position: fixed; top: 0; left: 0; inset: 0; z-index: 100; margin: 0; padding: 0; border: 0;
  width: 100%; height: 100%; max-width: none; max-height: none; overflow: auto;
  color: #252338; color: var(--ink); background-color: #f5f2fc; background-color: var(--hero);
  background-image: radial-gradient(ellipse at 50% 42%, rgba(146,143,132,.12), transparent 55%),
    linear-gradient(90deg,var(--grid) 1px,transparent 1px), linear-gradient(var(--grid) 1px,transparent 1px);
  background-size: auto, 26px 26px, 26px 26px; background-position: center;
}
.opening-scene::backdrop { background-color: var(--hero); }
.opening-scene[open] { display: block; }
.opening-inner {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  min-height: 100%; text-align: center; padding: 1.1rem .7rem;
}
.opening-progress { width: 13rem; max-width: 64vw; }
.opening-signature { display: block; width: 100%; height: auto; }
.signature-track { fill: var(--line); }
.signature-ink { fill: var(--accent); }
.opening-percent {
  display: block; margin-top: 1.15rem; color: var(--muted);
  font: 500 .9rem/1.4 var(--mono); font-variant-numeric: tabular-nums;
}
@media (forced-colors: active) {
  .signature-track { fill: GrayText; }
  .signature-ink { fill: Highlight; }
}
#enter-portfolio {
  margin-top: 1.3rem; min-height: 2.75rem; max-width: 100%; padding: .55rem 1rem;
  background: var(--page); color: var(--ink); border: 1px solid var(--line);
  border-radius: .4rem; font-size: .94rem; font-weight: 650;
}
#enter-portfolio:hover { background: var(--hover); }
@media (horizontal-viewport-segments: 2) { .opening-inner { width: env(viewport-segment-width 0 0); } }
