/* ==========================================================================
   MAHMOUD ELSAYED STUDIO — EDITORIAL PORTFOLIO STYLESHEET
   Inspired by bold Cobalt Blue + Editorial Serif/Sans contrast
   ========================================================================== */

:root {
  /* Light Mode Tokens (Default) */
  --bg: #ffffff;
  --bg-elevated: #f6f8fc;
  --bg-card: #ffffff;
  --ink: #0b0d14;
  --ink-muted: #5a6275;
  --border: rgba(11, 13, 20, 0.12);
  --border-strong: rgba(11, 13, 20, 0.24);

  --accent: #1a3bff;
  --accent-hover: #0e2ce0;
  --accent-soft: rgba(26, 59, 255, 0.1);
  --on-accent: #ffffff;

  --band-bg: #1a3bff;
  --band-ink: #ffffff;
  --pill-bg: #ffffff;
  --pill-ink: #0b0d14;

  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-ar-sans: "Cairo", "IBM Plex Sans Arabic", sans-serif;
  --font-ar-serif: "Amiri", "Cairo", serif;

  --ease-expo: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --container-max: 1280px;
}

/* ==================== RESET & BASE ==================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg);
  color: var(--ink);
  transition: background-color 0.5s var(--ease-expo), color 0.5s var(--ease-expo);
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: clip;
  overscroll-behavior-x: none;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s var(--ease-expo), color 0.5s var(--ease-expo);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

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

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

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

/* ==================== CUSTOM MAGNETIC CURSOR (DESKTOP ONLY) ==================== */
@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }
}

@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor,
  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor input,
  body.has-custom-cursor textarea {
    cursor: auto;
  }
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  display: none !important;
  transition: opacity 0.3s ease;
}

.cursor-dot {
  display: none;
}

.cursor-ring {
  width: 48px;
  height: 60px;
  border: 0;
  border-radius: 0;
  transform: translate(-5px, -4px) rotate(-12deg);
  background: linear-gradient(145deg, #ffffff 0%, #b9c6ff 17%, #2547ff 42%, #6728d9 72%, #101338 100%);
  clip-path: polygon(0 0, 25% 100%, 45% 69%, 69% 95%, 84% 84%, 60% 56%, 100% 51%);
  filter: drop-shadow(3px 5px 0 #11152f) drop-shadow(0 0 12px rgba(26, 59, 255, 0.55));
  transition: opacity 0.3s ease;
}

.cursor-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(145deg, #273b92 0%, #12162e 72%);
  clip-path: inherit;
  transform: translate(4px, 6px);
}

.cursor-label {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
  display: none;
}

/* ==================== PRELOADER CURTAIN (ROYAL BLUE + CLIP-PATH) ==================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: #1a3bff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: inset(0 0 0 0);
  transform: scale(1);
  opacity: 1;
  transition: clip-path 0.85s var(--ease-expo), transform 0.85s var(--ease-expo), opacity 0.65s var(--ease-expo), visibility 0.85s;
  will-change: clip-path, transform, opacity;
}

.preloader.is-done {
  clip-path: inset(0 0 100% 0);
  transform: scale(1.03);
  opacity: 0.94;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  width: min(400px, 82vw);
  text-align: center;
}

.preloader-brand-mask {
  overflow: hidden;
  margin-bottom: 1.4rem;
}

.preloader-brand {
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #ffffff;
  transform: translateY(115%);
  opacity: 0;
  animation: preloaderBrandReveal 0.7s var(--ease-expo) 0.08s forwards;
}

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

.preloader-brand span {
  color: #0b0d14;
}

.preloader-bar-wrap {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  overflow: hidden;
}

.preloader-bar {
  width: 0%;
  height: 100%;
  background: #ffffff;
  transition: width 0.14s linear;
}

.preloader-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.9rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.8);
}

/* ==================== HEADER ==================== */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 500;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  transition: background-color 0.35s ease, backdrop-filter 0.35s ease, padding 0.35s ease;
}

.site-header.is-scrolled {
  background-color: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding-block: 0.85rem;
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  display: inline-flex;
  align-items: center;
}

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

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.menu-trigger {
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 50%;
  transition: background-color 0.25s ease;
}

.menu-trigger:hover {
  background-color: var(--accent-soft);
}

.menu-line {
  width: 28px;
  height: 2px;
  background-color: var(--ink);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-expo), background-color 0.25s ease;
}

.menu-trigger.is-open .menu-line:first-child {
  transform: translateY(4.5px) rotate(45deg);
}

.menu-trigger.is-open .menu-line:last-child {
  transform: translateY(-4.5px) rotate(-45deg);
}

/* ==================== FULLSCREEN NAV OVERLAY ==================== */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 450;
  pointer-events: none;
  visibility: hidden;
  display: flex;
  align-items: center;
}

.nav-overlay.is-open {
  pointer-events: auto;
  visibility: visible;
}

.nav-overlay-bg {
  position: absolute;
  inset: 0;
  background: var(--accent);
  clip-path: circle(0% at 92% 5%);
  transition: clip-path 0.8s var(--ease-expo);
}

html[dir="rtl"] .nav-overlay-bg {
  clip-path: circle(0% at 8% 5%);
}

.nav-overlay.is-open .nav-overlay-bg {
  clip-path: circle(150% at 92% 5%);
}

html[dir="rtl"] .nav-overlay.is-open .nav-overlay-bg {
  clip-path: circle(150% at 8% 5%);
}

.nav-overlay-content {
  position: relative;
  z-index: 2;
  width: min(var(--container-max), 92vw);
  margin: 0 auto;
  padding: 5rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 3rem;
  color: #ffffff;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.45s ease 0.2s, transform 0.6s var(--ease-expo) 0.2s;
}

.nav-overlay.is-open .nav-overlay-content {
  opacity: 1;
  transform: translateY(0);
}

.nav-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  opacity: 0.68;
  margin-bottom: 1.2rem;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nav-list li {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s var(--ease-expo), transform 0.65s var(--ease-expo);
}

.nav-overlay.is-open .nav-list li {
  opacity: 1;
  transform: translateY(0);
}

.nav-overlay.is-open .nav-list li:nth-child(1) { transition-delay: 0.18s; }
.nav-overlay.is-open .nav-list li:nth-child(2) { transition-delay: 0.24s; }
.nav-overlay.is-open .nav-list li:nth-child(3) { transition-delay: 0.30s; }
.nav-overlay.is-open .nav-list li:nth-child(4) { transition-delay: 0.36s; }
.nav-overlay.is-open .nav-list li:nth-child(5) { transition-delay: 0.42s; }
.nav-overlay.is-open .nav-list li:nth-child(6) { transition-delay: 0.48s; }

.nav-link {
  display: inline-flex;
  align-items: baseline;
  gap: 1rem;
  font-size: clamp(2rem, 4.6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  transition: transform 0.35s var(--ease-expo), opacity 0.25s ease;
}

.nav-link::before {
  content: attr(data-index);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  font-weight: 400;
  opacity: 0.65;
}

.nav-link:hover {
  transform: translateX(12px);
}

html[dir="rtl"] .nav-link:hover {
  transform: translateX(-12px);
}

.nav-info-col {
  align-self: end;
}

.nav-email {
  display: inline-block;
  font-size: clamp(1.15rem, 2.2vw, 1.7rem);
  font-weight: 700;
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 0.25rem;
  margin-bottom: 1.2rem;
}

.nav-tagline {
  font-size: 1rem;
  opacity: 0.85;
  max-width: 34ch;
  margin-bottom: 1.8rem;
}

.nav-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.nav-socials a {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.82rem;
  font-weight: 600;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.nav-socials a:hover {
  background: #ffffff;
  color: var(--accent);
}

/* ==================== HERO SECTION ==================== */
.hero-section {
  position: relative;
  min-height: 92vh;
  padding: clamp(6rem, 11vh, 8rem) clamp(1.25rem, 4vw, 3rem) 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.hero-ambient-glow {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, 90vw);
  height: min(680px, 90vw);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
  filter: blur(22px);
  animation: glowBreath 9s ease-in-out infinite;
}

@keyframes glowBreath {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.85;
  }
  50% {
    transform: translateX(-50%) scale(1.07);
    opacity: 1;
  }
}

.hero-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
}

.hero-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(1rem, 3.5vh, 2.2rem);
  padding-bottom: clamp(12.5rem, 20vw, 16rem);
}

.hero-serif-row {
  width: min(820px, 92vw);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-inline: clamp(0.25rem, 3vw, 2rem);
  margin-bottom: -0.45rem;
  position: relative;
  z-index: 1;
}

.hero-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.8rem, 7.6vw, 6.2rem);
  line-height: 0.95;
  color: var(--ink);
  user-select: none;
}

.hero-display-word {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(4.2rem, 14.2vw, 11.8rem);
  line-height: 0.88;
  letter-spacing: -0.055em;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2.5rem, 7.5vw, 6.8rem);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  user-select: none;
  white-space: nowrap;
}

/* Portrait positioned in front of the center gap of DESIGNER */
.hero-portrait-wrap {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(280px, 34vw, 440px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-portrait-halo {
  position: absolute;
  bottom: 22%;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 59, 255, 0.24) 0%, transparent 70%);
  z-index: -1;
  filter: blur(24px);
  animation: haloPulse 8s ease-in-out infinite;
}

@keyframes haloPulse {
  0%, 100% {
    transform: scale(0.96);
    opacity: 0.78;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

.hero-portrait-enter {
  width: 100%;
  transform: translateY(26px) scale(0.96);
  opacity: 0;
  clip-path: inset(100% 0 0 0 round 0 0 2px 2px);
  transition: transform 0.95s var(--ease-expo), opacity 0.85s var(--ease-expo), clip-path 1.15s var(--ease-expo);
}

.hero-portrait-enter.is-visible {
  transform: translateY(0) scale(1);
  opacity: 1;
  clip-path: inset(0 0 0 0 round 0 0 2px 2px);
}

.hero-portrait-float {
  width: 100%;
  animation: portraitFloat 8.5s ease-in-out infinite;
  will-change: transform;
}

@keyframes portraitFloat {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -6px, 0);
  }
}

.hero-portrait {
  width: 100%;
  height: clamp(470px, 51vw, 640px);
  object-fit: cover;
  object-position: 50% 24%;
  display: block;
  border-radius: 0 0 2px 2px;
  /* The PNG has a transparent background, so the layout remains visible around the subject. */
  filter: contrast(1.06) drop-shadow(0 20px 35px rgba(11, 13, 20, 0.14));
  transition: filter 0.55s var(--ease-expo), transform 0.65s var(--ease-expo);
}

.hero-portrait-wrap:hover .hero-portrait {
  filter: contrast(1.08) drop-shadow(0 24px 45px rgba(26, 59, 255, 0.24));
}

.hero-portrait.is-placeholder {
  filter: none;
}

.hero-cta-pill {
  position: absolute;
  bottom: clamp(1.2rem, 3vw, 2.2rem);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 2.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 14px 32px rgba(26, 59, 255, 0.42);
  transition: transform 0.35s var(--ease-spring), background-color 0.25s ease, box-shadow 0.35s ease;
}

.hero-cta-pill:hover {
  background: var(--accent-hover);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 20px 40px rgba(26, 59, 255, 0.55);
}

.hero-cta-pill .arrow-icon {
  transition: transform 0.3s var(--ease-expo);
}

.hero-cta-pill:hover .arrow-icon {
  transform: translateX(4px);
}

html[dir="rtl"] .hero-cta-pill .arrow-icon {
  transform: scaleX(-1);
}

html[dir="rtl"] .hero-cta-pill:hover .arrow-icon {
  transform: scaleX(-1) translateX(4px);
}

/* Bottom Left & Right Micro Captions */
.hero-bottom-meta {
  position: absolute;
  bottom: clamp(1.8rem, 3vw, 2.6rem);
  inset-inline: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  pointer-events: none;
}

.hero-meta-left,
.hero-meta-right {
  max-width: 270px;
  pointer-events: auto;
}

.meta-dash {
  display: block;
  width: 36px;
  height: 2px;
  background: var(--ink);
  margin-bottom: 0.75rem;
}

.hero-meta-left p {
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-meta-right p {
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.55;
  text-align: end;
}

/* ==================== BLUE SERVICES BAND (PHYSICS PILLS) ==================== */
.blue-band {
  position: relative;
  background-color: var(--band-bg);
  color: var(--band-ink);
  padding: clamp(3.5rem, 7vw, 5.5rem) clamp(1.25rem, 4vw, 3rem) clamp(2rem, 4vw, 3rem);
  overflow: hidden;
}

.blue-band-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.blue-band-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.blue-band-title {
  display: flex;
  flex-direction: column;
  line-height: 0.9;
}

.title-sans {
  font-weight: 800;
  font-size: clamp(2.6rem, 6.4vw, 5.2rem);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.title-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(3rem, 7vw, 5.8rem);
  margin-top: -0.06em;
}

.blue-band-aside {
  max-width: 300px;
  padding-top: 0.5rem;
}

.blue-band-aside p {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.88;
  margin-bottom: 1.25rem;
}

.white-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  background: #ffffff;
  color: #0b0d14;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.3s ease;
}

.white-pill-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

/* Interactive Physics Arena */
.pills-arena {
  position: relative;
  width: 100%;
  height: clamp(290px, 34vw, 390px);
  margin-top: 1.5rem;
  user-select: none;
  touch-action: none;
}

.pills-hint {
  position: absolute;
  top: 0.5rem;
  inset-inline-start: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
  pointer-events: none;
}

.physics-pill {
  position: absolute;
  top: 0;
  left: 0;
  padding: clamp(0.75rem, 1.5vw, 1.1rem) clamp(1.5rem, 3vw, 2.4rem);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-ink);
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(6, 15, 74, 0.22);
  will-change: transform;
  cursor: grab;
  scale: 1;
  rotate: 0deg;
  transition: background-color 0.35s var(--ease-expo), color 0.35s var(--ease-expo), box-shadow 0.45s var(--ease-expo), scale 0.45s var(--ease-expo), rotate 0.45s var(--ease-expo);
}

.physics-pill:hover {
  background: #0b0d14;
  color: #ffffff;
  scale: 1.06;
  rotate: 2.5deg;
  box-shadow: 0 20px 38px rgba(6, 15, 74, 0.38);
}

.physics-pill:nth-child(even):hover {
  rotate: -2.5deg;
}

.physics-pill:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 5px;
}

.physics-pill.is-dragging {
  cursor: grabbing;
  z-index: 20;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.42);
}

/* ==================== KINETIC MARQUEE ==================== */
.marquee-strip {
  background: var(--ink);
  color: var(--bg);
  padding: 1.1rem 0;
  overflow: hidden;
  border-block: 1px solid var(--border);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  width: max-content;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  will-change: transform;
  animation: marqueeScroll 95s linear infinite;
}

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

.marquee-track .star {
  color: var(--accent);
  font-size: 1rem;
}

@keyframes marqueeScroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

/* ==================== SHARED SECTION STYLES ==================== */
.section-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 7.5rem) clamp(1.25rem, 4vw, 3rem);
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.editorial-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35em;
  line-height: 0.95;
}

.center-heading {
  justify-content: center;
}

.eh-sans {
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  letter-spacing: -0.045em;
  color: var(--accent);
  text-transform: uppercase;
}

.eh-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.9rem, 6.6vw, 5.4rem);
  color: var(--ink);
}

/* ==================== SELECTED WORK (SLOTS FOR PROJECTS) ==================== */
.section-head-split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.work-head-right {
  max-width: 480px;
}

.section-lead {
  font-size: 0.98rem;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-tab {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-muted);
  transition: all 0.25s var(--ease-expo);
}

.filter-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  transition: opacity 0.35s var(--ease-expo), transform 0.4s var(--ease-expo);
}

.work-grid.is-filtering {
  opacity: 0;
  transform: translateY(10px);
}

.work-card {
  position: relative;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.55s var(--ease-expo), border-color 0.35s ease, box-shadow 0.55s var(--ease-expo);
}

.work-card:nth-child(even) {
  transform: translateY(24px);
}

.work-card:hover {
  border-color: var(--accent);
  box-shadow: 0 28px 56px -18px rgba(26, 59, 255, 0.22);
}

.work-card:focus-within {
  border-color: var(--accent);
  box-shadow: 0 28px 56px -18px rgba(26, 59, 255, 0.22);
}

.work-thumb {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-thumb img,
.work-thumb .slot-blueprint {
  width: 100%;
  height: 100%;
  transition: transform 0.75s var(--ease-expo);
}

.work-thumb img {
  object-fit: cover;
}

.work-card:hover .work-thumb img,
.work-card:hover .work-thumb .slot-blueprint {
  transform: scale(1.05);
}

/* Translucent Royal Blue Hover Overlay with Staggered Index & Title */
.work-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(26, 59, 255, 0.78);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: #ffffff;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.45s var(--ease-expo);
  pointer-events: none;
}

.work-card:hover .work-overlay {
  opacity: 1;
}

.work-overlay-index {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.35rem;
  transform: translateY(18px);
  opacity: 0;
  transition: transform 0.55s var(--ease-expo) 0.05s, opacity 0.45s var(--ease-expo) 0.05s;
}

.work-overlay-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.6s var(--ease-expo) 0.1s, opacity 0.5s var(--ease-expo) 0.1s;
}

.work-overlay-cta {
  margin-top: 0.75rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(16px);
  transition: transform 0.6s var(--ease-expo) 0.15s, opacity 0.5s var(--ease-expo) 0.15s;
}

.work-card:hover .work-overlay-index,
.work-card:hover .work-overlay-title,
.work-card:hover .work-overlay-cta {
  transform: translateY(0);
  opacity: 1;
}

/* Ready-Slot Blueprint Placeholder Visual */
.slot-blueprint {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 80% 20%, var(--accent-soft), transparent 55%),
    linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg) 100%);
  border-bottom: 1px dashed var(--border-strong);
}

.slot-blueprint::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  pointer-events: none;
}

.slot-top-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slot-index {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--accent);
}

.slot-status {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.slot-center-mark {
  position: relative;
  z-index: 1;
  text-align: center;
}

.slot-plus {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px dashed var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.65rem;
  transition: transform 0.4s var(--ease-spring), background-color 0.3s ease, color 0.3s ease;
}

.work-card:hover .slot-plus {
  transform: rotate(90deg) scale(1.1);
  background: var(--accent);
  color: #ffffff;
}

.slot-ratio-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.slot-bottom-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.work-info {
  padding: 1.4rem 1.6rem 1.65rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.work-info h3 {
  font-size: 1.22rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.work-info p {
  font-size: 0.88rem;
  color: var(--ink-muted);
  max-width: 38ch;
}

.work-cat-pill {
  flex-shrink: 0;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.work-footer-cta {
  margin-top: 4.5rem;
  display: flex;
  justify-content: center;
}

.outline-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 2.2rem;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.3s var(--ease-expo);
}

.outline-pill-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  transform: translateY(-2px);
}

/* ==================== ABOUT & PROCESS ==================== */
.about-section {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.about-badge-card {
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  font-size: 0.84rem;
  font-weight: 600;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #16c765;
  box-shadow: 0 0 0 0 rgba(22, 199, 101, 0.7);
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(22, 199, 101, 0.65); }
  70% { box-shadow: 0 0 0 10px rgba(22, 199, 101, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 199, 101, 0); }
}

.about-statement {
  font-size: clamp(1.35rem, 2.5vw, 1.95rem);
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 2.5rem;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.process-card {
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform 0.35s var(--ease-expo), border-color 0.3s ease;
}

.process-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}

.step-num {
  display: inline-block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.process-card h3 {
  font-size: 1.02rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.process-card p {
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

/* ==================== PRICING PLAN ==================== */
.pricing-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.pricing-sub {
  margin-top: 1rem;
  color: var(--ink-muted);
  font-size: 1rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.2rem 1.8rem;
  border-radius: 26px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform 0.4s var(--ease-expo), border-color 0.3s ease, box-shadow 0.4s var(--ease-expo);
}

.price-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
}

.price-card.is-featured {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 28px 60px -16px rgba(26, 59, 255, 0.45);
}

.featured-ribbon {
  position: absolute;
  top: 1.25rem;
  inset-inline-end: 1.25rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.price-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.price-card.is-featured .price-tag {
  color: rgba(255, 255, 255, 0.8);
}

.price-card h3 {
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.price-desc {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 1.6rem;
}

.price-card.is-featured .price-desc {
  color: rgba(255, 255, 255, 0.85);
}

.price-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.price-card.is-featured .price-features {
  border-top-color: rgba(255, 255, 255, 0.22);
}

.price-features li {
  position: relative;
  padding-inline-start: 1.4rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.price-features li::before {
  content: "✦";
  position: absolute;
  inset-inline-start: 0;
  color: var(--accent);
  font-size: 0.75rem;
}

.price-card.is-featured .price-features li::before {
  color: #ffffff;
}

.price-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.25s ease;
}

.price-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.price-btn.is-primary {
  background: #ffffff;
  border-color: #ffffff;
  color: #0b0d14;
}

.price-btn.is-primary:hover {
  background: #0b0d14;
  border-color: #0b0d14;
  color: #ffffff;
}

/* ==================== CONTACT & FOOTER ==================== */
.contact-section {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.contact-hero {
  text-align: center;
  margin-bottom: 3.5rem;
}

.contact-big-title {
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3em;
  margin-bottom: 2rem;
}

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

.contact-email-pill {
  display: inline-flex;
  align-items: center;
  padding: 1.05rem 2.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(26, 59, 255, 0.35);
  transition: transform 0.3s var(--ease-spring), background-color 0.25s ease;
}

.contact-email-pill:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
}

.copy-email-btn {
  padding: 1.05rem 1.8rem;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-card);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.25s ease;
}

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

.social-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.social-card {
  position: relative;
  padding: 1.35rem 1.5rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: transform 0.35s var(--ease-expo), border-color 0.25s ease, background-color 0.25s ease;
}

.social-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.social-platform {
  font-weight: 800;
  font-size: 1.05rem;
}

.social-handle {
  font-size: 0.82rem;
  color: var(--ink-muted);
  word-break: break-all;
}

.social-arrow {
  position: absolute;
  top: 1.25rem;
  inset-inline-end: 1.35rem;
  font-size: 1.15rem;
  color: var(--accent);
  transition: transform 0.3s var(--ease-expo);
}

.social-card:hover .social-arrow {
  transform: translate(3px, -3px);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.back-to-top {
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.back-to-top:hover {
  color: var(--accent);
}

/* ==================== CONTACT FORM ==================== */
.contact-form { margin: 3rem auto; max-width: 900px; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--border); border-radius: 24px; background: var(--bg-elevated); }
.contact-form-heading h3 { font-size: clamp(1.8rem, 4vw, 3rem); margin-top: .4rem; }
.contact-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1.5rem; }
.contact-form-grid label { display: grid; gap: .4rem; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.contact-form-grid input, .contact-form-grid select, .contact-form-grid textarea { border: 1px solid var(--border-strong); border-radius: 10px; padding: .8rem; font: inherit; color: var(--ink); background: var(--bg); text-transform: none; letter-spacing: 0; }
.contact-form-wide { grid-column: 1 / -1; }
.contact-submit { margin-top: 1.25rem; border: 0; border-radius: 999px; padding: .9rem 1.2rem; background: var(--accent); color: #fff; font-weight: 800; cursor: pointer; }
.contact-form-status { min-height: 1.5em; margin-top: .8rem; color: var(--accent); }
@media (max-width: 650px) { .contact-form-grid { grid-template-columns: 1fr; } .contact-form-wide { grid-column: auto; } }

/* ==================== MODAL & TOAST ==================== */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.project-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 16, 0.72);
  backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative;
  z-index: 2;
  width: min(680px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 26px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.45);
  transform: scale(0.94) translateY(16px);
  transition: transform 0.4s var(--ease-expo);
}

.project-modal.is-open .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  inset-inline-end: 1rem;
  z-index: 5;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-visual {
  aspect-ratio: 16 / 10;
  background: var(--bg-elevated);
  overflow: hidden;
}

.modal-visual img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.modal-gallery {
  display: grid;
  gap: 0.55rem;
  background: var(--bg-elevated);
}

.modal-body {
  padding: 1.8rem 2rem 2.2rem;
}

.modal-cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.modal-title {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
}

.modal-desc {
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.modal-chip {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  z-index: 950;
  transition: opacity 0.3s ease, transform 0.35s var(--ease-expo);
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==================== SCROLL REVEAL ANIMATIONS ==================== */
.reveal-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.reveal-line {
  display: inline-block;
  transform: translateY(108%);
  opacity: 0;
  transition: transform 0.85s var(--ease-expo), opacity 0.65s var(--ease-expo);
}

.reveal-up.is-visible .reveal-line,
.reveal-line.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.reveal-hero {
  opacity: 0;
  transform: translate3d(0, 32px, 0) scale(0.985);
  transition: opacity 0.8s var(--ease-expo), transform 0.95s var(--ease-expo);
}

.reveal-hero.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.reveal-up {
  opacity: 0;
  transform: translate3d(0, 38px, 0) scale(0.985);
  transition: opacity 0.8s var(--ease-expo), transform 0.95s var(--ease-expo);
  will-change: transform, opacity;
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

[data-stagger="0"] { transition-delay: 0ms; }
[data-stagger="1"] { transition-delay: 80ms; }
[data-stagger="2"] { transition-delay: 160ms; }
[data-stagger="3"] { transition-delay: 240ms; }
[data-stagger="4"] { transition-delay: 320ms; }
[data-stagger="5"] { transition-delay: 400ms; }
[data-stagger="6"] { transition-delay: 480ms; }

/* ==================== RESPONSIVE BREAKPOINTS ==================== */
@media (max-width: 960px) {
  .about-grid,
  .pricing-grid,
  .social-cards-grid {
    grid-template-columns: 1fr;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  .nav-overlay-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .work-card:nth-child(even) {
    transform: none;
  }
}

@media (max-width: 720px) {
  .hero-stage {
    padding-bottom: 17.5rem;
  }

  .hero-display-word {
    gap: clamp(2.5rem, 11vw, 5rem);
  }

  .hero-bottom-meta {
    position: relative;
    bottom: auto;
    padding-bottom: 1.5rem;
    margin-top: 0.75rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-meta-right p {
    text-align: start;
  }

  .mode-text {
    display: none;
  }

  .pills-arena {
    height: 330px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }
}
