:root {
  color-scheme: dark;
  --violet-panel: #25173a;
  --bg: #140d24;
  --ink: #f7f3ff;
  --muted: #c3bbd1;
  --violet: #d3b6ff;
  --acid: #82ffee;
  --line: #464052;
  --paper: #fbf8fd;
  --chrome-bar: linear-gradient(#fcf8ff, #e1d3ed 49%, #cbbbdc 50%, #eadff4);
  --chrome-bar-dark: linear-gradient(#4b3b62, #392d4f 49%, #282039 50%, #3b2d50);
  --display: "Arial Black", Arial, sans-serif;
  --pink: #ff71cb;
  --pixel-dark: repeating-conic-gradient(#2820dc 0 25%, #120d26 0 50%) 0 0 / 6px 6px;
  --pixel-light: repeating-conic-gradient(#f6eeff 0 25%, #7462ff 0 37.5%, #191137 0 50%) 0 0 / 4px 4px;
  --mono: "Cascadia Code", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: linear-gradient(var(--violet-panel) 0 7rem, var(--bg) 7rem); color: var(--ink); font: 1rem/1.6 system-ui, sans-serif; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.wrap { width: min(1380px, calc(100% - clamp(2rem, 9vw, 9rem))); margin-inline: auto; }
.skip { position: absolute; z-index: 3; left: 1rem; top: -5rem; background: var(--bg); padding: .5rem; }
.skip:focus { top: 1rem; }
.glitch-intro { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .glitch-intro {
    display: grid;
    position: fixed;
    inset: 0;
    z-index: 4;
    place-items: center;
    overflow: hidden;
    pointer-events: none;
    background: repeating-linear-gradient(#10091d 0 3px, #1d102c 3px 4px);
    animation: intro-reveal 1.15s ease-out both;
  }
  .glitch-intro pre {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: .8rem 1rem;
    background: #10091d;
    color: #b6fff4;
    font: clamp(.75rem, 3.5vw, 1.25rem)/1.5 var(--mono);
    text-shadow: 2px 0 #f16bc8;
  }
  .glitch-intro pre span { color: #f8a6e2; }
  .intro-pixels {
    position: absolute;
    inset: 12% 0;
    background: var(--pixel-light);
    clip-path: polygon(0 13%, 64% 13%, 64% 24%, 37% 24%, 37% 34%, 100% 34%, 100% 45%, 70% 45%, 70% 61%, 12% 61%, 12% 77%, 89% 77%, 89% 88%, 44% 88%, 44% 69%, 0 69%);
    opacity: .65;
    animation: intro-pixels .85s steps(4, end) both;
  }
  @keyframes intro-pixels {
    from { transform: translateX(-22%); }
    to { transform: translateX(18%); }
  }
  @keyframes intro-reveal {
    0%, 28% { opacity: 1; clip-path: inset(0); }
    72% { opacity: .84; clip-path: inset(16% 0 28%); }
    100% { opacity: 0; clip-path: inset(48% 0 52%); visibility: hidden; }
  }
}
.top, footer { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding-block: 1rem; }
.top { position: relative; z-index: 1; border-bottom: 1px solid #f7f3ff80; }
.brand, nav, .label, .window, footer { font-family: var(--mono); }
.label { letter-spacing: .045em; text-transform: uppercase; }
.brand { text-decoration: none; font-weight: bold; white-space: nowrap; }
.brand span { color: var(--acid); }
nav { display: flex; gap: clamp(.85rem, 4vw, 3rem); font-size: .95rem; }
nav a { text-decoration: none; }
.top nav a[href^="#"]::before { content: "/"; margin-inline-end: .12em; color: var(--acid); }
.top nav { gap: clamp(.55rem, 2.2vw, 2rem); }
.language-switch { color: var(--acid); }
nav a:hover, .text-link:hover { text-decoration: underline; text-underline-offset: .3em; }

.hero { position: relative; isolation: isolate; }
.hero-layout {
  display: grid;
  min-height: calc(100svh - 3.6rem - 1px);
  grid-template-columns: minmax(13rem, 1fr) minmax(0, 2.5fr);
  align-items: end;
  gap: clamp(1.25rem, 3vw, 3rem);
  padding-block: clamp(2.4rem, 5vw, 5rem) clamp(2.5rem, 6vw, 6rem);
}
.hero-copy { grid-column: 1 / -1; }
.hero-atmosphere {
  position: absolute;
  z-index: -1;
  inset: -7rem 0 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse at 75% 20%, #40195a, transparent 70%), var(--violet-panel);
}
.hero-atmosphere::before {
  content: "";
  position: absolute;
  inset: 12% -14% auto auto;
  width: min(63rem, 76vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #f7f3ff 0 .75px, transparent 1px) 0 0 / 4px 4px;
  mask-image: radial-gradient(ellipse, #000 4%, #0008 40%, transparent 69%);
  opacity: .46;
}
.hero-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("hero-grain.png") repeat;
  mix-blend-mode: soft-light;
  opacity: .5;
}
.hero-ascii {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .46;
  mix-blend-mode: screen;
  mask-image: linear-gradient(110deg, #0008, #000b 45%, #000);
}

h1, h2, h3 { margin: 0; font-family: var(--display); line-height: .96; letter-spacing: -.075em; overflow-wrap: anywhere; }
h1 { position: relative; font-size: clamp(2.4rem, 12.6vw, 12rem); font-weight: 800; }
.typed-word, .typed-text { display: inline-block; }
.typed-word { position: relative; }
.pause-typing, .pause-typing-label { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .pause-typing { display: inline-block; margin: 0 .3rem .6rem 0; accent-color: var(--acid); }
  .pause-typing-label { display: inline; color: var(--muted); font: .875rem var(--mono); cursor: pointer; }
  .opening-type .typed-text {
    animation: type-name var(--type-duration) steps(var(--letters), end) var(--type-start) backwards;
  }
  .opening-type::after {
    content: "";
    position: absolute;
    inset-block: .14em .04em;
    width: .035em;
    background: var(--acid);
    opacity: 0;
    animation: type-caret var(--type-duration) steps(var(--letters), end) var(--type-start) forwards;
    pointer-events: none;
  }
  @keyframes type-name {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0); }
  }
  @keyframes type-caret {
    from { left: 0; opacity: 1; }
    to { left: 100%; opacity: 0; }
  }
}
h1 em {
  position: relative;
  padding-inline: .04em .12em;
  color: var(--violet);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -.085em;
}
.glitch-copy {
  position: absolute;
  inset: 0;
  color: var(--pink);
  -webkit-text-fill-color: currentColor;
  text-shadow: -.055em 0 #72ffed;
  transform: translateX(.045em);
  mask-image: linear-gradient(transparent 26%, #000 26% 32%, transparent 32% 66%, #000 66% 72%, transparent 72%);
  pointer-events: none;
}
.hero-meta { padding-block: 1rem .5rem; border-top: 1px solid #f7f3ff80; }
.intro { max-width: 24ch; margin: 0 0 1.35rem; color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.35rem); }
.button, .controls button {
  display: inline-flex;
  align-items: center;
  min-height: 2.65rem;
  padding: .5rem 1rem;
  border: 1px solid var(--acid);
  border-radius: 0;
  background: var(--acid);
  color: #141019;
  font: 700 .875rem/1.35 var(--mono);
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--ink); border-color: var(--ink); }
.window { overflow: clip; border: 1px solid var(--acid); background: #201032; box-shadow: .35rem .35rem #140d24; font-size: .875rem; }
.window-bar, .controls { display: flex; justify-content: space-between; align-items: center; gap: .65rem; padding: .55rem .85rem; }
.window-bar { background: #21162f; color: var(--acid); border-bottom: 1px solid var(--acid); font-weight: bold; }
.dot { display: inline-block; background: currentColor; width: .56rem; height: .56rem; margin-right: .25rem; border-radius: 50%; }
.lab-workspace { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr); }
.lab-editor { min-width: 0; border-right: 1px solid #6d5f86; background: #130d23; }
.editor-tab { width: fit-content; padding: .5rem .85rem; border-bottom: 1px solid var(--acid); background: #25173a; color: var(--ink); }
.editor-lines { padding: .65rem 0 .65rem 2.4rem; margin: 0; color: #aa99c1; }
.editor-lines li { min-height: 2.15rem; padding: .28rem .4rem; overflow-wrap: anywhere; }
.editor-lines code { font: inherit; color: var(--ink); }
.editor-lines .is-typing::after { content: ""; display: inline-block; height: 1em; margin-inline-start: .1em; border-inline-start: 2px solid var(--acid); vertical-align: -.1em; }
.editor-lines b { color: #ffa6de; font-weight: normal; }
.editor-lines em { color: var(--acid); font-style: normal; }
@media (max-width: 950px) {
  .lab-workspace { grid-template-columns: minmax(0, 1fr); }
  .lab-editor { border-right: 0; border-bottom: 1px solid #6d5f86; }
}
.screen {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at center, #24183a, #10091d 75%);
}
.screen::after { content: ""; position: absolute; inset: 0; z-index: 1; background: repeating-linear-gradient(0deg, #12092148 0 1px, transparent 1px 4px); pointer-events: none; }
canvas { position: relative; width: 100%; height: clamp(13rem, 24vw, 24rem); object-fit: contain; display: block; }
.hud, .cross { position: absolute; z-index: 2; color: #d7fff8; text-shadow: 0 1px 2px #10091d; }
.hud { left: .85rem; bottom: .7rem; font-size: .8rem; }
.cross { right: .85rem; top: .55rem; }
.controls { border-top: 1px solid var(--line); flex-wrap: wrap; }
.controls button { background: transparent; color: var(--ink); border-color: #786497; padding: .35rem .7rem; }
.controls button:hover, .controls button[aria-pressed="true"] { color: #141019; background: var(--acid); border-color: var(--acid); }

.section { padding-block: clamp(3rem, 7vw, 7rem); }
h2 { font-size: clamp(2.6rem, 7vw, 7.5rem); }
h3 { font-size: clamp(1.9rem, 3.5vw, 4.25rem); }
.work { position: relative; color-scheme: light; background: var(--paper); color: #17131f; --muted: #4a4157; --violet: #4f307b; --line: #bdb1ce; }
.work::before {
  content: "";
  display: block;
  height: clamp(1.45rem, 3.3vw, 2.6rem);
  border-top: 1px solid #fff9ff;
  border-bottom: 1px solid #9c8bab;
  background: var(--chrome-bar);
}
.work::after {
  content: "";
  position: absolute;
  inset: .5rem auto auto clamp(1rem, 4.5vw, 4.5rem);
  width: min(25vw, 15rem);
  height: .42rem;
  background: var(--pixel-dark);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 69% 100%, 69% 55%, 24% 55%, 24% 100%, 0 100%);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .has-scroll-overlay { isolation: isolate; }
  .has-scroll-overlay .hero { position: sticky; top: var(--hero-pin-top); z-index: 0; }
  .has-scroll-overlay .work { z-index: 1; }
}
.work-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2rem; margin-bottom: clamp(1.25rem, 3vw, 2.5rem); }
.work h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; }
.work h2 span { color: var(--violet); font-size: .62em; line-height: 1; white-space: nowrap; }
.work-theme-toggle {
  min-height: 2.6rem;
  padding: .5rem .75rem;
  border: 1px solid var(--line);
  border-radius: .4rem;
  background: var(--chrome-bar);
  color: inherit;
  font: .875rem/1.35 var(--mono);
  cursor: pointer;
}
.work-theme-toggle:hover { text-decoration: underline; }
.work-index {
  position: sticky;
  top: .65rem;
  z-index: 3;
  width: fit-content;
  max-width: 100%;
  gap: .2rem;
  flex-wrap: wrap;
  padding: .3rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fbf8fdf5;
  backdrop-filter: blur(.75rem);
  box-shadow: 0 .4rem 1.2rem #1f113019;
}
.work-index a { display: block; padding: .4rem .65rem; font-size: .875rem; }
.work-index a + a { border-inline-start: 1px solid var(--line); }
.work-index a::before { content: ">"; margin-inline-end: .35em; color: var(--violet); }
.work-index a:hover, .work-index a:focus-visible { background: #eadff6; }
.projects { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; gap: clamp(1.6rem, 4vw, 4rem); margin-block: clamp(1.5rem, 3vw, 3rem) clamp(2rem, 5vw, 4rem); }
.project { display: grid; gap: 1.1rem; min-width: 0; }
.project, #archive-title { scroll-margin-top: 5.5rem; }
.project:nth-child(2) { margin-top: clamp(1rem, 7vw, 6rem); }
.project:last-child { grid-column: 1 / -1; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); align-items: center; gap: clamp(1rem, 5vw, 5rem); padding-top: 1.5rem; border-top: 1px solid var(--line); }
.project-copy { padding-top: .75rem; border-top: 1px solid var(--line); }
.project-copy .label::before { content: "//"; margin-inline-end: .5em; color: var(--violet); }
.project-art { border-radius: 0; }
.project-copy p:not(.label), .profile p { color: var(--muted); max-width: 55ch; }
.text-link, summary { color: var(--violet); text-underline-offset: .25em; }
summary { cursor: pointer; }
.details-reveal { position: relative; display: flow-root; }
@media (prefers-reduced-motion: no-preference) {
  details[open] > .details-reveal { animation: details-unfold .3s steps(4, end); }
  details[open] > .details-reveal::after {
    content: "";
    position: absolute;
    inset: .35rem 0 0;
    background: var(--pixel-light);
    animation: details-pixels .3s steps(3, end) both;
    pointer-events: none;
  }
  details[open].is-folding > .details-reveal {
    animation: details-fold .23s steps(4, end) both;
  }
  details[open].is-folding > .details-reveal::after {
    animation: details-pixels .23s steps(3, end) reverse both;
  }
  @keyframes details-unfold {
    from { opacity: .4; clip-path: inset(0 0 75% 0); }
    to { opacity: 1; clip-path: inset(0); }
  }
  @keyframes details-fold {
    from { opacity: 1; clip-path: inset(0); }
    to { opacity: 0; clip-path: inset(47% 0 53% 0); }
  }
  @keyframes details-pixels {
    0% { opacity: .65; clip-path: inset(12% 35% 78% 0); }
    50% { opacity: .5; clip-path: inset(32% 5% 48% 20%); }
    100% { opacity: 0; clip-path: inset(60% 0 40%); }
  }
}
.project-code { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.project-code pre { max-width: 100%; overflow: auto; padding: .8rem; border-radius: .35rem; background: #171021; color: var(--acid); font: .875rem/1.5 var(--mono); }
.project-code pre code { font: inherit; }
.case-art, .project-art { display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); }
.case-art { aspect-ratio: 1.25; background: radial-gradient(circle, #f7f3ff45 0 .65px, transparent 1px) 0 0 / 5px 5px, #301f4b; }
.case-art img { display: block; width: min(64%, 18rem); height: auto; }
.case-art.mural { aspect-ratio: 1.2; }
.case-art.mural img { width: 100%; height: 100%; object-fit: cover; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .project > :is(.case-art, .project-art) {
      animation: project-arrival linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 32%;
    }
    @keyframes project-arrival {
      from { transform: translateY(1.6rem) scale(.97); opacity: .7; }
      to { transform: none; opacity: 1; }
    }
  }
}
.project-art {
  min-height: 13rem;
  background: repeating-radial-gradient(ellipse at 62% 35%, transparent 0 16px, #f7f3ff62 17px 18px), var(--violet-panel);
  color: #f5eaff;
  font: bold clamp(2.5rem, 6vw, 5rem)/.87 var(--mono);
  letter-spacing: -.1em;
}
.project-art > span { transform: rotate(-10deg); text-shadow: 4px 4px #090510; }
.accent { color: var(--acid); }
.archive { border: 1px solid var(--line); overflow: clip; background: var(--paper); box-shadow: .25rem .25rem #17131f26; }
.archive-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .65rem 1.5rem;
  padding: .85rem clamp(.8rem, 3vw, 1.5rem);
  border-bottom: 1px solid #827393;
  background: var(--chrome-bar);
}
.archive-heading::after {
  content: "";
  flex: 0 0 100%;
  height: .45rem;
  background: repeating-linear-gradient(135deg, currentColor 0 1px, transparent 1px 5px);
  opacity: .45;
}
.archive-heading h3 { display: flex; align-items: center; gap: .6rem; font-size: clamp(1.05rem, 2.4vw, 1.65rem); letter-spacing: -.035em; }
.archive-heading .text-link { font: .875rem/1.5 var(--mono); }
.work.work-dark {
  color-scheme: dark;
  color: var(--ink);
  background: #171021;
  --muted: #c3bbd1;
  --violet: #dfc5ff;
  --line: #786588;
  --chrome-bar: var(--chrome-bar-dark);
}
.work-dark::before { border-color: #786588; }
.work-dark .work-theme-toggle[aria-pressed="true"] { border-color: var(--acid); color: var(--acid); }
.work-dark .work-index { border-color: var(--line); background: #251934f5; }
.work-dark .work-index a:hover, .work-dark .work-index a:focus-visible { background: #3c2a52; }
.work-dark .archive, body:has(.work-dark) .archive-viewer { background: #211632; box-shadow: .3rem .3rem #0d0817; }
.work-dark .gallery a { border-color: var(--line); background: #332543; }
.folder-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 1.25rem;
  height: .85rem;
  border: 1px solid #795018;
  border-radius: .125rem;
  background: linear-gradient(#ffe8a6, #ffc56d);
}
.folder-icon::before { content: ""; position: absolute; left: -1px; top: -.25rem; width: .55rem; height: .25rem; border: 1px solid #795018; border-bottom: 0; border-radius: .125rem .125rem 0 0; background: #ffe8a6; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1.5rem 1rem; padding: clamp(.8rem, 3vw, 1.5rem); }
.gallery figure { margin: 0; min-width: 0; }
.gallery a { position: relative; display: block; overflow: hidden; border: 1px solid #b5a7c5; border-radius: .15rem; background: #e8def1; }
.gallery a::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: var(--pixel-light);
  clip-path: polygon(0 0, 35% 0, 35% 5%, 19% 5%, 19% 10%, 0 10%, 0 0, 100% 0, 100% 100%, 61% 100%, 61% 95%, 80% 95%, 80% 89%, 100% 89%);
  pointer-events: none;
}
.gallery a:hover::after, .gallery a:focus-visible::after { opacity: .85; }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; transition: transform .3s ease; }
.gallery a:hover img { transform: scale(1.05); }
.gallery figcaption { padding-top: .45rem; font: .875rem/1.4 var(--mono); overflow-wrap: anywhere; }
.archive-viewer {
  max-width: calc(100% - 2rem);
  max-height: calc(100% - 2rem);
  padding: 0;
  overflow: auto;
  color-scheme: light;
  color: #17131f;
}
body:has(.work-dark) .archive-viewer {
  color-scheme: dark;
  color: var(--ink);
  --chrome-bar: var(--chrome-bar-dark);
}
.archive-viewer::backdrop { background: #0e091be8; }
.archive-viewer .archive-heading { padding-block: .65rem; }
.archive-viewer figure { display: grid; justify-items: center; margin: 0; padding: clamp(.55rem, 2vw, 1rem); }
.archive-close { min-height: 2rem; padding: .25rem .55rem; border: 1px solid #827393; border-radius: .2rem; background: var(--chrome-bar); color: inherit; font: .875rem/1.4 var(--mono); cursor: pointer; }
.archive-close:hover { text-decoration: underline; }
.archive-photo { position: relative; max-width: 100%; overflow: hidden; border: 1px solid #827393; border-radius: .15rem; }
.archive-viewer img { display: block; max-width: 100%; max-height: min(72svh, 56rem); object-fit: contain; }
@media (prefers-reduced-motion: no-preference) {
  .archive-viewer[open] .archive-photo img { animation: archive-image-reveal .42s steps(4, end) both; }
  .archive-viewer[open] .archive-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--pixel-light);
    animation: archive-pixels .42s steps(3, end) both;
    pointer-events: none;
  }
  .archive-viewer[open].is-closing .archive-photo { animation: archive-photo-close .28s steps(4, end) both; }
  .archive-viewer[open].is-closing .archive-photo img { animation: none; }
  .archive-viewer[open].is-closing .archive-photo::after {
    background: var(--pixel-dark);
    animation: archive-pixels-out .28s steps(3, end) both;
  }
  @keyframes archive-image-reveal {
    from { opacity: .35; transform: translateX(-.35rem); }
    to { opacity: 1; transform: none; }
  }
  @keyframes archive-pixels {
    0% { opacity: .8; clip-path: polygon(0 5%, 68% 5%, 68% 24%, 100% 24%, 100% 59%, 44% 59%, 44% 89%, 0 89%); }
    55% { opacity: .5; clip-path: polygon(0 29%, 34% 29%, 34% 52%, 100% 52%, 100% 71%, 62% 71%, 62% 82%, 0 82%); transform: translateX(12%); }
    100% { opacity: 0; clip-path: inset(55% 0 45%); transform: translateX(24%); }
  }
  @keyframes archive-photo-close {
    from { opacity: 1; clip-path: inset(0); }
    70% { opacity: .8; clip-path: inset(23% 0 30%); }
    to { opacity: 0; clip-path: inset(49% 0 51%); }
  }
  @keyframes archive-pixels-out {
    from { opacity: 0; clip-path: inset(35% 20% 39%); }
    40% { opacity: .73; clip-path: polygon(0 26%, 73% 26%, 73% 42%, 100% 42%, 100% 61%, 39% 61%, 39% 81%, 0 81%); }
    to { opacity: .9; clip-path: inset(34% 0 35%); transform: translateX(-12%); }
  }
}
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 2rem; }
.profile { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 1.25rem; }
.profile img { width: clamp(5rem, 10vw, 9rem); height: auto; border-radius: .5rem; }
.profile > div { flex: 1 1 15rem; }
.profile p:first-child { margin-top: 0; }
.contact { border-top: 1px solid var(--line); }
.skills {
  margin-block: clamp(1.5rem, 3vw, 2.5rem);
  scroll-margin-top: 6rem;
  --skill-card: #f0e8f6;
  --skill-track: #e0d5eb;
  --skill-fill: repeating-linear-gradient(90deg, transparent 0 .58rem, var(--skill-track) .58rem .72rem), linear-gradient(90deg, #854cb9, #3eaca7);
}
.skill-meters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: clamp(.65rem, 1.6vw, 1.25rem);
  margin: 0;
  padding: clamp(.8rem, 3vw, 1.5rem);
  list-style: none;
}
.skill-meters li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: .6rem .7rem;
  padding: .7rem .75rem;
  border: 1px solid var(--line);
  border-radius: .15rem;
  background: var(--skill-card);
  font: .9rem/1.45 var(--mono);
}
.skill-meters li > span { color: var(--violet); white-space: nowrap; }
.skill-track { grid-column: 1 / -1; padding: 2px; background: var(--skill-track); border: 1px solid var(--line); border-radius: .2rem; }
.skill-meters meter { display: block; width: 100%; height: .6rem; }
.skill-meters meter::-webkit-meter-bar { border: 0; border-radius: 0; background: transparent; }
.skill-meters meter::-webkit-meter-optimum-value { background: var(--skill-fill); }
.skill-meters meter::-moz-meter-bar { background: var(--skill-fill); }
.work-dark .skills {
  --skill-card: #2e2043;
  --skill-track: #171021;
}
.skill-note { margin: 0 clamp(.8rem, 3vw, 1.5rem) clamp(.8rem, 3vw, 1.5rem); padding: .8rem 1rem; border: 1px solid var(--line); border-radius: .15rem; background: var(--skill-card); }
.skill-note h4 { margin: 0; color: var(--violet); font: bold .95rem/1.45 var(--mono); }
.skill-note p { max-width: 65ch; margin: .35rem 0 0; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .skills-entered li:nth-child(2) { --skill-delay: 55ms; }
  .skills-entered li:nth-child(3) { --skill-delay: 110ms; }
  .skills-entered li:nth-child(4) { --skill-delay: 165ms; }
  .skills-entered li:nth-child(5) { --skill-delay: 220ms; }
  .skills-entered li:nth-child(6) { --skill-delay: 275ms; }
  .skills-entered li:nth-child(7) { --skill-delay: 330ms; }
  .skills-entered li:nth-child(8) { --skill-delay: 385ms; }
  .skills-entered li:nth-child(9) { --skill-delay: 440ms; }
  .skills-entered li { animation: skill-arrival .45s ease-out var(--skill-delay, 0ms) backwards; }
  .skills-entered meter { animation: skill-fill .75s ease-out var(--skill-delay, 0ms) backwards; }
  @keyframes skill-arrival {
    from { opacity: .65; transform: translateY(.5rem); }
    to { opacity: 1; transform: none; }
  }
  @keyframes skill-fill {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0); }
  }
}
.contact h2 { color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: clamp(3rem, 9vw, 9rem); }
.contact .text-link { margin-inline-start: .65rem; }
footer { border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
@media (max-width: 720px) {
  .top { flex-wrap: wrap; }
  nav { flex-wrap: wrap; column-gap: .7rem; }
  .hero-layout, .projects, .project:last-child, .split { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: clamp(1.95rem, 12.3vw, 5.5rem); }
  .project:nth-child(2) { margin-top: 0; }
  .work-index a { padding-inline: .5rem; }
  .case-art, .case-art.mural { aspect-ratio: 1.55; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery img { transition: none; }
}

.code-portrait {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
}
.code-portrait h2 { font-size: clamp(2.5rem, 6vw, 6rem); }
.code-portrait p { max-width: 37ch; color: var(--muted); }
.portrait-mode { margin: .4rem 0; background: transparent; color: var(--acid); }
.portrait-mode:hover, .portrait-mode[aria-pressed='true'] { background: var(--acid); color: var(--bg); }
.portrait-mode:focus-visible { outline-color: var(--ink); }
.synth-controls {
  margin-top: 1rem;
  padding: clamp(.85rem, 3vw, 1.4rem);
  border: 1px solid var(--line);
  background: #100a1b;
  color: var(--ink);
  font: .9rem/1.6 var(--mono);
}
.synth-controls pre {
  margin: 0 0 1rem;
  overflow: auto;
  color: var(--violet);
  font: inherit;
}
.synth-controls input { display: block; width: 100%; margin: .4rem 0 0; accent-color: var(--acid); }
.portrait-frame {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--violet);
  background: #140d24;
  box-shadow: .35rem .35rem #d3b6ff40;
}
.portrait-frame img, .portrait-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.portrait-frame img { object-fit: cover; }
.portrait-frame canvas { position: absolute; inset: 0; }
@media (max-width: 720px) {
  .code-portrait { grid-template-columns: minmax(0, 1fr); }
}
