* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root { color-scheme: dark; --gutter: clamp(16px, 4vw, 96px); scroll-behavior: smooth; background: #000; color: #f2f2ed; font-family: Arial, sans-serif; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid #ddd; outline-offset: 5px; }
#intro { position: fixed; inset: 0; z-index: 3; background: #000; display: grid; place-items: center; transition: opacity .62s ease; font: 11px/1 monospace; }
#intro.exiting { opacity: 0; pointer-events: none; }
#letter, #percent { z-index: 1; }
#letter {
  display: grid;
  place-items: center;
  width: clamp(50px, 6vw, 78px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 15px;
}
#percent { position: absolute; left: 50%; transform: translateX(-50%); bottom: max(23px, env(safe-area-inset-bottom)); color: #aaa; font-size: 10px; }
canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 24px var(--gutter);
  background: #101010;
  box-shadow: inset 0 -1px rgba(255, 255, 255, .09);
}
@supports (backdrop-filter: blur(16px)) {
  header {
    background: rgba(12, 12, 12, .84);
    backdrop-filter: blur(16px);
  }
}
.brand { font: 700 13px/1.5 monospace; }
.brand span { color: #aaa; font-weight: 400; }
.contact, .primary, .creative-play, .creative-close, .creative-arrow { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid transparent; box-shadow: inset 0 0 0 .75px var(--cta-outline, #777); border-radius: 999px; white-space: nowrap; font-size: 14px; background: transparent; color: #fff; font-weight: 600; transition: background-color .28s ease, color .28s ease, box-shadow .28s ease; }
#site { position: relative; isolation: isolate; }
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  padding: 88px var(--gutter) 28px;
  isolation: isolate;
  overflow: clip;
}
.composition {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 1fr auto 1fr;
  column-gap: clamp(12px, 2vw, 32px);
  width: 100%;
}
#wordmark {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  text-align: center;
  font: 900 calc((100vw - 2 * var(--gutter)) * .216)/1 Arial, sans-serif;
  letter-spacing: -.072em;
  cursor: default;
  --particle-bleed: clamp(68px, 10vw, 180px);
}
#wordmark #glyphs {
  inset: calc(-1 * var(--particle-bleed));
  width: calc(100% + 2 * var(--particle-bleed));
  height: calc(100% + 2 * var(--particle-bleed));
}
#wordmark.dotted span { opacity: 0; }
.copy {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 3;
  grid-template-columns: subgrid;
  align-items: end;
  align-self: end;
  padding-top: clamp(38px, 8vh, 84px);
}
.copy-text { grid-column: 1 / 9; }
.copy p { margin: 6px 0 0; }
.hero-cta {
  position: relative;
  isolation: isolate;
  grid-column: 9 / -1;
  justify-self: end;
}
.hero-cta .primary {
  position: relative;
  min-height: 52px;
  gap: 7px;
  padding-inline: 29px;
  margin: 0;
}
.cta-face { font-family: monospace; }
.cta-letter { display: inline-grid; vertical-align: baseline; }
.cta-letter > span, .cta-letter::after { grid-area: 1 / 1; }
.cta-letter[data-symbol] > span { visibility: hidden; }
.cta-letter[data-symbol]::after {
  content: attr(data-symbol);
  width: 0;
  min-width: 100%;
  text-align: center;
  font-family: monospace;
  animation: cta-letter-jump .16s ease-out;
}
@keyframes cta-letter-jump {
  from { transform: translateY(-.16em); }
  to { transform: translateY(0); }
}
:is(.contact, .primary, .creative-play, .creative-close, .creative-arrow):is(:focus-visible, :active) {
  background-color: #FFD000;
  --cta-outline: #FFD000;
  color: #000;
}
@media (hover: hover) {
  :is(.contact, .primary, .creative-play, .creative-close, .creative-arrow):hover {
    background-color: #FFD000;
    --cta-outline: #FFD000;
    color: #000;
  }
}
.cta-wave {
  position: absolute;
  inset: 0 11px;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .26s ease;
}
:is(.hero-cta, .creative-play-wrap):has(> :focus-visible) > .cta-wave { opacity: 1; }
@media (hover: hover) {
  :is(.hero-cta, .creative-play-wrap):has(> :hover) > .cta-wave { opacity: 1; }
}
.cta-wave span {
  position: absolute;
  font: 600 9px/1 monospace;
  color: #dfddd7;
  opacity: 0;
}
.cta-wave span:nth-child(5n) { color: #FFD000; }
h2 { font-weight: 600; margin: 0; letter-spacing: -.035em; font-size: clamp(27px, 2.84vw, 43px); line-height: 1.12; }
p { color: #aaa; font-size: clamp(17px, 1.48vw, 22px); line-height: 1.5; }

.portfolio {
  padding: clamp(52px, 8vw, 114px) var(--gutter);
  border-top: 1px solid transparent;
  scroll-margin-top: 92px;
}
.portfolio-filters {
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 28px;
}
.portfolio-filter { position: relative; }
.portfolio-filter > .cta-wave { opacity: 1; }
.portfolio-filters button {
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid #777;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: 600 14px/1.25 Arial, sans-serif;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.portfolio-filters button:focus-visible { outline: 2px solid #ddd; outline-offset: 3px; }
@media (hover: hover) {
  .portfolio-filters button:hover { border-color: #FFD000; }
}
.portfolio-filters button[aria-pressed="true"] {
  border-color: #FFD000;
  background-color: #FFD000;
  color: #000;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 36px);
}
.work-card:has(details[open]) { grid-column: 1 / -1; }
.work-card details {
  border: 1px solid #333;
  border-radius: 14px;
  background: #0b0b0b;
}
.work-summary {
  display: grid;
  cursor: pointer;
  list-style: none;
}
.work-summary::-webkit-details-marker { display: none; }
.work-summary:focus-visible { outline: 2px solid #FFD000; outline-offset: 4px; border-radius: 14px; }
.work-cover {
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: contain;
  border-radius: 13px 13px 0 0;
  background: #eee;
}
.work-caption {
  display: grid;
  gap: 6px;
  position: relative;
  padding: 18px 54px 18px 20px;
}
.work-caption::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #FFD000;
  font-size: 23px;
}
.work-card details[open] .work-caption::after { content: '−'; }
.work-title { font-size: clamp(17px, 1.48vw, 22px); font-weight: 600; }
.work-category, .work-gallery figcaption { color: #aaa; font-size: 14px; }
.work-details { padding: 0 20px 20px; }
.work-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  align-items: start;
  gap: 16px;
}
.work-gallery figure { margin: 0; }
.work-gallery img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  object-position: left center;
  border-radius: 8px;
}
.work-gallery figcaption { margin-top: 8px; }
.portfolio-empty { margin: 0; }
@media (max-width: 580px) {
  .portfolio-filters button { padding-inline: 13px; font-size: 12px; }
  .portfolio-grid { grid-template-columns: minmax(0, 1fr); }
}
.end { scroll-margin-top: 92px; border-top: 1px solid #222; padding: clamp(65px, 12vw, 160px) 5vw; }
@media (max-width: 580px) {
  header { padding: 15px var(--gutter); }
  .copy { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
  .copy-text { grid-column: 1; }
  .hero-cta { grid-column: 2; }
  .hero-cta .primary { padding-inline: 21px; font-size: 12px; }
  .brand span { display: block; font-size: 9px; }
  .contact { padding-inline: 11px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

.pixel-clusters {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.pixel-clusters .pixel-cluster {
  position: absolute;
  width: 24px;
  height: 24px;
  opacity: 0;
  transition: translate .22s ease-out;
}
.pixel-clusters i {
  position: absolute;
  font: 600 9px/1 monospace;
  color: #dfddd7;
}
#site:has(.hero.has-arrived) .pixel-clusters .pixel-cluster {
  animation: spark-pulse var(--spark-duration) var(--spark-delay) infinite;
}
#site:has(.hero.has-arrived) .pixel-clusters i {
  animation: pixel-flicker 1.4s var(--pixel-delay) infinite;
}
@keyframes spark-pulse {
  0%, 100% { opacity: 0; transform: translate(0, 0); }
  12% { opacity: .85; }
  20% { opacity: .46; }
  27% { opacity: .75; }
  52%, 99% { opacity: 0; transform: translate(var(--drift-x), var(--drift-y)); }
}
@keyframes pixel-flicker {
  0%, 100% { opacity: .48; }
  38% { opacity: 1; }
  59% { opacity: .25; }
  82% { opacity: .84; }
}
.slogan-word, .slogan-glyph { display: inline-block; }
.hero.has-arrived .slogan-glyph {
  animation: slogan-arrival .65s calc(var(--letter-index) * 23ms) both,
             slogan-pulse 11s calc(1.8s + var(--letter-index) * 54ms) infinite;
}
@keyframes slogan-arrival {
  from { opacity: 0; transform: translateY(.22em); clip-path: inset(44% 0 39%); }
  55% { opacity: .8; clip-path: inset(12% 0 22%); }
  to { opacity: 1; transform: translateY(0); clip-path: inset(0); }
}
@keyframes slogan-pulse {
  0%, 78%, 88%, 100% { transform: none; text-shadow: none; }
  81% { transform: translateY(-.08em); text-shadow: .045em .06em #a5a29670; }
  84% { transform: translateY(.035em); text-shadow: -.035em -.025em #d4cfc275; }
}
.hero:not(.in-view) .slogan-glyph { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  #site:has(.hero.has-arrived) .pixel-clusters .pixel-cluster,
  #site:has(.hero.has-arrived) .pixel-clusters i,
  .hero.has-arrived .slogan-glyph { animation: none; }
}
.hero.has-arrived #wordmark {
  animation: wordmark-arrival .8s steps(13, end) both, wordmark-pulse 13s 1s infinite;
}
@keyframes wordmark-arrival {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes wordmark-pulse {
  0%, 69%, 75%, 100% { filter: none; }
  71% { filter: brightness(1.42); }
  73% { filter: brightness(.75); }
}
.hero:not(.in-view) #wordmark { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .hero.has-arrived #wordmark { animation: none; }
}

#cursor-trail {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html.custom-cursor, html.custom-cursor * { cursor: none; }
  html.custom-cursor #wordmark { cursor: none; }
  html.custom-cursor #cursor-trail { display: block; }
}

.pixel-clusters .shooting-star-particle {
  position: absolute;
  opacity: 0;
  font: 600 8px/1 ui-monospace, monospace;
  transition: none;
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .shooting-star-particle { display: none; }
}

.creative-card {
  grid-column: 1 / -1;
  min-width: 0;
  border: 1px solid #333;
  border-radius: 18px;
  position: relative;
  isolation: isolate;
  padding: clamp(18px, 4vw, 55px) 0;
}
.creative-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: rgba(0, 0, 0, .48);
  backdrop-filter: blur(16px);
  opacity: .72;
}
.creative-intro, .creative-toolbar {
  margin-inline: clamp(18px, 4vw, 55px);
}
.creative-intro > p { margin: 10px 0 0; }
.creative-brief {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px clamp(24px, 5vw, 80px);
  margin: 24px 0 0;
  padding: clamp(14px, 2vw, 24px);
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  background: rgba(18, 18, 18, .35);
}
.creative-brief dt {
  color: #e2e2e2;
  font-size: clamp(16px, 1.3vw, 18px);
  font-weight: 600;
}
.creative-brief dd {
  margin: 6px 0 0;
  color: #aaa;
  font-size: clamp(14px, 1.14vw, 16px);
  line-height: 1.5;
}
.creative-caption {
  margin: 0;
  color: #aaa;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}
.creative-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-block: 25px 16px;
}
.creative-play-wrap { position: relative; isolation: isolate; margin-inline-start: auto; }
.creative-play { position: relative; gap: 8px; min-width: 138px; }
.creative-play-icon {
  width: 10px;
  height: 12px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.creative-play[aria-pressed="false"] .creative-play-icon {
  clip-path: none;
  background: linear-gradient(to right, currentColor 0 30%, transparent 30% 70%, currentColor 70% 100%);
}
.creative-close:focus-visible, .creative-play:focus-visible, .creative-arrow:focus-visible, .creative-strip button:focus-visible {
  outline: 2px solid #FFD000;
  outline-offset: 3px;
}
.creative-viewport {
  margin-inline: clamp(18px, 4vw, 55px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.creative-viewport::-webkit-scrollbar { display: none; }
.creative-track { display: flex; width: max-content; }
.creative-strip {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 4px 12px 4px 0;
  list-style: none;
}
.creative-strip li { width: clamp(145px, 17vw, 265px); }
.creative-strip button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: #141414;
  cursor: zoom-in;
}
.creative-strip img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  height: auto;
  object-fit: contain;
  border-radius: inherit;
}
.creative-viewer {
  width: min(94vw, 62rem);
  max-height: 96dvh;
  padding: 12px;
  border: 1px solid #444;
  border-radius: 16px;
  background: #101010;
  color: #fff;
}
.creative-viewer::backdrop { background: rgba(0, 0, 0, .87); }
html.custom-cursor .creative-viewer[open],
html.custom-cursor .creative-viewer[open] * { cursor: auto; }
html.custom-cursor .creative-viewer[open] button,
html.custom-cursor .creative-viewer[open] button * { cursor: pointer; }
html.custom-cursor .creative-viewer[open]::backdrop { cursor: default; }
html.custom-cursor:has(.creative-viewer[open]) #cursor-trail { display: none; }
.creative-viewer-action { position: relative; isolation: isolate; }
.creative-viewer-action > .cta-wave { opacity: 1; }
.creative-viewer-action > button { position: relative; }
.creative-close { padding-inline: 14px; }
.creative-arrow {
  width: 44px;
  padding: 0;
  font-size: 21px;
  line-height: 1;
}
.creative-viewer-bar, .creative-viewer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.creative-viewer-nav { justify-content: center; gap: 16px; }
.creative-counter { color: #ddd; font: 14px/1 monospace; }
.creative-full {
  display: block;
  margin: 10px auto;
  width: min(100%, calc(min(76dvh, 100dvh - 160px) * 9 / 16));
  aspect-ratio: 9 / 16;
  object-fit: contain;
}
@media (max-width: 580px) {
  .creative-brief { grid-template-columns: 1fr; gap: 16px; }
}

.social-card .creative-strip img { aspect-ratio: 4 / 5; object-fit: contain; }
.social-card .creative-viewport + .creative-viewport { margin-top: 12px; }
.social-card .creative-full { width: min(100%, calc(min(76dvh, 100dvh - 160px) * 4 / 5)); }

/* Keep both galleries within the viewport, with persistent side navigation. */
.creative-viewport { scroll-behavior: auto; }
.creative-viewer[open] {
  display: grid; grid-template-rows: auto minmax(0,1fr); gap: 12px;
  width: min(92vw, 740px); height: min(88dvh, 820px); max-height: 88dvh;
  overflow: hidden; margin: auto; padding: 14px;
}
.creative-viewer .creative-full, .social-card .creative-viewer .creative-full {
  grid-row: 2; width: calc(100% - 112px); height: 100%; min-height: 0;
  max-width: 100%; max-height: 100%; aspect-ratio: auto; object-fit: contain; margin: 0 auto;
}
.creative-viewer-nav { position: absolute; inset: 60px 14px 14px; justify-content: space-between; align-items: center; pointer-events: none; }
.creative-viewer-nav .creative-viewer-action { pointer-events: auto; }
@media (max-width: 580px) {
  .creative-viewer[open] { width: 96vw; height: 88dvh; padding: 10px; }
  .creative-viewer .creative-full, .social-card .creative-viewer .creative-full { width: calc(100% - 76px); }
  .creative-viewer-nav { inset: 55px 8px 10px; }
  .creative-viewer-nav .creative-arrow { width: 34px; min-width: 0; }
}

/* Website portfolio */
.sites-card .creative-strip li {width:clamp(240px,34vw,520px)}
.sites-card .creative-strip button {border:1px solid #333;color:inherit;text-align:left;transition:border-color .2s}
.sites-card .creative-strip button:hover {border-color:#FFD000}
.site-placeholder {display:flex;flex-direction:column;justify-content:space-between;aspect-ratio:16/10;padding:clamp(14px,2vw,28px);background:#141414;border-radius:9px}
.site-placeholder small {font:12px/1.3 monospace;color:#aaa}
.site-placeholder strong {font-size:clamp(19px,2.5vw,36px);letter-spacing:-.035em}
.sites-card .creative-viewer[open] {width:min(94vw,1100px);height:auto;grid-template-rows:auto auto}
.site-full {width:calc(100% - 112px);margin:auto;min-width:0;display:grid;gap:12px}
.site-full .site-placeholder {max-height:65dvh}
.site-visit {color:#FFD000;text-align:center;padding:10px;text-decoration:none}
@media(max-width:580px){.site-full{width:calc(100% - 76px)}}

/* Prevent scroll chaining from embedded website previews to the portfolio. */
html:has(.creative-viewer[open]), body:has(.creative-viewer[open]) { overflow: hidden !important; overscroll-behavior: none; }
html { scrollbar-gutter: stable; }
.creative-viewer[open], .site-full, .site-full iframe { overscroll-behavior: contain; }

/* Original cursor silhouette without particle animation. */
@media (hover: hover) and (pointer: fine) {
 html, body, #wordmark, a, button, [role='button'], summary, .creative-viewer, .creative-viewer * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='-3 -3 24 24'%3E%3Cpath d='M1 1 L5 17 L8.5 11.1 L15.5 8.8 Z' fill='%230a1019' stroke='%23FFD000' stroke-width='1.55' stroke-linejoin='round'/%3E%3C/svg%3E") 4 4, auto !important; }
}

@media (hover:none), (pointer:coarse) {
 .creative-close:focus-visible:not(:active):not(.tap-feedback), .creative-arrow:focus-visible:not(:active):not(.tap-feedback) {background-color:transparent;color:#fff;--cta-outline:#777;outline:none}
 :is(.contact,.primary,.creative-play,.creative-close,.creative-arrow).tap-feedback {background-color:#FFD000!important;color:#000!important;--cta-outline:#FFD000;transition:background-color .05s,color .05s}
 :is(.hero-cta,.creative-play-wrap):has(> .tap-feedback) > .cta-wave {opacity:1}
}
