/* tylerpaniagua.com — brutalist index. One accent, hard rules, giant variable type. */
:root {
  --paper: #ecebe6;
  --ink: #0b0b0b;
  --mute: #6d6b64;
  --rule: #0b0b0b;
  --accent: #ff3d00;
  --pad: clamp(14px, 2.2vw, 28px);
  --bar-h: 52px;
  --display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.7, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.45 var(--display);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--ink); }
a { color: inherit; }
img, canvas { display: block; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; text-transform: uppercase; }
.muted { color: var(--mute); }
.ulink { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .3s var(--ease); }
.ulink:hover { background-size: 0 1px; background-position: 100% 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- particle field ---------- */
.pfield { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }

/* ---------- edge rail ---------- */
.rail { position: fixed; right: var(--pad); top: 50%; transform: translateY(-50%); z-index: 81; display: grid; gap: 18px; color: var(--paper); mix-blend-mode: difference; }
.rail::before { content: ""; position: absolute; right: 3px; top: 0; bottom: 0; width: 1px; background: currentColor; opacity: .3; }
.rail-fill { position: absolute; right: 3px; top: 0; bottom: 0; width: 1px; background: currentColor; transform-origin: 50% 0; transform: scaleY(0); }
.rail a { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 10px; text-decoration: none; font-size: 10px; }
.rail a span { opacity: 0; transform: translateX(6px); transition: opacity .3s, transform .3s var(--ease); }
.rail a i { width: 7px; height: 7px; border: 1px solid currentColor; background: var(--ink); transition: background-color .3s, transform .3s var(--ease); }
.rail a.is-on i { background: currentColor; transform: rotate(45deg); }
.rail a.is-on span, .rail a:hover span { opacity: 1; transform: none; }
.work-kicker { margin: 0 0 6px; color: var(--accent); }

/* ---------- grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .11;
  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%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.4 -.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ---------- cursor ---------- */
.cursor { display: none; }
@media (pointer: fine) {
  html.js body, html.js a, html.js button, html.js label { cursor: none; }
  .cursor {
    display: grid; place-items: center; position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none;
    width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--accent);
    transition: width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), background-color .2s, opacity .2s;
    opacity: 0;
  }
  .cursor.is-live { opacity: 1; }
  .cursor.is-big { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
  .cursor-label { font: 600 11px var(--mono); text-transform: uppercase; color: var(--ink); opacity: 0; transition: opacity .2s; }
  .cursor.is-big .cursor-label { opacity: 1; }
  .cursor.is-down { width: 8px; height: 8px; margin: -4px 0 0 -4px; }
}

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 95; background: var(--ink); color: var(--paper);
  display: grid; grid-template-rows: 1fr auto auto; padding: var(--pad);
}
html.no-loader .loader, html:not(.js) .loader { display: none; }
.loader-count { align-self: end; font: 800 clamp(96px, 26vw, 380px)/.8 var(--display); font-variation-settings: "wdth" 62; letter-spacing: -.02em; }
.loader-line { height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); margin: 18px 0 12px; }
.loader-meta { display: flex; justify-content: space-between; }

/* ---------- bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 80; height: var(--bar-h);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  padding: 0 var(--pad); color: var(--paper); mix-blend-mode: difference;
}
.bar-mark { font: 900 32px/1 var(--display); font-variation-settings: "wdth" 62; text-decoration: none; letter-spacing: -.01em; }
.bar-ast { position: fixed; z-index: 82; width: 16px; height: 16px; left: 0; top: 0; pointer-events: none; }
.bar-ast svg { display: block; width: 100%; height: 100%; animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
html:not(.no-loader) .bar-ast { opacity: 0; }
.bar-nav { display: flex; gap: clamp(12px, 3vw, 40px); justify-self: center; }
.bar-nav a { text-decoration: none; position: relative; }
.bar-nav a i { font-style: normal; opacity: .55; margin-right: 4px; }
.bar-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: 100% 50%; transition: transform .35s var(--ease); }
.bar-nav a:hover::after, .bar-nav a.is-on::after { transform: scaleX(1); transform-origin: 0 50%; }
.bar-meta { display: flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; background: var(--paper); border-radius: 50%; animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .15; } }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; padding: calc(var(--bar-h) + 10px) var(--pad) var(--pad);
  display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.hero-top { display: flex; justify-content: space-between; border-top: 1px solid var(--rule); padding-top: 10px; }
.hero-name {
  align-self: end; margin: 0; font-weight: 900; text-transform: uppercase;
  font-size: clamp(64px, 17.5vw, 330px); line-height: .8; letter-spacing: -.035em;
  font-variation-settings: "wdth" 125;
}
.hero-line { display: block; width: fit-content; overflow: hidden; padding-bottom: .02em; white-space: nowrap; }
.hero-line:nth-child(2) { margin-left: auto; }
.hero-foot {
  display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; align-items: end;
  border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 14px;
}
.hero-roles b { color: var(--accent); font-weight: 400; }
.hero-lede { margin: 0; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.2; max-width: 34ch; font-variation-settings: "wdth" 90; }
.hero-say { display: grid; gap: 14px; justify-items: start; }
.hero-scroll em { font-style: normal; display: inline-block; animation: nudge 1.4s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }

.ar { display: inline-block; width: .78em; height: .78em; vertical-align: -.04em; overflow: visible; }
.ar-ne { transform: rotate(-45deg); } .ar-d { transform: rotate(90deg); } .ar-u { transform: rotate(-90deg); }

/* split text */
.char { display: inline-block; will-change: transform; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; background: var(--ink); color: var(--paper); border-bottom: 1px solid var(--rule); padding: 14px 0; }
.marquee-track { display: flex; width: max-content; white-space: nowrap; will-change: transform; }
.marquee-track span, .marquee-track b {
  font: 800 clamp(28px, 4.4vw, 64px)/1 var(--display); font-variation-settings: "wdth" 70; text-transform: uppercase; padding: 0 .35em;
}
.marquee-track b { color: var(--accent); font-size: .5em; align-self: center; }

/* ---------- section heads ---------- */
.sec-h {
  margin: 0; font-weight: 900; text-transform: uppercase; line-height: .82; letter-spacing: -.03em;
  font-size: clamp(56px, 12vw, 200px); font-variation-settings: "wdth" 62; overflow: hidden;
}
.sec-row { display: grid; grid-template-columns: 1fr minmax(200px, 340px); align-items: end; gap: 24px; padding: 0 var(--pad) 18px; border-bottom: 1px solid var(--rule); }
.sec-note { margin: 0; font-size: 18px; line-height: 1.25; font-variation-settings: "wdth" 90; }

/* ---------- work ---------- */
.work { border-bottom: 1px solid var(--rule); }
.work-pin { height: 100svh; display: grid; grid-template-rows: auto 1fr auto; padding-top: calc(var(--bar-h) + 6px); overflow: hidden; }
.work-head { display: flex; justify-content: space-between; align-items: end; padding: 0 var(--pad) 14px; border-bottom: 1px solid var(--rule); }
.work-count { font-size: 14px; }
.work-track { display: flex; height: 100%; width: max-content; will-change: transform; }
.card {
  width: min(82vw, 520px); height: 100%; padding: 22px var(--pad); border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 14px; transition: background-color .35s var(--ease), color .35s var(--ease);
}
.card:hover, .card.is-active { background: var(--ink); color: var(--paper); }
.card:hover .btn , .card.is-active .btn  { border-color: var(--paper); }
.card:hover .btn:not(.btn-ghost) , .card.is-active .btn:not(.btn-ghost)  { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.work-track { counter-reset: card; }
.card { counter-increment: card; }
.card-top { display: flex; justify-content: space-between; order: -1; }
.card-top::after { content: none; }
.card-num {
  width: fit-content;
  font: 900 clamp(110px, 15vw, 240px)/.8 var(--display); font-variation-settings: "wdth" 62; letter-spacing: -.04em;
  color: rgba(11,11,11,.09); transition: color .35s var(--ease);
}
.card:hover .card-num , .card.is-active .card-num  { color: var(--accent); }
html.has-field .card:hover, html.has-field .card.is-active { background: transparent; }
.card-stage { position: relative; flex: 1 1 auto; min-height: 120px; display: grid; place-items: center; }
.card-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: var(--d, 120px); height: var(--d, 120px); opacity: var(--solid, 0); background: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; pointer-events: none; }
.card-logo-accent { background: var(--accent); }
.tp-ast { position: absolute; left: calc(50% + var(--ax, 0) * var(--d, 120px) / 2); top: calc(50% + var(--ay, 0) * var(--d, 120px) / 2);
  width: calc(var(--as, .2) * var(--d, 120px) / 2); aspect-ratio: 1; transform: translate(-50%, -50%); opacity: var(--solid, 0); }
.tp-ast svg { display: block; width: 100%; height: 100%; animation: spin 6s linear infinite; }
.card-h { margin: 0; font: 900 clamp(36px, 4.2vw, 68px)/.85 var(--display); font-variation-settings: "wdth" 66; text-transform: uppercase; letter-spacing: -.02em; overflow-wrap: anywhere; }
.card-kind { margin: 0; color: var(--accent); }
.card-body { margin: 0; font-size: 18px; line-height: 1.3; max-width: 38ch; font-variation-settings: "wdth" 92; }
.card-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.card-list li { border: 1px solid currentColor; padding: 4px 8px; }
.card-cta { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 8px; }
.tag { border: 1px solid currentColor; padding: 2px 7px; }
.tag-live::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; background: var(--accent); vertical-align: 1px; animation: blink 1.6s steps(2) infinite; }
.work-progress { height: 4px; background: transparent; border-top: 1px solid var(--rule); }
.work-progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font: 600 13px var(--mono); text-transform: uppercase; letter-spacing: .02em;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink); padding: 12px 16px;
  transition: background-color .25s, color .25s, border-color .25s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn span { transition: transform .3s var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn-big { font-size: 15px; padding: 18px 26px; border: 0; }

/* ---------- services ---------- */
.services { padding-top: clamp(60px, 10vw, 140px); }
.svc { list-style: none; margin: 0; padding: 0; }
.svc li { border-bottom: 1px solid var(--rule); }
.svc a {
  position: relative; display: grid; grid-template-columns: 90px 1fr 1fr 40px; align-items: center; gap: 16px;
  padding: 20px var(--pad); text-decoration: none; overflow: hidden; isolation: isolate;
}
.svc a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .45s var(--ease); }
.svc a:hover::before { transform: scaleY(1); }
.svc-t { font: 800 clamp(30px, 4.6vw, 72px)/.9 var(--display); font-variation-settings: "wdth" 72; text-transform: uppercase; letter-spacing: -.02em; transition: font-variation-settings .5s var(--ease), letter-spacing .5s var(--ease); }
.svc a:hover .svc-t { font-variation-settings: "wdth" 110; }
.svc-d { font-size: 17px; font-variation-settings: "wdth" 90; }
.svc-a { font-size: 22px; justify-self: end; transition: transform .35s var(--ease); }
.svc a:hover .svc-a { transform: translateX(6px) rotate(-45deg); }

/* ---------- lab ---------- */
.lab { padding-top: clamp(60px, 10vw, 140px); }
.lab-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--rule); }
.lab-cell { padding: 22px var(--pad); border-right: 1px solid var(--rule); border-top: 1px solid var(--rule); min-height: 240px; display: flex; flex-direction: column; gap: 12px; }
.lab-cell:nth-child(3n) { border-right: 0; }
.lab-cell h3 { margin: 0; font: 800 clamp(26px, 2.8vw, 40px)/.95 var(--display); font-variation-settings: "wdth" 75; text-transform: uppercase; }
.lab-cell p { margin: 0; font-size: 17px; line-height: 1.3; font-variation-settings: "wdth" 92; }
.lab-k { color: var(--mute); display: flex; justify-content: space-between; }
.lab-feature { grid-row: span 2; background: var(--ink); color: var(--paper); }
.lab-feature h3 { font-size: clamp(36px, 4.4vw, 68px); margin-top: auto; }
.lab-feature .lab-k { color: var(--accent); }
.lab-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.lab-tags span { border: 1px solid currentColor; padding: 3px 8px; }
.lab-watch { align-self: flex-start; margin-top: 14px; background: var(--accent); border-color: var(--accent); color: var(--ink); }
.lab-watch:hover { background: var(--paper); border-color: var(--paper); }
.lab-repos { grid-column: span 2; border-right: 0; }
.lab-links { grid-column: span 2; border-right: 0; }
.gh-src { color: var(--accent); }
.links { list-style: none; margin: auto 0 0; padding: 0; }
.links a { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--rule); text-decoration: none; font: 800 28px/1 var(--display); font-variation-settings: "wdth" 75; text-transform: uppercase; transition: padding .3s var(--ease), color .2s; }
.links a:hover { padding-left: 10px; color: var(--accent); }
.repos { list-style: none; margin: 0; padding: 0; }
.repos li { border-top: 1px solid var(--rule); }
.repos a { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: baseline; padding: 10px 0; text-decoration: none; transition: padding .3s var(--ease); }
.repos a:hover { padding-left: 10px; }
.repos a:hover .repo-n { color: var(--accent); }
.repo-n { font: 700 20px var(--display); font-variation-settings: "wdth" 80; }
.repo-m { color: var(--mute); }

/* ---------- contact ---------- */
.contact { padding: clamp(60px, 10vw, 140px) var(--pad) 40px; background: var(--ink); color: var(--paper); }
.contact-big {
  margin: 0 0 40px; font-weight: 900; text-transform: uppercase; line-height: .8; letter-spacing: -.04em; white-space: nowrap;
  font-size: clamp(72px, 21vw, 400px); font-variation-settings: "wdth" 62; overflow: hidden;
}
.contact-big > span { display: inline-block; }
.contact-big > span + span { color: var(--accent); }
.form { display: grid; gap: 28px; max-width: 1100px; }
.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { margin-bottom: 12px; color: #9a988f; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; }
.chips span { display: inline-block; padding: 10px 14px; border: 1px solid var(--paper); font: 600 13px var(--mono); text-transform: uppercase; transition: background-color .2s, color .2s; }
.chips label:hover span { background: #222; }
.chips input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.field { display: grid; gap: 8px; }
.field > span { color: #9a988f; }
.field input, .field textarea {
  width: 100%; background: transparent; color: var(--paper); border: 0; border-bottom: 1px solid var(--paper);
  font: 500 clamp(22px, 2.4vw, 34px)/1.2 var(--display); font-variation-settings: "wdth" 85; padding: 6px 0 10px; border-radius: 0; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-foot .btn { background: var(--accent); color: var(--ink); }
.form-foot .btn:hover { background: var(--paper); }
.form-status { margin: 0; color: var(--accent); }

/* ---------- footer ---------- */
.foot { display: flex; justify-content: space-between; gap: 16px; padding: 16px var(--pad); background: var(--ink); color: var(--paper); border-top: 1px solid #333; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .rail { display: none; }
  .bar-nav { display: none; }
  .bar { grid-template-columns: 1fr auto; }
  .hide-sm { display: none; }
  .hero { min-height: 0; grid-template-rows: auto clamp(270px, 78vw, 380px) auto; }
  .hero-foot { grid-template-columns: 1fr; gap: 12px; }
  .work-pin { height: auto; display: block; overflow: visible; } /* not a scroll container, or the cards can't be page snap points */
  .work-count, .work-progress { display: none; }
  .work-track { flex-direction: column; width: 100%; }
  .card { width: 100%; height: auto; min-height: 0; border-right: 0; border-bottom: 1px solid var(--rule); }
  /* phones: TikTok-style paging. Each venture card fills the screen under the bar and a flick moves one card;
     taller sections (lab, contact) still scroll freely inside their snap area. */
  html { scroll-snap-type: y mandatory; scroll-padding-top: var(--bar-h); }
  .hero, .card, .services, .lab, .contact { scroll-snap-align: start; }
  .foot { scroll-snap-align: end; }
  .card { scroll-snap-stop: always; min-height: calc(100svh - var(--bar-h)); }
  .card-stage { flex: 1 1 auto; height: auto; min-height: clamp(150px, 48vw, 260px); }
  /* phones: the dark state belongs to the card itself (scrolls natively with its text), painted in a layer
     under the particle canvas so the dots still show on top. Needs no stacking context on the way up. */
  .work-track { will-change: auto; }
  .card { position: relative; }
  html.has-field .card::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--ink); opacity: 0; transition: opacity .35s var(--ease); pointer-events: none; }
  html.has-field .card.is-active::before { opacity: 1; }
  .sec-row { grid-template-columns: 1fr; }
  .svc a { grid-template-columns: 56px 1fr 28px; }
  .svc-d { display: none; }
  .lab-grid { grid-template-columns: 1fr; }
  .lab-cell, .lab-feature, .lab-repos { grid-column: auto; grid-row: auto; border-right: 0; min-height: 0; }
  .field-row { grid-template-columns: 1fr; }
  .repos a { grid-template-columns: 1fr auto; }
  .repo-l { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .dot, .tag-live::before, .hero-scroll em, .bar-ast svg, .tp-ast svg { animation: none; }
  * { transition-duration: .01ms !important; }
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
