/* ─────────────────────────────────────────
   MITCH McKAIN — PORTFOLIO
   Design System
   ───────────────────────────────────────── */

:root {
  /* Palette — cool white, barely blue */
  --bg:           #F2F5FA;
  --bg-elevated:  #FAFCFF;
  --text-primary: #0E1117;
  --text-secondary: #5A6478;
  --text-tertiary: #8E9BB0;
  --border:       #D8DFE9;
  --border-strong: #B0BECE;

  /* Dot grid */
  --dot-color:    rgba(140, 165, 205, 0.18);
  --dot-size:     1px;
  --dot-spacing:  22px;

  /* Project card palette */
  --app-bg:   #0B0916;
  --map-bg:   #090B1F;
  --cms-bg:   #12101F;

  /* Type scale */
  --font-display: 'Syne', sans-serif;
  --font-body:    'Inter', sans-serif;

  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.25rem;    /* 20px */
  --text-2xl:  1.5rem;     /* 24px */
  --text-3xl:  2rem;       /* 32px */
  --text-4xl:  2.75rem;    /* 44px */
  --text-5xl:  3.75rem;    /* 60px */
  --text-6xl:  5rem;       /* 80px */

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --max-width: 1280px;
  --gutter:    clamp(1.5rem, 5vw, 4rem);

  /* Accent */
  --accent: #3D5AFE;
  --accent-subtle: rgba(61, 90, 254, 0.10);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 200ms;
  --duration-base: 350ms;
  --duration-slow: 600ms;
}

/* ─────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Background lives on html so canvas (inside body) can sit below body content */
  background-color: var(--bg);
  background-image: radial-gradient(
    circle,
    var(--dot-color) var(--dot-size),
    transparent var(--dot-size)
  );
  background-size: var(--dot-spacing) var(--dot-spacing);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: transparent; /* canvas sits between html bg and body content */
  overflow-x: hidden;
}

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

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

/* ─────────────────────────────────────────
   UTILITY
   ───────────────────────────────────────── */

.text-link {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
  transition: text-decoration-color var(--duration-fast) ease;
}

.text-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* ─────────────────────────────────────────
   CUSTOM CURSOR
   ───────────────────────────────────────── */

#cursor {
  position: fixed;
  width: 18px;
  height: 18px;
  background: var(--text-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%) scale(1);
  transition:
    transform 0.20s var(--ease-out),
    background 0.20s ease,
    opacity 0.20s ease;
  opacity: 0.8;
}

#cursor.hovered {
  transform: translate(-50%, -50%) scale(2.4);
  background: var(--accent);
  opacity: 0.18;
}

#cursor.hidden {
  opacity: 0;
}

#cursor-label {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  background: var(--text-primary);
  color: #fff;
  padding: 5px 12px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 16px)) scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s var(--ease-out);
}

#cursor-label.visible {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 16px)) scale(1);
}

/* ─────────────────────────────────────────
   SHIMMER TEXT
   ───────────────────────────────────────── */

.text-shimmer {
  background: linear-gradient(
    105deg,
    var(--text-primary) 30%,
    #8fa8ff       46%,
    #c8d4ff       50%,
    #8fa8ff       54%,
    var(--text-primary) 70%
  );
  background-size: 250% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: text-shimmer 5s linear infinite;
}

@keyframes text-shimmer {
  from { background-position: 200% center; }
  to   { background-position: -200% center; }
}

/* ─────────────────────────────────────────
   AMUSE GRADIENT LINK
   ───────────────────────────────────────── */

.amuse-link {
  background: linear-gradient(90deg, #7B6FFF, #a78bfa, #818cf8, #7B6FFF);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(122, 111, 255, 0.4);
  animation: amuse-gradient 5s linear infinite;
}

.amuse-link:hover {
  -webkit-text-fill-color: transparent;
  text-decoration-color: rgba(122, 111, 255, 0.8);
}

@keyframes amuse-gradient {
  from { background-position: 0% center; }
  to   { background-position: 300% center; }
}

/* ─────────────────────────────────────────
   NAVIGATION
   ───────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--gutter);
  background-color: transparent;
  transition: background-color var(--duration-base) ease,
              backdrop-filter var(--duration-base) ease,
              border-bottom var(--duration-base) ease;
}

.nav.scrolled {
  background-color: rgba(242, 245, 250, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: color var(--duration-fast) ease;
}

.nav-logo:hover {
  color: #6366f1;
}

.nav-logo-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  transition: filter var(--duration-fast) ease;
}

.nav-logo:hover .nav-logo-icon {
  filter: invert(35%) sepia(80%) saturate(600%) hue-rotate(215deg) brightness(95%);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration-fast) ease;
}

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

/* ── Hamburger button (hidden on desktop) ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  z-index: 9999;
  position: relative;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animate to X when open */
.nav.menu-open .nav-hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav.menu-open .nav-hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav.menu-open .nav-hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile nav overlay ── */
@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-16);
    background: rgba(242, 245, 250, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9999;
  }

  .nav-links.is-open {
    opacity: 1;
    pointer-events: all;
  }

  .nav.menu-open {
    z-index: 10000;
  }

  .nav-links a {
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-primary);
  }

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

/* ─────────────────────────────────────────
   HERO
   ───────────────────────────────────────── */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px var(--gutter) var(--space-16);
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

/* Keep hero content above the canvas shimmer */
.hero-inner,
.hero-scroll-cue {
  position: relative;
  z-index: 1;
}

/* Hero two-column layout */
.hero-inner {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: var(--space-8);
  width: 100%;
}

.hero-text {
  display: flex;
  flex-direction: column;
}

.hero-model {
  width: 100%;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-model.is-loaded {
  opacity: 1;
}

model-viewer {
  --progress-bar-color: transparent;
  transition: opacity 0.2s ease;
}

.hero-eyebrow {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
  opacity: 0; /* animated in */
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 3.6vw, var(--text-5xl));
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-8);
  max-width: 820px;
  opacity: 0; /* animated in */
}

.hero-sub {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 520px;
  opacity: 0; /* animated in */
}

.hero-sub .text-link {
  color: var(--text-secondary);
  text-decoration-color: var(--border-strong);
}

.hero-sub .text-link:hover {
  color: var(--text-primary);
}

.hero-scroll-cue {
  position: absolute;
  bottom: var(--space-12);
  left: var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  opacity: 0; /* animated in */
}

.hero-scroll-cue span {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

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

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background-color: var(--accent);
  animation: scrollLine 2s var(--ease-in-out) infinite;
  animation-delay: 1.5s;
}

@keyframes scrollLine {
  0%   { left: -100%; }
  50%  { left: 0%; }
  100% { left: 100%; }
}

/* ─────────────────────────────────────────
   WORK SECTION
   ───────────────────────────────────────── */

.work {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--space-32);
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

/* ─────────────────────────────────────────
   PROJECT CARD
   ───────────────────────────────────────── */

.project {
  position: relative;
  background: rgba(250, 252, 255, 0.55);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(40px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 12px rgba(14, 17, 23, 0.06);
  transition:
    box-shadow 0.5s ease,
    transform 0.4s ease,
    border-color 0.5s ease;
}

/* Gradient overlay — fades in on hover per project theme */
.project::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  z-index: 0;
}

.project:hover {
  box-shadow:
    0 24px 64px rgba(14, 17, 23, 0.14),
    0 6px 20px rgba(14, 17, 23, 0.08);
}

.project:hover::before {
  opacity: 1;
}


/* Per-project hover gradients */
.project[data-index="01"]::before {
  background:
    radial-gradient(ellipse at 10% 60%, rgba(61, 90, 254, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 10%, rgba(147, 91, 255, 0.16) 0%, transparent 60%);
}

.project[data-index="02"]::before {
  background:
    radial-gradient(ellipse at 10% 60%, rgba(85, 108, 254, 0.24) 0%, transparent 60%),
    radial-gradient(ellipse at 85% 10%, rgba(85, 108, 254, 0.14) 0%, transparent 60%);
}

.project[data-index="03"]::before {
  background:
    radial-gradient(ellipse at 10% 60%, rgba(147, 91, 255, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 10%, rgba(61, 90, 254, 0.15) 0%, transparent 60%);
}

.project[data-index="04"]::before {
  background:
    radial-gradient(ellipse at 10% 60%, rgba(0, 180, 216, 0.20) 0%, transparent 60%),
    radial-gradient(ellipse at 85% 15%, rgba(61, 90, 254, 0.14) 0%, transparent 60%);
}

/* Full-card link wrapper */
.project-card-link {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

/* Side-by-side layout variant */
.project--with-image {
  height: 420px;
}

.project--with-image .project-card-link {
  flex-direction: row;
  align-items: stretch;
  height: 100%;
}

.project--with-image .project-info {
  flex: 0 0 50%;
}

.project-preview {
  flex: 1 1 50%;
  position: relative;
  overflow: hidden;
  background: transparent;
  border-radius: 0 19px 19px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center 40%;
  display: block;
  transition: transform 0.6s var(--ease-out);
}

.project:hover .project-preview img {
  transform: scale(1.04) translateY(-6px);
}

/* Amuse mockup — scaled down slightly */
.project[data-index="01"] .project-preview img {
  width: 82%;
  height: 82%;
}

/* Bud-E mockup is portrait/narrower — scale it down to match visual weight */
.project[data-index="02"] .project-preview img {
  width: 88%;
  height: 88%;
}

/* Map UX mockup — scaled down slightly */
.project[data-index="04"] .project-preview img {
  width: 82%;
  height: 82%;
}

/* Bud-E floating device renders */
.bude-floater {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition:
    transform 0.55s cubic-bezier(0.34, 1.4, 0.64, 1),
    opacity 0.35s ease;
}

.bude-floater img {
  width: 140px;
  height: auto;
  display: block;
}

/* Purple — bottom right, slides in from right */
.bude-floater--1 {
  bottom: 20px;
  right: 28px;
  transform: translateX(160%) rotate(12deg);
  transition-delay: 0.07s;
}

/* Green — left of phone mockup, upper area, slides in from top */
.bude-floater--2 {
  top: 24px;
  left: 55%;
  transform: translate(-50%, -140%) rotate(-8deg);
  transition-delay: 0s;
}

.project[data-index="02"]:hover .bude-floater--1 { transform: translateX(0) rotate(12deg);      opacity: 1; }
.project[data-index="02"]:hover .bude-floater--2 { transform: translate(-50%, 0) rotate(-8deg); opacity: 1; }

.project[data-index="02"]:hover .bude-floater--1 img { animation: float-gentle 3.0s ease-in-out 0.63s infinite; }
.project[data-index="02"]:hover .bude-floater--2 img { animation: float-gentle 3.5s ease-in-out 0.56s infinite; }

/* Amuse floating props */
.amuse-floater {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition:
    transform 0.55s cubic-bezier(0.34, 1.4, 0.64, 1),
    opacity 0.35s ease;
}

.amuse-floater img {
  height: auto;
  display: block;
}

/* Note — bottom left of phone mockup, slides in from bottom */
.amuse-floater--note {
  bottom: 20px;
  left: 52%;
  transform: translate(-30%, 130%) rotate(-6deg);
  transition-delay: 0.07s;
}

.amuse-floater--note img {
  width: 170px;
}

/* Folder — top right, slides in from top-right */
.amuse-floater--folder {
  top: 52px;
  right: 24px;
  transform: translate(40%, -130%) rotate(8deg);
  transition-delay: 0s;
}

.amuse-floater--folder img {
  width: 125px;
}

.project[data-index="02"]:hover .amuse-floater--note   { transform: translate(-30%, 0) rotate(-6deg); opacity: 1; }
.project[data-index="02"]:hover .amuse-floater--folder { transform: translate(0, 0) rotate(8deg);     opacity: 1; }

.project[data-index="02"]:hover .amuse-floater--note   img { animation: float-gentle 3.3s ease-in-out 0.70s infinite; }
.project[data-index="02"]:hover .amuse-floater--folder img { animation: float-gentle 2.8s ease-in-out 0.80s infinite; }

/* ── Amuse card floating props ─────────────── */
.amuse-prop {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition:
    transform 0.55s cubic-bezier(0.34, 1.4, 0.64, 1),
    opacity 0.35s ease;
}

.amuse-prop img {
  height: auto;
  display: block;
}

/* Logo — top right, drops from top */
.amuse-prop--logo {
  top: 24px;
  right: 28px;
  transform: translateY(-130%) rotate(-6deg);
  transition-delay: 0s;
}
.amuse-prop--logo img { width: 95px; }

/* QR card — top left of image area, slides from left */
.amuse-prop--qr {
  top: 28px;
  left: 53%;
  transform: translateX(-130%) rotate(6deg);
  transition-delay: 0.06s;
}
.amuse-prop--qr img { width: 90px; }

/* Museum — bottom left of image area, rises from below */
.amuse-prop--museum {
  bottom: 16px;
  left: 52%;
  transform: translateY(130%) rotate(-8deg);
  transition-delay: 0.1s;
}
.amuse-prop--museum img { width: 140px; }

/* Yale — bottom right, slides from right */
.amuse-prop--yale {
  bottom: 20px;
  right: 24px;
  transform: translateX(130%) rotate(5deg);
  transition-delay: 0.04s;
}
.amuse-prop--yale img { width: 88px; }

/* Float animation — on inner img only, so wrapper transition handles slide-in uninterrupted */
@keyframes float-gentle { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* Hover states — wrapper restores its slide-in transform; img gets the float */
.project[data-index="01"]:hover .amuse-prop--logo   { transform: translateY(0) rotate(-6deg); opacity: 1; }
.project[data-index="01"]:hover .amuse-prop--qr     { transform: translateX(0) rotate(6deg);  opacity: 1; }
.project[data-index="01"]:hover .amuse-prop--museum { transform: translateY(0) rotate(-8deg); opacity: 1; }
.project[data-index="01"]:hover .amuse-prop--yale   { transform: translateX(0) rotate(5deg);  opacity: 1; }

/* Float starts after slide-in (~0.6s), each slightly staggered */
.project[data-index="01"]:hover .amuse-prop--logo   img { animation: float-gentle 3.2s ease-in-out 0.60s infinite; }
.project[data-index="01"]:hover .amuse-prop--qr     img { animation: float-gentle 3.6s ease-in-out 0.72s infinite; }
.project[data-index="01"]:hover .amuse-prop--museum img { animation: float-gentle 2.9s ease-in-out 0.85s infinite; }
.project[data-index="01"]:hover .amuse-prop--yale   img { animation: float-gentle 3.4s ease-in-out 0.65s infinite; }

/* ── CMS props (project 03) ── */
.cms-prop {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition:
    transform 0.55s cubic-bezier(0.34, 1.4, 0.64, 1),
    opacity 0.35s ease;
}

.cms-prop img {
  height: auto;
  display: block;
}

/* Icon 1 — top right, drops from top */
.cms-prop--1 {
  top: 24px;
  right: 26px;
  transform: translateY(-130%) rotate(8deg);
  transition-delay: 0s;
}
.cms-prop--1 img { width: 136px; }

/* Icon 2 — bottom left of image area, rises from below */
.cms-prop--2 {
  bottom: 40px;
  left: 60%;
  transform: translateY(130%) rotate(-7deg);
  transition-delay: 0.06s;
}
.cms-prop--2 img { width: 78px; }

/* Icon 3 — top left of image area, slides in from left */
.cms-prop--3 {
  top: 32px;
  left: 51%;
  transform: translateX(-130%) rotate(6deg);
  transition-delay: 0.1s;
}
.cms-prop--3 img { width: 92px; }

/* Icon 4 — bottom right, slides from right */
.cms-prop--4 {
  bottom: 24px;
  right: 28px;
  transform: translateX(130%) rotate(-5deg);
  transition-delay: 0.04s;
}
.cms-prop--4 img { width: 44px; }

/* Hover — slide into place */
.project[data-index="03"]:hover .cms-prop--1 { transform: translateY(0) rotate(8deg);   opacity: 1; }
.project[data-index="03"]:hover .cms-prop--2 { transform: translateY(0) rotate(-7deg);  opacity: 1; }
.project[data-index="03"]:hover .cms-prop--3 { transform: translateX(0) rotate(6deg);   opacity: 1; }
.project[data-index="03"]:hover .cms-prop--4 { transform: translateX(0) rotate(-5deg);  opacity: 1; }

/* Float after slide-in, staggered per icon */
.project[data-index="03"]:hover .cms-prop--1 img { animation: float-gentle 3.1s ease-in-out 0.62s infinite; }
.project[data-index="03"]:hover .cms-prop--2 img { animation: float-gentle 3.5s ease-in-out 0.70s infinite; }
.project[data-index="03"]:hover .cms-prop--3 img { animation: float-gentle 2.8s ease-in-out 0.80s infinite; }
.project[data-index="03"]:hover .cms-prop--4 img { animation: float-gentle 3.3s ease-in-out 0.66s infinite; }

/* Text section */
.project-info {
  padding: var(--space-16) var(--space-12) var(--space-16);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: var(--space-4);
}

.project-index {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.project-desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 680px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.project-tags span {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: var(--space-1) var(--space-3);
  letter-spacing: 0.02em;
}

/* ─────────────────────────────────────────
   EXPERIENCE — MY XP
   ───────────────────────────────────────── */

.xp {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-24) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.xp-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.xp-label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.xp-heading {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
}

.xp-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

/* Individual entry card */
.xp-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
  padding: var(--space-8);
  background: rgba(250, 252, 255, 0.55);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 12px rgba(14, 17, 23, 0.05);
  opacity: 0;
  transform: translateY(28px);
  transition:
    box-shadow var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.xp-item:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 6px 24px rgba(14, 17, 23, 0.09);
  border-color: rgba(255, 255, 255, 0.95);
}

/* Logo avatar */
.xp-logo {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(14, 17, 23, 0.06);
}

.xp-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Info block */
.xp-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.xp-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
}

.xp-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.xp-company {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.xp-title {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.xp-location {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.xp-aside {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
}

.xp-date {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  white-space: nowrap;
}

.xp-badge {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(14, 17, 23, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}

/* Description bullets */
.xp-desc {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

.xp-desc li {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  line-height: 1.65;
  padding-left: var(--space-4);
  position: relative;
}

.xp-desc li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--border-strong);
}

/* Education sub-section divider */
.xp-section-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.xp-section-divider-label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* ─────────────────────────────────────────
   ABOUT TEASER
   ───────────────────────────────────────── */

.about-teaser {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background-color: var(--bg-elevated);
}

.about-teaser-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-24) var(--gutter);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-16);
  align-items: start;
}

.about-teaser-label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding-top: 5px; /* optical alignment with text */
}

.about-teaser-text {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--space-6);
  max-width: 640px;
}

/* ─────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────── */

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

.footer-left {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.footer-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.footer-right a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration-fast) ease;
}

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

/* Email copy button — looks like a footer link */
.email-copy-btn {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration-fast) ease;
}

.email-copy-btn:hover {
  color: var(--accent);
}

.email-copy-btn svg {
  width: 13px;
  height: 13px;
  opacity: 0.55;
  flex-shrink: 0;
  transition: opacity var(--duration-fast) ease;
}

.email-copy-btn:hover svg {
  opacity: 1;
}

/* "Say hello" primary button variant */
.about-btn-primary.email-copy-btn {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  gap: 7px;
  background: var(--text-primary);
  padding: 12px 22px;
  border-radius: 8px;
}

.about-btn-primary.email-copy-btn svg {
  width: 15px;
  height: 15px;
}

/* ─────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────── */

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

  .hero-model {
    height: 360px;
    order: -1;
  }

  .about-teaser-inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
  }
}

@media (max-width: 600px) {
  .nav-links {
    gap: var(--space-6);
  }

  .hero-headline {
    letter-spacing: -0.015em;
  }

  .project-image,
  .project-image-inner {
    min-height: 260px;
  }

  .footer-right {
    gap: var(--space-6);
  }
}

/* ─────────────────────────────────────────
   ABOUT PAGE
   ───────────────────────────────────────── */

/* Active nav link */
.nav-active {
  color: var(--text-primary) !important;
}

/* ── Main container ── */
.about-main {
  padding-top: 100px;
}

/* ── Hero header (above photo strip) ── */
.about-hero-header {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--gutter) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ── Intro section ── */
.about-intro {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-8) var(--gutter) var(--space-16);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.about-eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.about-headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--text-primary);
}

/* Bio */
.about-bio {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.about-bio p {
  font-size: 17px;
  line-height: 1.78;
  color: var(--text-secondary);
}

.about-bio p:first-child {
  font-size: 19px;
  color: var(--text-primary);
  line-height: 1.65;
}

/* Facts strip — horizontal 4-col row */
.about-facts-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: var(--space-2) 0;
}

.about-fact-item {
  padding: var(--space-6) var(--space-6) var(--space-6) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--border);
}

.about-fact-item:first-child {
  padding-left: 0;
}

.about-fact-item:last-child {
  border-right: none;
  padding-right: 0;
}

.about-fact-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.about-fact-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* CTA buttons */
.about-cta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.about-btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  background: var(--text-primary);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity var(--duration-fast) ease;
}

.about-btn-primary:hover { opacity: 0.8; }

.about-btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  text-decoration: none;
  transition:
    color var(--duration-fast) ease,
    border-color var(--duration-fast) ease;
}

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

/* ── Responsive ── */
@media (max-width: 700px) {
  .about-facts-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-fact-item:nth-child(2) { border-right: none; }
  .about-fact-item:nth-child(3) { border-right: 1px solid var(--border); border-top: 1px solid var(--border); padding-left: 0; }
  .about-fact-item:nth-child(4) { border-right: none; border-top: 1px solid var(--border); }
}

@media (max-width: 500px) {
  .about-bio p { font-size: 16px; }
  .about-bio p:first-child { font-size: 17px; }
}

/* ─────────────────────────────────────────
   INITIAL HIDDEN STATE (for JS animation)
   ───────────────────────────────────────── */

.js-fade-up {
  opacity: 0;
  transform: translateY(32px);
}

/* ─────────────────────────────────────────
   ABOUT — PHOTO STRIP COLLAGE
   ───────────────────────────────────────── */

.photo-strip {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  padding: var(--space-16) var(--gutter) var(--space-12);
  overflow: visible;
  perspective: 900px;
}

.photo-card {
  flex-shrink: 0;
  width: 160px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 4px 16px rgba(14, 17, 23, 0.12),
    0 1px 4px rgba(14, 17, 23, 0.08);
  /* JS owns the transform — this is just the resting state fallback */
  transform: rotate(var(--r));
  cursor: pointer;
  position: relative;
  will-change: transform;
  opacity: 0;
  /* slow return when mouse leaves */
  transition:
    transform 0.9s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}

.photo-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  pointer-events: none;
  filter: saturate(0.85);
  transition: filter 0.6s ease;
}

.photo-card.is-hovered {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),     /* top edge highlight */
    0 0 0 1.5px rgba(255, 255, 255, 0.85),        /* crisp white ring */
    0 0 0 4px rgba(255, 255, 255, 0.18),          /* soft outer halo */
    0 28px 52px rgba(14, 17, 23, 0.18),           /* deep drop shadow */
    0 6px 16px rgba(14, 17, 23, 0.10);
}

.photo-card.is-hovered img {
  filter: saturate(1);
}

/* ─────────────────────────────────────────
   MOBILE / RESPONSIVE — COMPREHENSIVE PASS
   ───────────────────────────────────────── */

/* Hide custom cursor on touch devices */
@media (hover: none) or (pointer: coarse) {
  #cursor,
  #cursor-label {
    display: none !important;
  }
}

/* ── Tablet (≤900px) — already handled above, additions below ── */
@media (max-width: 900px) {
  /* Nav: tighten up */
  .nav-logo {
    font-size: var(--text-base);
    gap: 8px;
  }
  .nav-logo-icon {
    width: 22px;
    height: 22px;
  }
  .nav-links {
    gap: var(--space-5);
  }
  .nav:not(.menu-open) .nav-links a {
    font-size: var(--text-sm);
  }

  /* Hero model smaller */
  .hero-model {
    height: 280px;
  }

  /* XP logo smaller */
  .xp-logo {
    width: 44px;
    height: 44px;
  }
  .xp-logo img {
    width: 28px;
    height: 28px;
  }
}

/* ── Tablet (≤1024px) — stack project cards before they get cramped ── */
@media (max-width: 1024px) {
  /* Project cards — stack vertically, auto height */
  .project--with-image {
    height: auto;
    overflow: hidden;
  }

  .project--with-image .project-card-link {
    flex-direction: column;
  }

  .project--with-image .project-info {
    flex: none;
    width: 100%;
    box-sizing: border-box;
  }

  .project-preview {
    width: 100%;
    flex: none;
    height: 260px;
    border-radius: 0 0 19px 19px;
    overflow: hidden;
  }

  /* Hide all floating decorative props on tablet/mobile */
  .amuse-prop,
  .bude-floater,
  .amuse-floater,
  .cms-prop {
    display: none;
  }

  /* Tighten project info padding */
  .project-info {
    padding: var(--space-8) var(--space-6) var(--space-6);
  }
}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {
  /* Shrink preview height further on phones */
  .project-preview {
    height: 220px;
  }

  /* XP items: stack logo + info vertically */
  .xp-item {
    flex-direction: column;
    gap: var(--space-4);
  }

  /* XP meta: allow wrapping */
  .xp-meta {
    flex-direction: column;
    gap: var(--space-2);
  }

  .xp-aside {
    flex-direction: row;
    align-items: center;
    gap: var(--space-3);
  }

  /* Photo strip: horizontal scroll */
  .photo-strip {
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: visible;
    padding: var(--space-12) var(--gutter) var(--space-8);
    gap: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .photo-strip::-webkit-scrollbar {
    display: none;
  }

  .photo-card {
    width: 120px;
    flex-shrink: 0;
  }

  .photo-card img {
    height: 160px;
  }

  /* About page */
  .about-main {
    padding-top: 80px;
  }

  .about-hero-header {
    padding-bottom: var(--space-6);
  }

  .about-intro {
    padding: var(--space-6) var(--gutter) var(--space-12);
    gap: var(--space-6);
  }

  /* Facts strip already 2-col at 700px */

  /* About CTA: stack buttons */
  .about-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-btn-primary,
  .about-btn-secondary {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .about-btn-primary.email-copy-btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  /* XP section-divider */
  .xp-section-divider {
    padding-top: var(--space-6);
  }
}

/* ── Small phones (≤480px) ── */
@media (max-width: 480px) {
  /* Nav: hide less important links */
  .nav-links a[href*="xp"],
  .nav-links a[href*="#xp"] {
    display: none;
  }

  /* Hero */
  .hero {
    padding-top: 70px;
  }

  .hero-model {
    height: 220px;
  }

  /* Work section spacing */
  .work {
    gap: var(--space-8);
  }

  /* Project card title smaller */
  .project-title {
    font-size: var(--text-xl);
  }

  /* Project tags: wrap tightly */
  .project-tags {
    gap: var(--space-2);
  }

  /* Footer */
  .footer-right {
    flex-wrap: wrap;
    gap: var(--space-4);
  }

  /* Photo cards even smaller */
  .photo-card {
    width: 100px;
  }

  .photo-card img {
    height: 136px;
  }

  /* Disable 3D tilt on touch by resetting transform */
  .photo-card {
    transform: rotate(var(--r)) !important;
  }

  /* XP logo hide on very small screens */
  .xp-logo {
    display: none;
  }
}
