/* ============================================
   RILEY CHEN — PORTFOLIO
   Design concept: "Sticker Desk"
   A developer's desk covered in stickers, sticky
   notes and comic-panel cutouts — thick ink
   borders, hard offset shadows, spring-bounce
   motion. No blur, no soft gradients: everything
   reads like a physical object you could peel off
   the page.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Space+Mono:wght@400;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* --- Color tokens --- */
  --bg: #F3F0FF;
  --paper: #FFFFFF;
  --ink: #1A1B3A;
  --blue: #3D5AFE;
  --coral: #FF6B6B;
  --yellow: #FFD93D;
  --green: #06D6A0;
  --pink: #FF8FE0;

  /* --- Type tokens --- */
  --font-display: 'Baloo 2', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* --- Shape / shadow tokens --- */
  --radius: 18px;
  --radius-sm: 10px;
  --border: 3px solid var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --shadow-md: 7px 7px 0 var(--ink);
  --shadow-lg: 10px 10px 0 var(--ink);

  /* --- Motion token: spring/bounce easing used everywhere --- */
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(circle, rgba(26,27,58,0.08) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0 0 0.5em;
  line-height: 1.1;
}

p { margin: 0 0 1em; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  background: var(--yellow);
  border: var(--border);
  border-radius: 999px;
  padding: 4px 14px;
  transform: rotate(-2deg);
  margin-bottom: 18px;
}

/* ============ NAV ============ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 3px solid var(--ink);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--ink);
}

.logo-badge {
  width: 38px;
  height: 38px;
  background: var(--blue);
  border: var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  transform: rotate(-6deg);
  transition: transform 0.35s var(--bounce);
}

.logo:hover .logo-badge { transform: rotate(10deg) scale(1.08); }

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--paper);
  border: var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.nav-links a {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--ink);
  transition: transform 0.25s var(--bounce), background 0.2s ease;
}

.nav-links a:hover { background: var(--yellow); transform: translateY(-2px) rotate(-1deg); }
.nav-links a.active { background: var(--ink); color: var(--bg); }

.nav-toggle {
  display: none;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--ink);
  margin: 4px 0;
  border-radius: 2px;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    border-radius: var(--radius);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { text-align: center; }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 13px 26px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--bounce), box-shadow 0.2s var(--bounce);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-coral { background: var(--coral); color: #fff; }
.btn-yellow { background: var(--yellow); }
.btn-green { background: var(--green); color: #06331f; }

/* ============ CARD / STICKER ============ */
.sticker {
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s var(--bounce), box-shadow 0.3s var(--bounce);
}
.sticker:hover { transform: translate(-3px, -3px) rotate(0deg) !important; box-shadow: var(--shadow-lg); }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--bg);
  margin: 0 6px 6px 0;
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s var(--bounce);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============ FOOTER ============ */
.site-footer {
  margin-top: 100px;
  border-top: 3px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  padding: 46px 0 30px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.footer-note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  opacity: 0.7;
}
.social-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.social-row a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  transition: transform 0.2s var(--bounce);
  display: inline-block;
}
.social-row a:nth-child(2) { background: var(--coral); color: #fff; }
.social-row a:nth-child(3) { background: var(--blue); color: #fff; }
.social-row a:nth-child(4) { background: var(--green); }
.social-row a:hover { transform: translateY(-3px) rotate(-2deg); }

/* ============ PAGE HEADER (shared banner on inner pages) ============ */
.page-header {
  padding: 64px 0 20px;
}
.page-header h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.page-header .lede { max-width: 60ch; font-size: 1.08rem; }

/* Utility */
.mt-lg { margin-top: 64px; }
.text-center { text-align: center; }
