:root {
  --bg: #f5f4ef; /* Editorial cream/off-white */
  --bg-alt: #ffffff;
  --text: #111111; /* Stark black */
  --text-dim: #4a4a4a;
  --text-faint: #777777;
  --accent: #d85c34; /* Warm burnt orange */
  --line: #111111; /* Solid black brutalist lines */
  --line-soft: rgba(0,0,0,0.1);
}
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  animation: pageFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
::selection { background: var(--text); color: var(--bg); }

/* Keyboard Accessibility */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Typography ---------- */
h1, h2, h3, .logo { font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -0.03em; }
.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px; display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ''; width: 24px; height: 2px; background: var(--accent); }

section { position: relative; padding: 140px 8vw; border-bottom: 2px solid var(--line); }
@media (max-width: 900px) {
  section { padding: 80px 6vw; }
}

/* ---------- Reveal Animation ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scene, .card-3d, .project-modal-content { transition: none !important; animation: none !important; }
}

/* ---------- Nav ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 8vw; background: rgba(245, 244, 239, 0.9); backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line);
}
.logo { font-size: 24px; text-decoration: none; color: var(--text); }
.nav-links { display: flex; gap: 40px; list-style: none; align-items: center; }
.nav-links a {
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--text); text-decoration: none;
  position: relative;
  display: inline-block;
  padding: 4px 8px;
  z-index: 1;
  transition: color 0.2s var(--ease-out-expo);
}
.nav-links a::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--text);
  z-index: -1;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.2s var(--ease-out-expo);
}
.nav-links a:hover {
  color: var(--bg);
}
.nav-links a:hover::before {
  transform: scaleY(1);
}
.nav-links a:hover { color: var(--accent); }

.nav-cv-btn {
  border: 2px solid var(--line);
  padding: 8px 16px;
  font-size: 11px !important;
  background: var(--bg-alt);
  box-shadow: 2px 2px 0 var(--line);
  transition: all 0.1s ease;
}
.nav-cv-btn:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--line);
  background: var(--text);
  color: var(--bg) !important;
}

.mobile-menu-btn { display: none; background: none; border: none; font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; text-transform: uppercase; cursor: pointer; color: var(--text); z-index: 1001; position: relative; }
.mobile-overlay { position: fixed; inset: 0; background: var(--bg); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: clamp(16px, 3.5vh, 28px); z-index: 1000; transform: translateY(-100%); transition: transform 0.4s cubic-bezier(0.85, 0, 0.15, 1); overflow-y: auto; padding: 60px 20px; box-sizing: border-box; }
.mobile-overlay.open { transform: translateY(0); }
.mobile-overlay a { font-family: 'Space Grotesk', sans-serif; font-size: clamp(26px, 4.5vh, 36px); font-weight: 700; text-transform: uppercase; text-decoration: none; color: var(--text); transition: color 0.2s; }

@media (max-width:700px){ 
  .nav-links { display: none; } 
  .mobile-menu-btn { display: block; }
}

/* ---------- Project Modal ---------- */
.project-modal-overlay {
  position: fixed; inset: 0; background: rgba(245, 244, 239, 0.95); z-index: 1000;
  display: flex; justify-content: center; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease; padding: 20px;
}
.project-modal-overlay.open { opacity: 1; pointer-events: auto; }

.project-modal-content {
  background: var(--bg); border: 2px solid var(--text); width: 100%; max-width: 600px;
  padding: 40px; position: relative; box-shadow: 12px 12px 0 var(--text);
  transform: translateY(20px); transition: transform 0.4s ease;
  max-height: 90vh; overflow-y: auto;
}
.project-modal-overlay.open .project-modal-content { transform: translateY(0); }

.project-modal-close {
  position: absolute; top: 20px; right: 20px; background: none; border: none;
  font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700;
  text-transform: uppercase; cursor: pointer; color: var(--text); z-index: 1001;
}

#modalTitle { font-family: 'Space Grotesk', sans-serif; font-size: 32px; font-weight: 700; margin-bottom: 10px; margin-top: 10px;}
#modalStatus { font-family: 'JetBrains Mono', monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: #666; margin-bottom: 24px; border: 1px solid var(--text); padding: 4px 8px; display: inline-block;}
#modalDescription { font-size: 16px; line-height: 1.6; margin-bottom: 30px; }
#modalAction { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; text-transform: uppercase; display: inline-block; background: var(--text); color: var(--bg); padding: 12px 24px; text-decoration: none; border: 2px solid var(--text); transition: all 0.2s; cursor: pointer; }
#modalAction:hover { background: var(--bg); color: var(--text); }

/* ---------- LinkTree Modal ---------- */
.linktree-overlay {
  position: fixed; inset: 0; background: rgba(245, 244, 239, 0.95); z-index: 1000;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.linktree-overlay.open { opacity: 1; pointer-events: auto; }

.linktree-content {
  display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 400px; padding: 20px;
}

.linktree-btn {
  font-family: 'Space Grotesk', sans-serif; font-size: 24px; font-weight: 700; text-transform: uppercase;
  padding: 20px; background: var(--bg); border: 2px solid var(--text); color: var(--text);
  text-decoration: none; text-align: center; display: block;
  box-shadow: 6px 6px 0 var(--text); transition: all 0.2s ease;
  opacity: 0; transform: translateY(20px);
}
.linktree-btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--text); background: var(--text); color: var(--bg); }

.linktree-overlay.open .linktree-btn { animation: staggerUp 0.5s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.linktree-overlay.open .linktree-btn:nth-child(1) { animation-delay: 0.1s; }
.linktree-overlay.open .linktree-btn:nth-child(2) { animation-delay: 0.2s; }
.linktree-overlay.open .linktree-btn:nth-child(3) { animation-delay: 0.3s; }
.linktree-overlay.open .linktree-btn:nth-child(4) { animation-delay: 0.4s; }

@keyframes staggerUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Hero Section (Editorial Split) ---------- */
.hero {
  min-height: 100svh; padding-top: 120px; display: grid; grid-template-columns: 1.2fr 0.8fr;
  align-items: center; gap: 60px;
}
.hero-text h1 { font-size: clamp(48px, 6.5vw, 84px); line-height: 0.95; margin-bottom: 24px; text-transform: uppercase;}
.hero-text p.sub { font-size: 18px; line-height: 1.6; color: var(--text-dim); max-width: 540px; margin-bottom: 30px; }
.hero-caps {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero-image-container { position: relative; width: 100%; aspect-ratio: 4/5; border: 2px solid var(--line); box-shadow: 12px 12px 0px var(--line); overflow: hidden; background: #e0ddd5;}
.hero-image-container img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; filter: contrast(1.02) saturate(1.05); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; margin-top: 20px; padding-bottom: 80px; gap: 40px; padding-top: 100px;}
  .hero-text h1 { font-size: clamp(36px, 10vw, 64px); }
  .hero-image-container { max-width: 320px; margin: 0; order: -1; aspect-ratio: 1/1;}
  .hero-cta { flex-direction: column; width: 100%; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}

/* ---------- Buttons ---------- */
.btn {
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; text-transform: uppercase;
  padding: 16px 28px; border: 2px solid var(--line); text-decoration: none; display: inline-flex; align-items: center; gap: 10px;
  transition: all 0.2s ease; cursor: pointer; background: var(--bg); color: var(--text); box-shadow: 4px 4px 0px var(--line);
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0px var(--line); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); box-shadow: 2px 2px 0px var(--accent); color: #fff;}

/* ---------- Marquee Banner ---------- */
.marquee-wrap {
  width: 100%; overflow: hidden; background: var(--accent); color: #fff;
  padding: 20px 0; border-bottom: 2px solid var(--line); border-top: 2px solid var(--line);
  display: flex; white-space: nowrap; font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
@media (max-width: 700px) {
  .marquee-wrap { font-size: 20px; padding: 14px 0; }
}
.marquee-inner { display: flex; animation: marquee 15s linear infinite; }

.marquee-wrap:hover .marquee-inner {
  animation-duration: 4s; /* Speed up aggressively */
}

.marquee-item { padding: 0 40px; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ---------- Projects ---------- */
.project-section-header {
  display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 60px;
}
@media (max-width: 768px) {
  .project-section-header { flex-direction: column; align-items: flex-start; gap: 20px; }
}
.project-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-top: 40px;
}
@media (max-width: 900px) {
  .project-grid { grid-template-columns: 1fr; gap: 40px; }
}
.project-card {
  background: var(--bg-alt); padding: 40px; border: 2px solid var(--line);
  box-shadow: 8px 8px 0px var(--line); transition: all 0.2s ease;
  display: flex; flex-direction: column; justify-content: space-between;
}
.project-card.flagship {
  grid-column: span 2;
}
@media (min-width: 901px) {
  .project-card.flagship .project-mockup {
    margin-bottom: 40px;
    width: 100%;
    aspect-ratio: 21/9; /* Full width, but ultra-wide aspect ratio to keep height down */
  }
}
@media (max-width: 900px) {
  .project-card.flagship {
    grid-column: span 1;
  }
}
.project-card:hover { transform: translate(-4px, -4px); box-shadow: 12px 12px 0px var(--line); }
.project-card-header {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px;
}
.project-status {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; text-transform: uppercase;
  color: var(--accent); border: 1.5px solid var(--accent); padding: 3px 8px; border-radius: 4px; display: inline-block;
}
.project-card h3 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 12px; }
.project-card p.project-subtitle {
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: var(--text-dim); margin-bottom: 16px; text-transform: uppercase;
}
.project-card p.project-desc { color: var(--text-dim); font-size: 16px; line-height: 1.6; margin-bottom: 24px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.project-tags span {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; text-transform: uppercase;
  border: 1px solid var(--line); padding: 6px 12px; border-radius: 40px; color: var(--text);
}
.project-link {
  font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; color: var(--text); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; border-bottom: 2px solid transparent; padding-bottom: 2px;
}
.project-link:hover { border-bottom-color: var(--text); }

/* Brutalist UI Mockup Placeholders */
.project-mockup {
  background: var(--bg); border: 2px solid var(--line); aspect-ratio: 16/9; margin-bottom: 30px;
  display: flex; flex-direction: column; overflow: hidden; position: relative;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}
.mockup-bar {
  background: var(--text); color: var(--bg); padding: 8px 16px; display: flex; gap: 6px; align-items: center;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; text-transform: uppercase; font-weight: 700;
}
.mockup-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bg); opacity: 0.5; }
.mockup-body {
  flex: 1; padding: 16px; display: flex; flex-direction: column; justify-content: center; align-items: center;
  font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text);
}

/* Custom Mockup Interfaces */
.mockup-shaks-grid {
  display: grid; grid-template-columns: 80px 1fr; width: 100%; height: 100%; gap: 12px;
}
.mockup-shaks-sidebar { border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; padding-right: 8px; }
.mockup-shaks-sidebar div { height: 16px; background: var(--line-soft); border-radius: 2px; }
.mockup-shaks-main { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.mockup-shaks-card { border: 1px solid var(--line); padding: 10px; background: var(--bg-alt); display: flex; flex-direction: column; gap: 4px; box-shadow: 2px 2px 0 var(--line); }
.mockup-shaks-pill { display: inline-block; font-size: 8px; border: 1px solid var(--accent); padding: 2px 4px; color: var(--accent); align-self: flex-start; font-weight: bold;}

.mockup-pitchiq-meter {
  display: flex; align-items: center; gap: 16px; width: 80%; border: 1px solid var(--line); padding: 16px; background: var(--bg-alt); box-shadow: 4px 4px 0 var(--line);
}
.mockup-pitchiq-score { font-size: 32px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; color: var(--accent); }
.mockup-pitchiq-analysis { display: flex; flex-direction: column; gap: 4px; flex: 1; text-align: left;}
.mockup-pitchiq-bar { height: 6px; background: var(--line-soft); position: relative; }
.mockup-pitchiq-bar::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 85%; background: var(--accent); }

.mockup-water-invoice {
  border: 1px solid var(--line); padding: 16px; background: var(--bg-alt); width: 70%; display: flex; flex-direction: column; gap: 8px; text-align: left; box-shadow: 4px 4px 0 var(--line);
}
.mockup-water-line { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line-soft); padding-bottom: 4px; font-size: 10px; }

/* Secondary experiments layout */
.experiments-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 40px;
}
.experiment-card {
  background: var(--bg-alt); border: 2px solid var(--line); padding: 30px; box-shadow: 4px 4px 0 var(--line);
  transition: all 0.2s ease; display: flex; flex-direction: column; justify-content: space-between;
}
.experiment-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--line); }
.experiment-card h4 { font-family: 'Space Grotesk', sans-serif; font-size: 22px; margin-bottom: 8px; }
.experiment-card p { font-size: 14px; line-height: 1.6; color: var(--text-dim); margin-bottom: 20px; }
.experiment-meta { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line-soft); padding-top: 16px; }

/* ---------- Toolkit ---------- */
.toolkit-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-top: 60px;
}
@media (max-width: 900px) {
  .toolkit-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 480px) {
  .toolkit-grid { grid-template-columns: 1fr; gap: 30px; }
}
.toolkit-column h3 { font-size: 20px; border-bottom: 2px solid var(--line); padding-bottom: 12px; margin-bottom: 20px; font-family: 'Space Grotesk', sans-serif;}
.toolkit-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.toolkit-list li { display: flex; align-items: center; gap: 10px; font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; color: var(--text-dim); }
.toolkit-list li::before { content: '✦'; color: var(--accent); }

/* ---------- Operating Principles & Process Flow ---------- */
.resume-wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 80px; margin-top: 60px; }
@media (max-width: 900px) { .resume-wrap { grid-template-columns: 1fr; gap: 40px; } }
.skill-block { margin-bottom: 40px; }
.skill-block h4 { font-size: 20px; margin-bottom: 10px; font-family: 'Space Grotesk', sans-serif;}
.skill-block p { font-size: 15px; color: var(--text-dim); line-height: 1.6; }

.process-timeline {
  margin-top: 80px; border-top: 2px solid var(--line); padding-top: 40px;
}
.process-steps {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; margin-top: 30px;
}
@media (max-width: 900px) {
  .process-steps { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 480px) {
  .process-steps { grid-template-columns: 1fr; gap: 24px; }
}
.process-step { display: flex; flex-direction: column; gap: 8px; }
.process-step-num { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--accent); font-weight: 700; }
.process-step-title { font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 700; }
.process-step-desc { font-size: 13px; color: var(--text-dim); line-height: 1.5; }

/* ---------- Proof / Experience Metrics ---------- */
.proof-section {
  background: var(--bg-alt); padding: 80px 8vw; border-bottom: 2px solid var(--line);
  display: grid; grid-template-columns: 1fr 2fr; gap: 60px;
}
@media (max-width: 900px) {
  .proof-section { grid-template-columns: 1fr; gap: 40px; padding: 60px 6vw; }
}
.proof-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
@media (max-width: 600px) {
  .proof-stats { grid-template-columns: 1fr; gap: 30px; }
}
.proof-stat { border-left: 2px solid var(--line); padding-left: 20px; }
.proof-num { font-family: 'Space Grotesk', sans-serif; font-size: 48px; font-weight: 700; color: var(--accent); line-height: 1; }
.proof-label { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; text-transform: uppercase; margin-top: 8px; }

/* ---------- Resume Card ---------- */
.resume-card {
  background: var(--bg-alt); padding: 48px; border: 2px solid var(--line); box-shadow: 8px 8px 0px var(--line);
}
.resume-card h3 { font-size: 36px; margin-bottom: 12px; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 32px 0; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); padding: 24px 0; }
.stat-num { font-size: 48px; font-weight: 700; font-family: 'Space Grotesk', sans-serif; color: var(--accent); line-height: 1;}
.stat-label { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; text-transform: uppercase; margin-top: 8px; }

/* ---------- Footer ---------- */
footer { padding: 100px 8vw; background: var(--text); color: var(--bg); }
footer h2 { font-size: clamp(32px, 6vw, 64px); line-height: 1.1; margin-bottom: 60px; }
.footer-links-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 40px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 40px;}
@media (max-width: 768px) {
  .footer-links-grid { grid-template-columns: 1fr; gap: 30px; }
}
.footer-col h4 { font-family: 'Space Grotesk', sans-serif; font-size: 18px; margin-bottom: 16px; color: var(--bg); }
.footer-col-links { display: flex; flex-direction: column; gap: 12px; }
.footer-col-links a { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.7); text-decoration: none; text-transform: uppercase; }
.footer-col-links a:hover { color: var(--accent); }
.footer-bottom { margin-top: 80px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-faint); display: flex; justify-content: space-between;}

@media (max-width: 700px) {
  footer { padding: 60px 6vw; }
  .footer-bottom { flex-direction: column; gap: 10px; margin-top: 60px; }
}

/* ---------- 3D Business Card Modal ---------- */
.card-modal-overlay {
  position: fixed; inset: 0; background: rgba(245, 244, 239, 0.95); z-index: 1000;
  display: flex; justify-content: center; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.card-modal-overlay.open { opacity: 1; pointer-events: auto; }

.card-close-btn {
  position: absolute; top: 40px; right: 40px; background: none; border: none;
  font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700;
  text-transform: uppercase; cursor: pointer; color: var(--text); z-index: 1001;
}

.scene { width: 600px; height: 340px; perspective: 1200px; }
@media (max-width: 700px) { .scene { width: 90vw; height: 51vw; } }

.card-3d {
  width: 100%; height: 100%; position: relative;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d; cursor: pointer;
}

.card-3d.flipped { transform: rotateY(180deg); }

.card-face {
  position: absolute; width: 100%; height: 100%; backface-visibility: hidden;
  background: #0a0a0a; color: #fff; border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.1);
  display: flex; flex-direction: column; justify-content: center; overflow: hidden;
}

.card-face::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mouseX, 50%) var(--mouseY, 0%), rgba(255,255,255,0.15), transparent 60%);
  pointer-events: none;
  transition: background 0.1s ease;
}

.card-front { align-items: center; text-align: center; }
.card-front .name { font-family: 'Space Grotesk', sans-serif; font-size: 32px; font-weight: 700; letter-spacing: 0.2em; margin-bottom: 16px; }
.card-front .title { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.3em; color: #aaa; }

.card-back { transform: rotateY(180deg); flex-direction: row; align-items: center; padding: 40px; }
.card-back-left { flex: 1; padding-right: 40px; border-right: 1px solid rgba(255,255,255,0.2); }
.card-back-right { flex: 1; padding-left: 40px; }

.card-back-name { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; letter-spacing: 0.1em; margin-bottom: 30px; }
.card-contact-item { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: #aaa; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

.card-back-right .contact-for { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: #666; margin-bottom: 16px; letter-spacing: 0.1em;}
.card-back-right ul { list-style: none; padding: 0; margin: 0; }
.card-back-right li { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #ddd; margin-bottom: 12px; letter-spacing: 0.05em; }

@media (max-width: 700px) {
  .card-back { padding: 20px; }
  .card-back-left { padding-right: 16px; }
  .card-back-right { padding-left: 16px; }
  .card-front .name { font-size: 20px; }
  .card-back-name { font-size: 14px; margin-bottom: 20px; }
  .card-contact-item, .card-back-right li { font-size: 8px; margin-bottom: 8px;}
}

/* ---------- Chat Widget ---------- */
.chat-toggle-btn {
  position: fixed; bottom: 32px; right: 32px; width: 64px; height: 64px; border-radius: 50%;
  background: var(--text); color: var(--bg); border: none; box-shadow: 4px 4px 0px var(--accent);
  cursor: pointer; z-index: 900; display: flex; justify-content: center; align-items: center;
  transition: all 0.2s ease;
}
.chat-toggle-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0px var(--accent); }

.chat-widget {
  position: fixed; bottom: 110px; right: 32px; width: 340px; background: var(--bg-alt);
  border: 2px solid var(--line); box-shadow: 8px 8px 0px var(--line); z-index: 899;
  opacity: 0; pointer-events: none; transform: translateY(20px); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.chat-widget.open { opacity: 1; pointer-events: auto; transform: translateY(0); }

.chat-header {
  padding: 16px 20px; border-bottom: 2px solid var(--line); background: var(--bg);
  display: flex; justify-content: space-between; align-items: center;
}
.chat-header h4 { font-family: 'Space Grotesk', sans-serif; margin: 0; font-size: 18px; }
.chat-header button { background: none; border: none; font-size: 16px; cursor: pointer; font-weight: bold;}

.chat-body { padding: 20px; }
.chat-body p { font-size: 14px; color: var(--text-dim); margin-bottom: 20px; line-height: 1.5; }

.chat-input {
  width: 100%; border: 2px solid var(--line); padding: 12px; margin-bottom: 12px;
  font-family: 'Inter', sans-serif; font-size: 14px; background: var(--bg); color: var(--text);
}
.chat-input:focus { outline: none; border-color: var(--accent); }
textarea.chat-input { resize: vertical; min-height: 80px; }
.chat-submit { width: 100%; justify-content: center; padding: 12px; font-size: 12px; }

@media (max-width: 700px) {
  .chat-widget { width: calc(100% - 32px); right: 16px; bottom: 100px; }
  .chat-toggle-btn { bottom: 20px; right: 20px; width: 56px; height: 56px; }
}

/* ==================================================
   PREMIUM MOTION SYSTEM ADDITIONS
   ================================================== */

:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- Top Scroll Progress Bar ---------- */
.scroll-progress-bar {
  position: fixed; top: 0; left: 0; height: 2.5px; background: var(--accent);
  width: 0%; z-index: 9999; pointer-events: none; transition: width 0.1s var(--ease-out-expo);
}

/* ---------- Custom Cursor (Desktop Only) ---------- */
.custom-cursor {
  width: 8px; height: 8px; background: var(--accent); border-radius: 50%;
  position: fixed; pointer-events: none; z-index: 10000;
  transform: translate(-50%, -50%); transition: width 0.2s, height 0.2s, background-color 0.2s;
  display: none;
}
.custom-cursor-ring {
  width: 32px; height: 32px; border: 1.5px solid var(--accent); border-radius: 50%;
  position: fixed; pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%); transition: transform 0.08s ease-out, width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s;
  display: none;
}
body.has-custom-cursor .custom-cursor,
body.has-custom-cursor .custom-cursor-ring { display: block; }

body.cursor-hovering .custom-cursor { width: 4px; height: 4px; background: var(--text); }
body.cursor-hovering .custom-cursor-ring { width: 48px; height: 48px; background: rgba(0,0,0,0.03); border-color: var(--text); }

/* ---------- Sticky Navigation Transition ---------- */
nav {
  transition: padding 0.3s var(--ease-out-expo), background-color 0.3s var(--ease-out-expo), border-bottom-color 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo);
}
nav.scrolled {
  padding: 12px 8vw; background-color: rgba(245, 244, 239, 0.96);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

/* ---------- Scroll Reveals ---------- */
.reveal {
  opacity: 0; transform: translateY(24px) scale(0.995);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}
.reveal.in-view { opacity: 1; transform: translateY(0) scale(1); }

/* Stagger Utilities */
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }
.stagger-5 { transition-delay: 0.25s; }

/* Word Split Entrance reveal */
.word-wrap { display: inline-block; overflow: hidden; vertical-align: top; }
.word-inner {
  display: inline-block; transform: translateY(105%); opacity: 0; filter: blur(4px);
  transition: transform 0.8s var(--ease-out-expo), opacity 0.8s var(--ease-out-expo), filter 0.8s var(--ease-out-expo);
}
.word-inner.in-view { transform: translateY(0); opacity: 1; filter: blur(0); }

/* ---------- Button Transitions ---------- */
.btn {
  transition: transform 0.2s var(--ease-out-expo), box-shadow 0.2s var(--ease-out-expo), background-color 0.2s var(--ease-out-expo), border-color 0.2s var(--ease-out-expo), color 0.2s var(--ease-out-expo);
}
.btn span { display: inline-block; transition: transform 0.2s var(--ease-out-expo); }
.btn:hover span { transform: translateX(4px); }
.btn-primary:hover { transform: translate(-2px, -2px) scale(1.02); box-shadow: 6px 6px 0px var(--accent); }
.btn:not(.btn-primary):hover { transform: translate(-2px, -2px) scale(1.02); box-shadow: 6px 6px 0px var(--line); }
.btn:active { transform: scale(0.98) translate(1px, 1px) !important; box-shadow: 2px 2px 0px var(--line) !important; }

/* ---------- Project Cards Hover animations ---------- */
.project-card {
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo), border-color 0.4s var(--ease-out-expo);
}
.project-mockup {
  overflow: hidden;
  transition: border-color 0.3s;
}
.project-mockup img, .project-mockup .mockup-body {
  transition: transform 0.5s var(--ease-out-expo);
}
.project-card:hover .project-mockup img,
.project-card:hover .project-mockup .mockup-body {
  transform: scale(1.025);
}
.project-card:hover .project-link span {
  transform: translateX(4px);
}
.project-card h3 {
  transition: transform 0.3s var(--ease-out-expo);
}
.project-card:hover h3 {
  transform: translateY(-2px);
}

/* ---------- Shaks Flagship Product Demo ---------- */
.mockup-shaks-card {
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}
.mockup-shaks-pill {
  opacity: 0; transform: scale(0.92);
  transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo), background-color 0.3s;
}
.mockup-shaks-main p, .mockup-shaks-main div {
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}
.mockup-shaks-note-txt { opacity: 0; transform: translateY(6px); }
.mockup-shaks-ai-loader { opacity: 0; display: block; font-style: italic; color: var(--accent); }
.mockup-shaks-draft { opacity: 0; transform: translateY(10px); }

/* Active states toggled via JavaScript */
.shaks-demo.stage-1 .mockup-shaks-card { opacity: 1; transform: translateY(0); }
.shaks-demo.stage-2 .mockup-shaks-pill { opacity: 1; transform: scale(1); }
.shaks-demo.stage-3 .mockup-shaks-note-txt { opacity: 1; transform: translateY(0); }
.shaks-demo.stage-4 .mockup-shaks-ai-loader { opacity: 1; }
.shaks-demo.stage-5 .mockup-shaks-draft { opacity: 1; transform: translateY(0); }
.shaks-demo.stage-5 .mockup-shaks-ai-loader { display: none; }

/* ---------- PitchIQ Meter Animation ---------- */
.mockup-pitchiq-bar::after {
  width: var(--score-percent, 0%);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.mockup-pitchiq-score {
  transition: color 0.4s;
}
.mockup-pitchiq-score.highlighted {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(216, 92, 52, 0.15);
}

/* ---------- Operating Principles Editorial Hover ---------- */
.principles-container {
  transition: opacity 0.3s;
}
.principles-container.any-hovered .skill-block:not(:hover) {
  opacity: 0.35; filter: grayscale(40%);
}
.skill-block {
  transition: opacity 0.4s var(--ease-out-expo), filter 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
  border-left: 2px solid transparent;
  padding-left: 0px;
}
.skill-block:hover {
  transform: translateY(-4px);
  border-left-color: var(--accent);
  padding-left: 12px;
}
.skill-block h4 {
  transition: transform 0.3s var(--ease-out-expo);
}
.skill-block:hover h4 {
  transform: translateX(4px);
}

/* ---------- Process Progression Timeline ---------- */
.process-timeline { position: relative; }
.process-steps { position: relative; }
.process-steps-line {
  position: absolute; top: 12px; left: 0; right: 0; height: 2px;
  background: var(--line-soft); z-index: 0;
}
.process-progress-line {
  position: absolute; top: 12px; left: 0; height: 2px;
  background: var(--accent); width: 0%; z-index: 1;
  transition: width 0.4s var(--ease-out-expo);
}
@media (max-width: 900px) {
  .process-steps-line, .process-progress-line { display: none; }
}

.process-step {
  position: relative; z-index: 2;
  transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
}
.process-step:not(.active) { opacity: 0.45; transform: scale(0.98); }
.process-step.active { opacity: 1; transform: scale(1); }

.process-step-num {
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line-soft); background: var(--bg);
}
.process-step.active .process-step-num {
  background-color: var(--accent); color: #fff; border-color: var(--accent);
  box-shadow: 0 0 12px rgba(216, 92, 52, 0.3);
}

/* ---------- Skills Ledger Columns ---------- */
.toolkit-grid {
  transition: opacity 0.3s;
}
.toolkit-grid.any-hovered .toolkit-column:not(:hover) {
  opacity: 0.45;
}
.toolkit-column {
  transition: opacity 0.3s var(--ease-out-expo);
}
.toolkit-list li {
  transition: transform 0.2s var(--ease-out-expo), color 0.2s var(--ease-out-expo);
}
.toolkit-list li:hover {
  transform: translateX(6px);
  color: var(--accent);
}

/* ---------- About Keyphrase Storytelling Highlights ---------- */
.about-highlight {
  position: relative; color: var(--text); font-weight: 700;
  transition: color 0.4s var(--ease-out-expo);
  display: inline-block;
}
.about-highlight::after {
  content: ''; position: absolute; left: 0; bottom: 1px; width: 0%; height: 2px;
  background: var(--accent); transition: width 0.6s var(--ease-out-expo);
}
.about-highlight.highlighted {
  color: var(--accent);
}
.about-highlight.highlighted::after {
  width: 100%;
}

/* ==================================================
   REDUCED MOTION COMPATIBILITY OVERRIDES
   ================================================== */
@media (prefers-reduced-motion: reduce) {
  :root {
    --ease-out-expo: none;
    --ease-in-out-cubic: none;
  }
  .reveal, .word-inner, .btn, .btn span, .project-card,
  .project-mockup img, .project-mockup .mockup-body,
  .mockup-shaks-card, .mockup-shaks-pill, .mockup-shaks-note-txt,
  .mockup-shaks-ai-loader, .mockup-shaks-draft, .mockup-pitchiq-bar::after,
  .skill-block, .skill-block h4, .process-step, .toolkit-list li,
  .about-highlight::after {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    width: auto !important;
  }
  .mockup-pitchiq-bar::after { width: 85% !important; }
  .custom-cursor, .custom-cursor-ring { display: none !important; }
  body.has-custom-cursor { cursor: auto !important; }
}

/* ==================================================
   PRINT STYLES FOR RESUME.HTML
   ================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
    line-height: 1.5 !important;
    animation: none !important;
  }
  .resume-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  nav, 
  .mobile-overlay,
  .terminal-download-box, 
  .placeholder-alert,
  footer, 
  .chat-toggle-btn, 
  .chat-widget, 
  .custom-cursor, 
  .custom-cursor-ring,
  .linktree-overlay,
  .card-modal-overlay {
    display: none !important;
  }
  .resume-section {
    page-break-inside: avoid;
    margin-bottom: 24px !important;
  }
  .resume-section-title {
    font-size: 15pt !important;
    border-bottom: 2px solid #000000 !important;
    color: #000000 !important;
  }
  .resume-list {
    border-left: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
  }
  .resume-item {
    margin-bottom: 20px !important;
  }
  .resume-item::before {
    display: none !important;
  }
  .resume-item-title {
    font-size: 12pt !important;
    color: #000000 !important;
  }
  .resume-item-company {
    background: none !important;
    border: none !important;
    color: #000000 !important;
    padding: 0 !important;
    font-size: 10pt !important;
  }
  .resume-item-dates {
    font-size: 10pt !important;
    color: #333333 !important;
  }
  .resume-item p, .resume-item li {
    font-size: 10pt !important;
    color: #222222 !important;
  }
  .skills-card-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
  .skills-card {
    background: #ffffff !important;
    border: 1px solid #000000 !important;
    box-shadow: none !important;
    padding: 12px !important;
  }
  .skills-tags span {
    background: #ffffff !important;
    border: 1px solid #000000 !important;
    color: #000000 !important;
  }
}


/* ---------- Logo Glitch Animation ---------- */
.logo {
  position: relative;
  display: inline-block;
}
.logo:hover {
  animation: glitch-anim 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
  color: var(--accent);
}
@keyframes glitch-anim {
  0% { transform: translate(0) }
  20% { transform: translate(-2px, 2px) }
  40% { transform: translate(-2px, -2px) }
  60% { transform: translate(2px, 2px) }
  80% { transform: translate(2px, -2px) }
  100% { transform: translate(0) }
}


/* Project Tags Animation */
.project-tags span {
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo);
}
.project-card:hover .project-tags span {
  transform: translateY(-4px);
  box-shadow: 2px 2px 0 var(--line);
}
.project-card:hover .project-tags span:nth-child(1) { transition-delay: 0.0s; }
.project-card:hover .project-tags span:nth-child(2) { transition-delay: 0.05s; }
.project-card:hover .project-tags span:nth-child(3) { transition-delay: 0.1s; }
.project-card:hover .project-tags span:nth-child(4) { transition-delay: 0.15s; }
.project-card:hover .project-tags span:nth-child(5) { transition-delay: 0.2s; }


/* Brutalist Button Swipe Fill */
.btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--text);
  z-index: -1;
  transform: translateX(-101%);
  transition: transform 0.3s var(--ease-out-expo);
}
.btn-primary::before {
  background: var(--bg);
}
.btn:hover::before {
  transform: translateX(0);
}
.btn:hover {
  color: var(--bg) !important;
}
.btn-primary:hover {
  color: var(--text) !important;
}
