/*
  Nomel ESMEL — Portfolio 3D
  Redesign : dark luxury + modern interactions
*/

/* ── Reset & Custom Properties ───────────────────────────── */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
  scrollbar-color: rgba(193,135,59,.7) rgba(15,12,10,.9);
  scrollbar-width: thin;
}

:root {
  --bg: #0a0806;
  --bg-card: rgba(18,14,11,.85);
  --text: #f3e7d5;
  --text-dim: rgba(243,231,213,.55);
  --accent: #d4a54a;
  --accent-soft: rgba(212,165,74,.18);
  --border: rgba(225,194,138,.15);
  --radius: 20px;
  --radius-sm: 12px;
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
}

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
video,
iframe {
  max-width: 100%;
}

button,
a {
  touch-action: manipulation;
}

/* Custom scrollbar */
body::-webkit-scrollbar { width: 8px; }
body::-webkit-scrollbar-track { background: var(--bg); }
body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), rgba(107,82,62,.8));
  border-radius: 99px;
}

/* ── Custom Cursor ───────────────────────────────────────── */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity .3s;
}
body.cursor-ready .cursor-dot,
body.cursor-ready .cursor-ring { opacity: 1; }

.cursor-dot {
  width: 6px; height: 6px;
  background: #fff;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 40px; height: 40px;
  border: 1.5px solid rgba(255,255,255,.5);
  transform: translate(-50%, -50%);
  transition: width .3s var(--ease-spring), height .3s var(--ease-spring),
              border-color .3s, opacity .3s;
}
.cursor-ring.hover {
  width: 64px; height: 64px;
  border-color: var(--accent);
}
.cursor-ring.click {
  width: 28px; height: 28px;
}

@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ── Page Shell ──────────────────────────────────────────── */
.page-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 100vh;
}

/* ── Background Scene ────────────────────────────────────── */
.background-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(212,165,74,.12), transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(132,99,71,.1), transparent 50%),
    var(--bg);
}

.background-sky {
  position: absolute;
  inset: -12%;
  width: 124%; height: 124%;
  object-fit: cover;
  opacity: .55;
  filter: saturate(.8) brightness(.9);
  transform: scale(1.1);
  animation: bg-drift 140s linear infinite alternate;
  mask-image: radial-gradient(white 0%, white 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(white 0%, white 30%, transparent 80%);
}

.gradient-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  mix-blend-mode: screen;
  will-change: transform;
}
.sphere-1 { width: 40vw; height: 40vw; background: linear-gradient(120deg, rgba(212,165,74,.5), rgba(132,99,71,.35)); }
.sphere-2 { width: 45vw; height: 45vw; background: linear-gradient(240deg, rgba(107,82,62,.5), rgba(62,53,44,.4)); }
.sphere-3 { width: 30vw; height: 30vw; background: linear-gradient(60deg, rgba(193,135,59,.35), rgba(89,68,53,.3)); }

.background-glow {
  position: absolute;
  width: 50vw; height: 50vw;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(212,165,74,.1), transparent 70%);
  filter: blur(60px);
  animation: glow-pulse 16s ease-in-out infinite alternate;
  pointer-events: none;
}

.background-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(243,231,213,.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(243,231,213,.03) 1px, transparent 1px);
  background-size: 100px 100px;
  opacity: .4;
}

.background-noise {
  position: absolute;
  inset: 0;
  opacity: .06;
  pointer-events: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.5"/></svg>');
}

.starfield, .interactive-particles {
  position: absolute; inset: 0; pointer-events: none;
}
.starfield { z-index: 1; transition: transform .6s ease-out; }
.interactive-particles { z-index: 2; }

.star {
  position: absolute;
  width: calc(var(--star-size,1) * 2px);
  height: calc(var(--star-size,1) * 2px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.9), transparent 70%);
  opacity: 0;
  animation: star-float var(--star-duration,32s) linear infinite;
  animation-delay: var(--star-delay,0s);
}

.interactive-particles .floating-particle {
  position: absolute;
  width: calc(var(--particle-size,3) * 1px);
  height: calc(var(--particle-size,3) * 1px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.7), transparent 70%);
  opacity: 0;
  animation: particle-drift var(--particle-duration,14s) ease-in-out infinite;
  animation-delay: var(--particle-delay,0s);
  filter: blur(.3px);
}

.interactive-particles .floating-particle.pointer-trail {
  background: radial-gradient(circle, rgba(243,231,213,.9), rgba(193,135,59,.4) 70%, transparent);
  filter: none;
  animation: particle-trail 1.8s ease-out forwards;
}

@keyframes bg-drift {
  from { transform: scale(1.1) translate3d(0,0,0); }
  to   { transform: scale(1.1) translate3d(-3%,-2%,0); }
}
@keyframes glow-pulse {
  from { opacity: .25; transform: translate(-50%,-50%) scale(.95); }
  to   { opacity: .6;  transform: translate(-50%,-50%) scale(1.08); }
}
@keyframes star-float {
  0%   { transform: translate3d(0,120%,0) scale(.7); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translate3d(0,-120%,0) scale(1.05); opacity: 0; }
}
@keyframes particle-drift {
  0%   { transform: translate3d(0,0,0) scale(.8); opacity: 0; }
  20%  { opacity: .4; }
  50%  { opacity: .6; }
  100% { transform: translate3d(var(--particle-drift-x,4%),var(--particle-drift-y,-18%),0) scale(1.05); opacity: 0; }
}
@keyframes particle-trail {
  from { transform: translate3d(0,0,0) scale(1); opacity: .7; }
  to   { transform: translate3d(var(--particle-distance,8%),calc(var(--particle-distance,8%) * -1),0) scale(.4); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .background-sky, .background-glow, .star,
  .interactive-particles .floating-particle,
  .nova-header::before, .nova-header::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
  .background-sky, .gradient-sphere, .background-glow, .page-shell {
    transform: none !important;
  }
}

/* ── Header / Navigation ─────────────────────────────────── */
.nova-header {
  position: fixed;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  width: min(1100px, calc(100% - 32px));
  padding: .5rem .6rem;
  border-radius: 100px;
  background: rgba(15,12,10,.7);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  backdrop-filter: blur(20px) saturate(150%);
  z-index: 1000;
  transition: top .35s ease, width .4s ease, padding .3s ease, border-radius .35s ease,
              transform .4s var(--ease-out);
}

.nova-header .glow-rail {
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(212,165,74,.08), transparent 30%, transparent 70%, rgba(212,165,74,.08));
  z-index: 0;
  pointer-events: none;
}

.nova-header::before {
  content: '';
  position: absolute;
  top: -1px; left: 20%; right: 20%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .4;
  z-index: 1;
}

.nova-header::after { display: none; }

.header-inner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: clamp(12px,2vw,20px);
  padding: .3rem clamp(.8rem,2vw,1.2rem);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-orb {
  width: 36px; height: 36px;
  border-radius: 10px;
  background:
    url('media/icon_portfolio.png') center/65% no-repeat,
    linear-gradient(135deg, rgba(212,165,74,.25), rgba(15,12,10,.9));
  box-shadow: 0 4px 16px rgba(212,165,74,.2);
}

.brand-meta { display: flex; flex-direction: column; gap: 1px; }

.brand .logo {
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .88rem;
  text-decoration: none;
  color: var(--text);
}
.brand .logo::after { content: none; }

.brand .tagline {
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.nav-shell {
  display: flex; align-items: center;
  flex: 1; justify-content: center;
}

.nav-track {
  padding: .3rem .4rem;
  border-radius: 99px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}

#site-navigation {
  display: flex; align-items: center;
  gap: clamp(4px,1.5vw,14px);
}

#site-navigation a {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: .03em;
  font-size: .82rem;
  padding: .45rem .7rem;
  border-radius: 99px;
  position: relative;
  transition: color .25s, background .25s;
}

#site-navigation a:hover,
#site-navigation a:focus-visible {
  color: var(--text);
  background: rgba(255,255,255,.06);
}

#site-navigation a.nav-contact {
  color: var(--bg);
  background: var(--accent);
  font-weight: 600;
}
#site-navigation a.nav-contact:hover {
  background: #e8bd6a;
  box-shadow: 0 8px 24px rgba(212,165,74,.35);
}

.header-actions {
  display: flex; align-items: center; gap: 8px;
}

.status-pill {
  padding: .35rem .75rem;
  border-radius: 99px;
  border: 1px solid rgba(212,165,74,.3);
  background: rgba(212,165,74,.08);
  color: var(--text);
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: .7rem;
  display: inline-flex; gap: 6px; align-items: center;
}
.status-pill::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74,222,128,.6);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(.85); }
}

.language-toggle {
  padding: .4rem .8rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .1em;
  font-size: .72rem;
  transition: color .25s, border-color .25s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.language-toggle:hover { color: var(--text); border-color: var(--accent); }

.burger-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  position: relative;
  transition: background .25s;
}
.burger-toggle:hover { background: rgba(255,255,255,.08); }

.burger-toggle .burger-line {
  position: absolute; left: 50%;
  width: 18px; height: 1.5px;
  background: currentColor;
  transform: translateX(-50%);
  transition: transform .3s ease, opacity .3s;
}
.burger-line--top { top: 15px; }
.burger-line--bottom { bottom: 15px; }

.js-nav-ready #site-navigation {
  transition: opacity .25s, visibility .25s, transform .25s;
}

/* Condensed mobile island on scroll */
.nova-header.is-condensed {
  box-shadow: 0 16px 44px rgba(0,0,0,.58);
}

.nova-header.menu-open .burger-line--top { transform: translate(-50%, 5px) rotate(45deg); }
.nova-header.menu-open .burger-line--bottom { transform: translate(-50%, -5px) rotate(-45deg); }
.nova-header.menu-open .burger-toggle { background: rgba(255,255,255,.1); }

.nova-header.sticky {
  top: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,.6);
}
.nova-header.menu-open { overflow: visible; }

@media (max-width: 1024px) {
  .nova-header { width: min(100%, calc(100% - 24px)); }
  .nova-header .status-pill { display: none; }
  .burger-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .nova-header #site-navigation {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%; transform: translateX(-50%) translateY(-6px);
    width: min(600px, calc(100vw - 24px));
    padding: .8rem;
    flex-direction: column;
    align-items: stretch;
    border-radius: 16px;
    background: rgba(10,8,6,.95);
    border: 1px solid var(--border);
    box-shadow: 0 20px 48px rgba(0,0,0,.6);
    backdrop-filter: blur(20px);
    opacity: 0; visibility: hidden;
    pointer-events: none;
    gap: 4px;
  }
  .nova-header.menu-open #site-navigation {
    opacity: 1; visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
  #site-navigation a { width: 100%; text-align: center; }

  .nova-header.is-condensed:not(.menu-open) {
    top: max(8px, env(safe-area-inset-top));
    width: auto;
    max-width: calc(100% - 24px);
    padding: .28rem;
    border-radius: 999px;
    background: rgba(15,12,10,.84);
    backdrop-filter: blur(16px) saturate(140%);
  }

  .nova-header.is-condensed:not(.menu-open) .header-inner {
    flex-wrap: nowrap;
    gap: .35rem;
    padding: .12rem;
  }

  .nova-header.is-condensed:not(.menu-open) .brand {
    gap: 0;
  }

  .nova-header.is-condensed:not(.menu-open) .brand-orb {
    width: 34px;
    height: 34px;
    border-radius: 999px;
  }

  .nova-header.is-condensed:not(.menu-open) .brand-meta {
    display: none;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateX(-6px);
    pointer-events: none;
  }

  .nova-header.is-condensed:not(.menu-open) .nav-shell {
    display: none;
  }

  .nova-header.is-condensed:not(.menu-open) .nav-track {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .nova-header.is-condensed:not(.menu-open) .language-toggle,
  .nova-header.is-condensed:not(.menu-open) .burger-toggle {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 999px;
  }

  .nova-header.is-condensed.menu-open {
    width: min(100%, calc(100% - 24px));
    border-radius: 18px;
  }
}

@media (max-width: 640px) {
  .nova-header { padding: .4rem; top: 12px; border-radius: 16px; }
  .nova-header .header-inner { flex-wrap: wrap; justify-content: space-between; row-gap: 6px; }
  .brand .logo { font-size: .84rem; }

  .nova-header.is-condensed:not(.menu-open) {
    max-width: calc(100% - 20px);
  }
}

body.nav-open { overflow: hidden; touch-action: none; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(120px,18vh,200px) clamp(24px,6vw,80px) clamp(80px,12vh,140px);
  max-width: 1400px;
  margin: 0 auto;
}

.hero > * { position: relative; z-index: 1; }

.hero .subtitle {
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  margin: 0 0 24px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  color: var(--text);
}

.hero h1 .text-accent {
  background: linear-gradient(120deg, var(--accent), #f0d48a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-dim);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 32px;
}

/* Tools marquee */
.tools-marquee {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  margin: 24px 0 36px;
  mask-image: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, white 10%, white 90%, transparent);
}

.tools-track {
  display: flex;
  gap: 32px;
  animation: marquee 30s linear infinite;
  width: max-content;
}

.tools-track span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.tools-track span img {
  width: 22px; height: 22px;
  object-fit: contain;
  filter: grayscale(.3);
  transition: filter .3s;
}
.tools-track span:hover img { filter: grayscale(0); }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.buttons a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 99px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .3s var(--ease-out);
  cursor: pointer;
  min-height: 48px;
}

.buttons .primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 12px 32px rgba(212,165,74,.3);
}
.buttons .primary:hover {
  box-shadow: 0 16px 40px rgba(212,165,74,.45);
  transform: translateY(-2px);
}

.buttons .secondary {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255,255,255,.04);
}
.buttons .secondary:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.2);
  transform: translateY(-2px);
}

/* Shimmer effect */
.shimmer { position: relative; overflow: hidden; }
.shimmer::after {
  content: '';
  position: absolute;
  top: -50%; left: -150%;
  width: 200%; height: 200%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.2) 50%, transparent 100%);
  transform: rotate(25deg);
  transition: left .6s ease;
}
.shimmer:hover::after { left: 150%; }

.pulse { position: relative; }
.pulse::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(212,165,74,.3);
  transition: box-shadow .4s;
}
.pulse:hover::before {
  box-shadow: 0 0 20px 2px rgba(212,165,74,.15);
}

@media (max-width: 640px) {
  .hero {
    min-height: auto;
    padding: 11rem clamp(18px,5vw,28px) clamp(60px,12vw,90px);
  }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 3.2rem); }
  .hero .tagline {
    font-size: 1rem;
    line-height: 1.6;
  }
  .tools-track { gap: 24px; }
}

@media (max-width: 480px) {
  .buttons { flex-direction: column; }
  .buttons a { width: 100%; justify-content: center; }
}

/* ── Section Commons ─────────────────────────────────────── */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .72rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 8px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.section-heading-text { max-width: 820px; }

.section-heading h2,
.showreel h2,
.carousel-gallery h2,
.about-text h2,
.contact-text h2 {
  font-size: clamp(2rem, 1.2rem + 2vw, 3rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 8px;
}

.categories-intro {
  color: var(--text-dim);
  font-size: clamp(.9rem, .85rem + .25vw, 1.05rem);
  margin: 0;
}

/* ── Demo Reel ───────────────────────────────────────────── */
.showreel {
  padding: clamp(80px,12vw,140px) clamp(20px,5vw,48px);
  border-top: 1px solid var(--border);
}

.showreel-inner {
  max-width: min(1400px, 96vw);
  margin: 0 auto;
  text-align: center;
  display: grid;
  gap: clamp(28px,5vw,48px);
}

.showreel .video-player {
  width: min(100%, 1600px);
  margin-inline: auto;
}

.showreel-intro {
  margin: 0 auto;
  max-width: 600px;
  color: var(--text-dim);
}

.showreel-hint {
  margin: .5rem auto 0;
  font-size: .88rem;
  color: var(--text-dim);
}

.showreel-links { margin-top: .8rem; text-align: center; }

.showreel-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.1rem;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .04em;
  font-size: .82rem;
  text-transform: uppercase;
  transition: all .3s;
}
.showreel-link::after { content: '\2197'; font-size: .85rem; opacity: .7; }
.showreel-link:hover {
  border-color: rgba(255,255,255,.5);
  box-shadow: 0 8px 20px rgba(255,255,255,.08);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .showreel { padding: clamp(48px,14vw,72px) clamp(14px,5vw,20px); }
}

/* ── Project Showcase ────────────────────────────────────── */
.project-showcase {
  width: 100%;
  min-width: 0;
  padding: clamp(80px,10vw,140px) clamp(20px,5vw,48px);
  border-top: 1px solid var(--border);
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  gap: clamp(48px,7vw,72px);
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: .82rem;
  letter-spacing: .02em;
  transition: all .3s;
}
.ghost-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(212,165,74,.15);
  transform: translateY(-1px);
}

.project-collection {
  display: grid;
  gap: clamp(24px,4vw,40px);
}

/* Project card with 3D tilt */
.project-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px,.9fr) minmax(500px,1.3fr);
  align-items: stretch;
  gap: clamp(16px,3vw,28px);
  padding: clamp(20px,3vw,32px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
  overflow: hidden;
  transition: transform .5s var(--ease-out), box-shadow .5s ease, border-color .4s;
  transform-style: preserve-3d;
  perspective: 1000px;
  min-width: 0;
}

.project-card:hover {
  border-color: rgba(212,165,74,.3);
  box-shadow: 0 32px 70px rgba(0,0,0,.5), 0 0 40px rgba(212,165,74,.06);
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(212,165,74,.08), transparent 40%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s;
}
.project-card:hover::before { opacity: 1; }

.project-meta {
  display: flex;
  flex-direction: column;
  gap: clamp(10px,1.2vw,14px);
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: clamp(12px,1.5vw,18px);
}

.project-meta h3 {
  margin: 0;
  font-size: clamp(1.3rem,1rem + .8vw,1.7rem);
  font-weight: 700;
  letter-spacing: -.01em;
}

.project-tag {
  margin: 0;
  display: inline-flex;
  align-self: flex-start;
  padding: .2rem .55rem;
  border-radius: 6px;
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(212,165,74,.2);
}

.project-copy {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.65;
  font-size: .92rem;
}

.project-visual {
  margin: 0;
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.project-visual figcaption {
  margin: 0;
  font-size: .85rem;
  color: var(--text-dim);
}

/* Video frames */
.video-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(15,12,10,.8);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
  overflow: hidden;
  position: relative;
}

.video-frame video {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.video-frame::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,.3);
  z-index: 3;
  pointer-events: none;
  transition: opacity .35s;
}
.video-frame:hover::before { opacity: 0; }

.video-frame::after {
  content: '';
  position: absolute; inset: 0; margin: auto;
  width: clamp(56px,7vw,72px);
  height: clamp(56px,7vw,72px);
  background: rgba(212,165,74,.9);
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M8.5 5.5v13l10-6.5-10-6.5z"/></svg>') center/55% no-repeat;
  border-radius: 50%;
  z-index: 4;
  pointer-events: none;
  transition: transform .35s var(--ease-spring), opacity .35s;
  opacity: .85;
}
.video-frame:hover::after { transform: scale(1.1); opacity: 1; }

.video-frame.is-hydrated::before,
.video-frame.is-playing::before {
  opacity: 0;
}

.video-frame.is-hydrated::after,
.video-frame.is-playing::after {
  opacity: 0;
  transform: scale(.86);
}

@media (max-width: 1080px) {
  .project-card { grid-template-columns: 1fr; }
  .project-meta { order: 2; }
}

@media (max-width: 900px) {
  .section-heading { flex-direction: column; }
  .project-actions { margin-left: 0; }
}

@media (max-width: 640px) {
  .project-card { padding: 14px; border-radius: 14px; }
  .project-tag { font-size: .64rem; }
}

/* ── Video Player ────────────────────────────────────────── */
.video-player {
  position: relative;
  width: 100%;
  max-width: min(100%, 1600px);
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(15,12,10,.8);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
}
.video-player .plyr, .video-player video { width: 100%; height: 100%; display: block; }
.video-player .plyr { border-radius: inherit; }
.video-player video { object-fit: cover; background: var(--bg); }

.video-fallback {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  padding: .65rem .9rem;
  border-radius: var(--radius-sm);
  background: rgba(10,8,6,.9);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
  color: var(--text);
  display: flex; align-items: center;
  justify-content: space-between; gap: 10px;
  opacity: 0; transform: translateY(8px);
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.video-fallback.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.video-fallback p { margin: 0; font-size: .85rem; }
.video-fallback a {
  padding: .4rem .8rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  font-size: .82rem;
}

/* ── Carousel Gallery ────────────────────────────────────── */
.carousel-gallery {
  position: relative;
  padding: clamp(80px,12vw,140px) 20px;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.carousel-gallery::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(100% 120% at 50% 0%, rgba(212,165,74,.08), transparent 60%);
  pointer-events: none;
}

.carousel-gallery > * { position: relative; z-index: 1; }

.carousel-gallery h2 { text-align: center; margin-bottom: 12px; }

.carousel-gallery .gallery-intro {
  margin: 0 auto clamp(32px,5vw,48px);
  max-width: 600px;
  text-align: center;
  color: var(--text-dim);
}

.gallery-glide {
  position: relative;
  max-width: min(1000px, 92vw);
  margin: 0 auto;
  padding-inline: clamp(12px,4vw,36px);
  min-width: 0;
}

.gallery-glide .glide__track { overflow: visible; }
.gallery-glide .glide__slides { list-style: none; margin: 0; padding: 0; }
.glide__slide { display: flex; justify-content: center; }

.gallery-slide {
  position: relative;
  width: min(880px, 100%);
  margin: 0;
}

.gallery-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: rgba(24,18,14,.6);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.gallery-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.6) 100%);
  pointer-events: none;
}
.gallery-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s var(--ease-out);
}
.glide__slide:hover .gallery-media img { transform: scale(1.04); }

.gallery-slide figcaption {
  position: absolute;
  left: clamp(20px,4vw,36px);
  right: clamp(20px,4vw,36px);
  bottom: clamp(20px,4vw,36px);
  margin: 0;
  font-size: clamp(.88rem,.85rem + .25vw,1.08rem);
  font-weight: 500;
  color: rgba(255,255,255,.9);
  text-shadow: 0 8px 24px rgba(0,0,0,.6);
  pointer-events: none;
  z-index: 1;
}

.gallery-glide .glide__arrows {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  justify-content: space-between;
  pointer-events: none;
  padding-inline: clamp(0px,1vw,12px);
}

.gallery-glide .glide__arrow {
  pointer-events: auto;
  width: clamp(42px,3.5vw,52px);
  height: clamp(42px,3.5vw,52px);
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(15,12,10,.7);
  color: var(--text);
  display: grid; place-items: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all .3s;
}
.gallery-glide .glide__arrow span { font-size: 1.1rem; }
.gallery-glide .glide__arrow:hover {
  background: rgba(212,165,74,.15);
  border-color: rgba(212,165,74,.4);
}
.gallery-glide .glide__arrow[disabled] { opacity: .3; pointer-events: none; }

.gallery-glide .glide__bullets {
  margin-top: clamp(24px,5vw,40px);
  display: flex; justify-content: center;
  gap: clamp(6px,1.5vw,10px);
}
.gallery-glide .glide__bullet {
  width: 44px; height: 44px;
  border-radius: 99px;
  border: none;
  background: radial-gradient(circle, rgba(255,255,255,.3) 0 5px, transparent 6px);
  cursor: pointer;
  transition: all .3s;
}
.gallery-glide .glide__bullet:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.gallery-glide .glide__bullet.glide__bullet--active {
  background: radial-gradient(circle, var(--accent) 0 10px, transparent 11px);
}

@media (max-width: 560px) {
  .gallery-media { aspect-ratio: 4/3; }
  .gallery-glide .glide__arrows { display: none; }
}

/* ── About ───────────────────────────────────────────────── */
.about {
  padding: clamp(80px,10vw,120px) 20px;
  border-top: 1px solid var(--border);
}

.about.recruiter-layout {
  display: grid;
  grid-template-columns: minmax(380px, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(24px,5vw,40px);
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.about-text p {
  margin: 0 0 16px;
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 700px;
}

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

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
}
.about-image img {
  display: block;
  width: 100%; height: auto;
  transition: transform .6s var(--ease-out);
}
.about-image:hover img { transform: scale(1.03); }

.about-summary {
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.about-summary h3 { margin: 0 0 12px; font-size: 1.1rem; }
.about-summary ul {
  list-style: none; padding: 0; margin: 0 0 16px;
  display: grid; gap: 8px;
  font-size: .92rem; color: var(--text-dim);
}
.about-summary .label { display: inline-block; width: 1.6em; }

.cv-buttons {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.cv-buttons a {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: .85rem;
  text-decoration: none;
  font-weight: 600;
  transition: all .3s;
  min-height: 44px;
}
.cv-buttons .btn-download {
  background: var(--accent);
  color: var(--bg);
}
.cv-buttons .btn-download:hover {
  box-shadow: 0 8px 24px rgba(212,165,74,.35);
  transform: translateY(-1px);
}
.cv-buttons .btn-contact {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}
.cv-buttons .btn-contact:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

@media (max-width: 900px) {
  .about.recruiter-layout { grid-template-columns: 1fr; }
  .about.recruiter-layout .about-image { min-width: 0; }
}

/* ── Contact ─────────────────────────────────────────────── */
.contact-panel {
  padding: clamp(80px,10vw,120px) 20px;
  border-top: 1px solid var(--border);
  position: relative;
}
.contact-panel::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(212,165,74,.06), transparent 60%);
  pointer-events: none;
}

.contact-text {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  display: grid;
  gap: 10px;
  position: relative;
}
.contact-text p { margin: 0; color: var(--text-dim); }

.contact-actions {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.contact-actions .primary {
  padding: 14px 28px;
  border-radius: 99px;
  text-decoration: none;
  color: var(--bg);
  background: var(--accent);
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(212,165,74,.3);
  transition: all .3s var(--ease-out);
}
.contact-actions .primary:hover {
  box-shadow: 0 16px 40px rgba(212,165,74,.45);
  transform: translateY(-2px);
}

.contact-actions .secondary {
  padding: 13px 24px;
  border-radius: 99px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 600;
  transition: all .3s;
}
.contact-actions .secondary:hover {
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.04);
  transform: translateY(-1px);
}

.social-links {
  display: inline-flex;
  gap: 10px;
}
.social-links a {
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: .88rem;
  transition: all .3s;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.social-links a:hover {
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(212,165,74,.15);
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: clamp(32px,5vw,48px) 20px;
  border-top: 1px solid var(--border);
  font-size: .82rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.footer p { margin: 0; }

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  color: rgba(243,231,213,.4);
  text-decoration: none;
  font-size: .78rem;
  letter-spacing: .04em;
  transition: color .25s;
}
.footer-links a:hover { color: var(--accent); }

/* ── Scroll Reveal ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* Staggered children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
.stagger-children.revealed > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(2) { transition-delay: .08s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(3) { transition-delay: .16s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(4) { transition-delay: .24s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(5) { transition-delay: .32s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(6) { transition-delay: .4s; opacity: 1; transform: translateY(0); }

/* ── Scroll progress bar ─────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  z-index: 9998;
  background: transparent;
}
.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #f0d48a);
  transition: width .1s linear;
}

/* ── Sketchfab page compatibility ────────────────────────── */
.sketchfab-viewer {
  padding: clamp(80px,12vw,120px) 20px;
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  gap: clamp(22px,5vw,32px);
}
.viewer-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(15,12,10,.8);
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
.viewer-frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none;
}
.viewer-links { display: flex; flex-wrap: wrap; gap: 10px; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .stagger-children > * { opacity: 1; transform: none; transition: none; }
  .tools-track { animation: none; }
  .gallery-media img { transition: none; }
}

@media (max-width: 768px), (pointer: coarse) {
  .background-sky {
    animation: none;
    opacity: .42;
    filter: saturate(.72) brightness(.76);
    transform: scale(1.03);
  }

  .gradient-sphere,
  .background-glow,
  .starfield,
  .interactive-particles {
    display: none;
  }

  .background-grid {
    background-size: 72px 72px;
    opacity: .24;
  }

  .scroll-progress {
    display: none;
  }

  .tools-marquee {
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .tools-track {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    animation: none;
    gap: 16px 20px;
  }

  .shimmer::after,
  .pulse::before {
    display: none;
  }

  .project-card {
    backdrop-filter: none;
    transform-style: flat;
    perspective: none;
    box-shadow: 0 14px 34px rgba(0,0,0,.34);
  }

  .project-card:hover,
  .buttons a:hover,
  .ghost-btn:hover,
  .showreel-link:hover,
  .contact-actions .primary:hover,
  .contact-actions .secondary:hover {
    transform: none;
  }

  .gallery-media img,
  .about-image img {
    transition: none;
  }
}
