:root {
  --bg: #f0d5c8;
  --blue: #2b3cf6;
  --text: #2b3cf6;
  --dark: #1a1a1a;
  --font: 'General Sans', -apple-system, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }

.back-to-zlab {
  position: fixed; bottom: 24px; left: 24px; z-index: 9999;
  padding: 10px 20px; background: rgba(43,60,246,0.8); backdrop-filter: blur(12px);
  color: #fff; font-family: var(--font); font-size: 0.75rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.2); border-radius: 100px;
  text-decoration: none; transition: background 0.3s;
}
.back-to-zlab:hover { background: rgba(43,60,246,1); }

/* Nav */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 24px 48px;
  display: flex; justify-content: space-between; align-items: center;
}
.nav-icon {
  font-size: 2rem; width: 44px; height: 44px;
  border: 2px solid var(--blue); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
}
/* Spinning nav icon */
.nav-icon.spin {
  animation: spinBounce 3s ease-in-out infinite;
}
@keyframes spinBounce {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(15deg) scale(1.1); }
  50% { transform: rotate(-10deg) scale(0.95); }
  75% { transform: rotate(5deg) scale(1.05); }
}

/* Doodles floating around the name */
.doodles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.doodle {
  position: absolute;
  font-size: 2rem;
  color: var(--blue);
  opacity: 0.4;
  animation: float 4s ease-in-out infinite;
}
.d1 { top: 15%; left: 10%; animation-delay: 0s; font-size: 1.5rem; }
.d2 { top: 25%; right: 15%; animation-delay: 0.5s; font-size: 2.5rem; }
.d3 { top: 60%; left: 8%; animation-delay: 1s; font-size: 1.8rem; }
.d4 { top: 70%; right: 10%; animation-delay: 1.5s; font-size: 2rem; }
.d5 { top: 10%; left: 45%; animation-delay: 2s; font-size: 1.5rem; }
.d6 { top: 80%; left: 30%; animation-delay: 0.8s; font-size: 1.3rem; }
.d7 { top: 20%; left: 75%; animation-delay: 1.2s; font-size: 2.2rem; }
.d8 { top: 75%; right: 25%; animation-delay: 0.3s; font-size: 1.6rem; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(10deg); }
}

.nav-center { display: flex; gap: 40px; }
.nav-center a {
  font-size: 1.125rem; font-weight: 500; transition: opacity 0.3s;
}
.nav-center a:hover { opacity: 0.5; }
.nav-social { display: flex; gap: 16px; }
.nav-social a {
  display: flex; align-items: center;
  transition: opacity 0.3s;
}
.nav-social a:hover { opacity: 0.5; }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 48px 60px;
  position: relative;
}
.hero-name {
  font-size: clamp(5rem, 15vw, 14rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.04em;
  margin-bottom: 40px;
  /* Playful rotation */
  transform: rotate(-3deg);
}
.hero-info {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--blue);
  max-width: 500px;
}
.link-underline {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Work Grid */
.work { padding: 40px 24px 80px; }
.work-grid { display: flex; flex-direction: column; gap: 24px; }
.work-item {
  border-radius: 16px;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.work-item:hover { transform: scale(0.98); }
.work-item.full { min-height: 500px; }
.work-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}
.work-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.work-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--blue);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  padding: 8px 18px;
  border-radius: 100px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}
.work-item:hover .work-label {
  opacity: 1;
  transform: translateY(0);
}

/* About */
.about {
  padding: 120px 48px;
  text-align: center;
}
.about-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  margin-bottom: 32px;
}
.about-text {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto 20px;
}
.about-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}
.skill {
  padding: 10px 24px;
  border: 2px solid var(--blue);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
}
.skill:hover {
  background: var(--blue);
  color: var(--bg);
}

/* Contact */
.contact {
  padding: 120px 48px;
  text-align: center;
}
.contact-title {
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 800;
  margin-bottom: 32px;
}
.contact-info {
  display: flex; justify-content: center; gap: 40px;
}
.contact-link {
  font-size: 1.125rem; font-weight: 500;
  text-decoration: underline; text-underline-offset: 3px;
  transition: opacity 0.3s;
}
.contact-link:hover { opacity: 0.5; }

/* Footer */
footer {
  padding: 32px 48px;
  display: flex; justify-content: space-between;
  font-size: 0.75rem;
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
  nav { padding: 16px 20px; }
  .nav-center { gap: 20px; }
  .nav-center a { font-size: 0.875rem; }
  .hero { padding: 100px 20px 60px; }
  .hero-name { font-size: 4rem; }
  .work { padding: 24px 16px 60px; }
  .work-row { grid-template-columns: 1fr; }
  .work-item { min-height: 280px; }
  .about { padding: 80px 20px; }
  .contact { padding: 80px 20px; }
  .contact-info { flex-direction: column; gap: 16px; }
}
