/* =========================================================================
   Stephania Quintero — Portfolio 2026
   Built 1:1 from the Illustrator artboards (1920 px wide).
   Desktop/laptop (>=1100px): every element is placed with its artboard
   coordinates (--x, --y, --w, --h, --fs, --lh) multiplied by --u (1 artboard px).
   Tablet/mobile (<1100px): same elements, same art direction, re-flowed.
   ========================================================================= */

/* ---------- Fonts ----------
   Drop the original font files into /assets/fonts with these names and they
   will be used automatically. Until then the closest web fonts are used as
   temporary placeholders (loaded in index.html). */
/* Uncomment once the files are in /assets/fonts (avoids 404s until then):
@font-face { font-family: "SQ Display"; src: url("../fonts/display.woff2") format("woff2"), url("../fonts/display.otf") format("opentype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "SQ Serif"; src: url("../fonts/serif-italic.woff2") format("woff2"), url("../fonts/serif-italic.otf") format("opentype"); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: "SQ Mono"; src: url("../fonts/mono.woff2") format("woff2"), url("../fonts/mono.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "SQ Mono"; src: url("../fonts/mono-medium.woff2") format("woff2"), url("../fonts/mono-medium.otf") format("opentype"); font-weight: 500; font-display: swap; }

*/

:root {
  color-scheme: dark;
  --ink: #171612;
  --cream: #f2ede0;
  --cream-75: #bcb8ad;
  --cream-50: #85827a;
  --yellow: #ffe500;
  --magenta: #d31c58;
  --violet: #7c85ff;
  --green: #6eb52c;

  --display: "SQ Display", "Inter Tight", "Inter Display", "Inter", system-ui, sans-serif;
  --serif: "SQ Serif", "Instrument Serif", "Times New Roman", serif;
  --mono: "SQ Mono", "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --u: calc(100vw / 1920);          /* one artboard pixel */
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
html.smooth { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ink); color: var(--cream);
  font-family: var(--mono); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--yellow); color: var(--ink); }

/* ---------- Pages ---------- */
.page { display: none; position: relative; background: var(--ink); }
.page.is-active { display: block; }

/* ---------- Typography primitives ---------- */
.t { margin: 0; font-weight: 400; text-box: trim-both cap alphabetic; }
.mono { font-family: var(--mono); font-size: calc(25 * var(--u)); line-height: calc(27 * var(--u)); }
.disp { font-family: var(--display); font-weight: 800; letter-spacing: -0.045em; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.fs { font-size: calc(var(--fs) * var(--u)); line-height: calc(var(--lh, var(--fs)) * var(--u)); }
.c-yellow { color: var(--yellow); }
.c-magenta { color: var(--magenta); }
.c-violet { color: var(--violet); }
.c-ink { color: var(--ink); }
.b { font-weight: 500; }
.ln { display: block; white-space: nowrap; }
.just { text-align: justify; }
.tags { text-align: justify; text-align-last: justify; white-space: nowrap; }
.tags .sep { display: inline-block; }

/* ---------- Pills (Back / My projects / Return / Copy mail) ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  border: 1px solid var(--cream-75); border-radius: 999px; color: var(--cream);
  font-family: var(--mono); white-space: nowrap; position: relative; overflow: hidden; isolation: isolate;
  transition: color .45s var(--ease), border-color .45s var(--ease), transform .3s var(--ease);
}
.pill::before {
  content: ""; position: absolute; inset: 0; background: var(--cream); border-radius: inherit; z-index: -1;
  transform: translateY(101%); transition: transform .5s var(--ease);
}
.pill .ar { display: inline-block; transition: transform .45s var(--ease); }
.pill:hover { color: var(--ink); border-color: var(--cream); }
.pill:hover::before { transform: translateY(0); }
.pill:active { transform: scale(.96); }
.pill.back:hover .ar { transform: translateX(-.35em); }
.pill.down:hover .ar { transform: translateY(.25em); }
.pill.up:hover .ar { transform: translateY(-.25em); }
.pill.on-violet { border-color: rgba(23,22,18,.55); color: var(--ink); }
.pill.on-violet::before { background: var(--ink); }
.pill.on-violet:hover { color: var(--violet); border-color: var(--ink); }
.pill.solid { background: var(--ink); color: var(--violet); border-color: var(--ink); }
.pill.solid::before { background: var(--cream); }
.pill.solid:hover { color: var(--ink); }
.pill.solid.copied { color: var(--ink); }
.pill.solid.copied::before { transform: translateY(0); background: var(--yellow); }
.pill .lbl { display: inline-block; }

/* ---------- Media ---------- */
.media { position: relative; overflow: hidden; margin: 0; }
.media > img { width: 100%; height: 100%; object-fit: cover; }
.cut img { width: 100%; height: auto; }           /* transparent cut-outs */

/* ---------- Clickable project cards ---------- */
.card { display: block; cursor: pointer; }
.card .media > img { transition: transform 1.1s var(--ease), filter .6s var(--ease); will-change: transform; }
.card:hover .media > img { transform: scale(1.035); }
.card .arrow { display: inline-block; color: var(--yellow); font-family: var(--mono); font-weight: 400; letter-spacing: 0; transition: transform .45s var(--ease); }
.card:hover .arrow, .card:focus-visible .arrow { transform: translate(.12em, -.12em); }
.card .title-l { transition: color .35s var(--ease); }
.card:hover .title-l { color: var(--yellow); }
.card .hub-label { transition: color .35s var(--ease), letter-spacing .5s var(--ease); }
.card:hover .hub-label { color: var(--yellow); }

/* ---------- Underlined links (contact) ---------- */
.ul { text-decoration: underline; text-decoration-thickness: calc(2 * var(--u)); text-underline-offset: calc(7 * var(--u)); transition: color .3s var(--ease); }
.social a { position: relative; }
.social a:hover .ul { color: var(--cream); }
.social a .ar { display: inline-block; transition: transform .4s var(--ease); }
.social a:hover .ar { transform: translate(.15em, -.15em); }

/* ---------- Status dot ---------- */
.dot { display: inline-block; width: calc(18 * var(--u)); height: calc(18 * var(--u)); border-radius: 50%; background: var(--green); margin-right: calc(18 * var(--u)); vertical-align: calc(-1 * var(--u)); position: relative; }
.dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--green); animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(2.4); opacity: 0; } }

.rule { height: max(1px, calc(1.5 * var(--u))); background: var(--cream-75); }
.rule.soft { background: var(--cream-50); }
.rule.ink { background: rgba(23,22,18,.5); }

/* ---------- Contact section ---------- */
.contact-bg { background: var(--violet); }

/* =========================================================================
   DESKTOP / LAPTOP — artboard canvas
   ========================================================================= */
@media (min-width: 1100px) {
  .cv { position: relative; height: calc(var(--H) * var(--u)); overflow: hidden; }
  .a { position: absolute; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); }
  .a[style*="--w"] { width: calc(var(--w) * var(--u)); }
  .a[style*="--h"] { height: calc(var(--h) * var(--u)); }
  .a.r { left: auto; right: calc((1920 - var(--r)) * var(--u)); text-align: right; }
  .pill { font-size: calc(25 * var(--u)); }
  .z1 { z-index: 1; } .z2 { z-index: 2; } .z3 { z-index: 3; } .z4 { z-index: 4; }
  .contact-bg.a { left: 0; width: 100%; }
  .m-only { display: none !important; }
}

/* =========================================================================
   Motion
   ========================================================================= */
.js [data-rv] { --d: 0ms; }
.js [data-rv="up"] { opacity: 0; transform: translateY(calc(40 * var(--u) + 12px)); transition: opacity 1s var(--ease) var(--d), transform 1.2s var(--ease) var(--d); }
.js [data-rv="fade"] { opacity: 0; transition: opacity 1.2s var(--ease) var(--d); }
.js [data-rv="img"] > img { clip-path: inset(100% 0 0 0); transform: scale(1.18); transition: clip-path 1.3s var(--ease-io) var(--d), transform 1.8s var(--ease) var(--d); }
.js [data-rv="cut"] { opacity: 0; transform: translateY(calc(60 * var(--u) + 10px)) rotate(var(--rot, -3deg)) scale(.96); transition: opacity 1s var(--ease) var(--d), transform 1.4s var(--ease) var(--d); }
/* hands slide out of their own (clipped) box, so the observed box itself never leaves the viewport */
.js [data-rv="left"] > * { transform: translateX(-105%); transition: transform 1.4s var(--ease) var(--d); }
.js [data-rv="right"] > * { transform: translateX(105%); transition: transform 1.4s var(--ease) var(--d); }
.js [data-rv="left"].in > *, .js [data-rv="right"].in > * { transform: none; }
.js [data-rv="pop"] { opacity: 0; transform: scale(.2) rotate(-90deg); transition: opacity .6s var(--ease) var(--d), transform 1.3s cubic-bezier(.2, 1.4, .3, 1) var(--d); }
.js [data-rv="tilt"] { opacity: 0; transform: translateY(calc(80 * var(--u))) rotate(8deg); transition: opacity 1s var(--ease) var(--d), transform 1.5s cubic-bezier(.2, 1.25, .3, 1) var(--d); }
/* line-by-line masked text */
.js [data-rv="lines"] .ln { clip-path: inset(-.45em -.4em -.32em -.4em); }
.js [data-rv="lines"] .ln > span { display: inline-block; transform: translateY(140%); transition: transform 1.15s var(--ease); transition-delay: calc(var(--d) + var(--i, 0) * 110ms); }
/* word stagger */
.js [data-rv="words"] .w { display: inline-block; opacity: 0; transform: translateY(.5em); transition: opacity .7s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d) + var(--i, 0) * 45ms); }

.js [data-rv].in { opacity: 1; transform: none; }
.js [data-rv="img"].in > img { transform: none; clip-path: inset(0 0 0 0); }
.js [data-rv="lines"].in .ln > span, .js [data-rv="words"].in .w { opacity: 1; transform: none; }

/* idle motion for decorative pieces (applied to an inner wrapper so it never fights the reveal) */
.float { animation: float 6s ease-in-out infinite; }
.float.slow { animation-duration: 9s; }
.spin { animation: spin 38s linear infinite; }
.point-r { animation: pointR 2.8s ease-in-out infinite; }
.point-l { animation: pointL 2.8s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(calc(-14 * var(--u))) rotate(.8deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pointR { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(calc(16 * var(--u) + 2px)); } }
@keyframes pointL { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(calc(-16 * var(--u) - 2px)); } }
.wiggle:hover { animation: wiggle .7s var(--ease); }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-4deg); } 60% { transform: rotate(3deg); } }
.retrato-in { transition: transform .8s var(--ease); }
.retrato:hover .retrato-in { transform: rotate(-3deg) scale(1.03); }

/* ---------- Page transition window ---------- */
.win { position: fixed; z-index: 100; pointer-events: none; background: var(--ink); overflow: hidden; visibility: hidden; border-radius: 0; }
.win img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.curtain { position: fixed; inset: 0; z-index: 99; pointer-events: none; background: var(--ink); visibility: hidden; }
.curtain::after { content: ""; position: absolute; left: 0; right: 0; height: 100%; top: 100%; background: var(--yellow); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .js [data-rv], .js [data-rv] > *, .js [data-rv] > img, .js [data-rv] .ln > span, .js [data-rv] .w { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}

/* =========================================================================
   TABLET & MOBILE — same pieces, re-flowed (no generic template)
   ========================================================================= */
@media (max-width: 1099.98px) {
  :root { --u: calc(100vw / 820); --g: clamp(20px, 5.4vw, 48px); }
  .d-only { display: none !important; }
  br.d { display: none; }
  .cv { position: relative; padding: 0 var(--g) 72px; display: flex; flex-direction: column; }
  .a { position: relative; }
  .mono { font-size: clamp(13px, 3.4vw, 17px); line-height: 1.12; }
  .pill { font-size: clamp(13px, 3.4vw, 17px); padding: .85em 1.45em; align-self: flex-start; }
  .bleed { margin-left: calc(-1 * var(--g)); margin-right: calc(-1 * var(--g)); }
  .fs { font-size: var(--mfs); line-height: var(--mlh, 1); }
  .tags { white-space: normal; text-align: left; text-align-last: left; line-height: 1.7; }
  .tags .sep { margin: 0 .35em; }
}
.card:focus-visible { outline: none; } .card:focus-visible .media { outline: 2px solid var(--yellow); outline-offset: 6px; }
