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

:root {
  --bg: #0a0a0f;
  --bg-2: #111118;
  --bg-3: #1a1a26;
  --accent: #7c3aed;
  --accent-2: #a855f7;
  --accent-glow: rgba(124, 58, 237, 0.35);
  --cyan: #06b6d4;
  --pink: #ec4899;
  --text: #e2e2f0;
  --text-muted: #8585a8;
  --border: rgba(255,255,255,0.07);
  --radius: 16px;
  --nav-h: 72px;
  --font-body: 'Space Grotesk', sans-serif;
  --font-display: 'Syne', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

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

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

.container {
  width: min(1160px, 92vw);
  margin-inline: auto;
}

.section {
  padding-block: 100px;
}

.section__eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 12px;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 48px;
}

.outline {
  -webkit-text-stroke: 2px var(--accent-2);
  color: transparent;
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 5vw;
  transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}
.nav__logo span { color: var(--accent-2); }

.nav__links {
  list-style: none;
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav__links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav__links a:hover { color: #fff; }

.nav__cta {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.2s !important;
}
.nav__cta:hover {
  background: var(--accent-2) !important;
  transform: translateY(-1px);
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__burger span {
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  display: block;
  transition: transform 0.3s, opacity 0.3s;
}

/* mobile menu */
.nav__links.open {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: rgba(10,10,15,0.97);
  justify-content: center;
  align-items: center;
  gap: 32px;
}
.nav__links.open a { font-size: 1.4rem; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: none;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}
.btn--primary:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(168, 85, 247, 0.5);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  transform: translateY(-2px);
}

/* ===== HERO ===== */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* animated film reels in background */
.reel {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(124,58,237,0.15);
}
.reel--1 { width: 600px; height: 600px; top: -100px; left: -200px; animation: spin 40s linear infinite; }
.reel--2 { width: 400px; height: 400px; bottom: -100px; right: -100px; animation: spin 30s linear infinite reverse; }
.reel--3 { width: 260px; height: 260px; top: 30%; right: 10%; animation: spin 20s linear infinite; border-color: rgba(6,182,212,0.12); }

.reel::before, .reel::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px solid rgba(124,58,237,0.1);
}
.reel::after { inset: 24px; border-color: rgba(124,58,237,0.07); }

@keyframes spin { to { transform: rotate(360deg); } }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
}
.orb--a { width: 500px; height: 500px; background: var(--accent); top: -150px; left: -100px; animation: float 12s ease-in-out infinite; }
.orb--b { width: 380px; height: 380px; background: var(--cyan); bottom: -100px; right: -80px; animation: float 16s ease-in-out infinite reverse; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-40px) scale(1.05); }
}

.hero__content { position: relative; z-index: 2; }

.hero__eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 20px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 12vw, 9rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.hero__title .outline {
  -webkit-text-stroke: 3px rgba(168,85,247,0.7);
  color: transparent;
  display: inline-block;
}

.hero__sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 36px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  animation: bounce 2.5s ease-in-out infinite;
}
.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent-2), transparent);
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== ABOUT ===== */
.about { background: var(--bg-2); }

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

/* Film strip visual */
.about__frame {
  position: relative;
  display: flex;
  justify-content: center;
}
.frame-inner {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(124,58,237,0.2), 0 20px 60px rgba(0,0,0,0.6);
  width: 240px;
}
.film-strip {
  display: flex;
  flex-direction: column;
  padding: 12px 8px;
  gap: 6px;
}
.film-hole {
  height: 16px;
  background: repeating-linear-gradient(90deg, #1a1a1a 0, #1a1a1a 14px, #000 14px, #000 26px);
  border-radius: 4px;
}
.film-frame {
  height: 120px;
  border-radius: 6px;
  background: var(--bg-3);
  position: relative;
  overflow: hidden;
}
.f1 { background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%); }
.f2 { background: linear-gradient(135deg, #06b6d4 0%, #7c3aed 100%); }
.f3 { background: linear-gradient(135deg, #ec4899 0%, #7c3aed 100%); }
.f4 { background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); }

.f1::after, .f2::after, .f3::after, .f4::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='20' fill='rgba(255,255,255,0.08)'/%3E%3C/svg%3E") center / 60px;
}

.about__badge {
  position: absolute;
  bottom: -12px;
  right: -12px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 0 0 20px var(--accent-glow);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
  50% { box-shadow: 0 0 36px rgba(124,58,237,0.6); }
}

.about__text .section__title { margin-bottom: 20px; }
.about__text p { color: var(--text-muted); margin-bottom: 16px; }
.about__text strong { color: var(--text); }

.about__stats {
  display: flex;
  gap: 40px;
  margin-top: 32px;
}
.stat { text-align: center; }
.stat__num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent-2);
  line-height: 1;
}
.stat span { font-size: 2rem; font-weight: 800; color: var(--accent-2); }
.stat p { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.1em; }

/* ===== WORK ===== */
.work__filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter {
  padding: 8px 20px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.filter:hover { border-color: var(--accent-2); color: var(--accent-2); }
.filter.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg-2);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 30px var(--accent-glow);
}
.card.hidden { display: none; }

.card__thumb {
  position: relative;
  height: 200px;
  overflow: hidden;
  cursor: pointer;
}
.card__play {
  position: absolute;
  z-index: 3;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--accent);
  transition: transform 0.3s;
}
.card:hover .card__play { transform: translate(-50%, -50%) scale(1); }
.card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,15,0.4);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover .card__overlay { opacity: 1; }

/* Card art backgrounds */
.card__art {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card__art--1 { background: linear-gradient(135deg, #1e1b4b, #312e81); }
.card__art--2 { background: linear-gradient(135deg, #0f172a, #1e3a5f); }
.card__art--3 { background: linear-gradient(135deg, #1a0533, #2d1052); }
.card__art--4 { background: linear-gradient(135deg, #052e16, #14532d); }
.card__art--5 { background: linear-gradient(135deg, #1c1917, #292524); }
.card__art--6 { background: linear-gradient(135deg, #1e1b4b, #0c4a6e); }

/* decorative art elements */
.art-char {
  width: 60px; height: 90px;
  background: rgba(255,255,255,0.15);
  border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%;
  box-shadow: 0 -20px 0 -5px rgba(255,255,255,0.1);
  animation: sway 3s ease-in-out infinite;
}
@keyframes sway {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

.cube {
  width: 60px; height: 60px;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCube 6s linear infinite;
}
@keyframes rotateCube {
  to { transform: rotateX(360deg) rotateY(360deg); }
}
.face {
  position: absolute;
  width: 60px; height: 60px;
  border: 2px solid rgba(99,179,237,0.6);
  background: rgba(99,179,237,0.05);
}
.front  { transform: translateZ(30px); }
.back   { transform: rotateY(180deg) translateZ(30px); }
.left   { transform: rotateY(-90deg) translateZ(30px); }
.right  { transform: rotateY(90deg) translateZ(30px); }
.top    { transform: rotateX(90deg) translateZ(30px); }
.bottom { transform: rotateX(-90deg) translateZ(30px); }

.motion-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.motion-lines div {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
  animation: slide 2s ease-in-out infinite;
}
.motion-lines div:nth-child(1) { width: 120px; animation-delay: 0s; }
.motion-lines div:nth-child(2) { width: 80px; animation-delay: 0.2s; }
.motion-lines div:nth-child(3) { width: 140px; animation-delay: 0.4s; }
.motion-lines div:nth-child(4) { width: 60px; animation-delay: 0.6s; }
.motion-lines div:nth-child(5) { width: 100px; animation-delay: 0.8s; }
@keyframes slide {
  0%, 100% { transform: translateX(-20px); opacity: 0.4; }
  50% { transform: translateX(20px); opacity: 1; }
}

.butterfly {
  width: 80px; height: 80px;
  position: relative;
}
.butterfly::before, .butterfly::after {
  content: '';
  position: absolute;
  width: 40px; height: 60px;
  background: rgba(167,243,208,0.3);
  border: 1.5px solid rgba(167,243,208,0.6);
  border-radius: 50% 50% 0 50%;
  top: 10px;
}
.butterfly::before { left: 0; transform-origin: right center; animation: wingL 1.4s ease-in-out infinite; }
.butterfly::after  { right: 0; border-radius: 50% 50% 50% 0; transform-origin: left center; animation: wingR 1.4s ease-in-out infinite; }
@keyframes wingL { 0%, 100% { transform: rotateY(0); } 50% { transform: rotateY(-60deg); } }
@keyframes wingR { 0%, 100% { transform: rotateY(0); } 50% { transform: rotateY(60deg); } }

.sphere-anim {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #a78bfa, #4c1d95);
  box-shadow: 0 0 30px rgba(139,92,246,0.5);
  animation: morph 4s ease-in-out infinite;
}
@keyframes morph {
  0%, 100% { border-radius: 50%; transform: scale(1); }
  50% { border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%; transform: scale(1.08); }
}

.wave-anim {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 60px;
}
.wave-anim span {
  width: 10px;
  background: linear-gradient(to top, var(--cyan), var(--accent-2));
  border-radius: 4px;
  animation: wave 1.2s ease-in-out infinite;
}
.wave-anim span:nth-child(1) { animation-delay: 0s;    height: 30%; }
.wave-anim span:nth-child(2) { animation-delay: 0.1s;  height: 70%; }
.wave-anim span:nth-child(3) { animation-delay: 0.2s;  height: 100%; }
.wave-anim span:nth-child(4) { animation-delay: 0.3s;  height: 60%; }
.wave-anim span:nth-child(5) { animation-delay: 0.4s;  height: 40%; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

.card__info { padding: 20px; }
.card__tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  display: block;
  margin-bottom: 8px;
}
.card__info h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.card__info p { font-size: 0.87rem; color: var(--text-muted); }

/* ===== SKILLS ===== */
.skills { background: var(--bg-2); }

.skills__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}

.skill-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.3s, transform 0.3s;
}
.skill-card:hover { border-color: var(--accent); transform: translateY(-4px); }

.skill-card__icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: block;
}
.skill-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.skill-card p { font-size: 0.87rem; color: var(--text-muted); margin-bottom: 16px; }

.skill-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.skill-bar__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 4px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tools { text-align: center; }
.tools__label {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.tools__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.tools__list span {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.2s;
}
.tools__list span:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  background: rgba(168,85,247,0.07);
}

/* ===== CONTACT ===== */
.contact__inner { max-width: 680px; margin-inline: auto; text-align: center; }
.contact__sub { color: var(--text-muted); margin-bottom: 40px; }

.contact__form { text-align: left; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.form__group label { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; color: var(--text-muted); text-transform: uppercase; }

.form__group input,
.form__group textarea {
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.form__group input::placeholder,
.form__group textarea::placeholder { color: var(--text-muted); opacity: 0.6; }
.form__group input:focus,
.form__group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.contact__form .btn { width: 100%; justify-content: center; margin-top: 8px; }

.contact__socials {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
}
.social-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
}
.social-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 1px;
  background: var(--accent-2);
  transform: scaleX(0);
  transition: transform 0.2s;
}
.social-link:hover { color: var(--accent-2); }
.social-link:hover::after { transform: scaleX(1); }

/* ===== FOOTER ===== */
.footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer p { font-size: 0.84rem; color: var(--text-muted); }
.footer__tag { color: var(--accent-2); }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--bg-3);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s;
  z-index: 999;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
  .about__visual { order: -1; display: flex; justify-content: center; }
  .work__grid { grid-template-columns: repeat(2, 1fr); }
  .skills__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section { padding-block: 64px; }
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .work__grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .footer .container { flex-direction: column; gap: 8px; }
  .about__stats { gap: 24px; }
}
