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

/* ---- BASE ---- */
body {
  font-family: "DM Sans", "Segoe UI", sans-serif;
  background-color: #F8F7F3;
  color: #18181B;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---- WHIMSY: rainbow top bar ---- */
.top-bar {
  height: 4px;
  background: linear-gradient(90deg, #a78bfa, #818cf8, #60a5fa, #34d399, #fbbf24, #f87171);
}

/* ---- LAYOUT ---- */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

/* ---- HERO ---- */
.hero {
  padding: 5rem 0 4rem;
  animation: fadeUp 0.6s ease both;
}

.greeting {
  font-family: "DM Sans", sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: #71717A;
  margin-bottom: 0.75rem;
  letter-spacing: 0.01em;
}

/* Whimsy: wave hand wiggles on load */
.wave-hand {
  display: inline-block;
  animation: wave 1.4s ease-in-out 0.5s 2;
  transform-origin: 70% 80%;
}

@keyframes wave {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(18deg); }
  30%  { transform: rotate(-8deg); }
  45%  { transform: rotate(16deg); }
  60%  { transform: rotate(-4deg); }
  75%  { transform: rotate(10deg); }
  100% { transform: rotate(0deg); }
}

.hero h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #18181B;
  margin-bottom: 1rem;
}

.tagline {
  font-size: 0.95rem;
  color: #A1A1AA;
  letter-spacing: 0.02em;
}

/* ---- SECTION HEADING DECORATION ---- */
h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Whimsy: coloured dot before each section heading */
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, #818cf8, #a78bfa);
  flex-shrink: 0;
}

/* ---- DIVIDER ---- */
.about,
.projects,
.contact {
  padding-top: 3.5rem;
  border-top: 1px solid #E4E4E7;
  animation: fadeUp 0.6s ease both;
}

.about   { animation-delay: 0.1s; }
.projects{ animation-delay: 0.2s; }
.contact { animation-delay: 0.3s; }

/* ---- ABOUT ---- */
.about {
  display: flex;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.about-text {
  flex: 1 1 280px;
}

.about-text p {
  font-size: 1.05rem;
  color: #52525B;
  margin-bottom: 0.7rem;
}

.about-animation {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  /* Whimsy: very gentle float */
  animation: float 4s ease-in-out infinite;
}

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

/* ---- PROJECTS ---- */
.projects {
  display: block;
}

/* Card is an <a> tag — reset link styles */
.project-card {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  flex-wrap: wrap;
  text-decoration: none;
  color: inherit;
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 14px;
  padding: 1.5rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.project-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
  transform: translateY(-3px);
}

.project-image {
  flex: 0 0 auto;
  width: 220px;
}

.project-image img {
  width: 100%;
  border-radius: 8px;
  display: block;
  object-fit: cover;
}

.project-text {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #818CF8;
  background: #EEF2FF;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  width: fit-content;
}

.project-text h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: #18181B;
  line-height: 1.3;
}

.project-text p {
  font-size: 0.98rem;
  color: #52525B;
  line-height: 1.6;
}

.read-more {
  font-size: 0.9rem;
  font-weight: 500;
  color: #6366F1;
  margin-top: 0.25rem;
}

/* ---- CONTACT ---- */
.contact {
  border-top: none;
}

.contact-inner {
  background: #FFFFFF;
  border: 1px solid #E4E4E7;
  border-radius: 18px;
  padding: 3rem 2rem;
  text-align: center;
}

.confetti {
  font-size: 2.4rem;
  margin-bottom: 0.75rem;
  /* Whimsy: tiny bounce */
  animation: bounce 1.2s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  45%       { transform: translateY(-6px); }
}

.contact-inner h2 {
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

/* hide the dot inside contact heading */
.contact-inner h2 .dot { display: none; }

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #3F3F46;
  text-decoration: none;
  background: #F4F4F5;
  border: 1px solid #E4E4E7;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.contact-link svg {
  width: 16px;
  height: 16px;
}

.contact-link:hover {
  background: #EEF2FF;
  border-color: #818CF8;
  color: #4338CA;
}

.back-top {
  background: none;
  border: none;
  color: #A1A1AA;
  font-family: "DM Sans", sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  letter-spacing: 0.02em;
  padding: 0;
  transition: color 0.2s;
}

.back-top:hover {
  color: #6366F1;
}

/* ---- FADE-UP ANIMATION ---- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .hero {
    padding: 3.5rem 0 2.5rem;
  }

  .about {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-animation {
    align-self: center;
  }

  .project-card {
    flex-direction: column;
  }

  .project-image {
    width: 100%;
  }

  .contact-inner {
    padding: 2.5rem 1.25rem;
  }
}
