/* ==========================================================
   Maram Almutairi — CV site (RTL) · Meelo-inspired design
   ========================================================== */

:root {
  /* Palette taken from Maram's logo */
  --lav: #E9DCFC;          /* section background (lighter cut of the logo's #D9C2F7) */
  --lav-deep: #D9C2F7;     /* logo background */
  --purple: #9B6FE8;       /* blob mid-tone */
  --violet: #6D3FD0;       /* accent */
  --violet-deep: #4F23A8;  /* darkest blob */
  --ink: #2A1748;          /* text + borders: deep plum instead of black */
  --muted: #5E4F7A;
  --white: #FFFFFF;
  --grad: linear-gradient(135deg, #8E62E6 0%, #B79AF2 45%, #F1E4FF 100%);

  --c-lav: #EFE6FE;
  --c-mint: #F4EAFF;
  --c-pink: #FBE6F8;
  --c-blue: #E8E6FF;
  --c-peach: #F7E7F5;

  --line: 1px solid var(--ink);
  --radius: 16px;
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --container: 1120px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.35; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.sr-only { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.center { text-align: center; }
.bg-lav { background: var(--lav); }
.bg-white { background: var(--white); }

/* ---------- Shared components ---------- */

.pill {
  display: inline-block;
  padding: 2px 12px;
  font-size: 12px;
  font-weight: 600;
  border: var(--line);
  border-radius: 999px;
  background: var(--c-blue);
  margin-bottom: 18px;
}
.pill-mint { background: var(--c-mint); }
.pill-pink { background: var(--c-pink); }

.btn {
  display: inline-block;
  padding: 10px 24px;
  font: 500 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--white);
  border: var(--line);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 5px 0 -1px var(--white), 0 5px 0 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover {
  transform: translateY(3px);
  background: var(--c-lav);
  box-shadow: 0 2px 0 -1px var(--c-lav), 0 2px 0 0 var(--ink), 0 8px 22px rgba(109, 63, 208, .28);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: var(--line);
  border-radius: 9px;
  background: var(--white);
  box-shadow: 0 3px 0 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.icon-btn:hover { transform: translateY(2px); box-shadow: 0 1px 0 0 var(--ink); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .in { font: 700 14px/1 Arial, sans-serif; }

.round-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: var(--line);
  border-radius: 50%;
  background: var(--c-blue);
  cursor: pointer;
  transition: transform .15s ease;
}
.round-btn:hover { transform: scale(1.08); }
.round-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.card-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: var(--line);
  border-radius: 50%;
  background: var(--white);
}
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Line-art decorations */
.deco {
  position: absolute;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.deco.sm { width: 14px; height: 14px; }
.deco-waves { width: 80px; height: 30px; }
.deco-squiggle { width: 54px; height: 54px; }
.deco-mail, .deco-cloud { width: 36px; height: 36px; }
.deco-cloud.sm { width: 22px; height: 22px; }

/* Logo-style sparkles: filled white, gently twinkling */
.deco-sparkle {
  width: 34px;
  height: 34px;
  fill: var(--white);
  stroke: var(--violet);
  stroke-width: 1;
  filter: drop-shadow(0 2px 6px rgba(109, 63, 208, .35));
  animation: twinkle 3.2s ease-in-out infinite;
}
.deco-sparkle.sm { width: 18px; height: 18px; animation-delay: 1.4s; }
@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(.72) rotate(20deg); opacity: .65; }
}

/* Four-petal flower from the logo */
.deco-flower {
  width: 46px;
  height: 46px;
  fill: var(--white);
  stroke: var(--violet);
  stroke-width: .8;
  filter: drop-shadow(0 3px 8px rgba(109, 63, 208, .3));
  animation: spin 14s linear infinite;
}

/* Soft gradient blobs, like the shapes behind the logo wordmark */
.blob {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  background: var(--grad);
  border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%;
  opacity: .55;
  animation: morph 14s ease-in-out infinite alternate;
}
.blob.b2 {
  background: linear-gradient(160deg, var(--violet-deep), var(--purple) 55%, #E7D6FF);
  opacity: .35;
  animation-duration: 18s;
  animation-direction: alternate-reverse;
}
@keyframes morph {
  0%   { border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%; transform: translate(0, 0) rotate(0deg); }
  50%  { border-radius: 40% 60% 38% 62% / 60% 42% 58% 40%; transform: translate(14px, -18px) rotate(12deg); }
  100% { border-radius: 62% 38% 46% 54% / 40% 55% 45% 60%; transform: translate(-10px, 12px) rotate(-8deg); }
}
section > .container { position: relative; z-index: 1; }

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 60;
  height: 3px;
  background: linear-gradient(90deg, var(--violet-deep), var(--purple), #E7D6FF);
  transform: scaleX(0);
  transform-origin: right;
}

section { position: relative; }
.section { padding: 110px 0; border-top: var(--line); }

.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(24px, 3.2vw, 32px); }

.lead { font-size: 18px; color: var(--ink); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 600; }
.logo img { width: 38px; height: 38px; border-radius: 10px; border: var(--line); transition: transform .4s ease; }
.logo:hover img { transform: rotate(-8deg) scale(1.06); }

/* Shining text — CSS version of the ShiningText component:
   a light band sweeps across the text from 200% to -200%. */
.grad-text,
.shine,
.section-head h2,
.about-text h2,
.exp-intro h2 {
  --base: var(--ink);
  --glow: #B79AF2;
  background: linear-gradient(110deg, var(--base) 35%, var(--glow) 50%, var(--base) 75%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: shine 3.2s linear infinite;
}
.grad-text { --base: var(--violet); --glow: #FFFFFF; animation-duration: 2.4s; }
.shine-violet { --base: var(--violet); --glow: #E2D0FF; }
@keyframes shine {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* Word-by-word reveal (JS wraps each word of [data-words] in .word) */
.js .word {
  display: inline-block;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(.55em) rotate(3deg);
  transition: opacity .7s ease, filter .7s ease, transform .8s cubic-bezier(.2, .8, .2, 1);
  transition-delay: calc(var(--i) * 70ms);
}
.js .in .word,
.js .in.split .word { opacity: 1; filter: none; transform: none; }

/* ---------- Scroll "portal" transition on the profile photo ----------
   .hero-stage is taller than the screen; .hero sticks under the header while JS:
   1) glides the photo to the centre and grows it only up to its native 500px (stays sharp),
   2) expands .hero-portal — a circle in the image's own background colour — from the
      photo's frame until it covers the screen, so the photo seems to open up and fill the page,
   3) fades the photo out and turns the portal white to meet the next section. */
.hero-stage { height: 240vh; }
.hero-stage > .hero {
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  min-height: 560px;
  display: flex;
  align-items: center;
  padding: 0;
}
.hero-zoom { position: relative; z-index: 3; justify-self: center; width: min(400px, 100%); will-change: transform; }
.hero-zoom .deco,
.hero-zoom .blob { transition: opacity .35s ease; }
.hero-zoom.zooming .deco,
.hero-zoom.zooming .blob { opacity: 0; animation: none; }
.hero-zoom.zooming .photo { animation: none; background: #D8BEF8; } /* match --photo-bg so the frame edge disappears */
.hero-portal {
  --photo-bg: #D8BEF8; /* sampled from images/profile.png — update if the photo changes */
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--photo-bg);
  clip-path: circle(0 at 50% 50%);
  visibility: hidden;
  pointer-events: none;
}
.nav-links { display: flex; gap: 26px; font-size: 14px; }
.nav-links a { position: relative; }
.nav-links a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-icons { display: flex; gap: 8px; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */

.hero { padding: 90px 0 80px; overflow: hidden; background: linear-gradient(180deg, var(--lav-deep), var(--lav)); }
.hero-visual .photo { z-index: 1; animation: float 6s ease-in-out infinite; }
.hero-visual .blob { width: 78%; aspect-ratio: 1; top: 22%; inset-inline-end: -22%; }
.hero-visual .blob.b2 { width: 50%; top: 58%; inset-inline-end: auto; inset-inline-start: -16%; }
@keyframes float { 50% { transform: translateY(-10px); } }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 48px; }
.hero h1 { font-size: clamp(32px, 4.6vw, 50px); font-weight: 400; margin-bottom: 18px; }
.hero .lead { max-width: 460px; margin-bottom: 30px; }

.hero-visual { position: relative; width: 100%; }

.photo {
  position: relative;
  overflow: hidden;
  border: var(--line);
  background: var(--grad);
}
.photo img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.photo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 120px;
  font-weight: 300;
  color: rgba(255, 255, 255, .85);
}
.arch { aspect-ratio: 4 / 4.6; border-radius: 999px 999px 14px 14px; }
.circle { aspect-ratio: 1; border-radius: 50%; }

.badge {
  position: absolute;
  top: 14px;
  inset-inline-start: -46px;
  z-index: 2;
  width: 104px;
  height: 104px;
  border: var(--line);
  border-radius: 50%;
  background: var(--white);
}
/* direction:ltr is required: in an RTL page the path text gets anchored off the circle */
.badge-ring { width: 100%; height: 100%; direction: ltr; animation: spin 16s linear infinite; }
.badge-ring path { fill: none; }
.badge-ring text { font-size: 10.5px; font-weight: 600; fill: var(--ink); }
.badge-arrow {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34px;
  height: 34px;
  padding: 7px;
  border: var(--line);
  border-radius: 50%;
  background: var(--white);
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Job-title tags floating around the hero photo */
.role-tags { margin: 0; padding: 0; list-style: none; }
.role-tag {
  position: absolute;
  z-index: 2;
  padding: 7px 15px;
  font: 600 12.5px/1.3 "Segoe UI", Arial, sans-serif;
  white-space: nowrap;
  color: var(--ink);
  background: var(--white);
  border: var(--line);
  border-radius: 999px;
  box-shadow: 0 3px 0 0 var(--ink);
  cursor: default;
  translate: 0 0; /* set by JS: the tag follows the mouse, then springs back */
  animation: tag-float 5.5s ease-in-out infinite;
  animation-delay: calc(var(--d) * -1.1s);
}
/* Tags are dir="ltr", so inline-start = left and inline-end = right here */
.role-tag:nth-child(1) { --r: -3deg;   top: 3%;     inset-inline-start: -10%; }
.role-tag:nth-child(2) { --r: 2deg;    top: 34%;    inset-inline-end: -22%; }
.role-tag:nth-child(3) { --r: -2deg;   top: 62%;    inset-inline-start: -18%; }
.role-tag:nth-child(4) { --r: 3deg;    bottom: 5%;  inset-inline-end: -8%; }
.role-tag:nth-child(5) { --r: -1.5deg; bottom: -7%; inset-inline-start: 18%; }
.role-tag:nth-child(6) { --r: 2.5deg;  top: -3%;    inset-inline-end: 8%; }
.role-tag:nth-child(7) { --r: -2.5deg; top: 33%;    inset-inline-start: -26%; }
@keyframes tag-float {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-9px) rotate(calc(var(--r, 0deg) * -1)); }
}
/* Pop in one after another once the photo is revealed */
.js .role-tag {
  --pop: calc(.5s + var(--d) * .12s);
  opacity: 0;
  scale: .6;
  transition:
    opacity .5s ease var(--pop),
    scale .6s cubic-bezier(.3, 1.6, .5, 1) var(--pop),
    translate .75s cubic-bezier(.25, 1.9, .45, 1),  /* elastic return home */
    background-color .25s ease,
    box-shadow .25s ease;
}
.js .in .role-tag { opacity: 1; scale: 1; }
.js .in .role-tag.is-hover {
  scale: 1.08;
  background: var(--c-lav);
  box-shadow: 0 6px 0 0 var(--ink);
  transition:
    opacity .5s ease,
    scale .25s ease,
    translate .12s ease-out,                        /* quick follow while hovering */
    background-color .25s ease,
    box-shadow .25s ease;
}
.js .hero-zoom.zooming .role-tag { opacity: 0; animation: none; transition: opacity .3s ease; transition-delay: 0s; }

/* ---------- Skill cards ---------- */

.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-bottom: 40px; }
.card {
  display: flex;
  gap: 18px;
  padding: 24px;
  border: var(--line);
  border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 6px 0 0 var(--ink); }
.card:hover .card-icon, .process-card:hover .card-icon { animation: wiggle .5s ease; background: var(--lav-deep); }
@keyframes wiggle { 30% { transform: rotate(-10deg); } 65% { transform: rotate(8deg); } }
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card p { font-size: 14px; color: var(--muted); }
.c-lav { background: var(--c-lav); }
.c-mint { background: var(--c-mint); }
.c-pink { background: var(--c-pink); }
.c-blue { background: var(--c-blue); }
.c-peach { background: var(--c-peach); }

/* ---------- About + Experience ---------- */

.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 64px; margin-bottom: 110px; }
.about-visual { position: relative; width: min(380px, 100%); justify-self: center; }
.badge-about { top: 0; inset-inline-start: auto; inset-inline-end: -10px; }
.badge-stars { animation-duration: 12s; }
.badge-stars use { stroke-width: 1; stroke-linejoin: round; }
.badge-stars .s-big { fill: var(--purple); stroke: var(--violet-deep); }
.badge-stars .s-small { fill: #E2D0FF; stroke: var(--violet); }
.badge-star {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34px;
  height: 34px;
  fill: var(--violet);
  stroke: var(--violet-deep);
  stroke-width: 1;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 6px rgba(109, 63, 208, .4));
  animation: twinkle 2.4s ease-in-out infinite;
}
.about-visual .photo { z-index: 1; }
.about-visual .blob { width: 62%; aspect-ratio: 1; bottom: -10%; inset-inline-start: -12%; }
.about-text h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 14px; }
.about-text .lead { margin-bottom: 18px; }
.about-text p:not(.lead) { font-size: 15px; color: var(--muted); }

.exp-grid { display: grid; grid-template-columns: 1fr 1.7fr; gap: 56px; align-items: start; }
.exp-intro { position: relative; }
.exp-intro h2 { font-size: clamp(26px, 3.2vw, 32px); margin-bottom: 12px; }
.exp-intro p { color: var(--muted); margin-bottom: 26px; }
.exp-intro .deco-squiggle { position: relative; display: block; margin-top: 48px; margin-inline-start: 60px; }

.timeline { position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 0;
  inset-inline-start: 150px;
  width: 1px;
  background: var(--ink);
}
.timeline > li { display: grid; grid-template-columns: 150px 1fr; padding-bottom: 36px; }
.timeline > li:last-child { padding-bottom: 0; }
.t-date { font-size: 12px; font-weight: 600; padding-top: 3px; padding-inline-end: 22px; text-align: end; }
.t-body { position: relative; padding-inline-start: 28px; }
.t-body::before {
  content: "";
  position: absolute;
  top: 7px;
  inset-inline-start: -7px;
  width: 13px;
  height: 13px;
  border: var(--line);
  border-radius: 50%;
  background: var(--c-mint);
}
.t-body h3 { font-size: 17px; }
.t-place { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.t-body ul li { position: relative; font-size: 14px; color: var(--muted); padding-inline-start: 16px; margin-bottom: 6px; }
.t-body ul li::before { content: "✱"; position: absolute; inset-inline-start: 0; font-size: 9px; top: 4px; color: var(--ink); }

/* ---------- Split sections (cards straddling two backgrounds) ---------- */

.split { padding: 0 0 0; }
.lav-to-white { background: linear-gradient(var(--lav) 50%, var(--white) 50%); padding-bottom: 20px; }
.white-to-lav { background: linear-gradient(var(--white) 50%, var(--lav) 50%); }

.highlight {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  padding: 44px 64px;
  text-align: center;
  background: var(--white);
  border: var(--line);
  border-radius: var(--radius);
}
.stars { display: flex; justify-content: center; gap: 4px; margin-bottom: 16px; }
.stars svg { width: 18px; height: 18px; fill: var(--purple); stroke: var(--violet-deep); stroke-width: 1; stroke-linejoin: round; animation: twinkle 2.6s ease-in-out infinite; }
.stars svg:nth-child(2) { animation-delay: .3s; }
.stars svg:nth-child(3) { animation-delay: .6s; }
.stars svg:nth-child(4) { animation-delay: .9s; }
.stars svg:nth-child(5) { animation-delay: 1.2s; }
.highlight-slides { display: grid; }
.highlight-slide { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transition: opacity .4s ease; }
.highlight-slide.active { opacity: 1; visibility: visible; }
.highlight blockquote { margin: 0 0 18px; font-size: clamp(17px, 2.2vw, 21px); line-height: 1.7; }
.highlight figcaption strong { display: block; font-weight: 500; }
.highlight figcaption span { font-size: 13px; color: var(--muted); }
.highlight-next { position: absolute; top: 50%; inset-inline-end: 18px; transform: translateY(-50%); }
.highlight-next:hover { transform: translateY(-50%) scale(1.08); }

/* ---------- Projects ---------- */

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { font: 500 12px/1 Arial, sans-serif; padding: 6px 12px; border: var(--line); border-radius: 999px; background: var(--white); }

.mock {
  position: relative;
  height: 260px;
  overflow: hidden;
  border: var(--line);
  border-radius: var(--radius);
}

/* Case-study rows: big screenshot on one side, story on the other; sides alternate */
.projects { display: flex; flex-direction: column; gap: 100px; }
.case {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 56px;
}
.case:nth-child(even) .case-media { order: 2; }

.case-media {
  position: relative;
  display: block;
  height: auto;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--accent);
  border: var(--line);
  border-radius: 22px;
  box-shadow: 0 22px 44px -22px rgba(42, 23, 72, .45);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s ease;
}
.case-media.mock { height: auto; }
.case-media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.case-media:hover { transform: translateY(-8px) rotate(-.6deg); box-shadow: 0 34px 60px -24px rgba(42, 23, 72, .5); }
.case:nth-child(even) .case-media:hover { transform: translateY(-8px) rotate(.6deg); }
.case-media:hover > img { transform: scale(1.06); }

.case-logo {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  padding: 6px 12px;
  background: var(--white);
  border: var(--line);
  border-radius: 14px;
  box-shadow: 0 3px 0 0 var(--ink);
}
.case-logo img { height: 34px; width: auto; }

.case-hint {
  position: absolute;
  bottom: 16px;
  inset-inline-start: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  background: var(--white);
  border: var(--line);
  border-radius: 999px;
  box-shadow: 0 3px 0 0 var(--ink);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease;
}
.case-hint svg { width: 15px; height: 15px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.case-media:hover .case-hint { opacity: 1; transform: none; }

.case-num {
  display: block;
  margin-bottom: 6px;
  font: 300 60px/1 "Segoe UI", Arial, sans-serif;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink);
}
.case-kind {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  background: color-mix(in srgb, var(--accent) 28%, white);
  border: var(--line);
  border-radius: 999px;
}
.case h3 { font-size: clamp(22px, 2.6vw, 28px); margin-bottom: 10px; }
.case-body > p { font-size: 15px; color: var(--muted); margin-bottom: 16px; }
.case-points { margin-bottom: 16px; }
.case-points li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; margin-bottom: 7px; }
.case-points svg { flex: none; width: 16px; height: 16px; margin-top: 5px; fill: none; stroke: var(--violet); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.case .role { font-size: 13.5px; color: var(--ink); margin-bottom: 14px; }
.case .role span { font-weight: 600; color: var(--violet); }
.figma-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: color .2s ease, border-color .2s ease, gap .2s ease;
}
.figma-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.figma-link:hover { color: var(--violet); border-color: var(--violet); gap: 10px; }

.mock-web { background: linear-gradient(160deg, var(--c-blue), var(--white) 70%); padding: 22px 26px 0; direction: ltr; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--white); border: var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; border: var(--line); }
.mock-bar b { flex: 1; height: 10px; margin-inline-start: 10px; border-radius: 99px; background: var(--lav); }
.mock-body { display: flex; height: 100%; background: var(--white); border: var(--line); }
.mock-side { width: 70px; padding: 14px 10px; background: var(--lav); border-inline-end: var(--line); }
.mock-side i { display: block; height: 8px; margin-bottom: 10px; border-radius: 99px; background: var(--purple); opacity: .6; }
.mock-main { flex: 1; padding: 14px; }
.mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.mock-kpis span { height: 44px; border: var(--line); border-radius: 8px; }
.mock-kpis span:nth-child(1) { background: var(--c-mint); }
.mock-kpis span:nth-child(2) { background: var(--c-pink); }
.mock-kpis span:nth-child(3) { background: var(--c-peach); }
.mock-table i { display: block; height: 14px; margin-bottom: 8px; border-radius: 4px; background: #F1F0FB; }
.mock-table i:first-child { background: var(--lav); }

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 820px;
  margin-inline: auto;
  padding: 40px 24px;
  text-align: center;
  background: var(--white);
  border: var(--line);
  border-radius: var(--radius);
}
.stats strong { display: block; font-size: clamp(30px, 4vw, 42px); font-weight: 500; line-height: 1.2; }
.stats span { font-size: 13px; color: var(--muted); }

/* ---------- Process ---------- */

.process-section { border-top: 0; padding-top: 90px; }
.process-wrap { position: relative; padding: 0 0 0; }
.process-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 4px 12px;
  padding-inline-end: 56px;
}
.process-track::-webkit-scrollbar { display: none; }
.process-card {
  flex: 0 0 calc((100% - 32px - 52px) / 3);
  min-width: 250px;
  scroll-snap-align: start;
  padding: 22px;
  border: var(--line);
  border-radius: var(--radius);
}
.pc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; }
.pc-num { font-size: 15px; }
.process-card h3 { font-size: 16px; margin-bottom: 8px; }
.process-card p { font-size: 13.5px; color: var(--muted); }
.process-next { position: absolute; top: 50%; inset-inline-end: 0; transform: translateY(-50%); }
.process-next:hover { transform: translateY(-50%) scale(1.08); }

.tools-title { text-align: center; font-size: 14px; margin: 56px 0 14px; }
.marquee {
  overflow: hidden;
  direction: ltr;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; align-items: center; gap: 28px; width: max-content; animation: marquee 30s linear infinite; direction: ltr; }
.marquee-track span { font-size: 19px; font-weight: 500; }
.marquee-track i { font-style: normal; font-size: 13px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Education (plans) ---------- */

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; gap: 28px; }
.plan {
  padding: 30px 32px 34px;
  text-align: center;
  border: var(--line);
  border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease;
}
.plan:hover { transform: translateY(-4px); box-shadow: 0 6px 0 0 var(--ink); }
.plan .pill { margin-bottom: 14px; }
.plan h3 { font-size: 24px; font-weight: 400; }
.plan-sub { font-size: 13px; color: var(--muted); margin: 4px 0 22px; }
.checks { display: inline-block; text-align: start; }
.checks li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin-bottom: 8px; }
.checks svg { flex: none; width: 16px; height: 16px; margin-top: 4px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Contact ---------- */

.contact-section { padding-top: 40px; border-top: var(--line); }
.contact-card {
  max-width: 760px;
  margin-inline: auto;
  padding: 50px 48px 40px;
  background: var(--white);
  border: var(--line);
  border-radius: 18px;
}
.contact-card .section-head { margin-bottom: 36px; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 28px; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.contact-form input,
.contact-form textarea {
  font: 400 15px/1.6 var(--font);
  color: var(--ink);
  padding: 6px 0 8px;
  border: 0;
  border-bottom: var(--line);
  background: transparent;
  outline: none;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus { border-bottom-width: 2px; }
.contact-form ::placeholder { color: var(--ink); opacity: .8; }
.form-note { min-height: 1em; font-size: 13px; color: #B3261E; text-align: center; }
.form-note:empty { display: none; }
.contact-direct { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin-top: 32px; padding-top: 24px; border-top: 1px dashed #c9c7e8; font-size: 14px; }
.contact-direct a { display: inline-flex; align-items: center; gap: 8px; }
.contact-direct a:hover { text-decoration: underline; }
.contact-direct svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Footer ---------- */

.site-footer { padding: 50px 0 56px; }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; max-width: 808px; }
.copy { font-size: 13px; color: var(--muted); margin-top: 6px; }
.footer-end { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.footer-links { display: flex; gap: 22px; font-size: 14px; }
.footer-links a:hover { text-decoration: underline; }

/* ---------- Reveal on scroll (only when JS runs) ---------- */

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .nav-links, .site-header .nav-icons { display: none; }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0 9px;
    background: var(--white);
    border: var(--line);
    border-radius: 9px;
    cursor: pointer;
  }
  .nav-toggle span { height: 1.5px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
  .site-header.open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .site-header.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .site-header.open .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    padding: 8px 24px 16px;
    background: var(--white);
    border-bottom: var(--line);
    font-size: 16px;
  }
  .site-header.open .nav-links a { padding: 10px 0; border-bottom: 1px solid #eee; }

  .hero { padding-top: 56px; }
  .hero-grid, .about-grid, .exp-grid { grid-template-columns: 1fr; }
  .hero-text { text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-zoom { width: min(340px, 78%); }
  /* Stacked layout is taller than a phone screen: JS pins it once the photo reaches the
     bottom of the screen (negative sticky top) and sets the stage height. */
  .hero-stage { height: auto; }
  .hero-stage > .hero { height: auto; min-height: 0; display: block; padding: 56px 0 64px; }
  .about-grid { gap: 48px; margin-bottom: 80px; }
  .exp-intro .deco-squiggle { display: none; }
  .section { padding: 80px 0; }
  .process-card { flex-basis: 46%; }
  .projects { gap: 72px; }
  .case { grid-template-columns: 1fr; gap: 26px; }
  .case:nth-child(even) .case-media { order: 0; }
  .case-hint { opacity: 1; transform: none; } /* no hover on touch screens */
}

@media (max-width: 600px) {
  .container { padding-inline: 16px; }
  .cards-2, .plans { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .badge { width: 84px; height: 84px; inset-inline-start: -18px; }
  .badge-about { inset-inline-start: auto; inset-inline-end: -6px; }
  .role-tag { padding: 5px 11px; font-size: 11px; }
  .role-tag:nth-child(1) { inset-inline-start: -6%; }
  .role-tag:nth-child(2) { inset-inline-end: -8%; }
  .role-tag:nth-child(3) { inset-inline-start: -8%; }
  .role-tag:nth-child(4) { inset-inline-end: -4%; }
  .role-tag:nth-child(5) { inset-inline-start: 12%; }
  .role-tag:nth-child(6) { inset-inline-end: 4%; }
  .role-tag:nth-child(7) { inset-inline-start: -10%; }
  .deco-waves { display: none; }
  .logo img { width: 32px; height: 32px; }

  .timeline::before { inset-inline-start: 6px; }
  .timeline > li { grid-template-columns: 1fr; }
  .t-date { text-align: start; padding-inline-start: 34px; padding-inline-end: 0; }
  .t-body { padding-inline-start: 34px; }
  .t-body::before { top: -20px; inset-inline-start: 0; }

  .highlight { padding: 36px 22px 70px; }
  .highlight-next { top: auto; bottom: 18px; inset-inline-end: 50%; transform: translateX(-50%); }
  .highlight-next:hover { transform: translateX(-50%) scale(1.08); }

  .mock { height: 220px; }
  .case-num { font-size: 46px; }
  .case-logo img { height: 26px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 24px 8px; padding: 28px 12px; }
  .process-card { flex-basis: 82%; min-width: 0; }
  .contact-card { padding: 36px 20px 30px; }
  .contact-form { grid-template-columns: 1fr; }
  .deco-mail, .deco-cloud { display: none; }
  .footer-grid { flex-direction: column; align-items: center; text-align: center; }
  .footer-end { align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .word { opacity: 1; filter: none; transform: none; }
  .hero-stage { height: auto; }
  .hero-stage > .hero { position: relative; top: 0; height: auto; display: block; padding: 90px 0 80px; }
  .hero-portal { display: none; }
}
