/* ==========================================================================
   Portfolio — global styles
   Structure mirrors pratibhajoshi.com: hero → work grid → mentions → connect
   ========================================================================== */

:root {
  /* Palette */
  --bg: #ffffff;
  --bg-soft: #fbfaf9;
  --ink: #2b2b2b;
  --ink-muted: #6f6f6f;
  --ink-faint: #9a9a9a;
  --accent: #794DE8;
  --accent-soft: #B2ACE3;
  --rule: #ececec;

  /* Card tints used by the work grid */
  --tint-peach: #fbeae3;
  --tint-lavender: #edeaf7;
  --tint-periwinkle: #e7ecfb;
  --tint-butter: #fbf5d2;
  --tint-mint: #e4f2ec;
  --tint-sky: #e6f1f8;

  /* Type */
  --font-sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* One typeface across the site — headings are set in the sans, not a serif. */
  --font-display: var(--font-sans);

  /* Layout */
  --page-max: 1400px;
  --gutter: 28px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

a { color: inherit; }

.wrap {
  max-width: 100%;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------- Nav ----- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--accent);
}

.logo svg { width: 34px; height: 34px; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--bg);
  border-radius: 999px;
  padding: 11px 20px 11px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  box-shadow: 0 10px 26px -14px rgba(43, 43, 43, 0.3);
  white-space: nowrap;
}

.status-badge__dot {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-block: 6px;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible { color: var(--accent); }

.nav-links a[aria-current="page"] { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
}

.nav-toggle svg { width: 22px; height: 22px; }

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

.hero {
  padding-block: clamp(48px, 9vw, 110px) clamp(40px, 7vw, 90px);
}

.hero__grid {
  display: grid;
  /* minmax(0, …) so the long headline can't squeeze the portrait to min-content */
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.hero__title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(30px, 4.1vw, 50px);
  line-height: 1.32;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
}

.hero__title .accent { color: var(--accent); }
.hero__title .accent-soft { color: var(--accent-soft); }

.hero__meta {
  margin: 0;
  font-size: 16px;
  color: var(--ink-muted);
}

.hero__meta a {
  color: var(--accent-soft);
  text-decoration: none;
}

.hero__meta a:hover { text-decoration: underline; }

/* Offset colour block behind the portrait */
.portrait {
  position: relative;
  /* width is explicit: `margin-inline: auto` opts the grid item out of stretching */
  width: 100%;
  max-width: 330px;
  margin-inline: auto;
}

.portrait::before {
  content: "";
  position: absolute;
  inset: -18px 18px 18px -18px;
  background: linear-gradient(150deg, var(--accent-soft), var(--tint-lavender));
  border-radius: 6px;
}

.portrait img,
.portrait .portrait__ph {
  position: relative;
  border-radius: 4px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  width: 100%;
}

.portrait__ph {
  background: repeating-linear-gradient(45deg, #efefef 0 12px, #e7e7e7 12px 24px);
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* --------------------------------------------------------- Work grid ----- */

.work {
  padding-block: clamp(20px, 4vw, 40px) clamp(50px, 8vw, 100px);
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 34px);
}

.case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: 0 24px 50px -28px rgba(43, 43, 43, 0.28);
  padding: clamp(28px, 3.4vw, 44px) clamp(28px, 3.4vw, 44px) 0;
  min-height: 420px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1),
              box-shadow 0.35s ease;
}

.case-card:hover,
.case-card:focus-visible {
  transform: translateY(-6px);
}

/* White cards, each lifted by its own soft colour-tinted glow instead of a fill */
.case-card--peach      { box-shadow: 0 26px 54px -26px rgba(224, 138, 78, 0.4); }
.case-card--lavender   { box-shadow: 0 26px 54px -26px rgba(121, 77, 232, 0.35); }
.case-card--periwinkle { box-shadow: 0 26px 54px -26px rgba(94, 122, 214, 0.35); }
.case-card--butter     { box-shadow: 0 26px 54px -26px rgba(211, 179, 58, 0.38); }
.case-card--mint       { box-shadow: 0 26px 54px -26px rgba(76, 172, 133, 0.35); }
.case-card--sky        { box-shadow: 0 26px 54px -26px rgba(80, 150, 201, 0.35); }

.case-card--peach:hover,      .case-card--peach:focus-visible      { box-shadow: 0 30px 60px -24px rgba(224, 138, 78, 0.55); }
.case-card--lavender:hover,   .case-card--lavender:focus-visible   { box-shadow: 0 30px 60px -24px rgba(121, 77, 232, 0.5); }
.case-card--periwinkle:hover, .case-card--periwinkle:focus-visible { box-shadow: 0 30px 60px -24px rgba(94, 122, 214, 0.5); }
.case-card--butter:hover,     .case-card--butter:focus-visible     { box-shadow: 0 30px 60px -24px rgba(211, 179, 58, 0.55); }
.case-card--mint:hover,       .case-card--mint:focus-visible       { box-shadow: 0 30px 60px -24px rgba(76, 172, 133, 0.5); }
.case-card--sky:hover,        .case-card--sky:focus-visible        { box-shadow: 0 30px 60px -24px rgba(80, 150, 201, 0.5); }

.case-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.1vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.case-card__desc {
  margin: 0 0 20px;
  font-size: 14.5px;
  color: var(--ink-muted);
}

.case-card__cta {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.case-card__cta .arrow {
  transition: transform 0.3s ease;
  display: inline-block;
}

.case-card:hover .arrow { transform: translateX(6px); }

/* Screenshot peeking in from the bottom of the card */
.case-card__thumb {
  margin-top: auto;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -2px 30px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.case-card__thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* Dark card — for case studies whose own page is dark (e.g. the CLI theme).
   Colours below are the shipped my-theme.json dark palette. */
.case-card--terminal {
  background: #181d21;
  color: #e8ebed;
}

.case-card--terminal .case-card__desc { color: #8f97a1; }

.case-card--terminal .case-card__title {
  color: #e8ebed;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(21px, 1.9vw, 26px);
  font-weight: 500;
}

.case-card--terminal .case-card__cta { color: #909bf5; }

.case-card--terminal .badge-wip {
  background: rgba(144, 155, 245, 0.16);
  color: #909bf5;
}

.term-mock {
  aspect-ratio: 16 / 10;
  background: #22272b;
  border: 1px solid #2a3036;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.85;
  overflow: hidden;
}

.term-mock__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: #181d21;
  border-bottom: 1px solid #2a3036;
}

.term-mock__bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3e454d;
}

.term-mock__bar span {
  margin-left: 8px;
  font-size: 10px;
  color: #8f97a1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.term-mock__body { padding: 14px 16px 22px; color: #e8ebed; }
.term-mock__body p { margin: 0; white-space: nowrap; }

.term-mock .t-mut  { color: #8f97a1; }
.term-mock .t-head { color: #909bf5; }
.term-mock .t-key  { color: #61bfc5; }
.term-mock .t-fn   { color: #eda769; }
.term-mock .t-str  { color: #61bfc5; }

.thumb-ph {
  aspect-ratio: 16 / 10;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.badge-wip {
  display: inline-block;
  align-self: flex-start;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  padding: 4px 11px;
  margin-bottom: 14px;
}

/* ---------------------------------------------------------- Mentions ----- */

.section-rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

.mentions { padding-block: clamp(50px, 8vw, 96px); text-align: center; }

.section-label {
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 600;
  margin: 0 0 18px;
}

.section-intro {
  margin: 0 auto 40px;
  max-width: 44ch;
  color: var(--ink-muted);
  font-size: 15px;
}

.mentions__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 720px;
  margin-inline: auto;
}

.mention {
  display: grid;
  place-items: center;
  min-height: 82px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  color: var(--ink-faint);
  text-decoration: none;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.mention:hover {
  border-color: var(--accent-soft);
  color: var(--ink);
  transform: translateY(-3px);
}

/* ----------------------------------------------------------- Connect ----- */

.connect {
  padding-block: clamp(54px, 8vw, 96px);
  text-align: center;
  background: var(--bg-soft);
}

.connect__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 29px);
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.connect__text { margin: 0 0 6px; color: var(--ink-muted); font-size: 15px; }

.connect__email {
  color: var(--accent-soft);
  text-decoration: none;
  font-size: 15px;
}

.connect__email:hover { text-decoration: underline; }

.socials {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.socials a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.socials a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.social-arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.socials a:hover .social-arrow {
  transform: translate(2px, -2px);
}

.colophon {
  padding-block: 22px 30px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-faint);
  background: var(--bg-soft);
}

/* ------------------------------------------------------ Back to top ------ */

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.45);
  color: var(--accent);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 60;
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* ------------------------------------------------- Inner page shells ----- */

.page-head { padding-block: clamp(48px, 8vw, 96px) clamp(24px, 4vw, 48px); }

.page-head__title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.35;
  margin: 0 0 18px;
  max-width: 22ch;
}

.prose { max-width: 100%; }

.prose p { color: var(--ink-muted); margin: 0 0 20px; }

.prose h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.01em;
  margin: 44px 0 14px;
  color: var(--ink);
}

.prose a {
  color: var(--accent);
  text-decoration: none;
}

.prose a:hover {
  text-decoration: underline;
}

.video-preview-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  border-radius: 12px;
  overflow: hidden;
  margin: 40px 0;
  cursor: pointer;
}

.video-preview-btn {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.3s ease;
}

.video-preview-btn:hover {
  background: rgba(0, 0, 0, 0.3);
}

.video-play-icon {
  width: 80px;
  height: 80px;
  color: white;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  transition: transform 0.3s ease;
}

.video-preview-btn:hover .video-play-icon {
  transform: scale(1.1);
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 3px;
}

.btn-text:hover { color: var(--accent); }

/* Component preview button */
.btn-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(121, 77, 232, 0.2);
}

.btn-preview:hover {
  background: #6b3dd4;
  box-shadow: 0 6px 16px rgba(121, 77, 232, 0.3);
  transform: translateY(-2px);
}

.btn-preview:active {
  transform: translateY(0);
}

/* Image modal */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

.image-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.image-modal__container {
  position: relative;
  z-index: 1001;
  width: 90vw;
  max-width: 90vw;
  height: 90vh;
  max-height: 90vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  overflow-x: auto;
  padding: 20px;
}

.image-modal__image {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.2s ease;
  display: block;
}

.image-modal__image.zoomed {
  cursor: zoom-out;
}

.image-modal__controls {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 12px;
  z-index: 1002;
}

.image-modal__btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.image-modal__btn svg {
  width: 20px;
  height: 20px;
  color: var(--ink);
}

.image-modal__btn:hover {
  background: var(--accent);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(121, 77, 232, 0.25);
}

.image-modal__btn:hover svg {
  color: white;
}

.image-modal__btn:active {
  transform: scale(0.95);
}

/* Hidden utility class */
.hidden {
  display: none !important;
}

/* Experiments / gallery grid */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.gallery__item {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: var(--tint-lavender);
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.gallery__item:nth-child(3n+2) { background: var(--tint-peach); }
.gallery__item:nth-child(3n+3) { background: var(--tint-mint); }

/* --------------------------------------------------------- Breadcrumb ---- */

.breadcrumb { padding-block: 26px 0; }

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.breadcrumb a {
  text-decoration: none;
  color: var(--ink-muted);
  transition: color 0.2s ease;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible { color: var(--accent); }

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--rule);
}

.breadcrumb [aria-current="page"] { color: var(--ink-faint); }

/* Case study placeholder */

.cs-hero { padding-block: clamp(28px, 4vw, 52px) 0; }

.cs-eyebrow {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 14px;
}

.cs-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
}

.cs-banner {
  margin-top: 40px;
  border-radius: var(--radius);
  aspect-ratio: 16 / 7;
  background: var(--tint-periwinkle);
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cs-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-block: 46px;
  padding-block: 28px;
  border-block: 1px solid var(--rule);
}

.cs-facts dt {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.cs-facts dd { margin: 0; font-size: 15px; }

.notice {
  background: var(--tint-butter);
  border-radius: 10px;
  padding: 18px 22px;
  font-size: 14px;
  color: #6b5d1f;
  margin-bottom: 36px;
}

/* ------------------------------------------------------- Password gate --- */

body.gate-page { background: var(--bg-soft); }
body.gate-page .site-nav { background: rgba(251, 250, 249, 0.9); }

.gate {
  min-height: calc(100vh - 73px);
  display: grid;
  place-items: center;
  padding-block: 40px;
}

.gate__inner {
  max-width: 560px;
  text-align: center;
}

.gate__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 28px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--rule);
  color: var(--ink-faint);
}

.gate__icon svg { width: 24px; height: 24px; }

.gate__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}

.gate__subtitle {
  color: var(--ink-muted);
  font-size: 16px;
  margin: 0 0 36px;
}

.gate__form {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 24px 50px -28px rgba(43, 43, 43, 0.28);
  padding: 8px 8px 8px 24px;
  transition: transform 0.2s ease;
}

.gate__form.is-error { animation: gate-shake 0.4s ease; }

.gate__input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink);
  padding-block: 14px;
}

.gate__input::placeholder { color: var(--ink-faint); }

.gate__submit {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.gate__submit:hover,
.gate__submit:focus-visible { color: var(--accent); background: var(--tint-lavender); }

.gate__error {
  color: #c0392b;
  font-size: 14px;
  margin: 16px 0 0;
  min-height: 20px;
}

@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* ------------------------------------------------------- Image Sliders ----- */

.image-slider {
  max-width: 100%;
  margin: 40px 0;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.slider-main {
  position: relative;
  width: 100%;
  background: #f5f5f5;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.slider-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.5);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  z-index: 10;
  transition: background 0.2s;
  padding: 0;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.8);
}

.slider-arrow svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.slider-arrow.prev {
  left: 16px;
}

.slider-arrow.next {
  right: 16px;
}

.slider-thumbnails {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 0 8px 0;
  scroll-behavior: smooth;
}

.slider-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.slider-thumbnails::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

.slider-thumbnails::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.slider-thumbnails::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.thumbnail {
  width: 80px;
  height: 80px;
  min-width: 80px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  object-fit: cover;
}

.thumbnail:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

.thumbnail.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(121, 77, 232, 0.2);
}

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

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .portrait { order: -1; max-width: 260px; margin-inline: 0; }
  .work__grid { grid-template-columns: 1fr; }
  .about__grid { grid-template-columns: 1fr; }
  .mentions__grid { grid-template-columns: repeat(2, 1fr); }
  .cs-facts { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    right: var(--gutter);
    left: var(--gutter);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.5);
  }

  .nav-links[hidden] { display: none; }

  .site-nav__inner { position: relative; }

  .case-card { min-height: 0; }
  .gallery { grid-template-columns: 1fr; }
}

@media (min-width: 641px) {
  /* Menu is always open on wider screens regardless of the toggle state. */
  .nav-links[hidden] { display: flex !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition-duration: 0.01ms !important; }
}
