:root {
  --primary: #BE3A3A;
  --primary-accent: #E94141;
  --ink: #000000;
  --panel: #272727;
  --paper: #FFFFFF;
  --paper-warm: #F4EFE8;
  --rule: rgba(0,0,0,0.16);
  --rule-inverse: rgba(255,255,255,0.22);
  --pad-page: clamp(20px, 4vw, 56px);
  --font-display: "Neue Haas Grotesk Display Pro", "NeueHaasGroteskDisplay", "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "Neue Haas Grotesk Display Pro", "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --tile-swatch: var(--primary);
}

/* ---------- INTRO ---------- */
#intro {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8vw;
  will-change: transform;
}
#intro-logo {
  width: min(900px, 84vw);
  color: #000;
  display: block;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[data-cursor="blob"], html[data-cursor="blob"] * { cursor: none; }
html[data-cursor="crosshair"], html[data-cursor="crosshair"] * { cursor: crosshair; }

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
html[data-cursor="blob"] button, html[data-cursor="blob"] a { cursor: none; }
html[data-cursor="crosshair"] button, html[data-cursor="crosshair"] a { cursor: crosshair; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
img, svg { display: block; max-width: 100%; }

/* ---------- CURSOR ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}
.cursor-inner {
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: #ffffff;
  will-change: transform;
  transform: scale(1);
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.cursor[data-over="1"] .cursor-inner {
  transform: scale(3.5);
}
html[data-cursor="off"] .cursor,
html[data-cursor="crosshair"] .cursor { display: none; }

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad-page);
  pointer-events: none;
  mix-blend-mode: difference;
  color: var(--paper);
  transition: color .3s ease;
}
.nav > * { pointer-events: auto; }

.nav-mark {
  display: inline-flex;
  align-items: center;
}
.nav-mark img {
  height: 28px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.nav-list {
  display: flex;
  gap: 28px;
}

.nav-link {
  position: relative;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 8px 4px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  height: 32px;
}
.nav-link-inner {
  display: inline-block;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s ease;
}
.nav-link:hover .nav-link-inner { transform: translateY(-2px); }
.nav-link-rule {
  position: absolute;
  left: 0; right: 100%;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  transition: right .4s cubic-bezier(.2,.8,.2,1);
}
.nav-link:hover .nav-link-rule { right: 0; }
.nav-link.is-active .nav-link-rule { right: 0; }

.nav-meta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav-meta-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary-accent);
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(233,65,65,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(233,65,65,0); }
  100% { box-shadow: 0 0 0 0 rgba(233,65,65,0); }
}

/* ---------- META TYPE ---------- */
.meta-label {
  font-family: var(--font-mono); font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.5;
  display: inline-block;
}
.meta-label.inverse { opacity: 0.7; }
.meta-value {
  font-size: 14px;
  letter-spacing: 0.04em;
}
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- FUZZY ---------- */
.fuzzy {
  display: block;
  width: 100%;
}
.fuzzy-svg { width: 100%; }
.fuzzy-svg svg {
  width: 100%;
  height: auto;
  fill: currentColor;
  display: block;
}
html[data-fuzzy="off"] .fuzzy-svg svg { filter: blur(0); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  background: var(--primary-accent);
  color: var(--paper);
  min-height: 100vh;
  padding: 96px var(--pad-page) 56px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0,0,0,0.18) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
}
html[data-grain="on"] .hero::after { opacity: 0.5; }

.hero-meta {
  display: flex;
  gap: 64px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.hero-meta-block { display: flex; flex-direction: column; gap: 6px; }
.hero-meta .meta-label { color: rgba(255,255,255,0.7); opacity: 1; }
.hero-meta .meta-value { color: var(--paper); }

.hero-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 0;
  padding: 0 4vw;
}
.fuzzy-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  will-change: filter, transform;
}
.hero-stage .fuzzy {
  max-width: 1500px;
}

.hero-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  border-top: 1px solid rgba(255,255,255,0.25);
  padding-top: 24px;
}
.hero-tag {
  margin: 0;
  max-width: 520px;
  font-size: 16px;
  line-height: 1.45;
  color: rgba(255,255,255,0.92);
  text-wrap: pretty;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.06em;
  background: transparent;
  color: var(--paper);
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.hero-cta:hover {
  background: var(--paper);
  color: var(--primary);
  border-color: var(--paper);
}
.hero-cta-arrow { transition: transform .3s ease; }
.hero-cta:hover .hero-cta-arrow { transform: translateX(4px); }

.hero-scroll {
  position: absolute;
  right: var(--pad-page);
  bottom: 18px;
  font-family: var(--font-mono); font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.85);
}
.hero-scroll-line {
  width: 64px; height: 1px;
  background: currentColor;
  position: relative;
  overflow: hidden;
}
.hero-scroll-line::after {
  content: "";
  position: absolute;
  inset: 0 70% 0 0;
  background: var(--paper);
  animation: scrollSlide 2.4s ease-in-out infinite;
}
@keyframes scrollSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(420%); }
}

/* ---------- WORK ---------- */
.work {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: 120px var(--pad-page) 96px;
}
.work::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0,0,0,0.05) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0;
  pointer-events: none;
}
html[data-grain="on"] .work::after { opacity: 1; }

.work-headline { padding: 12px 0 48px; }
.work-headline .fuzzy { max-width: 1700px; }

.work-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
  margin-bottom: 40px;
}
.work-filters { display: flex; gap: 6px; }
.work-status {
  font-family: var(--font-mono); font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.chip-count {
  font-family: var(--font-mono); font-weight: 300;
  font-size: 10px;
  opacity: 0.5;
}
.chip:hover { border-color: var(--ink); }
.chip.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.chip.is-active .chip-count { opacity: 0.7; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip-inverse {
  border-color: var(--rule-inverse);
  color: var(--paper);
}
.chip-inverse:hover { border-color: var(--paper); }
.chip-inverse.is-active {
  background: var(--paper);
  color: var(--primary);
  border-color: var(--paper);
}

/* ---------- TILES ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}


.tile {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.tile:hover { transform: translateY(-4px); }

.tile-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--panel);
  overflow: hidden;
  color: var(--paper);
}
.tile[data-tone="paper"] .tile-frame {
  background: var(--paper-warm);
  color: var(--ink);
  border: 1px solid var(--rule);
}
.tile[data-tone="warm"] .tile-frame {
  background: var(--tile-swatch);
  color: var(--paper);
}
.tile[data-tone="ink"] .tile-frame {
  background: var(--panel);
  color: var(--paper);
}

.tile-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .4s ease;
  padding: 28px;
}
.tile:hover .tile-art { transform: scale(1.04); }

.tile-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 18px 20px;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.0) 60%, rgba(0,0,0,0) 100%);
  font-family: var(--font-mono); font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.tile[data-tone="paper"] .tile-overlay { color: var(--ink); }
.tile-id { opacity: 0.7; }
.tile-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}
.tile:hover .tile-open { opacity: 1; transform: translateY(0); }

.tile-meta { display: flex; flex-direction: column; gap: 4px; }
.tile-name {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 18px;
  letter-spacing: 0.005em;
}
.tile-name-year { opacity: 0.4; font-size: 14px; }
.tile-disc {
  font-family: var(--font-mono); font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* ---------- WORK FOOT ---------- */
.work-all-head {
  padding-bottom: 48px;
}

.work-foot {
  margin-top: 64px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--rule);
  padding-top: 28px;
}
.work-foot-label {
  font-size: 14px;
  opacity: 0.55;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 28px;
  letter-spacing: 0.05em;
  text-transform: lowercase;
}
.link-arrow-rule {
  display: inline-block;
  width: 64px;
  height: 1px;
  background: currentColor;
  transition: width .35s cubic-bezier(.2,.8,.2,1);
}
.link-arrow:hover .link-arrow-rule { width: 100px; }
.link-arrow.inverse { color: var(--paper); }

/* ---------- STUDIO ---------- */
.studio {
  background: var(--ink);
  color: var(--paper);
  padding: 140px var(--pad-page) 120px;
  position: relative;
}
.studio-headline {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1100px;
  margin-bottom: 80px;
}
.studio-who {
  max-width: 900px;
  margin-bottom: 32px;
}

.studio-eyebrow {
  font-family: var(--font-mono); font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.5;
}
.studio-h {
  margin: 0;
  font-size: clamp(36px, 4.6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 400;
  text-wrap: pretty;
}
.studio-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.8fr;
  gap: 64px;
  border-top: 1px solid var(--rule-inverse);
  padding-top: 32px;
}
.studio-col { display: flex; flex-direction: column; gap: 18px; }
.studio-col p { margin: 0; line-height: 1.5; opacity: 0.85; max-width: 44ch; text-wrap: pretty; }

.services { display: flex; flex-direction: column; gap: 0; }
.service {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--rule-inverse);
  align-items: baseline;
  transition: padding-left .3s ease;
  cursor: default;
}
.service:hover { padding-left: 12px; }
.service:last-child { border-bottom: 1px solid var(--rule-inverse); }
.service-n {
  font-family: var(--font-mono); font-weight: 300;
  font-size: 11px;
  opacity: 0.5;
  letter-spacing: 0.18em;
}
.service-body { display: flex; flex-direction: column; gap: 6px; }
.service-name { font-size: 22px; letter-spacing: -0.005em; }
.service-desc { opacity: 0.6; font-size: 14px; line-height: 1.5; }

.kpi { margin: 0; display: flex; flex-direction: column; gap: 0; }
.kpi > div {
  display: grid;
  grid-template-columns: 1fr auto;
  border-top: 1px solid var(--rule-inverse);
  padding: 14px 0;
  font-size: 14px;
}
.kpi > div:last-child { border-bottom: 1px solid var(--rule-inverse); }
.kpi dt { opacity: 0.55; margin: 0; }
.kpi dd { margin: 0; font-variant-numeric: tabular-nums; }

/* ---------- CONTACT ---------- */
.contact {
  background: var(--primary);
  color: var(--paper);
  padding: 140px var(--pad-page) 56px;
  position: relative;
}
.contact-headline {
  margin-bottom: 80px;
}
.contact-headline .fuzzy { max-width: 1700px; }

.contact-body {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr;
  gap: 80px;
  align-items: start;
}

.contact-side { display: flex; flex-direction: column; gap: 36px; }
.contact-block { display: flex; flex-direction: column; gap: 8px; }
.contact-block p { margin: 0; line-height: 1.5; opacity: 0.92; }
.contact-link {
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--rule-inverse);
  padding-bottom: 4px;
  align-self: flex-start;
  transition: border-color .3s ease;
}
.contact-link:hover { border-color: var(--paper); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.field { display: flex; flex-direction: column; gap: 10px; }
.field-label {
  font-family: var(--font-mono); font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.7;
}
.field-input {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-inverse);
  color: var(--paper);
  padding: 10px 0 12px;
  font: inherit;
  font-size: 18px;
  outline: 0;
  transition: border-color .3s ease;
}
.field-input::placeholder { color: rgba(255,255,255,0.55); }
.field-input:focus { border-color: var(--paper); }
.field-textarea { resize: vertical; min-height: 90px; }

.submit {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 26px;
  border: 1px solid var(--paper);
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background .3s ease, color .3s ease;
  margin-top: 12px;
}
.submit:hover { background: var(--paper); color: var(--primary); }
.submit-arrow { transition: transform .3s ease; }
.submit:hover .submit-arrow { transform: translateX(4px); }
.submit:disabled { opacity: 0.7; }

.contact-sent {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}
.contact-sent-mark {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid var(--paper);
  display: grid;
  place-items: center;
  font-size: 22px;
}
.contact-sent h3 {
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.01em;
  font-weight: 400;
}
.contact-sent p { margin: 0; line-height: 1.5; max-width: 48ch; opacity: 0.92; }

.contact-foot {
  margin-top: 80px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--rule-inverse);
  padding-top: 20px;
  font-family: var(--font-mono); font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  flex-wrap: wrap;
}

/* ---------- MARQUEE ---------- */
.marquee {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding: 18px 0;
  border-top: 1px solid var(--paper);
}
.marquee-track {
  display: flex;
  gap: 32px;
  white-space: nowrap;
  animation: marquee var(--marquee-speed, 60s) linear infinite;
  width: max-content;
}
.marquee[data-reverse="true"] .marquee-track { animation-direction: reverse; }
.marquee-item {
  display: inline-flex;
  gap: 32px;
  align-items: center;
  font-size: 24px;
  letter-spacing: 0.04em;
  padding-right: 32px;
}
.marquee-dot { color: var(--primary-accent); font-size: 12px; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- MODAL ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modal-in .35s cubic-bezier(.2,.8,.2,1);
}
@keyframes modal-in { from { opacity: 0; } to { opacity: 1; } }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
}
.modal-card {
  position: relative;
  width: min(1100px, 92vw);
  max-height: 86vh;
  overflow: auto;
  background: var(--paper);
  color: var(--ink);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  grid-template-areas:
    "head head"
    "art body"
    "foot foot";
  gap: 36px;
}
.modal-card[data-tone="ink"] { background: var(--panel); color: var(--paper); }
.modal-card[data-tone="ink"] .modal-art { background: var(--paper-warm); color: var(--ink); }
.modal-card[data-tone="warm"] { background: var(--tile-swatch); color: var(--paper); }
.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono); font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.modal-close span:last-child { font-size: 18px; }

.modal-head {
  grid-area: head;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 16px;
  border-bottom: 1px solid currentColor;
}
.modal-id {
  font-family: var(--font-mono); font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
}
.modal-title {
  margin: 0;
  font-size: clamp(36px, 4vw, 64px);
  letter-spacing: -0.02em;
  font-weight: 400;
}
.modal-meta {
  display: flex;
  gap: 12px;
  font-family: var(--font-mono); font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.7;
}

.modal-art {
  grid-area: art;
  aspect-ratio: 1 / 1;
  background: var(--panel);
  color: var(--paper);
  overflow: hidden;
  position: relative;
}

.modal-body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.modal-col { display: flex; flex-direction: column; gap: 8px; }
.modal-col p { margin: 0; line-height: 1.5; max-width: 60ch; }

.bare-list { display: flex; flex-direction: column; gap: 6px; }
.bare-list li {
  border-bottom: 1px dashed currentColor;
  padding: 6px 0;
  opacity: 0.85;
}

.modal-foot {
  grid-area: foot;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid currentColor;
  padding-top: 20px;
}
.modal-foot .link-arrow { font-size: 22px; }

@media (max-width: 920px) {
  .nav-list { display: none; }
  .work-grid { grid-template-columns: 1fr; }
  .studio-grid { grid-template-columns: 1fr; gap: 36px; }
  .contact-body { grid-template-columns: 1fr; gap: 40px; }
  .modal-card {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "art" "body" "foot";
    padding: 28px;
  }
  .hero-foot { grid-template-columns: 1fr; }
}

/* =====================================================================
   DAMIR SHAIKHULLIN — portfolio additions on top of the ULLIN system
   ===================================================================== */

#intro-logo svg { width: 100%; height: auto; display: block; }

/* ---------- NAV ---------- */
.nav-mark-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.nav-right { display: flex; align-items: center; gap: 36px; }

/* ---------- HERO ---------- */
.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 10px;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--paper);
  animation: pulseWhite 1.8s infinite;
}
@keyframes pulseWhite {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
  70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.boil { display: grid; color: inherit; justify-items: start; }
.hero .boil { justify-items: stretch; }
.boil > .boil-frame { grid-area: 1 / 1; visibility: hidden; }
.boil > .boil-frame.is-on { visibility: visible; }

/* ---------- TILES (real project imagery) ---------- */
.tile-art { padding: 0; place-items: stretch; }
.tile-img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.tile-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 40%);
  color: var(--paper);
}
.tile[data-tone="paper"] .tile-overlay { color: var(--paper); }
.tile-name-text { font-weight: 600; letter-spacing: 0.02em; }
.work-headline .fuzzy { color: var(--ink); }

/* ---------- ABOUT ---------- */
.portrait {
  margin: 0;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--panel);
}
.portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter .6s ease, transform .8s cubic-bezier(.2,.8,.2,1);
}
.portrait:hover img { filter: grayscale(0); transform: scale(1.03); }

.service-role { font-size: 15px; opacity: 0.85; }
.service-when {
  font-family: var(--font-mono); font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-accent);
}

.studio-sub { margin-top: 18px; }
.edu {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: start;
  border-top: 1px solid var(--rule-inverse);
  border-bottom: 1px solid var(--rule-inverse);
  padding: 16px 0;
}
.edu img { width: 64px; height: 64px; object-fit: cover; filter: grayscale(1); }
.edu-body { display: flex; flex-direction: column; gap: 6px; }
.edu-school { font-size: 16px; line-height: 1.3; }
.edu-degree { font-size: 13px; line-height: 1.45; opacity: 0.6; }
.edu-when {
  font-family: var(--font-mono); font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--primary-accent);
}

.studio-grid-2 {
  grid-template-columns: 1.4fr 1fr;
  margin-top: 96px;
}
.skill-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.skill { cursor: default; }
.skill:hover { background: var(--primary-accent); border-color: var(--primary-accent); }

/* ---------- CONTACT ---------- */
.contact-headline .fuzzy { color: var(--paper); }
.contact-row { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.contact-link-sm { font-size: clamp(18px, 1.7vw, 26px); word-break: break-all; }

/* ---------- MODAL ---------- */
.modal-card {
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "head head head"
    "art art art"
    "body body body"
    "foot foot foot";
}
.modal-art {
  aspect-ratio: 16 / 9;
  background: #111;
}
.modal-body {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.8fr;
  gap: 40px;
}
.gallery { position: absolute; inset: 0; }
.gallery img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .6s ease;
}
.gallery img.is-on { opacity: 1; }
.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  color: var(--paper);
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  font-size: 18px;
  transition: background .25s ease, color .25s ease;
}
.gallery-btn:hover { background: var(--paper); color: var(--ink); }
.gallery-prev { left: 18px; }
.gallery-next { right: 18px; }
.gallery-count {
  position: absolute;
  left: 20px; bottom: 16px;
  color: var(--paper);
  font-family: var(--font-mono); font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.18em;
}

@media (max-width: 920px) {
  .nav-right { gap: 0; }
  .studio-grid-2 { grid-template-columns: 1fr; margin-top: 56px; }
  .modal-card { grid-template-columns: 1fr; grid-template-areas: "head" "art" "body" "foot"; }
  .modal-body { grid-template-columns: 1fr; gap: 24px; }
  .modal-art { aspect-ratio: 4 / 3; }
  .hero-meta { gap: 28px; }
  .work-foot { flex-direction: column; }
  .link-arrow { font-size: 22px; }
  .modal-foot { flex-direction: column; gap: 14px; }
}
.studio-who { color: var(--paper); max-width: none; }
.studio-who .fuzzy-svg svg { width: 100%; height: auto; display: block; }

/* Section headlines: cropped to the glyphs, flush left, one shared scale */
:root { --fz-unit: clamp(0.21px, 0.034vw, 0.6px); }
.fuzzy-fit {
  width: calc(var(--fz-w, 1400) * var(--fz-unit));
  max-width: 100%;
}
.fuzzy-fit svg { width: 100%; height: auto; display: block; }
.work-headline .fuzzy,
.contact-headline .fuzzy,
.studio-who { max-width: none; margin-left: 0; }

/* Designed square covers fill the tile exactly (no parallax overscan) */
.tile-img.tile-cover { height: 100%; }
.tile-overlay { background: none; }
.tile[data-tone="paper"] .tile-overlay { color: var(--ink); }

/* Gallery: fixed-height stage (image fits inside, no fill), controls bar below */
.modal-art { aspect-ratio: auto; background: none; overflow: visible; }
.gallery { position: static; display: flex; flex-direction: column; gap: 18px; }
.gallery-stage {
  position: relative;
  height: min(64vh, 640px);
  touch-action: pan-y;
  user-select: none;
}
.gallery-stage img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .5s ease;
}
.gallery-stage img.is-on { opacity: 1; }
.gallery-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.gallery-btn {
  position: static;
  transform: none;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  backdrop-filter: none;
  font-size: 18px;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.gallery-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.gallery-count {
  position: static;
  min-width: 72px;
  text-align: center;
  color: var(--ink);
  background: none;
  backdrop-filter: none;
  padding: 0;
  font-family: var(--font-mono); font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.18em;
}
@media (max-width: 920px) {
  .modal-art { aspect-ratio: auto; }
  .gallery-stage { height: auto; aspect-ratio: 4 / 3; }
  .gallery-btn { width: 44px; height: 44px; font-size: 16px; }
}

/* ---------- CASE STORY (expandable) ---------- */
.story { display: flex; flex-direction: column; gap: 14px; }
.story-body {
  position: relative;
  overflow: hidden;
  transition: max-height .6s cubic-bezier(.2,.8,.2,1);
}
.story.has-more:not(.is-open) .story-body::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 110px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), var(--paper));
  pointer-events: none;
}
.story-body p { margin: 0; line-height: 1.55; max-width: 62ch; }
.story-lead { font-size: 17px; margin-bottom: 22px !important; }
.story-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
}
.story-n {
  font-family: var(--font-mono); font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--primary-accent);
  padding-top: 4px;
}
.story-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.story-step p { opacity: 0.8; font-size: 15px; }
.story-toggle {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background .25s ease, color .25s ease;
}
.story-toggle:hover { background: var(--ink); color: var(--paper); }
.story-toggle-arrow { transition: transform .35s ease; }
.story.is-open .story-toggle-arrow { transform: rotate(180deg); }

/* ---------- ABOUT: bio + index on top, full-width experience below ---------- */
.studio-grid-top { grid-template-columns: 1.3fr 1fr; gap: 96px; }
.bio { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 32px; align-items: start; }
.bio .portrait { max-width: none; }
.bio p { font-size: 17px; }

.experience {
  margin-top: 96px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.jobs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-inverse); }
.job {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) 2fr;
  gap: 48px;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule-inverse);
}
.job-head { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: baseline; }
.job-title { display: flex; flex-direction: column; gap: 8px; }
.job-title .service-name { font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -0.01em; }
.job-main { display: flex; flex-direction: column; gap: 18px; }
.job-desc { margin: 0; font-size: 18px; line-height: 1.5; max-width: 68ch; opacity: 0.9; }
.job-details {
  overflow: hidden;
  transition: max-height .6s cubic-bezier(.2,.8,.2,1);
}
.job-details-inner { display: flex; flex-direction: column; gap: 28px; padding-top: 6px; }
.job-about { margin: 0; line-height: 1.6; max-width: 72ch; opacity: 0.75; }
.job-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.job-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; }
.job-list li {
  position: relative;
  padding: 12px 0 12px 22px;
  border-top: 1px solid var(--rule-inverse);
  font-size: 14.5px;
  line-height: 1.55;
  opacity: 0.82;
}
.job-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 21px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary-accent);
}
.job-toggle {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--rule-inverse);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.job-toggle:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.job.is-open .story-toggle-arrow { transform: rotate(180deg); }

@media (max-width: 920px) {
  .studio-grid-top { grid-template-columns: 1fr; gap: 48px; }
  .bio { grid-template-columns: 1fr; }
  .bio .portrait { max-width: 340px; }
  .experience { margin-top: 64px; }
  .job { grid-template-columns: 1fr; gap: 18px; padding: 28px 0; }
  .job-lists { grid-template-columns: 1fr; gap: 24px; }
  .job-desc { font-size: 16px; }
}

/* Lists without index numbers */
.job-head { grid-template-columns: 1fr; }
.service { grid-template-columns: 1fr; }
.edu-list .edu + .edu { border-top: 0; }

/* ---------- GALLERY: tap to expand ---------- */
.gallery-stage { cursor: zoom-in; }
.gallery-expand {
  position: absolute;
  right: 14px; top: 14px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: var(--paper);
  font-size: 18px;
  opacity: 0;
  transform: scale(.9);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.gallery-stage:hover .gallery-expand { opacity: 1; transform: scale(1); }
@media (hover: none) { .gallery-expand { opacity: 1; transform: none; width: 34px; height: 34px; font-size: 15px; } }

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #080808;
  color: var(--paper);
  animation: lightbox-in .35s cubic-bezier(.2,.8,.2,1);
}
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 20px var(--pad-page);
  font-family: var(--font-mono); font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule-inverse);
}
.lightbox-title { opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lightbox-count { opacity: 0.8; }
.lightbox-close {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.lightbox-close span:last-child { font-size: 20px; }
.lightbox-stage {
  position: relative;
  min-height: 0;
  margin: 24px var(--pad-page);
  touch-action: pan-y;
  user-select: none;
}
.lightbox-stage img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(.985);
  transition: opacity .45s ease, transform .6s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}
.lightbox-stage img.is-on { opacity: 1; transform: scale(1); }
.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 0 var(--pad-page) 28px;
}
.lightbox-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid var(--rule-inverse);
  color: var(--paper);
  font-size: 18px;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.lightbox-btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.lightbox-dots { display: flex; gap: 8px; }
.lightbox-dots span {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.3);
  transition: width .35s cubic-bezier(.2,.8,.2,1), background .35s ease;
}
.lightbox-dots span.is-on { width: 22px; background: var(--primary-accent); }
@media (max-width: 920px) {
  .lightbox-head { grid-template-columns: 1fr auto; padding: 16px 20px; }
  .lightbox-count { display: none; }
  .lightbox-stage { margin: 12px 0; }
  .lightbox-bar { padding-bottom: 22px; gap: 22px; }
  .lightbox-btn { width: 46px; height: 46px; font-size: 16px; }
}
