@import url('https://fonts.googleapis.com/css2?family=Maven+Pro:wght@400;500;600;700;800;900&display=swap');

:root {
  --font-family: 'Maven Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* Exact red gradient sampled from Home Page.jpg */
  --bg-center: #BD1E28;
  --bg-mid: #A0131E;
  --bg-edge: #820515;
  --bg-bottom-shadow: #5A0F13;
  --brand-red: #820515;
  --text-white: #ffffff;
  --transition-smooth: 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: var(--font-family);
  background-color: var(--bg-edge);
  color: var(--text-white);
  user-select: none;
  scroll-behavior: smooth;
}

/* Scroll wrapper: stacks all full-height sections vertically */
.scroll-wrapper {
  width: 100%;
}

/* Every section fills the full viewport height */
.page-section {
  position: relative;
  width: 100vw;
  min-height: 100vh;
}

/* Home section keeps the original overflow:hidden behaviour */
.home-section {
  overflow: hidden;
}

/* Main Screen Container with exact background color matching Home Page.jpg */
.scene-container {
  position: relative;
  width: 100%;
  height: 100vh;
  background:
    linear-gradient(to top, rgba(90, 15, 19, 0.5) 0%, transparent 18%),
    radial-gradient(ellipse 75% 68% at 50% 46%, var(--bg-center) 0%, var(--bg-mid) 42%, var(--bg-edge) 82%, #7a0413 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}


/* =========================================
   CINEMATIC SITE PRELOADER & PAGE TRANSITION
   ========================================= */
.site-preloader {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background-color: #0a0305;
  background-image: radial-gradient(circle at center, #820515 0%, #350408 55%, #0a0305 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.45s ease;
  pointer-events: auto;
}

.site-preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  text-align: center;
  padding: 2rem;
}

.preloader-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.preloader-title {
  font-family: var(--font-family);
  font-size: clamp(1.4rem, 4.5vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.25em;
  color: #ffffff;
  text-transform: uppercase;
}

.preloader-subtitle {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

.preloader-spinner-wrap {
  width: 160px;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.preloader-spinner {
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #ffffff, #ff3344, transparent);
  border-radius: 999px;
  position: absolute;
  top: 0;
  left: -45%;
  animation: preloaderBar 1.1s infinite ease-in-out;
  box-shadow: 0 0 10px #ff3344;
}

@keyframes preloaderBar {
  0% { left: -45%; }
  100% { left: 100%; }
}

.preloader-status {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  color: #ff8899;
  text-transform: uppercase;
  min-height: 1.2em;
}

.preloader-counter {
  font-family: var(--font-family, inherit);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
  margin-top: -0.5rem;
}

/* =========================================
   GLOBAL FIXED NAVIGATION BAR
   Transparent on home, glass on scroll
   ========================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 5.4% 1.5rem 6.4%;
  pointer-events: auto;
  /* Default: fully transparent on the home hero */
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition:
    background 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    backdrop-filter 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    -webkit-backdrop-filter 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Apple Glassmorphism — activated when scrolled past home */
.site-header.glass-nav {
  background: rgba(10, 12, 22, 0.82);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 10px 36px rgba(0, 0, 0, 0.4);
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 3.2rem;
}

.nav-item a {
  text-decoration: none;
  color: var(--text-white);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
  display: inline-block;
}

.nav-item a:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

/* Instagram Icon Badge: Solid white circle with red icon cutout as in reference */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background-color: #ffffff;
  border-radius: 50%;
  color: var(--brand-red);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), background-color var(--transition-smooth);
}

.social-link:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.social-icon {
  width: 19px;
  height: 19px;
  stroke: var(--brand-red);
}

.whatsapp-link {
  color: #25D366;
}

.whatsapp-icon {
  width: 19px;
  height: 19px;
  fill: currentColor;
  stroke: none;
}

/* =========================================
   16:9 Hero Stage Frame
   Locks exact positioning of all assets
   ========================================= */
.hero-stage {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  overflow: hidden;
}

.stage-canvas {
  position: relative;
  /* 16:9 aspect ratio matching the 11120 x 6255 canvas */
  width: 100vw;
  height: 56.25vw;
  /* 9 / 16 = 0.5625 */
  max-height: 100vh;
  max-width: 177.78vh;
  /* 16 / 9 = 1.7778 */
  margin: auto;
  pointer-events: auto;
}

/* =========================================
   Center Elements: Graffiti Text & Man
   ========================================= */
/* Background Graffiti Text (Nahnan Naseer) */
.graffiti-text-layer {
  position: absolute;
  left: 46.58%;
  top: 50.88%;
  height: 80%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  z-index: 12;
  pointer-events: none;
  opacity: 0.42;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 20px rgba(255, 120, 130, 0.2));
  transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.graffiti-text-layer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Central Character (Man.png) */
.character-layer {
  position: absolute;
  left: 46.58%;
  top: 50.88%;
  height: 82%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  z-index: 20;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 25px 45px rgba(0, 0, 0, 0.45));
  transition: transform 0.2s cubic-bezier(0.15, 0.85, 0.35, 1.2);
}

.character-layer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-drag: none;
  -webkit-user-drag: none;
}

/* =========================================
   Floating 3D Icons & Hardware
   Positions & sizes calculated from Home Page.jpg
   ========================================= */
.floating-item {
  position: absolute;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  z-index: 24;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.35));
  transition: filter var(--transition-smooth);
}

.floating-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-drag: none;
  -webkit-user-drag: none;
}

.floating-item:hover {
  filter: drop-shadow(0 22px 35px rgba(0, 0, 0, 0.55)) brightness(1.08);
}

/* 1. Video Camera - Upper Left
   Scan: center=[37.99%, 25.40%], visible h=19.01%, PNG pad=35.2% => CSS h=29.3%
   Camera PNG is landscape, so use aspect from PNG content: 804x699 => set width not height */
.item-camera {
  left: 32%;
  top: 25.40%;
  height: 20%;
  animation: floatSubtle1 5s ease-in-out infinite alternate;
}

/* 2. Photoshop - Mid Left
   Scan: center=[29.36%, 38.10%], visible h=14.06%, PNG pad=35.6% => CSS h=21.8% */
.item-photoshop {
  left: 29.36%;
  top: 40%;
  height: 10%;
  animation: floatSubtle2 5.6s ease-in-out infinite alternate;
}

/* 3. After Effects - Bottom Left
   Scan: center=[30.26%, 62.78%], visible h=18.37%, PNG pad=32.7% => CSS h=27.3% */
.item-aftereffects {
  left: 25%;
  top: 62.78%;
  height: 14%;
  animation: floatSubtle3 6.2s ease-in-out infinite alternate;
}

/* 4. Illustrator - Upper Right
   Scan: center=[65.11%, 33.15%], visible h=13.74%, PNG pad=52.5% => CSS h=28.9% */
.item-illustrator {
  left: 69%;
  top: 30%;
  height: 18%;
  animation: floatSubtle2 5.4s ease-in-out infinite alternate;
}

/* 5. Premiere Pro - Mid Right
   Scan: center=[62.28%, 50.48%], visible h=16.77%, PNG pad=46.9% => CSS h=31.6% */
.item-premiere {
  left: 62.28%;
  top: 50.48%;
  height: 15%;
  animation: floatSubtle1 5.8s ease-in-out infinite alternate;
}

/* 6. DaVinci Resolve - Lower Right
   Scan: center=[64.70%, 67.25%], visible h=11.02%, PNG pad=51.4% => CSS h=22.7% */
.item-davinci {
  left: 68%;
  top: 67.25%;
  height: 19%;
  animation: floatSubtle3 5.2s ease-in-out infinite alternate;
}

/* 7. Blender - Bottom Center Right
   Scan: center=[55.17%, 79.63%], visible h=14.70%, PNG pad=56.2% => CSS h=33.6% */
.item-blender {
  left: 55.17%;
  top: 86%;
  height: 15%;
  animation: floatSubtle2 6s ease-in-out infinite alternate;
}

/* =========================================
   Organic Floating Animations
   (Vertical gentle breathing only, preserving the exact angles)
   ========================================= */
@keyframes floatSubtle1 {
  0% {
    transform: translate(-50%, -50%) translateY(0px);
  }

  100% {
    transform: translate(-50%, -50%) translateY(-9px);
  }
}

@keyframes floatSubtle2 {
  0% {
    transform: translate(-50%, -50%) translateY(0px);
  }

  100% {
    transform: translate(-50%, -50%) translateY(-11px);
  }
}

@keyframes floatSubtle3 {
  0% {
    transform: translate(-50%, -50%) translateY(0px);
  }

  100% {
    transform: translate(-50%, -50%) translateY(-8px);
  }
}

@keyframes floatMan {
  0% {
    transform: translate(-50%, -50%) translateY(0px);
  }

  100% {
    transform: translate(-50%, -50%) translateY(-8px);
  }
}

.character-layer {
  animation: floatMan 6s ease-in-out infinite alternate;
}

/* =========================================
   Bottom Right CTA: Showcase Button (Fixed Floating)
   Always stays on screen + pop up & shake every 10s
   ========================================= */
.site-footer {
  position: fixed;
  bottom: 2.2rem;
  right: 3.5%;
  z-index: 95;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.showcase-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  color: var(--brand-red);
  font-family: var(--font-family);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.65rem 1.6rem;
  border-radius: 2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  animation: showcasePopShake 10s ease-in-out infinite;
  transform-origin: center center;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), opacity var(--transition-smooth);
}

@keyframes showcasePopShake {
  0%, 86% {
    transform: scale(1) translateY(0) rotate(0deg);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  }
  88% {
    transform: scale(0.96) translateY(1px) rotate(0deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  }
  90% {
    transform: scale(1.12) translateY(-6px) rotate(0deg);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55), 0 0 18px rgba(255, 255, 255, 0.35);
  }
  92% {
    transform: scale(1.12) translateY(-6px) rotate(-4.5deg);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55), 0 0 18px rgba(255, 255, 255, 0.35);
  }
  94% {
    transform: scale(1.12) translateY(-6px) rotate(4.5deg);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55), 0 0 18px rgba(255, 255, 255, 0.35);
  }
  96% {
    transform: scale(1.1) translateY(-5px) rotate(-3deg);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
  }
  98% {
    transform: scale(1.05) translateY(-2px) rotate(2deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  }
  100% {
    transform: scale(1) translateY(0) rotate(0deg);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  }
}

.showcase-btn:hover {
  animation-play-state: paused;
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.35);
  opacity: 1;
}

.showcase-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff;
  margin: 5px 0;
  transition: 0.3s;
}

/* =========================================
   Responsive Design for smaller screens
   ========================================= */
@media (max-width: 900px) {
  .site-header {
    padding: 1.8rem 1.8rem 1rem 1.8rem;
  }

  .mobile-toggle {
    display: block;
    z-index: 50;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(130, 5, 21, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    gap: 2.2rem;
    transform: translateY(-100%);
    transition: transform 0.4s ease-in-out;
    z-index: 45;
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-item a {
    font-size: 1.25rem;
  }

  .site-footer {
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

/* =========================================
   HOME HERO — MOBILE VIEW ENHANCEMENT
   Expands character & icons proportionally
   on portrait mobile devices so they are large,
   bold, and heroic just like desktop/system view.
   Does not affect desktop/system view in any way.
   ========================================= */
@media (max-width: 768px) and (orientation: portrait), (max-width: 600px) {
  .hero-stage {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .stage-canvas {
    width: clamp(520px, 165vw, 700px);
    height: auto;
    aspect-ratio: 16 / 9;
    max-width: none;
    max-height: none;
    flex-shrink: 0;
  }

  /* Center character & graffiti signature dead-center horizontally on mobile */
  .character-layer {
    left: 50%;
    top: 50.88%;
    height: 92%;
  }

  .graffiti-text-layer {
    left: 50%;
    top: 50.88%;
    height: 90%;
  }

  /* Balanced symmetrical icon positions on mobile */
  .item-camera {
    left: 33.5%;
    top: 24%;
    height: 22%;
  }

  .item-photoshop {
    left: 31%;
    top: 40%;
    height: 13%;
  }

  .item-aftereffects {
    left: 28.5%;
    top: 63%;
    height: 16%;
  }

  .item-illustrator {
    left: 69.5%;
    top: 29%;
    height: 20%;
  }

  .item-premiere {
    left: 64.5%;
    top: 50%;
    height: 17%;
  }

  .item-davinci {
    left: 69.5%;
    top: 67%;
    height: 20%;
  }

  .item-blender {
    left: 54%;
    top: 86%;
    height: 17%;
  }
}

/* =========================================
   ABOUT ME SECTION
   Dark navy background, centered artwork + bio
   ========================================= */

/* Dark navy background matching the reference */
.about-section {
  background-color: #0d0f1c;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Subtle noise/grain texture overlay */
.about-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(20, 10, 30, 0.0) 0%, rgba(5, 5, 20, 0.55) 100%);
  pointer-events: none;
  z-index: 0;
}


/* Content area: fills remaining height, centers everything */
.about-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.8rem;
  padding: 6rem 2rem 5rem;
  /* top pad accounts for fixed nav */
  min-height: 100vh;
}

/* ---- Image artwork ---- */
.about-image-wrap {
  width: min(520px, 56vw);
  aspect-ratio: 1 / 1.05;
  position: relative;
  /* Enter animation: starts hidden, slides up */
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 40px rgba(200, 30, 40, 0.12));
}

.about-image-wrap.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Gentle levitation animation once visible */
@keyframes aboutFloat {
  0% {
    transform: translateY(0px);
  }

  100% {
    transform: translateY(-10px);
  }
}

.about-image-wrap.is-visible {
  animation: aboutFloat 5s ease-in-out infinite alternate;
}

.about-head-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-drag: none;
  -webkit-user-drag: none;
}

/* ---- Bio text ---- */
.about-bio {
  max-width: 760px;
  text-align: center;
  font-family: var(--font-family);
  font-size: clamp(0.88rem, 1.55vw, 1.08rem);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.85);
  /* Enter animation: slightly delayed vs image */
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-bio.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   ABOUT SECTION — RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
  .about-image-wrap {
    width: min(380px, 82vw);
  }

  .about-content {
    gap: 2rem;
    padding: 5rem 1.5rem 4rem;
  }

  .about-bio {
    font-size: 0.92rem;
  }
}

@media (max-width: 500px) {
  .about-image-wrap {
    width: 90vw;
  }

  .about-bio {
    font-size: 0.85rem;
    line-height: 1.75;
  }
}


/* ============================================================
   SECTION 3 -- SKILL
   Same red radial gradient as Home, 3x3 card grid
   ============================================================ */

.skill-section {
  background:
    linear-gradient(to top, rgba(90, 15, 19, 0.5) 0%, transparent 18%),
    radial-gradient(ellipse 75% 68% at 50% 46%, var(--bg-center) 0%, var(--bg-mid) 42%, var(--bg-edge) 82%, #7a0413 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 6rem 2rem 4rem;
  overflow: hidden;
}

.skill-page-header {
  text-align: center;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-page-header.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.skill-page-title {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 900;
  letter-spacing: 0.15em;
  color: #fff;
  line-height: 1;
  text-shadow: 0 4px 32px rgba(0,0,0,0.35);
}

.skill-page-sub {
  font-size: clamp(0.8rem, 1.4vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.6);
  margin-top: 0.6rem;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: min(960px, 92vw);
}

.skill-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: 2.2rem 1.5rem 2rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
  cursor: default;
  overflow: hidden;
  opacity: 0;
  transform: translateY(32px) scale(0.97);
  transition:
    opacity 0.55s calc(var(--ci) * 70ms + 0.2s) cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s calc(var(--ci) * 70ms + 0.2s) cubic-bezier(0.22, 1, 0.36, 1),
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.skill-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.skill-card:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.38);
  transform: translateY(-8px) scale(1.03) !important;
  box-shadow:
    0 20px 50px rgba(0,0,0,0.35),
    0 0 0 1px rgba(255,255,255,0.12) inset,
    0 0 40px rgba(189, 30, 40, 0.3);
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.sc-icon {
  width: 3rem;
  height: 3rem;
  color: #fff;
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.sc-icon svg {
  width: 100%;
  height: 100%;
}

.skill-card:hover .sc-icon {
  transform: scale(1.18) translateY(-3px);
  filter: drop-shadow(0 4px 12px rgba(255,255,255,0.25));
}

.sc-name {
  font-size: clamp(0.82rem, 1.4vw, 0.98rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.3s ease;
}

.skill-card:hover .sc-name {
  color: #fff;
}

@media (max-width: 700px) {
  .skill-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .skill-section {
    padding: 5.5rem 1.25rem 3.5rem;
  }
}

@media (max-width: 420px) {
  .skill-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
  .skill-card {
    padding: 1.5rem 1rem 1.25rem;
    gap: 0.75rem;
  }
  .sc-icon {
    width: 2.2rem;
    height: 2.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skill-card,
  .skill-page-header {
    opacity: 1;
    transform: none;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  }
}

/* ============================================================
   SECTION 4 -- CONTACT
   Dark navy matching About page, side-by-side layout
   ============================================================ */

.contact-section {
  background-color: #0d0f1c;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 6rem 2rem 5rem;
  position: relative;
  overflow: hidden;
}

.contact-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(20,10,30,0.0) 0%, rgba(5,5,20,0.55) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Inner: side by side on desktop ---- */
.contact-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  align-items: center;
  gap: 5rem;
  width: min(1060px, 90vw);
}

/* ---- Left heading block ---- */
.contact-header {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-header.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.contact-overline {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.38em;
  color: var(--bg-mid);
  margin-bottom: 1.2rem;
}

.contact-heading {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #fff;
}

.contact-heading-red {
  color: var(--bg-center);
}

.contact-direct-links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 2rem;
}

.contact-direct-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.65rem 1.15rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  width: fit-content;
  transition: all 0.25s ease;
}

.contact-direct-item:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.3);
}

.contact-direct-item.whatsapp-direct {
  color: #25D366;
  border-color: rgba(37, 211, 102, 0.35);
  background: rgba(37, 211, 102, 0.08);
}

.contact-direct-item.whatsapp-direct:hover {
  background: rgba(37, 211, 102, 0.22);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}

.contact-direct-item.email-direct:hover {
  border-color: rgba(189, 30, 40, 0.4);
  background: rgba(189, 30, 40, 0.12);
}

.cf-status-msg {
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 0.2rem;
  border-radius: 6px;
  display: none;
}

.cf-status-msg.success {
  display: block;
  color: #4ade80;
}

.cf-status-msg.error {
  display: block;
  color: #f87171;
}


/* ---- Form ---- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s 0.15s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-form.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.cf-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cf-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.cf-input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 0.6rem;
  padding: 0.85rem 1.1rem;
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  -webkit-appearance: none;
}

.cf-input::placeholder {
  color: rgba(255,255,255,0.28);
}

.cf-input:focus {
  border-color: var(--bg-mid);
  background: rgba(255,255,255,0.09);
  box-shadow: 0 0 0 3px rgba(160,19,30,0.18);
}

.cf-textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.6;
}

/* ---- Submit button ---- */
.cf-submit {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background-color: #fff;
  color: var(--brand-red);
  font-family: var(--font-family);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  border-radius: 0.45rem;
  padding: 0.85rem 2rem;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  margin-top: 0.4rem;
}

.cf-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.4);
}

.cf-submit:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.cf-submit-arrow {
  font-size: 1.1rem;
  transition: transform 0.25s ease;
}

.cf-submit:hover .cf-submit-arrow {
  transform: translateX(4px);
}

/* ---- Sent state ---- */
.cf-submit.sent {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  cursor: default;
  transform: none;
}

/* ---- Responsive ---- */
@media (max-width: 820px) {
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-header {
    transform: translateY(30px);
  }

  .contact-header.is-visible {
    transform: translateY(0);
  }

  .contact-form {
    transform: translateY(30px);
  }

  .contact-form.is-visible {
    transform: translateY(0);
  }

  .contact-heading {
    font-size: clamp(2.5rem, 11vw, 4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-header,
  .contact-form {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
