/* ------------------------------------------------------------------
   Manasvi Tuniki — Marketing Portfolio
   Every section is a fixed 1366px-wide design stage that scales down
   to the viewport width (never up), matching the original layout.
------------------------------------------------------------------- */

/* Fonts (all SIL Open Font License). Metric overrides keep baselines
   identical to the original design's type metrics. */
@font-face {
  font-family: "League Gothic";
  src: url("../fonts/league-gothic.woff2") format("woff2");
  font-display: block;
  ascent-override: 93.5%;
  descent-override: 26.5%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Libre Baskerville";
  src: url("../fonts/libre-baskerville-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  ascent-override: 97%;
  descent-override: 27%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Libre Baskerville";
  src: url("../fonts/libre-baskerville-400i.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  ascent-override: 97%;
  descent-override: 27%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Libre Baskerville";
  src: url("../fonts/libre-baskerville-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  ascent-override: 97%;
  descent-override: 27%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Luxurious Script";
  src: url("../fonts/luxurious-script.woff2") format("woff2");
  font-display: block;
  ascent-override: 80%;
  descent-override: 40%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif.woff2") format("woff2");
  font-display: block;
  ascent-override: 75%;
  descent-override: 25%;
  line-gap-override: 10%;
}

:root {
  --s: 1;
  --maroon: #8d1f1f;
  --cream: #fff2df;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: var(--maroon);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------- sections & scaling ---------- */
.sec {
  position: relative;
  width: 100%;
  height: calc(var(--h) * var(--s) * 1px);
  overflow: hidden;
}

.stage {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1366px;
  height: calc(var(--h) * 1px);
  transform: translateX(-50%) scale(var(--s));
  transform-origin: 50% 0;
}

.el {
  position: absolute;
}

.im,
.sh {
  overflow: hidden;
}

.im img,
.im video,
.sh img,
.screen video {
  position: absolute;
  display: block;
  max-width: none;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.gp-in {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
}

/* device frames (phones) */
.device {
  overflow: visible;
}
.device svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.device .screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask: url("../img/phone-screen-mask.svg") 0 0 / 100% 100% no-repeat;
  mask: url("../img/phone-screen-mask.svg") 0 0 / 100% 100% no-repeat;
}

/* ---------- text ---------- */
.tx-in {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
}

.tx p,
.tx ul,
.tx li {
  margin: 0;
  padding: 0;
  white-space: pre;
  font-kerning: normal;
}

.tx ul {
  list-style: disc outside;
}

.tx p:has(> br:only-child) {
  white-space: normal;
}

.ff-gothic { font-family: "League Gothic", "Oswald", "Arial Narrow", sans-serif; }
.ff-serif { font-family: "Libre Baskerville", Baskerville, Georgia, serif; }
.ff-script { font-family: "Luxurious Script", "Snell Roundhand", cursive; }
.ff-display { font-family: "Instrument Serif", "Bodoni 72", Didot, serif; }

.tx .b { font-weight: 700; }
.tx .i { font-style: italic; }
.tx .u {
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.12em;
}

.tx {
  pointer-events: none; /* text boxes are larger than their words; let hovers reach what is underneath */
}
.tx a {
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}
.tx a:hover { opacity: 0.8; }
.tx a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* the substitute display serif runs ~12% wider than the original face */
.fit-display p {
  display: inline-block;
  transform: scaleX(0.89);
  transform-origin: 0 0;
}
.fit-display .tx-in {
  text-align: left;
}
.fit-display p[style*="text-align:center"] {
  display: block;
  transform-origin: 50% 0;
}

/* curved heading: each letter sits on the arc */
.tx p .arc {
  position: absolute;
  display: block;
}
.tx p:has(> .arc) {
  position: relative;
  height: 100%;
}

/* ---------- continuous motion ---------- */
.spin {
  animation: spin 20.2s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- entrance animations ----------
   Elements start hidden only once JS confirms it will animate them. */
.js [data-anim] {
  will-change: transform, opacity;
}

.js [data-anim="rise"]:not(.in),
.js [data-anim="fade"]:not(.in),
.js [data-anim="slowfade"]:not(.in),
.js [data-anim="tumble"]:not(.in) {
  opacity: 0;
}

.js [data-anim="rise"]:not(.in) {
  translate: 0 80px;
}

[data-anim="rise"].in {
  animation: rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes rise {
  from { opacity: 0; translate: 0 80px; }
  to { opacity: 1; translate: 0 0; }
}

[data-anim="fade"].in {
  animation: fade 1.2s ease-out both;
}
[data-anim="slowfade"].in {
  animation: fade 3.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

[data-anim="tumble"].in {
  animation: tumble 1.6s cubic-bezier(0.33, 0.9, 0.3, 1) both;
}
@keyframes tumble {
  0% {
    opacity: 0;
    translate: var(--tx) var(--ty);
    rotate: var(--tr);
  }
  45% {
    opacity: 1;
  }
  62% {
    translate: calc(var(--tx) * 0.46) calc(var(--ty) * 0.39);
    rotate: calc(var(--tr) * -0.85);
  }
  100% {
    opacity: 1;
    translate: 0 0;
    rotate: 0deg;
  }
}

/* typewriter: letters are wrapped in .ch by main.js */
.js [data-anim="type"] .ch {
  visibility: hidden;
}
.js [data-anim="type"] .ch.on {
  visibility: visible;
}


/* ---------- experience bullet lists ---------- */
.tx ul.bul {
  list-style: disc outside;
  padding-left: 17px;
}

/* ---------- 3D frame sequences (rendered in Blender, see /3d) ---------- */
.seq-wrap {
  overflow: visible;
}
.seq-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.seq-label {
  position: absolute;
  color: var(--cream);
  white-space: nowrap;
  pointer-events: none;
  transform: translate(0, -50%);
}
.seq-label .big {
  display: block;
  font-family: "League Gothic", "Oswald", sans-serif;
  font-size: 58px;
  line-height: 0.95;
  letter-spacing: 0.01em;
}
.seq-label .small {
  display: block;
  margin-top: 3px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 13.5px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

/* chart labels ride on top of each bar, company names sit under the base */
.bar-top {
  text-align: center;
  transform: translate(-50%, calc(-100% - 34px));
}
.bar-base {
  transform: translate(-50%, 16px);
}
.bar-base .org {
  font-size: 24px;
  letter-spacing: 0.06em;
  opacity: 0.9;
}


/* ---------- by the numbers: stat rows + ticker ---------- */
.stat {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--cream);
}
.stat .big {
  flex: 0 0 128px;
  font-size: 60px;
  line-height: 1;
  letter-spacing: 0.01em;
}
.stat .small {
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.ticker {
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #121010;
}
.ticker-track {
  display: flex;
  flex: none;
  white-space: nowrap;
  font-size: 42px;
  letter-spacing: 0.05em;
  color: var(--cream);
  animation: ticker 42s linear infinite;
}
.ticker-track span {
  padding: 0 26px;
}
.ticker-track i {
  font-style: normal;
  color: #c9463d;
}
@keyframes ticker {
  to { transform: translateX(-33.3333%); }
}

/* ---------- floating skill tiles (rendered in Blender, see /3d) ---------- */
.tile-float .float {
  animation: bob var(--dur, 6s) ease-in-out var(--delay, 0s) infinite alternate;
}
.tile-float img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.tile-float.back img {
  filter: blur(1.4px) saturate(0.9);
  opacity: 0.88;
}
.tile-float .cap {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: 0.06em;
  text-align: center;
  white-space: nowrap;
  color: var(--maroon);
  transform: translateX(-50%);
  margin-left: 50%;
}
@keyframes bob {
  from { transform: translate3d(0, -9px, 0) rotate(var(--r0, -3deg)); }
  to { transform: translate3d(0, 9px, 0) rotate(var(--r1, 3deg)); }
}

.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;
}

/* ---------- skills record: spinning image + still sheen + hover label ---------- */
.im.vinyl {
  overflow: visible;
}
.vinyl .sheen {
  pointer-events: none; /* a still highlight: the record turns underneath it */
}
.tile-tip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  padding: 7px 14px 5px;
  border-radius: 999px;
  background: #121010;
  color: var(--cream);
  font-size: 22px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 18px)) scale(0.92);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.tile-tip.show {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 18px)) scale(1);
}

/* ---------- floating tiles: lift + tilt toward the cursor ---------- */
.tile-float img {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease, opacity 0.35s ease;
}
.tile-float.front:hover img {
  transform: perspective(600px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-10px) scale(1.14);
  filter: drop-shadow(0 18px 20px rgba(18, 16, 16, 0.3));
}
.tile-float .cap {
  transition: color 0.25s ease, letter-spacing 0.25s ease;
}
.tile-float.front:hover .cap {
  color: #121010;
  letter-spacing: 0.1em;
}
.tile-float.back:hover img {
  filter: none;
  opacity: 1;
  transform: scale(1.12);
}

/* ---------- receipt: real links laid over the printed lines ---------- */
.rcpt-link {
  position: absolute;
  display: block;
  border-radius: 6px;
  pointer-events: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.receipt.done .rcpt-link {
  pointer-events: auto;
}
.receipt.done .rcpt-link:hover,
.rcpt-link:focus-visible {
  background: rgba(141, 31, 31, 0.13);
  box-shadow: inset 0 0 0 2px rgba(141, 31, 31, 0.55);
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .spin,
  .ticker-track,
  .tile-float .float,
  [data-anim].in {
    animation: none !important;
  }
  .js [data-anim]:not(.in) {
    opacity: 1 !important;
    translate: none !important;
  }
  .js [data-anim="type"] .ch {
    visibility: visible;
  }
}
