:root {
  --paper: #F6F7EB;
  --paper-2: #F3EDE3;
  --ink: #1a1612;
  --ink-soft: #4a433a;
  --rule: #cfc3ae;
  --clay: #b5522a;
  --olive: #3f5344;
  --moss: #d8e0c8;
  --shadow: 0 18px 40px rgba(26, 22, 18, 0.12);
  --display: "Fraunces", "Times New Roman", serif;
  --sans: "Bricolage Grotesque", "Avenir Next", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --page-pad: clamp(1.1rem, 3.8vw, 3.4rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: url("../assets/bg2.png");
  /*background: var(--paper);*/
  color: var(--ink);
  font-family: var(--sans);
  font-optical-sizing: auto;
  font-size: 1.05rem;
  line-height: 1.55;
  letter-spacing: -0.012em;
  background-color: rgba(255,255,255,0.7);
  background-blend-mode: screen;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.store-images {
  display: block;
  width: 200px;
  height: auto;
}

.app-access{
  display:flex;
  flex-direction: row;
  gap: 3rem;
  justify-content: center;
}

.motif-border {
  border: 10px solid transparent;
  padding: 15px;
  border-image: url("../assets/border.png") 6 round;
  background: var(--paper);
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0.18;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.site-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem var(--page-pad);
  background: color-mix(in srgb, var(--paper) 75%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.mark {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.9rem, 2.4vw, 1.8rem);
}

.site-nav a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--clay);
}

.status-chip {
  display: flex;
  margin: 0;
  justify-self: end;
  padding: 0.28rem 0.7rem 0.22rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  align-items: center;

}

.hero,
.work,
.practice,
.contact {
  padding: 0 var(--page-pad);
}

.contact {
  margin-top: 2.6rem;
  padding-bottom: 2rem;
}

#work,
#practice,
#contact {
  scroll-margin-top: 4.6rem;
}

.hero {
  padding-top: clamp(1.4rem, 3vw, 2.4rem);
  margin-bottom: 2rem;
}

.bento {
  display: grid;
  gap: 0.85rem;
}

.hero.bento {
  grid-template-columns: 1.7fr 0.9fr;
  grid-template-rows: auto auto;
}

.tile {
  background: var(--paper-2);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  padding: clamp(1.1rem, 2.4vw, 1.9rem);
}

.tile--intro {
  grid-row: 1 / span 2;
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  padding: clamp(1.6rem, 4vw, 3.2rem) clamp(1.4rem, 3.4vw, 2.8rem);
  border-radius: 2.4rem 0.35rem 2.4rem 0.6rem;
}

.kicker {
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.72;
}

h1 {
  margin: 0;
  max-width: 14ch;
  font-family: var(--display);
  font-size: clamp(2.4rem, 6.2vw, 5.1rem);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

h1 em {
  font-style: italic;
  font-weight: 500;
  color: #f0c9a0;
}

.lede {
  max-width: 42ch;
  margin: 1.6rem 0 0;
  color: color-mix(in srgb, var(--paper) 82%, #c9b89a);
  font-size: 1.05rem;
}

.tile--now {
  border-radius: 0.4rem 1.8rem 0.4rem 1.4rem;
  background: var(--paper-2);
}

.tile--note {
  border-radius: 1.6rem 0.3rem;
  background: #f7f1e4;
}

.tile-label {
  margin: 0 0 0.7rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.now-line {
  margin: 0;
  font-family: var(--display);
  font-size: 1.7rem;
  line-height: 1.1;
}

.now-clock {
  margin: 0.55rem 0 0.9rem;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.now-clock time {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.08rem 0.4rem;
  background: var(--ink);
  color: var(--paper);
}

.now-note,
.tile--note p {
  margin: 0;
  color: var(--ink-soft);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  padding: 1rem 1rem 1rem;
  margin: 2rem 0 1rem 0;
  background: var(--paper);
  border-radius: 12px;
  border: 3px solid color-mix(in srgb, var(--ink) 60%, transparent);
}

.section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.5vw, 2.7rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  max-width: 32ch;
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-align: right;
}

/* ---- Case studies: hover-to-preview accordion ------------------------- */
.case-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.case-row {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  padding: 1.15rem 1.4rem;
  border-radius: 1.6rem 0.4rem 1.6rem 0.4rem;
  background: var(--moss);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.3s ease, padding 0.35s ease, box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.case-row:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}

.case-row .case-preview {
  flex: 0 0 auto;
  width: 0;
  opacity: 0;
  overflow: hidden;
  transition: width 0.35s ease, opacity 0.25s ease;
}

.case-row.is-expanded {
  background: var(--paper-2);
  border: 1px dashed var(--rule);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
}

.case-row.is-expanded .case-preview {
  width: 168px;
  opacity: 1;
}

.case-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.case-details {
  display: flex;
  flex-direction: column;
  align-items: left;
  gap: .2rem;
  min-width: 0;
}

.case-title {
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.is-expanded .case-title {
  font-size: 2rem;
}

.case-subtitle {
  font-family: var(--mono);
  font-size: .8rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.is-expanded .case-subtitle {
  font-size: 1rem;
}

@media (max-width: 640px) {
  .case-row {
    flex-wrap: wrap;
  }
  .case-row.is-expanded .case-preview {
    width: 100%;
    order: -1;
    margin-bottom: 0.4rem;
  }

  .case-switch {
    grid-template-columns: 1fr;
  }
  .case-switch-link--next {
    text-align: left;
    align-items: flex-start;
  }

  /* Defensive: scoped extra class so this can't lose a specificity tie
     with the base .case-tiles--lead rule, the way .nav-toggle once did. */
  .case-body .case-tiles--lead {
    grid-template-columns: 1fr;
  }

  .app-access{
    flex-direction: column;
    gap: 1rem;
  }
}

.bento--practice {
  grid-template-columns: 1fr 1.2fr;
  grid-template-rows: auto auto;
  margin-bottom: 2rem;
}

.image-gallery{
  display: flex;
  flex-direction: row;
  gap:2rem;
  justify-content: center;
}

.image-gallery img{
  width: 15vw;
  height: auto;
}

.tile--skills {
  grid-row: 1 / span 2;
  background: var(--olive);
  color: var(--moss);
  border-color: var(--olive);
  border-radius: 0.3rem 2rem 0.4rem 1.6rem;
  --skill-w: 230px;
  --skill-h: 40px;
  --skill-w-sm: 150px;
  --skill-h-sm: 56px;
  --skill-gap: 0.55rem;
  --skill-cols: 2;
  container-type: inline-size;
}

.tile--skills .tile-label {
  color: color-mix(in srgb, var(--moss) 70%, white);
}

.skills-layout {
  display: grid;
  grid-template-columns: minmax(0, calc(var(--skill-cols) * var(--skill-w) + (var(--skill-cols) - 1) * var(--skill-gap))) minmax(160px, 1fr);
  gap: 1.6rem;
  align-items: start;
}

.skill-list,
.interest-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--skill-gap);
  align-items: flex-start;
  align-content: flex-start;
}

.skill {
  flex: 1 1 var(--skill-w);
  height: var(--skill-h);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  padding: 0.38rem 0.75rem 0.32rem;
  border: 1px solid color-mix(in srgb, var(--moss) 45%, transparent);
  border-radius: 999px;
  font-size: 0.92rem;
  font-family: inherit;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, flex-basis 0.2s ease, height 0.2s ease;
}

.skill:hover,
.skill:focus-visible {
  border-color: var(--paper);
}

.skill:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

.skill.is-active {
  border-color: var(--paper);
  background: color-mix(in srgb, var(--paper) 14%, transparent);
  font-weight: 600;
}

.skill--lg {
  font-family: var(--display);
  font-size: 1.35rem;
  font-style: italic;
  border-radius: 1.2rem 0.25rem;
  background: color-mix(in srgb, var(--ink) 22%, transparent);
}

.skill--lg.is-active {
  background: color-mix(in srgb, var(--paper) 18%, color-mix(in srgb, var(--ink) 22%, transparent));
}

/* Skill detail panel — updates on hover/focus/click of any pill above */
.skill-detail {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.skill-detail-pill {
  margin: 0;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  background: var(--paper);
  color: var(--olive);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  transition: opacity 0.15s ease;
}

.skill-detail-desc {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--moss) 82%, white);
  transition: opacity 0.15s ease;
}

.skill-detail.is-updating .skill-detail-pill,
.skill-detail.is-updating .skill-detail-desc {
  opacity: 0;
}

.tile--interests {
  border-radius: 1.8rem 0.35rem;
}

.interest-list li {
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--rule);
  font-size: 0.98rem;
}

.interest-list li:last-child {
  border-bottom: 0;
}

.tile--quote {
  background: var(--clay);
  color: #f8e6d8;
  border-color: var(--clay);
  border-radius: 0.3rem 1.5rem 2.2rem 0.3rem;
}

.tile--quote blockquote {
  margin: 0;
}

.tile--quote p {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-style: italic;
  line-height: 1.2;
}

.tile--contact {
  border-radius: 2.4rem 0.4rem 1.8rem;
  padding: clamp(1.6rem, 4vw, 3rem);
  background: #f7f1e4;
}

.tile--contact h2 {
  margin: 0 0 0.8rem;
  max-width: 24ch;
  font-family: var(--display);
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.72rem 1.15rem 0.62rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.btn--solid {
  background: var(--ink);
  color: var(--paper);
}

.btn--ghost {
  border: 1px solid var(--ink);
}

.btn:hover,
.btn:focus-visible {
  background: var(--clay);
  color: #fff8f2;
  border-color: var(--clay);
}

.site-foot {
  padding: 0.4rem var(--page-pad) 1.8rem;
}

.site-foot p {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
}

@media (max-width: 980px) {
  .hero.bento,
  .bento--practice {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .tile--intro,
  .tile--skills {
    grid-column: auto;
    grid-row: auto;
  }

  .image-gallery {
    flex-wrap: wrap;
    gap: 0rem 1.5rem;
  }

  .image-gallery img{
    width: 20vw;
    height: auto;
  }
}

@media (max-width: 720px) {
  .site-bar {
    grid-template-columns: auto 1fr auto auto;
  }

  .site-bar .nav-toggle {
    display: block;
  }

  .mobile-nav.is-open {
    display: flex;
  }

  .site-nav {
    display: none;
  }

  .hero.bento,
  .bento--practice {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: start;
  }

  .section-head p {
    text-align: left;
  }

  h1 {
    max-width: none;
  }

  .skills-layout {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .case-row,
  .case-row .case-preview,
  .skill-detail-pill,
  .skill-detail-desc {
    transition: none;
  }
}

/* ---- Case study detail pages ------------------------------------------ */
.case-page {
  padding: 0 var(--page-pad) 2rem;
}

.case-hero {
  margin-top: 24px;
  padding: clamp(.5rem, 3.4vw, 1rem) 12px 12px clamp(1.6rem, 3.4vw, 2.6rem);
  border-radius: 12px;
  background-color: rgba(255,255,255,0.7);
}

.case-hero-head {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-top: 0.6rem;
}

.case-hero h1 {
  max-width: 22ch;
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.case-meta {
  display: inline-flex;
  flex-wrap: wrap;
  margin-top: 1.6rem;
  border: 1px solid var(--rule);
  border-radius: 0.6rem;
  overflow: hidden;
}

.case-meta span {
  padding: 0.6rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  border-right: 1px solid var(--rule);
}

.case-meta span:last-child {
  border-right: none;
}

.case-meta span b {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.15rem;
}

#mockups {
  max-width: 420px;
  margin-top: 12px;
  border-radius: 1.4rem 0.35rem 1.4rem 0.35rem;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}

.case-body {
  display: flex;
  flex-direction: column;
}

.case-tiles {
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
}

.case-tile {
  border-radius: 1.4rem 0.3rem 1.4rem 0.3rem;
  margin-top: 2rem;
}

.case-tile img{
  margin-bottom: 1rem;
}

.case-tile--outcome {
  background: var(--moss);
  border-color: var(--moss);
}

.case-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 2.4rem;
}

.case-switch-link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.3rem;
  border-radius: 1.2rem 0.3rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.05rem;
}

.case-switch-link--next {
  text-align: right;
  align-items: flex-end;
}

.case-switch-link:hover,
.case-switch-link:focus-visible {
  border-color: var(--clay);
}

/* Case Studies + Skills & Interests sit side by side above 1750px.
   Below that (anything laptop-sized or smaller) everything stays
   exactly as it already is — same stacked order, same interactions. */
@media (min-width: 1750px) {
  main:not(.case-page) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  /* The <hr> dividers are only needed in the stacked (narrow) layout */
  main > hr {
    display: none;
  }

  .hero.bento {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  #work {
    grid-column: 1;
    grid-row: 2;
    padding-right: clamp(1rem, 2vw, 2rem);
  }

  #practice {
    grid-column: 2;
    grid-row: 2;
    padding-left: clamp(1rem, 2vw, 2rem);
  }

  #contact {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

.intro-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.2rem, 3vw, 2.2rem);
  align-items: start;
}

.intro-photo {
  width: clamp(120px, 24vw, 240px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--paper);
  border-radius: 1.8rem 0.3rem 1.8rem 0.3rem;
  margin-bottom: 12px;
}

.intro-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro-copy {
  min-width: 0;
}

@media (max-width: 560px) {
  .intro-layout {
    grid-template-columns: 1fr;
  }

  .intro-photo {
    width: 240px;
    justify-self: center;
  }

  .intro-layout .kicker {
    text-align: center;
  }
}

/* Case-hero goes two-column once there's room to breathe: info on the
   left, mockup pinned to the right. The gallery filmstrip does the same
   with its two screenshots + intro paragraph. Below this width both
   stay exactly as they already are (stacked). */
@media (min-width: 860px) {
  .case-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    column-gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
  }

  #mockups {
    grid-column: 2;
    justify-self: end;
    margin-top: 0;
  }

  .case-hero h1 {
    font-size: clamp(1.8rem, 3.2vw, 3rem);
  }

  .case-gallery-grid {
    flex-direction: row;
    align-items: stretch;
    flex-wrap: wrap;
  }

  .case-gallery-shots {
    flex-wrap: nowrap;
    flex-shrink: 0;
  }

  .case-gallery-intro {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  line-height: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-dropdown-trigger::after {
  content: "▾";
  font-size: 0.65em;
  transition: transform 0.2s ease;
}

.nav-dropdown-trigger:hover,
.nav-dropdown-trigger:focus-visible,
.nav-dropdown.is-open .nav-dropdown-trigger {
  color: var(--clay);
}

.nav-dropdown.is-open .nav-dropdown-trigger::after {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.9rem);
  left: 50%;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 0.3rem 1rem 0.3rem 1rem;
  box-shadow: var(--shadow);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 30;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  padding: 0.55rem 0.8rem;
  font-family: var(--sans);
  font-size: 0.86rem;
  text-transform: none;
  letter-spacing: normal;
  border-radius: 0.4rem;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
  background: var(--moss);
}

.nav-dropdown-menu a:first-child {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--rule);
  border-radius: 0;
  margin-bottom: 0.3rem;
  padding-bottom: 0.7rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.3rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 4px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
  padding: 0.6rem var(--page-pad) 1rem;
  box-shadow: var(--shadow);
}

.mobile-nav a,
.mobile-nav-group-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: 0.85rem 0.2rem;
  border: none;
  border-bottom: 1px dashed var(--rule);
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: none;
  color: inherit;
  cursor: pointer;
}

.mobile-nav-group-trigger::after {
  content: "▾";
  font-size: 0.7em;
  transition: transform 0.2s ease;
}

.mobile-nav-group.is-open .mobile-nav-group-trigger::after {
  transform: rotate(180deg);
}

.mobile-nav-submenu {
  display: none;
  flex-direction: column;
  padding-left: 0.9rem;
}

.mobile-nav-group.is-open .mobile-nav-submenu {
  display: flex;
}

.mobile-nav-submenu a {
  border-bottom: 1px dashed color-mix(in srgb, var(--rule) 60%, transparent);
  font-family: var(--sans);
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.9rem;
}

.mobile-nav a:last-child,
.mobile-nav-submenu a:last-child {
  border-bottom: none;
}

/* When the "On the job" tile itself doesn't have room for two full-size
   pill columns plus a readable description, drop to one pill column —
   this hands the freed-up space straight to the description panel. */
@container (max-width: 800px) {
  .skills-layout {
    --skill-cols: 1;
  }
}

@container (max-width: 600px) {
  .skills-layout {
    grid-template-columns: 1fr;
  }

  .skills-layout {
    --skill-w: var(--skill-w-sm);
    --skill-h: var(--skill-h-sm);
  }
}

/* ---- Screenshot filmstrip -------------------------------------------- */
.case-gallery {
  margin: 2.2rem 0;
}

.case-gallery-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.case-gallery-shots {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.case-gallery-intro {
  background: var(--paper-2);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 1.4rem 0.3rem 1.4rem 0.3rem;
  padding: clamp(1.5rem, 3vw, 2.2rem);
}

.case-gallery-intro p:last-child {
  margin: 0;
  color: var(--ink-soft);
}

.case-gallery-shot {
  position: relative;
  flex: 0 0 auto;
  width: clamp(150px, 18vw, 220px);
  aspect-ratio: 9 / 16;
  border-radius: 1.2rem 0.3rem 1.2rem 0.3rem;
  overflow: hidden;
}

.case-gallery-shot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.case-gallery-tag {
  position: absolute;
  inset: auto 0 0;
  padding: 0.55rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--moss);
}

/* ---- Asymmetric lead row: wide problem tile + list tile --------------- */
.case-tiles--lead {
  grid-template-columns: 1fr 1fr;
}

/* ---- Readability pass: image + text feature rows ----------------------
   Reuses the existing .case-gallery pattern (shots beside an intro card)
   instead of a separate full-bleed band, so screenshots sit directly next
   to the text they illustrate and the text card never leaves a dead gap:
   .case-gallery-intro grows to fill whatever width the shots don't use. */
.case-gallery--feature {
  margin: clamp(1.4rem, 3vw, 2.2rem) 0;
}

.case-gallery-intro {
  flex: 1 1 320px;
}
/*
.case-gallery--feature .case-gallery-intro {
  max-width: 78ch;
}
*/
.case-gallery--feature .case-gallery-shot {
  width: clamp(130px, 15vw, 190px);
}

/* The help-tray graphic is a short wide crop, not a full portrait phone
   screen — give it its own proportions instead of forcing 9:16. */
.case-gallery-shot--wide {
  width: clamp(200px, 24vw, 280px);
  aspect-ratio: 779 / 748;
}

/* The base gallery sets align-items: stretch (fine when shots + text are
   similar heights, like the top gallery). Here text runs much longer than
   a single phone screenshot, so stretching would force the shot's height
   to match the text and squash the image inside empty space. Keep shots
   pinned to their natural, aspect-ratio-correct size instead. */
.case-gallery--feature .case-gallery-grid {
  align-items: flex-start;
}

.case-def {
  margin: 1.2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}
/*
.case-def > div {
  max-width: 66ch;
}
*/
.case-def dt {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 500;
}

.case-def dd {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
}

.case-def dd ol {
  margin: 0.6rem 0 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}


.case-worklist {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  color: var(--ink-soft);
}

.case-worklist li {
  padding-left: 0.25rem;
}

.case-worklist ul,
.case-worklist ol {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ---- Outcome as a stat strip, not another paragraph tile -------------- */
.case-tile--stats {
  padding: clamp(1.8rem, 4vw, 3rem) clamp(1.6rem, 4vw, 3rem);
}

.case-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin: 1.3rem 0 1.5rem;
}

.case-stat-num {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 500;
  line-height: 1;
}

.case-stat-label {
  margin: 0.4rem 0 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  max-width: 22ch;
}

.case-stat-note {
  margin: 0;
  color: var(--ink-soft);
  max-width: 70ch;
}

/* ---- Custom cursor (mix-blend-mode: difference) -----------------------
   Native `cursor: url()` can't use mix-blend-mode — the OS-drawn pointer
   sits outside the page's paint pipeline. This renders the cursor as a
   real element instead, driven by the mousemove listener in main.js.
   Desktop-with-a-mouse only; touch devices keep their normal pointer. */
.cursor-dot {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none;
  }

  .cursor-dot {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    background-image: url("../assets/cc2.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    mix-blend-mode: difference;
    z-index: 9999;
    will-change: transform;
  }
}

.vert-screenshots{
  display: flex;
  flex-direction: column;
  gap: 2rem;

}