/* saif.bd — Saiful Islam
   Modernised from saifulislam.info: the four-circle menu (orange, olive, blue,
   crimson) on a cool paper background, now as the site's whole colour system. */

:root {
  --paper: #EEF0F1;
  --paper-2: #E4E8EA;
  --card: #F8F9FA;
  --ink: #18212E;
  --ink-2: #394C5E;          /* the original body colour */
  --muted: #566275;
  --line: rgba(24, 33, 46, .12);

  --orange: #E0611A;
  --olive: #7C9A0E;
  --blue: #3A4F8C;
  --crimson: #C41C3A;
  /* text-safe shades (WCAG AA on paper and under white text) */
  --orange-ink: #B5480C;
  --olive-ink: #5A7207;

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --radius: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --c: var(--ink);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* fine grain, so the paper doesn't look flat */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  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='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .foot, .nav { position: relative; z-index: 1; }
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { flex-shrink: 0; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--c, var(--ink)); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 200; padding: 10px 16px;
  background: var(--ink); color: var(--paper); border-radius: 999px; text-decoration: none;
}
.skip:focus { top: 16px; }

/* ------------------------------------------------------------ buttons */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  display: inline-flex; align-items: center; gap: .55em;
  padding: 1em 1.6em; border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font: 600 15px/1 var(--body); letter-spacing: .01em; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  will-change: transform;
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn--ink:hover { box-shadow: 0 10px 30px -10px rgba(24, 33, 46, .55); }
.btn--ghost { --bg: transparent; --fg: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--sm { padding: .8em 1.25em; font-size: 14px; }
.btn--light { --bg: #fff; --fg: var(--crimson); }
.btn--light:hover { box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .45); }
.btn--line { --bg: transparent; --fg: #fff; border-color: rgba(255, 255, 255, .45); }
.btn--line:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

/* ------------------------------------------------------------ intro */
.intro { display: none; }
.js .intro {
  position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  background: var(--paper); pointer-events: none;
  animation: intro-out .7s var(--ease-out) 1.15s forwards;
}
.intro__dot {
  width: 54px; height: 54px; border-radius: 50%; background: var(--c); margin: 0 -9px;
  mix-blend-mode: multiply; opacity: 0; transform: translateY(30px) scale(.4);
  animation: intro-dot .8s var(--ease-out) forwards;
}
.intro__dot:nth-child(2) { animation-delay: .08s; }
.intro__dot:nth-child(3) { animation-delay: .16s; }
.intro__dot:nth-child(4) { animation-delay: .24s; }
@keyframes intro-dot { to { opacity: 1; transform: none; } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; transform: scale(1.04); } }

/* ------------------------------------------------------------ progress + cursor */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 120; pointer-events: none; }
.progress span {
  display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--orange) 0 25%, var(--olive) 25% 50%, var(--blue) 50% 75%, var(--crimson) 75%);
}

.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .has-cursor .cursor { display: block; position: fixed; inset: 0; z-index: 250; pointer-events: none; }
  .cursor__dot, .cursor__ring { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform; }
  .cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--cursor, var(--ink)); transition: background .3s; }
  .cursor__ring {
    width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1.5px solid var(--cursor, var(--ink)); opacity: .35;
    transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), opacity .35s, border-color .3s, background .3s;
  }
  .cursor.is-hover .cursor__ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; opacity: .9; background: color-mix(in srgb, var(--cursor, var(--ink)) 10%, transparent); }
  .cursor.is-hidden { opacity: 0; }
}

/* ------------------------------------------------------------ nav */
.nav {
  position: fixed; top: 14px; left: 50%; z-index: 100;
  width: min(calc(100% - 2 * var(--gutter)), var(--max));
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 24px;
  padding: 10px 10px 10px 18px; border-radius: 999px;
  background: rgba(238, 240, 241, .72);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid transparent;
  transition: border-color .4s, box-shadow .4s, background .4s, transform .5s var(--ease-out);
}
.nav.is-scrolled { border-color: var(--line); box-shadow: 0 10px 40px -20px rgba(24, 33, 46, .35); background: rgba(246, 247, 248, .8); }
.nav.is-hidden { transform: translate(-50%, -140%); }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand__dots { display: inline-flex; }
.brand__dots i { width: 13px; height: 13px; border-radius: 50%; margin-right: -4px; mix-blend-mode: multiply; transition: transform .45s var(--ease); }
.brand__dots i:nth-child(1) { background: var(--orange); }
.brand__dots i:nth-child(2) { background: var(--olive); transition-delay: .03s; }
.brand__dots i:nth-child(3) { background: var(--blue); transition-delay: .06s; }
.brand__dots i:nth-child(4) { background: var(--crimson); transition-delay: .09s; }
.brand:hover .brand__dots i { transform: translateY(-4px); }
.brand__name { font: 700 19px/1 var(--display); letter-spacing: -.01em; padding-left: 4px; }
.brand__name b { font-weight: 300; margin-left: .25em; }

.nav__links { display: flex; gap: 4px; }
.nav__links a {
  position: relative; padding: 9px 14px; border-radius: 999px; text-decoration: none;
  font: 500 14.5px/1 var(--body); color: var(--ink-2); transition: color .25s, background .25s;
}
.nav__links a::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c);
  margin-right: 8px; vertical-align: 1px; transform: scale(.6); opacity: .6; transition: transform .3s var(--ease), opacity .3s;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); background: rgba(24, 33, 46, .05); }
.nav__links a:hover::before, .nav__links a.is-active::before { transform: scale(1); opacity: 1; }

.nav__toggle { display: none; }

@media (max-width: 860px) {
  .nav { gap: 10px; padding: 8px 8px 8px 16px; }
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__toggle {
    display: grid; place-content: center; gap: 6px; width: 44px; height: 44px; border-radius: 50%;
    background: var(--ink); border: 0; cursor: pointer;
  }
  .nav__toggle span { display: block; width: 18px; height: 2px; background: var(--paper); border-radius: 2px; transition: transform .35s var(--ease); }
  .nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
}

/* mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px;
  padding: 100px var(--gutter) 40px; background: var(--paper);
  clip-path: circle(0 at calc(100% - 46px) 46px); transition: clip-path .7s var(--ease-out);
}
.menu[hidden] { display: flex; visibility: hidden; }
.menu.is-open { clip-path: circle(150% at calc(100% - 46px) 46px); visibility: visible; }
.menu__orbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; width: min(100%, 340px); }
.menu__orb {
  aspect-ratio: 1; border-radius: 50%; background: var(--c); display: grid; place-items: center;
  margin: -6%; mix-blend-mode: multiply; text-decoration: none; color: #fff;
  font: 400 clamp(26px, 8vw, 34px)/1 var(--display); font-stretch: 78%;
  transform: scale(.4); opacity: 0; transition: transform .6s var(--ease-out), opacity .4s;
}
.menu.is-open .menu__orb { transform: none; opacity: 1; }
.menu.is-open .menu__orb:nth-child(2) { transition-delay: .06s; }
.menu.is-open .menu__orb:nth-child(3) { transition-delay: .12s; }
.menu.is-open .menu__orb:nth-child(4) { transition-delay: .18s; }
.menu__orb span { mix-blend-mode: normal; }

/* ------------------------------------------------------------ hero */
.hero {
  position: relative; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: clamp(22px, 3.2vh, 36px);
  width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto;
  padding: 120px 0 90px;
}
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font: 500 13px/1.4 var(--mono); color: var(--muted); letter-spacing: .02em; }
.hero__sep { opacity: .4; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--olive); position: relative; }
.pulse::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--olive); animation: pulse 2s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }

.hero__title {
  margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 82%;
  font-size: clamp(64px, 27vw, 248px); line-height: .84; letter-spacing: -.035em;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero__title .line--outline { color: var(--paper); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; padding-left: .55em; }
.split { display: inline-block; }
.split .ch { display: inline-block; will-change: transform; }
.js .split .ch { transform: translateY(105%); }
.is-ready .split .ch { transform: none; transition: transform 1.1s var(--ease-out) calc(var(--d) * 45ms + 1.2s); }
.hero__title .line--outline .ch { transition-property: transform, color; }
.hero__title .line--outline:hover .ch { color: var(--ink); transition-delay: calc(var(--d) * 25ms); transition-duration: .5s; }

.hero__role { margin: 0; max-width: 34ch; font: 400 clamp(22px, 2.6vw, 34px)/1.25 var(--display); letter-spacing: -.01em; color: var(--ink-2); }
.rotator { display: inline-block; position: relative; color: var(--ink); font-weight: 600; }
.rotator > span { display: inline-block; transition: transform .45s var(--ease), opacity .45s; }
.rotator > span.is-out { transform: translateY(-40%); opacity: 0; }
.rotator > span.is-in { transform: translateY(40%); opacity: 0; transition: none; }
.rotator::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.08em; height: .12em; border-radius: 99px;
  background: linear-gradient(90deg, var(--orange), var(--olive), var(--blue), var(--crimson)); opacity: .85;
}

/* the four circles */
.orbs { display: flex; padding: 6px 0; margin-left: -4px; }
.orb {
  --s: clamp(92px, 19vw, 210px);
  position: relative; flex: none; width: var(--s); height: var(--s); margin-right: calc(var(--s) * -.14);
  border-radius: 50%; background: var(--c); color: #fff; text-decoration: none;
  display: grid; place-items: center; mix-blend-mode: multiply; z-index: calc(4 - var(--i));
  transition: transform .6s var(--ease-out), z-index 0s .2s;
  will-change: transform;
}
.js .orb { opacity: 0; transform: translateY(40px) scale(.7); }
.is-ready .orb { opacity: 1; transform: none; transition: transform 1s var(--ease-out) calc(1.35s + var(--i) * .09s), opacity .8s calc(1.35s + var(--i) * .09s); }
.is-ready.is-settled .orb { transition: transform .6s var(--ease-out), opacity .3s; }
.orb:hover, .orb:focus-visible { z-index: 10; transition-delay: 0s; }
.orb__label { font: 600 clamp(19px, 2.4vw, 34px)/1 var(--display); font-stretch: 76%; letter-spacing: .01em; transition: transform .5s var(--ease-out); }
.orb__num { display: none; }
.orb__ring { position: absolute; inset: -9px; width: calc(100% + 18px); height: calc(100% + 18px); pointer-events: none; }
.orb__ring circle {
  fill: none; stroke: var(--c); stroke-width: 1; stroke-dasharray: 2 4.5; opacity: 0;
  transform-origin: 50% 50%; transition: opacity .4s;
}
.orb:hover .orb__ring circle, .orb:focus-visible .orb__ring circle { opacity: 1; animation: spin 9s linear infinite; }
.orb:hover .orb__label { transform: scale(1.08); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 560px) {
  .orb { --s: calc((100vw - 2 * var(--gutter)) / 3.62); }
}
/* idle float once the entrance has finished (uses `translate`, so it composes with the magnetic `transform`) */
.is-settled .orb { animation: float 7s ease-in-out infinite; animation-delay: calc(var(--i) * -1.7s); }
@keyframes float { 50% { translate: 0 -7px; } }

/* wide screens: name on the left, the four circles as a 2x2 cluster on the right */
@media (min-width: 1100px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px;
    grid-template-areas: "meta orbs" "title orbs" "role orbs" "foot foot";
  }
  .hero__meta { grid-area: meta; }
  .hero__title { grid-area: title; }
  .hero__role { grid-area: role; }
  .hero__foot { grid-area: foot; margin-top: 8px; }
  .orbs { grid-area: orbs; align-self: center; justify-self: end; display: grid; grid-template-columns: repeat(2, auto); margin: 0; padding: 0; }
  .orb { --s: clamp(200px, 17.5vw, 262px); margin: calc(var(--s) * -.055); }
  .orb__label { font-size: clamp(28px, 2.5vw, 38px); }
}

.hero__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 12px; border-radius: 999px;
  font: 500 13.5px/1.2 var(--body); color: var(--ink-2); background: var(--card); border: 1px solid var(--line);
}
.badge svg { width: 16px; height: 16px; fill: var(--orange); }

.scrollcue { position: absolute; bottom: 26px; left: 50%; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid var(--line); border-radius: 99px; }
.scrollcue span { position: absolute; left: 50%; top: 9px; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px; background: var(--ink); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(-4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@media (max-height: 760px), (max-width: 560px) { .scrollcue { display: none; } }

/* ------------------------------------------------------------ stats */
.stats {
  width: min(100% - 2 * var(--gutter), var(--max)); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { padding: clamp(26px, 4vw, 44px) clamp(10px, 2vw, 28px); border-left: 1px solid var(--line); display: grid; gap: 6px; align-content: start; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat strong { font: 700 clamp(36px, 5.2vw, 68px)/1 var(--display); letter-spacing: -.03em; color: var(--c); font-variant-numeric: tabular-nums; }
.stat > span { font-size: 14px; color: var(--muted); }
.stat strong.stat__word { font-size: clamp(30px, 4.2vw, 56px); padding-top: .1em; }
@media (max-width: 700px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ------------------------------------------------------------ sections */
.section { width: min(100% - 2 * var(--gutter), var(--max)); margin: 0 auto; padding: clamp(90px, 13vw, 170px) 0 0; }
.section__head { margin-bottom: clamp(40px, 6vw, 72px); }
.about { --ct: var(--orange-ink); }
.services { --ct: var(--olive-ink); }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font: 500 13px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ct, var(--c)); }
.eyebrow span { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ct, var(--c)); color: #fff; letter-spacing: 0; font-size: 12px; }
.eyebrow--light { color: #fff; }
.eyebrow--light span { background: #fff; color: var(--crimson); }
.section__title { margin: 0; max-width: 18ch; font: 700 clamp(40px, 6.4vw, 92px)/.98 var(--display); font-stretch: 88%; letter-spacing: -.035em; }
.section__title em { font-style: normal; font-weight: 300; color: var(--muted); }

/* reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--rd, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ about */
.about__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.portrait { position: sticky; top: 110px; margin: 0; transform-style: preserve-3d; transition: transform .6s var(--ease-out); }
.portrait picture { display: block; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--paper-2); box-shadow: 0 40px 80px -40px rgba(24, 33, 46, .45); }
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.03); transition: transform 1.2s var(--ease-out); }
.portrait:hover img { transform: scale(1.04); }
.portrait__ring {
  position: absolute; width: 46%; aspect-ratio: 1; right: -9%; top: -7%; z-index: -1; border-radius: 50%;
  background: var(--orange); opacity: .95;
}
.portrait__ring::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1.5px dashed var(--orange); animation: spin 22s linear infinite; }
.portrait figcaption { margin-top: 14px; font: 500 13px/1.4 var(--mono); color: var(--muted); }
.portrait figcaption::before { content: "↳ "; color: var(--orange); }

.about__text p { margin: 0 0 1.15em; color: var(--ink-2); max-width: 62ch; }
.about__text .lead { font: 500 clamp(22px, 2.4vw, 30px)/1.35 var(--display); letter-spacing: -.01em; color: var(--ink); }

.journey { margin-top: 44px; }
.tabs { position: relative; display: inline-flex; padding: 5px; border-radius: 999px; background: var(--paper-2); }
.tabs button { position: relative; z-index: 1; padding: 10px 20px; border: 0; background: none; border-radius: 999px; font-weight: 600; font-size: 14.5px; color: var(--muted); cursor: pointer; transition: color .3s; }
.tabs button[aria-selected="true"] { color: #fff; }
.tabs__ink { position: absolute; top: 5px; bottom: 5px; left: 0; border-radius: 999px; background: var(--orange-ink); transition: transform .5s var(--ease-out), width .5s var(--ease-out); }

.timeline { list-style: none; margin: 26px 0 0; padding: 0; }
.timeline li {
  display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding: 15px 0; border-top: 1px solid var(--line);
  animation: rise .6s var(--ease-out) both; animation-delay: calc(var(--n, 0) * 60ms);
}
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline .when { font: 500 13px/1.7 var(--mono); color: var(--orange-ink); }
.timeline .what { color: var(--ink-2); font-size: 15.5px; }
.timeline .what b { display: block; color: var(--ink); font-weight: 600; font-size: 16.5px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 860px) {
  .about__grid { grid-template-columns: minmax(0, 1fr); }
  .portrait { position: relative; top: 0; max-width: 360px; }
}

/* ------------------------------------------------------------ services */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card {
  --mx: 50%; --my: 50%;
  position: relative; overflow: hidden; padding: 30px 28px 32px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  transition: border-color .4s, transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--olive) 16%, transparent), transparent 60%);
}
.card:hover { border-color: color-mix(in srgb, var(--olive) 45%, transparent); transform: translateY(-4px); box-shadow: 0 30px 60px -36px rgba(24, 33, 46, .4); }
.card:hover::before { opacity: 1; }
.card__num { position: absolute; top: 26px; right: 26px; font: 500 12px/1 var(--mono); color: var(--muted); }
.card__icon { width: 46px; height: 46px; padding: 11px; border-radius: 14px; background: color-mix(in srgb, var(--olive) 14%, transparent); fill: none; stroke: var(--olive-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: background .4s, stroke .4s, transform .5s var(--ease-out); }
.card:hover .card__icon { background: var(--olive-ink); stroke: #fff; transform: rotate(-8deg) scale(1.05); }
.card h3 { margin: 26px 0 10px; font: 650 22px/1.2 var(--display); letter-spacing: -.015em; }
.card p { margin: 0; font-size: 15.5px; color: var(--muted); }
@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cards { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ marquee */
.marquee { padding: clamp(80px, 11vw, 140px) 0 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__row { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee__row--rev { animation-direction: reverse; animation-duration: 44s; margin-top: 12px; }
.marquee:hover .marquee__row { animation-play-state: paused; }
.marquee__track { display: flex; gap: 12px; padding-right: 12px; }
.marquee__track span {
  white-space: nowrap; padding: 14px 26px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  font: 500 clamp(17px, 2vw, 24px)/1 var(--display); letter-spacing: -.01em; color: var(--ink-2);
  transition: background .3s, color .3s, border-color .3s;
}
.marquee__track span:nth-child(4n+1):hover { background: var(--orange-ink); }
.marquee__track span:nth-child(4n+2):hover { background: var(--olive-ink); }
.marquee__track span:nth-child(4n+3):hover { background: var(--blue); }
.marquee__track span:nth-child(4n+4):hover { background: var(--crimson); }
.marquee__track span:hover { color: #fff; border-color: transparent; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------ work */
.work__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 56px); align-items: start; }

.lab { padding: 14px; border-radius: calc(var(--radius) + 8px); background: var(--ink); color: #DCE2EA; box-shadow: 0 50px 90px -50px rgba(24, 33, 46, .7); }
.lab__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 4px 4px 14px; }
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: rgba(255, 255, 255, .07); }
.seg button { border: 0; background: none; color: #AEB8C6; padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .3s, color .3s; }
.seg button:hover { color: #fff; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.seg--icons button { padding: 8px 10px; display: grid; place-items: center; }
.seg--icons svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.lab__stage { display: grid; place-items: center; padding: clamp(18px, 3vw, 36px) clamp(10px, 2vw, 28px); border-radius: var(--radius); background: radial-gradient(120% 90% at 50% 0%, #2A3A62 0%, #1C2740 55%, #161E30 100%); min-height: 520px; }
.inbox {
  --m-bg: #FFFFFF; --m-fg: #1D2633; --m-muted: #5E6879; --m-soft: #F1F3F6; --m-accent: var(--blue);
  width: 100%; max-width: 560px; container-type: inline-size;
  border-radius: 16px; overflow: hidden; background: var(--m-bg); color: var(--m-fg);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55);
  transition: max-width .7s var(--ease-out), background .5s, color .5s, border-radius .7s var(--ease-out);
}
.inbox.is-mobile { max-width: 300px; border-radius: 30px; box-shadow: 0 0 0 9px #0D1320, 0 30px 60px -20px rgba(0, 0, 0, .6); }
.inbox.is-dark { --m-bg: #141A26; --m-fg: #E8ECF2; --m-muted: #9AA5B6; --m-soft: #1F2736; --m-accent: #8EA3E6; }
.inbox__chrome { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: var(--m-soft); font: 500 12px/1 var(--mono); color: var(--m-muted); transition: background .5s; }
.inbox__chrome i { width: 9px; height: 9px; border-radius: 50%; background: #E06363; }
.inbox__chrome i:nth-child(2) { background: #E8B34B; }
.inbox__chrome i:nth-child(3) { background: #5DBB63; margin-right: 8px; }
.inbox__chrome span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mail { padding: 22px; animation: mail-in .6s var(--ease-out); }
@keyframes mail-in { from { opacity: 0; transform: translateY(12px); } }
.mail__pre { font: 500 11.5px/1 var(--mono); color: var(--m-muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.mail__hero { display: grid; gap: 6px; padding: 30px 24px; border-radius: 12px; color: #fff; }
.mail__hero b { font: 700 26px/1.1 var(--display); letter-spacing: -.02em; }
.mail__hero small { font-size: 13px; }
.mail__hero--news { background: linear-gradient(135deg, var(--blue), #4F64A4); }
.mail__hero--launch { background: linear-gradient(135deg, var(--crimson), var(--orange-ink)); }
.mail__hero--welcome { background: linear-gradient(135deg, var(--olive-ink), #6E8A12); }
.mail__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.mail__item b { display: block; font-size: 14.5px; line-height: 1.3; margin: 10px 0 4px; }
.mail__item p { margin: 0; font-size: 13px; color: var(--m-muted); }
.mail__img { display: block; aspect-ratio: 16 / 10; border-radius: 10px; background: linear-gradient(135deg, #F6C9A8, var(--orange)); }
.mail__img--b { background: linear-gradient(135deg, #2B3550, #0E1320); }
.mail__img--c { background: linear-gradient(135deg, #F2D7C4, #C9835A); }
.mail__img--d { background: linear-gradient(135deg, #C7D4F0, var(--blue)); }
.mail__btn { display: block; text-align: center; padding: 14px; border-radius: 999px; background: var(--m-accent); color: var(--m-bg); font-weight: 600; font-size: 14.5px; transition: background .5s, color .5s; }
.mail__foot { margin-top: 18px; font-size: 11.5px; color: var(--m-muted); text-align: center; }
.mail__code { margin: 18px 0 14px; padding: 16px; border: 1.5px dashed var(--m-muted); border-radius: 12px; text-align: center; font: 600 22px/1 var(--mono); letter-spacing: .12em; }
.mail__steps { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 18px; font-size: 13px; color: var(--m-muted); }
@container (max-width: 380px) {
  .mail__cols { grid-template-columns: 1fr; }
  .mail__hero b { font-size: 22px; }
  .mail__steps { flex-direction: column; text-align: center; }
}
.lab__note { margin: 14px 6px 4px; font-size: 13.5px; line-height: 1.55; color: #9AA5B6; }

.process { list-style: none; margin: 0 0 22px; padding: 0; counter-reset: p; }
.process li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); }
.process li > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--blue); color: var(--blue); font: 500 12px/1 var(--mono); transition: background .3s, color .3s; }
.process li:hover > span { background: var(--blue); color: #fff; }
.process b { font: 650 20px/1.2 var(--display); letter-spacing: -.01em; }
.process p { margin: 4px 0 0; font-size: 15px; color: var(--muted); }

.tile {
  position: relative; display: grid; gap: 8px; padding: 24px 64px 24px 24px; margin-top: 12px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); text-decoration: none;
  transition: background .4s, color .4s, border-color .4s;
}
.tile__k { font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--blue); transition: color .4s; }
.tile__t { font: 600 19px/1.3 var(--display); letter-spacing: -.01em; }
.tile svg { position: absolute; right: 22px; top: 50%; width: 26px; height: 26px; margin-top: -13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease-out); }
.tile:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.tile:hover .tile__k { color: rgba(255, 255, 255, .7); }
.tile:hover svg { transform: translate(3px, -3px); }
.tile--upwork { background: var(--ink); color: #fff; border-color: var(--ink); }
.tile--upwork .tile__k { color: #A9C23A; }

@media (max-width: 980px) {
  .work__grid { grid-template-columns: minmax(0, 1fr); }
  .lab__stage { min-height: 0; }
}

/* ------------------------------------------------------------ quote */
.quote { width: min(100% - 2 * var(--gutter), 1000px); margin: 0 auto; padding: clamp(110px, 15vw, 190px) 0; text-align: center; }
.quote__mark { width: 52px; height: 52px; fill: var(--orange); margin: 0 auto 28px; }
.quote blockquote { margin: 0; }
.quote p { margin: 0 0 28px; font: 500 clamp(28px, 4.2vw, 54px)/1.18 var(--display); letter-spacing: -.025em; }
.quote .w { transition: color .5s, opacity .5s; }
.js .quote .w { opacity: .16; }
.js .quote .w.is-lit { opacity: 1; }
.quote footer { font: 500 14px/1 var(--mono); color: var(--muted); }
.quote footer b { color: var(--ink); }

/* ------------------------------------------------------------ contact */
.contact {
  position: relative; overflow: hidden; isolation: isolate;
  width: min(100% - 2 * var(--gutter), var(--max)); margin: 0 auto;
  padding: clamp(56px, 9vw, 120px) clamp(22px, 6vw, 90px);
  border-radius: calc(var(--radius) + 14px); background: var(--crimson); color: #fff;
  --c: #fff;
}
.contact__orb {
  position: absolute; z-index: -1; width: 70vmin; aspect-ratio: 1; right: -18vmin; bottom: -30vmin; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 60%);
  border: 1px solid rgba(255, 255, 255, .18);
  transform: translate3d(var(--ox, 0), var(--oy, 0), 0); transition: transform 1.2s var(--ease-out);
}
.contact__orb::before, .contact__orb::after { content: ""; position: absolute; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .25); }
.contact__orb::before { inset: -40px; animation: spin 40s linear infinite; }
.contact__orb::after { inset: 18%; border-style: solid; border-color: rgba(255, 255, 255, .12); }
.contact__title { margin: 0 0 22px; font: 750 clamp(46px, 8.6vw, 128px)/.92 var(--display); font-stretch: 84%; letter-spacing: -.04em; }
.contact__lead { margin: 0 0 40px; max-width: 46ch; font-size: clamp(17px, 1.6vw, 20px); color: rgba(255, 255, 255, .94); }
.contact__mail { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 30px; }
.contact__addr { font: 600 clamp(22px, 3.6vw, 44px)/1.1 var(--display); letter-spacing: -.02em; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .5s var(--ease-out); overflow-wrap: anywhere; }
.contact__addr:hover { background-size: 100% 2px; }
.copy { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .08); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .3s, border-color .3s; }
.copy:hover { background: rgba(255, 255, 255, .16); border-color: #fff; }
.copy svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.copy.is-done { background: #fff; color: var(--crimson); }
.contact__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.socials { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 56px 0 0; padding: 26px 0 0; border-top: 1px solid rgba(255, 255, 255, .22); }
.socials a { font: 500 14px/1 var(--mono); text-decoration: none; color: #fff; letter-spacing: .04em; transition: color .3s; }
.socials a::after { content: " ↗"; opacity: .6; }
.socials a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ------------------------------------------------------------ footer */
.foot { width: min(100% - 2 * var(--gutter), var(--max)); margin: 0 auto; padding: 36px 0 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; font-size: 14px; color: var(--muted); }
.foot p { margin: 0 auto 0 4px; }
.foot__top { text-decoration: none; font: 500 13px/1 var(--mono); }
.foot__top:hover { color: var(--ink); }

/* ------------------------------------------------------------ motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js .intro { display: none; }
  .js .reveal, .js .orb, .js .split .ch { opacity: 1 !important; transform: none !important; }
  .js .quote .w { opacity: 1; }
  .marquee__row { animation: none; }
}

/* ------------------------------------------------------------ terminal (work) */
.term { margin-bottom: 14px; border-radius: var(--radius); overflow: hidden; background: #0F1520; color: #C9D3E0; box-shadow: 0 40px 70px -45px rgba(24, 33, 46, .8); }
.term__bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: #182030; font: 500 12px/1 var(--mono); color: #7D8A9E; }
.term__bar i { width: 10px; height: 10px; border-radius: 50%; background: #E06363; }
.term__bar i:nth-child(2) { background: #E8B34B; }
.term__bar i:nth-child(3) { background: #5DBB63; margin-right: 10px; }
.term__body { margin: 0; padding: 18px 18px 22px; min-height: 252px; font: 400 13px/1.75 var(--mono); white-space: pre-wrap; word-break: break-word; }
.term__body .p { color: #8EA3E6; }
.term__body .ok { color: #A9C23A; }
.term__body .dim { color: #6B788C; }
.term__body .caret { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: #C9D3E0; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 600px) { .term__body { font-size: 12px; min-height: 230px; } }
