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

:root {
  --bg: #050505;
  --surface: rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.2);
  --text-primary: #f0f0f0;
  --text-secondary: rgba(240,240,240,0.5);
  --text-tertiary: rgba(240,240,240,0.25);
  --accent: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: none;
}

/* ─── Cursor ─── */
.cursor { position: fixed; pointer-events: none; z-index: 9999; mix-blend-mode: difference; }
.cursor-dot {
  width: 8px; height: 8px; background: #fff; border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.15s, height 0.15s, opacity 0.15s;
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.6); border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.16,1,0.3,1), height 0.3s cubic-bezier(0.16,1,0.3,1), opacity 0.3s;
}
body.cursor-hover .cursor-ring { width: 56px; height: 56px; opacity: 0.4; }
body.cursor-hover .cursor-dot  { width: 4px; height: 4px; opacity: 0.6; }

/* ─── Noise overlay ─── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025; pointer-events: none; z-index: 1;
}

/* ─── Gradient orbs ─── */
.orb {
  position: fixed; border-radius: 50%; filter: blur(120px);
  pointer-events: none; z-index: 0;
  animation: orbDrift 20s ease-in-out infinite alternate;
}
.orb-1 { width: 600px; height: 600px; background: rgba(255,255,255,0.03); top: -200px; right: -100px; animation-duration: 25s; }
.orb-2 { width: 400px; height: 400px; background: rgba(255,255,255,0.025); bottom: 0; left: -100px; animation-duration: 18s; animation-delay: -8s; }
.orb-3 { width: 300px; height: 300px; background: rgba(255,255,255,0.02); top: 40%; left: 40%; animation-duration: 30s; animation-delay: -15s; }

@keyframes orbDrift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(40px, -30px) scale(1.05); }
  66%  { transform: translate(-20px, 40px) scale(0.95); }
  100% { transform: translate(30px, 20px) scale(1.02); }
}

/* ─── Layout ─── */
.app { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; }

/* ─── Header ─── */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 48px; height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s, backdrop-filter 0.3s;
}
header.scrolled {
  border-color: var(--border);
  background: rgba(5,5,5,0.8);
  backdrop-filter: blur(20px);
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 18px; letter-spacing: -0.5px;
  color: var(--text-primary); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.logo-mark {
  width: 28px; height: 28px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,0.05);
}

/* ─── Skills & Focus Section ─── */
.skills-focus {
  margin: 80px 0 100px 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin:32px;

  
}

.skill-item {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  transition: background 0.3s, border-color 0.3s;
}

.skill-item:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--border-hover);
}

.skill-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.skill-value {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
}

nav { display: flex; gap: 4px; }
.nav-tab {
  position: relative; padding: 8px 18px; border-radius: 8px;
  border: none; background: transparent; color: var(--text-secondary);
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 450;
  letter-spacing: 0.01em; cursor: none; text-decoration: none;
  transition: color 0.2s; display: inline-flex; align-items: center;
  overflow: hidden;
}
.nav-tab::before {
  content: ''; position: absolute; inset: 0; background: var(--surface);
  border-radius: 8px; opacity: 0; transition: opacity 0.2s;
}
.nav-tab:hover { color: var(--text-primary); }
.nav-tab:hover::before { opacity: 1; }
.nav-tab.active { color: var(--text-primary); }
.nav-tab.active::before { opacity: 1; background: rgba(255,255,255,0.08); }
.nav-tab-indicator {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: #fff;
  opacity: 0; transition: opacity 0.2s;
}
.nav-tab.active .nav-tab-indicator { opacity: 1; }

.header-cta {
  padding: 9px 20px; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--text-primary);
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  cursor: none; transition: background 0.2s, border-color 0.2s;
}
.header-cta:hover { background: var(--surface); border-color: var(--border-hover); }

main { flex: 1; padding-top: 72px; }

/* ─── Page enter animation ─── */
.page-content {
  animation: pageIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Scroll reveal ─── */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.16,1,0.3,1), transform 0.5s cubic-bezier(0.16,1,0.3,1);
  will-change: opacity, transform;
}
.reveal.visible { 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; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ─── Shared buttons ─── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 10px;
  background: #fff; color: #000;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  text-decoration: none; border: none; cursor: none;
  transition: transform 0.2s, box-shadow 0.2s; position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(255,255,255,0.15); }
.btn-primary:hover::after { opacity: 1; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px; border: 1px solid var(--border);
  color: var(--text-secondary); font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 500; text-decoration: none; background: transparent;
  cursor: none; transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text-primary); background: var(--surface); }

/* ─── Footer ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 48px;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 2;
}
.footer-copy { font-size: 13px; color: var(--text-tertiary); }
.footer-right { display: flex; gap: 24px; }
.footer-link {
  font-size: 13px; color: var(--text-tertiary);
  text-decoration: none; cursor: none; transition: color 0.2s;
}
.footer-link:hover { color: var(--text-secondary); }

/* ─── PROJECTS PAGE ─── */
.hero { padding: 100px 48px 80px; max-width: 1200px; margin: 0 auto; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 28px;
}
.hero-eyebrow-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.25); }

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(52px, 7vw, 96px); font-weight: 600;
  line-height: 1.0; letter-spacing: -0.04em; color: var(--text-primary); margin-bottom: 28px;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line-inner {
  display: block;
  animation: lineUp 0.8s cubic-bezier(0.16,1,0.3,1) both;
}
.hero-title .line:nth-child(2) .line-inner { animation-delay: 0.07s; }
.hero-title .line:nth-child(3) .line-inner { animation-delay: 0.14s; }
@keyframes lineUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.hero-title .dim { color: var(--text-tertiary); }

.hero-sub {
  max-width: 480px; font-size: 16px; line-height: 1.7; color: var(--text-secondary);
  margin-bottom: 48px; animation: fadeUp 0.8s 0.3s cubic-bezier(0.16,1,0.3,1) both;
}
.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  animation: fadeUp 0.8s 0.4s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stats-row {
  max-width: 1200px; margin: 0 auto; padding: 0 48px 72px;
  display: flex; gap: 1px; border-top: 1px solid var(--border);
  animation: fadeUp 0.8s 0.5s cubic-bezier(0.16,1,0.3,1) both;
}
.stat-item {
  flex: 1; padding: 32px 32px 32px 0;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; padding-right: 0; }
.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 42px; font-weight: 600; letter-spacing: -0.04em;
  color: var(--text-primary); line-height: 1; margin-bottom: 8px;
}
.stat-label { font-size: 13px; color: var(--text-tertiary); letter-spacing: 0.02em; }

.marquee-wrap {
  overflow: hidden; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 16px 0; margin-bottom: 80px;
}
.marquee-track {
  display: flex; gap: 48px; white-space: nowrap;
  animation: marquee 20s linear infinite;
}
.marquee-item {
  font-family: 'Space Grotesk', sans-serif; font-size: 13px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary);
  flex-shrink: 0; display: flex; align-items: center; gap: 48px;
}
.marquee-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--text-tertiary); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.section { padding: 0 48px 100px; max-width: 1200px; margin: 0 auto; }
.section-header {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 36px;
}
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 600; letter-spacing: -0.03em;
}
.section-link {
  font-size: 13px; color: var(--text-tertiary); text-decoration: none;
  display: flex; align-items: center; gap: 6px; transition: color 0.2s; cursor: none;
}
.section-link:hover { color: var(--text-primary); }

.projects-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px;
}
.project-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
  text-decoration: none; color: inherit; cursor: none;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative; display: flex; flex-direction: column;
}
.project-card:hover {
  border-color: var(--border-hover); transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.project-card:hover::before { opacity: 1; }

.col-8 { grid-column: span 8; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-12 { grid-column: span 12; }

.project-visual {
  width: 100%; aspect-ratio: 16/9;
  background: rgba(255,255,255,0.03);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.col-4 .project-visual { aspect-ratio: 4/3; }

.vis-1 { background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 60%), radial-gradient(ellipse at 70% 30%, rgba(255,255,255,0.05) 0%, transparent 50%); }
.vis-2 { background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 50%, rgba(255,255,255,0.03) 100%); }
.vis-3 { background: conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(255,255,255,0.05) 90deg, transparent 180deg, rgba(255,255,255,0.03) 270deg, transparent 360deg); }
.vis-4 { background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.07) 0%, transparent 70%); }
.vis-5 { background: repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 20px); }

.project-visual-label {
  position: relative; z-index: 1;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 64px; font-weight: 700; letter-spacing: -0.05em;
  color: rgba(255,255,255,0.06); user-select: none;
}
.col-4 .project-visual-label { font-size: 40px; }

.project-info { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.project-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.project-tag {
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-tertiary);
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 100px;
}
.project-year { font-size: 12px; color: var(--text-tertiary); margin-left: auto; }
.project-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px; font-weight: 600; letter-spacing: -0.03em;
  color: var(--text-primary); margin-bottom: 8px;
}
.col-8 .project-name { font-size: 24px; }
.project-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; flex: 1; }
.project-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-tertiary); margin-top: 20px;
  transition: color 0.2s, gap 0.2s;
}
.project-card:hover .project-arrow { color: var(--text-primary); gap: 10px; }

/* ─── RESEARCH PAGE ─── */
.research-hero { padding: 100px 48px 60px; max-width: 1200px; margin: 0 auto; }
.research-grid {
  padding: 0 48px 100px; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.research-card {
  padding: 36px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); cursor: none;
  transition: border-color 0.3s, transform 0.3s, background 0.3s;
  position: relative; overflow: hidden;
}
.research-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,0.04), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.research-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.research-card:hover::after { opacity: 1; }
.research-card.featured { grid-column: span 2; padding: 48px; }

.research-num {
  font-family: 'Space Grotesk', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; color: var(--text-tertiary); text-transform: uppercase; margin-bottom: 20px;
}
.research-title {
  font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 600;
  letter-spacing: -0.03em; color: var(--text-primary); margin-bottom: 12px; line-height: 1.3;
}
.research-card.featured .research-title { font-size: 32px; max-width: 600px; }
.research-abstract { font-size: 14px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 24px; }
.research-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.research-tag {
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-tertiary); padding: 5px 12px;
  border: 1px solid var(--border); border-radius: 100px;
}
.research-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-tertiary); }
.status-dot {
  width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.3);
  animation: pulse 2s ease-in-out infinite;
}
.status-dot.active { background: #a0ffa0; box-shadow: 0 0 8px rgba(160,255,160,0.4); }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.progress-bar { height: 2px; background: var(--border); border-radius: 2px; margin-top: 20px; overflow: hidden; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0.4), rgba(255,255,255,0.15));
  border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1) 0.1s;
}
.research-card:hover .progress-fill { transform: scaleX(1); }

/* ─── CONTACT PAGE ─── */
.contact-wrap {
  padding: 100px 48px; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start;
}
.contact-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 20px;
}
.contact-headline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(36px, 4vw, 56px); font-weight: 600;
  letter-spacing: -0.04em; line-height: 1.1; margin-bottom: 24px;
}
.contact-body { font-size: 16px; line-height: 1.7; color: var(--text-secondary); margin-bottom: 48px; }

.contact-links { display: flex; flex-direction: column; gap: 4px; }
.contact-link-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text-secondary); cursor: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s;
}
.contact-link-item:hover {
  border-color: var(--border-hover); color: var(--text-primary);
  background: var(--surface); transform: translateX(4px);
}
.contact-link-label { font-size: 14px; font-weight: 500; }
.contact-link-handle { font-size: 13px; color: var(--text-tertiary); }
.contact-link-arrow { font-size: 16px; transition: transform 0.2s; }
.contact-link-item:hover .contact-link-arrow { transform: translate(3px, -3px); }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--text-tertiary); }
.form-input, .form-textarea {
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-family: 'Inter', sans-serif; font-size: 14px; outline: none; resize: none;
  transition: border-color 0.2s, background 0.2s;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-tertiary); }
.form-input:focus, .form-textarea:focus {
  border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.06);
}
.form-textarea { min-height: 140px; }
.form-submit {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px; background: #fff; color: #000;
  border: none; border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600; cursor: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.form-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,255,255,0.15); }

/* ─── CASE STUDY PAGE ─── */
.cs-wrap { max-width: 1200px; margin: 0 auto; padding: 0 48px 120px; }

.cs-hero {
  padding: 80px 48px 72px;
  max-width: 1200px; margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
.cs-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-tertiary); text-decoration: none; cursor: none;
  margin-bottom: 40px; transition: color 0.2s;
}
.cs-back:hover { color: var(--text-primary); }
.cs-back svg { transition: transform 0.2s; }
.cs-back:hover svg { transform: translateX(-3px); }

.cs-meta-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 24px; flex-wrap: wrap;
}
.cs-tag {
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-tertiary); padding: 5px 12px;
  border: 1px solid var(--border); border-radius: 100px;
}
.cs-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-tertiary); }
.cs-year { font-size: 12px; color: var(--text-tertiary); }

.cs-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(40px, 6vw, 72px); font-weight: 600;
  letter-spacing: -0.04em; line-height: 1.05; color: var(--text-primary);
  margin-bottom: 28px; max-width: 800px;
}
.cs-subtitle {
  font-size: 18px; line-height: 1.7; color: var(--text-secondary);
  max-width: 600px; margin-bottom: 40px;
}

.cs-stats {
  display: flex; gap: 48px; flex-wrap: wrap;
}


/* Hero image */
.cs-cover {
  width: 100%; aspect-ratio: 16/7;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); margin-bottom: 80px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.cs-cover-bg {
  position: absolute; inset: 0;
}
.cs-cover-label {
  position: relative; z-index: 1;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(80px, 14vw, 180px); font-weight: 700; letter-spacing: -0.06em;
  color: rgba(255,255,255,0.04); user-select: none;
}
.cs-cover-badge {
  position: absolute; bottom: 24px; right: 24px;
  background: rgba(255,255,255,0.06); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 18px; font-size: 13px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
}

/* Section divider label */
.cs-section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-tertiary); margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.cs-section-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* Parallel row: image + text side by side */
.cs-parallel {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center; margin-bottom: 80px;
}
.cs-parallel.reverse { direction: rtl; }
.cs-parallel.reverse > * { direction: ltr; }

.cs-parallel-image {
  aspect-ratio: 4/3;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
  position: relative; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.02);
}
.cs-parallel-image-inner {
  position: absolute; inset: 0;
}
.cs-parallel-image-num {
  position: relative; z-index: 1;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 72px; font-weight: 700; letter-spacing: -0.05em;
  color: rgba(255,255,255,0.05); user-select: none;
}

/* Hover shimmer on images */
.cs-parallel-image::before {
  content: ''; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.4s;
}
.cs-parallel-image:hover::before { opacity: 1; }

.cs-parallel-copy {

}
.cs-parallel-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px; font-weight: 600; letter-spacing: -0.03em;
  color: var(--text-primary); margin-bottom: 16px; line-height: 1.2;
}
.cs-parallel-body {
  font-size: 15px; line-height: 1.75; color: var(--text-secondary); margin-bottom: 24px;
}
.cs-parallel-note {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.6; color: var(--text-secondary);
}
.cs-parallel-note-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* Full-width image block */
.cs-full-image {
  width: 100%; aspect-ratio: 16/8;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
  position: relative; display: flex; align-items: center; justify-content: center;
  margin-bottom: 80px; background: rgba(255,255,255,0.02);
}
.cs-full-image-bg { position: absolute; inset: 0; }
.cs-full-image-label {
  position: relative; z-index: 1;
  font-family: 'Space Grotesk', sans-serif; font-size: 120px; font-weight: 700;
  letter-spacing: -0.05em; color: rgba(255,255,255,0.04); user-select: none;
}

/* Metrics row */
.cs-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 80px;
}
.cs-metric {
  padding: 32px 28px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  transition: background 0.2s;
}
.cs-metric:last-child { border-right: none; }
.cs-metric:hover { background: var(--surface-hover); }
.cs-metric-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 40px; font-weight: 600; letter-spacing: -0.04em;
  color: var(--text-primary); line-height: 1; margin-bottom: 8px;
}
.cs-metric-label { font-size: 13px; color: var(--text-tertiary); line-height: 1.5; }

/* Pull quote */
.cs-quote {
  padding: 56px 64px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 80px; position: relative; overflow: hidden;
}
.cs-quote::before {
  content: '"';
  position: absolute; top: -20px; left: 48px;
  font-family: 'Space Grotesk', sans-serif; font-size: 200px; font-weight: 700;
  color: rgba(255,255,255,0.03); line-height: 1; pointer-events: none;
}
.cs-quote-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(22px, 3vw, 32px); font-weight: 500; letter-spacing: -0.02em;
  line-height: 1.4; color: var(--text-primary);
  max-width: 700px; position: relative; z-index: 1; margin-bottom: 24px;
}
.cs-quote-attr {
  font-size: 13px; color: var(--text-tertiary);
  display: flex; align-items: center; gap: 12px;
}
.cs-quote-attr::before { content: ''; width: 24px; height: 1px; background: var(--border); }

/* Next project strip */
.cs-next {
  margin-top: 80px; padding-top: 48px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.cs-next-label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 8px; }
.cs-next-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px; font-weight: 600; letter-spacing: -0.03em; color: var(--text-primary);
}
.cs-next-link {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; cursor: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s, gap 0.2s;
}
.cs-next-link:hover {
  border-color: var(--border-hover); color: var(--text-primary);
  background: var(--surface); gap: 14px;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  header { padding: 0 24px; }
  .hero, .research-hero, .section, .research-grid { padding-left: 24px; padding-right: 24px; }
  .stats-row { padding-left: 24px; padding-right: 24px; }
  .contact-wrap { padding: 60px 24px; grid-template-columns: 1fr; gap: 48px; }
  footer { padding: 24px; }
  .col-8, .col-4, .col-6 { grid-column: span 12; }
  .research-grid { grid-template-columns: 1fr; padding-left: 24px; padding-right: 24px; }
  .research-card.featured { grid-column: span 1; }
  .form-row { grid-template-columns: 1fr; }
  .stats-row { flex-direction: column; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); padding: 24px 0; }
  .stat-item:last-child { border-bottom: none; }
  .cs-hero, .cs-wrap { padding-left: 24px; padding-right: 24px; }
  .cs-parallel { grid-template-columns: 1fr; gap: 28px; }
  .cs-parallel.reverse { direction: ltr; }
  .cs-metrics { grid-template-columns: 1fr 1fr; }
  .cs-metric { border-bottom: 1px solid var(--border); }
  .cs-quote { padding: 36px 28px; }
  .cs-next { flex-direction: column; align-items: flex-start; gap: 24px; }
  .cs-stats { gap: 28px; }
}
@media (max-width: 600px) {
  .hero-title { font-size: 40px; }
  .header-cta { display: none; }
  nav { gap: 2px; }
  .nav-tab { padding: 7px 12px; font-size: 13px; }
}

/* ─── Code panels (Merci case study) ─── */
.cs-parallel-image.cs-code {
  aspect-ratio: auto; display: block; align-self: stretch;
  padding: 24px; overflow-x: auto;
}
.cs-code-file {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-tertiary); margin-bottom: 16px;
}
.cs-code pre {
  margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.7; color: var(--text-secondary); white-space: pre;
}
.cs-code .c { color: var(--text-tertiary); }
.cs-code .k { color: var(--text-primary); }
.cs-links { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .cs-parallel-image.cs-code { padding: 18px; }
  .cs-code pre { font-size: 11px; }
}

/* ─── Real screens in case study image slots ─── */
.cs-shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-wip {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 28px; padding: 16px 20px; max-width: 720px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 14px; line-height: 1.6; color: var(--text-secondary);
}
.cs-wip strong { color: var(--text-primary); font-weight: 600; }
.cs-wip .status-dot { margin-top: 7px; flex-shrink: 0; }
.cs-caption { font-size: 12px; color: var(--text-tertiary); margin-top: -8px; margin-bottom: 8px; }
.project-tag.wip { color: var(--text-secondary); border-color: var(--border-hover); }

/* ─── Mobile & touch polish ─── */

/* Cursor stays hidden until a real mouse moves */
.cursor { opacity: 0; transition: opacity 0.2s; }
body.has-mouse .cursor { opacity: 1; }

/* Custom cursor only on real mouse devices */
@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  .cursor { display: none; }
  .nav-tab, .header-cta, .btn-primary, .btn-ghost, .footer-link, .section-link,
  .project-card, .research-card, .contact-link-item, .form-submit,
  .cs-back, .cs-next-link { cursor: pointer; }

  /* No sticky hover lifts after a tap */
  .project-card:hover, .research-card:hover, .btn-primary:hover,
  .form-submit:hover, .contact-link-item:hover { transform: none; box-shadow: none; }
  .project-card:active { transform: scale(0.985); transition: transform 0.15s; }
  .btn-primary:active, .form-submit:active, .btn-ghost:active { transform: scale(0.97); }
}

@media (max-width: 600px) {
  /* Header: keep it from crowding on small phones */
  header { height: 64px; padding: 0 16px; }
  main { padding-top: 64px; }
  .logo { gap: 8px; font-size: 16px; }
  .nav-tab { padding: 10px 11px; }

  /* Tighter vertical rhythm */
  .hero { padding-top: 56px; padding-bottom: 56px; }
  .hero-eyebrow { margin-bottom: 20px; }
  .hero-sub { margin-bottom: 36px; font-size: 15px; }
  .hero-actions { gap: 10px; }
  .hero-actions a { flex: 1 1 140px; justify-content: center; white-space: nowrap; }
  .hero-actions a svg { flex-shrink: 0; }
  .cs-cover + .cs-caption { margin-top: -44px; margin-bottom: 40px; }
  .marquee-wrap { margin-bottom: 56px; }
  .section { padding-bottom: 64px; }
  .research-hero { padding-top: 56px; padding-bottom: 32px; }
  .skills-focus { margin: 0 0 64px; }
  .skills-grid { margin: 0 24px; gap: 12px; grid-template-columns: 1fr; }
  .contact-wrap { padding-top: 48px; }

  /* Project cards */
  .project-info { padding: 20px; }

  /* iOS zooms into inputs under 16px */
  .form-input, .form-textarea { font-size: 16px; }

  /* Case studies */
  .cs-hero { padding-top: 40px; padding-bottom: 48px; }
  .cs-back { margin-bottom: 28px; padding: 6px 0; }
  .cs-subtitle { font-size: 16px; }
  .cs-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; }

  /* Wide shots go edge to edge so the screens are readable */
  .cs-cover, .cs-full-image {
    width: calc(100% + 48px); margin-left: -24px; margin-right: -24px;
    border-radius: 0; border-left: none; border-right: none;
    margin-bottom: 56px;
  }
  .cs-cover { margin-top: 40px; }
  .cs-cover-badge { bottom: 10px; right: 10px; padding: 7px 11px; font-size: 11px; }
  .cs-parallel, .cs-metrics, .cs-quote { margin-bottom: 56px; }
  .cs-parallel-heading { font-size: 24px; }
  .cs-next { margin-top: 56px; }
  .cs-next-link { width: 100%; justify-content: center; }

  /* Bigger tap targets in footer */
  footer { flex-direction: column; gap: 12px; align-items: flex-start; }
  .footer-link { padding: 8px 0; display: inline-block; }

  /* Lighter background effects on phones */
  .orb { filter: blur(80px); }
  .orb-1 { width: 360px; height: 360px; }
  .orb-3 { display: none; }
}

@media (max-width: 360px) {
  .logo-text { display: none; }
  .hero-title { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
