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

:root {
  --cream: #F5EDE0;
  --cream-light: #FDF9F3;
  --ink: #1A1A1A;
  --ink-soft: #2D2D2D;
  --pink: #F472B6;
  --pink-bold: #E8449A;
  --teal: #34D399;
  --teal-deep: #0D9488;
  --purple: #8B5CF6;
  --purple-deep: #6D28D9;
  --purple-bg: #7C3AED;
  --orange: #FB923C;
  --lilac: #C4B5FD;
  --yellow: #FDE68A;
  --blue: #60A5FA;
  --stone: #9A948C;
  --divider: #E5DFD4;

  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --radius: 20px;
}

html { scroll-padding-top: 80px; }

/* ===== Loading Screen ===== */
body {
  background: var(--cream);
}

/* Loading screen — single blob scales up to fill screen, then overlay fades */
.loading-screen {
  position: fixed; inset: 0; z-index: 9998;
  background: var(--ink); display: flex;
  align-items: center; justify-content: center;
  transition: opacity 1s ease;
}
.loading-screen.fading {
  opacity: 0;
  pointer-events: none;
}
.loading-screen.gone { display: none; }
.loading-blob-wrap {
  transition: transform 4s cubic-bezier(0.85, 0, 0.15, 1);
}
.loading-screen.expanding .loading-blob-wrap {
  transform: scale(100);
}
.loading-blob {
  width: 90px; height: 90px;
  background: var(--cream);
  border-radius: 62% 38% 53% 47% / 55% 46% 54% 45%;
  animation: blobMorph 4s ease-in-out infinite, loadPulse 1.5s ease-in-out infinite;
}
@keyframes loadPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

body {
  background: var(--ink);
  font-family: var(--font);
  color: var(--ink); -webkit-font-smoothing: antialiased;
  overflow-x: hidden; line-height: 1.6;
}
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
::selection { background: var(--purple); color: white; }

/* ===== Custom Cursor ===== */
.custom-cursor {
  position: fixed; z-index: 9999; pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.7s var(--ease), height 0.7s var(--ease),
    background 0.7s, border-radius 0.5s, opacity 0.4s,
    padding 0.7s var(--ease);
  opacity: 0; width: 12px; height: 12px;
  border-radius: 50%; background: var(--pink-bold);
}
.custom-cursor.visible { opacity: 1; }
.custom-cursor.hovering-card {
  width: auto; height: auto; border-radius: 100px;
  background: var(--pink-bold);
  padding: 14px 28px; color: var(--cream);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center;
  white-space: nowrap;
}

/* ===== Nav ===== */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 48px; transition: all 0.5s;
}
.site-nav.scrolled {
  background: rgba(245,237,224,0.94);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  padding: 14px 48px;
  border-bottom: none;
}
.nav-wave {
  position: absolute; bottom: -13px; left: -1px; right: -1px;
  height: 14px; pointer-events: none;
  opacity: 0; transition: opacity 0.5s;
  display: none;
}
.site-nav.scrolled .nav-wave { opacity: 1; }
.nav-wave svg {
  width: 100%; height: 100%; display: block;
}
.nav-logo {
  font-size: 1.1rem; font-weight: 800;
  letter-spacing: -0.03em; color: var(--ink);
}
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--stone); transition: color 0.3s;
}
.nav-links a:hover { color: var(--ink); }

/* ===== Hero ===== */
.hero {
  min-height: 100vh; background: var(--cream);
  display: flex; align-items: center;
  padding: 120px 48px 80px;
  position: relative; overflow: hidden;
}
.hero-inner {
  max-width: 1400px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1.1fr 1fr;
  align-items: center; gap: 48px;
}
.hero-text { position: relative; z-index: 2; }
.hero-greeting {
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--pink-bold); margin-bottom: 20px;
}
.hero-name {
  font-weight: 800; font-size: clamp(48px, 7vw, 96px);
  line-height: 1.15; letter-spacing: -0.04em; color: var(--ink);
}
.hero-name-line { display: block; }
.hero-desc {
  font-size: 1rem; color: var(--ink-soft);
  margin-top: 24px; max-width: 400px; line-height: 1.7;
  font-weight: 400; opacity: 0.6;
}
.hero-buttons { display: flex; gap: 14px; margin-top: 36px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 36px; background: var(--ink); color: var(--cream);
  border-radius: 100px; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: transform 0.5s var(--ease), box-shadow 0.5s;
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 30px rgba(26,26,26,0.2);
}
.btn-primary svg { transition: transform 0.5s var(--ease); }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 32px; background: transparent;
  color: var(--ink); border: 2px solid var(--divider);
  border-radius: 100px; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: border-color 0.5s, background 0.5s, transform 0.5s var(--ease);
}
.btn-outline:hover {
  border-color: var(--pink-bold); background: rgba(232,68,154,0.06);
  transform: translateY(-3px);
}

/* Hero Photo */
.hero-visual {
  position: relative; display: flex;
  align-items: center; justify-content: center;
}
.hero-blob {
  width: 100%; max-width: 440px; aspect-ratio: 4/5;
  border-radius: 62% 38% 53% 47% / 55% 46% 54% 45%;
  overflow: hidden; position: relative;
  animation: blobMorph 12s ease-in-out infinite;
  box-shadow: 0 0 50px rgba(232,68,154,0.3), 0 0 100px rgba(232,68,154,0.15);
}
.hero-blob image-slot { width: 100%; height: 100%; position: absolute; inset: 0; }
.hero-glow {
  position: absolute; width: 130%; height: 130%; top: -15%; left: -15%;
  border-radius: 62% 38% 53% 47% / 55% 46% 54% 45%;
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-bold) 50%, var(--lilac) 100%);
  opacity: 0.3; animation: blobMorph 12s ease-in-out infinite;
  animation-delay: -6s; z-index: -1; filter: blur(40px);
}

/* Floating shapes */
.hero-float { position: absolute; }
.hero-float-1 {
  width: 70px; height: 70px; top: -15px; right: -25px;
  background: var(--pink); border-radius: 50%;
}
.hero-float-2 {
  width: 45px; height: 45px; bottom: 25px; left: -30px;
  background: var(--pink-bold);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}
.hero-float-3 {
  width: 28px; height: 28px; top: 38%; right: -40px;
  background: var(--purple); border-radius: 50%;
}
.hero-float-4 {
  width: 55px; height: 55px; top: 12%; left: -45px;
  background: var(--yellow);
  border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%;
}
.hero-sparkle { position: absolute; animation: sparkle 3s ease-in-out infinite; }
.hero-sparkle-1 { top: 8%; right: 8%; }
.hero-sparkle-2 { bottom: 18%; left: 3%; animation-delay: 1s; }
.hero-sparkle-3 { top: 55%; right: -12%; animation-delay: 2s; }

/* ===== Wave Dividers ===== */
.wave-section {
  width: 100%; line-height: 0; overflow: hidden;
  margin-top: -2px; margin-bottom: -2px;
  position: relative; z-index: 2;
}
.wave-section svg { width: 100%; height: auto; display: block; }

/* ===== Projects ===== */
.projects-section {
  padding: 80px 48px 100px;
  background: var(--ink);
}
.projects-section > * {
  max-width: 1440px; margin-left: auto; margin-right: auto;
}
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 56px; gap: 20px;
}
.section-eyebrow {
  display: inline-block; font-size: 0.65rem; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cream); padding: 6px 16px; border-radius: 100px;
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.03em;
  color: var(--cream);
}
.section-title .pink { color: var(--pink-bold); }
.section-count {
  font-size: 0.72rem; font-weight: 700;
  color: rgba(245,237,224,0.4); letter-spacing: 0.06em;
  white-space: nowrap; padding-bottom: 8px;
}
.projects-grid { display: grid; gap: 28px; }
.project-row { display: grid; gap: 28px; }
.project-row.r-half { grid-template-columns: 1fr 1fr; }

.btn-see-more {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 36px; background: transparent;
  color: var(--cream); border: 2px solid rgba(245,237,224,0.25);
  border-radius: 100px; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  transition: border-color 0.5s, background 0.5s, transform 0.5s var(--ease);
  cursor: pointer;
}
.btn-see-more:hover {
  border-color: var(--pink-bold); background: rgba(232,68,154,0.1);
  transform: translateY(-3px);
}

/* Card */
.p-card {
  position: relative; overflow: visible;
  border-radius: var(--radius); cursor: none;
  transition: transform 0.6s var(--ease), filter 0.6s;
}
.p-card:hover {
  transform: translateY(-8px);
}
.p-card-img {
  overflow: hidden; border-radius: var(--radius);
  transition: box-shadow 0.6s var(--ease);
}
.p-card:hover .p-card-img {
  /* accent glow applied via inline style in JSX */
}
.p-card-img img {
  width: 100%; display: block; object-fit: cover;
  aspect-ratio: 16/9;
  transition: transform 0.8s var(--ease);
}
.p-card:hover .p-card-img img {
  transform: scale(1.04);
}
.p-card-bottom {
  padding: 14px 4px 4px;
  display: flex; justify-content: space-between; align-items: center;
}
.p-card-name { font-size: 1rem; font-weight: 700; color: var(--cream); }
.p-card-tag {
  font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 100px;
}

/* ===== About ===== */
.about-section {
  padding: 100px 48px 120px;
  background: var(--teal-deep); color: var(--cream);
  position: relative; overflow-x: clip;
}
.about-inner {
  max-width: 1100px; margin: 0 auto; text-align: center;
}
.about-section .section-eyebrow { background: var(--yellow); color: var(--ink); }
.about-text {
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  font-weight: 600; line-height: 1.55;
  text-wrap: pretty; max-width: 750px; margin: 0 auto;
}
.about-text .highlight {
  background: rgba(245,237,224,0.15); padding: 2px 8px; border-radius: 6px;
}
.about-deco {
  position: absolute; opacity: 0.08; pointer-events: none;
}
.about-deco-1 {
  width: 350px; height: 350px; bottom: -100px; right: -60px;
  background: var(--yellow);
  border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
  animation: blobMorph 14s ease-in-out infinite;
}
.about-deco-2 {
  width: 200px; height: 200px; top: -50px; left: -30px;
  background: var(--pink);
  border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%;
  animation: blobMorph 10s ease-in-out infinite 3s;
}

/* ===== Contact ===== */
.contact-section {
  padding: 120px 48px 100px; text-align: center;
  background: var(--purple-bg); color: var(--cream);
  position: relative; overflow-x: clip;
}
.contact-heading {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -0.03em; margin-bottom: 36px;
}
.contact-heading .yellow { color: var(--yellow); }
.contact-email {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: clamp(0.9rem, 1.4vw, 1.2rem); font-weight: 600;
  color: var(--cream); padding: 14px 32px;
  border: 2px solid rgba(245,237,224,0.3); border-radius: 100px;
  transition: border-color 0.5s, background 0.5s, transform 0.5s var(--ease);
}
.contact-email:hover {
  border-color: var(--cream); background: rgba(245,237,224,0.1);
  transform: translateY(-3px);
}
.contact-socials {
  display: flex; justify-content: center; gap: 28px; margin-top: 40px;
}
.contact-soc {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(245,237,224,0.5); transition: color 0.4s;
}
.contact-soc:hover { color: var(--cream); }
.contact-deco {
  position: absolute; opacity: 0.08; pointer-events: none;
}
.contact-deco-1 {
  width: 180px; height: 180px; top: -40px; right: 10%;
  background: var(--pink); border-radius: 50%;
}
.contact-deco-2 {
  width: 120px; height: 120px; bottom: -30px; left: 8%;
  background: var(--teal);
  border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%;
}

/* ===== Footer ===== */
.footer {
  padding: 24px 48px;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--cream);
}
.footer-copy { font-size: 0.68rem; font-weight: 500; color: var(--stone); }
.footer-top {
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--stone); transition: color 0.4s;
}
.footer-top:hover { color: var(--pink-bold); }

/* ===== Modal ===== */
.modal-bg {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26,26,26,0.45);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transition: opacity 0.4s; pointer-events: none;
}
.modal-bg.open { opacity: 1; pointer-events: auto; }
.modal-drawer {
  position: fixed; z-index: 201; top: 0; right: 0; bottom: 0;
  width: 88vw; max-width: 1100px;
  background: white; border-radius: 28px 0 0 28px;
  transform: translateX(102%);
  transition: transform 0.55s var(--ease);
  display: flex; flex-direction: column;
  box-shadow: -20px 0 60px rgba(0,0,0,0.15);
}
.modal-drawer.open { transform: translateX(0); }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px; border-bottom: 1px solid #eee; flex-shrink: 0;
}
.modal-title { font-size: 1.2rem; font-weight: 800; }
.modal-actions { display: flex; align-items: center; gap: 12px; }
.modal-cat {
  font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--teal-deep); padding: 5px 14px;
  border: 1.5px solid var(--divider); border-radius: 100px;
}
.modal-close {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #f3f3f3; color: var(--ink);
  transition: background 0.4s, transform 0.4s var(--ease), color 0.4s;
}
.modal-close:hover {
  background: var(--ink); color: var(--cream); transform: rotate(90deg);
}
.modal-body {
  flex: 1; overflow-y: auto; padding: 32px;
  display: block;
}
.modal-body .modal-images {
  width: 100%; max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
}
.modal-body .modal-images img {
  width: 100%; display: block;
  border-radius: 0;
}

/* ===== Reveals ===== */
.reveal {
  opacity: 0; transform: translateY(36px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.s1 { transition-delay: 0.08s !important; }
.reveal.s2 { transition-delay: 0.16s !important; }

/* ===== Keyframes ===== */
@keyframes blobMorph {
  0%, 100% { border-radius: 62% 38% 53% 47% / 55% 46% 54% 45%; }
  25% { border-radius: 72% 28% 43% 57% / 48% 58% 42% 52%; }
  50% { border-radius: 52% 48% 63% 37% / 45% 38% 62% 55%; }
  75% { border-radius: 42% 58% 33% 67% / 64% 28% 72% 36%; }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(5deg); }
}
@keyframes sparkle {
  0%, 100% { opacity: 0.2; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.3); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero { padding: 90px 32px 40px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .hero-visual { order: -1; }
  .hero-blob { max-width: 240px; margin: 0 auto; }
  .hero-desc { margin: 12px auto 0; }
  .hero-buttons { justify-content: center; }
  .hero-float, .hero-sparkle { display: none; }
}
@media (max-width: 768px) {
  .hero { padding: 100px 20px 40px; }
  .projects-section { padding: 40px 20px 80px; }
  .about-section { padding: 80px 20px; }
  .contact-section { padding: 80px 20px 60px; }
  .site-nav { padding: 14px 20px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.65rem; }
  .footer { padding: 20px; }
  .project-row.r-half { grid-template-columns: 1fr; }
  .modal-drawer { width: 100vw; max-width: 100vw; border-radius: 0; }
  .modal-head { padding: 14px 16px; flex-wrap: wrap; gap: 8px; }
  .modal-body { padding: 16px; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .custom-cursor { display: none !important; }
}
@media (max-width: 480px) {
  .hero-name { font-size: 42px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .contact-socials { flex-direction: column; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
