/* ============================================
   SHOYAIB — Premium Portfolio
   Design System & Styles
   ============================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Palette */
  --ink: #0c0b09;
  --ink-soft: #15140f;
  --ink-card: #1a1813;
  --bone: #ece5d6;
  --bone-dim: #b8b0a0;
  --bone-faint: #6b6557;
  --accent: #ff4d24;
  --accent-soft: #ff6b3d;
  --accent-glow: rgba(255, 77, 36, 0.15);
  --line: rgba(236, 229, 214, 0.08);
  --line-strong: rgba(236, 229, 214, 0.15);

  /* Type */
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Space Mono", "Courier New", monospace;

  /* Spacing */
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --section-gap: clamp(5rem, 12vh, 10rem);
  --radius: 4px;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--ink);
}
::-webkit-scrollbar-thumb {
  background: var(--ink-card);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ---------- Focus Visible ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 10001;
  background: var(--accent);
  color: var(--ink);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 0 0 4px 4px;
  transition: top 0.3s var(--ease-out);
}
.skip-link:focus {
  top: 0;
}

/* ---------- Scroll Progress ---------- */
.scroll-progress,
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--bone));
  z-index: 101;
  transition: width 0.05s linear;
  box-shadow: 0 0 6px rgba(255, 77, 36, 0.4);
}

/* ---------- Vignette ---------- */
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0, 0, 0, 0.3) 100%
  );
}

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink-soft);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bone);
  cursor: none;
  z-index: 98;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.4s, transform 0.4s var(--ease-out),
    background 0.3s, border-color 0.3s;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
  box-shadow: 0 0 20px rgba(255, 77, 36, 0.3);
}
body.no-cursor .back-to-top {
  cursor: pointer;
}

/* ---------- Selection ---------- */
::selection {
  background: var(--accent);
  color: var(--ink);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: auto;
  scroll-padding-top: 5rem;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  scrollbar-color: var(--ink-card) var(--ink);
  scrollbar-width: thin;
}

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}

body.page-loaded {
  opacity: 1;
}

body.no-anim {
  opacity: 1;
}

body.no-cursor {
  cursor: auto;
}

body.no-cursor a,
body.no-cursor button,
body.no-cursor .work-item,
body.no-cursor .gallery-card,
body.no-cursor .article-row,
body.no-cursor .service-card,
body.no-cursor .nav-burger,
body.no-cursor .lightbox-close {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul {
  list-style: none;
}

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--bone-dim);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 7rem);
  font-variation-settings: "opsz" 144, "SOFT" 50;
}

h2 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-variation-settings: "opsz" 96, "SOFT" 30;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  font-variation-settings: "opsz" 48, "SOFT" 20;
}

p {
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  line-height: 1.7;
  color: var(--bone-dim);
  text-wrap: pretty;
}

/* ---------- Utility ---------- */
.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-gap) 0;
  position: relative;
}

.split-text {
  overflow: hidden;
}

.split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.split-word span {
  display: inline-block;
  transform: translateY(110%);
}

/* ---------- Film Grain ---------- */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.4s steps(1) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-5%, 5%); }
  50% { transform: translate(5%, -5%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(3%, 3%); }
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.preloader-count {
  font-family: var(--font-display);
  font-size: clamp(4rem, 15vw, 12rem);
  font-weight: 400;
  color: var(--bone);
  line-height: 1;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  position: relative;
}

.preloader-count::after {
  content: "%";
  font-size: 0.3em;
  color: var(--accent);
  vertical-align: super;
  margin-left: 0.1em;
}

.preloader-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bone-faint);
  margin-top: 1rem;
  animation: labelFlicker 2s ease-in-out infinite;
}

@keyframes labelFlicker {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.preloader-bar {
  width: clamp(150px, 30vw, 300px);
  height: 1px;
  background: var(--line);
  margin-top: 2rem;
  overflow: hidden;
}

.preloader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--accent);
}

.preloader.done {
  pointer-events: none;
}

/* ---------- Custom Cursor ---------- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--bone);
  transition: width 0.2s, height 0.2s, opacity 0.2s;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(236, 229, 214, 0.4);
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out),
    border-color 0.3s, background 0.3s, opacity 0.2s;
}

.cursor-dot.pressed,
.cursor-ring.pressed {
  transition: width 0.15s ease, height 0.15s ease;
}

.cursor-dot.pressed {
  width: 4px;
  height: 4px;
}

.cursor-ring.pressed {
  width: 24px;
  height: 24px;
}

.cursor-ring.hover {
  width: 64px;
  height: 64px;
  border-color: var(--accent);
  background: var(--accent-glow);
}

.cursor-ring.text {
  width: 80px;
  height: 80px;
  border-color: var(--bone);
  background: var(--bone);
  mix-blend-mode: difference;
}

.cursor-ring.text::after {
  content: attr(data-cursor-text);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

body.no-cursor .cursor-dot,
body.no-cursor .cursor-ring {
  display: none;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s;
}

.nav.scrolled {
  background: rgba(12, 11, 9, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem var(--gutter);
  border-bottom: 1px solid var(--line);
}

.nav.hidden {
  transform: translateY(-100%);
  transition: transform 0.4s var(--ease-out), background 0.4s, backdrop-filter 0.4s, padding 0.4s;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--bone);
  font-variation-settings: "opsz" 48, "SOFT" 30;
  display: flex;
  align-items: baseline;
  gap: 0.15em;
  transition: color 0.3s;
}

.nav-brand:hover {
  color: var(--accent);
}

.nav-brand .dot {
  color: var(--accent);
  animation: dotPulse 3s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

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

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone-dim);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.3s;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}

.nav-link:hover {
  color: var(--bone);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--bone);
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--bone);
  padding: 0.6rem 1.4rem;
  border-radius: 100px;
  transition: background 0.3s, color 0.3s;
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--bone);
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: none;
  padding: 0.5rem;
}

.nav-burger span {
  width: 24px;
  height: 1.5px;
  background: var(--bone);
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
}

.nav-burger.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-burger.active span:nth-child(2) {
  opacity: 0;
}

.nav-burger.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 8rem var(--gutter) 4rem;
  overflow: hidden;
}

.hero-bg-text {
  position: absolute;
  bottom: -2vw;
  left: -1vw;
  font-family: var(--font-display);
  font-size: 28vw;
  font-weight: 400;
  line-height: 0.8;
  color: var(--ink-soft);
  pointer-events: none;
  z-index: 0;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  white-space: nowrap;
  user-select: none;
  animation: bgPulse 8s ease-in-out infinite;
}

@keyframes bgPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  will-change: opacity, transform;
}

.hero-eyebrow .line {
  width: 3rem;
  height: 1px;
  background: var(--accent);
}

.hero-title {
  font-size: clamp(3rem, 10vw, 9rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}

.hero-title .accent-word {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

.hero-sub {
  max-width: 540px;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.7;
  color: var(--bone-dim);
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(20px);
}

.hero-meta {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
}

.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero-meta-item .label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

.hero-meta-item .value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--bone);
  transition: color 0.3s;
}

.hero-meta-item:hover .value {
  color: var(--accent);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}

.hero-scroll-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--accent);
  animation: scrollLine 2s var(--ease-in-out) infinite;
  box-shadow: 0 0 8px var(--accent);
}

@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(200%); }
}

.hero-scroll-text {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bone-faint);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  gap: 3rem;
  animation: marquee 25s linear infinite;
  will-change: transform;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-style: italic;
  color: var(--bone-dim);
  font-variation-settings: "opsz" 96, "SOFT" 50;
  display: inline-flex;
  align-items: center;
  gap: 3rem;
}

.marquee-item::after {
  content: "✦";
  color: var(--accent);
  font-style: normal;
  font-size: 0.6em;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- About / Stats ---------- */
.about {
  padding: var(--section-gap) 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.about-label {
  position: sticky;
  top: 6rem;
}

.about-label .eyebrow {
  margin-bottom: 1rem;
}

.about-text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--bone);
  font-variation-settings: "opsz" 96, "SOFT" 30;
}

.about-text .highlight {
  color: var(--accent);
  font-style: italic;
  position: relative;
}

.about-text .highlight::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out) 0.3s;
}

.reveal.in .about-text .highlight::after {
  transform: scaleX(1);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  background: var(--ink);
  padding: 2.5rem 1.5rem;
  text-align: left;
  transition: background 0.4s var(--ease-out);
  position: relative;
}

.stat::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.4s var(--ease-out);
}

.stat:hover {
  background: var(--ink-soft);
}

.stat:hover::after {
  width: 100%;
}

.stat:hover .stat-number {
  transform: translateY(-4px);
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  color: var(--bone);
  font-variation-settings: "opsz" 144, "SOFT" 50;
  display: flex;
  align-items: baseline;
  transition: transform 0.3s var(--ease-out);
}

.stat-number .suffix {
  font-size: 0.4em;
  color: var(--accent);
  margin-left: 0.1em;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-faint);
  margin-top: 0.75rem;
}

/* ---------- Services ---------- */
.services {
  padding: var(--section-gap) 0;
}

.services-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
  gap: 2rem;
  flex-wrap: wrap;
}

.services-header h2 {
  max-width: 700px;
}

.services-header .eyebrow {
  margin-bottom: 1rem;
}

.service-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2vw, 2rem);
}

.service-card {
  position: relative;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(2rem, 4vw, 4rem);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: border-color 0.4s, transform 0.4s var(--ease-out);
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    var(--accent-glow),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s;
}

.service-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.service-card-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--bone-faint);
  letter-spacing: 0.1em;
  transition: color 0.4s;
}

.service-card:hover .service-card-number {
  color: var(--accent);
}

.service-card-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: transform 0.5s var(--ease-out), border-color 0.4s, background 0.4s;
}

.service-card:hover .service-card-icon {
  transform: rotate(45deg) scale(1.1);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.service-card-body {
  position: relative;
  z-index: 1;
}

.service-card-body h3 {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.service-card-body p {
  max-width: 380px;
  margin-bottom: 2rem;
}

.service-card-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s, color 0.3s;
}

.service-card-link:hover {
  gap: 1rem;
  color: var(--accent);
}

.service-card-link .arrow {
  transition: transform 0.3s var(--ease-out);
}

.service-card:hover .service-card-link .arrow {
  transform: translateX(4px);
}

/* ---------- Featured Work ---------- */
.work {
  padding: var(--section-gap) 0;
}

.work-header {
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.work-header .eyebrow {
  margin-bottom: 1rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
}

.work-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: none;
  background: var(--ink-soft);
  clip-path: inset(0 0 0 0);
}

.work-item.reveal-clip {
  clip-path: inset(50% 50% 50% 50%);
  transition: clip-path 1s var(--ease-out);
}

.work-item.reveal-clip.in {
  clip-path: inset(0 0 0 0);
}

.work-item.large {
  grid-column: span 7;
  aspect-ratio: 16 / 10;
}

.work-item.medium {
  grid-column: span 5;
  aspect-ratio: 4 / 5;
}

.work-item.small {
  grid-column: span 4;
  aspect-ratio: 1 / 1;
}

.work-item.wide {
  grid-column: span 8;
  aspect-ratio: 16 / 9;
}

.work-item video,
.work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out), filter 0.4s;
  filter: brightness(0.7) saturate(0.9);
}

.work-item:hover video,
.work-item:hover img {
  transform: scale(1.08);
  filter: brightness(0.95) saturate(1.1);
}

.work-item-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.25rem, 2vw, 2rem);
  background: linear-gradient(
    to top,
    rgba(12, 11, 9, 0.9) 0%,
    transparent 60%
  );
  z-index: 2;
  transition: background 0.4s;
}

.work-item:hover .work-item-overlay {
  background: linear-gradient(
    to top,
    rgba(12, 11, 9, 0.95) 0%,
    rgba(12, 11, 9, 0.2) 50%,
    transparent 80%
  );
}

.work-item-tag,
.work-item-title {
  transform: translateY(8px);
  opacity: 0.85;
  transition: transform 0.4s var(--ease-out), opacity 0.4s;
}

.work-item:hover .work-item-tag,
.work-item:hover .work-item-title {
  transform: translateY(0);
  opacity: 1;
}

.work-item-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.work-item-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  color: var(--bone);
  line-height: 1.2;
  font-variation-settings: "opsz" 48, "SOFT" 30;
}

.work-item-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s var(--ease-out);
  z-index: 3;
  box-shadow: 0 0 0 0 rgba(255, 77, 36, 0.5);
}

.work-item:hover .work-item-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: playPulse 1.5s ease-in-out infinite;
}

@keyframes playPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 36, 0.5); }
  50% { box-shadow: 0 0 0 16px rgba(255, 77, 36, 0); }
}

/* ---------- Writing Preview ---------- */
.writing-preview {
  padding: var(--section-gap) 0;
}

.writing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
  gap: 2rem;
  flex-wrap: wrap;
}

.writing-header h2 {
  max-width: 600px;
}

.writing-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s, color 0.3s;
  white-space: nowrap;
}

.writing-link:hover {
  gap: 1rem;
  color: var(--accent);
}

.article-list {
  display: flex;
  flex-direction: column;
}

.article-row {
  display: grid;
  grid-template-columns: 80px 1fr 200px 60px;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  transition: padding 0.3s;
  position: relative;
  cursor: none;
}

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

.article-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--ink-soft);
  z-index: -1;
  transition: width 0.4s var(--ease-out);
}

.article-row:hover::before {
  width: 100%;
}

.article-row:hover {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.article-row-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--bone-faint);
  transition: color 0.3s;
}

.article-row:hover .article-row-num {
  color: var(--accent);
}

.article-row-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  color: var(--bone);
  line-height: 1.3;
  font-variation-settings: "opsz" 48, "SOFT" 30;
  transition: color 0.3s;
}

.article-row:hover .article-row-title {
  color: var(--accent);
}

.article-row-cat {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone-dim);
  transition: color 0.3s;
}

.article-row:hover .article-row-cat {
  color: var(--bone);
}

.article-row-arrow {
  font-size: 1.2rem;
  color: var(--bone-faint);
  transition: color 0.3s var(--ease-out), transform 0.4s var(--ease-out);
  text-align: right;
}

.article-row:hover .article-row-arrow {
  color: var(--accent);
  transform: translateX(12px);
}

/* ---------- Contact ---------- */
.contact {
  padding: var(--section-gap) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-eyebrow {
  margin-bottom: 2rem;
}

.contact-title {
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 3rem;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}

.contact-title .italic {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

.contact-email {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  color: var(--bone);
  display: inline-block;
  position: relative;
  margin-bottom: 3rem;
  font-variation-settings: "opsz" 96, "SOFT" 30;
  transition: letter-spacing 0.4s var(--ease-out), color 0.3s;
}

.contact-email:hover {
  letter-spacing: 0.02em;
  color: var(--accent);
}

.contact-email::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-out);
}

.contact-email:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.contact-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  border: 1px solid var(--accent);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bone);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
  z-index: -1;
}

.btn-primary:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

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

.btn-ghost {
  background: transparent;
  color: var(--bone);
  border: 1px solid var(--line-strong);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink-soft);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
  z-index: -1;
}

.btn-ghost:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

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

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 3rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform 1.2s var(--ease-out);
}

.footer.in::before {
  transform: scaleX(1);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--bone-dim);
  font-variation-settings: "opsz" 48, "SOFT" 30;
}

.footer-social {
  display: flex;
  gap: 2rem;
}

.footer-social a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone-faint);
  transition: color 0.3s;
}

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

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--bone-faint);
}

/* ---------- Page Header (subpages) ---------- */
.page-header {
  padding: 10rem var(--gutter) 5rem;
  position: relative;
  overflow: hidden;
}

.page-header-eyebrow {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.page-header-eyebrow .line {
  width: 3rem;
  height: 1px;
  background: var(--accent);
}

.page-header h1 {
  font-size: clamp(2.5rem, 7vw, 6rem);
  line-height: 0.95;
  margin-bottom: 2rem;
  max-width: 1000px;
}

.page-header h1 .italic {
  font-style: italic;
  color: var(--accent);
}

.page-header-sub {
  max-width: 540px;
  font-size: 1.1rem;
  color: var(--bone-dim);
}

.page-header-back {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  transition: color 0.3s, gap 0.3s;
}

.page-header-back:hover {
  color: var(--accent);
  gap: 1rem;
}

/* ---------- Gallery (editing pages) ---------- */
.gallery {
  padding: 3rem var(--gutter) var(--section-gap);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  max-width: 1600px;
  margin: 0 auto;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink-soft);
  cursor: none;
  aspect-ratio: 16 / 10;
}

.gallery-card video,
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out), filter 0.4s;
  filter: brightness(0.75) saturate(0.9);
}

.gallery-card:hover video,
.gallery-card:hover img {
  transform: scale(1.06);
  filter: brightness(0.95) saturate(1.1);
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.25rem, 2vw, 2rem);
  background: linear-gradient(
    to top,
    rgba(12, 11, 9, 0.95) 0%,
    transparent 50%
  );
  z-index: 2;
  pointer-events: none;
}

.gallery-card-tag,
.gallery-card-title {
  transform: translateY(8px);
  opacity: 0.85;
  transition: transform 0.4s var(--ease-out), opacity 0.4s;
}

.gallery-card:hover .gallery-card-tag,
.gallery-card:hover .gallery-card-title {
  transform: translateY(0);
  opacity: 1;
}

.gallery-card-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.gallery-card-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--bone);
  line-height: 1.3;
  font-variation-settings: "opsz" 48, "SOFT" 30;
}

.gallery-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s var(--ease-out);
  z-index: 3;
  pointer-events: none;
}

.gallery-card:hover .gallery-card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(12, 11, 9, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  position: relative;
  transform: scale(0.92);
  transition: transform 0.5s var(--ease-out);
}

.lightbox.open .lightbox-content {
  transform: scale(1);
}

.lightbox-content video,
.lightbox-content img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius);
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--bone);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
  z-index: 10002;
}

.lightbox-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: rotate(90deg);
}

/* ---------- Article Page ---------- */
.article-hero {
  padding: 10rem var(--gutter) 3rem;
}

.article-hero .container-narrow {
  text-align: left;
}

.article-hero .eyebrow {
  margin-bottom: 1rem;
  color: var(--accent);
}

.article-hero .meta-date {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone-faint);
  margin-bottom: 1.5rem;
}

.article-hero h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.article-hero-sub {
  font-size: 1.15rem;
  color: var(--bone-dim);
  max-width: 600px;
}

.article-body {
  padding: 3rem var(--gutter) var(--section-gap);
}

.article-body .container-narrow article p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--bone-dim);
  margin-bottom: 1.5rem;
}

.article-body .container-narrow article > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.5em;
  line-height: 0.8;
  float: left;
  margin: 0.1em 0.1em 0 0;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

.article-body .container-narrow article > p:first-of-type {
  color: var(--bone);
}

.article-body .container-narrow article h3 {
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  margin: 2.5rem 0 1rem;
  color: var(--bone);
  font-variation-settings: "opsz" 48, "SOFT" 30;
  position: relative;
  padding-left: 1.5rem;
}

.article-body .container-narrow article h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 1rem;
  height: 2px;
  background: var(--accent);
}

.article-body .container-narrow article blockquote {
  margin: 2rem 0;
  padding: 1.5rem 0 1.5rem 2rem;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--bone);
  font-style: italic;
  font-variation-settings: "opsz" 96, "SOFT" 50;
}

.article-body .container-narrow article ul.article-list {
  margin: 1.5rem 0;
  padding-left: 0;
}

.article-body .container-narrow article ul.article-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
  color: var(--bone-dim);
  font-size: 1.05rem;
  line-height: 1.7;
}

.article-body .container-narrow article ul.article-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.article-body .container-narrow article ul.article-list li strong {
  color: var(--bone);
}

.article-body .container-narrow article table.article-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article-body .container-narrow article table.article-table th,
.article-body .container-narrow article table.article-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.article-body .container-narrow article table.article-table th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

.article-body .container-narrow article table.article-table td {
  color: var(--bone-dim);
}

.article-body .container-narrow article table.article-table td:first-child {
  color: var(--bone);
}

.article-footer {
  border-top: 1px solid var(--line);
  padding: 3rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  max-width: 860px;
  margin: 0 auto;
}

.article-footer-back,
.article-footer-share {
  font-size: 0.7rem;
}

.article-footer-back {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s, color 0.3s;
}

.article-footer-back:hover {
  gap: 1rem;
  color: var(--accent);
}

.article-footer-share {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

/* ---------- Reveal Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

body.no-js .reveal {
  opacity: 1;
  transform: none;
}

body.no-js .split-word span {
  transform: none;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.4s;
}

/* ---------- No-Animation Fallback ---------- */
body.no-anim .grain,
body.no-anim .preloader,
body.no-anim .cursor-dot,
body.no-anim .cursor-ring {
  display: none !important;
}

body.no-anim {
  cursor: auto;
}

body.no-anim .reveal,
body.no-anim .hero-eyebrow,
body.no-anim .hero-sub,
body.no-anim .hero-meta,
body.no-anim .hero-scroll {
  opacity: 1 !important;
  transform: none !important;
}

body.no-anim .split-word span {
  transform: none !important;
}

body.no-anim .marquee-track {
  animation: none;
}

/* ---------- Process Section ---------- */
.process {
  padding: var(--section-gap) 0;
}

.process-header {
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.process-header .eyebrow {
  margin-bottom: 1rem;
}

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.process-step {
  display: grid;
  grid-template-columns: 80px 1fr 2fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(2rem, 4vw, 3.5rem) 0;
  border-top: 1px solid var(--line);
  align-items: start;
  position: relative;
  transition: padding-left 0.4s var(--ease-out);
}

.process-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease-out);
}

.process-step:hover {
  padding-left: 1.5rem;
}

.process-step:hover::before {
  width: 1rem;
}

.process-step:last-child {
  border-bottom: 1px solid var(--line);
}

.process-step-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.process-step-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  color: var(--bone);
  line-height: 1.2;
  font-variation-settings: "opsz" 48, "SOFT" 30;
}

.process-step-desc {
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  line-height: 1.7;
  color: var(--bone-dim);
}

/* ---------- Contact Background Text ---------- */
.contact-bg-text {
  position: absolute;
  bottom: -5vw;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 22vw;
  font-weight: 400;
  line-height: 0.8;
  color: var(--ink-soft);
  pointer-events: none;
  z-index: 0;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  white-space: nowrap;
  user-select: none;
}

.contact .container {
  position: relative;
  z-index: 1;
}

/* ---------- Print Styles ---------- */
@media print {
  .grain,
  .vignette,
  .cursor-dot,
  .cursor-ring,
  .preloader,
  .scroll-progress,
  .reading-progress,
  .back-to-top,
  .nav,
  .hero-scroll,
  .marquee {
    display: none !important;
  }
  
  body {
    background: #fff;
    color: #000;
    cursor: auto;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
}

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

/* ---- Large tablet / small desktop (≤1024px) ---- */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-label {
    position: static;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .work-item.large,
  .work-item.wide {
    grid-column: span 12;
  }

  .work-item.medium,
  .work-item.small {
    grid-column: span 6;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .services-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .writing-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---- Tablet (≤768px) ---- */
@media (max-width: 768px) {
  body {
    cursor: auto;
  }

  .cursor-dot,
  .cursor-ring {
    display: none;
  }

  .back-to-top {
    cursor: pointer;
  }

  /* Navigation */
  .nav {
    padding: 1rem var(--gutter);
  }

  .nav.scrolled {
    padding: 0.75rem var(--gutter);
  }

  .nav-brand {
    font-size: 1.25rem;
  }

  .nav-links {
    display: none;
  }

  .nav-burger {
    display: flex;
  }

  .nav-burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-burger.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .nav-links.open {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--ink);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    z-index: 99;
    padding: 2rem;
  }

  .nav-links.open .nav-link {
    font-size: 1.75rem;
    font-family: var(--font-display);
    letter-spacing: 0;
    text-transform: none;
    padding: 0.5rem 1rem;
  }

  .nav-links.open .nav-cta {
    font-size: 1rem;
    padding: 0.75rem 2rem;
  }

  /* Hero */
  .hero {
    min-height: 100svh;
    padding: 7rem var(--gutter) 3rem;
  }

  .hero-bg-text {
    font-size: 35vw;
    bottom: -3vw;
  }

  .hero-meta {
    gap: 1.5rem;
  }

  .hero-meta-item .value {
    font-size: 1rem;
  }

  .hero-scroll {
    display: none;
  }

  /* Marquee */
  .marquee {
    padding: 1rem 0;
  }

  .marquee-item {
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    gap: 2rem;
  }

  /* About */
  .about-text {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
  }

  .stat {
    padding: 1.75rem 1.25rem;
  }

  .stat-number {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  /* Services */
  .service-cards {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: auto;
    padding: 2rem;
  }

  .service-card-body p {
    max-width: 100%;
  }

  /* Process */
  .process-step {
    grid-template-columns: 60px 1fr;
    gap: 1rem;
  }

  .process-step-desc {
    grid-column: 1 / -1;
  }

  /* Work */
  .work-item.large,
  .work-item.wide,
  .work-item.medium,
  .work-item.small {
    grid-column: span 12;
    aspect-ratio: 16 / 10;
  }

  .work-item-play {
    width: 48px;
    height: 48px;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  /* Article rows */
  .article-row {
    grid-template-columns: 40px 1fr 40px;
    gap: 1rem;
    padding: 1.5rem 0;
  }

  .article-row-cat {
    display: none;
  }

  .article-row:hover {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Contact */
  .contact-bg-text {
    font-size: 30vw;
    bottom: -8vw;
  }

  .contact-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .btn {
    justify-content: center;
    padding: 1rem 1.5rem;
  }

  /* Footer */
  .footer {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 2rem var(--gutter);
  }

  .footer-social {
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Page header */
  .page-header {
    padding: 7rem var(--gutter) 3rem;
  }

  .page-header h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
  }

  .page-header-sub {
    font-size: 1rem;
  }

  /* Article pages */
  .article-hero {
    padding: 7rem var(--gutter) 2rem;
  }

  .article-hero h1 {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .article-hero-sub {
    font-size: 1rem;
  }

  .article-body .container-narrow article p {
    font-size: 1rem;
    line-height: 1.75;
  }

  .article-body .container-narrow article h3 {
    font-size: 1.3rem;
  }

  .article-body .container-narrow article ul.article-list li {
    font-size: 1rem;
  }

  .article-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    text-align: left;
  }

  /* Lightbox */
  .lightbox {
    padding: 1rem;
  }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }

  .lightbox-content {
    max-width: 95vw;
    max-height: 80vh;
  }

  .lightbox-content video,
  .lightbox-content img {
    max-width: 95vw;
    max-height: 80vh;
  }
}

/* ---- Small mobile (≤480px) ---- */
@media (max-width: 480px) {
  :root {
    --gutter: 1.25rem;
  }

  /* Hero */
  .hero {
    padding: 6rem var(--gutter) 2rem;
  }

  .hero-bg-text {
    font-size: 42vw;
  }

  .hero-eyebrow {
    gap: 0.75rem;
  }

  .hero-eyebrow .line {
    width: 2rem;
  }

  .hero-eyebrow .eyebrow {
    font-size: 0.6rem;
  }

  .hero-sub {
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }

  .hero-meta {
    gap: 1.25rem;
  }

  .hero-meta-item .label {
    font-size: 0.55rem;
  }

  /* Stats */
  .stats {
    grid-template-columns: 1fr;
  }

  .stat {
    padding: 1.5rem 1rem;
  }

  /* Services */
  .service-card {
    padding: 1.5rem;
  }

  .service-card-icon {
    width: 40px;
    height: 40px;
  }

  .service-card-body h3 {
    font-size: 1.5rem;
  }

  /* Process */
  .process-step {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1.5rem 0;
  }

  .process-step-num {
    font-size: 0.7rem;
  }

  .process-step-title {
    font-size: 1.25rem;
  }

  /* Work */
  .work-item.large,
  .work-item.wide,
  .work-item.medium,
  .work-item.small {
    aspect-ratio: 4 / 3;
  }

  .work-item-play {
    width: 40px;
    height: 40px;
  }

  .work-item-play svg {
    width: 14px;
    height: 14px;
  }

  /* Gallery */
  .gallery-card-play {
    width: 44px;
    height: 44px;
  }

  .gallery-card-play svg {
    width: 14px;
    height: 14px;
  }

  /* Article rows */
  .article-row {
    grid-template-columns: 32px 1fr 32px;
    gap: 0.75rem;
    padding: 1.25rem 0;
  }

  .article-row-num {
    font-size: 0.65rem;
  }

  .article-row-title {
    font-size: 1rem;
  }

  .article-row:hover {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  /* Contact */
  .contact-title {
    font-size: clamp(2.25rem, 12vw, 3.5rem);
  }

  .contact-email {
    font-size: clamp(1.1rem, 5vw, 1.5rem);
    word-break: break-all;
  }

  .contact-bg-text {
    font-size: 38vw;
    bottom: -10vw;
  }

  /* Footer */
  .footer-brand {
    font-size: 1rem;
  }

  .footer-social {
    gap: 1rem;
    font-size: 0.65rem;
  }

  .footer-social a {
    font-size: 0.65rem;
  }

  /* Page header */
  .page-header {
    padding: 6rem var(--gutter) 2rem;
  }

  .page-header h1 {
    font-size: clamp(1.75rem, 9vw, 2.5rem);
  }

  /* Article */
  .article-hero {
    padding: 6rem var(--gutter) 1.5rem;
  }

  .article-hero h1 {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .article-body {
    padding: 2rem var(--gutter) 4rem;
  }

  .article-body .container-narrow article p {
    font-size: 0.95rem;
  }

  .article-body .container-narrow article table.article-table th,
  .article-body .container-narrow article table.article-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }

  /* Lightbox */
  .lightbox-close {
    width: 36px;
    height: 36px;
  }

  /* Back to top */
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }
}

/* ---- Extra small mobile (≤360px) ---- */
@media (max-width: 360px) {
  :root {
    --gutter: 1rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-meta {
    gap: 1rem;
  }

  .contact-title {
    font-size: 2rem;
  }

  .contact-email {
    font-size: 1rem;
  }

  .article-row {
    grid-template-columns: 28px 1fr 28px;
    gap: 0.5rem;
  }
}

/* ---- Landscape mobile ---- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 100svh;
    padding: 5rem var(--gutter) 2rem;
    justify-content: center;
  }

  .hero-scroll {
    display: none;
  }

  .page-header {
    padding: 5rem var(--gutter) 2rem;
  }

  .article-hero {
    padding: 5rem var(--gutter) 1.5rem;
  }
}

/* ---- Safe area insets (notched phones) ---- */
@supports (padding: env(safe-area-inset-bottom)) {
  .nav {
    padding-top: max(1rem, env(safe-area-inset-top));
  }

  .footer {
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }

  .back-to-top {
    bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .lightbox-close {
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
  }
}

[id] {
  scroll-margin-top: 5rem;
}

/* ---------- Mobile Menu Animation ---------- */
.nav-links.open .nav-link,
.nav-links.open .nav-cta {
  opacity: 0;
  transform: translateY(20px);
  animation: menuLinkIn 0.5s var(--ease-out) forwards;
}

.nav-links.open .nav-link:nth-child(1) { animation-delay: 0.1s; }
.nav-links.open .nav-link:nth-child(2) { animation-delay: 0.18s; }
.nav-links.open .nav-link:nth-child(3) { animation-delay: 0.26s; }
.nav-links.open .nav-link:nth-child(4) { animation-delay: 0.34s; }
.nav-links.open .nav-cta { animation-delay: 0.42s; }

@keyframes menuLinkIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Touch Target Sizing ---------- */
@media (max-width: 768px) {
  .nav-link,
  .nav-cta,
  .back-to-top,
  .lightbox-close,
  .btn,
  .footer-social a {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
  }

  .nav-burger {
    min-width: 44px;
    min-height: 44px;
  }

  .article-row {
    min-height: 60px;
  }
}

/* ---------- Reading Time Badge ---------- */
.reading-time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone-faint);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.reading-time::before {
  content: "○";
  font-size: 0.5em;
  color: var(--accent);
}

/* ---------- Article Nav (prev/next) ---------- */
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 2rem var(--gutter);
  max-width: 860px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.article-nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bone-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s, gap 0.3s;
}

.article-nav a:hover {
  color: var(--accent);
  gap: 1rem;
}

/* ---------- Mobile Performance ---------- */
@media (max-width: 768px) {
  .grain {
    display: none;
  }

  .vignette {
    display: none;
  }

  .hero-bg-text {
    animation: none;
  }

  .contact-bg-text {
    display: none;
  }

  .nav.scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

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

  .grain,
  .vignette,
  .hero-bg-text,
  .contact-bg-text,
  .marquee-track {
    animation: none !important;
  }

  .reveal,
  .reveal-clip {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}
