/* rico-rojas.com layout: "Ex 1" (2026-10-28). Tokens live in theme.css.
   Rendered markup comes from _build/build.py. The headshot <img> is never
   filtered, blended or overlaid; its frame is a plain 18px-radius rectangle. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); overflow-x: clip; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ac); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ac); color: var(--bg); padding: 8px 12px; z-index: 6000; }
.skip:focus { left: 8px; }
.wrap { width: 94%; max-width: 1300px; margin: 0 auto; }

/* header */
.e1-head { position: fixed; top: 0; left: 0; right: 0; z-index: 3000; background: linear-gradient(180deg, var(--bg) 55%, transparent); }
/* three tracks so the centred email can never overlap the nav: a 1fr track grows to its content */
.e1-head .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 22px 0; position: relative; }
.e1-logo { font-weight: 700; font-size: 16px; letter-spacing: .2px; justify-self: start; }
.e1-mail { font-size: 14px; font-weight: 500; letter-spacing: .8px; }
.e1-nav { grid-column: 3; justify-self: end; display: flex; gap: 36px; font-size: 14px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; }
.e1-nav a[aria-current="page"] { color: var(--ac); }

/* preloader (only when html.motion is set by the home page script) */
.e1-load { display: none; }
.motion .e1-load { position: fixed; inset: 0; background: var(--ink); z-index: 5000; display: grid; place-items: center; transition: opacity .5s .3s; }
.motion .e1-load.go { opacity: 0; pointer-events: none; }
.e1-pin { width: 260px; overflow: hidden; border-radius: 100px; background: #000; padding: 20px 0; color: #fff; font-size: 16px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; white-space: nowrap; box-shadow: 0 15px 15px #0003; }
.e1-mq { display: inline-flex; animation: e1mq 7s linear infinite; }
.e1-mq span { padding-right: 28px; }
@keyframes e1mq { to { transform: translateX(-50%); } }

/* hero */
.e1-land { position: relative; min-height: 100vh; display: grid; grid-template-columns: 1fr 360px 1fr; align-items: center; gap: 24px; padding-top: 90px; }
.e1-intro h2 { margin: 0; color: var(--ac); font-size: 25px; font-weight: 300; letter-spacing: 2px; }
.e1-intro h1 { margin: 6px 0 0; font-size: 44px; line-height: 42px; font-weight: 500; letter-spacing: 2px; }
.e1-intro .cta { display: inline-block; margin-top: 26px; padding: 10px 18px; border: 1px solid var(--ac); border-radius: 30px; font-size: 14px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.e1-port { position: relative; align-self: end; height: 76vh; max-height: 640px; }
@keyframes e1rim { from { opacity: 0; transform: scale(.6); } to { opacity: .75; transform: scale(1); } }
@keyframes e1drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-14px, 18px) scale(1.06); } }
.e1-arch { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 18px; box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--ac) 55%, transparent); }
.e1-arch img { width: 100%; height: 100%; object-fit: cover; object-position: 48% 22%; }
.e1-info h3 { margin: 0; font-size: 25px; font-weight: 300; letter-spacing: 2px; color: var(--ac); }
.e1-roll { position: relative; height: 3.3em; overflow: hidden; font-size: 30px; line-height: 1.1; font-weight: 600; color: var(--ac2); letter-spacing: 1px; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.e1-roll span { display: flex; align-items: center; height: 3.3em; }
.e1-roll div { animation: e1roll 10s cubic-bezier(.7, 0, .2, 1) infinite; }
@keyframes e1roll { 0%, 22% { transform: translateY(0); } 25%, 47% { transform: translateY(-25%); } 50%, 72% { transform: translateY(-50%); } 75%, 97% { transform: translateY(-75%); } 100% { transform: translateY(0); } }

/* sections */
.sec { padding: 110px 0; position: relative; }
.kicker { font-size: 25px; letter-spacing: 7px; text-transform: uppercase; font-weight: 400; color: var(--ac); margin: 0 0 18px; }
.e1-about p { max-width: 900px; font-size: clamp(21px, 2.2vw, 32px); line-height: 1.35; font-weight: 600; letter-spacing: .5px; margin: 0; }
.e1-steps { list-style: none; counter-reset: st; max-width: 900px; margin: 48px 0 0; padding: 0; }
.e1-steps li { counter-increment: st; display: grid; grid-template-columns: 76px 1fr; align-items: baseline; font-size: 17px; line-height: 1.5; font-weight: 300; margin: 0 0 20px; }
.e1-steps li::before { content: counter(st, decimal-leading-zero); font-size: 44px; line-height: 1; font-weight: 600; color: var(--ac); }
.e1-steps strong { font-weight: 600; }
.e1-what { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.big { font-size: calc(4vw + 25px); line-height: 1; font-weight: 600; margin: 0; }
.big span { color: var(--ac); }
.e1-wbox { border-left: 1px dashed var(--dash); border-right: 1px dashed var(--dash); }
.e1-wc { position: relative; padding: 28px 40px; border-top: 1px dashed var(--dash); }
.e1-wc:last-child { border-bottom: 1px dashed var(--dash); }
.e1-wc::before, .e1-wc::after { content: ""; position: absolute; width: 10px; height: 10px; border: 4px solid var(--ink); left: -2px; }
.e1-wc::before { top: -2px; border-right: 0; border-bottom: 0; }
.e1-wc::after { bottom: -2px; border-top: 0; border-right: 0; }
.e1-wc h3 { font-size: 30px; letter-spacing: 1px; margin: 0; }
.e1-wc h4 { font-weight: 300; letter-spacing: 1px; margin: 2px 0 0; font-size: 14px; opacity: .6; }
.e1-wc p { font-size: 14px; line-height: 20px; font-weight: 300; letter-spacing: .4px; margin: 12px 0; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; }
.tag { font: 500 12px/1.6 var(--mono); padding: 2px 9px; background: color-mix(in srgb, var(--ink) 7%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 28%, transparent); border-radius: 30px; }
a.tag:hover { border-color: var(--ac); }
.tag.lic { font-size: 11px; padding: 0 7px; margin-left: 6px; color: var(--muted); white-space: nowrap; }
.tile p.st, .e1-wk p.st { font-size: 12px; line-height: 17px; color: var(--muted); margin: 6px 0 0; }
.e1-car .big { text-align: center; margin-bottom: 70px; background: linear-gradient(0deg, var(--ac), var(--ink)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.e1-ci { position: relative; }
.e1-tl { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; transform: translateX(-50%); background-image: linear-gradient(to top, var(--ac2) 20%, var(--ac) 50%, transparent 95%); }
.e1-row { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; margin-bottom: 56px; }
.e1-row h4 { font-size: 28px; line-height: 1.1; font-weight: 500; margin: 0; }
.e1-row h5 { font-weight: 400; font-size: 17px; margin: 8px 0 0; color: var(--ac); }
.e1-row p { font-size: 15px; line-height: 22px; font-weight: 300; margin: 0; }
.sec-row { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.sec-row .big { font-size: 56px; }
.sec-row a { color: var(--ac); font-weight: 600; }

/* featured work: a full-bleed sideways track. Native swipe scroller by default;
   with html.hs (home script: desktop, Reduce Motion included) the frame pins and the
   script slides the track as the page scrolls through .e1-work. */
.e1-work { margin: 0 calc(50% - 50vw); }
.e1-work .sec-row { padding: 0 3%; }
.e1-track { display: flex; padding-left: 3%; overflow-x: auto; scroll-snap-type: x mandatory; }
.e1-wk { flex: 0 0 min(560px, 85vw); scroll-snap-align: start; padding: 22px 34px 30px; border-right: 1px solid var(--line); }
.e1-wk:first-child { border-left: 1px solid var(--line); }
.e1-all a { display: flex; flex-direction: column; justify-content: center; height: 100%; min-height: 240px; font-size: 40px; line-height: 1.1; font-weight: 600; }
.e1-all span { margin-top: 14px; font-size: 16px; font-weight: 600; color: var(--ac); }
.hs .e1-work { padding: 0; }
.hs .e1-frame { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.hs .e1-track { overflow: visible; will-change: transform; }
.e1-wkt { display: flex; gap: 22px; align-items: flex-start; }
.e1-wkt b { font-size: 50px; line-height: 46px; font-weight: 600; }
.e1-wkt h3 { font-size: 24px; font-weight: 500; margin: 0; }
.e1-wkt p, .meta { font-size: 13px; color: var(--ac); margin: 4px 0 0; }
.e1-wk .d { font-size: 14px; line-height: 20px; font-weight: 300; margin: 16px 0; }
.shot { display: block; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--tile); }
.shot img { width: 100%; height: 100%; object-fit: cover; }

/* compact grid (home "More work") and the strict /portfolio/ gallery */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.tile { background: var(--tile); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.tile h3 { font-size: 18px; font-weight: 600; margin: 4px 0 0; }
.tile p { font-size: 14px; line-height: 20px; font-weight: 300; margin: 0; }
.tile .links { display: flex; gap: 14px; font-size: 13px; font-weight: 600; margin-top: auto; padding-top: 6px; }
.tile .links a { color: var(--ac); }
.pf-row { display: flex; gap: 18px; margin-bottom: 18px; }
.pf-row .tile { flex: 1 1 0; min-width: 0; }
.pf-feat .tile h3 { font-size: 22px; }
@media (max-width: 700px) {
  .pf-feat { flex-direction: column; }
  .pf-keep { flex-wrap: wrap; }
  .pf-keep .tile { flex: 1 1 calc(50% - 9px); }
}
.pf-head { padding: 110px 0 28px; display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.pf-head h1 { font-size: 28px; font-weight: 600; margin: 0; }
.pf-head span { color: var(--ac); }
.pf-head a { color: var(--muted); font-size: 14px; }
.pf-head a:hover { color: var(--ac); }

/* contact + footer */
.e1-cf { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.e1-cb h4 { font-weight: 500; margin: 20px 0 0; opacity: .6; font-size: 15px; }
.e1-cb p { margin: 10px 0 0; font-size: 20px; }
.e1-soc { display: inline-block; font-size: 22px; border-bottom: 1px solid var(--muted); margin: 12px 20px 0 0; }
footer.site { border-top: 1px solid var(--line); padding: 30px 0 50px; font-size: 13px; color: var(--muted); }

/* inner pages */
.page-hero { padding: 120px 0 30px; }
.page-hero .label { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--ac); }
.page-hero .label a:hover { text-decoration: underline; }
.page-hero h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1.05; font-weight: 600; margin: 10px 0 14px; }
.lede { font-size: 19px; line-height: 1.5; max-width: 760px; color: var(--ink); margin: 0 0 12px; }
.small { font-size: 14px; color: var(--muted); }
.built, .exp { font-size: 13px; color: var(--ac); margin: 4px 0; }
.prose { max-width: 760px; padding-bottom: 80px; }
.prose h2 { font-size: 26px; font-weight: 600; margin: 40px 0 10px; color: var(--ac); }
.prose p, .prose li { font-size: 17px; line-height: 1.6; font-weight: 300; }
.prose a { color: var(--ac); }
.prose a.big-mail { display: inline-block; font-size: 24px; font-weight: 600; margin: 8px 0; }
.btn { display: inline-block; margin-top: 10px; padding: 10px 18px; border: 1px solid var(--ac); border-radius: 30px; color: var(--ac); font-weight: 600; font-size: 14px; }
.detail { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; padding-bottom: 80px; }
.detail .hero-img { margin: 10px 0 30px; border-radius: 10px; overflow: hidden; }
.detail aside dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; margin: 0 0 18px; }
.detail aside dt { color: var(--muted); }
.detail aside dd { margin: 0; }

@media (max-width: 900px) {
  .e1-mail { display: none; }
  .e1-nav { gap: 14px; font-size: 12px; }
  .e1-land { grid-template-columns: 1fr; text-align: center; padding-top: 100px; }
  .e1-intro h1 { font-size: 34px; line-height: 36px; }
  .e1-port { width: 280px; height: 380px; margin: 0 auto; }
  .e1-roll { font-size: 22px; }
  .sec { padding: 64px 0; }
  .kicker { font-size: 18px; letter-spacing: 4px; }
  .e1-what, .e1-row, .detail { grid-template-columns: 1fr; }
  .e1-row { gap: 10px; padding-left: 6%; }
  .e1-tl { left: 0; transform: none; }
  .e1-wc { padding: 24px 22px; }
  .e1-car .big { text-align: left; }
  .sec-row .big { font-size: 40px; }
  .e1-wk { padding: 20px; }
  .e1-all a { font-size: 30px; }
}
@media (max-width: 420px) {
  .e1-logo { font-size: 14px; }
  .e1-nav { gap: 10px; font-size: 11px; letter-spacing: .3px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .e1-mq, .e1-roll div { animation: none; }
  .motion .e1-load { display: none; }
}

/* layered AI stack diagram: providers, gateway bar, practice tags */
#stack.e1-what { grid-template-columns: 1fr; gap: 48px; }
.stk { --gap: 34px; }
.stk-top, .stk-bot { list-style: none; margin: 0; padding: 0; display: grid; }
.stk-top { grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stk-top li { position: relative; background: var(--tile); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; text-align: center; }
.stk-top b { display: block; font-size: 24px; font-weight: 600; letter-spacing: .5px; }
.stk-top span { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }
.stk-top li::after { content: ""; position: absolute; left: 50%; top: 100%; height: var(--gap); border-left: 2px solid var(--ac); }
.stk-bar { margin: var(--gap) 0; padding: 18px 24px; border: 2px solid var(--ac); border-radius: 10px; text-align: center; font-size: 18px; line-height: 1.4; }
.stk-bar b { color: var(--ac); }
.stk-bot { grid-template-columns: repeat(8, 1fr); gap: 10px; }
.stk-bot li { position: relative; display: flex; }
.stk-bot li::before { content: ""; position: absolute; left: 50%; bottom: 100%; height: var(--gap); border-left: 2px solid var(--ac); }
.stk-bot .tag { flex: 1; text-align: center; padding: 8px 6px; border-radius: 10px; font-size: 12px; }
@media (max-width: 900px) {
  .stk-top { grid-template-columns: repeat(2, 1fr); }
  .stk-top li:nth-child(-n+2)::after { display: none; }
  .stk-bot { grid-template-columns: repeat(2, 1fr); }
  .stk-bot li:nth-child(n+3)::before { display: none; }
}
