/* ============================================================
   NASHWA HAMIDO — ONE-PAGE PORTFOLIO
   Self-contained styles (does not depend on stylesheet.css)
   ============================================================ */

:root {
  --bg1: #141136;
  --bg2: #262252;
  --coral: #ea7d6d;
  --yellow: #fdcd00;
  --cream: #fff3b4;
  --text: #ffffff;
  --muted: #d4d4d4;
  --panel: #262252;
  --nav-h: 4.5rem;
  --font: Verdana, Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(to left, var(--bg1), var(--bg2));
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Light mode */
body.light-mode {
  --bg1: #fdf2e9;
  --bg2: #fbe3d0;
  --text: #2b2350;
  --muted: #5a5175;
  --panel: #ffffff;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
h1, h2, h3 { margin: 0; }

/* Fixed particle background */
#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------------- NAV ---------------- */
#topnav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  z-index: 200;
  background: rgba(20, 17, 54, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.light-mode #topnav { background: rgba(253, 242, 233, 0.8); }

.logo {
  color: var(--yellow);
  font-weight: bold;
  font-size: clamp(0.9rem, 2.2vw, 1.1rem);
  letter-spacing: 0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-links a {
  color: var(--text);
  background: var(--coral);
  font-weight: bold;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 0.625rem;
  transition: all 0.25s ease;
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--bg1);
  color: var(--cream);
  outline: 2px solid var(--cream);
}
body.light-mode .nav-links a { color: #fff; }
body.light-mode .nav-links a:hover,
body.light-mode .nav-links a.active { background: var(--coral); outline-color: #fff; }

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}
.theme-label { font-size: 0.7rem; font-weight: bold; color: var(--yellow); }
.switch { position: relative; width: 46px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; cursor: var(--cur-pointer);
  background: var(--coral); border-radius: 24px; transition: 0.3s;
}
.slider:before {
  content: ""; position: absolute; height: 18px; width: 18px;
  left: 3px; bottom: 3px; background: var(--yellow);
  border-radius: 50%; transition: 0.3s;
}
input:checked + .slider:before { transform: translateX(22px); }

/* Burger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem; height: 2.75rem;
  border: none; border-radius: 0.5rem;
  background: var(--coral); cursor: var(--cur-pointer);
  position: relative;
  z-index: 260; /* stays above the open menu panel so it can close it */
}
.nav-toggle span {
  display: block; width: 1.5rem; height: 2px; margin: 0 auto;
  background: var(--cream); border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- SECTIONS ---------------- */
main { position: relative; z-index: 1; }
.section {
  padding: calc(var(--nav-h) + 2rem) clamp(1rem, 5vw, 4rem) 4rem;
  scroll-margin-top: var(--nav-h);
  max-width: 78rem;
  margin: 0 auto;
}
.section-title {
  color: var(--coral);
  font-size: clamp(1.8rem, 5vw, 2.75rem);
  margin-bottom: 2rem;
  text-align: center;
}

/* ---------------- HERO ---------------- */
#home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding-top: var(--nav-h);
}
.hero-text { flex: 1 1 22rem; min-width: 16rem; }
.hero-text .salutation { color: var(--coral); font-size: clamp(1.1rem, 2.5vw, 1.6rem); font-weight: bold; margin-bottom: 0.3rem; }
.hero-text .name {
  color: var(--coral);
  font-size: clamp(2rem, 5.5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}
/* Cycling name loop */
.name-loop { display: inline-block; overflow: hidden; height: 1.1em; vertical-align: bottom; }
.name-loop-list { display: flex; flex-direction: column; will-change: transform; }
.name-word { height: 1.1em; line-height: 1.1; white-space: nowrap; }
.hero-text .title { color: var(--coral); font-size: clamp(1.05rem, 2.6vw, 1.55rem); margin-bottom: 1.2rem; }
.hero-text .description { color: var(--text); font-size: clamp(0.9rem, 2vw, 1.05rem); line-height: 1.6; max-width: 34rem; margin-bottom: 1.8rem; }
.cta {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--yellow);
  color: var(--about-card);
  font-weight: bold;
  text-decoration: none;
  border-radius: 2rem;
  padding: 0.35rem 0.4rem 0.35rem 1.6rem;
  transition: transform 0.25s ease;
}
.cta .cv-label { font-size: 1.02rem; }
.cta .cv-arrow { width: 2.6rem; height: 2.6rem; }
.cta:hover { transform: translateY(-2px); }
.hero-art { flex: 1 1 20rem; min-width: 15rem; display: flex; justify-content: center; }
.hero-art-wrapper { position: relative; display: inline-block; animation: wobble 4s ease-in-out 1.6s infinite; }
.hero-art img { width: min(28rem, 80vw); filter: drop-shadow(0 10px 30px rgba(0,0,0,0.4)); }

/* Gentle wobble on the illustration */
@keyframes wobble {
  0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
  25% { transform: translateY(-8px) translateX(4px) rotate(0.5deg); }
  50% { transform: translateY(-12px) translateX(-2px) rotate(-0.3deg); }
  75% { transform: translateY(-6px) translateX(3px) rotate(0.4deg); }
}

/* Hover speech bubble on the illustration */
.speech-bubble {
  position: absolute;
  top: -0.5rem;
  left: 50%;
  transform: translate(-50%, -10px);
  width: max-content;
  max-width: min(18rem, 78%);
  background: var(--coral);
  color: var(--cream);
  font-weight: bold;
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: 1.2rem;
  box-shadow: 0 0.3rem 0.9rem rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
  z-index: 15;
}
.speech-bubble p { margin: 0; }
.speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -0.8rem;
  left: 50%;
  transform: translateX(-50%);
  border-left: 0.7rem solid transparent;
  border-right: 0.7rem solid transparent;
  border-top: 0.9rem solid var(--coral);
}
.hero-art-wrapper:hover .speech-bubble,
.hero-art-wrapper:focus-within .speech-bubble {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
@media (prefers-reduced-motion: reduce) {
  .hero-art-wrapper { animation: none; }
}

/* ---------------- ABOUT ---------------- */
.about-block { margin-bottom: 2.5rem; }
.about-block h3 {
  color: var(--coral);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  margin-bottom: 1rem;
  border-bottom: 2px solid rgba(234, 125, 109, 0.35);
  padding-bottom: 0.4rem;
}
.cols { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; }
.col { flex: 1 1 18rem; }
.entry { margin-bottom: 1rem; }
.entry .role { display: block; color: var(--yellow); font-weight: bold; font-size: 0.95rem; }
.entry .meta { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 0.15rem; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { color: var(--yellow); font-weight: bold; font-size: 0.95rem; margin-bottom: 0.35rem; }
ul.plain li .sub { display: block; color: var(--muted); font-weight: normal; font-size: 0.82rem; }
.lang-list { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.lang-list li { background: rgba(253, 205, 0, 0.12); border-radius: 0.5rem; padding: 0.4rem 0.9rem; }
.about-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.btn-pill {
  background: var(--coral); color: #fff; font-weight: bold;
  padding: 0.75rem 2rem; border-radius: 0.65rem; transition: all 0.25s ease;
}
.btn-pill:hover { background: var(--bg1); color: var(--cream); outline: 2px solid var(--cream); transform: scale(1.03); }

/* ---------------- PORTFOLIO ---------------- */
.pf-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-bottom: 2rem; }
.pf-tab {
  background: var(--yellow); color: var(--bg1); font-weight: bold;
  padding: 0.6rem 1.2rem; border-radius: 0.65rem; border: none; cursor: var(--cur-pointer);
  font-family: var(--font); font-size: 0.9rem; transition: all 0.25s ease;
}
.pf-tab:hover { transform: scale(1.04); }
.pf-tab.active { background: var(--coral); color: #fff; outline: 2px solid var(--cream); }

.pf-panel { display: none; }
.pf-panel.active { display: block; }

/* Empty-state "coming soon" panels */
.pf-soon {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 0.6rem;
  min-height: 20rem; padding: 3rem 1.5rem;
  border: 1px dashed rgba(255, 255, 255, 0.18); border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.03);
}
.pf-soon-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06); color: var(--yellow);
}
.pf-soon-icon svg { width: 1.9rem; height: 1.9rem; }
.pf-soon h3 { color: var(--coral); font-size: 1.3rem; }
.pf-soon p { color: var(--muted); font-size: 0.95rem; }
body.light-mode .pf-soon { border-color: rgba(0, 0, 0, 0.14); background: rgba(0, 0, 0, 0.03); }
body.light-mode .pf-soon p { color: #555; }

/* Web Development: case-study-style cards (no live frames) */
.webdev-intro { text-align: center; color: var(--muted); max-width: 46rem; margin: 0 auto 2rem; font-size: 0.95rem; line-height: 1.5; }

/* Card cover = a tidy browser-styled panel */
.web-cover {
  position: relative; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #241f54 0%, #15122f 100%);
}
.web-cover-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 0.3rem; padding: 0.55rem 0.8rem; background: rgba(0, 0, 0, 0.25); }
.web-cover-bar i { width: 0.55rem; height: 0.55rem; border-radius: 50%; }
.web-cover-bar i:nth-child(1) { background: #ff5f56; }
.web-cover-bar i:nth-child(2) { background: #ffbd2e; }
.web-cover-bar i:nth-child(3) { background: #27c93f; }
.web-cover-url { margin-left: 0.5rem; font-size: 0.72rem; color: rgba(255, 255, 255, 0.72); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-cover-icon { color: var(--yellow); opacity: 0.9; }
.web-cover-icon svg { width: 3.2rem; height: 3.2rem; }
.web-proj-card:hover .web-cover-icon { opacity: 1; }
.web-cover--shot { align-items: flex-start; justify-content: stretch; overflow: hidden; }
.web-cover-shot {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: transform 0.5s ease;
}
.web-proj-card:hover .web-cover-shot { transform: scale(1.04); }

/* Web modal: sizes to content (no tall preview) */
#web-modal .cs-modal-panel { height: auto; max-height: 94vh; overflow-y: auto; overflow-x: hidden; }
.web-modal-summary { max-width: 46rem; }
.web-modal-body { flex: 0 0 auto; text-align: center; padding: 0.25rem 0 1.1rem; }
.web-tech { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; max-width: 42rem; margin: 0 auto; }
.web-tech-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; font-weight: 600; color: var(--cream);
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.3rem 0.75rem 0.3rem 0.5rem; border-radius: 1rem;
}
.web-tech-chip .tool-ico { width: 1.15rem; height: 1.15rem; }
.web-tech-chip .tool-ico svg { width: 100%; height: 100%; }

/* Frameless live preview: a scaled desktop view of the site, no scrollbars */
.web-modal-preview { flex: 0 0 auto; display: flex; justify-content: center; padding: 0 0 1.1rem; }
.web-shot {
  position: relative; width: 100%; max-width: 46rem;
  height: clamp(13rem, 42vh, 23rem); margin: 0 auto;
  overflow-y: auto; overflow-x: hidden; border-radius: 0.9rem; background: #0d0b24;
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.45);
  scrollbar-width: thin; scrollbar-color: var(--coral) rgba(255, 255, 255, 0.07);
}
.web-shot img { display: block; width: 100%; height: auto; }
.web-shot::-webkit-scrollbar { width: 0.6rem; }
.web-shot::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.06); border-radius: 1rem; }
.web-shot::-webkit-scrollbar-thumb { background: var(--coral); border-radius: 1rem; border: 0.15rem solid #0d0b24; }
.web-shot::-webkit-scrollbar-thumb:hover { background: var(--yellow); }

.web-foot { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }

/* Web modal screenshot carousel: wide frames that show the full website */
.web-modal-preview { display: block; flex: 0 0 auto; width: 100%; }
.web-modal-preview .cs-modal-carousel { display: flex; width: 100%; flex: 0 0 auto; height: auto; padding: 0.6rem 0 2.6rem; }
.web-modal-preview .cs-modal-carousel .carousel { width: 100%; height: min(48vh, 30rem); max-width: 68rem; }
/* Match the slide frame to the screenshot ratio so the whole page is in view */
.web-modal-preview .slide { aspect-ratio: 1600 / 840; }
.web-modal-preview .slide img { object-fit: cover; }

/* Subtle, themed scrollbar if the modal itself ever needs to scroll */
#web-modal .cs-modal-panel { scrollbar-width: thin; scrollbar-color: var(--coral) transparent; }
#web-modal .cs-modal-panel::-webkit-scrollbar { width: 0.6rem; }
#web-modal .cs-modal-panel::-webkit-scrollbar-track { background: transparent; }
#web-modal .cs-modal-panel::-webkit-scrollbar-thumb { background: var(--coral); border-radius: 1rem; border: 0.16rem solid var(--panel); }
body.light-mode .web-tech-chip { color: #2b2350; background: rgba(0, 0, 0, 0.06); border-color: rgba(0, 0, 0, 0.14); }
body.light-mode .web-cover-url { color: rgba(255, 255, 255, 0.8); }

/* ---------- App Development (MODU app modal) ---------- */
/* One card, centered in the grid */
#app-grid { grid-template-columns: repeat(auto-fit, minmax(18rem, 23rem)); justify-content: center; }
/* Show the whole app thumbnail (match the media box to its ratio, no crop) */
#app-grid .cs-card-media { aspect-ratio: 1200 / 668; }
#app-modal .cs-modal-panel { height: auto; max-height: 94vh; overflow-y: auto; overflow-x: hidden; }
#app-modal .cs-modal-panel { scrollbar-width: thin; scrollbar-color: var(--coral) transparent; }
#app-modal .cs-modal-panel::-webkit-scrollbar { width: 0.6rem; }
#app-modal .cs-modal-panel::-webkit-scrollbar-track { background: transparent; }
#app-modal .cs-modal-panel::-webkit-scrollbar-thumb { background: var(--coral); border-radius: 1rem; border: 0.16rem solid var(--panel); }

/* Unified coral scrollbar for any scrollable case-study modal area
   (rows/grouped layouts like "Other Titles") to match the web modal */
.cs-modal-panel,
.cs-modal-carousel.is-rows,
.cs-modal-carousel.is-grouped { scrollbar-width: thin; scrollbar-color: var(--coral) transparent; }
.cs-modal-panel::-webkit-scrollbar,
.cs-modal-carousel.is-rows::-webkit-scrollbar,
.cs-modal-carousel.is-grouped::-webkit-scrollbar { width: 0.6rem; }
.cs-modal-panel::-webkit-scrollbar-track,
.cs-modal-carousel.is-rows::-webkit-scrollbar-track,
.cs-modal-carousel.is-grouped::-webkit-scrollbar-track { background: transparent; }
.cs-modal-panel::-webkit-scrollbar-thumb,
.cs-modal-carousel.is-rows::-webkit-scrollbar-thumb,
.cs-modal-carousel.is-grouped::-webkit-scrollbar-thumb { background: var(--coral); border-radius: 1rem; border: 0.16rem solid var(--panel); }
.cs-modal-carousel.is-rows::-webkit-scrollbar-thumb:hover,
.cs-modal-carousel.is-grouped::-webkit-scrollbar-thumb:hover { background: var(--yellow); }
.app-modal-video {
  position: relative; width: 100%; max-width: 42rem; margin: 1.6rem auto 2.4rem;
  flex: 0 0 auto; aspect-ratio: 16 / 9; border-radius: 1.1rem; overflow: hidden;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5); background: #0d0b24;
}
.app-modal-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Click-to-play facade: full custom poster + YouTube play button */
.app-video-facade {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; margin: 0; border: 0;
  background: #0d0b24; cursor: var(--cur-pointer); display: flex; align-items: center; justify-content: center;
}
.app-video-facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-video-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 68px; height: 48px; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
  transition: transform 0.2s ease;
}
.app-video-play svg { width: 100%; height: 100%; display: block; }
.app-video-facade:hover .app-video-play { transform: translate(-50%, -50%) scale(1.08); }
.app-foot { display: flex; flex-direction: column; align-items: center; gap: 3rem; margin-top: 2rem; }
.app-store-soon {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.75rem 1.5rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); border: 1px dashed rgba(255, 255, 255, 0.28);
  color: var(--text); font-weight: 600; font-size: 0.95rem;
}
.app-store-soon svg { width: 1.2rem; height: 1.2rem; color: var(--yellow); }
.app-modal-copyright, .cs-modal-copyright {
  margin: 0.7rem auto 0; max-width: 52rem; text-align: center;
  font-size: 0.68rem; line-height: 1.5; color: var(--muted); opacity: 0.8;
}
.app-modal-copyright { margin-top: 0; }
body.light-mode .app-store-soon { background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.2); }

/* 3D carousel (multi-instance, class-based) */
.carousel {
  position: relative;
  width: 100%;
  max-width: 60rem;
  height: min(52vw, 30rem);
  margin: 0 auto;
  perspective: 1000px;
}
.carousel-track { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.slide {
  position: absolute; top: 50%; left: 50%;
  height: 100%;
  aspect-ratio: 16 / 9;
  width: auto;
  max-width: 100%;
  transform: translate(-50%, -50%);
  transition: all 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0; pointer-events: none; z-index: 1;
}
.slide img, .slide video {
  width: 100%; height: 100%; object-fit: cover;
  background: #0d0b24;
  border-radius: 1rem; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
/* Contain mode (branding): slides shrink-wrap each image so there is no
   dead letterbox space around portrait posters or wide logos */
.cs-fit-contain .slide { aspect-ratio: auto; width: auto; max-width: 94%; }
.cs-fit-contain .slide img, .cs-fit-contain .slide video {
  width: auto; max-width: 100%; height: 100%; object-fit: contain; background: transparent;
}
/* Branding cards: two cards, centered, covers fill the thumbnail */
#branding-grid { grid-template-columns: repeat(auto-fit, minmax(16rem, 20rem)); justify-content: center; }
#branding-grid .cs-card-media { background: #14112e; }
#branding-grid .cs-card-media img { object-fit: cover; object-position: center; }
.slide.active { opacity: 1; z-index: 3; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.slide.prev { opacity: 0.55; z-index: 2; transform: translate(-96%, -50%) scale(0.72); }
.slide.next { opacity: 0.55; z-index: 2; transform: translate(-4%, -50%) scale(0.72); }
.slide.hide-left { opacity: 0; transform: translate(-140%, -50%) scale(0.5); }
.slide.hide-right { opacity: 0; transform: translate(40%, -50%) scale(0.5); }

.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  border: none;
  background: var(--coral); color: #fff; cursor: var(--cur-pointer);
  z-index: 5; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}
.car-btn svg { width: 1.2rem; height: 1.2rem; display: block; }
.car-btn:hover { background: var(--yellow); color: var(--bg1); transform: translateY(-50%) scale(1.1); outline: none; }
.car-prev { left: 0.6rem; }
.car-next { right: 0.6rem; }

.dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin-top: 1.1rem; }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--coral); opacity: 0.4; cursor: var(--cur-pointer); transition: 0.25s; }
.dot.active { transform: scale(1.3); }
.dot.active { opacity: 1; background: var(--yellow); box-shadow: 0 0 0.5rem rgba(253,205,0,0.6); }

/* Illustrations grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1.25rem;
  max-width: 48rem;
  margin: 0 auto;
}
.grid .cell {
  background: rgba(255,255,255,0.04);
  border-radius: 1rem;
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.grid .cell img { max-height: 100%; width: auto; border-radius: 0.6rem; }

/* ---------------- CONTACT ---------------- */
#contact { text-align: center; }
.contact-form { display: flex; flex-direction: column; gap: 0.85rem; max-width: 30rem; margin: 0 auto; }
.contact-input {
  width: 100%; border: none; outline: none; border-radius: 1rem;
  padding: 0.85rem 1rem; font-family: var(--font); font-size: 0.95rem; color: #3c3c3c;
}
textarea.contact-input { min-height: 8rem; resize: vertical; }
.contact-form button, .send-another-btn {
  background: var(--yellow); color: var(--bg1); font-weight: bold; font-size: 1.1rem;
  border: none; border-radius: 0.65rem; padding: 0.85rem 1.6rem; cursor: var(--cur-pointer); transition: all 0.25s ease;
  font-family: var(--font);
}
.contact-form button:hover, .send-another-btn:hover { background: var(--coral); color: var(--cream); outline: 2px solid var(--cream); transform: scale(1.02); }
/* Send-another matches the arrow-pill CTA family */
.send-another-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--yellow); color: var(--about-card); font-size: 0.92rem;
  border-radius: 2rem; padding: 0.3rem 0.3rem 0.3rem 1.4rem;
  transition: transform 0.25s ease;
}
.send-another-btn:hover { background: var(--yellow); color: var(--about-card); outline: none; transform: translateY(-2px); }
.send-another-btn .cv-label { font-size: 0.92rem; }
.success-message { max-width: 30rem; margin: 0 auto; }
.success-message h2 { color: var(--yellow); font-size: clamp(1.5rem, 6vw, 2.5rem); margin-bottom: 1.5rem; }
.social {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--coral);
  color: var(--cream);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.social-link svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: currentColor;
  display: block;
}
.social-link:hover {
  background: var(--yellow);
  color: var(--bg1);
  transform: translateY(-0.25rem);
}

/* ---------------- FOOTER ---------------- */
footer.site-footer {
  position: relative; z-index: 1;
  text-align: center; color: var(--coral);
  padding: 2rem 1rem; font-size: 0.85rem;
}
footer.site-footer .footer-copy { margin-bottom: 0.35rem; }
footer.site-footer .footer-note { color: var(--muted); font-size: 0.78rem; }
body.light-mode footer.site-footer .footer-note { color: #666; }

/* Confetti */
.confetti { position: fixed; width: 0.5rem; height: 0.5rem; top: -1rem; opacity: 0; z-index: 999; pointer-events: none; animation: confettiFall linear forwards; }
@keyframes confettiFall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(100vh) rotate(720deg); } }

/* ---------------- RESPONSIVE / BURGER ---------------- */
@media (max-width: 56rem) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 0; right: 0;
    flex-direction: column; align-items: stretch;
    width: min(72vw, 16rem); height: 100vh;
    padding: 5rem 1.25rem 1.5rem;
    background: var(--panel);
    box-shadow: -0.3rem 0 1.2rem rgba(0,0,0,0.45);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    gap: 0.75rem;
    z-index: 250;
  }
  #topnav.open .nav-links { transform: translateX(0); }
  .nav-links a { text-align: center; }
  .theme-toggle { order: -1; justify-content: center; margin: 0 0 0.5rem; }
  #home { justify-content: center; text-align: center; }
  .hero-text { text-align: center; }
  .hero-text .description { margin-left: auto; margin-right: auto; }
  .cols { justify-content: center; }
}

/* ==================== ANIMATIONS ==================== */
/* Hero entrance — runs on load; pure CSS so content shows even without JS */
.reveal-hero { opacity: 0; animation: heroIn 0.8s ease both; }
.salutation.reveal-hero { animation-delay: 0.15s; }
.name.reveal-hero { animation-delay: 0.35s; }
.title.reveal-hero { animation-delay: 0.55s; }
.description.reveal-hero { animation-delay: 0.75s; }
.cta.reveal-hero { animation-delay: 0.95s; }
.reveal-art { opacity: 0; animation: artIn 1s ease 0.4s both; }
@keyframes heroIn { from { opacity: 0; transform: translateX(-2.5rem); } to { opacity: 1; transform: none; } }
@keyframes artIn { from { opacity: 0; transform: translateY(2.5rem) scale(0.96); } to { opacity: 1; transform: none; } }

/* Scroll-reveal (slide-in) — only active when JS is present, so content is
   never hidden if JS fails to run */
body.js-reveal .reveal { opacity: 0; transform: translateX(-2.5rem); }
body.js-reveal .reveal.in-view {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
@media (prefers-reduced-motion: reduce) {
  .reveal-hero, .reveal-art { animation: none; opacity: 1; }
  body.js-reveal .reveal { opacity: 1; transform: none; }
}

/* ---------------- CASE STUDIES ---------------- */
.cs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.5rem;
  max-width: 60rem;
  margin: 0 auto;
}
.cs-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  padding: 0;
  border-radius: 1rem;
  overflow: hidden;
  cursor: var(--cur-pointer);
  font-family: var(--font);
  color: var(--text);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cs-card:hover { transform: translateY(-0.35rem); box-shadow: 0 0.8rem 1.8rem rgba(0, 0, 0, 0.4); }
.cs-card-media { display: block; aspect-ratio: 16 / 11; overflow: hidden; }
.cs-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; transform: scale(1); transition: transform 0.4s ease; }
.cs-card:hover .cs-card-media img { transform: scale(1.05); }
.cs-card-body { display: block; padding: 0.9rem 1rem 1.1rem; }
.cs-card-title { display: block; color: var(--coral); font-weight: bold; font-size: 1.05rem; margin-bottom: 0.55rem; }
.cs-card-tags, .cs-modal-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cs-tag { background: rgba(253, 205, 0, 0.14); color: var(--yellow); font-size: 0.72rem; font-weight: bold; padding: 0.25rem 0.6rem; border-radius: 0.4rem; }
body.light-mode .cs-card { background: rgba(0, 0, 0, 0.05); }

/* Case-study modal */
.cs-modal { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.cs-modal[hidden] { display: none; }
.cs-modal-backdrop { position: absolute; inset: 0; background: rgba(10, 8, 30, 0.8); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.cs-modal-panel {
  position: relative;
  z-index: 1;
  width: min(74rem, 96%);
  max-height: 96vh;
  height: 96vh;
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 3vw, 2.5rem);
  background: var(--panel);
  border-radius: 1.2rem;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.55);
  animation: csIn 0.3s ease;
}
@keyframes csIn { from { opacity: 0; transform: translateY(1.5rem) scale(0.98); } to { opacity: 1; transform: none; } }
.cs-modal-close {
  position: absolute; top: 0.6rem; right: 0.8rem; z-index: 2;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--coral); color: #fff; border: none; line-height: 1; cursor: var(--cur-pointer);
  transition: background 0.2s ease, transform 0.2s ease;
}
.cs-modal-close svg { width: 1.15rem; height: 1.15rem; display: block; }
.cs-modal-close:hover { background: var(--yellow); color: var(--bg1); transform: scale(1.05); }
.cs-modal-close:focus { outline: none; }
.cs-modal-close:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }

/* Top description block */
.cs-modal-head { flex: 0 0 auto; text-align: center; padding-right: 2.5rem; }
.cs-modal-head h3 { color: var(--coral); font-size: clamp(1.4rem, 4vw, 2.1rem); margin-bottom: 0.5rem; }
.cs-modal-tags { justify-content: center; margin-bottom: 0.7rem; }
.cs-modal-summary { color: var(--text); line-height: 1.5; margin: 0 auto; font-size: 0.9rem; max-width: 48rem; }

/* Middle: 3D carousel fills the remaining space (extra bottom padding
   leaves room for the carousel dots, so they don't touch the footer) */
.cs-modal-carousel { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0.5rem 0 2.4rem; }
.cs-modal-carousel .carousel { width: 100%; max-width: 74rem; height: 100%; margin: 0; }

/* Single still image (no carousel chrome) */
.cs-modal-carousel.is-single { padding: 0.5rem 0 1.4rem; }
.cs-single { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.cs-single img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; border-radius: 1rem; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Grouped mode: several labelled carousels stacked and scrolled vertically */
.cs-modal-carousel.is-grouped { display: block; overflow-y: auto; align-items: stretch; padding: 0.25rem 0.25rem 1rem; }
.cs-group { margin-bottom: 1.75rem; }
.cs-group:last-child { margin-bottom: 0.5rem; }
.cs-group-label {
  text-align: center; color: var(--yellow); font-weight: bold;
  font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase;
  margin: 0 0 0.9rem;
}
.cs-modal-carousel.is-grouped .carousel.cs-grouped {
  width: 100%; max-width: 48rem; height: clamp(13rem, 40vh, 24rem); margin: 0 auto;
}

/* Rows mode: static horizontal rows of images, scrolled vertically */
.cs-modal-carousel.is-rows { display: block; overflow-y: auto; align-items: stretch; padding: 0.25rem 0.25rem 1rem; }
.cs-rowset { margin-bottom: 1.75rem; }
.cs-rowset:last-child { margin-bottom: 0.5rem; }
.cs-rowimgs { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.9rem; }
.cs-row-desc { text-align: center; color: var(--muted); font-size: 0.85rem; line-height: 1.5; max-width: 42rem; margin: -0.3rem auto 0.9rem; }
.cs-rowimgs img, .cs-rowimgs video {
  height: clamp(12rem, 36vh, 21rem); width: auto; max-width: 100%;
  border-radius: 0.8rem; background: #0d0b24;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
/* Smaller tiles for low-resolution artwork (e.g. sticker sets) */
.cs-rowset--small .cs-rowimgs img { height: clamp(6.5rem, 18vh, 9.5rem); }
body.light-mode .cs-modal .cs-row-desc { color: #d4d4d4; }

/* Bottom description block */
.cs-modal-foot { flex: 0 0 auto; text-align: center; margin-top: 0.6rem; }
.cs-modal-role { color: var(--yellow); font-weight: bold; font-size: 0.9rem; margin: 0 0 0.6rem; }
/* Tool icons under the carousel */
.cs-modal-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.85rem; margin: 0 0 1.3rem; }
.cs-tool { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; width: 5rem; }
.cs-tool .tool-ico { width: 2.2rem; height: 2.2rem; }
.cs-tool-name { font-size: 0.65rem; color: var(--muted); text-align: center; line-height: 1.15; }
.cs-modal-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--yellow); color: var(--about-card); text-decoration: none; font-weight: bold;
  border-radius: 2rem; padding: 0.3rem 0.3rem 0.3rem 1.4rem;
  transition: transform 0.25s ease;
}
.cs-modal-link .cv-label { font-size: 0.92rem; }
.cs-modal-link:hover { transform: translateY(-2px); }
/* Two links side by side in the web/MODU modal footer */
.web-foot-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.6rem 0.8rem; }
.cs-modal-link[hidden] { display: none; }
.cs-modal-link--alt { background: var(--coral); color: #fff; }
.cs-modal-link--alt .cv-arrow { background: #fff; color: var(--coral); }

/* ---------------- SERVICES ---------------- */
.kicker { display: flex; align-items: center; gap: 0.5rem; color: var(--text); font-weight: bold; font-size: 0.95rem; margin: 0 0 0.75rem; }
.kicker-dash { display: inline-block; width: 1.5rem; height: 2px; background: var(--yellow); }
.services-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem; }
.services-title { font-size: clamp(1.8rem, 5vw, 2.75rem); font-weight: bold; color: var(--text); margin: 0; }
.services-title .accent { color: var(--yellow); font-style: italic; }
.view-all { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--yellow); border-radius: 2rem; padding: 0.3rem 0.3rem 0.3rem 1.4rem; transition: transform 0.25s ease; }
.view-all:hover { transform: translateY(-2px); }
.view-all-label { background: transparent; color: var(--about-card); font-weight: bold; padding: 0; border-radius: 0; font-size: 0.92rem; }
.view-all-arrow { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; background: #fff; color: var(--about-card); border-radius: 50%; font-size: 1.05rem; }

.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
@media (max-width: 62rem) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 34rem) { .services-grid { grid-template-columns: 1fr; } }
.service-card { background: rgba(255, 255, 255, 0.05); border-radius: 1rem; padding: 1.8rem 1.6rem; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.service-card:hover { transform: translateY(-0.4rem); box-shadow: 0 0.8rem 1.8rem rgba(0, 0, 0, 0.4); }
body.light-mode .service-card { background: rgba(0, 0, 0, 0.05); }
.service-icon { display: inline-flex; align-items: center; justify-content: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: rgba(253, 205, 0, 0.14); margin-bottom: 1.1rem; }
.service-icon svg { width: 1.7rem; height: 1.7rem; fill: var(--yellow); }
.service-card h3 { color: var(--text); font-size: 1.25rem; margin-bottom: 0.6rem; }
.service-card p { color: var(--muted); line-height: 1.55; font-size: 0.92rem; margin: 0 0 1.1rem; }
.service-more { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--yellow); font-weight: bold; font-size: 0.9rem; }
.service-more span { transition: transform 0.2s ease; }
.service-more:hover span { transform: translateX(4px); }

/* ---------------- CONTACT (two-column redesign) ---------------- */
#contact { text-align: left; }
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  max-width: 72rem;
  margin: 0 auto;
}
.contact-title { font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: bold; color: var(--text); margin: 0 0 1rem; line-height: 1.12; }
.contact-title .accent { color: var(--yellow); font-style: italic; }
.contact-lead { color: var(--muted); line-height: 1.6; margin: 0 0 1.8rem; max-width: 26rem; }
.contact-list { list-style: none; padding: 0; margin: 0 0 1.8rem; display: flex; flex-direction: column; gap: 1.1rem; }
.contact-list li { display: flex; align-items: center; gap: 0.9rem; }
.contact-list a { color: var(--text); font-weight: 500; word-break: break-word; transition: color 0.2s ease; }
.contact-list a:hover { color: var(--yellow); }
.ci-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: rgba(253, 205, 0, 0.14); }
.ci-icon svg { width: 1.2rem; height: 1.2rem; fill: var(--yellow); }
#contact .social { justify-content: flex-start; margin-top: 0; }

/* Form grid */
#contact .contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; max-width: none; margin: 0; }
.field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.8rem; font-weight: bold; color: var(--cream); }
.field label span { color: var(--coral); }
select.contact-input {
  appearance: none; -webkit-appearance: none;
  padding-right: 2.2rem; cursor: var(--cur-pointer);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233c3c3c'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.8rem center; background-size: 1.1rem;
}
select.contact-input option { color: #3c3c3c; }

/* Pill submit button (overrides base .contact-form button) */
#contact .submit-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--yellow); border: none; border-radius: 2rem;
  padding: 0.3rem 0.3rem 0.3rem 1.4rem; cursor: var(--cur-pointer); font-family: var(--font);
  width: auto; height: auto; align-self: flex-start;
  transition: transform 0.25s ease;
}
#contact .submit-btn:hover { transform: translateY(-2px); background: var(--yellow); }
#contact .submit-btn:disabled, #contact .submit-btn.is-sending { opacity: 0.75; cursor: progress; transform: none; }
#contact .submit-btn.is-sending .submit-arrow { opacity: 0.5; }
.submit-label { background: transparent; color: var(--about-card); font-weight: bold; padding: 0; border-radius: 0; font-size: 0.95rem; }
.submit-arrow { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; background: #fff; color: var(--about-card); border-radius: 50%; font-size: 1.1rem; }

@media (max-width: 56rem) {
  .contact-wrap { grid-template-columns: 1fr; }
  #contact .contact-form { grid-template-columns: 1fr; }
}

/* ============================================================
   ABOUT v2 — brand-purple intro card, timeline, favorite tools
   ============================================================ */
:root { --about-card: #1a1640; }

.about-v2 { max-width: 80rem; }
.about-v2 .section-title { display: none; }

/* ---- Intro card (matches site purple palette) ---- */
.about-hero {
  background: linear-gradient(135deg, #322c68 0%, #262151 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 1.5rem;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.2rem);
  align-items: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}

/* portrait */
.about-portrait { position: relative; display: flex; justify-content: center; align-items: center; }
.portrait-circle {
  position: relative;
  width: clamp(16rem, 30vw, 25rem);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #ffd23f 0%, var(--yellow) 70%);
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden;
}
.portrait-img {
  width: 108%;
  max-width: none;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.25));
}
/* Real photo variant: the photo already has its own circle, so show it
   standalone with no extra background circle or clipping */
.portrait-circle--photo {
  background: transparent; border-radius: 0; overflow: visible;
  aspect-ratio: auto; align-items: center;
}
.portrait-img--photo {
  width: 100%; height: auto; max-width: none;
  object-fit: contain; object-position: center;
  filter: none;
}
.portrait-chips {
  position: absolute;
  left: 50%; bottom: 6%;
  transform: translateX(-50%);
  width: 118%;
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  justify-content: center;
  pointer-events: none;
}
.pchip {
  font-size: clamp(0.62rem, 1.3vw, 0.78rem);
  font-weight: bold;
  padding: 0.34em 0.85em;
  border-radius: 2rem;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.pchip-y { background: var(--yellow); color: var(--about-card); }
.pchip-d { background: var(--about-card); color: #fff; }

/* intro text */
.about-intro { color: #fff; }
.kicker-onhero { color: #fff; }
.about-h2 {
  font-size: clamp(1.7rem, 4.2vw, 2.8rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  color: #fff;
  font-weight: bold;
}
.about-h2 .accent { color: var(--yellow); font-style: italic; }
.about-desc {
  color: #d9d6f0;
  line-height: 1.65;
  font-size: clamp(0.9rem, 1.6vw, 1rem);
  margin: 0 0 1.8rem;
  max-width: 34rem;
}
.about-stats {
  display: flex; flex-wrap: wrap; gap: clamp(1.2rem, 4vw, 2.6rem);
  margin-bottom: 2rem;
}
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: bold; color: var(--yellow); line-height: 1; }
.stat-label { font-size: 0.82rem; color: #b7b2dd; margin-top: 0.4rem; }

.about-cta-row { display: flex; align-items: center; justify-content: center; gap: 1.1rem; flex-wrap: wrap; }
/* Both buttons the same width, centered as a pair */
.about-cta-row > .cv-menu { flex: 0 0 11rem; }
.about-cta-row > .cv-menu > .cv-btn { width: 100%; }
.about-cta-row > .cv-btn-alt { flex: 0 0 11rem; }
.cv-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 0.4rem;
  background: var(--yellow); color: var(--about-card);
  text-decoration: none; font-weight: bold;
  border: none; cursor: var(--cur-pointer);
  border-radius: 2rem; padding: 0.35rem 0.35rem 0.35rem 1.6rem;
  transition: transform 0.25s ease;
}
.cv-btn:hover { transform: translateY(-2px); }
.cv-label { font-size: 0.92rem; }
.cv-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: #fff; color: var(--about-card); font-size: 1.05rem;
}
.cv-btn-alt {
  background: transparent;
  color: var(--yellow);
  border: 2px solid var(--yellow);
  padding: calc(0.3rem - 2px) calc(1.1rem - 2px) calc(0.3rem - 2px) calc(1.3rem - 2px);
}
.cv-btn-alt .cv-arrow { background: var(--yellow); color: var(--about-card); }
/* Download-CV dropdown */
.cv-menu { position: relative; }
.cv-menu-list {
  position: absolute; top: calc(100% + 0.5rem); left: 0; z-index: 20;
  min-width: 100%; white-space: nowrap;
  display: flex; flex-direction: column; gap: 0.2rem;
  padding: 0.4rem;
  background: #0f0c2b;
  border: 1px solid rgba(253,205,0,0.35);
  border-radius: 0.9rem;
  box-shadow: 0 18px 40px rgba(0,0,0,0.55);
}
.cv-menu-list[hidden] { display: none; }
.cv-menu-list a {
  display: block; text-decoration: none;
  color: #fff; font-weight: bold; font-size: 0.9rem;
  padding: 0.6rem 0.9rem; border-radius: 0.6rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.cv-menu-list a:hover { background: var(--yellow); color: var(--about-card); }
/* Crisp SVG arrows inside the circular buttons */
.cv-arrow svg, .view-all-arrow svg, .submit-arrow svg { width: 1rem; height: 1rem; display: block; }

/* ---- Experience & Education timeline ---- */
.about-timeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
}
.tl-title {
  color: var(--yellow);
  font-size: 1.15rem;
  margin: 0 0 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(253,205,0,0.3);
}
.tl-title-2 { margin-top: 2rem; }
.tl-item { display: flex; gap: 0.9rem; margin-bottom: 1.1rem; }
.tl-dot {
  flex: 0 0 auto; width: 0.75rem; height: 0.75rem; margin-top: 0.35rem;
  border-radius: 50%; background: var(--coral);
  box-shadow: 0 0 0 4px rgba(234,125,109,0.18);
}
.tl-body { display: flex; flex-direction: column; }
.tl-role { color: #fff; font-weight: bold; font-size: 0.95rem; }
.tl-meta { color: var(--muted); font-size: 0.82rem; margin-top: 0.15rem; }
.lang-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lang-chip {
  background: var(--panel); color: var(--cream);
  padding: 0.35em 0.9em; border-radius: 2rem; font-size: 0.85rem;
  border: 1px solid rgba(255,255,255,0.08);
}
.lang-chip em { color: var(--yellow); font-style: normal; font-weight: bold; font-size: 0.78rem; margin-left: 0.15rem; }

/* ---- My Favorite Tools ---- */
.tools-block { margin-top: clamp(3rem, 7vw, 5rem); text-align: center; }
.tools-kicker { justify-content: center; }
.tools-title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.15; margin: 0 0 2.5rem; color: #fff; font-weight: bold;
}
.tools-title .accent { color: var(--yellow); font-style: italic; }
/* ---- Auto-scrolling tool marquees ---- */
.marquee {
  overflow: hidden;
  width: 100%;
  padding: 0.4rem 0;
  margin-bottom: 1rem;
  -webkit-mask: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.marquee-track {
  display: flex;
  gap: 0.9rem;
  width: max-content;
  will-change: transform;
}
.marquee-left  { animation: mq-left  46s linear infinite; }
.marquee-right { animation: mq-right 54s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes mq-left  { from { transform: translateX(0); }    to { transform: translateX(-50%); } }
@keyframes mq-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.tchip {
  display: inline-flex; align-items: center; gap: 0.6rem;
  flex: 0 0 auto;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 2rem;
  padding: 0.45rem 1.15rem 0.45rem 0.45rem;
  color: #fff; font-size: 0.9rem; font-weight: bold;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
}
.tool-ico {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  width: 2.2rem; height: 2.2rem; min-width: 2.2rem; aspect-ratio: 1 / 1;
  border-radius: 0.55rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  overflow: hidden;
}
/* Bare marks sit on the white plate with a little breathing room; the
   fixed square box + default preserveAspectRatio keeps them undistorted. */
.tool-ico svg { width: 76%; height: 76%; display: block; }
/* Self-contained app tiles (Adobe/Autodesk-style) fill the badge with
   their own rounded background, so no white plate behind them. */
.tool-ico--tile { background: transparent; border: none; }
.tool-ico--tile svg { width: 100%; height: 100%; border-radius: 0.5rem; }

/* ---- Responsive ---- */
@media (max-width: 60rem) {
  .about-hero { grid-template-columns: 1fr; text-align: center; }
  .about-portrait { order: -1; }
  .about-desc { margin-left: auto; margin-right: auto; }
  .about-stats { justify-content: center; }
}
@media (max-width: 34rem) {
  .about-timeline { grid-template-columns: 1fr; }
  .kicker-onhero { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ============================================================
   LIGHT MODE — comprehensive contrast overrides
   Warm accent (--accent-warm) reads on cream; dark ink = --text.
   ============================================================ */
body.light-mode { --accent-warm: #b8412a; }

/* Nav */
body.light-mode .logo { color: var(--accent-warm); }
body.light-mode .nav-links a { color: var(--text); }
body.light-mode .nav-links a:hover,
body.light-mode .nav-links a.active { background: var(--coral); color: #fff; outline-color: #fff; }
body.light-mode .theme-label { color: var(--text); }

/* Hero */
body.light-mode .hero-text .salutation,
body.light-mode .hero-text .name,
body.light-mode .hero-text .title { color: var(--accent-warm); }
body.light-mode .cta { color: #2b2350; }
body.light-mode .cta:hover { color: #fff; outline-color: #fff; }

/* Headings, kickers & accent spans on the page background */
body.light-mode .section-title { color: var(--accent-warm); }
body.light-mode .tools-title { color: var(--text); }
body.light-mode .services-title .accent,
body.light-mode .contact-title .accent,
body.light-mode .tools-title .accent { color: var(--accent-warm); }
body.light-mode .kicker-dash { background: var(--accent-warm); }

/* Portfolio tabs */
body.light-mode .pf-tab { color: #2b2350; }
body.light-mode .pf-tab.active { color: #fff; }

/* Experience / Education timeline */
body.light-mode .tl-title { color: var(--text); border-bottom-color: rgba(0,0,0,0.18); }
body.light-mode .tl-role { color: var(--text); }
body.light-mode .lang-chip { color: var(--text); border-color: rgba(0,0,0,0.12); }
body.light-mode .lang-chip em { color: var(--accent-warm); }

/* Tool marquee chips (badges keep their own brand colours) */
body.light-mode .tchip { color: var(--text); border-color: rgba(0,0,0,0.10); }

/* Services */
body.light-mode .view-all-label { background: transparent; color: #2b2350; }
body.light-mode .view-all-arrow { color: #2b2350; }
body.light-mode .service-more { color: var(--accent-warm); }
body.light-mode .service-icon svg { fill: var(--accent-warm); }

/* Contact */
body.light-mode .field label { color: var(--text); }
body.light-mode .field label span { color: var(--accent-warm); }
body.light-mode .submit-label { background: transparent; color: #2b2350; }
body.light-mode .submit-arrow { color: #2b2350; }
body.light-mode .contact-form button,
body.light-mode .send-another-btn { color: #2b2350; }
body.light-mode .success-message h2 { color: var(--accent-warm); }
body.light-mode .ci-icon svg { fill: var(--accent-warm); }
body.light-mode .contact-list a:hover { color: var(--accent-warm); }

/* Portfolio game cards */
body.light-mode .cs-card-title { color: var(--accent-warm); }
body.light-mode .cs-tag { color: var(--accent-warm); background: rgba(184,65,42,0.12); }

/* Portfolio modals follow the light theme in light mode */
body.light-mode .cs-modal-panel { background: var(--panel); }
body.light-mode .cs-modal-head h3 { color: var(--accent-warm); }
body.light-mode .cs-modal-summary,
body.light-mode .web-modal-summary,
body.light-mode .web-modal-credit { color: var(--text); }
body.light-mode .cs-modal-role { color: var(--accent-warm); }
body.light-mode .cs-modal .cs-tag { color: var(--accent-warm); background: rgba(184,65,42,0.12); }
body.light-mode .cs-modal .cs-tool-name { color: var(--muted); }
body.light-mode .cs-modal .cs-group-label { color: var(--accent-warm); }
body.light-mode .cs-modal .cs-row-desc { color: var(--muted); }
body.light-mode .cs-modal-copyright,
body.light-mode .app-modal-copyright { color: var(--muted); }
body.light-mode .cs-modal .cs-modal-link { color: var(--about-card); }
body.light-mode .cs-modal .cs-modal-link--alt { color: #fff; }
body.light-mode .cs-modal .slide img,
body.light-mode .cs-modal .slide video { background: transparent; }

/* About hero follows the light theme in light mode */
body.light-mode .about-hero { background: var(--panel); border-color: rgba(0,0,0,0.08); box-shadow: 0 20px 50px rgba(0,0,0,0.1); }
body.light-mode .about-intro,
body.light-mode .kicker-onhero,
body.light-mode .about-h2 { color: var(--text); }
body.light-mode .about-h2 .accent { color: var(--accent-warm); }
body.light-mode .about-desc { color: var(--muted); }
body.light-mode .stat-num { color: var(--accent-warm); }
body.light-mode .stat-label { color: var(--muted); }

/* ============================================================
   Phone-only refinements (carousel height + rows image ratios)
   ============================================================ */
@media (max-width: 40rem) {
  /* Modal sizes to its content so the carousel isn't stretched tall */
  .cs-modal-panel { height: auto; max-height: 92vh; overflow-y: auto; overflow-x: hidden; }
  .cs-modal-carousel { flex: 0 0 auto; }

  /* Single-image carousel on phone: show only the active slide at its
     natural aspect ratio, so the container wraps the image (no crop, no
     dead space) for every case study, web and branding modal. */
  .cs-modal-carousel .carousel,
  .web-modal-preview .cs-modal-carousel .carousel { height: auto; max-width: 100%; }
  .cs-modal-carousel .carousel-track { height: auto; }
  .cs-modal-carousel .slide,
  .web-modal-preview .slide,
  .cs-fit-contain .slide {
    position: relative; top: auto; left: auto;
    width: 100%; max-width: 100%; height: auto; aspect-ratio: auto;
    transform: none; opacity: 1; pointer-events: auto;
    transition: opacity 0.3s ease;
  }
  .cs-modal-carousel .slide:not(.active) { display: none; }
  .cs-modal-carousel .slide img, .cs-modal-carousel .slide video,
  .web-modal-preview .slide img,
  .cs-fit-contain .slide img, .cs-fit-contain .slide video {
    width: 100%; height: auto; object-fit: contain; max-width: 100%;
  }
  /* Keep the nav arrows centred over the image */
  .cs-modal-carousel .car-btn { top: 50%; }

  /* Let rows/grouped layouts flow inside the panel's own scroll */
  .cs-modal-carousel.is-rows,
  .cs-modal-carousel.is-grouped { overflow: visible; }

  /* Rows images keep their natural aspect ratio (no vertical stretch) */
  .cs-rowimgs img, .cs-rowimgs video { height: auto; width: 100%; max-width: 100%; }
  .cs-rowimgs video { aspect-ratio: 16 / 9; object-fit: cover; }
  .cs-rowset--small .cs-rowimgs img { height: auto; width: auto; max-width: 31%; }
}

/* ============================================================
   Case study page (modu.html) — single readable column
   ============================================================ */
.cs-page { max-width: 720px; margin: 0 auto; padding: calc(var(--nav-h) + 2.5rem) 1.25rem 4rem; }
.cs-page-back {
  display: inline-flex; align-items: center; gap: 0.45rem;
  color: var(--coral); font-weight: bold; font-size: 0.95rem; text-decoration: none;
}
.cs-page-back svg { width: 1.1rem; height: 1.1rem; }
.cs-page-back:hover { text-decoration: underline; }
.cs-page-back--foot { margin-top: 2.5rem; }
.cs-page-head { margin-top: 1.5rem; }
.cs-page-title { color: var(--coral); font-size: clamp(2.2rem, 7vw, 3.4rem); line-height: 1.05; }
.cs-page-lede { color: var(--text); font-size: clamp(1.05rem, 2.6vw, 1.3rem); line-height: 1.5; margin: 0.8rem 0 0; }
.cs-page-media { margin: 1.8rem 0; border-radius: 1rem; overflow: hidden; background: #0d0b24; box-shadow: 0 10px 40px rgba(0,0,0,0.4); }
.cs-page-media img { display: block; width: 100%; height: auto; }
.cs-page-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1.4rem; margin: 1.8rem 0; padding: 1.2rem 1.3rem; border: 1px solid rgba(255,255,255,0.12); border-radius: 1rem; }
.cs-page-meta div { display: flex; flex-direction: column; gap: 0.2rem; }
.cs-page-meta dt { color: var(--yellow); font-weight: bold; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.cs-page-meta dd { margin: 0; color: var(--text); font-size: 0.92rem; }
.cs-page-meta a { color: var(--coral); font-weight: bold; }
.cs-page-section { margin-top: 2.2rem; }
.cs-page-section h2 { color: var(--yellow); font-size: clamp(1.3rem, 4vw, 1.7rem); margin-bottom: 0.6rem; }
.cs-page-section p { color: var(--muted); line-height: 1.7; margin: 0 0 0.9rem; }
.cs-page-list { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--muted); line-height: 1.7; }
.cs-page-list li { margin-bottom: 0.3rem; }
.cs-page-list strong { color: var(--text); }
.cs-ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 9rem; margin: 1rem 0 0; padding: 1.5rem;
  border: 2px dashed rgba(255,255,255,0.28); border-radius: 1rem;
  color: var(--muted); font-size: 0.85rem; font-style: italic;
  background: rgba(255,255,255,0.03);
}
@media (max-width: 34rem) { .cs-page-meta { grid-template-columns: 1fr; } }
body.light-mode .cs-page-title { color: var(--accent-warm); }
body.light-mode .cs-page-section h2 { color: var(--accent-warm); }
body.light-mode .cs-page-back,
body.light-mode .cs-page-meta a { color: var(--accent-warm); }
body.light-mode .cs-page-meta dt { color: var(--accent-warm); }
body.light-mode .cs-page-meta { border-color: rgba(0,0,0,0.12); }
body.light-mode .cs-ph { border-color: rgba(0,0,0,0.2); background: rgba(0,0,0,0.03); }

/* Hero job titles in a pill (Rayyan-style role bar) */
.hero-text .title {
  display: inline-block; width: fit-content; max-width: 100%;
  background: #0f0c2b; color: var(--coral);
  border: 1px solid rgba(234, 125, 109, 0.35);
  border-radius: 999px; padding: 0.5rem 1.15rem;
  font-size: clamp(0.95rem, 1.7vw, 1.2rem); line-height: 1.35;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
body.light-mode .hero-text .title { background: #2b2350; color: #fdf2e9; border-color: transparent; }
@media (max-width: 34rem) { .hero-text .title { border-radius: 1.2rem; } }

/* Beanbag gamer on a yellow disc (the old portrait had the disc baked in) */
.hero-art-wrapper::before {
  content: ""; position: absolute; z-index: 0;
  left: 39%; bottom: 6%; transform: translateX(-50%);
  width: 88%; aspect-ratio: 1; border-radius: 50%;
  background: var(--yellow);
}
.hero-art img.girl-illustration { position: relative; z-index: 1; width: min(26rem, 78vw); filter: drop-shadow(0 8px 16px rgba(0,0,0,0.25)); }
.speech-bubble { z-index: 2; }

/* Bigger name and job-title pill */
.hero-text .name { font-size: clamp(2.6rem, 5.8vw, 4.5rem); }
.hero-text .title { font-size: clamp(1.1rem, 2vw, 1.5rem); padding: 0.6rem 1.4rem; margin-top: 0.4rem; }

/* Name + title share one left edge with the paragraph and button.
   The name box is sized to the longest name, so the cycling names
   never shift the layout; the title is a compact tag under it. */
.name-block { display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; margin-bottom: 1.5rem; }
.name-block .name { margin: 0; font-size: clamp(2.4rem, 4.6vw, 4rem); text-align: left; }
.name-block .name-loop-list { align-items: flex-start; }
.name-block .title {
  display: inline-block; width: auto; margin: 0;
  font-size: clamp(0.85rem, 1.1vw, 1rem); font-weight: 600; letter-spacing: 0.01em;
  padding: 0.4rem 0.95rem; border-radius: 999px; text-align: left;
  box-shadow: none;
}
@media (max-width: 56rem) {
  .name-block { align-items: center; }
  .name-block .name, .name-block .name-loop-list { text-align: center; align-items: center; }
}
@media (max-width: 34rem) { .name-block .title { font-size: 0.85rem; padding: 0.4rem 0.85rem; } }

/* About: illustration on a coral disc (replaces the photo) */
.portrait-illus { position: relative; width: clamp(15rem, 26vw, 21rem); display: grid; place-items: end center; padding-top: 1rem; }
.portrait-illus::before { content: ""; position: absolute; z-index: 0; left: 50%; bottom: 3%; transform: translateX(-50%);
  width: 92%; aspect-ratio: 1; border-radius: 50%; background: #f8cdc5; }
.portrait-illus-img { position: relative; z-index: 1; width: 100%; height: auto; display: block; }

/* Light mode: CV buttons with real contrast, and different from each other */
body.light-mode .cv-btn { background: #b8412a; color: #fff; }
body.light-mode .cv-btn .cv-arrow { background: #fff; color: #b8412a; }
body.light-mode .cv-btn-alt { background: transparent; color: #2b2350; border-color: #2b2350; }
body.light-mode .cv-btn-alt .cv-arrow { background: #2b2350; color: #fff; }

/* Custom cursor: a soft rounded coral pointer; on links and buttons it
   flips to yellow. Falls back to the system cursors. */
:root { --cur-default: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M5 4 C5 3 6 2.5 7 3 L27 12 C28.2 12.6 28 14.3 26.7 14.6 L18 16.8 L14.6 25.6 C14.1 26.8 12.4 26.8 12.1 25.5 Z' fill='%23EA7D6D' stroke='%23ffffff' stroke-width='3.4' stroke-linejoin='round' paint-order='stroke'/%3E%3Cpath d='M5 4 C5 3 6 2.5 7 3 L27 12 C28.2 12.6 28 14.3 26.7 14.6 L18 16.8 L14.6 25.6 C14.1 26.8 12.4 26.8 12.1 25.5 Z' fill='%23EA7D6D' stroke='%230f0c2b' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") 5 3, auto; --cur-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M5 4 C5 3 6 2.5 7 3 L27 12 C28.2 12.6 28 14.3 26.7 14.6 L18 16.8 L14.6 25.6 C14.1 26.8 12.4 26.8 12.1 25.5 Z' fill='%23FDCD00' stroke='%23ffffff' stroke-width='3.4' stroke-linejoin='round' paint-order='stroke'/%3E%3Cpath d='M5 4 C5 3 6 2.5 7 3 L27 12 C28.2 12.6 28 14.3 26.7 14.6 L18 16.8 L14.6 25.6 C14.1 26.8 12.4 26.8 12.1 25.5 Z' fill='%23FDCD00' stroke='%230f0c2b' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") 5 3, pointer; }
html, body { cursor: var(--cur-default); }
a, button, [role="button"], summary, select, label[for] { cursor: var(--cur-pointer); }
input[type="text"], input[type="email"], input[type="tel"], textarea { cursor: text; }

/* Hero illustration hover: she "charges up" like an arcade character:
   lifts, gets an electric outline and lightning bolts flash around her */
.hero-art img.girl-illustration {
  transition: translate 0.35s cubic-bezier(0.22, 1, 0.36, 1), scale 0.35s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
}
.hero-art-wrapper:hover img.girl-illustration,
.hero-art-wrapper:focus-within img.girl-illustration {
  translate: 0 -0.6rem; scale: 1.04;
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px var(--coral)) drop-shadow(0 0 18px rgba(248, 203, 1, 0.75));
}
.zap-bolt {
  position: absolute; z-index: 3; width: 2.2rem; height: auto; pointer-events: none;
  fill: var(--yellow); stroke: #0f0c2b; stroke-width: 1.5; stroke-linejoin: round;
  opacity: 0; scale: 0.4; transition: opacity 0.2s ease, scale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.zap-bolt--1 { top: 14%; left: 6%; rotate: -18deg; }
.zap-bolt--2 { top: 42%; left: -3%; rotate: 20deg; width: 1.7rem; transition-delay: 0.06s; }
.zap-bolt--3 { bottom: 30%; right: 0; rotate: 8deg; width: 1.9rem; transition-delay: 0.12s; }
.hero-art-wrapper:hover .zap-bolt,
.hero-art-wrapper:focus-within .zap-bolt { opacity: 1; scale: 1; animation: boltFlicker 0.9s steps(1, end) 0.3s infinite; }
@keyframes boltFlicker { 0%, 100% { opacity: 1; } 45% { opacity: 0.35; } 55% { opacity: 1; } 80% { opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) {
  .hero-art-wrapper:hover img.girl-illustration,
  .hero-art-wrapper:focus-within img.girl-illustration { translate: none; scale: none; }
  .hero-art-wrapper:hover .zap-bolt,
  .hero-art-wrapper:focus-within .zap-bolt { animation: none; scale: 1; }
}

/* Speech bubble sits to the right of her head, tail pointing back at her */
.speech-bubble { top: 4%; left: 64%; right: auto; transform: translate(0, -10px); max-width: 13rem; text-align: left; }
.speech-bubble::after {
  left: 1.4rem; transform: none; bottom: -0.75rem;
  border-left: 0.2rem solid transparent; border-right: 0.9rem solid transparent;
}
.hero-art-wrapper:hover .speech-bubble,
.hero-art-wrapper:focus-within .speech-bubble { transform: translate(0, 0); }
@media (max-width: 34rem) { .speech-bubble { top: -6%; left: auto; right: -0.75rem; max-width: 8.5rem; font-size: 0.72rem; padding: 0.6rem 0.8rem; } }

/* Give the illustration headroom so the hover lift/scale never clips under the nav */
.hero-art { padding-top: 4rem; }

/* Yellow disc pops in first, then the girl */
.hero-art-wrapper::before { animation: discPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both; }
@keyframes discPop {
  from { opacity: 0; transform: translateX(-50%) scale(0.2); }
  to   { opacity: 1; transform: translateX(-50%) scale(1); }
}
.hero-art img.girl-illustration.reveal-art { animation-delay: 0.65s; }
@media (prefers-reduced-motion: reduce) { .hero-art-wrapper::before { animation: none; } }

/* Contact: sleepy-desk illustration under the socials, with floating z's */
.contact-illus { position: relative; width: clamp(12rem, 19vw, 15.5rem); margin: 1.75rem 0 0; }
.contact-illus::before {
  content: ""; position: absolute; z-index: 0; left: 50%; bottom: 2%; transform: translateX(-50%);
  width: 95%; aspect-ratio: 1; border-radius: 50%; background: rgba(234, 125, 109, 0.22);
}
.contact-illus img { position: relative; z-index: 1; display: block; width: 100%; height: auto; }
.zzz { position: absolute; z-index: 2; top: 22%; right: 2%; display: flex; gap: 0.15rem; align-items: flex-end;
  font-weight: 800; color: var(--yellow); font-size: 1.1rem; line-height: 1; }
.zzz span { display: inline-block; animation: zFloat 2.6s ease-in-out infinite; opacity: 0; }
.zzz span:nth-child(2) { font-size: 1.35rem; animation-delay: 0.45s; }
.zzz span:nth-child(3) { font-size: 1.7rem; animation-delay: 0.9s; }
@keyframes zFloat { 0% { opacity: 0; translate: 0 0.4rem; } 30%, 70% { opacity: 1; } 100% { opacity: 0; translate: 0.3rem -1rem; } }
body.light-mode .zzz { color: #b8412a; }
body.light-mode .contact-illus::before { background: #f8cdc5; }
@media (prefers-reduced-motion: reduce) { .zzz span { animation: none; opacity: 1; } }
@media (max-width: 56rem) { .contact-illus { width: 11rem; margin: 1.5rem auto 0; } }

/* Contact layout v2: centred title + inline info, then illustration | form,
   socials centred under the form */
#contact .contact-wrap { display: block; max-width: 68rem; }
.contact-head { text-align: center; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.contact-head .kicker { justify-content: center; }
.contact-head .contact-title { margin-bottom: 1.1rem; }
.contact-head .contact-list { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0.8rem 2.5rem; margin: 0; }
.contact-body { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.contact-body .contact-illus { width: 100%; max-width: 20rem; margin: 0 auto; }

@media (max-width: 56rem) {
  .contact-body { grid-template-columns: 1fr; gap: 1.5rem; }
  .contact-body .contact-illus { max-width: 11rem; }
}

/* Contact v3: no disc behind the girl, narrower form, socials in the header */
.contact-illus::before { display: none; }
#contact .contact-wrap { max-width: 60rem; }
.contact-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); justify-content: center; }
.contact-form-col { max-width: 32rem; width: 100%; }
#contact .contact-head .social { justify-content: center; margin-top: 1.25rem; }
@media (max-width: 56rem) {
  .contact-body { grid-template-columns: 1fr; justify-items: center; }
}

/* Contact: smaller social circles, Submit on the right */
#contact .contact-head .social { gap: 0.75rem; }
#contact .social-link { width: 2.4rem; height: 2.4rem; }
#contact .social-link svg { width: 1.1rem; height: 1.1rem; }
#contact .submit-btn { align-self: flex-end; margin-left: auto; }

/* All illustration discs use the site palette: brand yellow (same as the hero) */
.portrait-illus::before { background: var(--yellow); }
#contact .contact-illus::before { display: block; background: var(--yellow); width: 92%; bottom: 4%; }
body.light-mode #contact .contact-illus::before { background: var(--yellow); }

/* About: illustration up and left, wider text column */
@media (min-width: 60.01rem) {
  .about-hero { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.45fr); align-items: start; }
  .about-portrait { justify-content: flex-start; align-items: flex-start; align-self: start; margin-top: -0.5rem; }
  .about-desc { max-width: none; }
}

/* About stats: one centred row, lined up with the CV/LinkedIn buttons */
.about-stats { justify-content: center; flex-wrap: nowrap; gap: clamp(1rem, 3vw, 2.6rem); }
.about-stats .stat { align-items: center; text-align: center; }
.about-stats .stat-label { white-space: nowrap; }
@media (max-width: 34rem) { .about-stats .stat { flex: 1 1 0; } .about-stats .stat-label { white-space: normal; } }

/* Keep the hero speech bubble inside the viewport on mid-size screens */
@media (min-width: 34.01rem) and (max-width: 80rem) {
  .speech-bubble { left: auto; right: -1rem; top: -3%; max-width: 10.5rem; }
}

/* About CTAs: identical box for Download CV and LinkedIn (same height,
   border, padding), so they line up exactly side by side */
.about-cta-row > .cv-menu > .cv-btn,
.about-cta-row > .cv-btn-alt {
  box-sizing: border-box; height: 3.125rem; border: 2px solid transparent;
  padding: 0 0.35rem 0 1.4rem; justify-content: space-between; align-items: center;
}
.about-cta-row > .cv-btn-alt { border-color: var(--yellow); }
body.light-mode .about-cta-row > .cv-btn-alt { border-color: #2b2350; }

/* ============================================================
   Toolkit: two tracks (art / product), each a left-to-right
   process of stages with the tools used at each stage.
   Static (no marquee) so it can be scanned at any pace.
   ============================================================ */
.toolkit { margin-top: clamp(3.5rem, 8vw, 5.5rem); }
.toolkit .tools-kicker { justify-content: center; }
.toolkit .tools-title { text-align: center; margin-bottom: 0.6rem; }
.toolkit-hint { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 0 0 2.5rem; }
@media (hover: none) { .toolkit-hint { display: none; } }

.track {
  --track: var(--coral);
  display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.5rem;
  align-items: start; padding: 1.75rem 0; border-top: 1px solid rgba(255,255,255,0.08);
}
.track--product { --track: var(--yellow); }
.track-label { color: var(--track); font-size: 1.15rem; margin: 0 0 0.35rem; }
.track-sub { color: var(--muted); font-size: 0.85rem; line-height: 1.45; margin: 0; }

.track-steps {
  position: relative; list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem;
}
/* the connecting line through the numbered stops */
.track-steps::before {
  content: ""; position: absolute; top: 0.85rem; left: 0.85rem; right: 0.85rem; height: 2px;
  background: linear-gradient(90deg, var(--track), color-mix(in srgb, var(--track) 25%, transparent));
}
.step { position: relative; min-width: 0; }
.step-num {
  position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: var(--track); color: #1a1640; font-weight: bold; font-size: 0.85rem;
  box-shadow: 0 0 0 4px var(--bg1);
}
.step-name { color: var(--text); font-size: 1rem; margin: 0.7rem 0 0.75rem; }
.step-tools { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }

.toolkit .tchip {
  gap: 0.45rem; padding: 0.25rem 0.75rem 0.25rem 0.25rem; font-size: 0.82rem;
  box-shadow: none; transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.toolkit .tool-ico { width: 1.6rem; height: 1.6rem; min-width: 1.6rem; border-radius: 0.4rem; }
.toolkit .tool-ico--tile svg { border-radius: 0.35rem; }

.track--ai { grid-template-columns: 11rem minmax(0, 1fr); align-items: center; border-bottom: 1px solid rgba(255,255,255,0.08); }
.track--ai .track-label { color: var(--text); font-size: 1rem; margin: 0; }

/* Skill-card hover: light up that skill's tools, dim the rest */
.toolkit.is-filtering .tchip { opacity: 0.3; }
.toolkit.is-filtering .tchip.is-lit {
  opacity: 1; border-color: var(--yellow); transform: translateY(-2px);
  box-shadow: 0 0 0 2px rgba(253, 205, 0, 0.35);
}
.service-card[data-tools] { cursor: default; }

body.light-mode .track { border-color: rgba(0,0,0,0.1); }
body.light-mode .track--product { --track: #b8412a; }
body.light-mode .track--art { --track: #2b2350; }
body.light-mode .step-num { color: #fff; }
body.light-mode .toolkit.is-filtering .tchip.is-lit { border-color: #b8412a; box-shadow: 0 0 0 2px rgba(184, 65, 42, 0.3); }

@media (max-width: 62rem) {
  .track, .track--ai { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 48rem) {
  /* stages become a vertical stepper */
  .track-steps { grid-template-columns: 1fr; gap: 1.25rem; padding-left: 0; }
  .track-steps::before { top: 0.85rem; bottom: 0.85rem; left: 0.84rem; right: auto; width: 2px; height: auto;
    background: linear-gradient(180deg, var(--track), color-mix(in srgb, var(--track) 25%, transparent)); }
  .step { display: grid; grid-template-columns: 1.7rem minmax(0, 1fr); column-gap: 0.9rem; }
  .step-name { margin: 0.2rem 0 0.6rem; }
  .step .step-tools { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { .toolkit .tchip { transition: none; } .toolkit.is-filtering .tchip.is-lit { transform: none; } }

/* ---- Toolkit: decluttering ---- */
.step-tools .is-extra { display: none; }
.step-tools.is-open .is-extra,
.toolkit.is-filtering .step-tools .is-extra.is-lit { display: inline-flex; }
.tchip-more-wrap { display: inline-flex; }
.tchip-more {
  font: inherit; font-size: 0.8rem; font-weight: bold; color: var(--text);
  background: transparent; border: 1px dashed rgba(255,255,255,0.35); border-radius: 2rem;
  padding: 0.45rem 0.85rem; cursor: var(--cur-pointer);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.tchip-more:hover, .tchip-more:focus-visible { border-color: var(--yellow); color: var(--yellow); }
body.light-mode .tchip-more { border-color: rgba(43,35,80,0.4); }
body.light-mode .tchip-more:hover, body.light-mode .tchip-more:focus-visible { border-color: #b8412a; color: #b8412a; }

.track--ai { align-items: start; }
.ai-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem; }
.ai-group .step-name { margin-top: 0; }
.track--ai .track-label { color: var(--text); font-size: 1.15rem; margin: 0 0 0.35rem; }
@media (max-width: 48rem) { .ai-groups { grid-template-columns: 1fr; } }

/* ---- Toolkit: draw-in animation (JS adds .tk-anim only when motion is OK) ---- */
.tk-anim .track-steps::before { transform: scaleX(0); transform-origin: left center; transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s; }
.tk-anim .track-head { opacity: 0; translate: -1rem 0; transition: opacity 0.5s ease, translate 0.5s ease; }
.tk-anim .step-num { scale: 0; transition: scale 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); transition-delay: calc(var(--i, 1) * 0.22s); }
.tk-anim .step-name { opacity: 0; translate: 0 0.5rem; transition: opacity 0.4s ease, translate 0.4s ease; transition-delay: calc(var(--i, 1) * 0.22s + 0.1s); }
.tk-anim .step-tools > li { opacity: 0; translate: 0 0.6rem; transition: opacity 0.35s ease, translate 0.35s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.tk-anim .step .step-tools > li { transition-delay: calc(var(--i, 1) * 0.22s + 0.25s); }
.tk-anim .step-tools > li:nth-child(2) { transition-delay: calc(var(--i, 1) * 0.22s + 0.31s); }
.tk-anim .step-tools > li:nth-child(3) { transition-delay: calc(var(--i, 1) * 0.22s + 0.37s); }
.tk-anim .step-tools > li:nth-child(n+4) { transition-delay: calc(var(--i, 1) * 0.22s + 0.43s); }
.tk-anim .ai-group:nth-child(2) { --i: 2; }
.tk-anim .track.is-drawn .track-steps::before { transform: none; }
.tk-anim .track.is-drawn .track-head,
.tk-anim .track.is-drawn .step-name,
.tk-anim .track.is-drawn .step-tools > li { opacity: 1; translate: 0 0; }
.tk-anim .track.is-drawn .step-num { scale: 1; }
/* once drawn, hover dimming should respond instantly */
.tk-anim .track.is-settled .step-tools > li,
.tk-anim .track.is-settled .step-num,
.tk-anim .track.is-settled .step-name { transition-delay: 0s; }
@media (max-width: 48rem) {
  .tk-anim .track-steps::before { transform: scaleY(0); transform-origin: center top; }
}

/* hover dimming wins over the entry state */
#toolkit.is-filtering .track .step-tools > .tchip { opacity: 0.3; }
#toolkit.is-filtering .track .step-tools > .tchip.is-lit { opacity: 1; }

/* AI track: same anatomy as Art/Product (label, line, numbered stops) */
.track--ai { --track: var(--cream); align-items: start; }
.track--ai .track-label { color: var(--track); font-size: 1.15rem; margin: 0 0 0.35rem; }
.track--ai .track-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.track--ai .step:first-child .step-tools { display: grid; grid-template-columns: repeat(2, max-content); }
.track--ai .step:last-child .step-tools { display: grid; grid-template-columns: repeat(3, max-content); }
body.light-mode .track--ai { --track: #6a4c93; }
@media (max-width: 48rem) {
  .track--ai .track-steps { grid-template-columns: 1fr; }
  .track--ai .step:first-child .step-tools, .track--ai .step:last-child .step-tools { display: flex; }
}

/* ============================================================
   Case-study pages (modu.html, atlasphere.html)
   ============================================================ */
.cs-page { max-width: 46rem; }
.cs-page-kicker { color: var(--yellow); font-weight: bold; font-size: 0.85rem; margin: 0 0 0.4rem; }
.cs-page-lede strong { color: var(--coral); }
.cs-page-media figcaption { padding: 0.7rem 1rem; color: var(--muted); font-size: 0.85rem; background: rgba(255,255,255,0.04); }
.cs-video { position: relative; aspect-ratio: 16 / 9; }
.cs-video .app-video-facade, .cs-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.cs-stats { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.cs-stats li { background: rgba(255,255,255,0.05); border-radius: 1rem; padding: 1.1rem 1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.cs-stat-num { color: var(--yellow); font-size: clamp(1.7rem, 4.5vw, 2.3rem); font-weight: bold; line-height: 1; }
.cs-stat-num small { font-size: 0.5em; color: var(--muted); margin-left: 0.1em; }
.cs-stat-label { color: var(--muted); font-size: 0.85rem; line-height: 1.35; }

.cs-modes { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.cs-modes li { border: 1px solid rgba(255,255,255,0.12); border-radius: 1rem; padding: 1rem 1.1rem; display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 0.6rem; }
.cs-mode-name { color: var(--text); font-weight: bold; font-size: 1.05rem; }
.cs-mode-who { justify-self: end; background: var(--coral); color: #1a1640; font-weight: bold; font-size: 0.8rem; border-radius: 999px; padding: 0.15rem 0.7rem; }
.cs-mode-what { grid-column: 1 / -1; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }

.cs-callout { margin: 2.2rem 0 0; padding: 1.3rem 1.4rem; border-left: 4px solid var(--yellow); background: rgba(253, 205, 0, 0.08); border-radius: 0 1rem 1rem 0; }
.cs-callout-kicker { color: var(--yellow); font-weight: bold; font-size: 0.85rem; margin: 0 0 0.4rem; }
.cs-callout p:last-child { color: var(--text); line-height: 1.65; margin: 0; }

.cs-quotes { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.cs-quotes li { color: var(--text); font-size: 1.05rem; font-style: italic; padding: 0.8rem 1.1rem; border-radius: 1rem 1rem 1rem 0.25rem; background: rgba(234, 125, 109, 0.14); width: fit-content; max-width: 100%; }

.cs-features { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.cs-features li { background: rgba(255,255,255,0.05); border-radius: 1rem; padding: 1rem 1.1rem; color: var(--muted); font-size: 0.92rem; line-height: 1.5; display: flex; flex-direction: column; gap: 0.3rem; }
.cs-feature-title { color: var(--text); font-weight: bold; font-size: 1rem; }
.cs-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; margin-top: 1.2rem; }
.cs-gallery figure { margin: 0; border-radius: 0.75rem; overflow: hidden; background: #0d0b24; }
.cs-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }

.cs-page-legal { margin: 2.2rem 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }

.cs-next { margin-top: 2.5rem; }
.cs-next a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.2rem 1rem; padding: 1.2rem 1.4rem; border-radius: 1.2rem; background: var(--coral); color: #1a1640; transition: transform 0.2s ease; }
.cs-next a:hover, .cs-next a:focus-visible { transform: translateY(-3px); }
.cs-next-kicker { font-size: 0.85rem; font-weight: bold; }
.cs-next-title { grid-column: 1; font-size: 1.6rem; font-weight: bold; line-height: 1.1; }
.cs-next-arrow { grid-column: 2; grid-row: 1 / 3; display: inline-flex; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: #fff; align-items: center; justify-content: center; }
.cs-next-arrow svg { width: 1.2rem; height: 1.2rem; }

@media (max-width: 34rem) {
  .cs-stats, .cs-modes, .cs-features { grid-template-columns: 1fr; }
  .cs-gallery { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { .cs-next a { transition: none; } .cs-next a:hover { transform: none; } }

body.light-mode .cs-page-kicker, body.light-mode .cs-callout-kicker, body.light-mode .cs-stat-num { color: var(--accent-warm); }
body.light-mode .cs-page-lede strong { color: var(--accent-warm); }
body.light-mode .cs-page-meta, body.light-mode .cs-modes li { border-color: rgba(0,0,0,0.12); }
body.light-mode .cs-page-meta dt { color: var(--accent-warm); }
body.light-mode .cs-stats li, body.light-mode .cs-features li { background: rgba(0,0,0,0.05); }
body.light-mode .cs-callout { background: rgba(184, 65, 42, 0.08); border-color: var(--accent-warm); }
body.light-mode .cs-mode-who { background: #2b2350; color: #fff; }
body.light-mode .cs-quotes li { background: rgba(184, 65, 42, 0.1); }
body.light-mode .cs-next a { background: #2b2350; color: #fff; }
body.light-mode .cs-next-arrow { color: #2b2350; }

/* Portfolio cards that open a full case-study page */
.cs-card--case { position: relative; text-decoration: none; outline-offset: 3px; }
.cs-card--case .cs-card-media { position: relative; }
.cs-badge {
  position: absolute; top: 0.7rem; right: 0.7rem; z-index: 2;
  background: var(--yellow); color: #1a1640; font-weight: bold; font-size: 0.8rem;
  padding: 0.3rem 0.75rem; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.cs-card-cta { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.7rem; color: var(--yellow); font-weight: bold; font-size: 0.9rem; }
.cs-card-cta svg { width: 1rem; height: 1rem; transition: transform 0.2s ease; }
.cs-card--case:hover .cs-card-cta svg, .cs-card--case:focus-visible .cs-card-cta svg { transform: translateX(4px); }
body.light-mode .cs-card-cta { color: var(--accent-warm); }
@media (prefers-reduced-motion: reduce) { .cs-card-cta svg { transition: none; } }

/* Case study: grid of in-app screenshots with captions */
.cs-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; margin-top: 1.2rem; }
.cs-shots figure { margin: 0; border-radius: 0.9rem; overflow: hidden; background: rgba(255,255,255,0.05); }
.cs-shots figure:first-child { grid-column: 1 / -1; }
.cs-shots img { display: block; width: 100%; height: auto; }
.cs-shots figcaption { padding: 0.6rem 0.9rem; color: var(--muted); font-size: 0.85rem; line-height: 1.4; }
body.light-mode .cs-shots figure { background: rgba(0,0,0,0.05); }
@media (max-width: 34rem) { .cs-shots { grid-template-columns: 1fr; } }
.cs-shots figure.cs-shot--wide { grid-column: 1 / -1; }
.cs-shots--steps figcaption b {
  display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; margin-right: 0.45rem;
  border-radius: 50%; background: var(--yellow); color: #1a1640; font-size: 0.8rem;
}
body.light-mode .cs-shots--steps figcaption b { background: var(--accent-warm); color: #fff; }

/* Case Studies tab: two cards, centred as a pair */
#case-grid { grid-template-columns: repeat(2, minmax(0, 26rem)); justify-content: center; }
#case-grid .cs-card-media { aspect-ratio: 16 / 10; }
@media (max-width: 40rem) { #case-grid { grid-template-columns: minmax(0, 1fr); } }

/* Portfolio tabs: always one row. They shrink a little on mid-size
   screens and become a swipeable strip on small ones. */
.pf-tabs {
  flex-wrap: nowrap; justify-content: safe center; gap: clamp(0.4rem, 0.8vw, 0.75rem);
  overflow-x: auto; scrollbar-width: none; padding: 0.35rem 0.25rem; margin-left: auto; margin-right: auto; max-width: 100%;
  scroll-snap-type: x proximity;
}
.pf-tabs::-webkit-scrollbar { display: none; }
.pf-tab { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: center; font-size: clamp(0.8rem, 1vw, 0.9rem); padding: 0.6rem clamp(0.75rem, 1.1vw, 1.2rem); }
.pf-tab:hover { transform: none; filter: brightness(1.06); }
@media (max-width: 48rem) {
  .pf-tabs { justify-content: flex-start; margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; padding-right: 1rem; max-width: none;
    -webkit-mask: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 2rem), transparent 100%);
            mask: linear-gradient(90deg, transparent 0, #000 1rem, #000 calc(100% - 2rem), transparent 100%); }
}

/* Case-study header: three facts, link buttons, tech stack with logos */
.cs-page-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 40rem) { .cs-page-meta { grid-template-columns: 1fr 1fr; } }
@media (max-width: 26rem) { .cs-page-meta { grid-template-columns: 1fr; } }
.cs-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0 0 1.6rem; }
.cs-link {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.75rem 1.3rem; border-radius: 999px; font-weight: bold; font-size: 0.98rem;
  border: 2px solid var(--yellow); color: var(--yellow); background: transparent;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.cs-link svg { width: 1.15rem; height: 1.15rem; flex: none; }
.cs-link--primary { background: var(--yellow); color: #1a1640; }
.cs-link:hover, .cs-link:focus-visible { transform: translateY(-2px); }
.cs-link:not(.cs-link--primary):hover { background: rgba(253, 205, 0, 0.12); }
body.light-mode .cs-link { border-color: #2b2350; color: #2b2350; }
body.light-mode .cs-link--primary { background: #b8412a; border-color: #b8412a; color: #fff; }
body.light-mode .cs-link:not(.cs-link--primary):hover { background: rgba(43, 35, 80, 0.08); }
@media (prefers-reduced-motion: reduce) { .cs-link { transition: none; } .cs-link:hover { transform: none; } }

.cs-stack { margin: 0 0 1.4rem; }
.cs-stack-title { color: var(--yellow); font-weight: bold; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.6rem; }
.cs-stack-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cs-stack .tchip { gap: 0.45rem; padding: 0.25rem 0.8rem 0.25rem 0.25rem; font-size: 0.85rem; box-shadow: none; }
.cs-stack .tool-ico { width: 1.7rem; height: 1.7rem; min-width: 1.7rem; border-radius: 0.4rem; }
body.light-mode .cs-stack-title { color: var(--accent-warm); }
.cs-page--modu .cs-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 40rem) { .cs-page--modu .cs-stats { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   Case studies: progress trail + "Try it" widgets
   ============================================================ */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Progress trail (wide screens only; it sits in the empty left margin) */
.cs-trail { display: none; }
@media (min-width: 75rem) {
  .cs-trail { display: block; position: fixed; z-index: 50; top: 50%; transform: translateY(-50%); left: max(1.5rem, calc(50% - 23rem - 15rem)); width: 12rem; }
  .cs-trail ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; position: relative; }
  .cs-trail::before, .cs-trail-fill { content: ""; position: absolute; left: 0.45rem; top: 0.45rem; width: 2px; background: rgba(255,255,255,0.15); bottom: 0.45rem; border-radius: 2px; }
  .cs-trail-fill { bottom: auto; height: 0; background: var(--yellow); transition: height 0.35s ease; z-index: 1; }
  .cs-trail a { position: relative; z-index: 2; display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-size: 0.85rem; line-height: 1.25; text-decoration: none; }
  .cs-trail-dot { flex: none; width: 0.95rem; height: 0.95rem; border-radius: 50%; background: var(--bg1); border: 2px solid rgba(255,255,255,0.35); transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease; }
  .cs-trail a.is-passed .cs-trail-dot { background: var(--yellow); border-color: var(--yellow); }
  .cs-trail a[aria-current] { color: var(--text); font-weight: bold; }
  .cs-trail a[aria-current] .cs-trail-dot { transform: scale(1.3); box-shadow: 0 0 0 4px rgba(253, 205, 0, 0.2); }
  .cs-trail a:hover .cs-trail-label, .cs-trail a:focus-visible .cs-trail-label { color: var(--yellow); }
  body.light-mode .cs-trail::before { background: rgba(0,0,0,0.12); }
  body.light-mode .cs-trail-fill, body.light-mode .cs-trail a.is-passed .cs-trail-dot { background: var(--accent-warm); border-color: var(--accent-warm); }
  body.light-mode .cs-trail-dot { border-color: rgba(0,0,0,0.3); }
  body.light-mode .cs-trail a[aria-current] .cs-trail-dot { box-shadow: 0 0 0 4px rgba(184, 65, 42, 0.18); }
  body.light-mode .cs-trail a:hover .cs-trail-label { color: var(--accent-warm); }
}
@media (prefers-reduced-motion: reduce) { .cs-trail-fill, .cs-trail-dot { transition: none !important; } }
.cs-page-section > h2 { scroll-margin-top: calc(var(--nav-h) + 1.5rem); }

/* Shared "Try it" panel */
.cs-try { margin: 1.6rem 0 0; padding: 1.4rem; border-radius: 1.2rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(253, 205, 0, 0.35); }
.cs-try-kicker { display: inline-block; margin: 0 0 0.5rem; padding: 0.2rem 0.7rem; border-radius: 999px; background: var(--yellow); color: #1a1640; font-weight: bold; font-size: 0.78rem; }
.cs-try-title { color: var(--text); font-size: 1.2rem; margin: 0 0 0.9rem; }
.cs-try-hint { color: var(--muted); font-size: 0.92rem; line-height: 1.5; margin: -0.4rem 0 1rem; }
.cs-try-hint b { color: var(--text); }
.cs-try-note { color: var(--muted); font-size: 0.78rem; margin: 0.9rem 0 0; }
body.light-mode .cs-try { background: rgba(0,0,0,0.04); border-color: rgba(184, 65, 42, 0.35); }
body.light-mode .cs-try-kicker { background: #b8412a; color: #fff; }

/* MODU helper picker */
.helper-pick { border: 0; margin: 0; padding: 0; min-width: 0; }
.helper-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
.helper-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.5rem 0.4rem 0.6rem; border-radius: 1rem; background: #f6efe4; border: 2px solid transparent; cursor: var(--cur-pointer); transition: transform 0.2s ease, border-color 0.2s ease; }
.helper-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: inherit; }
.helper-opt img { width: 4.2rem; height: auto; display: block; }
.helper-opt-name { color: #2b2350; font-weight: bold; font-size: 0.95rem; }
.helper-opt-mode { color: #5a5175; font-size: 0.75rem; }
.helper-opt:hover { transform: translateY(-2px); }
.helper-opt:has(input:checked) { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(253, 205, 0, 0.35); }
.helper-opt:has(input:focus-visible) { outline: 3px solid var(--coral); outline-offset: 2px; }
body.light-mode .helper-opt:has(input:checked) { border-color: #b8412a; box-shadow: 0 0 0 3px rgba(184, 65, 42, 0.25); }
.helper-out { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; align-items: start; margin-top: 1rem; padding: 1rem; border-radius: 1rem; background: #f6efe4; color: #2b2350; }
.helper-out-img { width: 5.5rem; height: auto; border-radius: 0.8rem; background: #fff; }
.helper-out-step { margin: 0 0 0.2rem; font-size: 0.75rem; font-weight: bold; color: #7a6f94; }
.helper-out-who { margin: 0 0 0.4rem; font-weight: bold; color: #6a4c93; }
.helper-out-say { margin: 0 0 0.6rem; font-size: 1.02rem; line-height: 1.5; color: #2b2350; }
.helper-out-how { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.helper-out-how li { background: #fff; border-radius: 999px; padding: 0.2rem 0.65rem; font-size: 0.78rem; font-weight: bold; color: #4a3f6b; }
.helper-out.is-swap .helper-out-img { animation: helperPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.helper-out.is-swap .helper-out-body { animation: helperIn 0.35s ease; }
@keyframes helperPop { from { transform: scale(0.8) rotate(-6deg); } to { transform: none; } }
@keyframes helperIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 34rem) {
  .helper-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .helper-out { grid-template-columns: 1fr; } .helper-out-img { width: 4.5rem; }
}

/* Atlasphere sync demo */
.sync-places { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.sync-place { font: inherit; font-weight: bold; font-size: 0.88rem; padding: 0.55rem 0.95rem; border-radius: 999px; border: 2px solid #d6994f; background: #d6994f; color: #1a1640; cursor: var(--cur-pointer); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.sync-place:hover { transform: translateY(-2px); }
.sync-place[aria-pressed="true"] { background: #fff; box-shadow: 0 0 0 3px rgba(214, 153, 79, 0.45); }
.sync-cols { display: grid; grid-template-columns: minmax(0, 1fr) 2.5rem minmax(0, 1fr); align-items: stretch; }
.sync-col { background: #11182b; border-radius: 1rem; padding: 0.9rem; }
.sync-col-head { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.7rem; color: #fff; font-weight: bold; font-size: 0.92rem; }
.sync-avatar { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: #3e5a8a; color: #fff; font-size: 0.65rem; font-weight: bold; }
.sync-friend .sync-avatar { background: #d6994f; color: #1a1640; }
.sync-day { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.sync-slot { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; padding: 0.55rem 0.75rem; border-radius: 0.7rem; border: 2px dashed rgba(255,255,255,0.2); background: transparent; color: #c9cfdc; font: inherit; text-align: left; }
button.sync-slot { cursor: var(--cur-pointer); }
.sync-slot-time { font-size: 0.72rem; font-weight: bold; color: #8f9bb5; }
.sync-slot-val { font-size: 0.9rem; }
.sync-slot.is-filled { border-style: solid; border-color: #d6994f; background: #d6994f; color: #1a1640; }
.sync-slot.is-filled .sync-slot-time { color: #4a3420; }
.sync-slot.is-filled .sync-slot-val { font-weight: bold; }
.is-picking .sync-you .sync-slot:not(.is-filled), .sync-slot.is-over { border-color: #d6994f; background: rgba(214, 153, 79, 0.12); }
.sync-slot.is-flash { animation: syncFlash 0.6s ease; }
@keyframes syncFlash { 0% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(214,153,79,0.7); } 100% { transform: none; box-shadow: 0 0 0 10px rgba(214,153,79,0); } }
.sync-wire { align-self: center; justify-self: center; width: 100%; height: 2px; background: repeating-linear-gradient(90deg, #d6994f 0 6px, transparent 6px 12px); opacity: 0.5; }
.is-syncing .sync-wire { opacity: 1; animation: syncWire 0.45s linear infinite; }
@keyframes syncWire { to { background-position: 12px 0; } }
.sync-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 0.9rem; }
.sync-status { margin: 0; color: var(--text); font-size: 0.9rem; }
.sync-reset { font: inherit; font-size: 0.85rem; font-weight: bold; padding: 0.4rem 0.9rem; border-radius: 999px; background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,0.35); cursor: var(--cur-pointer); }
body.light-mode .sync-reset { border-color: rgba(0,0,0,0.3); }
@media (max-width: 34rem) {
  .sync-cols { grid-template-columns: 1fr; gap: 0.6rem; }
  .sync-wire { width: 2px; height: 1.6rem; background: repeating-linear-gradient(180deg, #d6994f 0 6px, transparent 6px 12px); }
}
@media (prefers-reduced-motion: reduce) {
  .helper-out.is-swap .helper-out-img, .helper-out.is-swap .helper-out-body, .sync-slot.is-flash, .is-syncing .sync-wire { animation: none; }
  .helper-opt, .sync-place { transition: none; }
}
/* Paragraph colours inside the Try-it panels (beat .cs-page-section p) */
.cs-try p.cs-try-kicker { color: #1a1640; margin: 0 0 0.5rem; }
body.light-mode .cs-try p.cs-try-kicker { color: #fff; }
.cs-try p.cs-try-hint { color: var(--muted); }
.cs-try p.cs-try-note { color: var(--muted); }
.helper-out p.helper-out-step { color: #6b6185; }
.helper-out p.helper-out-who { color: #5b3f86; }
.helper-out p.helper-out-say { color: #2b2350; }
.sync-demo p.sync-status { color: var(--text); margin: 0; }
.sync-col p.sync-col-head { color: #fff; margin: 0 0 0.7rem; }
.helper-out-img { background: none; }
.helper-opt img { width: 4.6rem; }

/* Case-study header: centre the link buttons and the tech stack */
.cs-links { justify-content: center; }
.cs-stack { text-align: center; }
.cs-stack-list { justify-content: center; }

/* Helper panel v2: step header, then avatar + speech bubble + what changes */
.helper-out { display: block; padding: 0; overflow: hidden; }
.helper-out p.helper-out-step { margin: 0; padding: 0.65rem 1.1rem; background: #ebe1d0; color: #4a3f6b; font-size: 0.85rem; font-weight: bold; }
.helper-out-step span { display: inline-block; margin-right: 0.5rem; padding: 0.1rem 0.55rem; border-radius: 999px; background: #6a4c93; color: #fff; font-size: 0.75rem; }
.helper-out-main { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1.1rem; align-items: center; padding: 1.1rem 1.2rem 1.2rem; }
.helper-out-img { width: 6.5rem; height: auto; align-self: start; }
.helper-out p.helper-out-who { margin: 0; font-size: 1.15rem; font-weight: bold; color: #2b2350; display: flex; align-items: center; gap: 0.5rem; }
.helper-out-who span { font-size: 0.75rem; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--coral); color: #1a1640; }
.helper-out p.helper-out-best { margin: 0.2rem 0 0.75rem; font-size: 0.88rem; color: #6b6185; }
.helper-out p.helper-out-say {
  position: relative; margin: 0 0 0.9rem; padding: 0.8rem 1rem; border-radius: 0.25rem 1rem 1rem 1rem;
  background: #fff; color: #2b2350; font-size: 1rem; line-height: 1.5; box-shadow: 0 2px 8px rgba(43, 35, 80, 0.08);
}
.helper-out p.helper-out-label { margin: 0 0 0.4rem; font-size: 0.72rem; font-weight: bold; letter-spacing: 0.06em; text-transform: uppercase; color: #7a6f94; }
.helper-out-how li { background: #ebe1d0; }
body.light-mode .helper-out-who span { background: #2b2350; color: #fff; }
@media (max-width: 34rem) {
  .helper-out-main { grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.8rem; align-items: start; }
  .helper-out-img { width: 4.5rem; }
}
@media (max-width: 34rem) {
  .helper-out-main { display: block; }
  .helper-out-img { float: left; width: 4rem; margin: 0 0.8rem 0.6rem 0; }
  .helper-out p.helper-out-say { clear: both; }
  .helper-out p.helper-out-best { margin-bottom: 0.9rem; }
}

/* Helper panel: smaller type, more breathing room at the bottom */
.helper-out p.helper-out-step { font-size: 0.8rem; }
.helper-out-step span { font-size: 0.7rem; }
.helper-out-main { padding: 1.1rem 1.3rem 1.6rem; }
.helper-out p.helper-out-who { font-size: 1.02rem; }
.helper-out-who span { font-size: 0.7rem; }
.helper-out p.helper-out-best { font-size: 0.82rem; margin: 0.15rem 0 0.7rem; }
.helper-out p.helper-out-say { font-size: 0.9rem; line-height: 1.5; padding: 0.7rem 0.95rem; margin-bottom: 1rem; }
.helper-out p.helper-out-label { font-size: 0.68rem; }
.helper-out-how li { font-size: 0.74rem; padding: 0.22rem 0.65rem; }
.cs-try p.cs-try-note { margin-top: 0.8rem; }

/* Quiet "more on Behance" line under the art tabs */
.pf-more { margin: 2rem 0 0; text-align: center; }
.pf-more a { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.92rem; text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; transition: color 0.2s ease; }
.pf-more a svg { width: 1.05rem; height: 1.05rem; fill: currentColor; flex: none; }
.pf-more a svg.pf-more-arrow { fill: none; width: 0.95rem; height: 0.95rem; }
.pf-more a:hover, .pf-more a:focus-visible { color: var(--yellow); }
body.light-mode .pf-more a:hover, body.light-mode .pf-more a:focus-visible { color: var(--accent-warm); }

/* Phones/tablets: give the hero name room below the fixed nav */
@media (max-width: 56rem) {
  #home { padding-top: calc(var(--nav-h) + 2.25rem); }
}
