/* ==========================================================================
   jerryshi.com - Personal Home Landing Page CSS (WCAG AA Compliant)
   ========================================================================== */

/* --- Self-Hosted Web Fonts --- */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('./fonts/outfit-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('./fonts/plus-jakarta-sans-regular.woff2') format('woff2');
}

/* --- CSS Variables & Design System Tokens --- */
:root {
  /* Warm Light Theme Palette (WCAG 4.5:1 Contrast AA Compliant) */
  --bg-color: #FFFBF7;
  --bg-secondary: #FFF5EE;
  --card-bg: #FFFFFF;
  --card-border: rgba(255, 183, 147, 0.3);
  
  --text-main: #423026;
  --text-muted: #644E44;
  --text-light: #7E675D;

  --accent-peach: #C2410C;
  --accent-peach-light: #FF8A65;
  --accent-coral: #E11D48;
  --accent-amber: #D97706;
  --accent-warm-bg: rgba(255, 138, 101, 0.12);

  --nav-bg: rgba(255, 251, 247, 0.88);
  --nav-border: rgba(255, 204, 182, 0.5);

  --gradient-warm: linear-gradient(135deg, #FF8A65 0%, #FF6B6B 50%, #F59E0B 100%);
  --gradient-bg-blob1: radial-gradient(circle, rgba(255, 183, 147, 0.35) 0%, rgba(255, 251, 247, 0) 70%);
  --gradient-bg-blob2: radial-gradient(circle, rgba(254, 215, 170, 0.4) 0%, rgba(255, 251, 247, 0) 70%);

  --shadow-sm: 0 2px 8px rgba(45, 42, 38, 0.04);
  --shadow-md: 0 8px 24px -4px rgba(255, 138, 101, 0.12);
  --shadow-lg: 0 16px 36px -6px rgba(255, 138, 101, 0.16);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Dark Theme Tokens --- */
[data-theme="dark"] {
  --bg-color: #161412;
  --bg-secondary: #211E1B;
  --card-bg: #221F1C;
  --card-border: rgba(255, 183, 147, 0.18);

  --text-main: #F7F5F3;
  --text-muted: #D6D2CE;
  --text-light: #A8A29D;

  --accent-peach: #FF8A65;
  --accent-peach-light: #FF9E80;
  --accent-coral: #FF7878;
  --accent-amber: #FBBF24;
  --accent-warm-bg: rgba(255, 138, 101, 0.16);

  --nav-bg: rgba(22, 20, 18, 0.82);
  --nav-border: rgba(255, 183, 147, 0.2);

  --gradient-bg-blob1: radial-gradient(circle, rgba(255, 138, 101, 0.35) 0%, rgba(22, 20, 18, 0) 70%);
  --gradient-bg-blob2: radial-gradient(circle, rgba(245, 158, 11, 0.28) 0%, rgba(22, 20, 18, 0) 70%);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 36px -6px rgba(0, 0, 0, 0.55);
}

/* --- Base Reset & Global Rules --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Focus Visible Accessibility Rings for Keyboard Navigation */
:focus-visible {
  outline: 2px solid var(--accent-peach);
  outline-offset: 3px;
}

/* --- Ambient Dynamic Background Blobs --- */
.ambient-blob {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
  transition: opacity var(--transition-normal);
}

[data-theme="dark"] .ambient-blob {
  opacity: 0.65;
  filter: blur(60px);
}

.blob-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  right: -100px;
  background: var(--gradient-bg-blob1);
  animation: floatBlob1 18s ease-in-out infinite alternate;
}

.blob-2 {
  width: 450px;
  height: 450px;
  bottom: -100px;
  left: -100px;
  background: var(--gradient-bg-blob2);
  animation: floatBlob2 22s ease-in-out infinite alternate;
}

@keyframes floatBlob1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, 80px) scale(1.1); }
  100% { transform: translate(40px, -50px) scale(0.95); }
}

@keyframes floatBlob2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(80px, -60px) scale(1.08); }
  100% { transform: translate(-40px, 40px) scale(0.9); }
}

/* --- App Container --- */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- Floating Header Navigation --- */
.header {
  position: sticky;
  top: 20px;
  z-index: 100;
  margin-bottom: 40px;
  padding-top: 10px;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--nav-border);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
  transition: transform var(--transition-fast);
}

.brand-logo:hover {
  transform: scale(1.03);
}

.logo-icon {
  font-size: 1.2rem;
}

.brand-logo .logo-text {
  color: var(--accent-peach);
}

/* --- Navigation Links --- */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--accent-peach);
  background: var(--accent-warm-bg);
}

.nav-icon {
  width: 16px;
  height: 16px;
}

/* --- Theme Switcher Button --- */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--nav-border);
  background: var(--card-bg);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  transform: rotate(15deg) scale(1.08);
}

.sun-icon { display: block; }
.moon-icon { display: none; }

[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

/* --- Main Content (Optically Centered Upwards) --- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 140px;
  width: 100%;
}

/* --- Hero Section --- */
.hero-section {
  text-align: center;
  padding: 10px 0 40px;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-warm-bg);
  border: 1px solid rgba(255, 138, 101, 0.35);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-peach);
  margin-bottom: 32px;
}

.arrow-sep {
  display: inline-block;
  margin: 0 4px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-peach);
  box-shadow: 0 0 10px var(--accent-peach);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.highlight-warm {
  background: linear-gradient(135deg, #FF8A65 0%, #FF6B6B 35%, #F59E0B 70%, #FF8A65 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 6s linear infinite;
}

@keyframes textShimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* --- Symmetrical Bio Quote Card --- */
.bio-banner {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.bio-banner:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 138, 101, 0.35);
}

.bio-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(255, 138, 101, 0.25);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.bio-banner:hover .dev-avatar {
  transform: scale(1.12) rotate(-8deg);
  box-shadow: 0 8px 20px rgba(255, 138, 101, 0.35);
}

.bio-banner:hover .trader-avatar {
  transform: scale(1.12) rotate(8deg);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.dev-avatar {
  background: var(--gradient-warm);
}

.trader-avatar {
  background: linear-gradient(135deg, #F59E0B 0%, #FF8A65 100%);
}

.bio-info {
  flex: 1;
  padding: 0 10px;
}

.bio-info h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-main);
}

.bio-info p {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Entrance & Micro Animations --- */
.header {
  animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-section {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}

.bio-banner {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.25s backwards;
}

@keyframes fadeInDown {
  0% { opacity: 0; transform: translateY(-16px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* --- Pure CSS Interactive Press & Elastic Ripple (100% GPU Accelerated) --- */
.status-badge, .bio-avatar {
  position: relative;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.status-badge:active, .bio-avatar:active {
  transform: scale(0.92) !important;
  transition: transform 0.08s ease;
}

.status-badge::after, .bio-avatar::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid var(--accent-peach-light);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

.status-badge:active::after, .bio-avatar:active::after {
  transform: scale(1.45);
  opacity: 0.8;
  transition: 0s;
}

/* --- Page Footer --- */
.footer {
  margin-top: auto;
  padding: 30px 0;
  border-top: 1px solid var(--card-border);
  text-align: center;
}

.footer-content {
  font-size: 0.88rem;
  color: var(--text-light);
}

/* --- Mobile Responsive Rules --- */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.1rem;
  }
}

@media (max-width: 640px) {
  .main-content {
    padding: 10px 0 10px;
  }

  .app-container {
    padding: 0 14px;
  }

  .header {
    top: 10px;
    margin-bottom: 20px;
  }

  .nav-wrapper {
    padding: 6px 10px;
  }

  .brand-logo {
    font-size: 0.95rem;
    gap: 5px;
  }

  .logo-icon {
    font-size: 1rem;
  }

  .nav-links {
    gap: 2px;
  }

  .nav-link {
    padding: 5px 8px;
    font-size: 0.82rem;
    gap: 4px;
  }

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

  .theme-toggle {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    flex-shrink: 0;
  }

  .hero-section {
    padding: 10px 0 24px;
  }

  .hero-title {
    font-size: 1.75rem;
    line-height: 1.38;
  }

  .status-badge {
    padding: 4px 12px;
    font-size: 0.8rem;
    margin-bottom: 18px;
  }

  .bio-banner {
    padding: 16px 12px;
    gap: 10px;
    flex-direction: row;
    align-items: center;
  }

  .bio-avatar {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }

  .bio-info {
    padding: 0 2px;
  }

  .bio-info h2 {
    font-size: 0.94rem;
    margin-bottom: 2px;
  }

  .bio-info p {
    font-size: 0.8rem;
    line-height: 1.4;
  }
}
