/* ═══════════════════════════════════════════════════════════
   layout.css
   All structural layouts — nav, hero, abilities,
   projects, contact, footer, mockups
   ═══════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
   NAVIGATION
   ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: var(--space-6) 0;
  transition: padding var(--duration-slow) var(--ease-out-expo),
              background var(--duration-slow) var(--ease-out-expo);
  will-change: transform;
}

/* Scrolled state — solid, no blur */
.nav.nav--scrolled {
  padding: var(--space-4) 0;
  background: rgba(13, 13, 15, 0.94);
  border-bottom: 1px solid var(--color-border);
}

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

.nav__logo {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
  transition: opacity var(--duration-base) ease;
}

.nav__logo:hover {
  opacity: 0.7;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-10);
}

.nav__link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-secondary);
  transition: color var(--duration-base) ease;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width var(--duration-base) var(--ease-out-expo);
}

.nav__link:hover {
  color: var(--color-text-primary);
}

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

/* Contact CTA nav link */
.nav__link--cta {
  padding: var(--space-2) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-primary);
  transition: border-color var(--duration-base) ease,
              background var(--duration-base) ease,
              color var(--duration-base) ease;
}

.nav__link--cta::after {
  display: none;
}

.nav__link--cta:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-dim);
  color: var(--color-accent);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-2);
  z-index: calc(var(--z-nav) + 1);
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--color-text-primary);
  border-radius: var(--radius-full);
  transition: transform var(--duration-base) var(--ease-out-expo),
              opacity var(--duration-base) ease;
  transform-origin: center;
}

/* Hamburger open state */
.nav__hamburger.is-open span:first-child {
  transform: translateY(7.5px) rotate(45deg);
}
.nav__hamburger.is-open span:last-child {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile menu */
.nav__mobile-menu {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-nav) - 1);
  background: var(--color-bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-slow) var(--ease-out-expo);
}

.nav__mobile-menu.is-open {
  opacity: 1;
  pointer-events: all;
}

.nav__mobile-menu ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
}

.nav__mobile-link {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
  transition: color var(--duration-base) ease;
}

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

/* ─────────────────────────────────────────────
   HERO SECTION
   ───────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-block: var(--space-20);
  gap: 0;
}

/* Background layers */
.hero__bg {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
}

.hero__bg-gradient {
  position: absolute;
  inset: 0;
  /* Three-layer radial depth system — no blur, no blob, no filter.
     Each gradient is a large ellipse at low opacity for clean depth. */
  background:
    radial-gradient(ellipse 80% 45% at 50% -5%,  var(--hero-radial-top)   0%, var(--hero-radial-zero) 100%),
    radial-gradient(ellipse 45% 70% at 0%  60%,  var(--hero-radial-flank) 0%, var(--hero-radial-zero) 100%),
    radial-gradient(ellipse 45% 70% at 100% 60%, var(--hero-radial-flank) 0%, var(--hero-radial-zero) 100%),
    var(--color-bg-primary);
}

.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(243, 231, 217, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 231, 217, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* Floating shapes layer — hidden, shapes have no fill */
.hero__shapes {
  display: none;
}

.shape {
  position: absolute;
  border-radius: var(--radius-full);
}

.shape--1 {
  width: clamp(300px, 40vw, 600px);
  height: clamp(300px, 40vw, 600px);
  top: -10%;
  right: -5%;
  background: none;

}

.shape--2 {
  width: clamp(200px, 25vw, 400px);
  height: clamp(200px, 25vw, 400px);
  bottom: 10%;
  left: -5%;
  background: none;

}

.shape--3 {
  width: 600px;
  height: 400px;
  top: 30%;
  left: 20%;
  background: none;

  border-radius: 50%;
}

.shape--4 {
  width: clamp(120px, 15vw, 240px);
  height: clamp(120px, 15vw, 240px);
  top: 15%;
  left: 10%;
  border: 1px solid rgba(243, 231, 217, 0.08);
  background: none;
  filter: none;
  animation: shape-rotate 30s linear infinite;
}

.shape--dot-grid {
  width: 200px;
  height: 200px;
  bottom: 20%;
  right: 10%;
  background-image: radial-gradient(circle, rgba(84, 67, 73, 0.45) 1px, transparent 1px);
  background-size: 16px 16px;
  border-radius: 0;
  opacity: 0.6;
}

@keyframes shape-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Profile image wrap */
.hero__profile-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
}

.hero__profile-ring {
  position: absolute;
  width: clamp(200px, 28vw, 360px);
  height: clamp(200px, 28vw, 360px);
  border-radius: var(--radius-full);
  border: 1px solid rgba(243, 231, 217, 0.05);
  animation: ring-pulse 5s ease-in-out infinite;
}

.hero__profile-ring--2 {
  width: clamp(240px, 34vw, 440px);
  height: clamp(240px, 34vw, 440px);
  border-color: rgba(243, 231, 217, 0.03);
  animation-delay: 1.5s;
}

@keyframes ring-pulse {
  0%, 100% { transform: scale(1);    opacity: 0.6; }
  50%       { transform: scale(1.02); opacity: 0.3; }
}

.hero__profile-img {
  position: relative;
  width: clamp(120px, 16vw, 220px);
  height: clamp(120px, 16vw, 220px);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid rgba(243, 231, 217, 0.15);
  background: transparent;
  will-change: transform;
}

/* When no image — just show the clean ring, no fill at all */
.hero__profile-img--empty {
  background: transparent;
  border: 1px solid rgba(243, 231, 217, 0.12);
}

.hero__profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

.hero__profile-placeholder {
  display: none;
}

/* Hero content — scroll reveal block */
.hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 800px;
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Scroll reveal variant */
.hero__content--scroll-reveal {
  position: relative;
  z-index: 3;
  text-align: center;
  padding-top: var(--space-3);
  padding-bottom: var(--space-4);
  max-width: 800px;
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 6vw, var(--text-5xl));
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  overflow: hidden;
  text-align: center;
}

.hero__name-line {
  display: block;
}

.hero__name-line--accent {
  color: var(--color-accent);
}

.hero__title {
  font-family: var(--font-body);
  font-size: clamp(var(--text-xs), 2vw, var(--text-md));
  font-weight: 300;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.hero__description {
  font-size: clamp(var(--text-sm), 1.8vw, var(--text-base));
  font-weight: 300;
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  margin-inline: auto;
  margin-bottom: var(--space-6);
  max-width: 52ch;
}

.hero__cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Scroll cue */
.hero__scroll-cue {
  position: absolute;
  bottom: var(--space-10);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.hero__scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--color-accent));
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0%, 100% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  50%       { transform: scaleY(1); transform-origin: top; opacity: 1; }
}

.hero__scroll-label {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ─────────────────────────────────────────────
   SECTION TRANSITIONS
   ───────────────────────────────────────────── */
.section-transition {
  position: relative;
  height: 2px;
  overflow: visible;
  pointer-events: none;
}

.transition__layer {
  position: absolute;
  left: 0;
  right: 0;
  height: 120px;
}

.transition__layer--1 {
  top: -60px;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
}

.transition__layer--2 {
  top: -30px;
  background: linear-gradient(to bottom, var(--color-bg), transparent);
  opacity: 0.5;
}

/* ─────────────────────────────────────────────
   ABILITIES SECTION
   ───────────────────────────────────────────── */
.abilities {
  position: relative;
  padding-block: clamp(var(--space-20), 12vw, var(--space-40));
  overflow: hidden;
  background: var(--color-bg-primary);
}

.abilities__bg {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
}

.abilities__bg-shape {
  position: absolute;
  border-radius: var(--radius-full);

}

.abilities__bg-shape--1 {
  width: 500px;
  height: 500px;
  top: -10%;
  right: -5%;
  background: none;
}

.abilities__bg-shape--2 {
  width: 400px;
  height: 400px;
  bottom: 0;
  left: 10%;
  background: none;
}

.abilities__inner {
  position: relative;
  z-index: 1;
}

.abilities__header {
  max-width: 600px;
}

/* Abilities grid */
.abilities__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: var(--space-6);
}

/* Ability card */
.ability-card {
  position: relative;
  padding: var(--space-8);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color var(--duration-base) ease,
              transform var(--duration-slow) var(--ease-out-expo);
  will-change: transform;
}

.ability-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
  opacity: 0;
  transition: opacity var(--duration-slow) ease;
  border-radius: inherit;
}

.ability-card:hover {
  border-color: rgba(243, 231, 217, 0.18);
  transform: translateY(-4px);
}

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

.ability-card__icon {
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-5);
  color: var(--color-accent);
}

.ability-card__icon svg {
  width: 100%;
  height: 100%;
}

.ability-card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: var(--tracking-snug);
  margin-bottom: var(--space-3);
  color: var(--color-text-primary);
}

.ability-card__desc {
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  max-width: none;
}

/* Skill bar */
.ability-card__bar {
  height: 2px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.ability-card__bar-fill {
  height: 100%;
  width: 0%; /* animated by JS */
  background: linear-gradient(90deg, var(--color-accent), rgba(84, 67, 73, 0.65));
  border-radius: var(--radius-full);
  transition: width 1.2s var(--ease-out-expo);
  will-change: width;
}

/* ─────────────────────────────────────────────
   PROJECTS SECTION
   ───────────────────────────────────────────── */
.projects {
  position: relative;
  overflow: hidden;
}

.projects__header {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}

/* ── Individual project article ── */
.project {
  position: relative;
  padding-block: clamp(var(--space-20), 12vw, var(--space-40));
  overflow: hidden;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.project__bg {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
}

.project__bg-color {
  position: absolute;
  inset: 0;
}

.project__bg-texture {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Project inner grid */
.project__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-12), 6vw, var(--space-24));
  align-items: center;
}

.project__inner--reverse {
  direction: rtl;
}

.project__inner--reverse > * {
  direction: ltr;
}

/* Project content */
.project__meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.project__number {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  color: var(--color-text-muted);
}

.project__type {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
}

.project__title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5.5vw, var(--text-5xl));
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-6);
  color: var(--color-text-primary);
}

.project__description {
  font-size: clamp(var(--text-base), 1.2vw, var(--text-md));
  line-height: var(--leading-loose);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
  max-width: 45ch;
}

.project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.project__tags li {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  transition: border-color var(--duration-base) ease,
              color var(--duration-base) ease;
}

/* Project mockups column */
.project__mockups {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: var(--space-6);
  min-height: 480px;
  flex-wrap: wrap;
}

/* ── PROJECT THEMES ── */

/* MaxxFitness — Black + Yellow */
.project--maxxfitness {
  background: var(--color-maxxfitness-bg);
}
.project--maxxfitness .project__bg-color {
  background: none;
}
.project--maxxfitness .project__type { border-color: rgba(245, 197, 24, 0.2); color: rgba(245, 197, 24, 0.6); }
.project--maxxfitness .project__title em { color: var(--color-maxxfitness-primary); }
.project--maxxfitness .project__tags li:hover { border-color: rgba(245, 197, 24, 0.3); color: var(--color-maxxfitness-primary); }
.project--maxxfitness .btn--project:hover { color: var(--color-maxxfitness-primary); border-color: var(--color-maxxfitness-primary); }

/* Petmaster — Blue + White */
.project--petmaster {
  background: var(--color-petmaster-bg);
}
.project--petmaster .project__bg-color {
  background: none;
}
.project--petmaster .project__type { border-color: rgba(74, 144, 217, 0.2); color: rgba(74, 144, 217, 0.6); }
.project--petmaster .project__title em { color: var(--color-petmaster-primary); }
.project--petmaster .project__tags li:hover { border-color: rgba(74, 144, 217, 0.3); color: var(--color-petmaster-primary); }
.project--petmaster .btn--project:hover { color: var(--color-petmaster-primary); border-color: var(--color-petmaster-primary); }

/* Couzllectors — Black + Red */
.project--couzllectors {
  background: var(--color-couzllectors-bg);
  position: relative;
}

/* Concrete grain texture layer */
.project--couzllectors::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Subtle vignette for depth */
.project--couzllectors::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 90% 80% at 50% 50%, transparent 40%, rgba(0,0,0,0.18) 100%);
  pointer-events: none;
}

.project--couzllectors .project__bg-color {
  background: none;
}

/* Ensure content sits above texture layers */
.project--couzllectors .project__inner,
.project--couzllectors .project__bg {
  position: relative;
  z-index: 1;
}

.project--couzllectors .project__number { color: #FF3C38; }
.project--couzllectors .project__type { border-color: rgba(255, 60, 56, 0.4); color: #FF3C38; }
.project--couzllectors .project__title .title--couz { color: #0C0721; }
.project--couzllectors .project__title em { color: #FF3C38; }
.project--couzllectors .project__description { color: #1a1a1a; }
.project--couzllectors .project__tags li { border-color: rgba(255, 60, 56, 0.3); color: #FF3C38; }
.project--couzllectors .project__tags li:hover { border-color: #FF3C38; color: #FF3C38; }
.project--couzllectors .btn--project { color: #FF3C38; border-color: #FF3C38; }
.project--couzllectors .btn--project:hover { color: #ffffff; background: #FF3C38; border-color: #FF3C38; }

/* ─────────────────────────────────────────────
   MOCKUP FRAMES
   ───────────────────────────────────────────── */
.mockup {
  position: relative;
  will-change: transform;
}

/* Phone mockup */
.mockup__frame--phone {
  position: relative;
  width: clamp(160px, 16vw, 240px);
  aspect-ratio: 9 / 19.5;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid var(--color-border-soft);
  background: var(--color-bg-elevated);
  box-shadow:
    0 40px 80px rgba(0,0,0,0.7),
    0 0 0 1px rgba(255,255,255,0.04),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

/* Desktop mockup */
.mockup--desktop {
  position: relative;
  z-index: 1;
}

/* Desktop mockup frame */
.mockup__frame--desktop {
  position: relative;
  width: clamp(300px, 35vw, 520px);
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border-soft);
  background: var(--color-bg-elevated);
  box-shadow:
    0 40px 80px rgba(0,0,0,0.7),
    0 0 0 1px rgba(255,255,255,0.04),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

/* Desktop mockup browser bar */
.mockup__frame--desktop::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 2;
}

.mockup__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Empty placeholder state */
.mockup__frame--empty .mockup__placeholder {
  display: flex;
}

.mockup__placeholder {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--color-surface);
  color: var(--color-text-muted);
}

.mockup__placeholder span {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.mockup__placeholder small {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  opacity: 0.5;
}

/* Phone primary */
.mockup--phone {
  z-index: 2;
}

/* MaxxFitness — two phones side by side */
.project--maxxfitness .mockup--phone {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: var(--space-6);
}

/* Secondary / offset phone */
.mockup__frame--secondary {
  position: relative;
  top: auto;
  right: auto;
  transform: none;
  opacity: 1;
  z-index: 1;
}

/* Overlay mockup (phone over desktop) — used in Petmaster & Couzllectors */
.mockup--overlay {
  position: absolute;
  bottom: -20px;
  right: -120px;
  z-index: 3;
}

/* Floating UI detail elements */
.project__float-el {
  position: absolute;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  
  will-change: transform;
}

.project__float-el--1 {
  width: 80px;
  height: 40px;
  top: 10%;
  left: 0;
}

.project__float-el--2 {
  width: 50px;
  height: 50px;
  bottom: 15%;
  right: 5%;
}

/* Project cinematic transition dividers */
.project-transition {
  position: relative;
  height: 120px;
  overflow: hidden;
  pointer-events: none;
}

.transition__curtain {
  position: absolute;
  left: 0;
  right: 0;
  height: 100%;
}

.transition__curtain--top {
  top: 0;
  background: linear-gradient(to bottom, var(--color-bg), transparent);
}

.transition__curtain--bottom {
  bottom: 0;
  background: linear-gradient(to top, var(--color-bg), transparent);
}

/* ─────────────────────────────────────────────
   CONTACT SECTION
   ───────────────────────────────────────────── */
.contact {
  position: relative;
  padding-block: clamp(var(--space-24), 14vw, var(--space-40));
  overflow: hidden;
  background: var(--color-bg);
}

.contact__bg {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
}

.contact__bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;

}

.contact__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-16);
}

.contact__content {
  max-width: 560px;
}

/* 3D Canvas column */
.contact__visual {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
}

.contact__visual canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.contact__visual-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-align: center;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.contact__visual-hint code {
  font-size: var(--text-xs);
  color: var(--color-accent);
  opacity: 0.6;
  font-family: monospace;
}

.contact__visual.model-loaded .contact__visual-hint {
  opacity: 0;
}

@media (max-width: 900px) {
  .contact__inner {
    grid-template-columns: 1fr;
  }
  .contact__visual {
    aspect-ratio: 4 / 3;
    max-width: 500px;
    margin-inline: auto;
  }
}

.contact__title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 7vw, var(--text-5xl));
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-6);
  color: var(--color-text-primary);
}

.contact__description {
  font-size: var(--text-md);
  line-height: var(--leading-loose);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-10);
  max-width: 48ch;
}

/* Social links */
.contact__socials {
  display: flex;
  gap: var(--space-8);
  margin-top: var(--space-12);
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-secondary);
  transition: color var(--duration-base) ease,
              gap var(--duration-base) var(--ease-out-expo);
}

.social-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--duration-base) var(--ease-out-expo);
}

.social-link:hover {
  color: var(--color-accent);
  gap: var(--space-3);
}

.social-link:hover svg {
  transform: translate(3px, -3px);
}

/* ─────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────── */
.footer {
  padding-block: var(--space-10);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-20);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer__copy,
.footer__credit {
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-muted);
  max-width: none;
}

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

/* Tablet */
@media (max-width: 1024px) {

  .project__inner {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .project__inner--reverse {
    direction: ltr;
  }

  .project__mockups {
    order: -1;
    min-height: 360px;
  }

  .project__description {
    max-width: none;
  }

  .abilities__grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  }

}

/* Mobile */
@media (max-width: 768px) {

  /* ── NAV ── */
  .nav__links {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  /* ── HERO ── */
  .hero {
    /* Prevent content overflow on small screens */
    height: 100svh;
    padding-block: var(--space-16);
    justify-content: center;
    gap: var(--space-4);
  }

  .hero__content,
  .hero__content--scroll-reveal {
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
  }

  /* Profile image — smaller on mobile */
  .hero__profile-img {
    width: clamp(90px, 22vw, 140px);
    height: clamp(90px, 22vw, 140px);
  }

  /* Name — prevent overflow */
  .hero__name {
    font-size: clamp(var(--text-2xl), 11vw, var(--text-4xl));
    margin-top: var(--space-3);
    margin-bottom: var(--space-1);
  }

  /* Title — too small with 1.4vw on mobile */
  .hero__title {
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-wide);
  }

  /* Description — fix tiny text from 1.2vw clamp */
  .hero__description {
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
  }

  /* Scroll cue — hide on short screens */
  .hero__scroll-cue {
    display: none;
  }

  /* ── PROJECTS ── */
  .project__mockups {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-4);
    min-height: 280px;
  }

  .mockup__frame--desktop {
    width: min(100%, 320px);
  }

  .mockup__frame--phone {
    width: clamp(100px, 22vw, 160px);
  }

  /* Overlay phone — reposition so it doesn't bleed off screen */
  .mockup--overlay {
    right: -60px;
    bottom: -10px;
  }

  /* Project number — too large on mobile */
  .project__number {
    font-size: clamp(60px, 18vw, 100px);
  }

  /* Project title — prevent overflow */
  .project__title {
    font-size: clamp(var(--text-2xl), 9vw, var(--text-4xl));
  }

  /* ── CONTACT ── */
  .contact__inner {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .contact__visual {
    aspect-ratio: 4 / 3;
    max-width: 440px;
    margin-inline: auto;
  }

  .contact__title {
    font-size: clamp(var(--text-2xl), 10vw, var(--text-4xl));
  }

  .contact__description {
    font-size: var(--text-base);
  }

  /* Contact button — full width */
  .btn--contact {
    width: 100%;
    padding: var(--space-4) var(--space-8);
  }

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

  /* ── FOOTER ── */
  .footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

}

/* Small mobile */
@media (max-width: 480px) {

  /* ── HERO ── */
  .hero__cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero__cta-group .btn {
    width: 100%;
    justify-content: center;
  }

  /* Profile scene — tighten rings */
  .hero__profile-wrap {
    transform: scale(0.85);
  }

  /* ── ABILITIES ── */
  .abilities__grid {
    grid-template-columns: 1fr;
  }

  /* ── PROJECTS ── */
  .project__tags {
    gap: var(--space-1);
  }

  .project__mockups {
    min-height: 220px;
  }

  .mockup--overlay {
    right: -20px;
    bottom: 0;
  }

  /* ── CONTACT ── */
  .contact__visual {
    aspect-ratio: 1 / 1;
  }

  /* ── CASE STUDY ── */
  .cs-maxx-research {
    grid-template-columns: 1fr;
  }

  .cs-maxx-phones {
    gap: 6px;
    overflow-x: auto;
    justify-content: flex-start;
    padding-left: var(--space-4);
    padding-bottom: var(--space-4);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .cs-maxx-phone {
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  .cs-maxx-phone--center { width: 140px; transform: translateY(-16px); }
  .cs-maxx-phone--raised { width: 120px; transform: translateY(-6px); }
  .cs-maxx-phone--back   { width: 110px; transform: translateY(0); }

}
