/* ============================================
   RESET
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

/* ============================================
   TOKENS
   ============================================ */
:root {
  /* Colors — Neobrutalism */
  --bg: #FFFFFF;
  --bg-dots: #DDDDDD;
  --bg-card: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --ink: #2B2B2B;
  --ink-light: #333333;
  --ink-muted: #777777;
  --accent: #00C8FF;
  --accent-blue: #0099FF;
  --accent-hover: #0099FF;
  --selection-blue: #00AAFF;
  --label-green: #A8E6CF;
  --label-yellow: #FFE0A3;
  --label-orange: #FFBE76;
  --label-pink: #FF6B9D;
  --label-cyan: #00D2FF;
  --accent-light: #E0F7FF;
  --border: #2B2B2B;
  --border-width: 2.5px;
  --border-light: #2B2B2B;
  --success: #34D399;

  /* Card colors — high-saturation flats */
  --card-cyan: #00C8FF;
  --card-blue: #4153FB;
  --card-green: #2ECC71;
  --card-orange: #FF8C42;
  --card-pink: #E84393;
  --card-yellow: #FDCB6E;
  --card-black: #1A1A1A;

  /* Type */
  --font-display: 'DM Sans', sans-serif;
  --font-hand: 'Caveat', cursive;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Layout */
  --max-width: 1200px;
  --container-padding: 32px;
  --section-padding: 96px;
  --radius-card: 16px;
  --radius-sm: 8px;
  --nav-height: 72px;

  /* Neobrutalism shadows */
  --shadow: 4px 4px 0 #2B2B2B;
  --shadow-lg: 6px 6px 0 #2B2B2B;
  --radius: 0;

  /* Motion */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition: 0.3s var(--ease);
}

@media (max-width: 768px) {
  :root {
    --container-padding: 20px;
    --section-padding: 64px;
  }
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--bg-dots) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

/* ============================================
   TYPOGRAPHY UTILITIES
   ============================================ */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--ink);
}

.t-display {
  font-family: var(--font-display);
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.t-page-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.t-heading {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
}

.t-subheading {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
}

.t-body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--ink-light);
}

.t-caption {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-muted);
}

.t-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.handnote {
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--ink);
  font-weight: 500;
}

/* ============================================
   FIGMA SELECT BOX
   ============================================ */
.figma-select {
  position: relative;
  border: var(--border-width) solid var(--selection-blue);
  padding: 12px;
}

.figma-select::before,
.figma-select::after,
.figma-select .handle-bl,
.figma-select .handle-br {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--selection-blue);
  border: 1px solid #fff;
}

.figma-select::before {
  top: -4px;
  left: -4px;
}

.figma-select::after {
  top: -4px;
  right: -4px;
}

.figma-select .handle-bl {
  bottom: -4px;
  left: -4px;
}

.figma-select .handle-br {
  bottom: -4px;
  right: -4px;
}

/* ============================================
   STICKY LABELS
   ============================================ */
.sticky-label {
  display: inline-block;
  padding: 6px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: var(--border-width) solid #2B2B2B;
  border-radius: 6px;
  box-shadow: 3px 3px 0 #2B2B2B;
  white-space: nowrap;
}

.sticky-label--green {
  background: #B8E0D2;
  color: #1a1a1a;
  transform: rotate(-3deg);
}

.sticky-label--yellow {
  background: #FFF3CD;
  color: #1a1a1a;
  transform: rotate(2deg);
}

.sticky-label--orange {
  background: #F2D0A4;
  color: #1a1a1a;
  transform: rotate(-4deg);
}

.sticky-label--pink {
  background: #F5B7B1;
  color: #1a1a1a;
  transform: rotate(3deg);
}

.sticky-label--cyan {
  background: #AED9E0;
  color: #1a1a1a;
  transform: rotate(-2deg);
}

/* ============================================
   SKILL BLOCKS
   ============================================ */
.skill-block {
  display: inline-flex;
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: var(--border-width) solid #2B2B2B;
  border-radius: 6px;
  box-shadow: 3px 3px 0 #2B2B2B;
  color: #fff;
}

.skill-block--green {
  background: #B8E0D2;
  color: #1a1a1a;
  border: var(--border-width) solid #2B2B2B;
}

.skill-block--blue {
  background: #AED9E0;
  color: #1a1a1a;
  border: var(--border-width) solid #2B2B2B;
}

.skill-block--red {
  background: #F5B7B1;
  color: #1a1a1a;
  border: var(--border-width) solid #2B2B2B;
}

.skill-block--cyan {
  background: #D6C5E0;
  color: #1a1a1a;
  border: var(--border-width) solid #2B2B2B;
}

/* ============================================
   FIGMA IMAGE — SELECTION HANDLES + FILE LABEL
   ============================================ */
.figma-image {
  position: relative;
  display: inline-block;
  border: var(--border-width) solid #2B2B2B;
  border-radius: 12px;
}

.figma-image .handle-tl,
.figma-image .handle-tr,
.figma-image .handle-bl,
.figma-image .handle-br {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--selection-blue);
  border: 1px solid #fff;
  z-index: 2;
}

.figma-image .handle-tl {
  top: -4px;
  left: -4px;
}

.figma-image .handle-tr {
  top: -4px;
  right: -4px;
}

.figma-image .handle-bl {
  bottom: -4px;
  left: -4px;
}

.figma-image .handle-br {
  bottom: -4px;
  right: -4px;
}

.image-file-label {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #2B2B2B;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.image-file-label::before {
  content: 'JPG';
  background: #0077CC;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 9px;
}

/* ============================================
   NAVIGATION — FIGMA TOOLBAR
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: #fff;
  border-bottom: var(--border-width) solid #2B2B2B;
  backdrop-filter: none;
  z-index: 1000;
}

.nav-inner {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

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

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-light);
  padding: 4px 0;
  transition: color var(--transition);
}

.nav-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link.active {
  color: var(--ink);
  background: var(--label-cyan);
  border: var(--border-width) solid #2B2B2B;
  border-radius: 8px;
  padding: 6px 14px;
  box-shadow: 2px 2px 0 #2B2B2B;
}

.nav-link.active::after {
  display: none;
}

.nav-contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #2B2B2B;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 18px;
  border: var(--border-width) solid #2B2B2B;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nav-contact:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #2B2B2B;
}

.nav-contact:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #2B2B2B;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    transform: translateX(100%);
    transition: transform var(--transition);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 20px;
  }

  .nav-toggle {
    display: flex;
  }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: var(--border-width) solid #2B2B2B;
  padding: 40px var(--container-padding);
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-copy {
  font-size: 14px;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: var(--border-width) solid #2B2B2B;
  border-radius: 8px;
  box-shadow: 2px 2px 0 #2B2B2B;
  background: #fff;
  color: #2B2B2B;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.footer-link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 #2B2B2B;
}

.footer-link:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #2B2B2B;
}

.footer-link svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 480px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   BUTTONS / LINKS
   ============================================ */
.btn,
.nav-contact {
  border-radius: 8px;
  border: var(--border-width) solid #2B2B2B;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover,
.nav-contact:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #2B2B2B;
}

.btn:active,
.nav-contact:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #2B2B2B;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 500;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.text-arrow-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2B2B2B;
  text-decoration: none;
  border-bottom: var(--border-width) solid #2B2B2B;
  padding-bottom: 4px;
}

.text-arrow-icon {
  display: inline-flex;
  transition: transform 0.3s ease;
}

.text-arrow-cta:hover .text-arrow-icon {
  transform: translateX(6px);
}

.text-arrow-cta:hover {
  color: var(--accent, #2D9CDB);
  border-bottom-color: var(--accent, #2D9CDB);
}

/* ============================================
   TAGS / PILLS
   ============================================ */
.tag,
.work-tag,
.skill-pill,
.sticky-label {
  border-radius: 6px;
  border: var(--border-width) solid #2B2B2B;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--bg-elevated);
  font-size: 12px;
  color: var(--ink-light);
  box-shadow: 2px 2px 0 #2B2B2B;
}

/* ============================================
   IMAGE PLACEHOLDER
   ============================================ */
.img-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-elevated);
  border: var(--border-width) solid #2B2B2B;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  font-size: 14px;
  text-align: center;
  padding: 20px;
  margin: 24px 0;
}

.figma-image .img-placeholder {
  margin: 0;
}

/* ============================================
   FRAME PANEL
   ============================================ */
.frame {
  border: var(--border-width) solid #2B2B2B;
  border-radius: 0;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.frame-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: var(--border-width) solid #2B2B2B;
  background: var(--bg-elevated);
}

.frame-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.frame-label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 0;
  background: var(--accent-blue);
  border: 1px solid #2B2B2B;
}

.frame-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.frame-body {
  padding: 32px 24px;
}

/* ============================================
   INSPECT GRID
   ============================================ */
.inspect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: #2B2B2B;
  border: var(--border-width) solid #2B2B2B;
  border-radius: 0;
  overflow: hidden;
}

.inspect-item {
  padding: 16px 20px;
  background: var(--bg-card);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inspect-key {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.inspect-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}

/* ============================================
   LAYER LIST
   ============================================ */
.layer-list {
  border: var(--border-width) solid #2B2B2B;
  border-radius: 0;
  overflow: hidden;
}

.layer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1.5px solid #2B2B2B;
  font-size: 13px;
  color: var(--ink-light);
  background: var(--bg-card);
}

.layer-item:last-child {
  border-bottom: none;
}

.layer-icon {
  width: 16px;
  height: 16px;
  border-radius: 0;
  background: var(--accent-light);
  border: 1.5px solid #2B2B2B;
  flex-shrink: 0;
}

.layer-name {
  flex: 1;
}

.layer-type {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

/* ============================================
   FIGMA COLLABORATOR CURSOR
   ============================================ */
.figma-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.figma-cursor.visible {
  opacity: 1;
}

.figma-cursor-arrow {
  display: block;
  filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.2));
}

.figma-cursor-chip {
  margin-left: 12px;
  background: #2D9CDB;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  white-space: nowrap;
  line-height: 1;
}

@media (hover: none) {
  .figma-cursor {
    display: none;
  }
}

/* ============================================
   INTRO OVERLAY
   ============================================ */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--bg-dots) 1px, transparent 1px);
  background-size: 24px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

.intro-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.intro-bubble {
  background: var(--accent);
  color: #2B2B2B;
  font-family: var(--font-body);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 600;
  padding: 16px 32px;
  border: var(--border-width) solid #2B2B2B;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transform: scale(0.8);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.intro-bubble.visible {
  transform: scale(1);
  opacity: 1;
}

.intro-cursor {
  display: inline-block;
  animation: blink 0.6s step-end infinite;
  font-weight: 300;
  margin-left: 2px;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

body.loading > *:not(.intro-overlay):not(.figma-cursor):not(script) {
  opacity: 0;
}

body.loaded > *:not(.intro-overlay):not(script) {
  opacity: 1;
  transition: opacity 0.6s ease 0.2s;
}

/* ============================================
   BACKGROUND FLOATING SHAPES
   ============================================ */
.bg-shapes {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-shape {
  position: absolute;
  opacity: 0.15;
  animation: bg-float var(--float-duration, 6s) ease-in-out var(--float-delay, 0s) infinite;
}

.shape-square {
  width: 14px;
  height: 14px;
  border: 2px solid #2B2B2B;
  background: transparent;
}

.shape-triangle {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 14px solid #2B2B2B;
  background: transparent;
}

.shape-circle {
  width: 12px;
  height: 12px;
  border: 2px solid #2B2B2B;
  border-radius: 50%;
  background: transparent;
}

.shape-cross {
  width: 14px;
  height: 14px;
  position: absolute;
  background: transparent;
}

.shape-cross::before,
.shape-cross::after {
  content: '';
  position: absolute;
  background: #2B2B2B;
}

.shape-cross::before {
  width: 2px;
  height: 14px;
  top: 0;
  left: 6px;
}

.shape-cross::after {
  width: 14px;
  height: 2px;
  top: 6px;
  left: 0;
}

.shape-diamond {
  width: 10px;
  height: 10px;
  border: 2px solid #2B2B2B;
  background: transparent;
  transform: rotate(45deg);
  animation-name: bg-float-diamond;
}

@keyframes bg-float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(8px, -12px) rotate(5deg);
  }
  50% {
    transform: translate(-5px, -20px) rotate(-3deg);
  }
  75% {
    transform: translate(10px, -8px) rotate(4deg);
  }
}

@keyframes bg-float-diamond {
  0%, 100% {
    transform: rotate(45deg) translate(0, 0);
  }
  25% {
    transform: rotate(50deg) translate(8px, -12px);
  }
  50% {
    transform: rotate(42deg) translate(-5px, -20px);
  }
  75% {
    transform: rotate(49deg) translate(10px, -8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-shape {
    animation: none;
  }
}

@media (max-width: 768px) {
  .bg-shape:nth-child(even) {
    display: none;
  }
}

/* ============================================
   PIXEL PET
   ============================================ */
.pet {
  position: fixed;
  bottom: 24px;
  right: 32px;
  z-index: 900;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.pet:hover {
  transform: scale(1.1);
}

.pet-body {
  position: relative;
  width: 64px;
  height: 72px;
  background: #B8E0D2;
  border: 3px solid #2B2B2B;
  border-radius: 16px;
  box-shadow: 4px 4px 0 #2B2B2B;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pet-breathe 3s ease-in-out infinite;
}

.pet-ear {
  position: absolute;
  top: -14px;
  width: 18px;
  height: 18px;
  background: #B8E0D2;
  border: 3px solid #2B2B2B;
  border-bottom: none;
}

.pet-ear-left {
  left: 8px;
  transform: rotate(-8deg);
}

.pet-ear-right {
  right: 8px;
  transform: rotate(8deg);
}

.pet-face {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: -4px;
}

.pet-eye {
  width: 16px;
  height: 16px;
  background: #fff;
  border: 2.5px solid #2B2B2B;
  border-radius: 50%;
  position: absolute;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pet-eye-left {
  top: 0;
  left: -14px;
}

.pet-eye-right {
  top: 0;
  right: -14px;
}

.pet-pupil {
  width: 7px;
  height: 7px;
  background: #2B2B2B;
  border-radius: 50%;
  position: absolute;
  transition: transform 0.15s ease-out;
}

.pet-mouth {
  width: 12px;
  height: 6px;
  border-bottom: 2.5px solid #2B2B2B;
  border-left: 2.5px solid #2B2B2B;
  border-right: 2.5px solid #2B2B2B;
  border-radius: 0 0 6px 6px;
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
}

.pet-feet {
  position: absolute;
  bottom: -10px;
  display: flex;
  gap: 12px;
}

.pet-foot {
  width: 16px;
  height: 10px;
  background: #B8E0D2;
  border: 2.5px solid #2B2B2B;
  border-top: none;
  border-radius: 0 0 4px 4px;
}

.pet-speech {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 12px;
  background: #fff;
  border: 2.5px solid #2B2B2B;
  box-shadow: 3px 3px 0 #2B2B2B;
  padding: 8px 14px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  white-space: normal;
  max-width: 260px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.pet-speech::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #2B2B2B;
}

.pet-speech::before {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 21px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #fff;
  z-index: 1;
}

.pet-speech.visible {
  opacity: 1;
  transform: translateY(0);
}

.pet-eye.blink {
  animation: pet-blink 0.15s ease-in-out;
}

@keyframes pet-blink {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.05); }
}

.pet:hover .pet-mouth {
  height: 8px;
  border-radius: 0 0 8px 8px;
}

@keyframes pet-breathe {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.03); }
}

@media (max-width: 768px) {
  .pet {
    transform: scale(0.8);
    bottom: 16px;
    right: 16px;
  }

  .pet:hover {
    transform: scale(0.88);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pet-body {
    animation: none;
  }

  .pet-eye.blink {
    animation: none;
  }
}

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