:root {
  --surface-radius: 12px;
  --bg:#10171e;
  --panel:#17212c;
  --line:#34414a;
  --text:#e2eae7;
  --muted:#a4b4b9;
  --accent:#96c8a2;
  --navy:#172b4d;
  --dark-card:#14263c;
  --cursor-default:url("assets/rat.png") 5 5, auto;
  --cursor-pointer:url("assets/small\ cheese.png") 5 5, pointer;
  
  --title-size:52px;
  font-family:'DM Mono','Cascadia Code','Courier New',monospace;
  color:var(--text);
  background:var(--bg);
  font-synthesis:none;
}
* {
  box-sizing:border-box
}
html {
  scroll-behavior:smooth;
  scroll-padding-top:30px
}
body {
  margin:0
}
button,a {
  -webkit-tap-highlight-color:transparent
}
button {
  font:inherit
}
a {
  color:inherit;
  text-decoration:none
}
button {
  color:inherit;
  cursor:pointer
}
button:focus-visible,a:focus-visible {
  outline:2px solid var(--accent);
  outline-offset:6px
}
::selection {
  background:var(--accent);
  color:var(--bg)
}
.shell {
  max-width:var(--site-width);
  margin:auto;
  display:grid;
  grid-template-columns:250px minmax(0,1fr)
}
.sidebar {
  height:100dvh;
  position:sticky;
  top:0;
  border-right:1px solid var(--line);
  padding:var(--logo-top) var(--logo-left);
  display:flex;
  flex-direction:column
}
.identity {
  margin-top:72px
}
.eyebrow,.small {
  font-size:10px;
  letter-spacing:1px;
  line-height:1.7
}
.eyebrow {
  color:var(--muted)
}
.identity h2 {
  font-size:17px;
  font-weight:400;
  margin:15px 0 10px
}
.identity p,.sidebar-bottom p {
  color:var(--muted);
  font-size:11px;
  line-height:1.9
}
nav {
  margin-top:43px
}
nav a {
  display:flex;
  justify-content:space-between;
  padding:15px 0;
  font-size:12px;
  color:var(--muted);
  border-bottom:1px solid var(--line)
}
nav a:hover,nav a.active {
  color:var(--accent)
}
.sidebar-bottom {
  margin-top:auto;
  font-size:10px
}
.sidebar-bottom p {
  margin:25px 0
}
.status {
  font-size:10px;
  display:flex;
  align-items:center;
  gap:8px
}
.status i {
  height:6px;
  width:6px;
  border-radius:50%;
  background:var(--accent);
  box-shadow:0 0 10px #96c8a224
}
.muted {
  color:var(--muted)
}
main {
  min-width:0;
  padding:0 50px
}
.topline {
  height:87px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid var(--line);
  font-size:9px;
  letter-spacing:1px;
  color:var(--muted)
}
.hero {
  padding:62px 0 60px
}
.hero-label {
  font-size:11px;
  display:flex;
  gap:10px;
  align-items:center;
  color:var(--muted)
}
.tiny-cross {
  color:var(--accent);
  font-size:20px
}
h1 {
  font-size:clamp(40px,4.6vw,74px);
  line-height:1.18;
  letter-spacing:-4px;
  font-weight:400;
  margin:26px 0 31px
}
em {
  font-style:normal;
  color:var(--accent)
}
.cursor {
  color:var(--accent);
  display:inline-block;
  animation:blink 1.5s steps(1) infinite
}
.hero-bottom {
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:20px
}
.hero-bottom p {
  font-size:13px;
  line-height:1.9;
  color:var(--muted);
  margin:0
}
.text-link {
  font-size:13px;
  display:inline-flex;
  gap:24px;
  align-items:center;
  border-bottom:1px solid var(--accent);
  padding-bottom:8px;
  white-space:nowrap
}
.text-link span {
  color:var(--accent);
  font-size:16px
}
.section-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-top:1px solid var(--line);
  padding:25px 0 23px;
  gap:20px
}
.section-heading h2 {
  font-size:15px;
  font-weight:400;
  margin:0
}
.section-number {
  font-size:10px;
  color:var(--muted);
  margin-right:15px
}
sup {
  font-size:9px;
  color:var(--muted);
  vertical-align:top
}
.work-controls {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:0 0 25px;
  gap:15px
}
.filters {
  display:flex;
  gap:6px
}
.filters button {
  background:transparent;
  border:1px solid transparent;
  padding:8px 11px;
  font-size:10px;
  color:var(--muted)
}
.filters button.selected {
  border-color:var(--line);
  background:#172b4d;
  color:var(--accent)
}
.filters button:hover {
  color:var(--text)
}
.filters span {
  font-size:8px;
  margin-left:8px;
  opacity:.6
}
.project-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:30px 22px
}
.project {
  padding:0;
  background:none;
  border:0;
  text-align:left;
  min-width:0
}
.project[hidden] {
  display:none
}
.project.wide {
  grid-column:1/-1
}
.art {
  height:310px;
  position:relative;
  overflow:hidden;
  transition:filter .3s
}
.project:hover .art {
  filter:brightness(1.08)
}
.project:hover h3 span {
  transform:translate(3px,-3px);
  color:var(--accent)
}
.card {
  background:var(--accent);
  color:var(--navy);
  padding:35px
}
.dark-card {
  background:var(--dark-card);
  padding:35px;
}
.art-top,.art-foot {
  position:absolute;
  left:23px;
  right:23px;
  display:flex;
  justify-content:space-between;
  font-size:9px;
  letter-spacing:1px;
  z-index:2
}
.art-top {
  top:23px;
  font-weight:500
}
.art-top span {
  font-size:6px;
  letter-spacing:.5px
}
.card-title {
  font-family:Georgia,serif;
  font-size:var(--title-size);
  line-height:.95;
  position:relative;
  z-index:2;
  letter-spacing:-2px;
  margin-top:41px
}
.card-title i {
  font-weight:400
}
.art-foot {
  bottom:21px;
  font-size:7px
}
.project-meta {
  padding:17px 0 0;
  display:flex;
  justify-content:space-between;
  gap:12px
}
.project-meta .small {
  font-size:9px
}
.project-meta h3 {
  font-size:17px;
  letter-spacing:-.4px;
  font-weight:400;
  margin:9px 0
}
.project-meta h3 span {
  display:inline-block;
  font-size:16px;
  transition:transform .2s
}
.project-meta p {
  color:var(--muted);
  font-size:13px;
  line-height:1.7;
  margin:0
}
.project-year {
  font-size:13px;
  color:var(--muted);
  padding-top:3px
}
/* wide cards share the same height and text layout as the other artwork */
.card-wide {
  background:var(--dark-card);
  padding:35px;
}
.about {
  margin-top:62px
}
.about-grid {
  display:grid;
  grid-template-columns:1.1fr 1fr;
  gap:65px;
  padding:9px 0 48px
}
.about-intro {
  font-size:24px!important;
  line-height:1.4!important;
  color:var(--text)!important;
  letter-spacing:-1px;
  margin:0 0 21px!important
}
.about-body p {
  font-size:13px;
  line-height:1.95;
  color:var(--muted);
  margin:12px 0;
}
.about .underline {
  text-decoration: underline;
}
.toolbox {
  padding-top:4px
}
.skill-row {
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:17px 0;
  border-bottom:1px solid var(--line);
  font-size:9px
}
.skill-row span:first-child {
  color:var(--muted)
}
.skill-row span:last-child {
  text-align:right
}
.now {
  margin-top:26px
}
.now .status {
  font-size:8px;
  letter-spacing:1px;
  color:var(--muted)
}
.now p {
  font-size:10px
}
.contact-main {
  display:grid;
  grid-template-columns:1.1fr 1fr;
  gap:50px;
  align-items:center;
  padding:12px 0 59px
}
.contact h3 {
  font-size:40px;
  line-height:1.15;
  letter-spacing:-2px;
  font-weight:400;
  margin:0
}
.contact-main p {
  font-size:13px;
  color:var(--muted);
  line-height:1.9
}
.contact-button {
  background:var(--accent);
  color:#101c26;
  display:flex;
  justify-content:space-between;
  padding:15px 17px;
  font-size:13px;
  margin-top:20px
}
.contact-button:hover {
  background:#b2dbbb
}
.copy-email {
  background:transparent;
  border:0;
  padding:14px 0 0;
  font-size:9px;
  color:var(--muted);
  display:flex;
  justify-content:space-between;
  width:100%
}
footer {
  border-top:1px solid var(--line);
  padding:25px 0 30px;
  display:flex;
  justify-content:space-between;
  gap:15px;
  font-size:8px;
  color:var(--muted)
}
footer>span:nth-child(2) {
  font-size:7px;
  letter-spacing:.6px
}
footer a:hover {
  color:var(--accent)
}
dialog {
  background:var(--panel);
  color:var(--text);
  border:1px solid #40546b;
  padding:32px;
  max-width:620px;
  width:calc(100% - 32px);
  max-height:85dvh
}
dialog::backdrop {
  background:#080b08d9;
  backdrop-filter:blur(8px)
}
.dialog-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:35px
}
.dialog-top button {
  border:1px solid var(--line);
  background:transparent;
  font-size:11px;
  padding:8px 10px
}
dialog h2 {
  font-size:36px;
  font-weight:400;
  letter-spacing:-2px;
  margin:12px 0 17px
}
.dialog-summary {
  font-size:15px;
  line-height:1.7;
  color:var(--accent)
}
.dialog-section {
  border-top:1px solid var(--line);
  margin:24px 0;
  padding-top:17px
}
.dialog-section h3 {
  font-size:12px;
  font-weight:400
}
.dialog-section p {
  font-size:11px;
  line-height:1.9;
  color:var(--muted)
}
.sr-only,.skip:not(:focus) {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap
}
.skip:focus {
  position:fixed;
  top:10px;
  left:10px;
  background:var(--accent);
  color:#10171e;
  z-index:9;
  padding:10px
}
@keyframes blink {
  50% {
    opacity:0
  }
}
@media(min-width:1450px) {
  main {
    padding:0 70px
  }
  .art {
    height:350px
  }
  .form {
    height:280px
  }
}
@media(max-width:1100px) {
  .shell {
    grid-template-columns:205px minmax(0,1fr)
  }
  .sidebar {
    padding:var(--logo-top) var(--logo-left)
  }
  main {
    padding:0 30px
  }
  .hero-bottom {
    align-items:flex-start;
    flex-direction:column
  }
  .art {
    height:270px
  }
  .field-title {
    font-size:43px
  }
  .art-top span {
    display:none
  }
  .about-grid {
    gap:30px
  }
  .form {
    padding:25px
  }
  .form-blocks {
    margin-right:0;
    grid-template-columns:105px 80px;
    grid-template-rows:90px 80px
  }
  .form-copy strong {
    font-size:25px
  }
  .section-heading>.small {
    font-size:8px
  }
  .contact h3 {
    font-size:33px
  }
  .contact-main {
    gap:25px
  }
  footer>span:nth-child(2) {
    display:none
  }
}
@media(max-width:760px) {
  .shell {
    display:block
  }
  .sidebar {
    height:auto;
    position:static;
    border-right:0;
    border-bottom:1px solid var(--line);
    padding:var(--logo-top) var(--logo-left);
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:space-between
  }
  .identity,.sidebar-bottom {
    display:block
  }
  nav {
    margin:0;
    display:flex;
    gap:20px
  }
  nav a {
    font-size:10px;
    border:0;
    padding:0
  }
  nav a>span:last-child {
    display:none
  }
  main {
    padding:0 22px
  }
  .topline {
    height:60px;
    font-size:7px;
    letter-spacing:.4px
  }
  .hero {
    padding:39px 0 40px
  }
  h1 {
    font-size:clamp(33px,7.6vw,57px);
    letter-spacing:-2.5px;
    margin-top:23px
  }
  .hero-bottom p {
    font-size:10px
  }
  .hero-bottom p br {
    display:none
  }
  .hero-bottom {
    gap:23px
  }
  .section-heading {
    padding:22px 0
  }
  .section-heading h2 {
    font-size:13px
  }
  .section-heading>.small {
    display:none
  }
  .work-controls>.small {
    display:none
  }
  .project-grid {
    grid-template-columns:1fr;
    gap:28px
  }
  .project.wide {
    grid-column:auto
  }
  .art {
    height:310px
  }
  .field-title {
    font-size:55px
  }
  .art-top span {
    display:block
  }
  .form {
    height:280px;
    padding:25px;
    gap:10px
  }
  .form-copy strong {
    font-size:24px
  }
  .form-copy>.small {
    font-size:6px
  }
  .form-blocks {
    grid-template-columns:90px 68px;
    grid-template-rows:86px 75px;
    margin-right:-12px
  }
  .b1 {
    font-size:35px
  }
  .b2 {
    font-size:55px
  }
  .b3 {
    gap:3px;
    padding:10px
  }
  .b3 i {
    width:20px;
    height:20px
  }
  .block span {
    font-size:5px;
    left:10px
  }
  .about {
    margin-top:42px
  }
  .about-grid {
    grid-template-columns:1fr;
    gap:24px;
    padding-bottom:32px
  }
  .about-intro {
    font-size:25px!important
  }
  .skill-row {
    font-size:10px
  }
  .contact-main {
    grid-template-columns:1fr;
    gap:20px;
    padding-bottom:38px
  }
  .contact h3 {
    font-size:36px
  }
  .contact-button {
    max-width:380px
  }
  .copy-email {
    max-width:380px
  }
  footer {
    font-size:8px;
    flex-wrap:wrap
  }
  dialog {
    padding:22px
  }
  .dialog-top .eyebrow {
    font-size:8px
  }
}


/* PROJECT LINKS AND OPTIONAL CURSOR */
.project-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
}
.project-action { display: inline-block; margin-top: 14px; color: var(--muted); font-size: 9px; }
.demo-link {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #38516a;
  background: var(--navy);
  font-size: 10px;
  transition: border-color 180ms ease, background 180ms ease;
}
.demo-link:hover { border-color: var(--accent); background: #213957; }
.demo-link span { color: var(--accent); }
.cursor-toggle { border: 0; background: transparent; color: var(--muted); padding: 0; font-size: 9px; }
.cursor-toggle[aria-pressed="true"] { color: var(--accent); }
#dialog-contact { margin-top: 22px; }
@media (hover: hover) and (pointer: fine) {
  html[data-custom-cursor="on"] body { cursor: var(--cursor-default); }
  html[data-custom-cursor="on"] :is(a, button, summary) { cursor: var(--cursor-pointer); }
}

/* EDIT: MOTION - slow, low-opacity breathing and small one-time reveals.
   To remove breathing, set animation below to none.
   Motion is controlled by the manual footer toggle. */
body { min-height: 100vh; }
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(.2,.65,.3,1);
}
.reveal.is-visible, .reveal:focus-within { opacity: 1; transform: translateY(0); }






/* Responsive navigation: content is visible until navigation.js enhances it. */
.sidebar { overflow-y: auto; overscroll-behavior: contain; }
.sidebar-header { position: relative; flex-shrink: 0; height: var(--logo-size); }
.sidebar-content { display: flex; flex-direction: column; flex: 1; min-height: min-content; }
.sidebar-content[hidden], .navigation-toggle[hidden] { display: none; }
.navigation-toggle, .mobile-project-link { display: none; }
@media (max-width: 900px) {
  html { scroll-padding-top: calc(var(--logo-size) + var(--logo-top) * 2 + 16px); }
  .shell { display: block; }
  .sidebar {
    display: block;
    position: static;
    top: 0;
    z-index: 30;
    height: auto;
    max-height: 100vh;
    max-height: 100dvh;
    padding: var(--logo-top) var(--logo-left);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    overflow-y: auto;
    scrollbar-gutter: stable;
  }
  .navigation-ready .sidebar { position: sticky; }
  .sidebar-header { height: var(--logo-size); }
  .navigation-toggle {
    position: absolute;
    right: 0;
    top: calc((var(--logo-size) - 44px) / 2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    min-width: 90px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    color: var(--text);
    background: var(--navy);
    font-size: 11px;
  }
  .hamburger { display: flex; flex-direction: column; gap: 4px; width: 17px; }
  .hamburger i { display: block; height: 1px; width: 17px; background: var(--accent); }
  .navigation-toggle[aria-expanded='true'] .hamburger i:first-child { transform: translateY(5px) rotate(45deg); }
  .navigation-toggle[aria-expanded='true'] .hamburger i:nth-child(2) { opacity: 0; }
  .navigation-toggle[aria-expanded='true'] .hamburger i:last-child { transform: translateY(-5px) rotate(-45deg); }
  .sidebar-content { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
  .sidebar .identity { display: block; margin-top: 0; }
  .sidebar nav { display: block; margin: 18px 0 26px; }
  .sidebar nav a { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
  .sidebar nav a > span:last-child { display: inline; }
  .sidebar .sidebar-bottom { display: block; margin-top: 0; padding-bottom: 8px; }
  .sidebar-bottom p { margin: 16px 0; }
}

/* optional project images; edit the image fields in script.js */
.art.has-project-image { isolation: isolate; }
.art > .project-background {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.art.image-only > :not(.project-background) { display: none; }

/* preserve \n or multiline template strings in project popup descriptions */
.dialog-summary,
.dialog-section [data-section-content] {
  white-space: pre-line;
}

/* images embedded between paragraphs of popup text */
.dialog-inline-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px 0;
  border: 1px solid var(--line);
}

/* links embedded in popup descriptions */
.dialog-inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: .2em;
  overflow-wrap: anywhere;
}

/* responsive design system: edit these shared scales first */
:root {
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
main { padding-inline: clamp(16px, 4vw, 64px); container-type: inline-size; }
.eyebrow, .small, .project-meta .small, .section-number,
.identity p, .sidebar-bottom, .sidebar-bottom p, .status,
.project-year, .topline, footer, .cursor-toggle { font-size: var(--meta-size); }
.identity p, .sidebar-bottom p, .status { line-height: 1.65; }
.sidebar .status { align-items: flex-start; }
.status i { flex-shrink: 0; margin-top: .45em; }
.sidebar .identity { margin-top: 64px; }
.sidebar nav { margin-top: 32px; }
.sidebar nav a, .navigation-toggle { font-size: var(--control-size); min-height: 44px; }
.sidebar nav a { padding-block: 16px; }
.sidebar-bottom p { margin-block: 24px; }
.topline { min-height: 64px; height: auto; padding-block: 8px; letter-spacing: .02em; }
.topline a, footer a, .cursor-toggle { display: inline-flex; align-items: center; min-height: 44px; }
.hero { padding-block: clamp(32px, 6vw, 64px); }
.hero-label { font-size: var(--meta-size); }
h1 {
  font-size: clamp(2rem, 6.5cqi, 4.625rem);
  letter-spacing: -.055em;
  line-height: 1.18;
  margin-block: 24px 32px;
  overflow-wrap: anywhere;
}
.hero-bottom { flex-direction: row; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.hero-bottom p, .project-meta p, .about-body p, .contact-main p {
  font-size: var(--body-size); line-height: var(--body-leading);
}
.hero-bottom p { max-width: 60ch; min-width: 0; flex: 1 1 28rem; }
.text-link { font-size: var(--control-size); min-height: 44px; white-space: normal; gap: 16px; }
.section-heading { padding-block: 24px; gap: 16px; }
.section-heading h2 { font-size: 1.125rem; line-height: 1.5; }
.section-number { margin-right: 12px; }
.work-controls { margin-bottom: 24px; }
.filters { flex-wrap: wrap; gap: 8px; min-width: 0; }
.filters button { font-size: var(--control-size); padding: 12px; min-height: 44px; }
.project-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
  gap: 48px 24px;
}
.project.wide { grid-column: 1 / -1; }
.project { container-type: inline-size; }
.art {
  --art-gutter: clamp(24px, 6cqi, 32px);
  height: auto;
  min-height: clamp(280px, 80cqi, 352px);
  padding: var(--art-gutter);
}
.art-top { position: relative; inset: auto; font-size: var(--meta-size); line-height: var(--meta-leading); letter-spacing: .04em; }
.art-top span { font-size: inherit; }
.card-title {
  font-size: clamp(2rem, 10.5cqi, var(--title-size));
  line-height: 1.05;
  letter-spacing: -.035em;
  margin-top: 32px;
  overflow-wrap: anywhere;
}
.art-foot { left: var(--art-gutter); right: var(--art-gutter); bottom: var(--art-gutter); font-size: var(--meta-size); line-height: var(--meta-leading); }
.project-meta { padding-top: 16px; gap: 12px; }
.project-meta > div { min-width: 0; }
.project-meta h3 { font-size: 1.25rem; line-height: 1.4; margin-block: 8px; overflow-wrap: anywhere; }
.project-year { line-height: 1.6; flex-shrink: 0; padding-top: 0; }
@container (max-width: 30rem) {
  .project-meta { flex-direction: column; }
}
.about { margin-top: 64px; }
.about-body { max-width: 78ch; font-size: var(--body-size); padding-bottom: 48px; }
.about-body p { margin-block: 0 24px; }
.about-intro { font-size: clamp(1.5rem, 3cqi, 1.875rem)!important; margin-bottom: 24px!important; line-height: 1.4!important; }
.contact-main { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 32px; padding-block: 16px 48px; }
.contact h3 { font-size: clamp(1.75rem, 4cqi, 2.5rem); letter-spacing: -.04em; overflow-wrap: anywhere; }
.contact-button { font-size: var(--control-size); padding: 16px; margin-top: 24px; min-height: 44px; gap: 16px; }
.copy-email { font-size: var(--control-size); min-height: 44px; padding-block: 12px; overflow-wrap: anywhere; gap: 12px; }
footer { padding-block: 24px; gap: 16px; flex-wrap: wrap; }
dialog {
  --dialog-padding: clamp(16px, 4vw, 32px);
  padding: 0 var(--dialog-padding) var(--dialog-padding);
  width: calc(100% - 32px);
  max-width: 680px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-top: 88px;
}
.dialog-top {
  position: sticky; top: 0; z-index: 3;
  background: var(--panel);
  margin: 0 calc(-1 * var(--dialog-padding)) 24px;
  padding: 16px var(--dialog-padding);
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.dialog-top .eyebrow { font-size: var(--meta-size); min-width: 0; overflow-wrap: anywhere; }
.dialog-top button { font-size: var(--control-size); min-height: 44px; padding: 12px; flex-shrink: 0; }
dialog h2 { font-size: clamp(1.625rem, 4vw, 2.25rem); line-height: 1.2; letter-spacing: -.04em; margin-block: 0 24px; overflow-wrap: anywhere; }
.dialog-summary, .dialog-section p { font-size: var(--body-size); line-height: var(--body-leading); overflow-wrap: anywhere; }
.dialog-section { margin-block: 32px; padding-top: 24px; }
.dialog-section h3 { font-size: 1rem; font-weight: 500; margin-block: 0 16px; }
.dialog-section p { margin-block: 0; }
.dialog-inline-image { margin-block: 24px; }
#dialog-contact { margin-top: 24px; }
@media (max-width: 900px) {
  .sidebar .identity { margin-top: 0; }
  .sidebar nav { margin-block: 24px; }
  .sidebar-content { margin-top: 24px; padding-top: 24px; }
}
@media (max-height: 500px) and (max-width: 900px) {
  .navigation-ready .sidebar { position: static; }
  html { scroll-padding-top: 16px; }
}

/* project cover palettes: background and text; keyed to project identity.
   uploaded images continue to display normally above these backgrounds. */
.project .art {
  background-color: var(--cover-bg, var(--accent));
  color: var(--cover-text, var(--navy));
}

/* quiet interaction feedback; animate the button separately from its reveal wrapper */
.project-open { transition: transform 180ms ease; }
.project-open:focus-visible { transform: translateY(-2px); }
.project-open:focus-visible .art { filter: brightness(1.08); }
.project-open:focus-visible h3 span { transform: translate(3px, -3px); color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .project-open:hover { transform: translateY(-2px); }
}
.reveal { transition-delay: var(--reveal-delay, 0ms); }
.reveal:focus-within { transition-delay: 0ms; }

/* dividers draw once as their section heading enters the viewport */
.section-heading { position: relative; border-top-color: transparent; }
.section-heading::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--line);
  transform-origin: left;
  transform: scaleX(1);
  transition: transform 400ms ease-out;
}
.section-heading.reveal { opacity: 1; transform: none; }
.section-heading.reveal:not(.is-visible):not(:focus-within)::before { transform: scaleX(0); }



/* fallback sequence without javascript; data attributes select the shuffled palette */
.project:nth-child(3n + 1) { --cover-bg: #96c8a2; --cover-text: #172b4d; }
.project:nth-child(3n + 2) { --cover-bg: #172b4d; --cover-text: #c5dfce; }
.project:nth-child(3n) { --cover-bg: #294c4a; --cover-text: #dce7de; }
.project[data-cover-palette="eton"] { --cover-bg: #96c8a2; --cover-text: #172b4d; }
.project[data-cover-palette="navy"] { --cover-bg: #172b4d; --cover-text: #c5dfce; }
.project[data-cover-palette="teal"] { --cover-bg: #294c4a; --cover-text: #dce7de; }

/* rounded filters with a single sliding selection background */
.filters { position: relative; isolation: isolate; }
.filters button { position: relative; z-index: 1; border-radius: var(--surface-radius); transition: color 180ms ease; }
.filter-highlight {
  position: absolute; top: 0; left: 0; z-index: 0;
  pointer-events: none; border-radius: var(--surface-radius);
  background: var(--navy); border: 1px solid var(--line);
  transition: transform 260ms cubic-bezier(.2,.65,.3,1), width 260ms ease, height 260ms ease;
}
.filters.has-highlight button.selected { background: transparent; border-color: transparent; }
.project-grid { align-content: start; }


/* filters follow the shared manual motion setting */
.filters[data-motion="on"] .filter-highlight {
  transition: transform 360ms cubic-bezier(.2,.65,.3,1), width 360ms ease, height 360ms ease !important;
}
.filters[data-motion="off"] .filter-highlight { transition: none !important; }
.filter-motion-toggle {
  border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: var(--meta-size); min-height: 44px;
  padding: 8px 0; cursor: pointer;
}
.filter-motion-toggle[aria-pressed="true"] { color: var(--accent); }

/* shared timing for interactive motion; background breathing stays slow */
:root {
  --motion-duration: 360ms;
  --motion-lift-duration: 800ms;
  --motion-scroll-duration: 800ms;
  --motion-ease: cubic-bezier(.333333, 1, .666667, 1);
}
:is(.project, .project-open, .project .art, .project-meta h3 span,
    .sidebar, .topline, .hero, .work-controls, .section-heading,
    .about, .contact, footer, .filters button, .demo-link),
.section-heading::before, .reveal, .project.reveal {
  transition-duration: var(--motion-duration);
  transition-timing-function: var(--motion-ease);
}
.filters[data-motion="on"] .filter-highlight {
  transition: transform var(--motion-duration) var(--motion-ease),
    width var(--motion-duration) var(--motion-ease),
    height var(--motion-duration) var(--motion-ease) !important;
}
.project-open { transform-origin: center; }
.project:has(.project-open:focus-visible) { position: relative; z-index: 2; }
.project-open:focus-visible { transform: translateY(-4px) scale(1.015); }
@media (hover: hover) and (pointer: fine) {
  .project:has(.project-open:hover) { position: relative; z-index: 2; }
  .project-open:hover { transform: translateY(-4px) scale(1.015); }
}


/* the site's animation choice also controls lift and section scrolling */
html[data-site-motion="on"] :is(.project-open, .contact #email-link) {
  transition: transform var(--motion-lift-duration) var(--motion-ease) !important;
}
html[data-site-motion="on"] :is(.project-open, .contact #email-link):focus-visible { transform: translateY(-4px) scale(1.015); }
@media (hover: hover) and (pointer: fine) {
  html[data-site-motion="on"] :is(.project-open, .contact #email-link):hover { transform: translateY(-4px) scale(1.015); }
}
html[data-site-motion="off"] :is(.project-open, .contact #email-link) {
  transition: none !important;
  transform: none !important;
}

/* one spacing rule between hero, work, about, and contact */
:root {
  --section-gap: clamp(48px, 5vw, 64px);
  --section-scroll-offset: 30px;
}
html { scroll-padding-top: var(--section-scroll-offset); }
main > section { display: flow-root; }
main > section + section { margin-top: var(--section-gap); }
.hero { padding-bottom: 0; }
.about-body, .about-grid { padding-bottom: 0; }
.about-body > p:last-child { margin-bottom: 0; }

/* keep the unfinished contact area compact until more content is added */
.contact-main { padding-bottom: 24px; }
.contact .construction-note {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px 16px;
  padding-block: 16px;
}
.contact .construction-note h3 { font-size: inherit; letter-spacing: normal; }
.construction-note p { margin: 0; font-size: .875rem; color: var(--muted); }
@media (max-width: 900px) {
  :root { --section-scroll-offset: calc(var(--logo-size) + var(--logo-top) * 2 + 16px); }
}
@media (max-height: 500px) and (max-width: 900px) {
  :root { --section-scroll-offset: 16px; }
}

/* conversation machine: shared navy, accent, and neutral palette */
.conversation-slot { --slot-lcd: #e4e6ce; --slot-ink: var(--navy); --slot-cell: clamp(68px, 12vw, 112px); border-top: 1px solid var(--line); padding-block: 32px 48px; }
.contact .slot-heading h3 { font: inherit; font-size: 1.25rem; letter-spacing: -.02em; line-height: 1.4; margin: 0 0 8px; }
.slot-heading p { color: var(--muted); font-size: var(--body-size); line-height: var(--body-leading); margin: 0 0 24px; }
.slot-console { width: 100%; }
.slot-cabinet { position: relative; border: 1px solid var(--line); padding: clamp(12px, 3vw, 24px); background: #10171e; box-shadow: inset 0 0 0 4px #10171e; min-width: 0; }
.slot-label, .slot-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: var(--meta-size); line-height: var(--meta-leading); color: var(--accent); }
.slot-label { margin-bottom: 16px; }
.slot-footer { margin-top: 16px; }
.slot-reels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; background: var(--slot-ink); border: 3px solid var(--slot-ink); }
.slot-reel { height: var(--slot-cell); overflow: hidden; background: var(--slot-lcd); position: relative; }
.slot-reel::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 10px 14px #10171e14, inset 0 -10px 14px #10171e14; pointer-events: none; }
.slot-strip span { display: flex; align-items: center; justify-content: center; height: var(--slot-cell); font-size: clamp(28px, 6vw, 52px); line-height: 1; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif; }
/* The paper exits at the cabinet edge; slot and ticket share a centreline. */
.slot-paper-feed { position: absolute; z-index: 2; bottom: -3px; left: 50%; transform: translateX(-50%); height: 6px; width: min(352px, calc(100% - 36px)); background: #080f16; border: 1px solid var(--line); pointer-events: none; }
.slot-controls { position: relative; height: 88px; margin-top: 12px; }
.slot-controls .slot-lever { position: absolute; right: 0; top: 0; height: 88px; }
.slot-lever { position: relative; height: 160px; width: 48px; padding: 0; border: 0; background: none; touch-action: manipulation; }
.slot-lever-shaft { position: absolute; width: 8px; height: 44px; left: 20px; top: 26px; background: var(--muted); transform-origin: bottom; transition: transform 250ms ease; }
.slot-lever-knob { position: absolute; z-index: 2; width: 32px; height: 32px; left: 8px; top: 10px; border: 3px solid var(--line); background: var(--accent); border-radius: 50%; transition: transform 250ms ease; box-shadow: inset -4px -4px #172b4d25; }
.slot-lever-base { position: absolute; width: 24px; height: 18px; top: 62px; left: 12px; background: var(--line); border: 1px solid var(--muted); }
.slot-lever-label { position: absolute; bottom: 8px; left: 0; width: 100%; font-size: var(--meta-size); color: var(--accent); }
.slot-lever.is-pulled .slot-lever-knob { transform: translateY(28px); }
.slot-lever.is-pulled .slot-lever-shaft { transform: scaleY(.35); }
.slot-lever:disabled, .slot-lever[aria-disabled="true"] { cursor: wait; }
.slot-output { width: 100%; display: grid; overflow: hidden; padding: 0 0 8px; }
/* invisible copies of every prompt reserve the tallest ticket at any width. */
.slot-output[data-ready="false"] { visibility: hidden; }
.slot-output > .slot-ticket { grid-area: 1 / 1; }
.slot-output > .slot-email { grid-area: 2 / 1; }
.slot-output .slot-reserve { visibility: hidden !important; animation: none !important; pointer-events: none; }
.slot-output[hidden] { display: none; }
.slot-ticket { width: min(340px, calc(100% - 48px)); margin: 0 auto; padding: 24px 20px; background: #e4e6ce; color: var(--navy); border-bottom: 3px dashed #10171e; }
.slot-ticket-label, .slot-ticket-end { display: block; font-size: var(--meta-size); line-height: var(--meta-leading); }
.slot-ticket-label { border-bottom: 1px dashed var(--line); padding-bottom: 12px; }
.slot-ticket p { font-size: var(--body-size); line-height: var(--body-leading); margin: 16px 0; overflow-wrap: anywhere; }
.slot-email { display: flex; justify-content: space-between; align-items: center; width: min(340px, calc(100% - 48px)); margin: 16px auto 0; min-height: 44px; padding: 12px 16px; background: var(--accent); color: var(--navy); font-size: .875rem; }
.slot-output.is-printing .slot-ticket { animation: ticket-print 650ms cubic-bezier(.2,.65,.3,1) both; }
.slot-output.is-printing .slot-email { animation: ticket-link 300ms ease 500ms both; }
@keyframes ticket-print { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes ticket-link { from { opacity: 0; } to { opacity: 1; } }



.slot-email:hover { background: #b2dbbb; }

/* Equal outer columns keep the home link on the exact content centreline. */
footer { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; }
footer #cursor-toggle { justify-self: start; text-align: left; }
footer > a[href="#home"] { justify-self: center; text-align: center; }
footer .filter-motion-toggle { justify-self: end; text-align: right; }
@container (max-width: 650px) {
  footer { grid-template-columns: minmax(0, 1fr); }
  footer #cursor-toggle, footer > a[href="#home"], footer .filter-motion-toggle { justify-self: center; text-align: center; }
}

/* shared soft corners for project covers and contact actions */
.project-open, .project .art, .contact #email-link, .contact #slot-email {
  border-radius: var(--surface-radius);
}

/* Same dimensions and typography for both contact actions. */
.contact :is(#email-link, #slot-email) {
  min-height: 52px;
  padding: 16px;
  font-size: var(--control-size);
  font-weight: 400;
  line-height: 1.4;
  gap: 16px;
  color: #101c26;
}
.skip:focus { z-index: 100; min-height: 44px; display: inline-flex; align-items: center; }
main[tabindex="-1"]:focus-visible, section[tabindex="-1"]:focus-visible,
header[tabindex="-1"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* The complete slot experience remains animated independently of the site toggle. */
.contact #slot-email { transition: transform var(--motion-lift-duration) var(--motion-ease); }
.contact #slot-email:focus-visible { transform: translateY(-4px) scale(1.015); }
@media (hover: hover) and (pointer: fine) {
  .contact #slot-email:hover { transform: translateY(-4px) scale(1.015); }
}

/* Consistent line boxes for controls and supporting copy at every breakpoint. */
.filters button, .navigation-toggle, .sidebar nav a, .text-link,
.contact-button, .copy-email, .slot-email, .dialog-top button {
  line-height: var(--control-leading);
}
footer, .cursor-toggle, .filter-motion-toggle, .dialog-top .eyebrow {
  font-size: var(--meta-size);
  line-height: var(--meta-leading);
}
.conversation-slot noscript p {
  font-size: var(--body-size);
  line-height: var(--body-leading);
}
