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

:root {
  --bg: #f7f7f5;
  --white: #ffffff;
  --black: #050505;
  --text: #0b0b0b;
  --muted: #5f5f5f;
  --soft: #9a9a9a;
  --line: rgba(0, 0, 0, 0.09);
  --line-strong: rgba(0, 0, 0, 0.16);
  --glass: rgba(255, 255, 255, 0.72);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.08);
  --shadow-heavy: 0 40px 110px rgba(0, 0, 0, 0.16);
  --radius: 34px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.page-grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image:
    linear-gradient(rgba(0,0,0,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black, transparent 75%);
}

.cursor-spotlight {
  position: fixed;
  width: 340px;
  height: 340px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,0,0,0.065), transparent 65%);
  transform: translate(-50%, -50%);
  z-index: 1;
  mix-blend-mode: multiply;
}

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

img {
  max-width: 100%;
}

/* NAV */

.top-nav {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1080px, calc(100% - 44px));
  min-height: 66px;
  z-index: 999;
  padding: 12px 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.78);
  backdrop-filter: blur(26px);
  box-shadow: 0 22px 70px rgba(0,0,0,0.075);
}

.logo {
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -1px;
}

.logo span {
  color: var(--soft);
}

.nav-links {
  display: flex;
  gap: 22px;
}

.nav-links a {
  position: relative;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-links a:hover {
  transform: translateY(-2px);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--black);
  transform: translateX(-50%);
}

.twinstinct-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--black);
  color: white;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  transition: 0.3s ease;
}

.twinstinct-btn:hover {
  transform: translateY(-3px) scale(1.02);
}

.twinstinct-btn svg {
  width: 17px;
  height: 17px;
}

.menu-btn {
  display: none;
  background: none;
  border: none;
}

/* HERO */

.hero {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  padding-top: 112px;
}

.hero-card {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  border-radius: 34px;
  box-shadow: var(--shadow-heavy);
  background: #111;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.82);
  transform: scale(1.03);
  animation: heroZoom 1.2s ease forwards;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.82), rgba(0,0,0,0.45) 34%, rgba(0,0,0,0.08)),
    linear-gradient(0deg, rgba(0,0,0,0.40), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: 178px 72px 70px;
  color: white;
}

.eyebrow,
.section-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 7px;
  font-weight: 800;
  margin-bottom: 26px;
}

.eyebrow::before,
.section-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.hero-content h1 {
  color: white;
  font-size: clamp(4.5rem, 9vw, 8.4rem);
  line-height: 0.86;
  font-weight: 900;
  letter-spacing: -5px;
  text-transform: uppercase;
  margin-bottom: 26px;
}

.hero-role {
  color: rgba(255,255,255,0.88);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 34px;
}

.hero-actions,
.contact-actions,
.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  transition: 0.35s cubic-bezier(.2,.8,.2,1);
}

.btn.dark {
  background: var(--black);
  color: white;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}

.btn.light {
  background: rgba(255,255,255,0.24);
  color: white;
  border: 1px solid rgba(255,255,255,0.45);
  backdrop-filter: blur(18px);
}

.btn.dark:hover,
.btn.light:hover {
  transform: translateY(-4px) scale(1.02);
}

.btn svg {
  width: 17px;
  height: 17px;
  transition: 0.3s ease;
}

.btn:hover svg {
  transform: translate(4px, -4px);
}

.hero-meta {
  position: absolute;
  left: 72px;
  right: 72px;
  bottom: 44px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  color: rgba(255,255,255,0.82);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-weight: 800;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero-meta svg {
  width: 16px;
  height: 16px;
}

/* SKILL STRIP */

.skill-strip {
  width: min(1160px, calc(100% - 48px));
  margin: 22px auto 32px;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 10px 0;
}

.skill-strip::-webkit-scrollbar {
  display: none;
}

.skill-strip span {
  white-space: nowrap;
  padding: 15px 22px;
  border-radius: 16px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(255,255,255,0.88);
  box-shadow: 0 15px 35px rgba(0,0,0,0.055);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 800;
  transition: 0.35s ease;
}

.skill-strip span:hover {
  transform: translateY(-8px) scale(1.03);
  background: var(--black);
  color: white;
  box-shadow: 0 28px 60px rgba(0,0,0,0.16);
}

.skill-strip svg {
  width: 17px;
  height: 17px;
}

/* COMMON */

.surface {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.84);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.about-section,
.section-block,
.page-content,
.contact-page-grid {
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto;
}

.about-section {
  padding: 24px 0 70px;
}

.about-card {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  overflow: hidden;
}

.about-copy {
  padding: 60px 52px;
}

.about-copy .section-label,
.section-head .section-label,
.page-hero .section-label {
  color: var(--black);
  letter-spacing: 5px;
}

.about-copy h2,
.section-head h2,
.page-hero h1 {
  color: var(--black);
  font-size: clamp(2.6rem, 5.6vw, 5rem);
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: -3.4px;
  margin-bottom: 26px;
}

.about-copy p {
  max-width: 520px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.85;
  margin-bottom: 30px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-left: 1px solid var(--line);
}

.stat-tile {
  min-height: 210px;
  padding: 44px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: 0.35s ease;
}

.stat-tile:hover {
  transform: translateY(-10px);
  background: rgba(255,255,255,0.75);
}

.stat-tile i {
  width: 24px;
  height: 24px;
  margin-bottom: 30px;
}

.stat-tile strong {
  display: block;
  font-size: 42px;
  line-height: 1;
  font-weight: 900;
  margin-bottom: 10px;
}

.stat-tile span {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.section-block {
  padding: 64px 0;
}

.section-head {
  margin-bottom: 26px;
}

.service-grid,
.project-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}

.service-card,
.project-preview,
.empty-card,
.contact-profile-card,
.contact-links-card {
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(0,0,0,0.075);
  border-radius: 22px;
  box-shadow: 0 20px 55px rgba(0,0,0,0.07);
  transition: 0.35s cubic-bezier(.2,.8,.2,1);
}

.service-card {
  min-height: 235px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.service-card > i {
  width: 34px;
  height: 34px;
  margin-bottom: 30px;
}

.service-card h3 {
  color: var(--black);
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text);
  line-height: 1.65;
  font-size: 14px;
}

.service-card span {
  position: absolute;
  right: 24px;
  bottom: 22px;
}

.service-card span svg {
  width: 20px;
  height: 20px;
  transition: 0.3s ease;
}

.service-card:hover span svg {
  transform: translate(4px, -4px) rotate(15deg);
}

.jump-card:hover {
  transform: translateY(-12px) scale(1.018);
  box-shadow: 0 34px 85px rgba(0,0,0,0.13);
}

.project-preview-grid {
  grid-template-columns: repeat(3, 1fr);
}

.project-preview {
  padding: 34px;
  min-height: 210px;
}

.project-preview span {
  color: var(--soft);
  font-weight: 900;
}

.project-preview h3 {
  color: var(--black);
  font-size: 28px;
  margin: 48px 0 12px;
}

.project-preview p {
  color: var(--muted);
  line-height: 1.7;
}

.venture-banner {
  padding: 46px;
  display: grid;
  grid-template-columns: 0.8fr 1fr auto;
  gap: 30px;
  align-items: center;
}

.venture-banner h2 {
  color: var(--black);
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -3px;
}

.venture-banner > p {
  color: var(--muted);
  line-height: 1.8;
}

.contact-cta {
  text-align: center;
}

.contact-cta .section-head h2 {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.contact-cta .contact-actions {
  justify-content: center;
}

/* PAGES */

.page-hero {
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto;
  padding: 160px 0 60px;
}

.page-text {
  color: var(--muted);
  max-width: 680px;
  font-size: 17px;
  line-height: 1.8;
}

.empty-card {
  max-width: 700px;
  margin: 0 auto 100px;
  padding: 52px;
  text-align: center;
}

.empty-card > i {
  width: 54px;
  height: 54px;
  margin-bottom: 26px;
}

.empty-card h2 {
  color: var(--black);
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -3px;
  margin-bottom: 18px;
}

.empty-card p {
  color: var(--muted);
  line-height: 1.8;
  max-width: 540px;
  margin: 0 auto 28px;
}

.contact-page-grid {
  padding-bottom: 110px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 26px;
}

.contact-profile-card,
.contact-links-card {
  padding: 38px;
}

.contact-profile-card img {
  width: 165px;
  height: 165px;
  object-fit: cover;
  border-radius: 28px;
  filter: grayscale(100%) contrast(1.05);
  margin-bottom: 24px;
}

.contact-profile-card h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.96;
  letter-spacing: -3px;
  margin-bottom: 16px;
}

.contact-profile-card p {
  color: var(--muted);
  line-height: 1.8;
}

.contact-links-card {
  display: grid;
  gap: 14px;
}

.contact-links-card a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  transition: 0.3s ease;
}

.contact-links-card a:hover {
  transform: translateY(-6px);
  background: var(--black);
  color: white;
}

.contact-links-card svg {
  width: 30px;
  height: 30px;
}

.contact-links-card strong {
  display: block;
  margin-bottom: 4px;
}

.contact-links-card span {
  color: var(--muted);
  font-size: 14px;
}

.contact-links-card a:hover span {
  color: rgba(255,255,255,0.7);
}

/* DOCK */

.bottom-dock {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 36px));
  min-height: 82px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(255,255,255,0.85);
  backdrop-filter: blur(30px);
  box-shadow: 0 28px 90px rgba(0,0,0,0.13);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.bottom-dock.hidden {
  transform: translateX(-50%) translateY(110px);
  opacity: 0;
}

.dock-item {
  min-width: 68px;
  min-height: 58px;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--black);
  transition: 0.25s ease;
}

.dock-item svg {
  width: 23px;
  height: 23px;
  transition: 0.25s ease;
}

.dock-item span {
  font-size: 12px;
  font-weight: 700;
}

.dock-item:hover {
  transform: translateY(-10px) scale(1.12);
}

.dock-home {
  background: var(--black);
  color: white;
  min-width: 72px;
  min-height: 72px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.24);
}

footer {
  text-align: center;
  padding: 34px 20px 130px;
  color: var(--soft);
}

/* REVEAL */

.reveal {
  opacity: 0;
  transform: translateY(64px) scale(.985);
  clip-path: inset(0 0 18% 0 round 18px);
  filter: blur(12px);
  transition:
    opacity .95s cubic-bezier(.16,1,.3,1),
    transform 1.15s cubic-bezier(.16,1,.3,1),
    clip-path 1.15s cubic-bezier(.16,1,.3,1),
    filter .9s cubic-bezier(.16,1,.3,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: transform, opacity, filter;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
  clip-path: inset(0 0 0 0 round 0);
  filter: blur(0);
}

/* MATTEO-STYLE SCROLL MOTION
   Visual motion only: no sizing, spacing, color or content changes. */
.pin-scroll-page {
  scroll-snap-type: y proximity;
  scroll-padding-top: 94px;
}

.pin-scroll-page main > section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.motion-ready .page-grid-bg {
  background-position:
    calc(var(--page-progress, 0) * 220px)
    calc(var(--page-progress, 0) * -160px);
  transform: scale(calc(1 + var(--page-progress, 0) * .12))
    rotate(calc(var(--scroll-velocity, 0) * .35deg));
  transition: transform .18s linear;
}

/* The hero portrait takes over as a fixed site background when the first
   pinned scene reaches the skills strip. */
.pin-scroll-page .page-grid-bg {
  opacity: 1;
  transition:
    opacity .8s cubic-bezier(.16,1,.3,1),
    filter .8s ease,
    transform .18s linear;
}

.pin-scroll-page .page-grid-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background:
    linear-gradient(rgba(8,8,8,.43), rgba(8,8,8,.62)),
    url("images/profile.png") center 32% / cover no-repeat;
  transition: opacity .9s cubic-bezier(.16,1,.3,1);
}

.pin-scroll-page.profile-background-active .page-grid-bg {
  z-index: -1;
  mask-image: none;
  filter: saturate(.72) contrast(1.08);
}

.pin-scroll-page.profile-background-active .page-grid-bg::before {
  opacity: 1;
}

.pin-scroll-page.profile-background-active {
  background: transparent;
  color: #fff;
}

.profile-background-active .skill-strip,
.profile-background-active .surface,
.profile-background-active .service-card,
.profile-background-active .case-study,
.profile-background-active .certificate-card,
.profile-background-active .template-card,
.profile-background-active .video-edit-card,
.profile-background-active .tech-card,
.profile-background-active .features-card,
.profile-background-active .contact-card {
  color: #fff;
  background: rgba(12,12,12,.16) !important;
  border-color: rgba(255,255,255,.24) !important;
  box-shadow: 0 28px 90px rgba(0,0,0,.18);
  backdrop-filter: blur(13px) saturate(1.15);
}

.profile-background-active .section-label,
.profile-background-active .service-card p,
.profile-background-active .case-study p,
.profile-background-active .venture-banner p,
.profile-background-active .contact-cta p,
.profile-background-active footer,
.profile-background-active .muted,
.profile-background-active .page-text {
  color: rgba(255,255,255,.78);
}

.profile-background-active .about-skill-tags span,
.profile-background-active .tech-tags span,
.profile-background-active .edit-tags span,
.profile-background-active .project-status {
  color: #fff;
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.22);
}

.profile-background-active .btn.light,
.profile-background-active .btn.outline {
  color: #fff;
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.35);
}


.motion-ready .motion-section {
  --section-progress: 0;
  --section-focus: 0;
  position: relative;
  isolation: isolate;
  perspective: 1400px;
}

.motion-ready .motion-section::after {
  content: "";
  position: absolute;
  inset: 8% -4%;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,0,0,.055), transparent 66%);
  opacity: calc(var(--section-focus) * .9);
  scale: calc(.7 + var(--section-focus) * .55);
  filter: blur(28px);
}

.motion-ready .motion-section[data-motion-side="left"] .section-head,
.motion-ready .motion-section[data-motion-side="left"] .about-card,
.motion-ready .motion-section[data-motion-side="left"] .venture-banner {
  translate: calc((1 - var(--section-focus)) * -44px) 0;
}

.motion-ready .motion-section[data-motion-side="right"] .section-head,
.motion-ready .motion-section[data-motion-side="right"] .about-card,
.motion-ready .motion-section[data-motion-side="right"] .venture-banner {
  translate: calc((1 - var(--section-focus)) * 44px) 0;
}

.motion-ready .section-head h2,
.motion-ready .about-copy h2,
.motion-ready .venture-banner h2,
.motion-ready .page-hero h1 {
  transform-origin: left center;
  transform: skewY(calc(var(--scroll-velocity, 0) * -2.4deg));
  letter-spacing: calc(var(--scroll-velocity, 0) * -.035em);
  transition: transform .18s linear, letter-spacing .18s linear;
}

.motion-ready .crazy-card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --shine-x: 50%;
  --shine-y: 50%;
  transform: perspective(1100px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform .16s ease-out, box-shadow .45s cubic-bezier(.16,1,.3,1);
  will-change: transform;
}

.motion-ready .crazy-card:hover {
  z-index: 4;
  box-shadow: 0 48px 110px rgba(0,0,0,.20);
}

.motion-ready .crazy-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at var(--shine-x) var(--shine-y),
    rgba(255,255,255,.38),
    transparent 35%
  );
  transition: opacity .35s ease;
}

.motion-ready .crazy-card:hover::before {
  opacity: 1;
}

.motion-ready .crazy-card > * {
  transform: translateZ(18px);
}

.motion-ready .hero.motion-hero {
  --hero-scroll: 0;
  height: 210vh;
  padding-top: 112px;
  scroll-snap-align: none;
}

.motion-ready .hero.motion-hero .hero-card {
  position: sticky;
  top: 104px;
  height: calc(100vh - 126px);
  min-height: 590px;
  scale: calc(1 + var(--hero-scroll) * .14);
  border-radius: calc(34px - var(--hero-scroll) * 34px);
  translate: 0 calc(var(--hero-scroll) * -34px);
  box-shadow: 0 calc(40px - var(--hero-scroll) * 20px) 110px rgba(0,0,0,.16);
  animation: cinematicCardIn 1.1s cubic-bezier(.16,1,.3,1) both;
  will-change: scale, translate, border-radius;
}

.motion-ready .hero.motion-hero .hero-img {
  scale: calc(1 + var(--hero-scroll) * .25);
  rotate: calc(var(--hero-scroll) * -1.2deg);
  transform-origin: 64% 50%;
}

.motion-ready .hero.motion-hero .hero-overlay {
  opacity: calc(1 - var(--hero-scroll) * .52);
}

.motion-ready .hero.motion-hero .hero-content {
  opacity: calc(1 - var(--hero-scroll) * 1.45);
  translate: calc(var(--hero-scroll) * -150px) 0;
  clip-path: inset(0 calc(var(--hero-scroll) * 48%) 0 0);
  transform: skewY(calc(var(--hero-scroll) * -3deg));
  will-change: opacity, translate, clip-path;
}

.motion-ready .hero.motion-hero .hero-meta {
  opacity: calc(1 - var(--hero-scroll) * 2);
  translate: 0 calc(var(--hero-scroll) * 40px);
}

.motion-ready .hero.motion-hero + .skill-strip {
  margin-top: -4vh;
  scroll-margin-top: 92px;
}

.motion-ready::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1001;
  width: calc(var(--page-progress, 0) * 100%);
  height: 2px;
  pointer-events: none;
  background: var(--black);
  transform-origin: left center;
}

.motion-ready .top-nav {
  transition:
    top .85s cubic-bezier(.16,1,.3,1),
    width .55s cubic-bezier(.16,1,.3,1),
    min-height .55s cubic-bezier(.16,1,.3,1),
    box-shadow .55s ease,
    background-color .55s ease,
    color .55s ease,
    border-color .55s ease;
}

.motion-ready.has-scrolled .top-nav {
  top: 12px;
  width: min(1010px, calc(100% - 32px));
  min-height: 58px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 18px 55px rgba(0,0,0,.11);
}

/* Home starts on plain black. After the pinned profile card, JS enables the
   portrait wallpaper and moves this floating navigation to the bottom. */
.profile-site-background.pin-scroll-page:not(.wallpaper-active) {
  background: #000;
}

.profile-site-background.pin-scroll-page:not(.wallpaper-active) .page-grid-bg::before {
  opacity: 0;
}

.profile-site-background.pin-scroll-page.wallpaper-active .page-grid-bg::before {
  opacity: 1;
  transition: opacity .9s cubic-bezier(.16,1,.3,1);
}

body.motion-ready.nav-at-bottom .top-nav {
  top: calc(100dvh - 84px);
  color: #fff;
  background: rgba(8,8,8,.52);
  border-color: rgba(255,255,255,.26);
  box-shadow: 0 -16px 55px rgba(0,0,0,.24);
  backdrop-filter: blur(16px) saturate(1.15);
}

body.inner-page.nav-at-bottom .top-nav {
  top: calc(100dvh - 84px);
}

.motion-ready.nav-at-bottom .nav-links a,
.motion-ready.nav-at-bottom .logo {
  color: #fff;
}

.motion-ready.nav-at-bottom .nav-links a.active::after,
.motion-ready.nav-at-bottom .nav-links a:hover::after {
  background: #fff;
}

.motion-ready.nav-at-bottom .twinstinct-btn {
  color: #111;
  background: rgba(255,255,255,.92);
}

.motion-ready .hero-card,
.motion-ready .about-card,
.motion-ready .service-card,
.motion-ready .venture-banner,
.motion-ready .case-study,
.motion-ready .certificate-card,
.motion-ready .template-card,
.motion-ready .contact-card {
  translate: 0 calc(var(--scroll-depth, 0) * -12px);
  transition: translate .18s linear;
}

.motion-ready .hero-card {
  transform-origin: 50% 0;
  animation: cinematicCardIn 1.25s cubic-bezier(.16,1,.3,1) both;
}

.motion-ready .hero-img {
  --hero-x: 0px;
  --hero-y: 0px;
  transform: scale(1.04) translate(var(--hero-x), var(--hero-y));
  animation: cinematicImageIn 1.8s cubic-bezier(.16,1,.3,1) both;
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
}

.motion-ready .hero-content > * {
  animation: cinematicTextIn 1s cubic-bezier(.16,1,.3,1) both;
}

.motion-ready .hero-content > :nth-child(1) { animation-delay: .18s; }
.motion-ready .hero-content > :nth-child(2) { animation-delay: .27s; }
.motion-ready .hero-content > :nth-child(3) { animation-delay: .36s; }
.motion-ready .hero-content > :nth-child(4) { animation-delay: .45s; }

.motion-ready .skill-strip {
  overflow: hidden;
  transform: rotate(calc(var(--scroll-velocity, 0) * -1deg));
}

.motion-ready .skill-strip span:nth-child(odd) {
  translate: 0 calc(var(--scroll-velocity, 0) * -18px);
}

.motion-ready .skill-strip span:nth-child(even) {
  translate: 0 calc(var(--scroll-velocity, 0) * 18px);
}

.motion-ready .service-grid .service-card:nth-child(odd) {
  translate: 0 calc((1 - var(--section-focus, 1)) * 54px);
}

.motion-ready .service-grid .service-card:nth-child(even) {
  translate: 0 calc((1 - var(--section-focus, 1)) * -32px);
}

@keyframes cinematicCardIn {
  from { opacity: 0; transform: scale(.9); clip-path: inset(8% 5% 8% 5% round 56px); }
  to { opacity: 1; transform: scale(1); clip-path: inset(0 0 0 0 round 34px); }
}

@keyframes cinematicImageIn {
  from { opacity: .2; transform: scale(1.2) translate(var(--hero-x), calc(var(--hero-y) + 24px)); }
  to { opacity: 1; transform: scale(1.04) translate(var(--hero-x), var(--hero-y)); }
}

@keyframes cinematicTextIn {
  from { opacity: 0; transform: translateY(48px); filter: blur(10px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes heroZoom {
  from {
    transform: scale(1.08);
  }

  to {
    transform: scale(1.03);
  }
}

/* RESPONSIVE */

@media (max-width: 980px) {
  .nav-links,
  .twinstinct-btn {
    display: none;
  }

  .menu-btn {
    display: block;
  }

  .nav-links.active {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255,255,255,0.92);
    border: 1px solid var(--line);
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow);
  }

  .hero-card {
    min-height: 610px;
  }

  .about-card,
  .venture-banner,
  .contact-page-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    border-left: none;
  }

  .service-grid,
  .project-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .venture-banner {
    text-align: center;
  }

  .bottom-dock {
    gap: 10px;
    width: min(680px, calc(100% - 28px));
  }

  .dock-item {
    min-width: 58px;
  }
}

@media (max-width: 680px) {
  .cursor-spotlight {
    display: none;
  }

  .top-nav {
    top: 14px;
    width: calc(100% - 24px);
  }

  .hero {
    width: min(100% - 28px, 1160px);
    padding-top: 96px;
  }

  .hero-card {
    min-height: 620px;
    border-radius: 28px;
  }

  .hero-content {
    padding: 135px 26px 70px;
  }

  .hero-content h1 {
    font-size: clamp(3.8rem, 15vw, 5.8rem);
    letter-spacing: -3px;
  }

  .hero-role {
    font-size: 13px;
    letter-spacing: 4px;
  }

  .hero-meta {
    left: 26px;
    right: 26px;
    bottom: 26px;
    font-size: 9px;
  }

  .hero-meta span:last-child {
    display: none;
  }

  .hero-actions,
  .contact-actions,
  .contact-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .about-section,
  .section-block,
  .page-content,
  .contact-page-grid,
  .page-hero {
    width: min(100% - 28px, 1060px);
  }

  .about-copy,
  .venture-banner,
  .empty-card,
  .contact-profile-card,
  .contact-links-card {
    padding: 28px;
  }

  .stats-grid,
  .service-grid,
  .project-preview-grid {
    grid-template-columns: 1fr;
  }

  .stat-tile {
    min-height: 160px;
    padding: 28px;
  }

  .section-block {
    padding: 54px 0;
  }

  .section-head h2,
  .about-copy h2,
  .page-hero h1 {
    letter-spacing: -2px;
  }

  .bottom-dock {
    min-height: 74px;
    gap: 4px;
    padding: 10px 12px;
  }

  .dock-item {
    min-width: 48px;
    min-height: 52px;
  }

  .dock-item span {
    font-size: 10px;
  }

  .dock-item svg {
    width: 20px;
    height: 20px;
  }

  .dock-home {
    min-width: 58px;
    min-height: 58px;
  }
}


/* ============================= */
/* CLEAN HOMEPAGE UPDATE */
/* About skill tags + no homepage projects */
/* ============================= */

.about-card {
  grid-template-columns: 1fr 0.9fr;
}

.about-skills-panel {
  padding: 60px 52px;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.about-skill-tags span {
  padding: 13px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(0,0,0,0.08);
  color: var(--black);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 16px 34px rgba(0,0,0,0.045);
  transition: 0.3s cubic-bezier(.2,.8,.2,1);
}

.about-skill-tags span:hover {
  transform: translateY(-7px) scale(1.035);
  background: var(--black);
  color: white;
  box-shadow: 0 24px 60px rgba(0,0,0,0.14);
}

.contact-actions {
  justify-content: center;
}

footer p {
  font-weight: 600;
}

@media (max-width: 980px) {
  .about-card {
    grid-template-columns: 1fr;
  }

  .about-skills-panel {
    border-left: none;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .about-skills-panel {
    padding: 28px;
  }

  .about-skill-tags span {
    width: calc(50% - 6px);
    text-align: center;
  }
}


/* ============================= */
/* PROJECT CASE STUDY PAGE */
/* ============================= */

.case-study-list,
.cert-grid {
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 120px;
}

.case-study {
  padding: 42px;
  margin-bottom: 34px;
}

.case-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 38px;
}

.project-number {
  color: var(--soft);
  font-size: 18px;
  font-weight: 900;
}

.project-status {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid var(--line);
}

.project-status.completed {
  background: #0b0b0b;
  color: white;
}

.project-status.progress {
  background: rgba(0,0,0,0.06);
  color: var(--black);
}

.case-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 38px;
  align-items: start;
}

.project-category {
  color: var(--soft);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 18px;
}

.case-main h2 {
  color: var(--black);
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.88;
  letter-spacing: -5px;
  margin-bottom: 24px;
}

.case-main > p,
.case-block p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.case-block {
  margin-top: 30px;
}

.case-block h3,
.tech-card h3,
.features-card h3 {
  color: var(--black);
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 12px;
}

.case-side {
  display: grid;
  gap: 16px;
}

.tech-card,
.features-card {
  padding: 26px;
  border-radius: 24px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
}

.tech-tags,
.cert-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-tags span,
.cert-tags span {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(0,0,0,0.055);
  color: var(--black);
  font-size: 13px;
  font-weight: 800;
}

.features-card ul {
  list-style: none;
  display: grid;
  gap: 12px;
}

.features-card li {
  color: var(--muted);
  line-height: 1.5;
}

.features-card li::before {
  content: "✓";
  color: var(--black);
  font-weight: 900;
  margin-right: 9px;
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn.outline {
  background: rgba(255,255,255,0.5);
  color: var(--black);
  border: 1px solid var(--line);
}

/* ============================= */
/* CERTIFICATIONS PAGE */
/* ============================= */

.cert-grid {
  display: grid;
  gap: 28px;
}

.certificate-card {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  overflow: hidden;
}

.certificate-image {
  min-height: 360px;
  background: #f2f2f2;
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.certificate-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.45s ease;
}

.certificate-card:hover .certificate-image img {
  transform: scale(1.045);
}

.certificate-content {
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.certificate-provider {
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 18px;
}

.certificate-content h2 {
  color: var(--black);
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -3px;
  margin-bottom: 18px;
}

.certificate-content p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 24px;
}

.certificate-content .btn {
  width: fit-content;
  margin-top: 28px;
}

/* Remove bottom dock globally */
.bottom-dock {
  display: none !important;
}

footer {
  padding-bottom: 34px;
}

@media (max-width: 900px) {
  .case-grid,
  .certificate-card {
    grid-template-columns: 1fr;
  }

  .certificate-image {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .case-study,
  .certificate-content {
    padding: 28px;
  }

  .case-study-list,
  .cert-grid {
    width: min(100% - 28px, 1060px);
  }

  .case-main h2 {
    letter-spacing: -3px;
  }

  .case-actions,
  .certificate-content .btn {
    width: 100%;
  }

  .certificate-image {
    min-height: 240px;
  }
}


/* ============================= */
/* VIDEO EDITS PAGE */
/* ============================= */

.video-edits-list {
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 70px;
  display: grid;
  gap: 34px;
}

.video-edit-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  overflow: hidden;
}

.video-preview {
  position: relative;
  min-height: 420px;
  background: #0b0b0b;
  overflow: hidden;
}

.video-preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: 0.35s ease;
}

.video-edit-card:hover .video-preview video {
  opacity: 1;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: white;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,0.18), transparent 30%),
    linear-gradient(135deg, #111, #050505);
}

.video-placeholder svg {
  width: 54px;
  height: 54px;
}

.video-placeholder span {
  color: rgba(255,255,255,0.72);
  font-size: 14px;
  font-weight: 800;
}

.video-edit-card:hover .video-placeholder {
  opacity: 0.35;
}

.play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(20px);
  color: var(--black);
  cursor: pointer;
  box-shadow: 0 24px 70px rgba(0,0,0,0.16);
  transition: 0.3s cubic-bezier(.2,.8,.2,1);
}

.play-btn svg {
  width: 30px;
  height: 30px;
  margin-left: 3px;
}

.video-edit-card:hover .play-btn {
  transform: translate(-50%, -50%) scale(1.12);
}

.video-edit-content {
  padding: 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.edit-number {
  color: var(--soft);
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 22px;
}

.video-edit-content h2 {
  color: var(--black);
  font-size: clamp(2.7rem, 5.5vw, 5.1rem);
  line-height: 0.93;
  letter-spacing: -3px;
  margin-bottom: 22px;
}

.video-edit-content p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 24px;
}

.edit-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}

.edit-tags span {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(0,0,0,0.055);
  color: var(--black);
  font-size: 13px;
  font-weight: 800;
}

.watch-edit {
  width: fit-content;
}

.more-edits-cta {
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto 110px;
  padding: 42px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}

.more-edits-cta h2 {
  color: var(--black);
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.96;
  letter-spacing: -2px;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.86);
  backdrop-filter: blur(20px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.video-modal.active {
  display: flex;
}

.video-modal video {
  width: min(1000px, 100%);
  max-height: 82vh;
  border-radius: 24px;
  background: black;
  box-shadow: 0 40px 120px rgba(0,0,0,0.55);
}

.close-modal {
  position: fixed;
  top: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.92);
  color: var(--black);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.close-modal svg {
  width: 26px;
  height: 26px;
}

@media (max-width: 900px) {
  .video-edit-card,
  .more-edits-cta {
    grid-template-columns: 1fr;
  }

  .video-preview {
    min-height: 360px;
  }

  .more-edits-cta {
    text-align: center;
  }

  .more-edits-cta .btn {
    margin: 0 auto;
  }
}

@media (max-width: 680px) {
  .video-edits-list,
  .more-edits-cta {
    width: min(100% - 28px, 1060px);
  }

  .video-edit-content,
  .more-edits-cta {
    padding: 28px;
  }

  .video-preview {
    min-height: 260px;
  }

  .watch-edit {
    width: 100%;
  }
}

.templates-showcase-list{width:min(1060px,calc(100% - 48px));margin:0 auto;padding-bottom:80px;display:grid;gap:34px}
.template-showcase-card{overflow:hidden;display:grid;grid-template-columns:1.05fr .95fr}
.template-image-wrap{position:relative;min-height:430px;background:#0b0b0b;overflow:hidden}
.template-image-wrap>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:.5s;z-index:2}
.template-showcase-card:hover .template-image-wrap>img{transform:scale(1.045)}
.template-image-fallback{position:absolute;inset:0;display:grid;place-items:center;align-content:center;gap:14px;color:#fff;background:linear-gradient(135deg,#161616,#050505);z-index:1}
.template-image-fallback svg{width:52px;height:52px}
.template-image-fallback span{color:rgba(255,255,255,.68);font-size:14px;font-weight:800}
.template-showcase-content{padding:46px;display:flex;flex-direction:column;justify-content:center}
.template-meta-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}
.template-number{color:var(--soft);font-size:15px;font-weight:900}
.template-type{padding:9px 13px;border-radius:999px;background:rgba(0,0,0,.055);font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:2px}
.template-showcase-content h2{font-size:clamp(2.7rem,5vw,5rem);line-height:.93;letter-spacing:-3px;margin-bottom:22px}
.template-showcase-content>p{color:var(--muted);line-height:1.8;margin-bottom:24px}
.template-tags{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:34px}
.template-tags span{padding:9px 13px;border-radius:999px;background:rgba(0,0,0,.055);font-size:13px;font-weight:800}
.template-actions{display:flex;flex-wrap:wrap;gap:14px}
.templates-contact-cta{width:min(1060px,calc(100% - 48px));margin:0 auto 110px;padding:42px;display:grid;grid-template-columns:1fr auto;gap:32px;align-items:center}
.templates-contact-cta h2{font-size:clamp(2.4rem,5vw,4.4rem);line-height:.96;letter-spacing:-3px;margin-bottom:14px}
.templates-contact-cta>div>p:last-child{color:var(--muted);line-height:1.8}
@media(max-width:900px){.template-showcase-card,.templates-contact-cta{grid-template-columns:1fr}.template-image-wrap{min-height:360px}.templates-contact-cta{text-align:center}.templates-contact-cta .btn{margin:0 auto}}
@media(max-width:680px){.templates-showcase-list,.templates-contact-cta{width:min(100% - 28px,1060px)}.template-showcase-content,.templates-contact-cta{padding:28px}.template-image-wrap{min-height:260px}.template-actions{flex-direction:column}.template-actions .btn{width:100%}}
/* ========= VIDEO EDITS PAGE ========= */

.video-page-hero{
padding:140px 0 60px;
width:min(1060px,calc(100% - 48px));
margin:auto;
}

.video-edits-list{
width:min(1060px,calc(100% - 48px));
margin:auto;
display:grid;
gap:34px;
padding-bottom:80px;
}

.video-edit-card{
display:grid;
grid-template-columns:1.05fr .95fr;
overflow:hidden;
}

.drive-preview{
position:relative;
min-height:420px;
background:#0b0b0b;
display:flex;
justify-content:center;
align-items:center;
overflow:hidden;
}

.drive-preview::before{
content:"";
position:absolute;
width:280px;
height:280px;
border-radius:50%;
background:radial-gradient(circle,rgba(255,255,255,.12),transparent 70%);
filter:blur(10px);
}

.drive-preview::after{
content:"VIDEO";
position:absolute;
bottom:30px;
left:30px;
font-size:12px;
letter-spacing:4px;
color:rgba(255,255,255,.35);
}

.play-btn{
width:82px;
height:82px;
border-radius:50%;
display:grid;
place-items:center;
background:rgba(255,255,255,.88);
backdrop-filter:blur(20px);
transition:.35s;
z-index:2;
}

.play-btn:hover{
transform:scale(1.12);
}

.video-edit-content{
padding:46px;
display:flex;
flex-direction:column;
justify-content:center;
}

.edit-number{
font-size:14px;
font-weight:800;
opacity:.5;
margin-bottom:16px;
}

.video-edit-content h2{
font-size:clamp(3rem,5vw,5rem);
line-height:.92;
margin-bottom:22px;
}

.video-edit-content p{
line-height:1.8;
color:#666;
margin-bottom:24px;
}

.edit-tags{
display:flex;
gap:10px;
flex-wrap:wrap;
margin-bottom:28px;
}

.edit-tags span{
padding:9px 14px;
border-radius:999px;
background:#f2f2f2;
font-size:13px;
font-weight:700;
}

@media(max-width:900px){

.video-edit-card{
grid-template-columns:1fr;
}

.drive-preview{
min-height:300px;
}

.video-edit-content{
padding:30px;
}

}


/* ========= VIDEO EDITS ANIMATIONS ========= */

.reveal-section,
.reveal-card {
  opacity: 0;
  transform: translateY(38px);
  filter: blur(10px);
  transition:
    opacity 0.8s cubic-bezier(.2,.8,.2,1),
    transform 0.8s cubic-bezier(.2,.8,.2,1),
    filter 0.8s cubic-bezier(.2,.8,.2,1);
}

.reveal-section.is-visible,
.reveal-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.video-edit-card {
  position: relative;
  transition:
    transform 0.35s cubic-bezier(.2,.8,.2,1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
  will-change: transform;
}

.video-edit-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      120deg,
      transparent 25%,
      rgba(255,255,255,.32) 42%,
      transparent 58%
    );
  transform: translateX(-120%);
  transition: transform .75s ease;
}

.video-edit-card:hover::after {
  transform: translateX(120%);
}

.video-edit-card:hover {
  box-shadow: 0 38px 95px rgba(0,0,0,.16);
}

.drive-preview::before {
  animation: previewPulse 4.5s ease-in-out infinite;
}

.drive-preview::after {
  transition: transform .35s ease, color .35s ease;
}

.video-edit-card:hover .drive-preview::after {
  transform: translateX(6px);
  color: rgba(255,255,255,.58);
}

.play-btn {
  box-shadow:
    0 18px 55px rgba(0,0,0,.22),
    0 0 0 0 rgba(255,255,255,.55);
  animation: playPulse 2.4s ease-in-out infinite;
}

.play-btn:hover {
  box-shadow:
    0 26px 70px rgba(0,0,0,.28),
    0 0 0 16px rgba(255,255,255,0);
}

.play-btn svg {
  transition: transform .3s ease;
}

.play-btn:hover svg {
  transform: translateX(3px) scale(1.08);
}

.video-edit-content h2 {
  transition: transform .35s ease;
}

.video-edit-card:hover .video-edit-content h2 {
  transform: translateY(-4px);
}

.edit-tags span {
  transition:
    transform .3s cubic-bezier(.2,.8,.2,1),
    background .3s ease,
    color .3s ease;
}

.edit-tags span:hover {
  transform: translateY(-5px);
  background: #0b0b0b;
  color: #fff;
}

.animated-btn {
  position: relative;
  overflow: hidden;
  transition:
    transform .3s cubic-bezier(.2,.8,.2,1),
    box-shadow .3s ease;
}

.animated-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.12);
  transform: translateX(-110%);
  transition: transform .45s ease;
}

.animated-btn:hover::before {
  transform: translateX(110%);
}

.animated-btn svg {
  width: 17px;
  height: 17px;
  transition: transform .3s ease;
}

.animated-btn:hover svg {
  transform: translate(4px,-4px);
}

@keyframes previewPulse {
  0%, 100% {
    transform: scale(.92);
    opacity: .75;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes playPulse {
  0%, 100% {
    box-shadow:
      0 18px 55px rgba(0,0,0,.22),
      0 0 0 0 rgba(255,255,255,.30);
  }
  50% {
    box-shadow:
      0 22px 65px rgba(0,0,0,.26),
      0 0 0 12px rgba(255,255,255,0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-section,
  .reveal-card,
  .video-edit-card,
  .play-btn,
  .drive-preview::before,
  .motion-ready .hero-card,
  .motion-ready .hero-img,
  .motion-ready .hero-content > *,
  .motion-ready .crazy-card,
  .motion-ready .section-head h2,
  .motion-ready .about-copy h2,
  .motion-ready .venture-banner h2,
  .motion-ready .page-hero h1 {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
  }

  .motion-ready .hero-card,
  .motion-ready .about-card,
  .motion-ready .service-card,
  .motion-ready .venture-banner,
  .motion-ready .case-study,
  .motion-ready .certificate-card,
  .motion-ready .template-card,
  .motion-ready .contact-card {
    translate: none !important;
  }
}

@media (max-width: 760px) {
  .motion-ready .hero.motion-hero {
    height: 175vh;
  }

  .motion-ready .hero.motion-hero .hero-card {
    top: 88px;
    height: calc(100vh - 106px);
    min-height: 540px;
    scale: calc(1 + var(--hero-scroll) * .035);
  }

  .motion-ready .motion-section[data-motion-side] .section-head,
  .motion-ready .motion-section[data-motion-side] .about-card,
  .motion-ready .motion-section[data-motion-side] .venture-banner {
    translate: 0 0;
  }

  .motion-ready .crazy-card,
  .motion-ready .crazy-card > * {
    transform: none;
  }

}

/* ========= SMOOTH PORTRAIT MODE + HELLO INTRO ========= */

/* The portrait is the fixed background on every portfolio page. */
.profile-site-background {
  background: #111;
  color: #fff;
}

.profile-site-background .page-grid-bg {
  z-index: -1;
  opacity: 1;
  mask-image: none;
  background: none;
  filter: none;
  transform: none !important;
}

.profile-site-background .page-grid-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 1;
  background:
    linear-gradient(rgba(7,7,7,.55), rgba(7,7,7,.72)),
    url("images/profile.png") center 28% / cover no-repeat;
}

.profile-site-background main :where(h1, h2, h3, h4, p, li, span),
.profile-site-background footer,
.profile-site-background .section-label,
.profile-site-background .page-text {
  color: #fff !important;
  text-shadow: 0 2px 18px rgba(0,0,0,.22);
}

.profile-site-background main :where(p, li),
.profile-site-background footer {
  color: rgba(255,255,255,.82) !important;
}

.profile-site-background .skill-strip,
.profile-site-background .surface,
.profile-site-background .service-card,
.profile-site-background .case-study,
.profile-site-background .certificate-card,
.profile-site-background .template-card,
.profile-site-background .video-edit-card,
.profile-site-background .tech-card,
.profile-site-background .features-card,
.profile-site-background .contact-card {
  color: #fff;
  background: rgba(10,10,10,.32) !important;
  border-color: rgba(255,255,255,.24) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.18);
  backdrop-filter: none !important;
}

/* Skills stay inside the page and use solid black, high-contrast cards. */
.profile-site-background .skill-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 12px;
  overflow: visible;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.profile-site-background .skill-strip span {
  width: 100%;
  min-width: 0;
  justify-content: center;
  color: #fff !important;
  background: #050505 !important;
  min-height: 62px;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.26) !important;
  box-shadow: 0 14px 38px rgba(0,0,0,.18);
}

/* Keep the full name readable throughout the hero pin. */
.motion-ready .hero.motion-hero .hero-content {
  max-width: 760px;
  opacity: 1;
  translate: 0 0;
  clip-path: none;
  transform: none;
}

.profile-site-background .hero-card {
  background: #050505;
}

.profile-site-background .hero-overlay {
  background:
    linear-gradient(90deg, rgba(0,0,0,.90), rgba(0,0,0,.54) 46%, rgba(0,0,0,.16)),
    linear-gradient(0deg, rgba(0,0,0,.58), transparent 50%);
}

.profile-site-background .hero-content {
  max-width: 760px;
  padding: clamp(110px, 14vh, 148px) 72px 150px;
}

.profile-site-background .hero-content h1 {
  max-width: 100%;
  font-size: clamp(4.25rem, 7.2vw, 7.3rem);
  line-height: .88;
  letter-spacing: -4px;
}

.profile-site-background .hero-actions {
  position: relative;
  z-index: 3;
}

.profile-site-background .hero-meta {
  bottom: 24px;
  align-items: center;
}

.profile-site-background .hero-meta span:first-child {
  max-width: 48%;
}

.profile-site-background .about-skill-tags span,
.profile-site-background .tech-tags span,
.profile-site-background .edit-tags span,
.profile-site-background .project-status {
  color: #fff !important;
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.22) !important;
}

/* Remove speed-coupled effects that caused text jitter and expensive paint. */
.pin-scroll-page {
  scroll-snap-type: none;
}

.motion-ready .page-grid-bg,
.motion-ready .skill-strip,
.motion-ready .section-head h2,
.motion-ready .about-copy h2,
.motion-ready .venture-banner h2,
.motion-ready .page-hero h1 {
  transform: none !important;
  letter-spacing: inherit;
}

.motion-ready .skill-strip span,
.motion-ready .service-grid .service-card,
.motion-ready .motion-section[data-motion-side] .section-head,
.motion-ready .motion-section[data-motion-side] .about-card,
.motion-ready .motion-section[data-motion-side] .venture-banner,
.motion-ready .hero-card,
.motion-ready .about-card,
.motion-ready .service-card,
.motion-ready .venture-banner,
.motion-ready .case-study,
.motion-ready .certificate-card,
.motion-ready .template-card,
.motion-ready .contact-card {
  translate: 0 0;
}

.motion-ready .crazy-card > * {
  transform: none;
}

@media (max-width: 760px) {
  .profile-site-background .page-grid-bg::before {
    background-position: 58% center;
  }

  .profile-site-background .skill-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-site-background .hero-content {
    padding: 112px 28px 156px;
  }

  .profile-site-background .hero-content h1 {
    font-size: clamp(3.8rem, 18vw, 6rem);
    letter-spacing: -3px;
  }

  .profile-site-background .hero-meta {
    left: 28px;
    right: 28px;
    gap: 14px;
    align-items: flex-end;
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .profile-site-background .skill-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Final state overrides must follow the shared portrait-background rules. */
.profile-site-background.pin-scroll-page:not(.wallpaper-active) .page-grid-bg::before {
  opacity: 0;
}

.profile-site-background.pin-scroll-page.wallpaper-active .page-grid-bg::before {
  opacity: 1;
}

@media (max-width: 760px) {
  body.motion-ready.nav-at-bottom .top-nav {
    top: calc(100dvh - 74px);
  }
}

/* ========= HORIZONTAL PAGE RAIL ========= */

.page-rail-section {
  display: none;
}

/* ========= PAGE-TO-PAGE EDGE NAVIGATION ========= */

.page-edge-nav {
  width: min(1160px, calc(100% - 48px));
  min-height: 230px;
  margin: 90px auto 24px;
  padding: 38px 42px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 34px;
  color: #fff;
  background: rgba(5,5,5,.76);
  box-shadow: 0 30px 90px rgba(0,0,0,.24);
}

.edge-direction {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.edge-next {
  align-items: flex-end;
  text-align: right;
}

.edge-direction:empty {
  min-height: 1px;
}

.edge-direction span {
  color: rgba(255,255,255,.58) !important;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.edge-direction strong {
  color: #fff;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: .94;
  letter-spacing: -.045em;
}

.edge-current {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 50%;
}

.edge-current span {
  color: rgba(255,255,255,.72) !important;
  font-size: 12px;
  font-weight: 800;
}

body {
  transition: opacity .36s ease, transform .36s cubic-bezier(.4,0,.2,1);
}

body.page-leaving-left {
  opacity: 0;
  transform: translateX(-34px);
}

body.page-leaving-right {
  opacity: 0;
  transform: translateX(34px);
}

.page-swipe-curtain {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 8vw, 140px);
  color: #fff;
  background: #050505;
  pointer-events: none;
  transition: transform .58s cubic-bezier(.76,0,.24,1);
}

.page-swipe-curtain.from-right {
  align-items: flex-start;
  transform: translateX(100%);
}

.page-swipe-curtain.from-left {
  align-items: flex-end;
  text-align: right;
  transform: translateX(-100%);
}

.page-swipe-curtain.is-active {
  transform: translateX(0);
}

.page-swipe-curtain span {
  margin-bottom: 18px;
  color: rgba(255,255,255,.58);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.page-swipe-curtain strong {
  max-width: 100%;
  font-size: clamp(4rem, 13vw, 12rem);
  line-height: .82;
  letter-spacing: -.075em;
}

@media (max-width: 760px) {
  body.inner-page.nav-at-bottom .top-nav {
    top: calc(100dvh - 74px);
  }

  .page-edge-nav {
    min-height: 190px;
    padding: 28px 24px;
    grid-template-columns: 1fr;
    gap: 18px;
    border-radius: 26px;
  }

  .edge-current {
    display: none;
  }

  .edge-next {
    align-items: flex-start;
    text-align: left;
  }

  .edge-direction strong {
    font-size: clamp(2.2rem, 12vw, 4rem);
  }
}

.page-rail-head {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto 42px;
}

.page-rail-head h2 {
  max-width: 800px;
  color: #fff;
  font-size: clamp(3rem, 6vw, 6.4rem);
  line-height: .94;
  letter-spacing: -.055em;
}

.rail-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: rgba(255,255,255,.74) !important;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.rail-hint svg {
  width: 18px;
}

.page-rail {
  display: flex;
  gap: 22px;
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.55) rgba(255,255,255,.1);
  padding: 0 max(24px, calc((100vw - 1160px) / 2)) 32px;
}

.page-rail-card {
  position: relative;
  flex: 0 0 min(72vw, 720px);
  min-height: 430px;
  padding: clamp(34px, 5vw, 64px);
  overflow: hidden;
  scroll-snap-align: center;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 38px;
  color: #fff;
  background: rgba(5,5,5,.82);
  box-shadow: 0 35px 95px rgba(0,0,0,.28);
  transition: transform .45s cubic-bezier(.16,1,.3,1), border-color .35s ease;
}

.page-rail-card:hover {
  transform: translateY(-10px) scale(.99);
  border-color: rgba(255,255,255,.58);
}

.page-rail-card > span {
  color: rgba(255,255,255,.55) !important;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .18em;
}

.page-rail-card h3 {
  max-width: 90%;
  margin-top: 76px;
  color: #fff;
  font-size: clamp(3.5rem, 7vw, 7.8rem);
  line-height: .86;
  letter-spacing: -.065em;
}

.page-rail-card p {
  max-width: 430px;
  margin-top: 24px;
  color: rgba(255,255,255,.72) !important;
  font-size: 16px;
  line-height: 1.6;
}

.page-rail-card > svg {
  position: absolute;
  top: 44px;
  right: 44px;
  width: 30px;
  height: 30px;
}

/* Contact/social links use solid black cards and white typography. */
.profile-site-background .contact-links-card {
  background: transparent !important;
  border-color: rgba(255,255,255,.24) !important;
}

.profile-site-background .contact-links-card a {
  color: #fff !important;
  background: #050505 !important;
  border: 1px solid rgba(255,255,255,.24) !important;
  box-shadow: 0 16px 45px rgba(0,0,0,.22);
}

.profile-site-background .contact-links-card a strong,
.profile-site-background .contact-links-card a span,
.profile-site-background .contact-links-card a svg {
  color: #fff !important;
}

.profile-site-background .contact-links-card a span {
  opacity: .72;
}

@media (max-width: 760px) {
  .page-rail-section {
    padding: 80px 0 120px;
  }

  .page-rail-card {
    flex-basis: 86vw;
    min-height: 370px;
    border-radius: 28px;
  }

  .page-rail-card h3 {
    margin-top: 62px;
    font-size: clamp(3.2rem, 16vw, 5.8rem);
  }
}
