/* ============================================================
   PHAM PORTFOLIO — style.css
   Dark Cinematic Theme | Bebas Neue + Syne
   ============================================================ */

:root {
  --black:    #080808;
  --dark:     #0f0f0f;
  --card-bg:  rgba(255,255,255,0.04);
  --border:   rgba(255,255,255,0.08);
  --violet:   #7B2FFF;
  --violet-dim: #4a1ab0;
  --cyan:     #00F0FF;
  --white:    #ffffff;
  --grey:     #888;
  --display:  'Bebas Neue', sans-serif;
  --body:     'Syne', sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  overflow-x: hidden;
  cursor: none;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- GRAIN ---- */
.grain {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.04;
}

/* ---- CURSOR ---- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 99999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}
.cursor-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  transition: transform 0.1s var(--ease-out);
}
.cursor-ring {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(123,47,255,0.6);
  transition: transform 0.18s var(--ease-out), width 0.3s, height 0.3s;
}
body:hover .cursor-dot, body:hover .cursor-ring { opacity: 1; }

/* ---- CONTAINER ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---- REVEAL ANIMATIONS ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out) var(--d, 0s),
              transform 0.8s var(--ease-out) var(--d, 0s);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed; top: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(-80px);
  z-index: 1000;
  width: calc(100% - 4rem);
  max-width: 780px;
  opacity: 0;
  transition: transform 0.7s var(--ease-out), opacity 0.7s var(--ease-out);
}
.navbar.loaded {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.navbar.hidden {
  transform: translateX(-50%) translateY(-110%);
}
.nav-inner {
  display: flex; align-items: center; gap: 2rem;
  background: rgba(8,8,8,0.75);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 60px;
  padding: 0.75rem 1.5rem;
}
.nav-logo {
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  color: var(--white);
  margin-right: auto;
}
.nav-links {
  display: flex; gap: 2rem;
}
.nav-links a {
  font-family: var(--body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--white); }
.nav-cta {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--grey);
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.nav-cta:hover {
  border-color: var(--violet);
  color: var(--violet);
  background: rgba(123,47,255,0.1);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  padding: 10rem 2rem 6rem;
}
.hero-glow {
  position: absolute; border-radius: 50%;
  filter: blur(120px); pointer-events: none;
}
.glow-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(123,47,255,0.35) 0%, transparent 70%);
  top: -10%; left: -5%;
  animation: floatGlow1 10s ease-in-out infinite alternate;
}
.glow-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,240,255,0.15) 0%, transparent 70%);
  bottom: 0; right: 5%;
  animation: floatGlow2 12s ease-in-out infinite alternate;
}
@keyframes floatGlow1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60px, 40px) scale(1.15); }
}
@keyframes floatGlow2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-40px, -30px) scale(1.1); }
}

/* Blob */
.hero-blob {
  position: absolute;
  width: min(620px, 90vw);
  aspect-ratio: 1;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: blobFloat 8s ease-in-out infinite;
}
@keyframes blobFloat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%       { transform: translate(-50%, -52%) scale(1.03); }
}
.blob-inner {
  width: 100%; height: 100%;
  border-radius: 62% 38% 46% 54% / 50% 60% 40% 50%;
  background: radial-gradient(ellipse at 40% 35%, rgba(123,47,255,0.28) 0%, rgba(8,8,8,0.6) 70%);
  border: 1px solid rgba(123,47,255,0.15);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.blob-visual { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.film-strip {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
}
.film-hole {
  width: 8px; height: 8px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
}
.film-frame {
  width: 80px; height: 50px;
  border: 1px solid rgba(123,47,255,0.5);
  background: rgba(123,47,255,0.1);
  border-radius: 2px;
}

/* Hero Content */
.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  max-width: 900px;
}
.hero-headline {
  font-family: var(--display);
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}
.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px);
  animation: wordReveal 0.8s var(--ease-out) var(--d, 0s) forwards;
}
.hero-line2 { display: block; }
.hero-line2 em { font-style: normal; color: var(--violet); }
@keyframes wordReveal {
  to { opacity: 1; transform: translateY(0); }
}
.accent-word { position: relative; }
.inline-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(123,47,255,0.25);
  border: 1px solid rgba(123,47,255,0.4);
  border-radius: 40px;
  padding: 6px 14px;
  margin-left: 12px;
  vertical-align: middle;
  transform: translateY(-4px);
}
.pill-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan);
  animation: pillPulse 1.5s ease-in-out infinite;
}
.pill-dot:nth-child(2) { animation-delay: 0.2s; background: var(--violet); }
.pill-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes pillPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(0.7); opacity: 0.5; }
}

.hero-sub {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: var(--grey);
  letter-spacing: 0.08em;
  max-width: 520px;
  margin: 0 auto 2.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: wordReveal 0.8s var(--ease-out) var(--d, 0s) forwards;
}
.hero-ctas {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  animation: wordReveal 0.8s var(--ease-out) var(--d, 0s) forwards;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center;
  font-family: var(--body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  transition: all 0.3s var(--ease-out);
  cursor: none;
}
.btn-ghost {
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}
.btn-filled {
  background: var(--violet);
  color: var(--white);
  border: 1px solid transparent;
}
.btn-filled:hover {
  background: #9248ff;
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(123,47,255,0.5);
}

.hero-scroll-hint {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem; letter-spacing: 0.3em;
  color: var(--grey);
  animation: scrollBounce 2s ease-in-out infinite;
}
.hero-scroll-hint::after {
  content: ''; display: block;
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--grey), transparent);
  margin: 0.5rem auto 0;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   WORK SECTION
   ============================================================ */
.work-section {
  padding: 8rem 0;
  position: relative;
}
.section-header { margin-bottom: 2rem; }
.section-label {
  font-size: 0.7rem; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--violet);
  display: block; margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
}
.section-title em { font-style: normal; color: var(--violet); }

/* Filter Bar */
.filter-bar {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 3rem;
}
.filter-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--grey);
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  cursor: none;
  transition: all 0.25s;
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--violet);
  color: var(--white);
  background: rgba(123,47,255,0.15);
}

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 220px;
  gap: 1rem;
}
.project-card.landscape { grid-column: span 8; grid-row: span 1; }
.project-card.portrait  { grid-column: span 4; grid-row: span 2; }
/* reorder for visual rhythm */
.project-card:nth-child(1) { grid-column: 1 / span 8; }
.project-card:nth-child(2) { grid-column: 1 / span 8; }
.project-card:nth-child(3) { grid-column: 9 / span 4; grid-row: 1 / span 2; }
.project-card:nth-child(4) { grid-column: 9 / span 4; grid-row: 3 / span 2; }
.project-card:nth-child(5) { grid-column: 1 / span 8; }
.project-card:nth-child(6) { grid-column: 1 / span 4; grid-row: 4 / span 2; }

.project-card {
  position: relative; border-radius: 20px; overflow: hidden;
  cursor: none;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
.project-card:hover {
  transform: scale(1.02);
  box-shadow: 0 0 50px rgba(123,47,255,0.3);
}
.project-card.hidden { display: none; }
.card-thumb {
  width: 100%; height: 100%;
  position: relative;
  transition: transform 0.6s var(--ease-out);
}
.project-card:hover .card-thumb { transform: scale(1.05); }

.card-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.4s;
}
.project-card:hover .card-overlay { background: rgba(0,0,0,0.55); }
.play-btn {
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.8);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.6);
  transition: opacity 0.35s, transform 0.35s var(--ease-out);
}
.play-btn svg { width: 22px; height: 22px; margin-left: 3px; }
.project-card:hover .play-btn { opacity: 1; transform: scale(1); }
.card-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 1.25rem;
  transform: translateY(10px); opacity: 0;
  transition: transform 0.35s var(--ease-out) 0.05s, opacity 0.35s;
}
.project-card:hover .card-info { transform: translateY(0); opacity: 1; }
.card-info h3 {
  font-family: var(--display);
  font-size: 1.2rem; letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}
.card-info p {
  font-size: 0.7rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--cyan);
}
.card-label {
  position: absolute; top: 1rem; right: 1rem;
  font-family: var(--display);
  font-size: 1.5rem; color: rgba(255,255,255,0.15);
  letter-spacing: 0.05em;
}

/* ============================================================
   STATS
   ============================================================ */
.stats-section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  position: relative;
  transition: border-color 0.3s, transform 0.3s;
}
.stat-card:hover {
  border-color: rgba(123,47,255,0.4);
  transform: translateY(-4px);
}
.stat-trend {
  position: absolute; top: 1rem; right: 1rem;
  font-size: 1rem; color: var(--cyan);
}
.stat-number {
  font-family: var(--display);
  font-size: clamp(3rem, 4vw, 4rem);
  line-height: 1;
  color: var(--white);
  display: inline;
}
.stat-suffix {
  font-family: var(--display);
  font-size: clamp(2rem, 3vw, 3rem);
  color: var(--violet);
  display: inline;
}
.stat-label {
  margin-top: 0.5rem;
  font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--grey);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-section {
  padding: 9rem 0;
  position: relative; overflow: hidden;
}
.about-glow {
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123,47,255,0.2) 0%, transparent 70%);
  left: -200px; top: 50%;
  transform: translateY(-50%);
  filter: blur(80px);
  pointer-events: none;
}
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-body {
  color: rgba(255,255,255,0.65);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* Decoration */
.about-visual { display: flex; align-items: center; justify-content: center; }
.about-decoration {
  position: relative;
  width: 340px; height: 340px;
}
.deco-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(123,47,255,0.25);
  animation: spinRing linear infinite;
}
.deco-ring-1 { inset: 0; animation-duration: 30s; }
.deco-ring-2 { inset: 30px; border-color: rgba(0,240,255,0.2); animation-duration: 20s; animation-direction: reverse; }
.deco-ring-3 { inset: 70px; border-color: rgba(123,47,255,0.15); animation-duration: 40s; }
@keyframes spinRing {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.deco-cross {
  position: absolute;
  width: 20px; height: 20px;
}
.deco-cross::before, .deco-cross::after {
  content: ''; position: absolute;
  background: var(--cyan);
}
.deco-cross::before { width: 100%; height: 1px; top: 50%; left: 0; }
.deco-cross::after  { width: 1px; height: 100%; left: 50%; top: 0; }
.deco-cross-1 { top: 20px; right: 40px; }
.deco-cross-2 { bottom: 40px; left: 20px; transform: rotate(45deg); }
.deco-blob {
  position: absolute; inset: 60px;
  border-radius: 60% 40% 55% 45% / 45% 55% 45% 55%;
  background: linear-gradient(135deg, rgba(123,47,255,0.3) 0%, rgba(0,240,255,0.1) 100%);
  animation: blobMorph 8s ease-in-out infinite;
}
@keyframes blobMorph {
  0%, 100% { border-radius: 60% 40% 55% 45% / 45% 55% 45% 55%; }
  50%       { border-radius: 40% 60% 45% 55% / 55% 45% 55% 45%; }
}
.deco-label {
  position: absolute; bottom: 80px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--display);
  font-size: 0.9rem; letter-spacing: 0.3em;
  color: rgba(255,255,255,0.4);
}

/* ============================================================
   PROCESS
   ============================================================ */
.process-section {
  padding: 8rem 0;
  background: linear-gradient(180deg, transparent 0%, rgba(123,47,255,0.05) 50%, transparent 100%);
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 4rem;
}
.process-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  color: var(--black);
  position: relative;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
}
.process-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(123,47,255,0.2);
}
.process-number {
  font-family: var(--display);
  font-size: 0.8rem; letter-spacing: 0.2em;
  color: var(--grey); margin-bottom: 1rem;
}
.process-icon {
  font-size: 1.8rem; color: var(--violet);
  margin-bottom: 1rem;
}
.process-card h3 {
  font-family: var(--display);
  font-size: 1.4rem; letter-spacing: 0.08em;
  color: var(--violet);
  margin-bottom: 0.75rem;
}
.process-card p {
  font-size: 0.85rem;
  color: #444;
  line-height: 1.7;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  padding: 8rem 0;
  position: relative; overflow: hidden;
  text-align: center;
}
.cta-bg-img {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0d0020 0%, #1a0040 40%, #0a1a30 100%);
}
.cta-overlay {
  position: absolute; inset: 0;
  background: rgba(8,8,8,0.55);
}
.cta-inner { position: relative; z-index: 1; }
.cta-title {
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: 0.92; letter-spacing: 0.02em;
  margin-bottom: 3rem;
}
.cta-title em { font-style: normal; color: var(--cyan); }
.cta-form {
  display: flex; gap: 0; max-width: 560px; margin: 0 auto 1.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 60px;
  padding: 0.4rem 0.4rem 0.4rem 1.5rem;
  align-items: center;
}
.email-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--white);
  font-family: var(--body); font-size: 0.9rem;
  letter-spacing: 0.05em;
}
.email-input::placeholder { color: var(--grey); }
.cta-send { white-space: nowrap; padding: 0.75rem 1.5rem; font-size: 0.72rem; }
.cta-fine {
  font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--grey);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem;
}
.footer-inner {
  display: flex; align-items: center; gap: 2rem;
  margin-bottom: 2rem;
}
.footer-logo {
  font-family: var(--display);
  font-size: 1.6rem; letter-spacing: 0.05em;
  margin-right: auto;
}
.footer-nav {
  display: flex; gap: 2rem;
}
.footer-nav a {
  font-size: 0.75rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--grey);
  transition: color 0.25s;
}
.footer-nav a:hover { color: var(--white); }
.footer-socials {
  display: flex; gap: 1rem;
}
.footer-socials a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--grey);
  transition: border-color 0.25s, color 0.25s;
}
.footer-socials a svg { width: 16px; height: 16px; }
.footer-socials a:hover { border-color: var(--violet); color: var(--violet); }
.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.footer-bottom p {
  font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--grey);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; }
  .about-visual { display: none; }
}
@media (max-width: 768px) {
  .project-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .project-card.landscape,
  .project-card.portrait,
  .project-card:nth-child(n) {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .project-card.landscape .card-thumb { height: 220px; }
  .project-card.portrait  .card-thumb { height: 380px; }
  .nav-links { display: none; }
  .footer-inner { flex-direction: column; gap: 1.5rem; text-align: center; }
  .footer-logo { margin-right: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .cta-form { flex-direction: column; padding: 1rem; border-radius: 20px; }
  .email-input { width: 100%; padding: 0.5rem; }
  .cta-send { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}
