/* ==========================================================================
   MATERIAL 3 EXPRESSIVE DESIGN SYSTEM - VAMPELIUM PORTFOLIO
   ========================================================================== */

/* Import Google Fonts for Editorial and Code Typography */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700;900&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

:root {
  /* M3 Color Tokens - Vibrant Plum & Sakura Brand Theme */
  --m3-sys-color-background: #090710;
  --m3-sys-color-on-background: #fff0f6;
  
  /* Surface System representing elevation and containers */
  --m3-sys-color-surface: #110d21;
  --m3-sys-color-surface-container-low: #151129;
  --m3-sys-color-surface-container: #1b1632;
  --m3-sys-color-surface-container-high: #241e42;
  --m3-sys-color-surface-container-highest: #2e2652;
  --m3-sys-color-on-surface: #fff0f6;
  --m3-sys-color-on-surface-variant: #e1d3e8;

  /* Accent Colors */
  --m3-sys-color-primary: #f8b4d9;              /* Pastel Sakura Pink */
  --m3-sys-color-on-primary: #4a0f30;           /* Deep Plum Accent */
  --m3-sys-color-primary-container: #ff65a3;     /* Bright Accent Pink */
  --m3-sys-color-on-primary-container: #ffffff;
  
  --m3-sys-color-secondary: #c084fc;            /* Lavender Violet */
  --m3-sys-color-on-secondary: #2e0854;
  --m3-sys-color-secondary-container: #a855f7;
  
  --m3-sys-color-tertiary: #67e8f9;             /* Bright Cyan Highlight */
  --m3-sys-color-on-tertiary: #083344;
  --m3-sys-color-tertiary-container: #06b6d4;

  --m3-sys-color-outline: rgba(248, 180, 217, 0.25);
  --m3-sys-color-outline-variant: rgba(192, 132, 252, 0.15);

  /* Expressive Shape Library Tokens */
  --m3-shape-pill: 9999px;
  --m3-shape-arch: 160px 160px 24px 24px;
  --m3-shape-arch-sm: 80px 80px 16px 16px;
  --m3-shape-asym-1: 48px 16px 48px 16px;
  --m3-shape-asym-2: 16px 48px 16px 48px;
  --m3-shape-asym-3: 32px 32px 8px 32px;
  --m3-shape-scallop: 60% 40% 70% 30% / 40% 60% 40% 60%;
  --m3-shape-circle: 50%;

  /* Spring Motion Curves (Elastic and Interactive Feel) */
  --m3-motion-spring-slow: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --m3-motion-spring-fast: cubic-bezier(0.34, 1.56, 0.64, 1);
  --m3-motion-fluid: cubic-bezier(0.2, 0.8, 0.2, 1);
  --m3-motion-bounce: cubic-bezier(0.68, -0.6, 0.32, 1.6);

  /* Shadows for glass/glow effects */
  --m3-elevation-1: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  --m3-elevation-2: 0 8px 30px rgba(255, 88, 196, 0.1), 0 0 15px rgba(255, 101, 163, 0.05);
  --m3-elevation-3: 0 16px 40px rgba(255, 88, 196, 0.15), 0 0 30px rgba(192, 132, 252, 0.15);
  --m3-glow-pink: 0 0 20px rgba(255, 101, 163, 0.4);
  --m3-glow-purple: 0 0 25px rgba(192, 132, 252, 0.4);
}

/* ==========================================================================
   RESET & GLOBAL BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--m3-sys-color-background);
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--m3-sys-color-on-background);
  line-height: 1.6;
  overflow-x: hidden;
  background: var(--m3-sys-color-background);
}

/* Base Headings & M3 Typography Scale */
h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.m3-display-large {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.m3-display-medium {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
}

.m3-headline-large {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
}

.m3-title-large {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.m3-body-large {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--m3-sys-color-on-surface-variant);
}

.m3-body-medium {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
}

.m3-label-large {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.m3-code-medium {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ==========================================================================
   DYNAMIC BACKGROUNDS & DECORATIVE
   ========================================================================== */
.ambient-glow {
  position: fixed;
  inset: 0;
  z-index: -10;
  overflow: hidden;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  width: min(600px, 90vw);
  height: min(600px, 90vw);
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  transition: all 1s ease;
}

.glow-orb-1 {
  background: radial-gradient(circle, var(--m3-sys-color-primary-container) 0%, transparent 70%);
  top: -150px;
  left: -150px;
  animation: floatOrb1 25s infinite alternate ease-in-out;
}

.glow-orb-2 {
  background: radial-gradient(circle, var(--m3-sys-color-secondary) 0%, transparent 70%);
  bottom: -150px;
  right: -150px;
  animation: floatOrb2 30s infinite alternate ease-in-out;
}

@keyframes floatOrb1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(15vw, 20vh) scale(1.15); }
  100% { transform: translate(-5vw, 10vh) scale(0.9); }
}

@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20vw, -15vh) scale(0.85); }
  100% { transform: translate(5vw, -30vh) scale(1.1); }
}

/* Sakura Petals */
#sakura-canvas-container {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.sakura-leaf {
  position: fixed;
  top: -50px;
  pointer-events: none;
  z-index: -1;
  color: var(--m3-sys-color-primary);
  opacity: 0.6;
  font-size: 1.2rem;
  animation: sakuraFall linear infinite, sakuraSway ease-in-out infinite alternate;
}

@keyframes sakuraFall {
  0% { transform: translateY(-50px) rotate(0deg); opacity: 0; }
  10% { opacity: 0.75; }
  90% { opacity: 0.5; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

@keyframes sakuraSway {
  0% { margin-left: -40px; }
  100% { margin-left: 40px; }
}

/* ==========================================================================
   LAYOUT & CONTAINER ELEMENTS
   ========================================================================== */
.main-wrapper {
  max-width: 1000px;
  width: 90%;
  margin: 0 auto;
  padding: 80px 0;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

.section-block {
  margin-bottom: 120px;
}

.section-header {
  margin-bottom: 40px;
  text-align: left;
}

.section-jp-badge {
  color: var(--m3-sys-color-primary);
  opacity: 0.8;
  margin-bottom: 8px;
  display: block;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

.grid-2col > * {
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 900px) {
  .grid-2col {
    grid-template-columns: 1.2fr 1.0fr;
  }
}

/* ==========================================================================
   EXPRESSIVE COMPONENTS
   ========================================================================== */

/* Glass Cards System */
.m3-card {
  background: rgba(21, 17, 41, 0.55);
  border: 1px solid var(--m3-sys-color-outline);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 32px;
  box-shadow: var(--m3-elevation-1);
  transition: all 0.4s var(--m3-motion-spring-slow);
}

.m3-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 101, 163, 0.45);
  box-shadow: var(--m3-elevation-2), var(--m3-glow-pink);
}

/* Asymmetric Cards using M3 shapes */
.card-asym-1 {
  border-radius: var(--m3-shape-asym-1);
}
.card-asym-2 {
  border-radius: var(--m3-shape-asym-2);
}
.card-asym-3 {
  border-radius: var(--m3-shape-asym-3);
}

/* Badges / Pill Chips */
.m3-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 101, 163, 0.1);
  border: 1.5px solid rgba(255, 101, 163, 0.35);
  padding: 8px 18px;
  border-radius: var(--m3-shape-pill);
  color: var(--m3-sys-color-primary);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s var(--m3-motion-spring-fast);
  cursor: default;
}

.m3-badge:hover {
  background: rgba(255, 101, 163, 0.2);
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(255, 101, 163, 0.25);
}

/* Buttons System */
.m3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  outline: none;
  transition: all 0.3s var(--m3-motion-spring-slow);
  box-shadow: var(--m3-elevation-1);
}

.m3-btn-primary {
  background: linear-gradient(135deg, var(--m3-sys-color-primary-container), var(--m3-sys-color-secondary));
  color: var(--m3-sys-color-on-primary-container);
  border-radius: var(--m3-shape-asym-1);
}

.m3-btn-primary:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: var(--m3-elevation-2), var(--m3-glow-pink);
  border-radius: var(--m3-shape-pill); /* Expressive shape morphing on hover */
}

.m3-btn-primary:active {
  transform: translateY(-1px) scale(0.96);
}

.m3-btn-secondary {
  background: transparent;
  color: var(--m3-sys-color-primary);
  border: 2px solid var(--m3-sys-color-primary);
  border-radius: var(--m3-shape-asym-2);
}

.m3-btn-secondary:hover {
  background: rgba(255, 101, 163, 0.1);
  transform: translateY(-4px) scale(1.03);
  box-shadow: var(--m3-elevation-2), 0 0 15px rgba(255, 101, 163, 0.2);
  border-radius: var(--m3-shape-pill); /* Expressive shape morph */
}

.m3-btn-secondary:active {
  transform: translateY(-1px) scale(0.96);
}

/* ==========================================================================
   HERO / PROFILE HEADER SECTION
   ========================================================================== */
.hero-container {
  display: flex;
  flex-direction: column-reverse;
  gap: 40px;
  align-items: center;
  text-align: center;
  margin-bottom: 100px;
}

@media (min-width: 768px) {
  .hero-container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    align-items: center;
  }
}

.hero-text-block {
  max-width: 650px;
}

.hero-gradient-text {
  background: linear-gradient(90deg, var(--m3-sys-color-primary), var(--m3-sys-color-primary-container), var(--m3-sys-color-secondary), var(--m3-sys-color-tertiary));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-subtitle {
  color: var(--m3-sys-color-primary);
  margin: 12px 0 24px 0;
  letter-spacing: 0.3em;
  opacity: 0.85;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  justify-content: center;
}

@media (min-width: 768px) {
  .hero-badges-row {
    justify-content: flex-start;
  }
}

/* Profile Picture with morphing Shape & outer rotating ring */
.profile-image-container {
  position: relative;
  width: 240px;
  height: 240px;
  flex-shrink: 0;
  overflow: visible;
  align-self: center;
}

.profile-flower-ring {
  position: absolute;
  inset: -12px;
  border: 2px dashed rgba(255, 101, 163, 0.45);
  border-radius: var(--m3-shape-circle);
  animation: rotateRing 30s linear infinite;
  pointer-events: none;
}

.profile-flower-ring::after {
  content: '🌸';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.profile-pic-frame {
  width: 100%;
  height: 100%;
  border-radius: var(--m3-shape-arch);
  overflow: hidden;
  box-shadow: var(--m3-elevation-2);
  transition: all 0.6s var(--m3-motion-spring-slow);
  border: 3px solid rgba(255, 101, 163, 0.3);
  cursor: pointer;
}

.profile-pic-frame:hover {
  border-radius: var(--m3-shape-circle);
  border-color: var(--m3-sys-color-primary-container);
  transform: rotate(3deg) scale(1.05);
  box-shadow: var(--m3-elevation-3), var(--m3-glow-pink);
}

.profile-pic-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.profile-pic-frame:hover img {
  transform: scale(1.1);
}

/* ==========================================================================
   DEVELOPER TERMINAL SYSTEM (EXPRESSIVE STYLE)
   ========================================================================== */
.terminal-window {
  background: rgba(9, 7, 16, 0.88);
  border: 1.5px solid rgba(255, 101, 163, 0.35);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--m3-elevation-2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.4s var(--m3-motion-spring-slow);
}

.terminal-window:hover {
  box-shadow: var(--m3-elevation-3), var(--m3-glow-pink);
  border-color: rgba(255, 101, 163, 0.5);
}

.terminal-titlebar {
  background: rgba(255, 101, 163, 0.1);
  border-bottom: 1.5px solid rgba(255, 101, 163, 0.2);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  gap: 8px;
}

.t-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.t-dot.red    { background: #ef4444; }
.t-dot.yellow { background: #eab308; }
.t-dot.green  { background: #22c55e; }

.terminal-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--m3-sys-color-primary);
  letter-spacing: 0.05em;
}

.terminal-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1.5px solid rgba(255, 101, 163, 0.15);
  overflow-x: auto;
}

.terminal-tab-btn {
  background: transparent;
  border: none;
  border-right: 1.5px solid rgba(255, 101, 163, 0.15);
  color: var(--m3-sys-color-on-surface-variant);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  padding: 12px 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.terminal-tab-btn:hover {
  background: rgba(255, 101, 163, 0.05);
  color: var(--m3-sys-color-primary);
}

.terminal-tab-btn.active {
  background: rgba(255, 101, 163, 0.15);
  color: var(--m3-sys-color-on-surface);
  font-weight: 700;
}

.terminal-body {
  padding: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.8;
  height: 280px;
  overflow-y: auto;
  color: var(--m3-sys-color-on-surface);
}

.terminal-line {
  margin-bottom: 8px;
  word-break: break-all;
}

.term-comment { color: rgba(248, 180, 217, 0.45); }
.term-prompt { color: var(--m3-sys-color-primary-container); font-weight: 700; }
.term-cmd { color: var(--m3-sys-color-secondary); }
.term-out { color: var(--m3-sys-color-on-surface-variant); padding-left: 12px; }
.term-json-key { color: var(--m3-sys-color-tertiary); }
.term-json-val { color: var(--m3-sys-color-primary); }

.blink-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--m3-sys-color-primary);
  margin-left: 4px;
  animation: cursorBlink 1.2s step-end infinite;
}

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

/* ==========================================================================
   STATUS SECTIONS (DISCORD / SPOTIFY)
   ========================================================================== */
.status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 600px) {
  .status-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.status-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
}

.widget-frame {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--m3-sys-color-outline);
  box-shadow: var(--m3-elevation-1);
}

/* ==========================================================================
   SKILLS & LANGUAGES GRID
   ========================================================================== */
.skills-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.skills-category-block {
  background: rgba(21, 17, 41, 0.3);
  border: 1px dashed rgba(255, 101, 163, 0.2);
  border-radius: 24px;
  padding: 24px;
}

.skills-cat-title {
  color: var(--m3-sys-color-primary);
  margin-bottom: 20px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 16px;
}

.skill-chip {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--m3-sys-color-outline-variant);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  outline: none;
  user-select: none;
  transition: all 0.4s var(--m3-motion-spring-slow);
}

.skill-chip:focus-visible {
  outline: 2px solid var(--m3-sys-color-primary);
}

/* Alternate Shapes for Chips (Expressive Styling) */
.skills-grid > div:nth-child(3n+1) .skill-chip { border-radius: var(--m3-shape-asym-1); }
.skills-grid > div:nth-child(3n+2) .skill-chip { border-radius: var(--m3-shape-asym-2); }
.skills-grid > div:nth-child(3n+3) .skill-chip { border-radius: var(--m3-shape-asym-3); }

.skill-chip:hover {
  transform: translateY(-6px) scale(1.08) rotate(2deg);
  border-color: var(--m3-sys-color-primary-container);
  background: rgba(255, 101, 163, 0.08);
  box-shadow: 0 8px 24px rgba(255, 101, 163, 0.15);
}

.skill-chip:active {
  transform: scale(0.92);
}

.skill-icon-wrap {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-icon-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.skill-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--m3-sys-color-on-surface);
}

/* ==========================================================================
   INTERACTIVE CAROUSEL LINKS
   ========================================================================== */
.carousel-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 100%;
  padding: 10px 0;
}

.carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  padding: 10px;
}

.carousel-track::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}

.carousel-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  border-radius: var(--m3-shape-asym-1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(27, 22, 50, 0.8), rgba(46, 38, 82, 0.8));
  padding: 24px;
  border: 1px solid var(--m3-sys-color-outline-variant);
  transition: all 0.4s var(--m3-motion-spring-slow);
}

.carousel-card:nth-child(even) {
  border-radius: var(--m3-shape-asym-2);
}

.carousel-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(255, 101, 163, 0.4);
  box-shadow: var(--m3-elevation-2), var(--m3-glow-pink);
}

.carousel-icon {
  font-size: 2.2rem;
  color: var(--m3-sys-color-primary);
  margin-bottom: 12px;
}

.carousel-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--m3-sys-color-on-surface);
  margin-bottom: 4px;
}

.carousel-desc {
  font-size: 0.875rem;
  color: var(--m3-sys-color-on-surface-variant);
  line-height: 1.4;
}

.carousel-action-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--m3-sys-color-primary-container);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.3s ease;
}

.carousel-card:hover .carousel-action-text {
  color: var(--m3-sys-color-primary);
}

/* ==========================================================================
   POPUP MODALS & XP PROGRESS TOAST
   ========================================================================== */
.m3-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 7, 16, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.m3-dialog-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.m3-dialog {
  background: var(--m3-sys-color-surface-container-high);
  border: 2px solid var(--m3-sys-color-primary);
  width: 90%;
  max-width: 440px;
  padding: 32px;
  border-radius: var(--m3-shape-asym-1);
  box-shadow: var(--m3-elevation-3), var(--m3-glow-pink);
  transform: scale(0.8);
  transition: transform 0.4s var(--m3-motion-spring-slow);
  text-align: center;
}

.m3-dialog-overlay.active .m3-dialog {
  transform: scale(1);
}

.dialog-tag {
  color: var(--m3-sys-color-primary-container);
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  display: block;
}

.dialog-desc {
  color: var(--m3-sys-color-on-surface-variant);
  margin: 12px 0 24px 0;
  line-height: 1.5;
}

/* XP level HUD system (Sticky in bottom corner) */
.xp-hud-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  max-width: 280px;
  width: calc(100vw - 48px);
  background: rgba(27, 22, 50, 0.95);
  border: 1.5px solid var(--m3-sys-color-primary-container);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--m3-elevation-2), var(--m3-glow-pink);
  transform: translateY(150%);
  transition: transform 0.5s var(--m3-motion-spring-slow);
}

.xp-hud-container.active {
  transform: translateY(0);
}

.xp-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.xp-hud-level {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--m3-sys-color-primary);
}

.xp-hud-stat {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--m3-sys-color-on-surface-variant);
}

.xp-bar-bg {
  background: rgba(255, 255, 255, 0.08);
  height: 8px;
  border-radius: var(--m3-shape-pill);
  overflow: hidden;
}

.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--m3-sys-color-primary-container), var(--m3-sys-color-secondary));
  width: 0%;
  transition: width 0.5s ease-in-out;
  border-radius: var(--m3-shape-pill);
}

/* Toast Messages */
.m3-toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translate(-50%, -120px);
  background: var(--m3-sys-color-primary-container);
  color: var(--m3-sys-color-on-primary-container);
  padding: 14px 28px;
  border-radius: var(--m3-shape-pill);
  box-shadow: var(--m3-glow-pink);
  font-weight: 700;
  z-index: 2000;
  pointer-events: none;
  opacity: 0;
  transition: all 0.4s var(--m3-motion-spring-slow);
  text-align: center;
  max-width: 90vw;
  font-size: 0.95rem;
}

.m3-toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
footer {
  text-align: center;
  padding: 60px 0 100px 0;
  border-top: 1px dashed rgba(255, 101, 163, 0.15);
  margin-top: 80px;
}

.footer-quote {
  color: var(--m3-sys-color-primary);
  opacity: 0.65;
  letter-spacing: 0.25em;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.footer-cr {
  font-size: 0.8rem;
  color: var(--m3-sys-color-on-surface-variant);
  opacity: 0.5;
}

/* Confetti particles */
.confetti-piece {
  position: fixed;
  width: 8px;
  height: 8px;
  z-index: 1500;
  pointer-events: none;
  border-radius: 50%;
  animation: confettiFall 2.5s ease-out forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ==========================================================================
   MOBILE FIXES
   ========================================================================== */
@media (max-width: 767px) {
  .main-wrapper {
    width: 92%;
  }

  /* Tighter card padding so text isn't squeezed */
  .m3-card {
    padding: 20px;
  }

  /* Terminal: let long lines scroll inside the box, not bleed out */
  .terminal-window {
    min-width: 0;
    max-width: 100%;
  }

  .terminal-body {
    overflow-x: auto;
    font-size: 0.78rem;
  }

  .terminal-line {
    white-space: pre;
    overflow-wrap: normal;
    word-break: normal;
  }

  /* Tighter section spacing */
  .section-block {
    margin-bottom: 72px;
  }

  /* Skills grid: 2 columns on small screens */
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  }
}
