/* ===== Design tokens ===== */
:root {
  --color-bg: #fbfaff;
  --color-bg-alt: #f3f0ff;
  --color-surface: #ffffff;
  --color-border: #e9e4fb;
  --color-text: #201c3d;
  --color-text-muted: #6a6690;

  --color-primary: #6c5ce7;
  --color-primary-dark: #5340c7;
  --color-primary-light: #eee9ff;
  --color-accent-teal: #00c2a8;
  --color-accent-orange: #ff9f43;
  --color-accent-pink: #ff6b9d;
  --color-accent-yellow: #ffd93d;
  --color-whatsapp: #25d366;

  --gradient-primary: linear-gradient(135deg, #6c5ce7 0%, #a06bff 55%, #ff6b9d 100%);
  --gradient-warm: linear-gradient(135deg, #ff9f43, #ff6b9d);
  --gradient-cool: linear-gradient(135deg, #6c5ce7, #00c2a8);

  --font-heading: "Fredoka", "Poppins", sans-serif;
  --font-body: "Inter", sans-serif;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 8px rgba(108, 92, 231, 0.08);
  --shadow-md: 0 12px 28px rgba(108, 92, 231, 0.14);
  --shadow-lg: 0 24px 56px rgba(108, 92, 231, 0.2);
  --max-width: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.25;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

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

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ===== Decorative blobs ===== */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  animation: blobMove 14s ease-in-out infinite;
}

.blob-1 { width: 380px; height: 380px; top: -120px; right: -80px; background: var(--gradient-primary); }
.blob-2 { width: 260px; height: 260px; bottom: -80px; left: -60px; background: var(--gradient-warm); animation-delay: -4s; }
.blob-3 { width: 200px; height: 200px; top: 40%; right: 18%; background: var(--color-accent-yellow); opacity: 0.25; animation-delay: -8s; }
.blob-4 { width: 300px; height: 300px; top: 10%; left: -100px; background: var(--gradient-cool); }
.blob-5 { width: 340px; height: 340px; bottom: -100px; right: -100px; background: var(--gradient-warm); }
.blob-6 { width: 280px; height: 280px; top: -60px; left: 20%; background: var(--gradient-primary); }

@keyframes blobMove {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(24px, -30px) scale(1.08); }
  66% { transform: translate(-20px, 20px) scale(0.94); }
}

/* ===== Reveal on scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal.visible { opacity: 1; transform: none; }

.class-grid .reveal:nth-child(2), .portfolio-grid .reveal:nth-child(2), .contact-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.class-grid .reveal:nth-child(3), .portfolio-grid .reveal:nth-child(3), .contact-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.class-grid .reveal:nth-child(4) { transition-delay: 0.3s; }
.class-grid .reveal:nth-child(5) { transition-delay: 0.4s; }
.class-grid .reveal:nth-child(6) { transition-delay: 0.5s; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-text);
}

.brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}

.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.06); }

.brand-name {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.nav a:hover { color: var(--color-primary); }

.nav-cta {
  background: var(--gradient-primary);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(108, 92, 231, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(108, 92, 231, 0.45); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 88px 0 96px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero-copy h1 {
  font-size: clamp(2rem, 3.6vw, 2.85rem);
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin: 28px 0 32px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.3, 1);
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(108, 92, 231, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 32px rgba(108, 92, 231, 0.45);
}

.btn-outline {
  border-color: var(--color-border);
  color: var(--color-text);
  background: #fff;
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.hero-badges {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-badges span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding-left: 22px;
  position: relative;
}

.hero-badges span::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-accent-teal);
  font-weight: 700;
}

.hero-media {
  display: flex;
  justify-content: flex-start;
  order: -1;
  perspective: 1200px;
}

.hero-photo-wrap {
  position: relative;
  width: 440px;
  height: 500px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: floatY 5s ease-in-out infinite;
}

.hero-photo-glow {
  position: absolute;
  inset: 10% 5% 0 5%;
  background: var(--gradient-primary);
  filter: blur(50px);
  opacity: 0.35;
  border-radius: 50%;
  z-index: 0;
}

.hero-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 24px 30px rgba(108, 92, 231, 0.3));
  transition: transform 0.15s ease-out;
  will-change: transform;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

.floating-badge {
  position: absolute;
  z-index: 2;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  animation: floatY 4.5s ease-in-out infinite;
}

.badge-top { top: 4%; right: -6%; animation-delay: -1.2s; }
.badge-bottom { bottom: 10%; left: -10%; animation-delay: -2.4s; }
.badge-left { top: 42%; left: -14%; animation-delay: -0.6s; }

.hero-photo-wrap.img-fallback {
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  align-items: center;
}

.hero-photo-wrap.img-fallback::after {
  content: "Add your photo at assets/images/profile-nobg.png";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.hero-photo-wrap.img-fallback .hero-photo,
.hero-photo-wrap.img-fallback .hero-photo-glow,
.hero-photo-wrap.img-fallback .floating-badge { display: none; }

/* ===== Sections ===== */
.section { position: relative; padding: 88px 0; overflow: hidden; }
.section-alt { background: var(--color-bg-alt); }

.section-title {
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  text-align: center;
  margin-bottom: 12px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  width: 100%;
}

.section-sub {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 60ch;
  margin: 0 auto 48px;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
  perspective: 1000px;
}

.about-text p { color: var(--color-text-muted); }

.about-credentials {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.credential-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  will-change: transform;
}

.credential-card:hover { box-shadow: var(--shadow-lg); }

.credential-card h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.credential-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.credential-card li { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }

.credential-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-warm);
  padding: 3px 10px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}

.plain-list li {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* ===== Classes ===== */
.class-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  perspective: 1200px;
}

.class-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  will-change: transform;
  overflow: hidden;
}

.class-card:hover { box-shadow: var(--shadow-lg); }

.class-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.class-card:hover::before { transform: scaleX(1); }

.class-card-highlight {
  border-color: transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--gradient-primary) border-box;
  border: 2px solid transparent;
}

.class-card-highlight::before { transform: scaleX(1); }

.class-level {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.class-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.class-card p { color: var(--color-text-muted); font-size: 0.93rem; margin: 0; }

.classes-cta {
  text-align: center;
  margin-top: 48px;
}

.classes-cta p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
  font-weight: 500;
}

/* ===== Portfolio ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  perspective: 1200px;
}

.portfolio-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  will-change: transform;
}

.portfolio-card:hover { box-shadow: var(--shadow-lg); }

.placeholder-card {
  border-style: dashed;
  text-align: center;
  color: var(--color-text-muted);
}

.placeholder-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--gradient-cool);
  font-family: monospace;
  font-weight: 700;
  color: #fff;
}

.placeholder-card h3 { color: var(--color-text); font-size: 1.05rem; }
.placeholder-card p { font-size: 0.9rem; }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  perspective: 1200px;
}

.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  transition: transform 0.15s ease-out, box-shadow 0.3s ease, border-color 0.2s ease;
  will-change: transform;
}

.contact-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.contact-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.contact-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
}

/* ===== Floating WhatsApp button ===== */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.whatsapp-float:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 14px 32px rgba(37, 211, 102, 0.6);
}

.whatsapp-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-whatsapp);
  animation: whatsappPulse 2.2s ease-out infinite;
  z-index: -1;
}

@keyframes whatsappPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
  background: var(--color-bg-alt);
}

.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-family: var(--font-heading);
}

.footer-logo { width: 30px; height: 30px; object-fit: contain; border-radius: 8px; }

.site-footer p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.footer-credit {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
}

.footer-credit a {
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.2s ease;
}

.footer-credit a:hover { opacity: 0.75; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .hero-photo-wrap { width: 260px; height: 300px; }
  .about-grid { grid-template-columns: 1fr; }
  .class-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    transform: translateY(-140%);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .nav.open { transform: translateY(0); opacity: 1; }
  .nav-toggle { display: flex; }
  .class-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .floating-badge { font-size: 0.7rem; padding: 7px 12px; }
  .badge-top { right: -2%; }
  .badge-bottom { left: -4%; }
  .badge-left { left: -6%; }
  .whatsapp-float { width: 54px; height: 54px; right: 18px; bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .blob, .hero-photo-wrap, .floating-badge, .whatsapp-ring { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
