/* =========================================================
   Abdullah Rafique — Portfolio
   Palette: Beige (main) · Navy (secondary) · Yellow (accent)
   ========================================================= */
:root {
  --beige: #EFE6D4;
  --beige-2: #E6D9C0;
  --beige-3: #D9C8A6;
  --navy: #14213D;
  --navy-2: #1C2E54;
  --navy-3: #0C162B;
  --yellow: #F2C14E;
  --yellow-2: #F7D774;
  --ink: var(--navy);
  --paper: var(--beige);

  --f-display: "Fraunces", Georgia, serif;
  --f-body: "Manrope", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(20px, 4vw, 64px);
  --rail: 84px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--beige);
  color: var(--navy);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  overflow-x: clip;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-style: italic; }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
::selection { background: var(--yellow); color: var(--navy); }

@media (hover: hover) and (pointer: fine) { html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; } }

/* ---------- Preloader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--navy); color: var(--beige);
  display: grid; place-items: center;
  overflow: hidden;
}
.loader__inner { width: min(520px, 84vw); position: relative; z-index: 2; }
.loader__word { display: flex; gap: .3em; font-family: var(--f-display); font-size: clamp(28px, 5vw, 48px); font-weight: 300; overflow: hidden; }
.loader__word span { display: inline-block; }
.loader__word span:last-child { font-style: italic; color: var(--yellow); }
.loader__count { font-family: var(--f-display); font-size: clamp(90px, 18vw, 200px); line-height: .9; font-weight: 800; letter-spacing: -.04em; margin: 18px 0 14px; font-variant-numeric: tabular-nums; }
.loader__count sup { font-size: .25em; vertical-align: top; color: var(--yellow); font-weight: 400; margin-left: .1em; }
.loader__bar { height: 2px; background: rgba(239,230,212,.15); overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 100%; background: var(--yellow); transform: scaleX(0); transform-origin: left; }
.loader__meta { margin-top: 14px; opacity: .55; }
.loader__panel { position: absolute; inset: 0; background: var(--yellow); transform: translateY(100%); z-index: 1; }

/* ---------- Grain / cursor / progress ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 900; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); } 40% { transform: translate(2%,-4%); }
  60% { transform: translate(-4%,-1%); } 80% { transform: translate(3%,3%); }
}

.cursor { position: fixed; left: 0; top: 0; z-index: 950; pointer-events: none; display: none; }
html.has-cursor .cursor { display: block; }
.cursor__dot { position: fixed; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--navy); }
.cursor__ring {
  position: fixed; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  border: 1px solid var(--navy); display: grid; place-items: center;
  transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), background .3s, border-color .3s;
}
.cursor__label { font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--navy); opacity: 0; transform: scale(.6); transition: .3s var(--ease); white-space: nowrap; }
.cursor.is-hover .cursor__ring { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: var(--yellow); border-color: var(--yellow); }
.cursor.is-hover .cursor__label { opacity: 1; transform: none; }
.cursor.is-hover .cursor__dot { opacity: 0; }
.cursor.on-dark .cursor__dot { background: var(--beige); }
.cursor.on-dark .cursor__ring { border-color: var(--beige); }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 800; }
.progress i { display: block; height: 100%; background: var(--yellow); transform-origin: left; transform: scaleX(0); }

/* ---------- Top-left icon rail ---------- */
.rail {
  position: fixed; top: 22px; left: 22px; z-index: 700;
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
}
.rail__brand {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--navy); color: var(--yellow);
  font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: -.02em;
  box-shadow: 0 10px 30px -12px rgba(20,33,61,.5);
}
.rail__list { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 20px;
  background: rgba(239,230,212,.6); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgba(20,33,61,.1);
}
.rail__item { position: relative; display: flex; align-items: center; }
/* Blank icon slot — drop an <svg> or <img> inside .rail__icon later */
.rail__icon {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  border: 1.5px dashed rgba(20,33,61,.35);
  transition: background .35s var(--ease), border-color .35s, transform .5s var(--ease);
}
.rail__icon:empty::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(20,33,61,.25); transition: .35s; }
.rail__item:hover .rail__icon, .rail__item.is-active .rail__icon { background: var(--navy); border-color: var(--navy); border-style: solid; transform: rotate(-8deg); }
.rail__item:hover .rail__icon::after, .rail__item.is-active .rail__icon::after { background: var(--yellow); }
.rail__label {
  position: absolute; left: calc(100% + 16px); white-space: nowrap;
  font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  background: var(--navy); color: var(--beige); padding: 6px 10px; border-radius: 8px;
  opacity: 0; transform: translateX(-8px); pointer-events: none; transition: .35s var(--ease);
}
.rail__item:hover .rail__label { opacity: 1; transform: none; }
.rail.on-dark .rail__list { background: rgba(20,33,61,.55); border-color: rgba(239,230,212,.15); }
.rail.on-dark .rail__icon { border-color: rgba(239,230,212,.4); }
.rail.on-dark .rail__icon:empty::after { background: rgba(239,230,212,.4); }
.rail.on-dark .rail__item:hover .rail__icon, .rail.on-dark .rail__item.is-active .rail__icon { background: var(--yellow); border-color: var(--yellow); }
.rail.on-dark .rail__item:hover .rail__icon::after, .rail.on-dark .rail__item.is-active .rail__icon::after { background: var(--navy); }
.rail.on-dark .rail__brand { background: var(--yellow); color: var(--navy); }

/* ---------- Top bar ---------- */
.topbar { position: fixed; top: 22px; right: 22px; z-index: 700; display: flex; align-items: center; gap: 18px; mix-blend-mode: normal; }
.topbar__clock { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; background: rgba(239,230,212,.6); backdrop-filter: blur(12px); border: 1px solid rgba(20,33,61,.1); font-variant-numeric: tabular-nums; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: #3BB273; box-shadow: 0 0 0 0 rgba(59,178,115,.6); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(59,178,115,0); } 100% { box-shadow: 0 0 0 0 rgba(59,178,115,0); } }
.topbar.on-dark .topbar__clock { background: rgba(20,33,61,.55); color: var(--beige); border-color: rgba(239,230,212,.15); }

.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 20px; border-radius: 999px;
  background: var(--navy); color: var(--beige); font-weight: 600; font-size: 14px; position: relative; overflow: hidden;
  isolation: isolate;
}
.pill::before { content: ""; position: absolute; inset: 0; background: var(--yellow); border-radius: inherit; transform: translateY(101%); transition: transform .5s var(--ease); z-index: -1; }
.pill:hover::before { transform: none; }
.pill:hover { color: var(--navy); }
.pill__arrow { display: inline-block; transition: transform .5s var(--ease); }
.pill:hover .pill__arrow { transform: rotate(45deg); }
.topbar.on-dark .pill { background: var(--yellow); color: var(--navy); }
.topbar.on-dark .pill::before { background: var(--beige); }

/* ---------- Shared section bits ---------- */
section { position: relative; }
[data-theme="navy"] { background: var(--navy); color: var(--beige); }
.section-head { display: grid; grid-template-columns: 120px 1fr; gap: 12px 24px; align-items: end; margin-bottom: clamp(40px, 7vw, 90px); }
.section-num { opacity: .6; align-self: start; padding-top: 1.4em; }
.section-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(48px, 9vw, 140px); line-height: .92; letter-spacing: -.035em; font-variation-settings: "opsz" 144; }
.section-title em { color: var(--yellow); font-weight: 300; }
[data-theme] .section-title em { color: var(--yellow); }
.section:not([data-theme]) .section-title em { color: var(--navy-2); }
.section-sub { grid-column: 2; max-width: 560px; font-size: clamp(16px, 1.4vw, 19px); opacity: .8; }

.line { display: block; overflow: hidden; padding-bottom: .06em; }
.split .ch, .split-lines .ch { display: inline-block; will-change: transform; }
.word { display: inline-block; white-space: nowrap; }

/* ---------- HERO ---------- */
.hero {
  min-height: 100svh; padding: calc(var(--pad) + 40px) var(--pad) var(--pad) calc(var(--pad) + var(--rail));
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
}
.hero__field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__content { position: relative; z-index: 2; margin-top: auto; margin-bottom: auto; padding-top: 6vh; }
.hero__eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.tag { background: var(--navy); color: var(--yellow); padding: 4px 8px; border-radius: 6px; }
.hero__title {
  font-family: var(--f-display); font-weight: 400; font-size: clamp(64px, 15vw, 250px);
  line-height: .86; letter-spacing: -.05em; font-variation-settings: "opsz" 144;
}
.hero__title em { font-weight: 300; color: var(--navy-2); }
.line--indent { padding-left: clamp(30px, 10vw, 180px); display: flex; align-items: center; gap: .1em; }
.hero__star { display: inline-block; color: var(--yellow); font-size: .45em; -webkit-text-stroke: 2px var(--navy); }
.hero__intro { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 30px; margin-top: clamp(30px, 5vw, 60px); max-width: 1100px; }
.hero__intro p { font-size: clamp(18px, 1.8vw, 26px); line-height: 1.35; max-width: 560px; }
.hero__intro strong { font-weight: 700; background: linear-gradient(transparent 62%, var(--yellow) 62%); }
.rotator { display: inline-grid; vertical-align: bottom; overflow: hidden; height: 1.35em; font-family: var(--f-display); font-style: italic; color: var(--navy-2); }
.rotator__word { display: inline-block; }
.hero__cta { display: inline-flex; align-items: center; gap: 14px; }
.hero__cta-circle { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--navy); display: grid; place-items: center; transition: background .4s, color .4s; }
.hero__cta:hover .hero__cta-circle { background: var(--navy); color: var(--yellow); }
.hero__cta-circle svg { animation: bob 2s var(--ease) infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }
.hero__foot { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 20px; padding-top: 30px; border-top: 1px solid rgba(20,33,61,.15); opacity: .75; }

/* ---------- MARQUEE ---------- */
.marquee { background: var(--navy); color: var(--beige); padding: 26px 0; overflow: hidden; transform: rotate(-2deg) scale(1.04); margin: 30px 0 80px; position: relative; z-index: 3; }
.marquee__track { display: flex; width: max-content; }
.marquee__row { display: flex; align-items: center; gap: 36px; padding-right: 36px; font-family: var(--f-display); font-size: clamp(32px, 5vw, 72px); font-weight: 300; white-space: nowrap; letter-spacing: -.02em; }
.marquee__row i { font-style: normal; color: var(--yellow); font-size: .6em; }
.marquee__track--alt { margin-top: 10px; }
.marquee__track--alt .marquee__row { font-family: var(--f-mono); font-size: clamp(14px, 1.4vw, 18px); text-transform: uppercase; letter-spacing: .1em; opacity: .7; }
.marquee__track--alt .marquee__row i { font-size: .6em; }

/* ---------- WHAT I DO ---------- */
.what { padding: clamp(60px, 10vw, 140px) var(--pad) clamp(80px, 12vw, 160px) calc(var(--pad) + var(--rail)); }
.what__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; perspective: 1200px; }
.card-what {
  position: relative; padding: 28px 26px 34px; border-radius: 26px; min-height: 360px;
  background: var(--beige-2); border: 1px solid rgba(20,33,61,.08);
  display: flex; flex-direction: column; transform-style: preserve-3d;
  transition: background .5s var(--ease), color .5s var(--ease);
  overflow: hidden;
}
.card-what::before { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: var(--yellow); filter: blur(50px); opacity: 0; left: var(--mx, 50%); top: var(--my, 50%); transform: translate(-50%, -50%); transition: opacity .4s; pointer-events: none; }
.card-what:hover { background: var(--navy); color: var(--beige); }
.card-what:hover::before { opacity: .35; }
.card-what > * { position: relative; transform: translateZ(30px); }
.card-what__num { opacity: .5; }
.card-what__icon { width: 64px; height: 64px; border-radius: 18px; border: 1.5px dashed currentColor; opacity: .35; margin: 28px 0 auto; }
.card-what h3 { font-family: var(--f-display); font-weight: 500; font-size: clamp(24px, 2vw, 30px); line-height: 1.05; letter-spacing: -.02em; margin: 40px 0 12px; }
.card-what p { font-size: 15px; opacity: .78; }

/* ---------- WORK ---------- */
.work { padding: clamp(80px, 12vw, 160px) var(--pad) clamp(80px, 12vw, 160px) calc(var(--pad) + var(--rail)); border-radius: 40px 40px 0 0; margin-top: -40px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(239,230,212,.2); }
.stat { padding: 34px 20px 34px 0; border-right: 1px solid rgba(239,230,212,.2); }
.stat:last-child { border-right: 0; }
.stat + .stat { padding-left: 24px; }
.stat__num { font-family: var(--f-display); font-size: clamp(56px, 8vw, 128px); line-height: 1; font-weight: 300; letter-spacing: -.04em; color: var(--yellow); font-variant-numeric: tabular-nums; }
.stat__num sup { font-size: .4em; vertical-align: top; }
.stat__label { margin-top: 12px; opacity: .7; }
.stats--3 { grid-template-columns: repeat(3, 1fr); }
.ink-light { color: var(--yellow); border-bottom: 1px solid var(--yellow); }

/* ---------- PROJECTS (horizontal) ---------- */
.projects { background: var(--beige); }
.projects__pin { height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding: 0 0 0 calc(var(--pad) + var(--rail)); }
.projects__head { display: flex; align-items: flex-end; gap: 24px; padding-right: var(--pad); margin-bottom: 4vh; }
.projects__head .section-title { font-size: clamp(44px, 7vw, 110px); }
.projects__head .section-title em { color: var(--navy-2); }
.projects__counter { margin-left: auto; padding-bottom: 1.4em; font-size: 14px; }
.projects__track { display: flex; gap: 28px; width: max-content; padding-right: var(--pad); will-change: transform; }
.proj {
  width: min(78vw, 980px); height: min(60vh, 560px); border-radius: 32px; display: grid; grid-template-columns: 1.15fr 1fr;
  background: var(--navy); color: var(--beige); overflow: hidden; position: relative; flex-shrink: 0;
}
.proj__art { position: relative; overflow: hidden; background: var(--navy-2); }
.proj__meta { padding: clamp(24px, 3vw, 44px); display: flex; flex-direction: column; }
.proj__num { color: var(--yellow); }
.proj__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(34px, 4vw, 64px); line-height: .95; letter-spacing: -.03em; margin: auto 0 18px; }
.proj__meta p { opacity: .75; font-size: 15px; max-width: 360px; }
.proj__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.proj__tags li { padding: 6px 10px; border: 1px solid rgba(239,230,212,.25); border-radius: 999px; font-size: 11px; }
.proj:hover .proj__art > * { transform: scale(1.06) rotate(-1.5deg); }
.proj__art > * { transition: transform 1s var(--ease); }

/* ---------- Project previews (showcase) ---------- */
.proj__art--dict    { background: var(--beige-3); color: var(--navy); }
.proj__art--collage { background: radial-gradient(circle at 50% 45%, #2E4785, var(--navy-2) 65%); color: var(--beige); }
.proj__art--keys    { background: var(--yellow); color: var(--navy); }
.proj__art::after { /* soft dot texture */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background-image: radial-gradient(currentColor 1px, transparent 1.4px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 75%);
          mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 75%);
}
.show { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; }
.show > * { grid-area: 1 / 1; }
.show__icon {
  position: relative; z-index: 3; width: clamp(120px, 15vw, 196px); height: auto; aspect-ratio: 1; border-radius: 23%;
  box-shadow: 0 34px 60px -24px rgba(12,22,43,.6), 0 0 0 1px rgba(255,255,255,.08);
}
.show__float { animation: showFloat 5.5s ease-in-out infinite; }
@keyframes showFloat { 50% { translate: 0 -10px; } }
.show__ring {
  width: clamp(200px, 25vw, 320px); aspect-ratio: 1; border-radius: 50%;
  border: 1.5px dashed currentColor; opacity: .28; animation: showSpin 34s linear infinite;
}
.show__ring--2 { width: clamp(270px, 34vw, 430px); border-style: solid; opacity: .12; animation-duration: 60s; animation-direction: reverse; }
@keyframes showSpin { to { rotate: 360deg; } }
.show__glow { width: clamp(160px, 20vw, 260px); aspect-ratio: 1; border-radius: 50%; filter: blur(40px); opacity: .55; background: var(--beige); }
.proj__art--dict .show__glow { background: #F7F0E2; }
.proj__art--collage .show__glow { background: #6E5BFF; opacity: .45; }
.proj__art--keys .show__glow { background: #FFF3C4; }
.show__chip {
  position: absolute; z-index: 4; white-space: nowrap;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
  padding: 8px 13px; border-radius: 999px; background: var(--navy); color: var(--beige);
  box-shadow: 0 14px 30px -14px rgba(12,22,43,.6);
  animation: showBob 4.5s ease-in-out infinite;
}
.show__chip--a { top: 16%; left: 9%; }
.show__chip--b { top: 26%; right: 8%; animation-delay: -1.5s; }
.show__chip--c { bottom: 15%; left: 50%; margin-left: -60px; animation-delay: -3s; }
.show__chip--b { background: var(--yellow); color: var(--navy); }
.proj__art--keys .show__chip--b { background: var(--beige); }
.proj__art--collage .show__chip { background: var(--beige); color: var(--navy); }
.proj__art--collage .show__chip--b { background: var(--yellow); }
@keyframes showBob { 50% { translate: 0 -6px; } }
.proj:hover .show__ring { opacity: .45; }

/* ---------- ABOUT ---------- */
.about { padding: clamp(100px, 14vw, 200px) var(--pad) clamp(100px, 14vw, 200px) calc(var(--pad) + var(--rail)); }
.about .section-num { display: block; margin-bottom: 40px; padding: 0; }
.about__text { font-family: var(--f-display); font-weight: 300; font-size: clamp(28px, 3.8vw, 58px); line-height: 1.12; letter-spacing: -.02em; max-width: 1200px; }
.about__text .w { opacity: .15; transition: none; }
.ink { font-style: italic; font-weight: 500; border-bottom: 2px solid var(--yellow); }
.hl { background: var(--yellow); padding: 0 .15em; border-radius: .15em; font-style: italic; }

/* ---------- CONTACT ---------- */
.contact { padding: clamp(100px, 12vw, 160px) var(--pad) 30px calc(var(--pad) + var(--rail)); border-radius: 40px 40px 0 0; overflow: hidden; }
.contact__big { font-family: var(--f-display); font-weight: 400; font-size: clamp(72px, 16vw, 260px); line-height: .86; letter-spacing: -.05em; margin: 30px 0 40px; }
.contact__big em { color: var(--yellow); font-weight: 300; }
.contact__btn {
  position: absolute; right: clamp(24px, 10vw, 180px); top: clamp(140px, 18vw, 280px);
  width: clamp(140px, 14vw, 200px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: var(--yellow); color: var(--navy); font-weight: 700; font-size: 16px; text-align: center;
  overflow: hidden; isolation: isolate;
}
.contact__btn::before { content: ""; position: absolute; inset: 0; background: var(--beige); border-radius: 50%; transform: scale(0); transition: transform .6s var(--ease); z-index: -1; }
.contact__btn:hover::before { transform: scale(1); }
.contact__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-top: 50px; border-top: 1px solid rgba(239,230,212,.2); }
.contact__grid--2 { grid-template-columns: 1fr 1.2fr; }
.contact__k { display: block; color: var(--yellow); margin-bottom: 18px; }
.link-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid rgba(239,230,212,.15); font-family: var(--f-display); font-size: clamp(20px, 2vw, 28px); position: relative; }
.link-row::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--yellow); transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.link-row:hover::after { transform: scaleX(1); transform-origin: left; }
.link-row i { font-style: normal; transition: transform .5s var(--ease); }
.link-row:hover i { transform: rotate(45deg); color: var(--yellow); }
.contact__addr { font-family: var(--f-display); font-size: clamp(22px, 2vw, 30px); line-height: 1.2; }
.contact__addr small { display: block; font-family: var(--f-body); font-size: 14px; opacity: .65; margin-top: 10px; line-height: 1.5; }
.footer { display: flex; justify-content: space-between; gap: 20px; margin-top: clamp(80px, 10vw, 140px); padding-top: 24px; border-top: 1px solid rgba(239,230,212,.15); opacity: .7; }

/* ---------- JS-gated initial states (content stays visible without JS) ---------- */
html.js .reveal-up { opacity: 0; transform: translateY(40px); }
html.js .hero__title .ch, html.js .contact__big .ch { transform: translateY(110%); }
html.js .split-lines .ch { transform: translateY(105%); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .what__grid { grid-template-columns: repeat(2, 1fr); }
  .stat__num { font-size: clamp(48px, 7vw, 100px); }
}
@media (max-width: 760px) {
  :root { --rail: 0px; }
  .rail { top: 14px; left: 14px; flex-direction: row; align-items: center; }
  .rail__brand { width: 44px; height: 44px; border-radius: 13px; font-size: 15px; }
  .rail__list { flex-direction: row; padding: 5px; gap: 4px; border-radius: 15px; }
  .rail__icon { width: 32px; height: 32px; border-radius: 9px; }
  .rail__label { display: none; }
  .topbar { top: auto; bottom: 14px; right: 14px; }
  .topbar__clock { display: none; }
  .hero { padding-top: 110px; }
  .hero__foot span:nth-child(2) { display: none; }
  .section-head { grid-template-columns: 1fr; }
  .section-sub { grid-column: 1; }
  .section-num { padding-top: 0; }
  .what__grid, .contact__grid, .stats--3 { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: 26px 0; border-right: 0; border-bottom: 1px solid rgba(239,230,212,.2); }
  .card-what { min-height: 0; }
  .projects__pin { height: auto; padding: 80px var(--pad); }
  .projects__track { flex-direction: column; width: 100%; padding: 0; }
  .proj { width: 100%; height: auto; grid-template-columns: 1fr; }
  .proj__art { height: 300px; }
  .show__chip--c { bottom: 8%; }
  .show__chip { font-size: 10px; padding: 6px 10px; }
  .projects__counter { display: none; }
  .contact__btn { position: relative; right: auto; top: auto; margin-bottom: 50px; }
  .footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .grain { display: none; }
}

/* =========================================================
   Icons (Lucide line icons) + app icons + store button
   ========================================================= */
/* top-left rail */
.rail__icon:not(:empty) { border-style: solid; border-color: rgba(20,33,61,.12); color: var(--navy); }
.rail__icon svg { width: 18px; height: 18px; transition: transform .5s var(--ease); }
.rail__item:hover .rail__icon, .rail__item.is-active .rail__icon { color: var(--yellow); }
.rail__item:hover .rail__icon svg { transform: rotate(8deg) scale(1.08); }
.rail.on-dark .rail__icon:not(:empty) { border-color: rgba(239,230,212,.18); color: var(--beige); }
.rail.on-dark .rail__item:hover .rail__icon, .rail.on-dark .rail__item.is-active .rail__icon { color: var(--navy); }

/* what-I-do cards */
.card-what__icon:not(:empty) {
  display: grid; place-items: center; opacity: 1; border: 0;
  background: var(--navy); color: var(--yellow);
  transition: background .5s var(--ease), color .5s var(--ease), transform .6s var(--ease);
}
.card-what__icon svg { width: 30px; height: 30px; }
.card-what:hover .card-what__icon { background: var(--yellow); color: var(--navy); transform: translateZ(30px) rotate(-8deg) scale(1.05); }

/* project cards: app icon + number row */

/* Google Play button */
.proj__store {
  align-self: flex-start; margin-top: 22px; display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 16px 11px 14px; border-radius: 999px; background: var(--yellow); color: var(--navy);
  font-weight: 700; font-size: 14px; position: relative; overflow: hidden; isolation: isolate;
}
.proj__store svg { width: 18px; height: 18px; }
.proj__store i { font-style: normal; transition: transform .5s var(--ease); }
.proj__store::before { content: ""; position: absolute; inset: 0; background: var(--beige); transform: translateY(101%); transition: transform .5s var(--ease); z-index: -1; }
.proj:hover .proj__store::before { transform: none; }
.proj:hover .proj__store i { transform: rotate(45deg); }
.proj__tags { margin-top: 18px; }

/* bigger tap area for footer links */
.footer a { display: inline-block; padding: 12px 0; margin: -12px 0; }
