/* ==========================================================================
   JENNIES DIGITAL - CORE DESIGN SYSTEM & STYLESHEET
   ========================================================================== */

:root {
  --brand-orange: #e65c00;
  --brand-orange-hover: #ff6e0d;
  --brand-orange-light: rgba(230, 92, 0, 0.12);
  --brand-orange-glow: rgba(230, 92, 0, 0.35);

  --brand-yellow: #f7c300;
  --brand-yellow-hover: #ffd428;
  --brand-yellow-light: rgba(247, 195, 0, 0.15);
  --brand-yellow-glow: rgba(247, 195, 0, 0.3);

  --brand-brown: #662300;
  --brand-brown-dark: #381300;
  --brand-brown-light: #8a3203;

  /* Theme Tokens (Dark Mode Default) */
  --bg-primary: #080808;
  --bg-surface: #141414;
  --bg-surface-elevated: #181818;
  --bg-card: #121212;
  --bg-card-hover: #161616;
  --bg-ink: #050505;

  --text-primary: #f5f5f7;
  --text-secondary: rgba(245, 245, 247, 0.82);
  --text-muted: rgba(245, 245, 247, 0.52);
  --text-subtle: rgba(245, 245, 247, 0.32);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.25);
  --border-focus: var(--brand-orange);

  --nav-scrolled-bg: rgba(18, 18, 18, 0.88);
  --nav-scrolled-border: rgba(255, 255, 255, 0.12);
  --nav-link-color: rgba(245, 245, 247, 0.75);
  --nav-link-hover: #ffffff;
  --nav-active-bg: var(--brand-orange);
  --nav-active-color: #ffffff;

  --font-display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', monospace;

  --container-max: 1200px;
  --container-wide: 1440px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 64px -12px rgba(0, 0, 0, 0.6);
}

/* High-Contrast Light Mode */
html.light {
  --bg-primary: #fbf9f6;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f2eee8;
  --bg-card: #ffffff;
  --bg-card-hover: #faf8f5;
  --bg-ink: #f0eae1;

  --text-primary: #111111;
  --text-secondary: #333333;
  --text-muted: #666666;
  --text-subtle: #888888;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.15);
  --border-strong: rgba(0, 0, 0, 0.28);

  --nav-scrolled-bg: rgba(255, 255, 255, 0.9);
  --nav-scrolled-border: rgba(0, 0, 0, 0.1);
  --nav-link-color: #444444;
  --nav-link-hover: #000000;
  --nav-active-bg: var(--brand-orange);
  --nav-active-color: #ffffff;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: "wdth" 100;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==========================================================================
   SITE PRELOADER
   ========================================================================== */
.site-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000000;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s cubic-bezier(0.77, 0, 0.175, 1), transform 0.5s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.5s ease;
  pointer-events: all;
}

html.light .site-preloader {
  background-color: #f8f9fa;
}

.site-preloader.loaded {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100%);
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
  max-width: 320px;
  width: 100%;
}

.preloader-logo-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.preloader-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  z-index: 2;
  animation: preloader-float 1.8s ease-in-out infinite alternate;
}

.preloader-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  margin-top: -40px;
  margin-left: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 92, 0, 0.45) 0%, rgba(230, 92, 0, 0) 70%);
  animation: preloader-pulse 1.8s ease-in-out infinite;
}

@keyframes preloader-pulse {
  0% { transform: scale(0.75); opacity: 0.3; }
  50% { transform: scale(1.35); opacity: 0.9; }
  100% { transform: scale(0.75); opacity: 0.3; }
}

@keyframes preloader-float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

.preloader-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.preloader-bar-wrap {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  margin-bottom: 0.85rem;
}

html.light .preloader-bar-wrap {
  background: rgba(0, 0, 0, 0.08);
}

.preloader-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-orange) 0%, var(--brand-yellow) 100%);
  box-shadow: 0 0 14px rgba(230, 92, 0, 0.7);
  border-radius: 4px;
  transition: width 0.12s ease-out;
}

.preloader-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.preloader-status {
  text-transform: uppercase;
}

.preloader-percent {
  color: var(--brand-orange);
  font-weight: 600;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  pointer-events: none;
  width: 100%;
}

.nav-wrapper-outer {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 14px 1rem 0;
}

.nav-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  pointer-events: auto;
  border: 1px solid transparent;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease, padding 0.3s ease;
}

.site-header.scrolled .nav-bar-inner,
.site-header.subpage-nav .nav-bar-inner {
  background: var(--nav-scrolled-bg);
  border-color: var(--nav-scrolled-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  padding: 8px 12px;
}

html.light .site-header.scrolled .nav-bar-inner,
html.light .site-header.subpage-nav .nav-bar-inner {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.nav-logo-wrap {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  overflow: hidden;
}

.nav-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-menu {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nav-link-color);
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--nav-link-hover);
  background: var(--brand-orange-light);
}

.nav-link.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-color);
  font-weight: 600;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle-btn,
.mobile-menu-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface-elevated);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.theme-toggle-btn svg,
.mobile-menu-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  stroke-width: 2.2;
}

.theme-toggle-btn:hover,
.mobile-menu-btn:hover {
  color: var(--brand-orange);
  border-color: var(--brand-orange);
  background: var(--brand-orange-light);
  transform: translateY(-1px);
}

.mobile-menu-btn {
  display: none;
}

.nav-say-hi-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  height: 36px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface-elevated);
  transition: all 0.2s ease;
}

.nav-say-hi-btn:hover {
  border-color: var(--brand-orange);
  background: var(--brand-orange-light);
  color: #ffffff;
  transform: translateY(-1px);
}

html.light .nav-say-hi-btn:hover {
  color: var(--brand-orange);
}

.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

html.light .mobile-nav-overlay {
  background: rgba(251, 249, 246, 0.97);
}

.mobile-nav-overlay.open {
  display: flex;
}

.mobile-nav-link {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
  color: var(--brand-orange);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding-bottom: 6rem;
  padding-top: 8rem;
  overflow: hidden;
}

.hero-bg-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-character-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-character-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  z-index: 1;
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(8, 8, 8, 0.1) 0%, rgba(8, 8, 8, 0.45) 55%, var(--bg-primary) 100%);
  pointer-events: none;
}

html.light .hero-gradient-overlay {
  background: linear-gradient(180deg, rgba(251, 249, 246, 0.1) 0%, rgba(251, 249, 246, 0.5) 55%, var(--bg-primary) 100%);
}

.hero-ambient-glow {
  position: absolute;
  top: 20%;
  right: 10%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(230, 92, 0, 0.3) 0%, rgba(247, 195, 0, 0.12) 50%, transparent 75%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.8vw, 5.85rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  max-width: 95vw;
  margin-bottom: 2rem;
}

.title-accent {
  background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-yellow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-actions {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.btn-primary-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  background: var(--text-primary);
  color: var(--bg-primary);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.btn-primary-hero:hover {
  background: var(--brand-orange);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(230, 92, 0, 0.4);
}

.btn-secondary-hero {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.btn-secondary-hero:hover {
  border-color: var(--brand-yellow);
  background: var(--brand-yellow-light);
}

/* ==========================================================================
   SHARED SECTION HEADERS
   ========================================================================== */
.section-work,
.section-labs,
.section-about,
.section-blog {
  padding: 7rem 0;
  position: relative;
  background-color: var(--bg-primary);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3.5rem;
}

.tag-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-orange);
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
}

.section-subtitle {
  max-width: 24rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ==========================================================================
   SELECTED WORK GRID - STRICT UNIFORM SIZING & ELLIPSIS CLAMPING
   ========================================================================== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.work-card {
  display: flex;
  flex-direction: column;
  height: 540px; /* Strict uniform height */
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.work-card:hover {
  border-color: var(--brand-orange);
  box-shadow: 0 16px 40px rgba(230, 92, 0, 0.15);
  background: var(--bg-card-hover);
}

.work-card-media {
  position: relative;
  height: 270px;
  width: 100%;
  flex-shrink: 0;
  background: #000000;
  overflow: hidden;
}

.work-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card-meta {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-grow: 1;
  justify-content: space-between;
}

.work-meta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--brand-orange);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.work-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 2.6em;
  margin: 0.15rem 0;
}

.work-card:hover .work-title {
  color: var(--brand-orange);
}

.work-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 3em;
}

.work-metric-highlight {
  margin-top: auto;
  padding-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-yellow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.light .work-metric-highlight {
  color: var(--brand-brown);
}

/* ==========================================================================
   LABS SECTION
   ========================================================================== */
.labs-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
}

.labs-accent {
  background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-yellow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.labs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3.5rem;
}

.lab-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.lab-card:hover {
  border-color: var(--brand-yellow);
  box-shadow: 0 16px 40px rgba(247, 195, 0, 0.15);
  background: var(--bg-card-hover);
}

.lab-phone-frame {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 380px;
  margin: 0 auto 1.5rem;
  background: #000000;
  border-radius: 36px;
  padding: 8px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.lab-phone-inner {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
}

.lab-phone-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Infinite Carousel / Marquee for Lab Case Studies */
.marquee-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin: 2.5rem 0;
  padding: 1.5rem 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

.marquee-track {
  display: flex;
  gap: 1.75rem;
  width: max-content;
  animation: marquee-scroll 45s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - 0.875rem));
  }
}

.carousel-phone-card {
  width: 220px;
  height: 440px;
  flex-shrink: 0;
  background: #000000;
  border-radius: 32px;
  padding: 6px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.carousel-phone-card:hover {
  transform: translateY(-6px);
  border-color: var(--brand-orange);
}

.carousel-phone-card img {
  width: 100%;
  height: 100%;
  border-radius: 26px;
  object-fit: cover;
}

.lab-app-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.lab-app-title svg {
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.lab-card:hover .lab-app-title svg {
  color: var(--brand-yellow);
}

.lab-app-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.lab-app-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--brand-orange);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: flex-start;
  margin-top: 2rem;
}

.scroll-color-text {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--text-muted);
}

.scroll-color-text .word {
  transition: color 0.25s ease;
}

.scroll-color-text .word.highlighted {
  color: var(--text-primary);
}

.scroll-color-text .word.brand-highlight.highlighted {
  color: var(--brand-orange);
}

.about-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2.5rem;
}

.about-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

html.light .about-badge-pill {
  color: var(--text-primary);
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
}

.about-sidebar-text {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.about-cta-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-about-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  background: var(--brand-orange);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.btn-about-primary:hover {
  background: var(--brand-orange-hover);
  box-shadow: 0 10px 24px rgba(230, 92, 0, 0.35);
}

.btn-about-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.btn-about-secondary:hover {
  border-color: var(--brand-yellow);
  background: var(--brand-yellow-light);
}

/* ==========================================================================
   SUBJECT MATTER / BLOG SECTION
   ========================================================================== */
.blog-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.blog-static-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.blog-static-card:hover {
  border-color: var(--brand-orange);
  box-shadow: 0 16px 40px rgba(230, 92, 0, 0.12);
  background: var(--bg-card-hover);
}

.blog-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.blog-category-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-orange);
}

.blog-read-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.blog-card-excerpt {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-orange);
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--brand-orange);
  transition: transform 0.2s ease;
}

.blog-static-card:hover .read-more-link {
  transform: translateX(4px);
}

.blog-view-all-cta {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

/* ==========================================================================
   FOOTER / CONTACT SECTION
   ========================================================================== */
.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  padding: 6rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.footer-hero-link {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 5rem;
}

.footer-hero-link span {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, #e65c00 0%, #f7c300 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
}

.footer-arrow-icon {
  width: clamp(3.5rem, 9vw, 7.5rem);
  height: clamp(3.5rem, 9vw, 7.5rem);
  color: #f7c300;
  stroke: #f7c300;
  -webkit-text-fill-color: initial;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s ease;
}

.footer-hero-link:hover .footer-arrow-icon {
  transform: translate(14px, -14px);
  color: #e65c00;
  stroke: #e65c00;
}

.footer-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.footer-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-social-links a {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-social-links a:hover {
  color: var(--brand-orange);
}

.footer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.status-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--brand-yellow);
  letter-spacing: 0.08em;
}

html.light .status-badge-live {
  color: var(--brand-brown);
}

/* ==========================================================================
   CASE STUDY SUBPAGE & DEVICE MOCKUP STYLING
   ========================================================================== */
.page-hero {
  padding-top: 11.5rem;
  padding-bottom: 6rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  line-height: 1.12;
  margin-bottom: 1.5rem;
}

.page-description {
  font-size: 1.1875rem;
  color: var(--text-secondary);
  max-width: 48rem;
  line-height: 1.7;
}

.article-content {
  max-width: 840px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

.article-content h2 {
  font-family: var(--font-display);
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-top: 5rem;
  margin-bottom: 1.75rem;
  line-height: 1.25;
}

.article-content h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 3.5rem;
  margin-bottom: 1.25rem;
}

.article-content h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-content p {
  margin-bottom: 2rem;
}

.article-content ul, 
.article-content ol {
  margin-bottom: 2.5rem;
  padding-left: 1.75rem;
}

.article-content li {
  margin-bottom: 0.85rem;
  line-height: 1.75;
}

.article-content strong {
  color: var(--text-primary);
}

.back-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-orange);
  margin-bottom: 2rem;
  transition: transform 0.2s ease;
}

.back-nav-btn:hover {
  transform: translateX(-3px);
  text-decoration: underline;
}

/* DEVICE ON PLAIN ORANGE STAGE */
.device-orange-stage {
  margin: 3.5rem 0 1.5rem;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--brand-orange);
  padding: 3.5rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 50px rgba(230, 92, 0, 0.25);
}

.device-stage-img {
  width: 100%;
  max-width: 1060px;
  height: auto;
  display: block;
}

.cs-meta-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  margin-top: 2rem;
  margin-bottom: 3.5rem;
}

.cs-meta-item-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.cs-meta-item-value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cs-warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: rgba(247, 195, 0, 0.08);
  border: 1px solid rgba(247, 195, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.65rem;
  margin: 1.5rem 0 2rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.cs-resources-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  margin: 1.75rem 0 4rem;
  box-shadow: var(--shadow-sm);
}

.cs-resources-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.cs-resources-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.cs-resources-title svg {
  color: var(--brand-orange);
}

.cs-resources-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--brand-orange-light);
  color: var(--brand-orange);
  border: 1px solid var(--brand-orange);
}

.cs-resources-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.cs-resources-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .cs-resources-grid {
    grid-template-columns: 1fr;
  }
}

.cs-resource-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
  text-decoration: none;
}

.cs-resource-item:hover {
  border-color: var(--brand-orange);
  background: var(--bg-surface-elevated);
  transform: translateY(-2px);
}

.cs-resource-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}

.cs-resource-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex-grow: 1;
}

.cs-resource-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.cs-resource-item:hover .cs-resource-name {
  color: var(--brand-orange);
}

.cs-resource-tag {
  font-family: var(--font-mono);
  font-size: 0.725rem;
  color: var(--text-muted);
}

.cs-resource-arrow {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.cs-resource-item:hover .cs-resource-arrow {
  transform: translate(2px, -2px);
  color: var(--brand-orange);
}

.cs-insight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.5rem;
  margin-bottom: 2rem;
  transition: border-color 0.25s ease;
}

.cs-insight-card:hover {
  border-color: var(--brand-orange);
}

.cs-insight-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-orange);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

.cs-insight-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.cs-insight-body {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.cs-doc-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.65rem;
  border-radius: var(--radius-full);
  background: var(--brand-orange-light);
  border: 1px solid var(--brand-orange);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 3.5rem;
  transition: all 0.25s ease;
}

.cs-doc-link-btn:hover {
  background: var(--brand-orange);
  color: #ffffff;
}

.cs-comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0 3.5rem;
  font-size: 0.9375rem;
}

.cs-comparison-table th, 
.cs-comparison-table td {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border-subtle);
  text-align: left;
  line-height: 1.7;
}

.cs-comparison-table th {
  background: var(--bg-surface-elevated);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--brand-orange);
}

.cs-pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  margin: 2.5rem 0 3.5rem;
}

.cs-pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
}

.cs-pillar-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-orange);
  margin-bottom: 0.45rem;
}

.cs-pillar-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .work-grid,
  .labs-grid,
  .about-grid,
  .blog-grid-2col {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .work-card {
    height: auto;
  }

  .device-orange-stage {
    padding: 2rem 1rem;
  }

  .footer-meta-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  /* Navigation */
  .nav-wrapper-outer {
    padding: 8px 0.75rem 0;
  }

  .nav-bar-inner {
    padding: 8px 12px;
  }

  .nav-brand {
    font-size: 0.95rem;
    gap: 0.35rem;
  }

  .nav-menu,
  .nav-say-hi-btn {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  /* Section Headers */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.6rem;
    margin-bottom: 2rem;
  }

  .section-title,
  .labs-title {
    font-size: clamp(2.1rem, 8vw, 2.75rem);
    line-height: 1.12;
  }

  .section-subtitle {
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.55;
    text-align: left;
  }

  /* Hero Section */
  .hero-section {
    min-height: calc(100vh - 20px);
    padding-top: 5rem;
    padding-bottom: 2.75rem;
    justify-content: flex-end;
  }

  .hero-title {
    font-size: clamp(2.1rem, 8.2vw, 3rem);
    line-height: 1.1;
    max-width: 100%;
    margin-bottom: 1.5rem;
  }

  .hero-cta-group {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
  }

  .btn-primary-hero,
  .btn-secondary-hero {
    flex: 1;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    justify-content: center;
    text-align: center;
  }

  /* Work Grid & Cards */
  .work-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    margin-top: 1.75rem;
  }

  .work-card {
    height: auto;
    border-radius: var(--radius-lg);
  }

  .work-card-media {
    height: 240px;
  }

  .work-card-meta {
    padding: 1.5rem 1.25rem 1.75rem;
    gap: 0.6rem;
  }

  .work-title {
    font-size: 1.25rem;
    line-height: 1.35;
  }

  .work-description {
    font-size: 0.925rem;
    line-height: 1.5;
  }

  .work-meta-header {
    font-size: 0.75rem;
  }

  /* Labs Section */
  .labs-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    margin-top: 1.75rem;
  }

  .lab-card {
    padding: 1.75rem 1.25rem 1.5rem;
  }

  .lab-phone-frame {
    max-width: 250px;
    height: 380px;
  }

  /* About Section */
  .section-about {
    padding: 4rem 0;
  }

  .scroll-color-text {
    font-size: clamp(1.35rem, 5.5vw, 1.85rem);
    line-height: 1.45;
  }

  .about-pills-row {
    gap: 0.5rem;
    margin-top: 1.5rem;
  }

  .about-badge-pill {
    font-size: 0.8rem;
    padding: 0.35rem 0.7rem;
  }

  .about-sidebar-text {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-top: 1.5rem;
  }

  .about-cta-group {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn-about-primary,
  .btn-about-secondary {
    width: 100%;
    justify-content: center;
  }

  /* Page Headers for subpages */
  .page-hero {
    padding-top: 7rem;
    padding-bottom: 3.5rem;
  }

  .page-title {
    font-size: clamp(2rem, 7.8vw, 2.85rem);
    line-height: 1.15;
  }

  .page-description {
    font-size: 1.05rem;
    line-height: 1.6;
  }

  /* Blog Filter Tabs Horizontal Scroll */
  .blog-filter-tabs {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    display: flex;
    gap: 0.5rem;
  }

  .blog-tab-btn {
    flex-shrink: 0;
  }

  /* Case study detail tables and pillars */
  .cs-comparison-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .cs-pillar-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-hero-link {
    font-size: clamp(2.75rem, 12vw, 5rem);
  }

  .footer-meta-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding: 2.5rem 0;
  }

  .footer-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
  }

  .footer-bottom-row {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-cta-group {
    flex-direction: column;
  }

  .btn-primary-hero,
  .btn-secondary-hero {
    width: 100%;
  }

  .work-card-media {
    height: 200px;
  }
}
