/* ============================================================
   MICHELLE NGUYEN STUDIO v3 — Complete Redesign
   Light/Dark Mode Toggle System
   All 9 pages + 4 case studies
   ============================================================ */

:root {
  /* ========== LIGHT MODE (DEFAULT) ========== */
  --bg-primary: #FFFFFF;
  --bg-secondary: #FAF8F5;
  --bg-tertiary: #F0EEEA;
  
  --text-primary: #111315;
  --text-secondary: #555B63;
  --text-light: #8B8680;
  
  --border-color: #E8E6E3;
  --border-light: rgba(200, 168, 107, 0.1);
  
  --accent-primary: #C8A86B;
  --accent-light: #E4D3AC;
  --accent-dark: #A68A53;
  
  --shadow-sm: 0 2px 8px rgba(17, 19, 21, 0.08);
  --shadow-md: 0 8px 24px rgba(17, 19, 21, 0.12);
  --shadow-lg: 0 16px 48px rgba(17, 19, 21, 0.16);

  /* Typography */
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Spacing */
  --max-width: 1400px;
  --gutter: clamp(20px, 5vw, 80px);

  /* Timing */
  --dur-fast: 0.3s;
  --dur-mid: 0.5s;
  --dur-slow: 0.8s;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ========== DARK MODE ========== */
body.dark-mode {
  --bg-primary: #111315;
  --bg-secondary: #1A1C1F;
  --bg-tertiary: #232628;
  
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.72);
  --text-light: rgba(255, 255, 255, 0.55);
  
  --border-color: rgba(200, 168, 107, 0.2);
  --border-light: rgba(200, 168, 107, 0.08);
  
  --accent-primary: #C8A86B;
  --accent-light: #D9BE8A;
  --accent-dark: #B8985B;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* ========== RESET ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  transition: background-color var(--dur-mid) var(--ease),
              color var(--dur-mid) var(--ease);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a,
a:link,
a:visited {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

a:hover {
  color: var(--accent-primary);
}

button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

ul {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
}

p {
  margin: 0;
  color: var(--text-secondary);
}

/* ========== ACCESSIBILITY ========== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 12px 18px;
  z-index: 200;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* ========== TYPOGRAPHY ========== */
.overline {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-primary);
  display: block;
  margin-bottom: 12px;
}

h1, .h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2, .h2 {
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  line-height: 1.15;
  margin-bottom: 20px;
}

h3, .h3 {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  margin-bottom: 16px;
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 50ch;
}

.body-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 65ch;
}

.small {
  font-size: 0.875rem;
  color: var(--text-light);
}

.caption {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--text-light);
}

/* ========== LAYOUT ========== */
.wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section {
  padding-block: clamp(60px, 10vw, 140px);
}

.section-tight {
  padding-block: clamp(40px, 6vw, 80px);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 28px;
  border: 1.5px solid var(--text-primary);
  position: relative;
  overflow: hidden;
  transition: all var(--dur-fast) var(--ease);
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-primary);
  z-index: -1;
  transform: translateX(-101%);
  transition: transform var(--dur-fast) var(--ease);
}

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

.btn:hover::before {
  transform: translateX(0);
  background: var(--accent-primary);
}

.btn-solid {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.btn-solid:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-ghost {
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* ========== HEADER & NAVIGATION ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  padding: 20px 0;
  transition: all var(--dur-mid) var(--ease);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 0;
  box-shadow: var(--shadow-sm);
}

body.dark-mode .site-header.is-scrolled {
  background: rgba(17, 19, 21, 0.92);
  border-color: var(--border-color);
}

.header-wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text-primary);
  transition: opacity var(--dur-fast) var(--ease);
}

.brand:hover {
  opacity: 0.8;
}

.brand img {
  height: 28px;
  width: auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.dark-mode-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  background: transparent;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}

.dark-mode-toggle:hover {
  border-color: var(--accent-primary);
  background: var(--border-light);
}

.dark-mode-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform var(--dur-fast) var(--ease);
}

.menu-trigger {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.menu-trigger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--dur-fast) var(--ease);
}

/* ========== NAVIGATION MENU ========== */
.nav-menu {
  display: flex;
  gap: 32px;
  align-items: center;
  list-style: none;
}

.nav-menu a {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: all var(--dur-fast) var(--ease);
  color: var(--text-primary);
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

@media (max-width: 1024px) {
  .nav-menu {
    gap: 16px;
  }

  .nav-menu a {
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .menu-trigger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    inset: 70px 0 0 0;
    background: var(--bg-primary);
    flex-direction: column;
    gap: 0;
    padding: 32px var(--gutter);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform var(--dur-mid) var(--ease);
    z-index: 90;
  }

  .nav-menu.is-open {
    transform: translateX(0);
  }

  .nav-menu li {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
  }

  .nav-menu a {
    display: block;
    border: none;
    font-size: 1rem;
  }

  .nav-menu a:hover,
  .nav-menu a[aria-current="page"] {
    border: none;
    color: var(--accent-primary);
  }
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 80px 0 32px;
  margin-top: 80px;
  transition: all var(--dur-mid) var(--ease);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
}

.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 18px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease);
}

.footer-col a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-light);
}

.social-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.social-links a {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  transition: all var(--dur-fast) var(--ease);
}

.social-links a:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--bg-primary);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ========== HERO SLIDER (PROMPT 2) ========== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-secondary);
  margin-top: 60px;
}

.hero-slider {
  position: relative;
  width: 100%;
  height: calc(100vh - 60px);
  min-height: 600px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 1s var(--ease);
  z-index: 1;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 2;
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
  opacity: 0.6;
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--text-primary);
  max-width: 800px;
  padding: 0 var(--gutter);
  animation: slideInUp 0.8s var(--ease);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-slide h1,
.hero-slide h2.h1 {
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero-slide p {
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.hero-controls {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 3;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-color);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  border: none;
}

.hero-dot.is-active {
  background: var(--accent-primary);
  transform: scale(1.3);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-color);
  cursor: pointer;
  z-index: 3;
  transition: all var(--dur-fast) var(--ease);
}

.hero-arrow:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--bg-primary);
}

.hero-arrow.prev {
  left: 40px;
}

.hero-arrow.next {
  right: 40px;
}

@media (max-width: 640px) {
  .hero-arrow {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .hero-arrow.prev {
    left: 12px;
  }

  .hero-arrow.next {
    right: 12px;
  }

  .hero-slide h1,
  .hero-slide h2.h1 {
    font-size: 2rem;
  }

  .hero-controls {
    bottom: 24px;
  }
}

/* ========== SCROLL REVEAL ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--dur-mid) var(--ease), transform var(--dur-mid) var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ========== MISC ========== */
.center {
  text-align: center;
  margin-inline: auto;
}

.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }

.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

@media (max-width: 768px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   ADDITIONAL COMPONENTS — Stats, Services, Gallery, Skills,
   Timeline, Chatbot, Brand Showcase, Contact
   ============================================================ */

/* ---------- Stat / Infographic counters ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-card {
  text-align: center;
  padding: 32px 16px;
  border: 1px solid var(--border-color);
  transition: border-color var(--dur-fast) var(--ease);
}

.stat-card:hover {
  border-color: var(--accent-primary);
}

.stat-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  color: var(--accent-primary);
}

.stat-number {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 10px;
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Service cards (icon-based, concise) ---------- */
.service-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  padding: 32px 24px;
  border: 1px solid var(--border-color);
  transition: all var(--dur-fast) var(--ease);
}

.service-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.service-card-icon {
  width: 44px;
  height: 44px;
  color: var(--accent-primary);
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .service-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .service-cards { grid-template-columns: 1fr; }
}

/* ---------- Portfolio gallery (image-forward, hover reveal) ---------- */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 18px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--dur-fast) var(--ease);
}

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

.filter-btn.is-active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg-primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-flow: dense;
  gap: 8px;
}

.gallery-card {
  grid-column: span 3;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--bg-tertiary);
}

.gallery-card.wide { grid-column: span 4; }
.gallery-card.narrow { grid-column: span 2; }

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}

.gallery-card:hover img {
  transform: scale(1.06);
}

.gallery-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0.9;
  transition: opacity var(--dur-fast) var(--ease);
}

.gallery-card:hover .overlay {
  opacity: 1;
}

.gallery-card .cat {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 6px;
}

.gallery-card h3 {
  color: #fff;
  font-size: 1.2rem;
}

@media (max-width: 860px) {
  .gallery-card, .gallery-card.wide, .gallery-card.narrow {
    grid-column: span 6;
    aspect-ratio: 4/3.6;
  }
}

/* ---------- Skills page ---------- */
.skill-row {
  display: grid;
  grid-template-columns: 200px 1fr 60px;
  gap: 20px;
  align-items: center;
  padding-block: 16px;
  border-bottom: 1px solid var(--border-color);
}

.skill-row .name {
  font-family: var(--serif);
  font-size: 1.05rem;
}

.skill-bar-track {
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--accent-primary);
  border-radius: 3px;
  width: 0%;
  transition: width 1.2s var(--ease);
}

.skill-row .pct {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: right;
}

.software-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.software-icon {
  text-align: center;
  padding: 16px 8px;
  border: 1px solid var(--border-color);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  transition: all var(--dur-fast) var(--ease);
}

.software-icon:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

@media (max-width: 640px) {
  .skill-row { grid-template-columns: 110px 1fr 40px; gap: 12px; }
}

/* ---------- Compact timeline (Resume page) ---------- */
.timeline-compact {
  display: flex;
  flex-direction: column;
}

.timeline-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding-block: 22px;
  border-top: 1px solid var(--border-color);
}

.timeline-row:last-child {
  border-bottom: 1px solid var(--border-color);
}

.timeline-row .yr {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent-primary);
}

.timeline-row .org {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-light);
  display: block;
  margin-bottom: 4px;
}

.timeline-row h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.timeline-row p {
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .timeline-row { grid-template-columns: 1fr; gap: 6px; }
}

.resume-download {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* ---------- Chatbot page/widget ---------- */
.chatbot-container {
  max-width: 640px;
  margin: 0 auto;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.chatbot-header {
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbot-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ADE80;
}

.chatbot-body {
  height: 420px;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-bubble {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.chat-bubble.bot {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-bubble.user {
  background: var(--accent-primary);
  color: #111;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chatbot-input {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.chatbot-input input {
  flex: 1;
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  border-radius: 24px;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.chatbot-input button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Brand showcase (MN Identity Branding page) ---------- */
.brand-swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-top: 24px;
}

.swatch {
  aspect-ratio: 1;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}

@media (max-width: 700px) {
  .brand-swatches { grid-template-columns: repeat(3, 1fr); }
}

.logo-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.logo-tile {
  border: 1px solid var(--border-color);
  padding: 40px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4/3;
}

.logo-tile.dark-tile {
  background: var(--text-primary);
}

@media (max-width: 700px) {
  .logo-showcase { grid-template-columns: 1fr; }
}

.type-sample {
  padding-block: 20px;
  border-top: 1px solid var(--border-color);
}

.type-sample:last-child { border-bottom: 1px solid var(--border-color); }

.type-sample .label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

/* ---------- Contact 3-column ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.field.full { grid-column: 1 / -1; }

.field label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
}

.field input, .field select, .field textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  color: var(--text-primary);
  border-radius: 6px;
  transition: border-color var(--dur-fast) var(--ease);
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent-primary);
  outline: none;
}

.field textarea { resize: vertical; min-height: 120px; }
.field .error-msg { font-size: 0.78rem; color: #C97B6A; min-height: 1.1em; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

.form-status {
  margin-top: 16px;
  padding: 14px 16px;
  font-size: 0.9rem;
  display: none;
  border-left: 2px solid var(--accent-primary);
  background: var(--bg-secondary);
}

.form-status.is-visible { display: block; }
.form-status.is-error { border-color: #C97B6A; }

.info-card {
  padding: 24px;
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.info-card h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

/* ============================================================
   MAGNOLIA-STYLE HOMEPAGE LAYOUT
   Soft, editorial, full-bleed sections with overlay text boxes.
   ============================================================ */

/* ---------- Utility top bar ---------- */
.top-bar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 9px 0;
}
.top-bar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar-links {
  display: flex;
  gap: 22px;
}
.top-bar-links a,
.top-bar-links a:link,
.top-bar-links a:visited {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary) !important;
}
.top-bar-links a:hover { color: var(--accent-primary) !important; }
.top-bar-social {
  display: flex;
  gap: 6px;
  align-items: center;
}
.top-bar-social a,
.top-bar-social a:link,
.top-bar-social a:visited {
  color: var(--text-secondary) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: all var(--dur-fast) var(--ease);
}
.top-bar-social a:hover {
  color: var(--accent-primary) !important;
  background: var(--border-light);
}
.top-bar-social .dark-mode-toggle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 0;
  color: var(--text-secondary);
}
.top-bar-social .dark-mode-toggle:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--border-light);
}

/* ---------- Centered editorial header ---------- */
.editorial-header {
  background: var(--bg-primary);
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}
.editorial-header .wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.editorial-nav-left, .editorial-nav-right {
  display: flex;
  align-items: center;
  gap: 26px;
}
.editorial-nav-right { justify-content: flex-end; }
.editorial-nav-left a, .editorial-nav-left a:link, .editorial-nav-left a:visited,
.editorial-nav-right a, .editorial-nav-right a:link, .editorial-nav-right a:visited {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary) !important;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}
.editorial-nav-left a:hover, .editorial-nav-right a:hover { color: var(--accent-primary) !important; }
.editorial-nav-left a[aria-current="page"], .editorial-nav-right a[aria-current="page"] {
  color: var(--accent-primary) !important;
  border-bottom-color: var(--accent-primary);
}
.header-toggle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--text-secondary);
  margin-left: 4px;
}
.header-toggle:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--border-light);
}
a.editorial-logo { text-decoration: none; color: inherit; }
a.editorial-logo:hover { opacity: 0.85; }
.editorial-logo {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.editorial-logo-mark {
  height: 34px;
  width: auto;
  margin-bottom: 6px;
}
.editorial-logo .name {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}
.editorial-logo .sub {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.35em;
  color: var(--accent-primary);
  display: block;
  margin-top: 4px;
}
@media (max-width: 900px) {
  .editorial-header .wrap { grid-template-columns: 1fr; text-align: center; gap: 14px; }
  .editorial-nav-left, .editorial-nav-right { justify-content: center; flex-wrap: wrap; }
}

/* ---------- Full-bleed overlay section (hero, philosophy, CTA) ---------- */
.overlay-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  overflow: hidden;
  text-align: center;
}
.overlay-section.tall { min-height: 92vh; }
.overlay-section-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.overlay-section-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.overlay-box {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.86);
  padding: clamp(32px, 5vw, 64px);
  max-width: 640px;
  margin: 0 32px;
}
body.dark-mode .overlay-box {
  background: rgba(17, 19, 21, 0.82);
}
.overlay-box h1, .overlay-box h2 {
  font-style: italic;
}
.overlay-box .accent-word { font-style: italic; color: var(--accent-primary); }

/* ---------- Who We Are / two-column intro ---------- */
.intro-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.intro-split img { width: 100%; }
@media (max-width: 860px) { .intro-split { grid-template-columns: 1fr; } }

/* ---------- 3-column image grid with overlay labels ---------- */
.trio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.trio-card {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
}
.trio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
.trio-card:hover img { transform: scale(1.05); }
.trio-card .label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.88);
  padding: 16px 28px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  white-space: nowrap;
}
body.dark-mode .trio-card .label { background: rgba(17, 19, 21, 0.82); }
@media (max-width: 700px) { .trio-grid { grid-template-columns: 1fr; } }

/* ---------- Offer cards (icon + title + text + button) ---------- */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}
.offer-card { padding: 24px; }
.offer-icon {
  width: 34px;
  height: 34px;
  margin: 0 auto 18px;
  color: var(--accent-primary);
}
.offer-card h3 { margin-bottom: 12px; }
.offer-card p { font-size: 0.92rem; margin-bottom: 20px; }
@media (max-width: 780px) { .offer-grid { grid-template-columns: 1fr; } }

/* ---------- Case-study / journal grid ---------- */
.journal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.journal-card { position: relative; aspect-ratio: 3/4; overflow: hidden; }
.journal-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.journal-card:hover img { transform: scale(1.05); }
@media (max-width: 780px) { .journal-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Editorial footer (newsletter, 3-col) ---------- */
.editorial-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding-block: 64px 0;
}
.editorial-footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 40px;
  text-align: center;
  padding-bottom: 48px;
}
.editorial-footer-grid h4 {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  margin-bottom: 18px;
}
.editorial-footer-grid ul { display: flex; flex-direction: column; gap: 10px; }
.editorial-footer-grid a { font-size: 0.85rem; color: var(--text-secondary); }
.editorial-footer-grid a:hover { color: var(--accent-primary); }

.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 16px auto 0;
  flex-wrap: wrap;
  justify-content: center;
}
.newsletter-form input {
  flex: 1;
  min-width: 140px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-primary);
}
.newsletter-form button {
  border: 1px solid var(--text-primary);
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--text-primary);
  color: var(--bg-primary);
}

.footer-social-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding-bottom: 20px;
}
.footer-thumb-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
}
.footer-thumb-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.footer-copyright {
  text-align: center;
  padding: 20px 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--text-light);
  border-top: 1px solid var(--border-color);
}
@media (max-width: 860px) {
  .editorial-footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-thumb-strip { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   MOTION & VISUAL UPGRADE PASS
   Parallax hero, marquee, refined hover physics, archive strip
   ============================================================ */

/* ---------- Parallax-style hero with real photography ---------- */
.photo-hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.photo-hero-bg {
  position: absolute;
  inset: -40px;
  z-index: 0;
  will-change: transform;
}
.photo-hero-bg img {
  width: 100%;
  height: calc(100% + 40px);
  object-fit: cover;
  transform: scale(1.06);
  animation: heroKenBurns 22s ease-in-out infinite alternate;
}
@keyframes heroKenBurns {
  0%   { transform: scale(1.06) translate3d(0,0,0); }
  100% { transform: scale(1.14) translate3d(-1%, -1%, 0); }
}
.photo-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17,19,21,0.15) 0%, rgba(17,19,21,0.05) 35%, rgba(17,19,21,0.85) 100%);
  z-index: 1;
}
.photo-hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: clamp(32px, 6vw, 80px) var(--gutter) clamp(56px, 8vw, 96px);
  width: 100%;
}
.photo-hero-content .overline { color: var(--accent-light, #E4D3AC); }
.photo-hero-content h1 { color: #fff; max-width: 16ch; }
.photo-hero-content .lede { color: rgba(255,255,255,0.82); }

@media (prefers-reduced-motion: reduce) {
  .photo-hero-bg img { animation: none; transform: scale(1.02); }
}

/* ---------- Credentials marquee (continuous scroll) ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding-block: 22px;
  background: var(--bg-secondary);
}
.marquee-track {
  display: flex;
  gap: 60px;
  width: max-content;
  animation: marqueeScroll 28s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}
.marquee-item .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-primary); }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ---------- Refined hover physics on cards/buttons ---------- */
.gallery-card, .trio-card, .journal-card, .service-card, .offer-card, .stat-card {
  transition: transform 0.45s cubic-bezier(.2,.8,.2,1), box-shadow 0.45s ease, border-color 0.3s ease;
}
.service-card:hover, .offer-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.gallery-card:hover, .trio-card:hover, .journal-card:hover {
  box-shadow: var(--shadow-lg);
}

.btn {
  transition: transform 0.25s ease, color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* Fade-slide entrance with slight delay stagger for grouped elements */
.reveal-group .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-group .reveal:nth-child(2) { transition-delay: .08s; }
.reveal-group .reveal:nth-child(3) { transition-delay: .16s; }
.reveal-group .reveal:nth-child(4) { transition-delay: .24s; }
.reveal-group .reveal:nth-child(5) { transition-delay: .32s; }
.reveal-group .reveal:nth-child(6) { transition-delay: .4s; }

/* ---------- Portrait / bio split with framed edge ---------- */
.portrait-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.portrait-frame:hover img { transform: scale(1.04); }
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(200,168,107,0.5);
  pointer-events: none;
}

/* ---------- Archive strip (horizontal scroll of real work) ---------- */
/* ============================================================
   ARCHIVE v2 — random-picture marquee + monogram home medallion
   ============================================================ */
.archive2 {
  position: relative;
  background: var(--bg-secondary);
  padding: clamp(56px, 8vw, 100px) 0 clamp(72px, 10vw, 120px);
  overflow: hidden;
}
.archive2-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: clamp(36px, 5vw, 56px);
  flex-wrap: wrap;
  gap: 16px;
}
.archive2-head h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 6px 0 0;
  line-height: 1;
}
.archive2-head h2 em { font-style: italic; color: var(--text-primary); }
.archive2-browse {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--text-primary);
  transition: color 0.25s, border-color 0.25s;
}
.archive2-browse:hover { color: var(--accent-primary); border-color: var(--accent-primary); }
.archive2-browse b { font-weight: 600; color: var(--accent-primary); padding: 0 2px; }

/* ---- dual marquee rows ---- */
.archive2-track {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 22px);
  position: relative;
  /* soft fade at both edges so pieces enter/exit without a hard cut */
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
          mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}
.archive2-row {
  display: flex;
  overflow: hidden;
  width: 100%;
}
.a2-set {
  display: flex;
  flex: 0 0 auto;
  gap: clamp(12px, 1.6vw, 18px);
  padding-right: clamp(12px, 1.6vw, 18px);
  animation: a2Scroll linear infinite;
}
.archive2-row-a .a2-set { animation-duration: 60s; animation-direction: normal; }
.archive2-row-b .a2-set { animation-duration: 78s; animation-direction: reverse; }

@keyframes a2Scroll {
  /* the row contains TWO identical sets side by side; translating -50% wraps seamlessly */
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

.archive2.is-paused .a2-set { animation-play-state: paused; }

.a2-card {
  flex: 0 0 auto;
  display: block;
  width: clamp(200px, 22vw, 300px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-primary);
  position: relative;
  text-decoration: none;
}
.a2-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
              filter 0.4s ease;
  filter: saturate(0.94);
}
.a2-card:hover img { transform: scale(1.06); filter: saturate(1.05); }
.a2-card::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  border-radius: inherit;
  pointer-events: none;
}
.a2-card:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 3px; }

/* ---- MONOGRAM HOME MEDALLION between the rows ---- */
.archive2-mono {
  position: absolute;
  left: 50%;
  top: calc(50% + clamp(10px, 1.5vw, 20px));   /* nudged down to sit between the rows, below the head */
  transform: translate(-50%, -50%);
  z-index: 3;
  display: grid;
  place-items: center;
  width: clamp(150px, 18vw, 220px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #0a0a0c;
  color: #fff;
  text-decoration: none;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.28),
    0 0 0 6px var(--bg-secondary),
    0 0 0 7px rgba(224, 194, 133, 0.4);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
              box-shadow 0.4s ease;
}
.archive2-mono img {
  width: 62%;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}
.archive2-mono-tag {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-primary);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.archive2-mono:hover {
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.36),
    0 0 0 6px var(--bg-secondary),
    0 0 0 8px var(--accent-primary);
}
.archive2-mono:hover .archive2-mono-tag { opacity: 1; }
.archive2-mono:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 6px;
}

@media (max-width: 700px) {
  .archive2-mono { width: 130px; }
  .archive2-mono img { width: 68%; }
  .a2-card { width: 180px; aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  .a2-set { animation: none; }
  .archive2-track { -webkit-mask-image: none; mask-image: none; }
  .archive2-row { overflow-x: auto; }
  .a2-card img { transition: none; }
}

/* ---------- Animated gradient accent divider ---------- */
.accent-divider {
  height: 2px;
  width: 64px;
  margin: 24px auto;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ---------- Soft floating accent shape (decorative, behind content) ---------- */
.float-accent {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,168,107,0.18), transparent 70%);
  filter: blur(2px);
  animation: floatY 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

/* ============================================================
   PHOTO-MODE HERO SLIDER
   Real photography slides with Ken Burns motion + dark overlay,
   layered on top of the existing hero-slider/hero-slide system.
   ============================================================ */
.hero-slider.photo-mode { height: 94vh; }
.hero-slider.photo-mode .hero-slide-bg {
  background: none;
  opacity: 1;
  overflow: hidden;
}
.hero-slider.photo-mode .hero-slide-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 8s linear;
}
.hero-slider.photo-mode .hero-slide.is-active .hero-slide-bg img {
  transform: scale(1.16);
}
.hero-slider.photo-mode .hero-slide-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17,19,21,0.35) 0%, rgba(17,19,21,0.1) 40%, rgba(17,19,21,0.88) 100%);
}
.hero-slider.photo-mode .hero-slide-content {
  color: #fff;
  max-width: 720px;
}
.hero-slider.photo-mode .hero-slide-content .overline { color: var(--accent-light, #E4D3AC); }
.hero-slider.photo-mode .hero-slide h1,
.hero-slider.photo-mode .hero-slide h2.h1 { color: #fff; }
.hero-slider.photo-mode .hero-slide p { color: rgba(255,255,255,0.85); }
.hero-slider.photo-mode .hero-dot { background: rgba(255,255,255,0.4); }
.hero-slider.photo-mode .hero-dot.is-active { background: var(--accent-primary); }
.hero-slider.photo-mode .hero-arrow { border-color: rgba(255,255,255,0.4); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .hero-slider.photo-mode .hero-slide-bg img { transition: none; transform: scale(1.02); }
}

/* ============================================================
   BRAND FOOTER — centered logo lockup flanked by nav columns,
   modeled on the reference layout (ESTD line, vertical dividers,
   bottom legal row).
   ============================================================ */
.brand-footer {
  background: #111315;
  color: rgba(255,255,255,0.82);
  padding-block: 64px 28px;
  margin-top: 0;
}
.brand-footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.brand-footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.brand-footer-col.left { align-items: flex-end; text-align: right; border-right: 1px solid rgba(255,255,255,0.22); padding-right: clamp(20px,4vw,48px); }
.brand-footer-col.right { align-items: flex-start; text-align: left; border-left: 1px solid rgba(255,255,255,0.22); padding-left: clamp(20px,4vw,48px); }
.brand-footer-col a {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
}
.brand-footer-col a:hover { color: var(--accent-primary); }

.brand-footer-center { text-align: center; }
.estd {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}
.estd .line { width: 36px; height: 1px; background: rgba(255,255,255,0.3); display: inline-block; }
.brand-footer-logo { max-width: 150px; width: 100%; height: auto; margin-inline: auto; display: block; }
.brand-footer-logo-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.25s ease;
}
.brand-footer-logo-link:hover { opacity: 0.8; }
.brand-footer-wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-top: 14px;
  letter-spacing: 0.02em;
}
.brand-footer-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  margin-top: 4px;
}
.brand-footer-categories {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.brand-footer-categories a { color: rgba(255,255,255,0.8); }
.brand-footer-categories a:hover { color: var(--accent-primary); }
.brand-footer-categories .sep { color: rgba(255,255,255,0.25); }
.brand-footer-social {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.brand-footer-social a:hover { color: var(--accent-primary); }
.brand-footer-social .sep { color: rgba(255,255,255,0.25); }

.brand-footer-bottom {
  text-align: center;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.14);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.brand-footer-bottom a { color: rgba(255,255,255,0.7); }
.brand-footer-bottom a:hover { color: var(--accent-primary); }
.brand-footer-bottom .sep { margin: 0 10px; color: rgba(255,255,255,0.28); }
.brand-footer-copy {
  text-align: center;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: rgba(255,255,255,0.38);
}

@media (max-width: 780px) {
  .brand-footer-grid { grid-template-columns: 1fr; text-align: center; }
  .brand-footer-col.left, .brand-footer-col.right {
    align-items: center; text-align: center; border: none; padding: 0;
  }
  .brand-footer-col.left { order: 2; }
  .brand-footer-center { order: 1; }
  .brand-footer-col.right { order: 3; }
}

/* ============================================================
   ABOUT PAGE TEMPLATE — announcement bar, welcome intro,
   quote line, mini testimonial-style block
   ============================================================ */
.announce-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}
.announce-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  text-align: center;
}
.announce-bar strong {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 600;
}
.announce-bar .small-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.announce-bar .btn { padding: 10px 20px; font-size: 0.7rem; }

.script-lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--accent-primary);
  display: block;
  margin-bottom: 10px;
}

.quote-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.4;
  margin-block: 24px;
  padding-left: 22px;
  border-left: 2px solid var(--accent-primary);
}

.mini-testimonial {
  text-align: center;
  max-width: 620px;
  margin-inline: auto;
}
.mini-testimonial p {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.55;
}
.mini-testimonial .avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  margin: 24px auto 12px;
  border: 2px solid var(--accent-primary);
}
.mini-testimonial .avatar img { width: 100%; height: 100%; object-fit: cover; }
.mini-testimonial .name {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
}

/* ============================================================
   FEATURED SERVICES / PORTFOLIO GRID / OUR STORY / PROCESS LINE
   Inspired by a clean 4-col services + 5-col portfolio + story +
   numbered process-line layout.
   ============================================================ */

/* ---------- Featured services (icon, title, text, learn-more link) ---------- */
.featured-services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.fs-item {
  text-align: center;
  padding: 8px 28px;
  border-left: 1px solid var(--border-color);
}
.fs-item:first-child { border-left: none; }
.fs-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 18px;
  color: var(--accent-primary);
}
.fs-item h3 { font-size: 1.05rem; margin-bottom: 10px; }
.fs-item p { font-size: 0.86rem; margin-bottom: 14px; }
.fs-item .link-arrow { font-size: 0.7rem; }
@media (max-width: 860px) {
  .featured-services { grid-template-columns: repeat(2, 1fr); gap: 32px 0; }
  .fs-item:nth-child(3) { border-left: none; }
}
@media (max-width: 560px) {
  .featured-services { grid-template-columns: 1fr; }
  .fs-item { border-left: none; border-top: 1px solid var(--border-color); padding-top: 28px; }
  .fs-item:first-child { border-top: none; }
}

/* ---------- Portfolio 5-category grid ---------- */
.portfolio5-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.portfolio5-card {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
}
.portfolio5-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.portfolio5-card:hover img { transform: scale(1.06); }
.portfolio5-card .label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(17,19,21,0.72);
  color: #fff;
  padding: 12px 8px;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (max-width: 900px) {
  .portfolio5-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .portfolio5-grid { grid-template-columns: 1fr; }
}

/* ---------- Our Story: photo + text + mini feature icons ---------- */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 0.8fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
.story-icons { display: flex; flex-direction: column; gap: 26px; }
.story-icon-item { display: flex; gap: 16px; align-items: flex-start; }
.story-icon-item svg { width: 20px; height: 20px; color: var(--accent-primary); flex-shrink: 0; }
.story-icon-item .icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.story-icon-item h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.story-icon-item p { font-size: 0.84rem; }
@media (max-width: 960px) {
  .story-grid { grid-template-columns: 1fr; }
  .story-icons { flex-direction: row; flex-wrap: wrap; }
  .story-icon-item { flex: 1 1 240px; }
}

/* ---------- Design process (numbered, connected line) ---------- */
.process-line {
  display: flex;
  justify-content: space-between;
  position: relative;
  gap: 8px;
}
.process-line::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 5%;
  right: 5%;
  height: 1px;
  background: var(--border-color);
  z-index: 0;
}
.process-line-item {
  position: relative;
  z-index: 1;
  text-align: center;
  flex: 1;
  padding-inline: 8px;
}
.process-line-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-family: var(--mono);
  font-size: 0.9rem;
  border: 2px solid var(--accent-primary);
  box-shadow: 0 0 0 4px var(--bg-secondary);
}
.process-line-item h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.process-line-item p { font-size: 0.8rem; }
@media (max-width: 780px) {
  .process-line { flex-wrap: wrap; }
  .process-line::before { display: none; }
  .process-line-item { flex: 1 1 40%; margin-bottom: 24px; }
}

/* ============================================================
   FOOTER SOCIAL ICONS (replacing plain text links)
   ============================================================ */
.brand-footer-social {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}
.brand-footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.75);
  transition: all var(--dur-fast) var(--ease);
}
.brand-footer-social a:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(200,168,107,0.1);
  transform: translateY(-2px);
}
.brand-footer-social svg { width: 15px; height: 15px; }

/* ============================================================
   CONTACT PAGE — beautified layout
   ============================================================ */
.contact-visual {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 3/4;
}
.contact-visual img { width: 100%; height: 100%; object-fit: cover; }
.contact-visual::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(200,168,107,0.5);
  pointer-events: none;
}
.icon-info-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-block: 18px;
  border-top: 1px solid var(--border-color);
}
.icon-info-row:last-child { border-bottom: 1px solid var(--border-color); }
.icon-info-row svg {
  width: 22px; height: 22px;
  color: var(--accent-primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.icon-info-row h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 4px;
}
.icon-info-row p, .icon-info-row a { font-size: 0.95rem; }

.form-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--shadow-md);
}
body.dark-mode .form-card { background: var(--bg-primary); }

.contact-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 860px) {
  .contact-split { grid-template-columns: 1fr; }
}

/* ============================================================
   REAL PORTFOLIO GALLERY — plain grid + pill filters
   Matches the clean reference layout: uniform 3-col image grid,
   no caption overlay, rounded pill filter tabs.
   ============================================================ */
.filter-pills {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 44px;
}
.filter-pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--dur-fast) var(--ease);
}
.filter-pill:hover { border-color: var(--accent-primary); color: var(--text-primary); }
.filter-pill.is-active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #111;
}

.plain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.plain-card {
  aspect-ratio: 4/3.4;
  overflow: hidden;
  background: var(--bg-secondary);
}
.plain-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.plain-card:hover img { transform: scale(1.05); }

@media (max-width: 860px) {
  .plain-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .plain-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   CINEMATIC EDITORIAL HERO (v4)
   Full-bleed video/photo stage, bottom-left kinetic headline,
   staggered per-slide reveal, side index, progress bar.
   ============================================================ */
.hero-cinematic {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 620px;
  max-height: 940px;
  overflow: hidden;
  background: #0d0f11;
  margin-top: 0;
}
.hc-track { position: absolute; inset: 0; }

.hc-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.1s var(--ease), visibility 1.1s var(--ease);
  z-index: 1;
}
.hc-slide.is-active { opacity: 1; visibility: visible; z-index: 2; }

.hc-bg { position: absolute; inset: 0; overflow: hidden; }
.hc-bg img, .hc-bg video {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transition: transform 7.5s linear;
  will-change: transform;
}
.hc-slide.is-active .hc-bg img,
.hc-slide.is-active .hc-bg video { transform: scale(1.0); }

/* Cinematic dual-gradient scrim: darker at bottom-left where text sits */
.hc-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,12,14,0.82) 0%, rgba(10,12,14,0.42) 42%, rgba(10,12,14,0.05) 72%, rgba(10,12,14,0.25) 100%),
    linear-gradient(0deg, rgba(10,12,14,0.85) 0%, rgba(10,12,14,0.15) 45%, rgba(10,12,14,0.4) 100%);
  z-index: 2;
}
.hc-overlay::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 220px 40px rgba(0,0,0,0.55);
  pointer-events: none;
}

.hc-inner {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(90px, 15vh, 150px);
  padding-top: 120px;
}
.hc-text { max-width: 760px; }

.hc-text > * {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.hc-slide.is-active .hc-text > * { opacity: 1; transform: translateY(0); }
.hc-slide.is-active .hc-kicker { transition-delay: 0.15s; }
.hc-slide.is-active .hc-title  { transition-delay: 0.30s; }
.hc-slide.is-active .hc-sub    { transition-delay: 0.48s; }
.hc-slide.is-active .hc-actions{ transition-delay: 0.64s; }

.hc-kicker {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 22px;
}
.hc-kicker .hc-num {
  font-size: 0.72rem;
  color: #fff;
  padding-right: 14px;
  border-right: 1px solid rgba(255,255,255,0.35);
}
.hc-title {
  font-family: var(--serif);
  color: #fff;
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.015em;
  font-size: clamp(2.9rem, 8vw, 6.4rem);
  margin: 0 0 22px;
  text-shadow: 0 2px 40px rgba(0,0,0,0.35);
}
.hc-title em { font-style: italic; color: var(--accent-light); }
.hc-sub {
  color: rgba(255,255,255,0.9);
  font-size: clamp(1rem, 1.4vw, 1.22rem);
  line-height: 1.6;
  max-width: 52ch;
  margin: 0 0 34px;
}
.hc-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-cinematic .btn-line {
  border: 1px solid rgba(255,255,255,0.55);
  color: #fff;
  background: transparent;
  backdrop-filter: blur(2px);
}
.hero-cinematic .btn-line:hover {
  background: #fff; color: #111; border-color: #fff;
}

.hc-index {
  position: absolute;
  right: clamp(18px, 3vw, 46px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  display: flex; flex-direction: column; gap: 20px;
  align-items: flex-end;
}
.hc-idx {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: none; cursor: pointer;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  transition: color var(--dur-fast) var(--ease);
}
.hc-idx .bar { display:block; width: 26px; height: 1px; background: rgba(255,255,255,0.4); transition: all var(--dur-fast) var(--ease); }
.hc-idx:hover { color: #fff; }
.hc-idx.is-active { color: #fff; }
.hc-idx.is-active .bar { width: 52px; background: var(--accent-primary); }

.hc-footer {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 6;
  padding-bottom: 30px;
  display: flex; align-items: center; gap: 28px;
}
.hc-progress {
  position: relative;
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.2);
  overflow: hidden;
}
.hc-progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--accent-primary);
}
.hc-nav { display: flex; align-items: center; gap: 18px; }
.hc-count { font-family: var(--mono); font-size: 0.78rem; color: rgba(255,255,255,0.8); letter-spacing: 0.12em; }
.hc-count b { color: #fff; font-weight: 600; }
.hc-arrow {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff; cursor: pointer; font-size: 17px;
  transition: all var(--dur-fast) var(--ease);
  backdrop-filter: blur(4px);
}
.hc-arrow:hover { background: var(--accent-primary); border-color: var(--accent-primary); color: #111; transform: scale(1.06); }

@media (max-width: 860px) {
  .hc-index { display: none; }
  .hc-inner { padding-bottom: 120px; }
  .hc-footer { gap: 16px; padding-bottom: 22px; }
}
@media (max-width: 560px) {
  .hc-title { font-size: clamp(2.4rem, 12vw, 3.4rem); }
  .hc-count { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hc-bg img, .hc-bg video { transition: none; transform: scale(1.02); }
  .hc-text > * { transition-duration: 0.01ms; }
}

/* ============================================================
   HOMEPAGE WORK SHOWCASE — asymmetric editorial grid, rich hover
   ============================================================ */
.work-showcase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 14px;
}
.ws-card {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: var(--bg-tertiary);
  grid-column: span 1;
  grid-row: span 1;
}
.ws-card.tall { grid-row: span 2; }
.ws-card.wide { grid-column: span 2; }
.ws-card.big  { grid-column: span 2; grid-row: span 2; }

.ws-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease), filter 0.6s var(--ease);
}
.ws-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,12,14,0) 35%, rgba(10,12,14,0.86) 100%);
  opacity: 0.7; transition: opacity var(--dur-mid) var(--ease);
}
.ws-card:hover img { transform: scale(1.08); }
.ws-card:hover::after { opacity: 0.95; }

.ws-meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 2; padding: 22px 22px 20px;
  transform: translateY(10px); opacity: 0.92;
  transition: transform var(--dur-mid) var(--ease), opacity var(--dur-mid) var(--ease);
}
.ws-card:hover .ws-meta { transform: translateY(0); opacity: 1; }
.ws-cat {
  display: inline-block;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-light);
  margin-bottom: 8px;
}
.ws-title {
  font-family: var(--serif); color: #fff; font-weight: 600;
  font-size: 1.28rem; line-height: 1.15; letter-spacing: -0.01em;
}
.ws-view {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 10px;
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: #fff;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: all var(--dur-mid) var(--ease);
}
.ws-card:hover .ws-view { max-height: 30px; opacity: 1; }
.ws-view .arw { transition: transform var(--dur-fast) var(--ease); }
.ws-card:hover .ws-view .arw { transform: translateX(5px); }

@media (max-width: 900px) {
  .work-showcase { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
  .ws-card.big { grid-column: span 2; grid-row: span 2; }
  .ws-card.wide { grid-column: span 2; }
}
@media (max-width: 560px) {
  .work-showcase { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .ws-card, .ws-card.big, .ws-card.wide, .ws-card.tall { grid-column: span 1; grid-row: span 1; }
}

/* ============================================================
   PORTFOLIO PAGE — motion masonry with hover metadata
   ============================================================ */
.work-masonry {
  columns: 3;
  column-gap: 16px;
}
.wm-card {
  position: relative;
  break-inside: avoid;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--bg-tertiary);
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.wm-card.in { opacity: 1; transform: translateY(0); }
.wm-card a { display: block; position: relative; }
.wm-card img {
  width: 100%; display: block;
  transition: transform 0.85s var(--ease), filter 0.6s var(--ease);
}
.wm-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,12,14,0) 40%, rgba(10,12,14,0.9) 100%);
  opacity: 0; transition: opacity var(--dur-mid) var(--ease);
  pointer-events: none; z-index: 1;
}
.wm-card:hover img { transform: scale(1.06); }
.wm-card:hover::after { opacity: 1; }

.wm-meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 2; padding: 22px 20px;
  transform: translateY(16px); opacity: 0;
  transition: transform var(--dur-mid) var(--ease), opacity var(--dur-mid) var(--ease);
  pointer-events: none;
}
.wm-card:hover .wm-meta { transform: translateY(0); opacity: 1; }
.wm-cat {
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-light); display: block; margin-bottom: 7px;
}
.wm-title { font-family: var(--serif); color: #fff; font-weight: 600; font-size: 1.16rem; line-height: 1.15; }
.wm-sub { font-family: var(--sans); color: rgba(255,255,255,0.7); font-size: 0.78rem; margin-top: 5px; }

@media (max-width: 900px) { .work-masonry { columns: 2; } }
@media (max-width: 560px) { .work-masonry { columns: 1; } }

/* ============================================================
   LIGHTBOX — elegant in-page gallery overlay
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 64px);
  background: rgba(8, 9, 11, 0.86);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lb-stage {
  position: relative;
  max-width: min(1180px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  transform: scale(0.96);
  transition: transform 0.45s var(--ease);
}
.lightbox.is-open .lb-stage { transform: scale(1); }

.lb-figure {
  position: relative;
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  background: #14161a;
}
.lb-img.is-loading { opacity: 0.3; }
.lb-img { transition: opacity 0.3s var(--ease); }

.lb-caption {
  text-align: center;
  max-width: 640px;
  color: #fff;
}
.lb-cat {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent-light); display: block; margin-bottom: 8px;
}
.lb-title { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; line-height: 1.15; color: #fff; }
.lb-sub { font-family: var(--sans); font-size: 0.82rem; color: rgba(255,255,255,0.66); margin-top: 6px; }

.lb-close {
  position: absolute;
  top: clamp(14px, 3vw, 30px);
  right: clamp(14px, 3vw, 34px);
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff; cursor: pointer; font-size: 20px; line-height: 1;
  transition: all var(--dur-fast) var(--ease);
}
.lb-close:hover { background: #fff; color: #111; transform: rotate(90deg); }

.lb-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff; cursor: pointer; font-size: 20px;
  transition: all var(--dur-fast) var(--ease);
  z-index: 3;
}
.lb-nav:hover { background: var(--accent-primary); border-color: var(--accent-primary); color: #111; }
.lb-nav.prev { left: clamp(8px, 2vw, 24px); }
.lb-nav.next { right: clamp(8px, 2vw, 24px); }

.lb-counter {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  color: rgba(255,255,255,0.6);
}

@media (max-width: 640px) {
  .lb-nav { width: 42px; height: 42px; font-size: 16px; }
  .lb-title { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox, .lb-stage { transition: none; }
}

/* ============================================================
   CASE STUDY — cinematic hero, meta bar, project gallery
   ============================================================ */
.case-hero {
  position: relative;
  height: clamp(440px, 66vh, 720px);
  overflow: hidden;
  background: #0d0f11;
}
.ch-bg { position: absolute; inset: 0; }
.ch-bg img, .ch-bg video {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  animation: chZoom 10s var(--ease) forwards;
}
.ch-bg video { display: block; }
@keyframes chZoom { to { transform: scale(1); } }
.ch-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(10,12,14,0.86) 0%, rgba(10,12,14,0.48) 46%, rgba(10,12,14,0.08) 82%),
    linear-gradient(0deg, rgba(10,12,14,0.9) 0%, rgba(10,12,14,0.12) 58%);
}
.ch-inner {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: 90px; padding-bottom: clamp(44px, 7vh, 86px);
}
.ch-content { max-width: 820px; }
.ch-content > * { opacity: 0; transform: translateY(28px); animation: chUp 0.9s var(--ease) forwards; }
.ch-content > *:nth-child(1) { animation-delay: 0.12s; }
.ch-content > *:nth-child(2) { animation-delay: 0.26s; }
.ch-content > *:nth-child(3) { animation-delay: 0.40s; }
.ch-content > *:nth-child(4) { animation-delay: 0.54s; }
@keyframes chUp { to { opacity: 1; transform: none; } }

.ch-crumb {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255,255,255,0.66); margin-bottom: 22px;
}
.ch-crumb a { color: rgba(255,255,255,0.66); transition: color var(--dur-fast) var(--ease); }
.ch-crumb a:hover { color: #fff; }
.ch-kicker {
  display: block; font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent-light); margin-bottom: 16px;
}
.ch-title {
  font-family: var(--serif); color: #fff; font-weight: 600;
  line-height: 1.0; letter-spacing: -0.015em;
  font-size: clamp(2.4rem, 6vw, 5rem); margin: 0;
  text-shadow: 0 2px 40px rgba(0,0,0,0.35);
}
.ch-client { color: rgba(255,255,255,0.82); font-size: clamp(1rem, 1.4vw, 1.2rem); margin-top: 18px; }

/* Meta bar under hero */
.case-meta { border-bottom: 1px solid var(--border-color); background: var(--bg-primary); }
.case-meta .wrap { display: flex; flex-wrap: wrap; gap: clamp(22px, 5vw, 68px); padding: 26px 0; }
.cm-item .k {
  display: block; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-light); margin-bottom: 6px;
}
.cm-item .v { font-family: var(--sans); font-weight: 500; color: var(--text-primary); font-size: 0.95rem; }

/* Overview intro */
.case-overview .wrap { max-width: 820px; }
.case-lead {
  font-family: var(--serif); font-weight: 500; font-style: italic;
  font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.35; color: var(--text-primary);
}
.case-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); margin-top: 40px; }
.case-split h3 {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-dark); margin-bottom: 12px;
}
@media (max-width: 720px) { .case-split { grid-template-columns: 1fr; gap: 28px; } }

@media (prefers-reduced-motion: reduce) {
  .ch-bg img, .ch-bg video { animation: none; transform: scale(1.02); }
  .ch-content > * { animation: none; opacity: 1; transform: none; }
}

/* ============================================================
   WORKS — editorial case index, alternating numbered rows
   ============================================================ */
.works-masthead { padding-top: clamp(70px, 12vh, 130px); }
.works-masthead .wrap { max-width: 900px; }
.works-masthead h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.02; letter-spacing: -0.02em; margin-top: 12px;
}

.case-index { display: flex; flex-direction: column; }
.ci-row {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(40px, 6vw, 76px) 0;
  border-top: 1px solid var(--border-color);
}
.ci-row:last-child { border-bottom: 1px solid var(--border-color); }
.ci-row:nth-child(even) .ci-media { order: 2; }

.ci-media {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  aspect-ratio: 4 / 3;
  background: var(--bg-tertiary);
}
.ci-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.ci-row:hover .ci-media img { transform: scale(1.05); }
.ci-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,12,14,0) 55%, rgba(10,12,14,0.5) 100%);
  opacity: 0; transition: opacity var(--dur-mid) var(--ease);
}
.ci-row:hover .ci-media::after { opacity: 1; }
.ci-chip {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: #fff;
  background: rgba(10,12,14,0.55); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 7px 12px; border-radius: 999px;
}

.ci-body { position: relative; }
.ci-num {
  font-family: var(--serif); font-weight: 600; font-style: italic;
  font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1;
  color: var(--accent-primary); opacity: 0.55; margin-bottom: 14px;
}
.ci-meta {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-light); margin-bottom: 12px;
}
.ci-body h2 {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1.06; margin-bottom: 16px;
}
.ci-body p { color: var(--text-secondary); line-height: 1.65; max-width: 52ch; }
.ci-link {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 26px;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-primary);
  border-bottom: 1px solid var(--accent-primary); padding-bottom: 4px;
  transition: gap var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.ci-link:hover { gap: 16px; color: var(--accent-dark); }

@media (max-width: 760px) {
  .ci-row { grid-template-columns: 1fr; gap: 22px; }
  .ci-row:nth-child(even) .ci-media { order: 0; }
}

/* ============================================================
   ABOUT — animated stats band
   ============================================================ */
.stat-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 4vw, 56px);
  text-align: center;
}
.stat-item { position: relative; }
.stat-item:not(:last-child)::after {
  content: ""; position: absolute; right: calc(clamp(20px, 4vw, 56px) / -2);
  top: 12%; height: 76%; width: 1px; background: var(--border-color);
}
.stat-item::before {
  content: ""; display: block; width: 28px; height: 2px;
  background: var(--accent-primary); opacity: 0.7; margin: 0 auto 12px;
}
.stat-num {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1;
  color: var(--text-primary); letter-spacing: -0.02em;
  display: inline-flex; align-items: baseline;
}
.stat-num .plus { color: var(--accent-primary); }
.stat-label {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-light); margin-top: 12px;
}
@media (max-width: 640px) {
  .stat-band { grid-template-columns: repeat(2, 1fr); gap: 36px 20px; }
  .stat-item:nth-child(2)::after { display: none; }
}

/* ============================================================
   POLISH — page transitions, scroll progress, magnetic buttons
   ============================================================ */

/* Page-load fade-in (pure CSS, in <head> so no flash; safe fallback) */
@media (prefers-reduced-motion: no-preference) {
  @keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
  /* fill-mode "backwards" (not "both"): once the fade finishes the animated
     transform is released. With "both" the computed transform stays an identity
     matrix forever, which makes <body> a containing block and breaks every
     position:fixed overlay on the page (lightbox, modals). */
  body { animation: pageFadeIn 0.5s var(--ease) backwards; }
  /* JS-driven exit fade on internal navigation */
  body.pt-out { opacity: 0 !important; transform: translateY(-6px); transition: opacity 0.26s var(--ease), transform 0.26s var(--ease); animation: none; }
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent-primary));
  z-index: 300;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* Magnetic hero buttons — smooth spring-back */
.hero-cinematic .btn { transition: transform 0.25s var(--ease), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); will-change: transform; }
@media (prefers-reduced-motion: reduce) {
  .hero-cinematic .btn { transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
}

/* ============================================================
   HOME v2 — editorial additions (door trio, specialties,
   freebie band, newsletter) modeled on the reference layout
   ============================================================ */

/* ---- Three-door navigation trio (services / work / shop) ---- */
.door-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.door {
  position: relative;
  display: block;
  aspect-ratio: 3 / 3.4;
  overflow: hidden;
  border-radius: 2px;
  background: var(--bg-tertiary);
}
.door img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s var(--ease), filter 0.6s var(--ease);
  filter: saturate(0.96);
}
.door::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,12,14,0.05) 0%, rgba(10,12,14,0.35) 100%);
  transition: background var(--dur-mid) var(--ease);
}
.door:hover img { transform: scale(1.06); }
.door:hover::after { background: linear-gradient(180deg, rgba(10,12,14,0.15) 0%, rgba(10,12,14,0.55) 100%); }
.door-label {
  position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%);
  z-index: 2; min-width: 62%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  padding: 15px 20px; text-align: center;
  transition: background var(--dur-mid) var(--ease), transform var(--dur-mid) var(--ease);
}
.door:hover .door-label { transform: translateX(-50%) translateY(-4px); }
.door-label .lbl {
  font-family: var(--serif); font-style: italic; font-weight: 600;
  font-size: 1.35rem; color: #14161a; line-height: 1;
}
.door-label .sub {
  display: block; margin-top: 6px;
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent-dark);
}
body.dark-mode .door-label { background: rgba(26,28,31,0.92); }
body.dark-mode .door-label .lbl { color: #fff; }
@media (max-width: 760px) {
  .door-trio { grid-template-columns: 1fr; }
  .door { aspect-ratio: 16 / 9; }
}

/* ---- Specialties: image collage + headlined lists ---- */
.specialties-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.spec-collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 12px;
}
.spec-collage figure { overflow: hidden; border-radius: 2px; aspect-ratio: 3/4; background: var(--bg-tertiary); }
.spec-collage figure:nth-child(1) { margin-top: 34px; }
.spec-collage figure:nth-child(4) { margin-top: -34px; }
.spec-collage img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.spec-collage figure:hover img { transform: scale(1.05); }

.spec-block + .spec-block { margin-top: 40px; }
.spec-block h3 {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.12; margin-bottom: 0;
}
.spec-block h3::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  background: var(--accent-primary);
  margin: 14px 0 18px;
  opacity: 0.7;
}
.spec-list { list-style: none; padding: 0; margin: 0; }
.spec-list li {
  position: relative; padding-left: 30px; margin-bottom: 12px;
  color: var(--text-secondary); font-size: 0.98rem; line-height: 1.5;
}
.spec-list li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 15px; height: 9px; border-left: 2px solid var(--accent-primary);
  border-bottom: 2px solid var(--accent-primary); transform: rotate(-45deg);
}
.spec-list li b { color: var(--text-primary); font-weight: 600; }
@media (max-width: 820px) {
  .specialties-grid { grid-template-columns: 1fr; gap: 40px; }
  .spec-collage figure:nth-child(1), .spec-collage figure:nth-child(4) { margin-top: 0; }
}

/* ---- Newsletter "Join the List" band ---- */
.newsletter { background: var(--bg-tertiary); }
.newsletter .wrap { max-width: 720px; text-align: center; }
.newsletter h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.newsletter p { color: var(--text-secondary); margin-top: 10px; }
.newsletter-form {
  display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap;
  justify-content: center;
}
.newsletter-form input[type="email"] {
  flex: 1 1 260px; min-width: 0;
  padding: 15px 18px; font-family: var(--sans); font-size: 0.95rem;
  color: var(--text-primary); background: var(--bg-primary);
  border: 1px solid var(--border-color); border-radius: 2px;
  transition: border-color var(--dur-fast) var(--ease);
}
.newsletter-form input[type="email"]:focus { outline: none; border-color: var(--accent-primary); }
.newsletter-form button { flex: 0 0 auto; }
.newsletter-note { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-light); margin-top: 16px; }
.newsletter-status { margin-top: 14px; font-size: 0.9rem; min-height: 1.2em; }
.newsletter-status.ok { color: var(--accent-dark); }
.newsletter-status.err { color: #c0392b; }

/* ---- Refined masthead for utility / legal pages ---- */
.page-head {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding-top: clamp(64px, 11vh, 120px);
  padding-bottom: clamp(40px, 6vh, 64px);
}
.page-head .eyebrow {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent-dark); display: block; margin-bottom: 14px;
}
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.04; letter-spacing: -0.015em; }
.page-head .accent-divider { margin-top: 20px; }
.page-head p.lede { margin-top: 16px; }

/* ============================================================
   RESUME / CV PAGE
   ============================================================ */
.resume-masthead { padding-top: clamp(90px, 14vh, 150px); }
.resume-masthead .wrap {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.resume-masthead h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.0;
  letter-spacing: -0.02em; margin-top: 12px;
}
.rm-roles {
  font-family: var(--sans); color: var(--text-secondary);
  font-size: clamp(1rem, 1.5vw, 1.18rem); margin-top: 16px; line-height: 1.5;
}
.rm-contact {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-light);
  margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 18px;
}
.rm-contact a { color: var(--text-light); }
.rm-contact a:hover { color: var(--accent-dark); }
.rm-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }

.resume-portrait { position: relative; }
.resume-portrait img { width: 100%; border-radius: 3px; box-shadow: var(--shadow-lg); display: block; position: relative; z-index: 1; }
.resume-portrait::after {
  content: ""; position: absolute; inset: 16px -16px -16px 16px;
  border: 1px solid var(--accent-primary); border-radius: 3px; z-index: 0;
}
@media (max-width: 820px) {
  .resume-masthead .wrap { grid-template-columns: 1fr; }
  .resume-portrait { max-width: 380px; margin-inline: auto; }
}

.btn-download { display: inline-flex; align-items: center; gap: 9px; }
.btn-download svg { width: 15px; height: 15px; }

/* Static stat band (supports non-numeric values like TS) */
.resume-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 3vw, 40px);
  text-align: center;
}
.rs-item { position: relative; }
.rs-item:not(:last-child)::after {
  content: ""; position: absolute; right: calc(clamp(16px,3vw,40px) / -2);
  top: 14%; height: 72%; width: 1px; background: var(--border-color);
}
.rs-item .v {
  font-family: var(--serif); font-weight: 600; line-height: 1;
  font-size: clamp(2rem, 4.6vw, 3.4rem); color: var(--text-primary); letter-spacing: -0.02em;
}
.rs-item .v .plus { color: var(--accent-primary); }
.rs-item .k {
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--text-light); margin-top: 12px;
}
@media (max-width: 640px) {
  .resume-stats { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
  .rs-item:nth-child(2)::after { display: none; }
}

/* Experience timeline */
.exp-row {
  display: grid; grid-template-columns: 190px 1fr; gap: clamp(20px, 4vw, 48px);
  padding: clamp(24px,3.5vw,34px) 0; border-top: 1px solid var(--border-color);
}
.exp-row:last-child { border-bottom: 1px solid var(--border-color); }
.exp-period { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--accent-dark); padding-top: 8px; }
.exp-body h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.1; }
.exp-org { font-style: italic; color: var(--text-secondary); margin: 5px 0 14px; }
.exp-body ul { list-style: none; padding: 0; margin: 0; }
.exp-body li { position: relative; padding-left: 22px; margin-bottom: 9px; color: var(--text-secondary); line-height: 1.55; }
.exp-body li::before { content: "—"; position: absolute; left: 0; color: var(--accent-primary); }
@media (max-width: 640px) { .exp-row { grid-template-columns: 1fr; gap: 8px; } }

/* Signature projects */
.sig-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border-color); border: 1px solid var(--border-color); border-radius: 3px; overflow: hidden;
}
.sig-card { background: var(--bg-primary); padding: clamp(22px, 3vw, 32px); transition: background var(--dur-mid) var(--ease); }
.sig-card:hover { background: var(--bg-secondary); }
.sig-card .n { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.14em; color: var(--accent-dark); }
.sig-card h4 { font-family: var(--serif); font-weight: 600; font-size: 1.22rem; margin: 12px 0 8px; }
.sig-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }
@media (max-width: 760px) { .sig-grid { grid-template-columns: 1fr; } }

/* Video feature */
.resume-video-frame {
  position: relative; border-radius: 3px; overflow: hidden;
  box-shadow: var(--shadow-lg); aspect-ratio: 16/9; background: #0d0f11;
}
.resume-video-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Education / Credentials / Software columns */
.resume-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); }
.resume-cols h4 { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: 16px; }
.resume-cols ul { list-style: none; padding: 0; margin: 0; }
.resume-cols li, .resume-cols p { color: var(--text-secondary); line-height: 1.6; margin-bottom: 8px; }
.resume-cols strong { color: var(--text-primary); font-weight: 600; }
@media (max-width: 760px) { .resume-cols { grid-template-columns: 1fr; gap: 32px; } }

/* ============================================================
   SKILLS PAGE — software dots, star ratings, client chips
   ============================================================ */
.sw-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(16px, 2.5vw, 30px); }
.sw-item { text-align: center; }
.sw-item .nm { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-secondary); display: block; margin-bottom: 10px; }
.sw-dots { display: flex; gap: 5px; justify-content: center; }
.sw-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-color); }
.sw-dots i.on { background: var(--accent-primary); }
@media (max-width: 640px) { .sw-grid { grid-template-columns: repeat(3, 1fr); row-gap: 26px; } }

.star-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--border-color); }
.star-row .lbl { font-weight: 500; color: var(--text-primary); }
.stars { color: var(--accent-primary); letter-spacing: 3px; font-size: 0.9rem; white-space: nowrap; }
.stars .off { color: var(--border-color); }

.client-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.client-chip { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); border: 1px solid var(--border-color); border-radius: 999px; padding: 9px 16px; }

/* ============================================================
   HERO SLIDER (skills.html)
   ============================================================ */
.hero-slider { position: relative; }

.hero-slider .ch-bg.hs-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  z-index: 0;
}
.hero-slider .ch-bg.hs-slide.hs-active { opacity: 1; z-index: 1; }

.hero-slider .ch-overlay { z-index: 2; }
.hero-slider .ch-inner   { z-index: 3; }

.hs-dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 4;
}
.hs-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.6);
  transition: background 0.3s;
}
.hs-dot.hs-dot-active { background: var(--accent-primary); border-color: var(--accent-primary); }

@media (prefers-reduced-motion: reduce) {
  .hero-slider .ch-bg.hs-slide { transition: none; }
}

/* ============================================================
   EXPERIENCE ACCORDION (cv.html)
   ============================================================ */
.exp-accordion { border-top: 1px solid var(--border-color); }

.exp-item { border-bottom: 1px solid var(--border-color); }

.exp-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 32px);
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
}
.exp-trigger:hover .exp-chevron { color: var(--accent-primary); }

.exp-period {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  white-space: nowrap;
  min-width: 100px;
  flex-shrink: 0;
}

.exp-summary {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.exp-summary strong {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 600;
  color: var(--text-primary);
}
.exp-org-inline {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

.exp-chevron {
  flex-shrink: 0;
  color: var(--text-tertiary);
  transition: transform 0.3s ease, color 0.2s;
}
.exp-trigger[aria-expanded="true"] .exp-chevron { transform: rotate(180deg); color: var(--accent-primary); }

.exp-panel {
  display: none;
  padding: 0 0 24px clamp(0px, calc(100px + 32px), 132px);
}
.exp-panel ul {
  margin: 0;
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.exp-panel ul li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.exp-panel ul li::marker { color: var(--accent-primary); }

@media (max-width: 540px) {
  .exp-period { min-width: 70px; font-size: 0.65rem; }
  .exp-panel { padding-left: 0; }
}

/* ============================================================
   HOME — CREDENTIALS BAND (outer figures + nested results card)
   ============================================================ */
.home-stats {
  background: var(--bg-secondary);
  padding: clamp(44px, 6vw, 72px) 0 clamp(60px, 8vw, 96px);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
.hs-outer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 3vw, 40px);
  text-align: center;
}
.hs-stat .v {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.hs-stat .v .plus { color: var(--accent-primary); }
.hs-stat .k {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-top: 10px;
  line-height: 1.5;
}

/* nested white card, pulled up so it overlaps the band edge */
.hs-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: clamp(22px, 3vw, 34px) clamp(18px, 3vw, 40px);
  margin: clamp(30px, 4vw, 46px) auto calc(-1 * clamp(72px, 9vw, 116px));
  max-width: 940px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.07);
  position: relative;
  z-index: 2;
}
.hs-card-label {
  display: block;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 18px;
}
.hs-card-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2.5vw, 32px);
  text-align: center;
}
.hs-mini + .hs-mini { border-left: 1px solid var(--border-color); }
.hs-mini .v {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1;
  color: var(--text-primary);
}
.hs-mini .v .plus { color: var(--accent-primary); }
.hs-mini .k {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.5;
  padding: 0 6px;
}

/* ============================================================
   HOME — CINEMATIC BRAND BAND
   ============================================================ */
.cine-band {
  position: relative;
  min-height: clamp(320px, 46vw, 500px);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.cine-bg { position: absolute; inset: 0; }
.cine-bg video,
.cine-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cine-overlay {
  position: absolute;
  inset: 0;
  /* deeper, weighted-to-center gradient so the text sits on real contrast */
  background:
    radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0.68) 0%, rgba(0,0,0,0.48) 45%, rgba(0,0,0,0.62) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.30) 0%, rgba(0,0,0,0.15) 50%, rgba(0,0,0,0.35) 100%);
}
.cine-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: clamp(24px, 4vw, 44px) clamp(24px, 6vw, 72px);
  max-width: 900px;
}
.cine-kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 22px;
  padding: 6px 14px;
  border: 1px solid rgba(224, 194, 133, 0.55);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cine-line {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 4.2vw, 3.1rem);
  line-height: 1.15;
  letter-spacing: -0.005em;
  margin: 0;
  color: #fff;
  /* layered shadow: sharp near-glow + wider soft glow for legibility on any bg */
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.55),
    0 2px 12px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(0, 0, 0, 0.35);
}
.cine-line em {
  font-style: italic;
  font-weight: 600;
  color: var(--accent-primary);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}
.cine-rule {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--accent-primary);
  margin: 20px auto 0;
  opacity: 0.85;
}

/* ============================================================
   HOME — FEATURED SERVICES v2 (richer card layout)
   ============================================================ */
.fs2-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 2vw, 24px);
}
.fs2-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(30px, 3vw, 42px) clamp(24px, 2.5vw, 30px) clamp(24px, 3vw, 32px);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
  overflow: hidden;
}
.fs2-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.fs2-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}
.fs2-card:hover::before { transform: scaleX(1); }

.fs2-num {
  position: absolute;
  top: clamp(6px, 1vw, 10px);
  right: clamp(14px, 1.6vw, 20px);
  font-family: var(--serif);
  font-size: clamp(2.8rem, 4.4vw, 3.6rem);
  font-weight: 600;
  line-height: 1;
  color: var(--text-primary);
  opacity: 0.06;
  letter-spacing: -0.02em;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.fs2-card:hover .fs2-num { opacity: 0.12; transform: translateY(-2px); }
.fs2-icon-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  transition: background 0.35s ease, border-color 0.35s ease;
}
.fs2-card:hover .fs2-icon-wrap { background: rgba(224, 194, 133, 0.15); border-color: var(--accent-primary); }
.fs2-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-primary);
}
.fs2-card h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 4px;
  position: relative;
}
.fs2-card h3::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: var(--accent-primary);
  margin: 12px 0 14px;
  opacity: 0.7;
}
.fs2-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0 0 22px;
  flex: 1;
}
.fs2-cta {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  width: 100%;
}
.fs2-cta em {
  font-style: normal;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.fs2-card:hover .fs2-cta em { transform: translateX(4px); }

@media (max-width: 900px) { .fs2-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .fs2-grid { grid-template-columns: 1fr; } }

/* ============================================================
   HOME — STATS v2 (unified band + measured results, no float overlap)
   ============================================================ */
.home-stats2 {
  background: var(--bg-secondary);
  padding: clamp(56px, 7vw, 92px) 0 clamp(56px, 7vw, 96px);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
.hs2-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto clamp(38px, 5vw, 60px);
}
.hs2-head h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-style: italic;
  margin-top: 8px;
}

.hs2-outer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 40px);
  text-align: center;
  margin-bottom: clamp(46px, 6vw, 72px);
}
.hs2-stat { position: relative; }

/* Ring infographic — conic-gradient donut scaled to each stat's relative weight,
   echoing the circular badge motif used on the printed skill sheet. */
.hs2-ring {
  --pct: 100;
  width: clamp(96px, 10vw, 128px);
  height: clamp(96px, 10vw, 128px);
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: conic-gradient(var(--accent-primary) calc(var(--pct) * 1%), var(--border-color) 0);
  transform: scale(0.8) rotate(-8deg);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.6s ease;
}
.hs2-stat.is-visible .hs2-ring { transform: scale(1) rotate(0); opacity: 1; }
.hs2-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--bg-secondary);
}
.hs2-stat .v {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 600;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.hs2-stat .v .plus { color: var(--accent-primary); font-weight: 500; }
.hs2-stat .k {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 16px;
  line-height: 1.5;
}
@media (prefers-reduced-motion: reduce) {
  .hs2-ring { transform: scale(1) rotate(0); opacity: 1; }
}

/* Measured Results — the anchor card, inline in the flow (no overlap) */
.hs2-results {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 48px);
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.06);
}
.hs2-results-head {
  text-align: center;
  margin-bottom: clamp(28px, 3vw, 40px);
  padding-bottom: clamp(20px, 3vw, 28px);
  border-bottom: 1px solid var(--border-color);
}
.hs2-results-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 10px;
}
.hs2-results-sub {
  display: block;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.5;
}
.hs2-results-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 48px);
}
.hs2-result {
  text-align: center;
  padding: 0 clamp(4px, 1vw, 12px);
  position: relative;
}
.hs2-result + .hs2-result::before {
  content: "";
  position: absolute;
  left: calc(clamp(24px, 4vw, 48px) * -0.5);
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border-color);
}
.hs2-result .v {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  font-weight: 600;
  line-height: 1;
  color: var(--text-primary);
}
.hs2-result .v .plus { color: var(--accent-primary); }
.hs2-result-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--bg-secondary);
  margin: 16px auto 0;
  overflow: hidden;
  max-width: 160px;
}
.hs2-result-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent-primary);
  transition: width 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.5s;
}
/* the whole results card reveals as one unit; fill bars when it appears */
.hs2-results.is-visible .hs2-result-bar span { width: var(--w); }
.hs2-result .k {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 14px;
  line-height: 1.55;
}
.hs2-result .k strong {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 2px;
}

@media (max-width: 860px) {
  .hs2-outer { grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
  .hs2-results-row { grid-template-columns: 1fr; gap: 28px; }
  .hs2-result + .hs2-result { padding-top: 28px; border-top: 1px solid var(--border-color); }
  .hs2-result + .hs2-result::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hs2-result-bar span { transition: none; width: var(--w, 100%); }
}

/* ============================================================
   HOME — WHY WORK WITH ME
   ============================================================ */
.why-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.why-figures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 52px) clamp(20px, 3vw, 40px);
}
.why-fig .v {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.why-fig .v .plus { color: var(--accent-primary); }
.why-fig::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: var(--accent-primary);
  margin-bottom: 14px;
  opacity: 0.7;
}
.why-fig .k {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.5;
  max-width: 22ch;
}
.why-copy h2 {
  font-family: var(--sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.02;
  margin: 0 0 20px;
}
.why-copy p {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.7;
  margin: 0 0 14px;
}
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 15px 38px;
  border-radius: 999px;
  background: var(--text-primary);
  color: var(--bg-primary);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.25s, transform 0.25s;
}
.btn-pill:hover { background: var(--accent-primary); transform: translateY(-2px); }

@media (max-width: 860px) {
  .hs-outer { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .hs-card-row { grid-template-columns: 1fr; gap: 18px; }
  .hs-mini + .hs-mini { border-left: none; border-top: 1px solid var(--border-color); padding-top: 16px; }
  .why-grid { grid-template-columns: 1fr; }
  .why-copy h2 br { display: none; }
}
@media (max-width: 520px) {
  .why-figures { gap: 22px 14px; }
  .hs-card { margin-bottom: calc(-1 * clamp(60px, 14vw, 90px)); }
}
@media (prefers-reduced-motion: reduce) {
  .btn-pill:hover { transform: none; }
}

/* ============================================================
   PORTFOLIO STUDIO — editorial category-led portfolio
   ============================================================ */

/* --- sticky category jump nav --- */
.pf-jump {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}
.pf-jump .wrap {
  display: flex;
  gap: clamp(8px, 2vw, 28px);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 14px 0;
}
.pf-jump .wrap::-webkit-scrollbar { display: none; }
.pf-jump a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.pf-jump a:hover { color: var(--text-primary); border-bottom-color: var(--accent-primary); }
.pf-jump a .n {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--accent-primary);
  letter-spacing: 0.08em;
}
.pf-jump a .c {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 1px 7px;
}

/* --- section header --- */
.pf-section { padding: clamp(56px, 8vw, 104px) 0 clamp(24px, 4vw, 40px); }
.pf-section + .pf-section { border-top: 1px solid var(--border-color); }

.pf-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: clamp(16px, 3vw, 36px);
  margin-bottom: clamp(28px, 4vw, 52px);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.pf-head.in { opacity: 1; transform: none; }
.pf-num {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 0.9;
  color: var(--accent-primary);
  opacity: 0.45;
}
.pf-head-txt h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  margin: 0 0 8px;
  line-height: 1.1;
}
.pf-head-txt p {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.65;
  max-width: 62ch;
  margin: 0;
}
.pf-count {
  font-family: var(--mono);
  font-size: 1.5rem;
  color: var(--text-primary);
  text-align: right;
  line-height: 1;
}
.pf-count em {
  display: block;
  font-style: normal;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-top: 5px;
}

/* --- grid --- */
.pf-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(10px, 1.6vw, 20px);
}
.pf-card {
  position: relative;
  grid-column: span 4;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-secondary);
  cursor: pointer;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.pf-card.in { opacity: 1; transform: none; }
.pf-card.pf-wide { grid-column: span 8; aspect-ratio: 16 / 9; }
.pf-card.pf-tall { grid-column: span 4; aspect-ratio: 3 / 4; }

.pf-grid-tight .pf-card { grid-column: span 3; aspect-ratio: 4 / 3; }
.pf-grid-tight .pf-card.pf-wide { grid-column: span 6; }

.pf-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.5s;
}
.pf-card:hover .pf-media,
.pf-card:focus-visible .pf-media { transform: scale(1.045); }
.pf-card:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 3px; }

.pf-play {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  backdrop-filter: blur(4px);
  z-index: 2;
  pointer-events: none;
}
.pf-play svg { width: 15px; height: 15px; margin-left: 1px; }

.pf-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 34px 16px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.pf-card:hover .pf-cap,
.pf-card:focus-visible .pf-cap { opacity: 1; transform: none; }
.pf-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 5px;
}
.pf-title {
  display: block;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.25;
  margin-bottom: 3px;
}
.pf-sub { display: block; font-size: 0.72rem; opacity: 0.8; }

/* --- archive toggle --- */
.pf-more { display: flex; justify-content: center; margin-top: clamp(22px, 3vw, 34px); }
.pf-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 11px 24px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  transition: border-color 0.25s, color 0.25s;
}
.pf-more-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.pf-more-n { color: var(--text-tertiary); }
.pf-archive { margin-top: clamp(18px, 2.5vw, 28px); }

/* --- lightbox --- */
.pf-lb {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 8, 10, 0.96);
  display: none;
  place-items: center;
  padding: clamp(16px, 4vw, 56px);
}
.pf-lb.is-open { display: grid; }
.pf-lb-stage { max-width: 1180px; width: 100%; text-align: center; }
.pf-lb-figure img,
.pf-lb-figure video {
  max-width: 100%;
  max-height: 76vh;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
}
.pf-lb-cap { margin-top: 16px; color: #fff; }
.pf-lb-cap .c {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-primary);
}
.pf-lb-cap .t { font-family: var(--serif); font-size: 1.3rem; margin-top: 6px; }
.pf-lb-cap .s { font-size: 0.8rem; opacity: 0.72; margin-top: 3px; }
.pf-lb-cap .n { font-family: var(--mono); font-size: 0.66rem; opacity: 0.5; margin-top: 10px; }
.pf-lb-case {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.pf-lb-case:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.06);
}
/* [hidden] must win over the inline-flex above */
.pf-lb-case[hidden] { display: none; }
.pf-lb-close,
.pf-lb-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}
.pf-lb-close:hover,
.pf-lb-nav:hover { background: rgba(255, 255, 255, 0.2); }
.pf-lb-close { top: 20px; right: 20px; }
.pf-lb-nav.prev { left: 20px; top: 50%; transform: translateY(-50%); }
.pf-lb-nav.next { right: 20px; top: 50%; transform: translateY(-50%); }

/* --- responsive --- */
@media (max-width: 900px) {
  .pf-card { grid-column: span 6; }
  .pf-card.pf-wide { grid-column: span 12; }
  .pf-card.pf-tall { grid-column: span 6; }
  .pf-grid-tight .pf-card { grid-column: span 4; }
  .pf-head { grid-template-columns: auto 1fr; }
  .pf-count { grid-column: 2; text-align: left; margin-top: 4px; }
}
@media (max-width: 600px) {
  .pf-card,
  .pf-card.pf-wide,
  .pf-card.pf-tall { grid-column: span 12; aspect-ratio: 4 / 3; }
  .pf-grid-tight .pf-card { grid-column: span 6; }
  .pf-cap { opacity: 1; transform: none; }
  .pf-lb-nav.prev { left: 8px; }
  .pf-lb-nav.next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-card, .pf-head { opacity: 1; transform: none; transition: none; }
  .pf-media { transition: none; }
  .pf-card:hover .pf-media { transform: none; }
}

/* ============================================================
   CAREER HIGHLIGHTS — bordered fact-card grid (About page)
   ============================================================ */
.highlight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.highlight-card { border: 1px solid var(--border-color); padding: 22px 24px; }
.highlight-card .overline { display: block; margin-bottom: 10px; }
.highlight-card p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.55; margin: 0; }
@media (max-width: 768px) {
  .highlight-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PRINT hygiene — keep the browser's Print/Save-as-PDF legible
   ============================================================ */
@media print {
  .editorial-header, .brand-footer, .scroll-progress, .rm-actions,
  .resume-video, .lightbox, .marquee { display: none !important; }
  body { animation: none !important; background: #fff !important; color: #000 !important; }
  .resume-masthead { padding-top: 0; }
  a { color: inherit; text-decoration: none; }
  .section-tight { padding: 14px 0 !important; }
  .sig-card, .exp-row { break-inside: avoid; }
}
