/* ==========================================================================
   Design System: Apple-Inspired Liquid Glass Aesthetic & 
                  Wandering Earth Inspired Deep Space
   Color Palette: #987ace (Amethyst), #789ace (Periwinkle), 
                  #aaccee (Ice Blue), #778899 (Light Slate Gray)
   ========================================================================== */

:root {
  /* Core Liquid Color Palette */
  --liquid-purple: #987ace;
  --liquid-periwinkle: #789ace;
  --liquid-ice: #aaccee;
  --liquid-slate: #778899;

  /* Ambient & Dynamic Gradients */
  --liquid-glow-primary: rgba(152, 122, 206, 0.35);
  --liquid-glow-secondary: rgba(120, 154, 206, 0.3);
  --liquid-glow-ice: rgba(170, 204, 238, 0.25);
  
  /* Deep Space Canvas Backgrounds */
  --bg-deep-space: #030407;
  --bg-nebula-1: #070913;
  --bg-nebula-2: #090814;
  
  /* Liquid Glass Surfaces */
  --glass-surface: rgba(119, 136, 153, 0.08);
  --glass-surface-hover: rgba(120, 154, 206, 0.16);
  --glass-border: rgba(170, 204, 238, 0.15);
  --glass-border-hover: rgba(170, 204, 238, 0.45);
  --glass-highlight: rgba(255, 255, 255, 0.12);
  
  /* Typography Colors */
  --text-primary: #f5f6fa;
  --text-secondary: #9aa8b8;
  --text-muted: #778899;
  
  /* Typography & Transitions */
  --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Fira Code", Consolas, "Roboto Mono", monospace;
  --ease-liquid: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Wandering Earth FUI Elements */
  --fui-cyan: #aaccee;
  --fui-blue: #789ace;
  --fui-purple: #987ace;
  --fui-slate: #778899;
  --fui-green: #50e3c2;
  --fui-amber: #e6b800;
  --fui-border-glow: rgba(170, 204, 238, 0.4);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep-space);
  color: var(--text-primary);
  font-family: var(--font-stack);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  position: relative;
  background: 
    radial-gradient(ellipse at 20% 15%, rgba(152, 122, 206, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 45%, rgba(120, 154, 206, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 85%, rgba(170, 204, 238, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-deep-space) 0%, var(--bg-nebula-1) 50%, var(--bg-deep-space) 100%);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

/* Realistic Spacefield Canvas Layer */
.space-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
}

/* Ambient Liquid Light Blooms in Deep Space */
body::before {
  content: "";
  position: fixed;
  top: -10vw;
  left: 10vw;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--liquid-glow-primary) 0%, transparent 60%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

body::after {
  content: "";
  position: fixed;
  bottom: 5vw;
  right: 5vw;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, var(--liquid-glow-secondary) 0%, transparent 60%);
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

/* Navigation - Floating Liquid Pill */
.nav-bar {
  position: sticky;
  top: 1rem;
  z-index: 100;
  margin: 0 auto;
  max-width: 820px;
  padding: 0 1rem;
  transition: all 0.3s var(--ease-liquid);
}

.nav-inner {
  position: relative;
  height: 52px;
  background: rgba(11, 12, 18, 0.72);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.4s var(--ease-liquid);
}

.nav-bar:hover .nav-inner {
  border-color: var(--glass-border-hover);
  box-shadow: 0 12px 40px rgba(120, 154, 206, 0.18), 
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.nav-logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #ffffff 30%, var(--liquid-ice) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  transition: opacity 0.2s;
  z-index: 102;
}

.nav-logo:hover {
  opacity: 0.8;
}

/* Desktop Navigation Links */
.nav-links {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.nav-links .nav-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: -0.01em;
  position: relative;
  transition: color 0.3s var(--ease-liquid);
}

.nav-links .nav-link:hover {
  color: #fff;
}

.nav-links .nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--liquid-purple), var(--liquid-ice));
  border-radius: 2px;
  transition: width 0.3s var(--ease-liquid);
}

.nav-links .nav-link:hover::after {
  width: 100%;
}

/* Mobile Hamburger Toggle Button (Hidden on Desktop) */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: 50%;
  position: relative;
  z-index: 102;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: background 0.3s ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hamburger-bar {
  display: block;
  width: 18px;
  height: 1.5px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-liquid), background-color 0.3s ease;
}

.nav-toggle.active .hamburger-bar:nth-child(1) {
  transform: translateY(3.25px) rotate(45deg);
}

.nav-toggle.active .hamburger-bar:nth-child(2) {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* Typography Hierarchy */
.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--liquid-purple), var(--liquid-ice));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.85rem;
}

.headline-xl {
  font-size: clamp(2.8rem, 6.5vw, 5.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: #ffffff;
}

.headline-lg {
  font-size: clamp(2.1rem, 4.5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #ffffff;
}

.subheadline {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 620px;
  line-height: 1.5;
  margin-top: 1.25rem;
}

/* Liquid Action Buttons */
.cta-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.85rem;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s var(--ease-liquid);
}

.btn-primary {
  background: linear-gradient(135deg, #ffffff 0%, var(--liquid-ice) 100%);
  color: #0b0c10;
  box-shadow: 0 4px 20px rgba(170, 204, 238, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 30px rgba(170, 204, 238, 0.55),
              0 0 40px rgba(152, 122, 206, 0.3);
}

.btn-secondary {
  background: rgba(119, 136, 153, 0.12);
  color: #f5f6fa;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.btn-secondary:hover {
  background: rgba(120, 154, 206, 0.22);
  border-color: var(--glass-border-hover);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 25px rgba(120, 154, 206, 0.25);
}

/* Cinematic Hero Sections with Space Depth */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 1.5rem;
  z-index: 1;
}

.hero-primary {
  background: transparent;
}

.hero-secondary {
  border-top: 1px solid rgba(170, 204, 238, 0.08);
  border-bottom: 1px solid rgba(170, 204, 238, 0.08);
  background: linear-gradient(180deg, rgba(3, 4, 7, 0.6) 0%, rgba(120, 154, 206, 0.05) 50%, rgba(3, 4, 7, 0.6) 100%);
  min-height: auto;
  padding: 6.5rem 0 5rem 0;
  overflow: hidden;
}

.hero-tertiary {
  min-height: 60vh;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Floating Light Spheres with Hover Physics */
.hero-visual {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.glow-sphere {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, var(--liquid-purple) 0%, var(--liquid-periwinkle) 35%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.32;
  animation: floatSphere 8s ease-in-out infinite alternate;
}

.ambient-glow {
  width: 680px;
  height: 380px;
  background: radial-gradient(ellipse at center, var(--liquid-ice) 0%, var(--liquid-periwinkle) 40%, transparent 75%);
  filter: blur(95px);
  opacity: 0.24;
  animation: floatSphere 10s ease-in-out infinite alternate-reverse;
}

@keyframes floatSphere {
  0% { transform: translateY(-20px) scale(0.95); }
  100% { transform: translateY(20px) scale(1.05); }
}

/* Section Layouts */
.section-container {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.section-header {
  margin-bottom: 3.5rem;
}

/* Bento Grid System with Apple Liquid Glass Surface */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.75rem;
}

.bento-col-4 {
  grid-column: span 4;
}

.bento-col-8 {
  grid-column: span 8;
}

/* Liquid Glass Cards */
.bento-card {
  position: relative;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  padding: 2.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  min-height: 350px;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4),
              inset 0 1px 0 var(--glass-highlight);
  transition: transform 0.5s var(--ease-liquid),
              box-shadow 0.5s var(--ease-liquid),
              border-color 0.5s var(--ease-liquid),
              background 0.5s var(--ease-liquid);
}

/* Liquid Specular Reflection on Card Top Edge */
.bento-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(170, 204, 238, 0.6), transparent);
  opacity: 0.5;
  transition: opacity 0.4s var(--ease-liquid);
}

/* Hover Physics - Dynamic Elevation & Fluid Color Spill */
.bento-card:hover {
  transform: translateY(-8px) scale(1.015);
  background: var(--glass-surface-hover);
  border-color: var(--glass-border-hover);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6),
              0 0 35px rgba(120, 154, 206, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.bento-card:hover::before {
  opacity: 1;
}

.card-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--liquid-ice);
  margin-bottom: 0.85rem;
  display: inline-block;
}

.card-title {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-bottom: 0.65rem;
  transition: color 0.3s var(--ease-liquid);
}

.bento-card:hover .card-title {
  background: linear-gradient(135deg, #ffffff 40%, var(--liquid-ice) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 460px;
}

/* Liquid Visual Backdrops with Hover Reaction */
.card-visual {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.45;
  filter: blur(45px);
  transition: transform 0.6s var(--ease-liquid), opacity 0.6s var(--ease-liquid);
}

.bento-card:hover .card-visual {
  opacity: 0.85;
  transform: scale(1.25) translate(-10px, -10px);
}

.visual-abstract-1 {
  background: radial-gradient(circle, var(--liquid-purple) 0%, var(--liquid-periwinkle) 50%, transparent 75%);
}

.visual-abstract-2 {
  background: radial-gradient(circle, var(--liquid-periwinkle) 0%, var(--liquid-ice) 50%, transparent 75%);
}

.visual-abstract-3 {
  background: radial-gradient(circle, var(--liquid-ice) 0%, var(--liquid-slate) 50%, transparent 75%);
}

.visual-abstract-4 {
  background: radial-gradient(circle, var(--liquid-purple) 0%, var(--liquid-ice) 50%, transparent 75%);
}

/* Metrics Bento Cards with Liquid Styling */
.metric-card {
  min-height: 220px;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.metric-num {
  font-size: 3.8rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.65rem;
  background: linear-gradient(135deg, #ffffff 20%, var(--liquid-ice) 70%, var(--liquid-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: transform 0.4s var(--ease-elastic);
}

.metric-card:hover .metric-num {
  transform: scale(1.08);
}

.metric-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ==========================================================================
   Continuous Skills Ticker (Auto-Scrolling Marquee)
   ========================================================================== */
.skills-ticker-wrapper {
  width: 100%;
  overflow: hidden;
  margin: 3.5rem 0 2rem 0;
  position: relative;
  z-index: 2;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.skills-ticker-track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  animation: tickerScroll 28s linear infinite;
}

.skills-ticker-wrapper:hover .skills-ticker-track {
  animation-play-state: paused;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  background: rgba(119, 136, 153, 0.06);
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(170, 204, 238, 0.1);
  white-space: nowrap;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.3s ease;
}

.ticker-item:hover {
  color: #ffffff;
  border-color: var(--glass-border-hover);
  background: rgba(120, 154, 206, 0.16);
  transform: scale(1.04);
}

.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--liquid-ice);
  box-shadow: 0 0 8px var(--liquid-ice);
}

/* ==========================================================================
   Horizontal Scroll Gallery / Carousel with Overflow Edge Blurring
   ========================================================================== */
.skills-gallery-container {
  width: 100%;
  position: relative;
  z-index: 3;
  margin-top: 1rem;
}

.gallery-controls {
  max-width: 1120px;
  margin: 0 auto 1.5rem auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gallery-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.gallery-nav-btns {
  display: flex;
  gap: 0.65rem;
}

.gallery-arrow-btn {
  background: rgba(119, 136, 153, 0.12);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.3s var(--ease-liquid);
}

.gallery-arrow-btn:hover {
  background: rgba(120, 154, 206, 0.25);
  border-color: var(--glass-border-hover);
  color: #fff;
  transform: scale(1.08);
}

/* Carousel Track with Edge Overflow & Padding */
.skills-carousel-track {
  display: flex;
  gap: 1.6rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 1rem max(1.5rem, calc((100vw - 1120px) / 2)) 2.5rem max(1.5rem, calc((100vw - 1120px) / 2));
  scrollbar-width: none;
  cursor: grab;
}

.skills-carousel-track::-webkit-scrollbar {
  display: none;
}

.skills-carousel-track.active-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

/* Individual Slide Cards */
.skill-slide-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
  position: relative;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 380px;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4),
              inset 0 1px 0 var(--glass-highlight);
  transition: transform 0.4s var(--ease-liquid),
              border-color 0.4s var(--ease-liquid),
              box-shadow 0.4s var(--ease-liquid),
              background 0.4s var(--ease-liquid);
  outline: none;
}

.skill-slide-card:hover,
.skill-slide-card:focus-visible {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--glass-border-hover);
  background: var(--glass-surface-hover);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6),
              0 0 35px rgba(120, 154, 206, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.skill-card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--liquid-ice);
  margin-bottom: 1.5rem;
}

/* Card Visual Abstract Glow & Icon */
.skill-card-visual {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  border: 1px solid rgba(170, 204, 238, 0.2);
  position: relative;
  transition: all 0.4s var(--ease-liquid);
}

.visual-grad-1 { background: radial-gradient(circle, rgba(152, 122, 206, 0.3) 0%, rgba(120, 154, 206, 0.05) 100%); }
.visual-grad-2 { background: radial-gradient(circle, rgba(120, 154, 206, 0.3) 0%, rgba(170, 204, 238, 0.05) 100%); }
.visual-grad-3 { background: radial-gradient(circle, rgba(170, 204, 238, 0.3) 0%, rgba(152, 122, 206, 0.05) 100%); }
.visual-grad-4 { background: radial-gradient(circle, rgba(119, 136, 153, 0.3) 0%, rgba(120, 154, 206, 0.05) 100%); }
.visual-grad-5 { background: radial-gradient(circle, rgba(152, 122, 206, 0.35) 0%, rgba(170, 204, 238, 0.08) 100%); }

.skill-slide-card:hover .skill-card-visual {
  transform: scale(1.1) rotate(4deg);
  border-color: var(--glass-border-hover);
  box-shadow: 0 0 25px rgba(170, 204, 238, 0.3);
}

.skill-visual-icon {
  width: 34px;
  height: 34px;
  color: var(--liquid-ice);
}

.skill-card-title {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 0.65rem;
  line-height: 1.25;
}

.skill-card-snippet {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

.skill-card-action {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--liquid-ice);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.25s ease;
}

.skill-slide-card:hover .skill-card-action {
  transform: translateX(4px);
  color: #ffffff;
}

/* ==========================================================================
   Apple Liquid Glass Expanded View Modal
   ========================================================================== */
.skill-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(3, 4, 7, 0.75);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-liquid), visibility 0.4s var(--ease-liquid);
}

.skill-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.skill-modal-dialog {
  position: relative;
  background: rgba(14, 16, 24, 0.88);
  border: 1px solid var(--glass-border-hover);
  border-radius: 32px;
  max-width: 650px;
  width: 100%;
  padding: 3rem 2.5rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8),
              0 0 50px rgba(120, 154, 206, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.4s var(--ease-elastic);
}

.skill-modal-backdrop.active .skill-modal-dialog {
  transform: translateY(0) scale(1);
}

.skill-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(119, 136, 153, 0.12);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--ease-liquid);
}

.skill-modal-close:hover {
  background: rgba(120, 154, 206, 0.25);
  color: #fff;
  transform: scale(1.08) rotate(90deg);
}

.skill-modal-badge {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--liquid-ice);
  margin-bottom: 0.75rem;
}

.skill-modal-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.skill-modal-body {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.skill-modal-body strong {
  color: #ffffff;
}

.skill-modal-body em {
  color: var(--liquid-ice);
  font-style: normal;
}

.skill-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.modal-tag-pill {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  background: rgba(120, 154, 206, 0.15);
  border: 1px solid rgba(170, 204, 238, 0.25);
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  backdrop-filter: blur(12px);
}
.social-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  margin-top: 3rem;
  width: 100%;
  max-width: 820px;
}

.social-glass-card {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  padding: 1rem 1.6rem;
  background: rgba(119, 136, 153, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s var(--ease-liquid);
  flex: 1 1 230px;
  max-width: 260px;
}

.social-glass-card:hover {
  transform: translateY(-5px) scale(1.03);
  background: rgba(120, 154, 206, 0.18);
  border-color: var(--glass-border-hover);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5),
              0 0 25px rgba(120, 154, 206, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.social-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(170, 204, 238, 0.1);
  border: 1px solid rgba(170, 204, 238, 0.2);
  color: var(--liquid-ice);
  transition: all 0.3s var(--ease-liquid);
  flex-shrink: 0;
}

.social-glass-card:hover .social-icon-wrapper {
  background: linear-gradient(135deg, var(--liquid-purple), var(--liquid-periwinkle));
  color: #ffffff;
  border-color: transparent;
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 4px 15px rgba(152, 122, 206, 0.4);
}

.social-svg {
  width: 22px;
  height: 22px;
}

.social-details {
  display: flex;
  flex-direction: column;
  text-align: left;
  overflow: hidden;
}

.social-platform {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.social-handle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.social-glass-card:hover .social-handle {
  color: var(--liquid-ice);
}

/* Liquid Glass Footer */
.footer {
  border-top: 1px solid rgba(170, 204, 238, 0.08);
  padding: 3.5rem 1.5rem;
  background: rgba(3, 4, 7, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  z-index: 2;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--liquid-slate);
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--liquid-ice);
}

/* ==========================================================================
   Mobile Responsive Navigation & Layout
   ========================================================================== */
@media (max-width: 900px) {
  .nav-bar {
    max-width: 94%;
  }

  .bento-col-4,
  .bento-col-8 {
    grid-column: span 12;
  }
  
  .bento-card {
    min-height: 290px;
    padding: 2.25rem;
    border-radius: 26px;
  }
  
  .hero {
    min-height: 72vh;
  }
}

/* Mobile Screens - Nav Stack & Drawer Transition */
@media (max-width: 768px) {
  .nav-bar {
    top: 0.75rem;
    padding: 0 0.75rem;
    max-width: 100%;
  }

  .nav-toggle {
    display: flex;
  }

  /* Nav menu transforms into a floating liquid glass stack on mobile */
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(11, 12, 18, 0.94);
    backdrop-filter: blur(30px) saturate(190%);
    -webkit-backdrop-filter: blur(30px) saturate(190%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1rem 0.75rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7),
                0 0 25px rgba(120, 154, 206, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    
    /* Collapsed state */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.35s var(--ease-liquid),
                transform 0.35s var(--ease-liquid),
                visibility 0.35s var(--ease-liquid);
  }

  /* Expanded state */
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .nav-links .nav-link {
    font-size: 1rem;
    padding: 0.85rem 1.25rem;
    border-radius: 16px;
    color: var(--text-primary);
    transition: background 0.2s ease, color 0.2s ease;
  }

  .nav-links .nav-link:hover,
  .nav-links .nav-link:active {
    background: rgba(170, 204, 238, 0.12);
    color: #ffffff;
  }

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

  .social-channels {
    flex-direction: column;
    align-items: center;
  }

  .social-glass-card {
    width: 100%;
    max-width: 320px;
  }
}

/* ==========================================================================
   The Wandering Earth FUI (Fantasy User Interface) Component Styles
   ========================================================================== */

/* Nav Brand Telemetry Status */
.nav-brand-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.fui-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(170, 204, 238, 0.08);
  border: 1px solid rgba(170, 204, 238, 0.2);
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
}

.fui-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fui-green);
  box-shadow: 0 0 8px var(--fui-green);
  animation: fuiPulse 2s infinite ease-in-out;
}

@keyframes fuiPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.fui-tag-text {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--fui-cyan);
}

.nav-idx {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--liquid-purple);
  margin-right: 0.35rem;
  opacity: 0.8;
}

/* FUI HUD Telemetry Floating Corners */
.fui-telemetry-corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 2;
  pointer-events: none;
}

.fui-telemetry-corner.top-left {
  top: 2rem;
  left: 2rem;
  text-align: left;
}

.fui-telemetry-corner.top-right {
  top: 2rem;
  right: 2rem;
  text-align: right;
}

.fui-mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--liquid-slate);
  opacity: 0.75;
}

/* FUI Concentric HUD Rings in Hero Visual */
.fui-hud-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  border: 1px dashed rgba(170, 204, 238, 0.15);
}

.ring-outer {
  width: 640px;
  height: 640px;
  animation: rotateRing 60s linear infinite;
}

.ring-inner {
  width: 440px;
  height: 440px;
  border-style: dotted;
  border-color: rgba(152, 122, 206, 0.18);
  animation: rotateRing 40s linear infinite reverse;
}

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

/* FUI Badge Pill in Hero */
.fui-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(119, 136, 153, 0.08);
  border: 1px solid rgba(170, 204, 238, 0.18);
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
}

.fui-badge-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--liquid-periwinkle);
  font-weight: 600;
}

.fui-badge-divider {
  width: 1px;
  height: 12px;
  background: rgba(170, 204, 238, 0.25);
}

/* FUI Section Meta Headers */
.fui-section-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.fui-meta-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--liquid-ice);
  opacity: 0.85;
}

.fui-meta-line {
  height: 1px;
  background: linear-gradient(90deg, rgba(170, 204, 238, 0.3), transparent);
  flex: 1;
  max-width: 250px;
}

/* FUI Card Corner Brackets */
.fui-card {
  position: relative;
}

.fui-bracket {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  opacity: 0.55;
  transition: all 0.3s var(--ease-liquid);
}

.fui-bracket.tl {
  top: 10px;
  left: 10px;
  border-top: 1.5px solid var(--fui-cyan);
  border-left: 1.5px solid var(--fui-cyan);
}

.fui-bracket.tr {
  top: 10px;
  right: 10px;
  border-top: 1.5px solid var(--fui-cyan);
  border-right: 1.5px solid var(--fui-cyan);
}

.fui-bracket.bl {
  bottom: 10px;
  left: 10px;
  border-bottom: 1.5px solid var(--fui-cyan);
  border-left: 1.5px solid var(--fui-cyan);
}

.fui-bracket.br {
  bottom: 10px;
  right: 10px;
  border-bottom: 1.5px solid var(--fui-cyan);
  border-right: 1.5px solid var(--fui-cyan);
}

.fui-card:hover .fui-bracket {
  opacity: 1;
  transform: scale(1.15);
  border-color: #ffffff;
  box-shadow: 0 0 10px rgba(170, 204, 238, 0.4);
}

.fui-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.fui-id-code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--liquid-slate);
  opacity: 0.8;
}

/* FUI Sub-labels & Meter Progress Bars for Metrics */
.fui-sub-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--liquid-periwinkle);
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.fui-meter-bar {
  width: 80%;
  height: 3px;
  background: rgba(119, 136, 153, 0.15);
  border-radius: 2px;
  margin: 1.25rem auto 0 auto;
  overflow: hidden;
  position: relative;
}

.fui-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--liquid-purple), var(--liquid-ice));
  border-radius: 2px;
  box-shadow: 0 0 8px var(--liquid-ice);
  transition: width 0.6s var(--ease-liquid);
}

.fui-card:hover .fui-meter-fill {
  filter: brightness(1.25);
}

@media (max-width: 768px) {
  .fui-telemetry-corner {
    display: none;
  }
  .fui-hud-ring {
    display: none;
  }
}

