/* ============================================================
   LNUYASHA — CINEMATIC DESIGN SYSTEM
   Film-grade visual language · Dark-premium aesthetic v2.0
   
   Design philosophy:
   "Every pixel should feel like a frame from a carefully composed shot."
   Inspired by A24 film sites, Linear app, and cyberpunk noir.
   ============================================================ */

/* ── 1. DESIGN TOKENS (CSS Custom Properties) ── */
:root {
  /* ═══ Color Palette ═══ */
  /* Backgrounds — deep cinematic blacks with subtle warmth */
  --cinema-bg:          #08080c;
  --cinema-bg-elevated: #0e0e14;
  --cinema-bg-card:     #12121a;
  --cinema-bg-glass:    rgba(18, 18, 26, 0.7);
  --cinema-bg-hover:    rgba(255, 255, 255, 0.04);
  --cinema-bg-alt:      #0a0a10;

  /* Text — warm white hierarchy */
  --cinema-text:        rgba(245, 245, 250, 0.95);
  --cinema-text-sec:    rgba(180, 180, 195, 0.8);
  --cinema-text-muted:  rgba(120, 120, 145, 0.6);
  --cinema-text-dim:    rgba(100, 100, 125, 0.4);

  /* Accent — electric cyan-teal (cyberpunk heritage) */
  --cinema-accent:         #00d4aa;
  --cinema-accent-glow:    rgba(0, 212, 170, 0.25);
  --cinema-accent-subtle:  rgba(0, 212, 170, 0.1);
  --cinema-accent-hov:     #00f5c4;
  --cinema-accent-active:  #00b894;

  /* Secondary accent — warm gold for highlights */
  --cinema-gold:           #f0b860;
  --cinema-gold-glow:      rgba(240, 184, 96, 0.2);
  --cinema-gold-subtle:    rgba(240, 184, 96, 0.08);

  /* Semantic colors */
  --cinema-success:  #34d399;
  --cinema-warning:  #fbbf24;
  --cinema-error:    #f87171;
  --cinema-info:     #60a5fa;

  /* Borders — ultra-subtle */
  --cinema-border:       rgba(255, 255, 255, 0.06);
  --cinema-border-hover: rgba(255, 255, 255, 0.12);
  --cinema-border-accent: rgba(0, 212, 170, 0.25);

  /* ═══ Typography ═══ */
  --font-display: 'Cormorant Garamond', 'Playfair Display', 'Georgia', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Fluid type scale using clamp() */
  --text-xs:   clamp(0.7rem,  0.65rem  + 0.25vw,  0.75rem);   /* 11-12px */
  --text-sm:   clamp(0.8rem,  0.775rem + 0.125vw, 0.875rem);   /* 13-14px */
  --text-base: clamp(0.9rem,  0.85rem  + 0.25vw,  1rem);      /* 14-16px */
  --text-lg:   clamp(1.05rem, 1rem    + 0.25vw,  1.125rem);   /* 17-18px */
  --text-xl:   clamp(1.2rem,  1.1rem   + 0.5vw,   1.35rem);   /* 19-22px */
  --text-2xl:  clamp(1.5rem,  1.3rem   + 1vw,    1.85rem);    /* 24-30px */
  --text-3xl:  clamp(1.9rem,  1.5rem   + 2vw,    2.5rem);     /* 30-40px */
  --text-4xl:  clamp(2.5rem,  2rem     + 2.5vw,  3.5rem);     /* 40-56px */
  --text-5xl:  clamp(3rem,   2.2rem   + 4vw,    5rem);        /* 48-80px */

  /* Line heights */
  --leading-tight:   1.15;
  --leading-snug:    1.35;
  --leading-normal:  1.6;
  --leading-relaxed: 1.75;

  /* Letter spacing */
  --tracking-tighter: -0.03em;
  --tracking-tight:   -0.02em;
  --tracking-normal:  0;
  --tracking-wide:    0.02em;
  --tracking-wider:   0.05em;
  --tracking-widest:  0.12em;

  /* ═══ Spacing Scale (8px base) ═══ */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-9:  36px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* ═══ Border Radius ═══ */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-2xl:  32px;
  --radius-pill: 9999px;

  /* ═══ Shadows — Cinematic Depth System ═══ */
  --shadow-xs:   0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm:   0 2px 8px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md:   0 4px 16px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg:   0 8px 32px rgba(0, 0, 0, 0.35), 0 4px 8px rgba(0, 0, 0, 0.2);
  --shadow-xl:   0 16px 48px rgba(0, 0, 0, 0.4), 0 8px 16px rgba(0, 0, 0, 0.25);
  --shadow-2xl:  0 24px 64px rgba(0, 0, 0, 0.5), 0 12px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow:  0 0 30px var(--cinema-accent-glow), 0 0 60px rgba(0, 212, 170, 0.1);
  --shadow-glow-lg: 0 0 40px var(--cinema-accent-glow), 0 0 80px rgba(0, 212, 170, 0.15);

  /* ═══ Transitions — Cinema-style Easing ═══ */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 200ms;
  --dur-norm: 350ms;
  --dur-slow: 600ms;
  --dur-cine: 900ms;

  /* ═══ Layout ═══ */
  --max-width:     1320px;
  --content-width:  780px;
  --nav-height:    80px;

  /* Z-index scale */
  --z-base:    1;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-nav:      500;
  --z-overlay:  900;
  --z-modal:    1000;
  --z-toast:    1100;
}

/* ── LIGHT MODE OVERRIDES ── */
[data-theme="light"] {
  /* Backgrounds — warm stone (not pure white) */
  --cinema-bg:          #f5f3ef;
  --cinema-bg-elevated: #faf8f5;
  --cinema-bg-card:     #ffffff;
  --cinema-bg-glass:    rgba(250, 248, 245, 0.82);
  --cinema-bg-hover:    rgba(0, 0, 0, 0.03);
  --cinema-bg-alt:      #edeae4;

  /* Text — soft ink */
  --cinema-text:        rgba(25, 22, 18, 0.92);
  --cinema-text-sec:    rgba(55, 50, 45, 0.76);
  --cinema-text-muted:  rgba(100, 95, 88, 0.56);
  --cinema-text-dim:    rgba(130, 125, 118, 0.38);

  /* Borders */
  --cinema-border:       rgba(0, 0, 0, 0.06);
  --cinema-border-hover: rgba(0, 0, 0, 0.11);
  --cinema-border-accent: rgba(0, 168, 132, 0.18);

  /* Accent — deeper teal for light bg contrast */
  --cinema-accent:         #00997a;
  --cinema-accent-glow:    rgba(0, 153, 122, 0.12);
  --cinema-accent-subtle:  rgba(0, 153, 122, 0.06);

  --cinema-gold:           #b87a20;
  --cinema-gold-glow:      rgba(184, 122, 32, 0.1);
  --cinema-gold-subtle:    rgba(184, 122, 32, 0.04);

  --shadow-xs:  0 1px 2px rgba(40,30,15,0.04);
  --shadow-sm:  0 2px 8px rgba(40,30,15,0.05), 0 1px 2px rgba(40,30,15,0.03);
  --shadow-md:  0 4px 16px rgba(40,30,15,0.07), 0 2px 4px rgba(40,30,15,0.03);
  --shadow-lg:  0 8px 32px rgba(40,30,15,0.09), 0 4px 8px rgba(40,30,15,0.04);
  --shadow-xl:  0 16px 48px rgba(40,30,15,0.1), 0 8px 16px rgba(40,30,15,0.05);
  --shadow-2xl: 0 24px 64px rgba(40,30,15,0.12), 0 12px 24px rgba(40,30,15,0.06);

  /* Timeline header — light mode warm gradient */
  .timeline-new__header {
    background: radial-gradient(ellipse at 20% 40%, rgba(0, 120, 255, 0.06) 0%, transparent 55%),
                radial-gradient(ellipse at 85% 70%, rgba(114, 46, 209, 0.05) 0%, transparent 60%),
                linear-gradient(135deg, #f5f9ff 0%, #eef2f7 40%, #f8fafd 70%, #e2e8f0 100%);
  }
  .timeline-new__header::before { display: none; }
  .timeline-new__date {
    color: rgba(26,24,21,0.65);
    background: rgba(0,100,80,0.08);
    border-color: rgba(0,153,122,0.18);
  }
  .timeline-new__org { color: rgba(26,24,21,0.7); }
}


/* ── 2. RESET & BASE ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--cinema-text);
  background-color: var(--cinema-bg);
  overflow-x: hidden;
  transition: background-color var(--dur-slow) var(--ease-out-expo),
              color var(--dur-slow) var(--ease-out-expo);
}

/* Subtle noise texture overlay for depth — using cheap CSS pattern instead of inline SVG */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: var(--z-base);
  pointer-events: none;
  opacity: 0.018;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0,212,170,0.03) 0%, transparent 50%);
}

[data-theme="light"] body::before { opacity: 0.012; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* Selection color */
::selection {
  background: var(--cinema-accent);
  color: var(--cinema-bg);
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--cinema-accent);
  outline-offset: 2px;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--cinema-border-hover);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--cinema-text-dim); }


/* ── 3. LAYOUT UTILITIES ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* Path / blog page — narrower for comfortable reading */
[data-page="blog"] .container {
  max-width: 1120px;
}

.container--narrow {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section {
  position: relative;
  padding-block: var(--space-20);
}

.section--alt {
  background-color: var(--cinema-bg-alt);
}

.section--dense {
  padding-block: var(--space-12);
}

.text-center { text-align: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }


/* ── 4. TYPOGRAPHY SYSTEM ── */

/* Display heading — serif, cinematic feel */
.display-heading {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--cinema-text);
}

/* Section label — uppercase tracking */
.label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--cinema-accent);
}

/* Heading hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--cinema-text);
}

p { 
  color: var(--cinema-text-sec); 
  line-height: var(--leading-relaxed); 
}


/* ── 5. NAVIGATION — Floating glass navbar ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: var(--cinema-bg-glass);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--cinema-border);
  transition: all var(--dur-norm) var(--ease-out-expo);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  gap: var(--space-6);
}

/* 修改 .nav__logo — 增加 flex: 1 并保持内容左对齐 */
.nav__logo {
  flex: 1;                     /* 新增 */
  display: flex;
  align-items: center;
  justify-content: flex-start; /* 新增：确保Logo靠在左侧 */
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--cinema-text);
  letter-spacing: var(--tracking-tight);
  text-decoration: none;
  transition: opacity var(--dur-fast) var(--ease-out-expo);
}

.nav__logo:hover { opacity: 0.8; }

.nav__logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--cinema-accent) 0%, var(--cinema-gold) 100%);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cinema-bg);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -1px;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  list-style: none;
}

.nav__links a {
  padding: var(--space-2) var(--space-5);
  font-size: 15px;
  font-weight: 500;
  color: var(--cinema-text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--dur-fast) var(--ease-out-expo);
  text-decoration: none;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: var(--space-4);
  right: var(--space-4);
  height: 1.5px;
  background: var(--cinema-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-norm) var(--ease-out-expo);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--cinema-text);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__cta {
  flex: 1;                     /* 新增 */
  display: flex;
  align-items: center;
  justify-content: flex-end;   /* 新增：让右侧内容靠右 */
  gap: var(--space-3);
}

/* 中间的 .nav__links 保持原样，不设置 flex */
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  list-style: none;
  /* 不要加 flex: 1，让它由内容撑开 */
}

/* Theme toggle */
.theme-toggle {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cinema-bg-hover);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 17px;
  color: var(--cinema-text-sec);
  transition: all var(--dur-fast) var(--ease-out-expo);
}
.theme-toggle:hover {
  background: var(--cinema-bg-hover);
  border-color: var(--cinema-border-hover);
  color: var(--cinema-text);
  transform: rotate(15deg);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-2);
  background: none;
  border: none;
}
.nav__hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--cinema-text);
  border-radius: 2px;
  transition: all var(--dur-fast) var(--ease-out-expo);
}


/* ── Mobile Navigation Drawer ── */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
}
.nav-mobile.open { display: block; }
.nav-mobile__overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: fadeIn var(--dur-norm) var(--ease-out-expo);
}
.nav-mobile__drawer {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 300px;
  background: var(--cinema-bg-elevated);
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  border-left: 1px solid var(--cinema-border);
  animation: slideInRight var(--dur-norm) var(--ease-out-expo);
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(100%); } to { transform: translateX(0); }
}
.nav-mobile__close {
  align-self: flex-end;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cinema-bg-hover);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 18px;
  color: var(--cinema-text-sec);
  margin-bottom: var(--space-6);
  transition: all var(--dur-fast);
}
.nav-mobile__close:hover {
  background: var(--cinema-bg-hover);
  color: var(--cinema-text);
}
.nav-mobile__link {
  padding: var(--space-3) var(--space-4);
  font-size: 15px;
  font-weight: 500;
  color: var(--cinema-text-sec);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-out-expo);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.nav-mobile__link:hover,
.nav-mobile__link--active {
  background: var(--cinema-accent-subtle);
  color: var(--cinema-accent);
  text-decoration: none;
}
.nav-mobile__divider {
  border: none;
  border-top: 1px solid var(--cinema-border);
  margin: var(--space-2) 0;
}
.nav-mobile__cta {
  margin-top: auto;
  text-align: center;
}


/* ── 6. BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out-expo);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn--primary {
  background: linear-gradient(135deg, var(--cinema-accent) 0%, var(--cinema-accent-active) 100%);
  color: var(--cinema-bg);
  box-shadow: 0 4px 16px var(--cinema-accent-glow);
}
.btn--primary:hover {
  box-shadow: var(--shadow-glow);
  filter: brightness(1.1);
}
.btn--primary:active { transform: scale(0.97) translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--cinema-text);
  border: 1px solid var(--cinema-border);
}
.btn--ghost:hover {
  background: var(--cinema-bg-hover);
  border-color: var(--cinema-border-hover);
}

.btn--sm { padding: 7px 16px; font-size: var(--text-xs); }
.btn--lg { padding: 14px 32px; font-size: var(--text-base); }


/* ── 7. BADGE & TAG COMPONENTS ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: all var(--dur-fast) var(--ease-out-expo);
}

/* Base accent (used by --primary) */
.badge, .badge--primary {
  background: rgba(0,212,170,0.1);
  color: #00d4aa;
  border-color: rgba(0,212,170,0.2);
}

/* Education — emerald-teal */
.badge--edu {
  background: rgba(16,185,129,0.11);
  color: #34d399;
  border-color: rgba(16,185,129,0.22);
}

/* Featured project — cinema-accent glow */
.badge--featured {
  background: rgba(13, 70, 227, 0.13);
  color: #002afe93;
  border-color: rgba(0, 67, 212, 0.28);
  box-shadow: 0 0 10px rgba(0,212,170,0.08);
}

/* Online course — indigo-violet */
.badge--course {
  background: rgba(99,102,241,0.12);
  color: #a5b4fc;
  border-color: rgba(99,102,241,0.22);
}

/* Study accumulation — slate-blue */
.badge--study {
  background: rgba(100,116,139,0.13);
  color: #94a3b8;
  border-color: rgba(100,116,139,0.22);
}

/* Research project — amber-gold */
.badge--research {
  background: rgba(245,158,11,0.12);
  color: #fbbf24;
  border-color: rgba(245,158,11,0.22);
}

/* Skills — mint-green */
.badge--skill {
  background: rgba(52,211,153,0.1);
  color: #53ae8a;
  border-color: rgba(52,211,153,0.2);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--cinema-bg-hover);
  border: 1px solid var(--cinema-border);
  color: var(--cinema-text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-pill);
  transition: all var(--dur-fast) var(--ease-out-expo);
}
.tag:hover { 
  background: var(--cinema-accent-subtle); 
  color: var(--cinema-accent); 
  border-color: var(--cinema-border-accent); 
  text-decoration: none; 
}


/* ── 8. HERO SECTION — Cinematic full-frame ── */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: calc(var(--nav-height) + var(--space-16)) var(--space-6) var(--space-16);
}

/* Gradient orbs — atmospheric lighting */
/* Reduced blur from 100px to 55px for mobile GPU perf; animation pauses on reduced-motion */
.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(55px);
  pointer-events: none;
  opacity: 0.35;
  will-change: transform;
}
.hero__orb--1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--cinema-accent-glow), transparent 70%);
  top: -15%; left: -10%;
}
.hero__orb--2 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, var(--cinema-gold-glow), transparent 70%);
  bottom: -10%; right: -8%;
}

/* Grid pattern overlay — will-change hint avoids repaints */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--cinema-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--cinema-border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.15;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  pointer-events: none;
  will-change: opacity;
}
.typing-text { display: inline; position: relative; }
.typing-text::after {
  content: '|';
  animation: typing-cursor 1s step-end infinite;
  color: var(--cinema-accent, #00d4aa);
  margin-left: 2px;
  font-weight: 300;
}

@keyframes typing-cursor {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}
.hero__glass {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: var(--space-10);
  background: var(--cinema-bg-glass);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: var(--tracking-tighter);
  margin-bottom: var(--space-6);
  color: var(--cinema-text);
}

.hero__title span {
  background: linear-gradient(135deg, var(--cinema-accent) 0%, var(--cinema-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--cinema-text-sec);
  max-width: 480px;
  margin: 0 auto var(--space-10);
  line-height: var(--leading-relaxed);
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Scroll hint */
.hero__scroll-hint {
  margin-top: var(--space-12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--cinema-text-dim);
  font-size: 11px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}
.scroll-dot {
  width: 4px; height: 4px;
  background: var(--cinema-accent);
  border-radius: 50%;
  animation: scrollPulse 2.5s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.2; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(8px); }
}


/* ── 9. SECTION TITLES ── */
.section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--cinema-accent);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--cinema-text);
  margin-bottom: var(--space-4);
}

.section-title--compact {
  font-size: var(--text-2xl);
  margin-bottom: 0;
}

.section-desc {
  font-size: var(--text-lg);
  color: var(--cinema-text-sec);
  line-height: var(--leading-relaxed);
  max-width: 540px;
  margin-top: var(--space-3);
}


/* ── 10. STATS ROW ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-10);
}

.stat-item {
  text-align: center;
  padding: var(--space-8) var(--space-5);
  background: var(--cinema-bg-card);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-norm) var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--cinema-accent-subtle), transparent 50%);
  opacity: 0;
  transition: opacity var(--dur-norm);
}

.stat-item:hover {
  border-color: var(--cinema-border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-item:hover::before { opacity: 1; }

.stat-number {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  letter-spacing: var(--tracking-tighter);
  color: var(--cinema-text);
  line-height: 1;
  margin-bottom: var(--space-2);
  position: relative;
}

.stat-number--accent {
  background: linear-gradient(135deg, var(--cinema-accent), var(--cinema-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--cinema-text-muted);
  font-weight: 500;
  position: relative;
  letter-spacing: var(--tracking-wide);
}


/* ── 11. CARD SYSTEM ── */

/* Card grid layout */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-10);
}

/* Base card style */
.card-base {
  background: var(--cinema-bg-card);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--dur-norm) var(--ease-out-expo);
  position: relative;
}

.card-base:hover {
  border-color: var(--cinema-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Post card */
.post-card {
  background: var(--cinema-bg-card);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--dur-norm) var(--ease-out-expo);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.post-card:hover {
  border-color: var(--cinema-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.post-card__cover--placeholder {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--cinema-bg-alt) 0%, var(--cinema-bg-elevated) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  border-bottom: 1px solid var(--cinema-border);
  color: var(--cinema-text-dim);
  position: relative;
  overflow: hidden;
}

.post-card__cover--placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, var(--cinema-accent-subtle), transparent 70%);
}

.post-card__body {
  padding: var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.post-card__tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.post-card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: var(--tracking-tight);
  color: var(--cinema-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--dur-fast);
}

.post-card:hover .post-card__title { color: var(--cinema-accent); }

.post-card__excerpt {
  font-size: var(--text-sm);
  color: var(--cinema-text-muted);
  line-height: var(--leading-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  border-top: 1px solid var(--cinema-border);
  font-size: var(--text-xs);
  color: var(--cinema-text-dim);
}

.post-card__meta { display: flex; align-items: center; gap: var(--space-2); }
.post-card__read { 
  font-size: var(--text-xs); 
  font-weight: 600; 
  color: var(--cinema-accent); 
  transition: letter-spacing var(--dur-fast);
}
.post-card:hover .post-card__read { letter-spacing: var(--tracking-wide); }


/* Featured post card */
.post-featured {
  background: var(--cinema-bg-card);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
  text-decoration: none;
  color: inherit;
  transition: all var(--dur-norm) var(--ease-out-expo);
  margin-bottom: var(--space-10);
  box-shadow: var(--shadow-lg);
}

.post-featured:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
  text-decoration: none;
  border-color: var(--cinema-border-hover);
}

.post-featured__cover {
  background: linear-gradient(145deg, var(--cinema-accent) 0%, #006655 40%, var(--cinema-bg-elevated) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  position: relative;
  overflow: hidden;
}

.post-featured__cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 30% 70%, rgba(255,255,255,0.08) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, rgba(0,0,0,0.2) 0%, transparent 50%);
}

.post-featured__body {
  padding: var(--space-10);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  justify-content: center;
}

.post-featured__label { 
  font-size: var(--text-xs); 
  font-weight: 600; 
  color: var(--cinema-accent); 
  text-transform: uppercase; 
  letter-spacing: var(--tracking-widest); 
}
.post-featured__title { 
  font-family: var(--font-display);
  font-size: var(--text-2xl); 
  font-weight: 600; 
  line-height: 1.25; 
  letter-spacing: var(--tracking-tight);
  color: var(--cinema-text);
}
.post-featured__excerpt { 
  font-size: var(--text-sm); 
  color: var(--cinema-text-sec); 
  line-height: var(--leading-relaxed); 
}
.post-featured__meta { 
  font-size: var(--text-xs); 
  color: var(--cinema-text-dim); 
  display: flex; 
  gap: var(--space-4); 
  flex-wrap: wrap;
}


/* Profile card */
.profile-card {
  display: flex;
  gap: var(--space-10);
  align-items: center;
  padding: var(--space-10);
  background: var(--cinema-bg-card);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cinema-accent-subtle), transparent);
}

.profile-avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--cinema-accent) 0%, var(--cinema-gold) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: var(--cinema-bg);
  font-weight: 700;
  border: 3px solid var(--cinema-bg-card);
  box-shadow: 0 0 30px var(--cinema-accent-glow), var(--shadow-md);
}

.profile-info__name { 
  font-family: var(--font-display);
  font-size: var(--text-2xl); 
  font-weight: 600; 
  letter-spacing: var(--tracking-tight); 
  margin-bottom: var(--space-2); 
}
.profile-info__role {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--cinema-accent);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.profile-info__bio { 
  font-size: var(--text-sm); 
  color: var(--cinema-text-sec); 
  line-height: var(--leading-relaxed); 
  max-width: 500px; 
  margin-bottom: var(--space-5); 
}

.profile-links { display: flex; gap: var(--space-3); flex-wrap: wrap; }

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 7px 16px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--cinema-text-sec);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-md);
  transition: all var(--dur-fast) var(--ease-out-expo);
  text-decoration: none;
}
.profile-link:hover { 
  background: var(--cinema-accent-subtle); 
  color: var(--cinema-accent); 
  border-color: var(--cinema-border-accent); 
  text-decoration: none; 
}


/* ── 12. FILTER TABS ── */
.filter-tabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.filter-tab {
  padding: 7px 18px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--cinema-text-muted);
  background: var(--cinema-bg-card);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out-expo);
}

.filter-tab:hover {
  color: var(--cinema-text);
  border-color: var(--cinema-border-hover);
}

.filter-tab.active {
  background: var(--cinema-accent);
  color: var(--cinema-bg);
  border-color: var(--cinema-accent);
  box-shadow: 0 4px 16px var(--cinema-accent-glow);
}


/* ── 13. PAGE HERO (sub-pages) ── */
.page-hero {
  padding-block: calc(var(--nav-height) + var(--space-12)) var(--space-6) var(--space-12);
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--cinema-border);
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--cinema-accent-subtle), transparent 60%);
  pointer-events: none;
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 600;
  letter-spacing: var(--tracking-tighter);
  margin-bottom: var(--space-4);
  position: relative;
}

.page-hero__desc {
  font-size: var(--text-lg);
  color: var(--cinema-text-sec);
  max-width: 520px;
  margin-inline: auto;
  line-height: var(--leading-relaxed);
  position: relative;
}


/* ── 14. ABOUT PAGE COMPONENTS ── */

/* About Hero — cinematic intro */
.about-hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-24) var(--space-16);
  text-align: center;
  border-bottom: 1px solid var(--cinema-border);
}

.about-hero__bg {
  position: absolute; inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--cinema-accent-subtle) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, var(--cinema-gold-subtle) 0%, transparent 50%);
  pointer-events: none;
}

.about-hero__content { position: relative; z-index: 2; }

.about-hero__avatar {
  width: 110px; height: 110px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cinema-accent) 0%, var(--cinema-gold) 50%, var(--cinema-accent-active) 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--cinema-bg); font-size: 46px; font-weight: 800;
  margin-bottom: var(--space-6);
  border: 3px solid var(--cinema-bg);
  box-shadow: 0 0 50px var(--cinema-accent-glow), var(--shadow-xl);
  animation: avatarFloat 4s ease-in-out infinite;
}
@keyframes avatarFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.about-hero__eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--cinema-accent);
  margin-bottom: var(--space-4);
}

.about-hero__name {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: var(--tracking-tighter);
  color: var(--cinema-text);
  margin-bottom: var(--space-2);
}

.about-hero__name span {
  background: linear-gradient(135deg, var(--cinema-accent), var(--cinema-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-hero__role {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--cinema-accent);
  margin-bottom: var(--space-5);
  letter-spacing: var(--tracking-wide);
}

.about-hero__bio {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--cinema-text-sec);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--space-8);
}

.about-hero__links {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

.about-hero__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 9px 20px;
  background: var(--cinema-bg-card);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--cinema-text-sec);
  text-decoration: none;
  transition: all var(--dur-norm) var(--ease-out-expo);
}
.about-hero__link:hover {
  background: var(--cinema-accent-subtle);
  color: var(--cinema-accent);
  border-color: var(--cinema-border-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--cinema-accent-glow);
  text-decoration: none;
}

/* About section */
.about-section {
  position: relative;
  padding-block: var(--space-20);
}

.about-section:nth-child(even) {
  background: var(--cinema-bg-alt);
}

/* Skill category cards */
.skill-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.skill-card {
  background: var(--cinema-bg-card);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: all var(--dur-norm) var(--ease-out-expo);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cinema-accent), var(--cinema-gold), transparent);
  opacity: 0;
  transition: opacity var(--dur-norm);
}

.skill-card:hover {
  border-color: var(--cinema-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

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

.skill-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.skill-card__icon {
  width: 46px; height: 46px;
  background: var(--cinema-accent-subtle);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.skill-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--cinema-text);
  letter-spacing: var(--tracking-tight);
}

.skill-card__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-card__list li {
  font-size: var(--text-sm);
  color: var(--cinema-text-sec);
  padding-left: var(--space-5);
  position: relative;
  margin-bottom: var(--space-3);
  line-height: var(--leading-relaxed);
}

.skill-card__list li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  background: var(--cinema-accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--cinema-accent-glow);
}

.skill-card__list li strong {
  color: var(--cinema-text);
  font-weight: 600;
}


/* Education roadmap (CS50 timeline) */
.edu-roadmap {
  position: relative;
  margin-top: var(--space-8);
  padding-left: var(--space-8);
}

.edu-course {
  position: relative;
  margin-bottom: var(--space-12);
}

.edu-course:last-child { margin-bottom: 0; }

.edu-course__track-line {
  position: absolute;
  left: calc(-1 * var(--space-8) + 11px);
  top: 28px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--cinema-accent), var(--cinema-border));
}

.edu-course:last-child .edu-course__track-line { display: none; }

.edu-course__track-line::before {
  content: '';
  position: absolute;
  left: -5px; top: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--cinema-accent);
  border: 3px solid var(--cinema-bg);
  box-shadow: 0 0 10px var(--cinema-accent-glow);
}

.edu-course__card {
  display: flex;
  gap: 0;
  background: var(--cinema-bg-card);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-norm) var(--ease-out-expo);
}

.edu-course__card:hover {
  border-color: var(--cinema-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.edu-course__badge {
  width: 60px;
  min-width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-align: center;
  color: #fff;
  position: relative;
}

.edu-course__badge--python {
  background: linear-gradient(180deg, #3776AB 0%, #FFD43B 100%);
}
.edu-course__badge--web {
  background: linear-gradient(180deg, var(--cinema-accent) 0%, #008b72 100%);
}
.edu-course__badge--ai {
  background: linear-gradient(180deg, #1a1a2e 0%, #e94560 100%);
}
.edu-course__badge--iot {
  background: linear-gradient(180deg, #0ea5e9 0%, #06b6d4 50%, #10b981 100%);
}

.edu-course__badge-icon { font-size: 24px; }

.edu-course__body { flex: 1; padding: var(--space-6) var(--space-8); }
.edu-course__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-1);
  line-height: 1.3;
}

.edu-course__provider {
  font-size: var(--text-xs);
  color: var(--cinema-text-sec);
  margin-bottom: var(--space-5);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-weight: 500;
}

.edu-course__progress-bar {
  width: 100%; height: 4px;
  background: var(--cinema-text-sec);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: var(--space-5);
}

.edu-course__progress-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--cinema-accent), var(--cinema-gold));
  width: 0%;
  transition: width 1.4s var(--ease-out-expo);
}

.edu-course__tags {
  display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5);
}

.edu-course__desc {
  font-size: var(--text-sm);
  color: var(--cinema-text-sec);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
}

.edu-course__projects {
  display: flex; flex-direction: column; gap: var(--space-3);
}

.edu-project {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(40,30,15,0.03);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--cinema-accent);
  transition: background var(--dur-fast);
}
.edu-project:hover { background: var(--cinema-accent-subtle); }
.edu-project__icon { font-size: 18px; flex-shrink: 0; }
.edu-project__name {
  font-size: var(--text-sm);
  font-weight: 600; color: var(--cinema-text);
}
.edu-project__tech {
  font-size: var(--text-xs);
  color: var(--cinema-text-sec);
  font-family: var(--font-mono);
}

/* Status pill */
.edu-course__status {
  writing-mode: vertical-lr;
  text-orientation: mixed;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  padding: var(--space-5) var(--space-3);
  display: flex; align-items: center; justify-content: center;
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
  flex-shrink: 0;
}

.edu-course__status--done {
  background: linear-gradient(180deg, rgba(52,211,153,0.1), rgba(52,211,153,0.03));
  color: var(--cinema-success);
  border-left: 1px solid rgba(52,211,153,0.2);
}

.edu-course__status--active {
  background: linear-gradient(180deg, var(--cinema-accent-subtle), rgba(0,212,170,0.03));
  color: var(--cinema-accent);
  border-left: 1px solid var(--cinema-border-accent);
}

.edu-course__status--next {
  background: linear-gradient(180deg, var(--cinema-gold-subtle), rgba(240,184,96,0.03));
  color: var(--cinema-gold);
  border-left: 1px solid rgba(240,184,96,0.2);
}


/* Timeline New — project experience */
.timeline-new {
  margin-top: var(--space-8);
  display: flex; flex-direction: column; gap: var(--space-6);
}

.timeline-new__card {
  background: var(--cinema-bg-card);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-norm) var(--ease-out-expo);
}

.timeline-new__card:hover {
  border-color: var(--cinema-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.timeline-new__header {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,212,170,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 30%, rgba(99,102,241,0.1) 0%, transparent 50%),
    linear-gradient(135deg, #0d1117 0%, #151b26 40%, #0f1624 70%, #0c111a 100%);
  color: #fff;
  padding: var(--space-6) var(--space-8);
  position: relative;
  overflow: hidden;
}
.timeline-new__header::before {
  content: '';
  position: absolute;
  top: -50%; left: -20%;
  width: 140%; height: 200%;
  background: repeating-linear-gradient(
    90deg, transparent, transparent 60px,
    rgba(0,212,170,0.025) 60px, rgba(0,212,170,0.025) 61px
  );
  pointer-events: none;
}
.timeline-new__header::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00d4aa 0%, #6366f1 45%, #f0b860 80%, transparent 100%);
  box-shadow: 0 0 10px rgba(0,212,170,0.35);
}

.timeline-new__header-top {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-1);
  position: relative;
  z-index: 1;
}
.timeline-new__date {
  position: relative;
  z-index: 1;
}
.timeline-new__org {
  position: relative;
  z-index: 1;
}

.timeline-new__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  position: relative;
  z-index: 1;
  color: var(--cinema-text-muted) ;
}

.timeline-new__date {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--cinema-text-dim);
  background: rgba(255,255,255,0.06);
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.timeline-new__org {
  font-size: var(--text-sm);
  color: var(--cinema-text-muted);
  margin: 0;
}

.timeline-new__body {
  padding: var(--space-6) var(--space-8);
}

.timeline-new__bullets { list-style: none; padding: 0; margin: 0; }

.timeline-new__bullets li {
  position: relative;
  padding-left: 1.75rem;    /* 给标记留出足够空间，不压文字 */
  margin-bottom: var(--space-4);
}

.timeline-new__bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;                     /* 对齐第一行文字中线 */
  width: 7px;
  height: 7px;
  background: var(--cinema-accent);
  border-radius: 2px;
  transform: rotate(45deg) translateY(-50%);
  box-shadow: 0 0 6px var(--cinema-accent-glow);
}

.timeline-new__bullets li strong {
  color: var(--cinema-text);
  font-weight: 600;
}

.timeline-new__highlight {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: var(--cinema-accent-subtle);
  border-left: 3px solid var(--cinema-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--text-sm);
  color: var(--cinema-accent);
  font-weight: 500;
  line-height: 1.5;
}

/* Education card variant */
.timeline-new__card--edu { padding: var(--space-8); }
.timeline-new__edu-inner { display: flex; align-items: center; gap: var(--space-6); }
.timeline-new__edu-icon {
  width: 60px; height: 60px;
  background: var(--cinema-bg-alt);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0;
}
.timeline-new__edu-info { flex: 1; }
.timeline-new__edu-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--cinema-text);
  margin-bottom: var(--space-1);
}
.timeline-new__edu-meta { font-size: var(--text-sm); color: var(--cinema-text-sec); margin-bottom: var(--space-1); }
.timeline-new__edu-courses { font-size: var(--text-xs); color: var(--cinema-text-dim); }
.timeline-new__edu-badge {
  background: var(--cinema-accent-subtle);
  color: var(--cinema-accent);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}


/* Resume download card */
.resume-card {
  display: flex; align-items: center; gap: var(--space-8);
  padding: var(--space-8) var(--space-10);
  background: linear-gradient(135deg, var(--cinema-accent) 0%, #007a63 50%, var(--cinema-gold) 100%);
  border-radius: var(--radius-2xl); color: #fff; position: relative;
  overflow: hidden; text-decoration: none;
  transition: all var(--dur-norm) var(--ease-out-expo);
}

.resume-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 64px var(--cinema-accent-glow);
  text-decoration: none; color: #fff;
}

.resume-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(255,255,255,0.12), transparent 55%);
}

.resume-card__icon {
  width: 64px; height: 64px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
}

.resume-card__info { flex: 1; z-index: 1; }
.resume-card__title { 
  font-family: var(--font-display);
  font-size: var(--text-xl); 
  font-weight: 600; 
  letter-spacing: var(--tracking-tight); 
  margin-bottom: var(--space-1); 
}
.resume-card__desc { font-size: var(--text-sm); opacity: 0.85; line-height: 1.5; }

.resume-card__btn {
  padding: 11px 24px;
  background: rgba(255,255,255,0.18); color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600; cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px); z-index: 1;
  white-space: nowrap; 
  transition: all var(--dur-fast);
}

.resume-card__btn:hover { background: rgba(255,255,255,0.28); }


/* Contact grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-8);
}

.contact-item {
  display: flex; align-items: center; gap: var(--space-5);
  padding: var(--space-6) var(--space-7);
  background: var(--cinema-bg-card);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: all var(--dur-norm) var(--ease-out-expo);
}

.contact-item:hover {
  border-color: var(--cinema-border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.contact-item__icon {
  width: 48px; height: 48px;
  background: var(--cinema-accent-subtle);
  border: 1px solid var(--cinema-border-accent);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}

.contact-item__label { 
  font-size: 10px; 
  color: var(--cinema-text-dim); 
  text-transform: uppercase; 
  letter-spacing: var(--tracking-widest); 
  font-weight: 600; 
}

.contact-item__value { 
  font-size: var(--text-sm); 
  font-weight: 600; 
  color: var(--cinema-text); 
  margin-top: 2px; 
}


/* ── 15. TIMELINE (path.html) ── */
.path-header {
  margin-bottom: var(--space-10);
  padding-top: var(--space-6);
}

.path-header__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--cinema-text);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-3);
}

.path-header__subtitle {
  font-size: var(--text-base);
  color: var(--cinema-text-muted);
  max-width: 560px;
}

.timeline {
  position: relative;
  padding-left: var(--space-10);
  margin-top: var(--space-8);
}

.timeline::before {
  content: ''; position: absolute; left: 16px; top: 0; bottom: 0;
  width: 2px; background: var(--cinema-border); border-radius: 1px;
}

.timeline-item { display: flex; gap: var(--space-6); margin-bottom: var(--space-9); position: relative; }

.timeline-marker {
  width: 34px; height: 34px; border-radius: 50%; 
  background: var(--cinema-bg-card);
  border: 2px solid var(--cinema-accent); 
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--cinema-accent);
  position: absolute; left: calc(-1 * var(--space-10) + 9px); top: 0; z-index: 2;
  box-shadow: 0 0 12px var(--cinema-accent-glow);
}

.timeline-marker--edu { border-color: var(--cinema-success); color: var(--cinema-success); }
.timeline-marker--project { border-color: var(--cinema-accent); color: var(--cinema-accent); }
.timeline-marker--course { border-color: var(--cinema-gold); color: var(--cinema-gold); }
.timeline-marker--skill { border-color: var(--cinema-info); color: var(--cinema-info); }

.timeline-card {
  flex: 1; padding: var(--space-6) var(--space-8);
  background: var(--cinema-bg-card);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-norm) var(--ease-out-expo);
}

.timeline-card:hover {
  border-color: var(--cinema-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.timeline-card--featured {
  border-color: var(--cinema-border-accent);
  box-shadow: var(--shadow-md), 0 0 30px var(--cinema-accent-subtle);
}

.timeline-card__header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--space-4); flex-wrap: wrap; gap: var(--space-2);
}

.timeline-card__date {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--cinema-accent);
  background: var(--cinema-accent-subtle);
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: var(--tracking-wide);
}

.timeline-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-3);
}

.timeline-card__desc {
  font-size: var(--text-sm);
  color: var(--cinema-text-sec);
  line-height: var(--leading-relaxed);
}

.timeline-card__desc ul { list-style: none; padding: 0; margin-top: var(--space-3); }
.timeline-card__desc li { padding-left: var(--space-5); position: relative; margin-bottom: var(--space-2); font-size: var(--text-sm); }
.timeline-card__desc li::before { content: '▸'; position: absolute; left: 0; color: var(--cinema-accent); font-weight: 700; }

.timeline-card__highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.timeline-card__highlights div {
  padding: var(--space-3) var(--space-4);
  background: var(--cinema-accent-subtle);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--cinema-accent);
}

.timeline-card__tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }

/* Skill timeline grid inside timeline item */
.skill-timeline-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); margin-top: var(--space-4); }
.skill-timeline-item {
  padding: var(--space-4);
  background: var(--cinema-bg-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--cinema-border);
}
.skill-timeline-item strong { display: block; font-size: var(--text-sm); color: var(--cinema-text); margin-bottom: var(--space-1); }
.skill-timeline-item span { font-size: var(--text-xs); color: var(--cinema-text-muted); line-height: var(--leading-relaxed); }


/* ── 16. POST PAGE (article view) ── */
.breadcrumb {
  display: flex; align-items: center; gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--cinema-text-dim);
  padding-block: var(--space-6);
}

.breadcrumb a { color: var(--cinema-text-muted); text-decoration: none; transition: color var(--dur-fast); }
.breadcrumb a:hover { color: var(--cinema-accent); }
.breadcrumb span { color: var(--cinema-text-dim); }

.article-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: var(--space-10);
  max-width: 1020px;
  margin-inline: auto;
  padding-block: var(--space-12);
  padding-inline: var(--space-6);
  align-items: start;
}

.article__header { margin-bottom: var(--space-10); padding-bottom: var(--space-8); border-bottom: 1px solid var(--cinema-border); }

.article__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--cinema-accent);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  margin-bottom: var(--space-5);
}

.article__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-5);
}

.article__tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-5); }

.article__meta {
  display: flex; align-items: center; gap: var(--space-5);
  font-size: var(--text-sm);
  color: var(--cinema-text-dim);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.article__author { display: flex; align-items: center; gap: var(--space-2); }
.article__author-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cinema-accent), var(--cinema-gold));
  display: flex; align-items: center; justify-content: center;
  color: var(--cinema-bg); font-size: 12px; font-weight: 700;
}

.article__cover--placeholder {
  width: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--cinema-border);
  aspect-ratio: 2/1;
  background: linear-gradient(135deg, var(--cinema-accent-subtle) 0%, var(--cinema-bg-alt) 50%, var(--cinema-gold-subtle) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 72px;
  margin-bottom: var(--space-10);
  color: var(--cinema-text-dim);
}

.article__body { 
  font-size: var(--text-lg); 
  line-height: var(--leading-relaxed); 
  color: var(--cinema-text-sec); 
}

.article__body h2 { 
  font-family: var(--font-display);
  font-size: var(--text-3xl); 
  font-weight: 600; 
  letter-spacing: var(--tracking-tight); 
  margin-block: var(--space-10) var(--space-5); 
  color: var(--cinema-text);
}

.article__body h3 { 
  font-family: var(--font-display);
  font-size: var(--text-2xl); 
  font-weight: 600; 
  margin-block: var(--space-8) var(--space-4); 
  color: var(--cinema-text);
}

.article__body p { margin-bottom: var(--space-6); }

.article__body ul, .article__body ol { 
  margin-bottom: var(--space-6); 
  padding-left: var(--space-8); 
}

.article__body li { margin-bottom: var(--space-2); }

.article__body blockquote {
  border-left: 3px solid var(--cinema-accent);
  padding-left: var(--space-6);
  margin-block: var(--space-8);
  color: var(--cinema-text-muted);
  font-style: italic;
}

.article__body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--cinema-bg-alt);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cinema-border);
  color: var(--cinema-accent);
}

.article__body pre {
  background: var(--cinema-bg);
  color: var(--cinema-text);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  overflow-x: auto;
  margin-block: var(--space-8);
  font-size: 14px;
  font-family: var(--font-mono);
  line-height: 1.65;
  border: 1px solid var(--cinema-border);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.2);
}

.article__body pre code { 
  background: none; 
  border: none; 
  padding: 0; 
  font-size: inherit; 
  color: inherit;
}

.article__body a { 
  color: var(--cinema-accent); 
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.article__body strong { font-weight: 600; color: var(--cinema-text); }

.article__body hr { 
  border: none; 
  border-top: 1px solid var(--cinema-border); 
  margin-block: var(--space-10); 
}

/* Article table */
.article-table {
  width: 100%;
  border-collapse: collapse;
  margin-block: var(--space-8);
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--cinema-border);
}

.article-table thead { background: var(--cinema-bg-alt); }

.article-table th, .article-table td {
  padding: var(--space-4) var(--space-5);
  text-align: left;
  border-bottom: 1px solid var(--cinema-border);
}

.article-table tbody tr:hover { background: var(--cinema-bg-hover); }

.article-table__cell--accent { color: var(--cinema-accent); font-weight: 600; }
.article-table__cell--strong { font-weight: 600; }
.article-table__row--highlight { background: var(--cinema-accent-subtle); }

/* Callout box */
.callout {
  display: flex; gap: var(--space-5);
  padding: var(--space-5) var(--space-6);
  background: var(--cinema-accent-subtle);
  border: 1px solid var(--cinema-border-accent);
  border-radius: var(--radius-lg);
  margin-block: var(--space-8);
}

.callout__icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.callout__content{ 
  font-size: var(--text-base); 
  color: var(--cinema-text-sec); 
  line-height: var(--leading-relaxed); 
}
.callout__content strong { color: var(--cinema-text); }


/* TOC sidebar */
.toc {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-8));
  background: var(--cinema-bg-card);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  font-size: var(--text-sm);
}

.toc__title {
  font-weight: 700; 
  font-size: 10px; 
  text-transform: uppercase; 
  letter-spacing: var(--tracking-widest); 
  color: var(--cinema-text-dim); 
  margin-bottom: var(--space-4); 
}

.toc__list { list-style: none; }
.toc__list li { margin-bottom: 2px; }
.toc__list a {
  display: block;
  padding: 5px 10px;
  color: var(--cinema-text-muted);
  font-weight: 400;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--dur-fast) var(--ease-out-expo);
  line-height: 1.5;
}

.toc__list a:hover { 
  color: var(--cinema-accent); 
  background: var(--cinema-accent-subtle); 
}

.toc__list a.active { 
  color: var(--cinema-accent); 
  font-weight: 600; 
  background: var(--cinema-accent-subtle); 
}

.toc__list .toc-h3 { padding-left: var(--space-6); font-size: var(--text-xs); }

/* Reading indicator in TOC */
.reading-indicator {
  display: flex; align-items: center; gap: var(--space-3);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--cinema-border);
}
.reading-indicator__label { font-size: 10px; color: var(--cinema-text-dim); text-transform: uppercase; letter-spacing: var(--tracking-widest); font-weight: 600; }

.reading-bar { flex: 1; height: 3px; background: var(--cinema-border); border-radius: 2px; overflow: hidden; }
.reading-bar-fill { height: 100%; background: linear-gradient(90deg, var(--cinema-accent), var(--cinema-gold)); border-radius: 2px; width: 0%; transition: width 100ms linear; }
.reading-pct { font-size: 11px; color: var(--cinema-text-dim); min-width: 32px; text-align: right; font-family: var(--font-mono); }


/* Share bar */
.share-bar {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--cinema-border);
  border-bottom: 1px solid var(--cinema-border);
  margin-block: var(--space-10);
}
.share-bar__label { font-size: var(--text-sm); font-weight: 600; color: var(--cinema-text-sec); }

.share-btn {
  padding: 7px 18px;
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-md);
  background: none;
  cursor: pointer;
  color: var(--cinema-text-sec);
  transition: all var(--dur-fast) var(--ease-out-expo);
  text-decoration: none;
}

.share-btn:hover { 
  background: var(--cinema-bg-hover); 
  color: var(--cinema-text); 
  border-color: var(--cinema-border-hover);
}


/* Author card */
.author-card {
  display: flex; gap: var(--space-6); align-items: flex-start;
  padding: var(--space-8);
  background: var(--cinema-bg-card);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-xl);
  margin-block: var(--space-10);
}

.author-card__avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cinema-accent), var(--cinema-gold));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 24px; font-weight: 700; flex-shrink: 0;
}

.author-card__name  { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; margin-bottom: var(--space-1); }
.author-card__role  { font-size: var(--text-sm); color: var(--cinema-accent); font-weight: 500; margin-bottom: var(--space-3); }
.author-card__bio   { font-size: var(--text-sm); color: var(--cinema-text-sec); line-height: var(--leading-relaxed); }


/* Related posts */
.related-section { margin-top: 0; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); margin-top: var(--space-6); }

.related-card {
  background: var(--cinema-bg-card);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-decoration: none;
  color: inherit;
  transition: all var(--dur-norm) var(--ease-out-expo);
}

.related-card:hover { 
  transform: translateY(-3px); 
  box-shadow: var(--shadow-md); 
  border-color: var(--cinema-border-hover);
  text-decoration: none; 
}

.related-card__emoji { font-size: 26px; margin-bottom: var(--space-4); }
.related-card__title { 
  font-family: var(--font-display);
  font-size: var(--text-base); 
  font-weight: 600; 
  line-height: 1.4; 
  margin-bottom: var(--space-3); 
  color: var(--cinema-text);
}

.related-card:hover .related-card__title { color: var(--cinema-accent); }

.related-card__meta { font-size: var(--text-xs); color: var(--cinema-text-dim); }


/* ── 17. FOOTER ── */
.footer {
  background: var(--cinema-bg-alt);
  border-top: 1px solid var(--cinema-border);
  padding-block: var(--space-16) var(--space-10);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cinema-accent-subtle), transparent);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

.footer__brand-name { 
  font-family: var(--font-display);
  font-size: var(--text-xl); 
  font-weight: 600; 
  margin-bottom: var(--space-3); 
}

.footer__brand-desc { 
  font-size: var(--text-sm); 
  color: var(--cinema-text-muted); 
  line-height: var(--leading-relaxed); 
  max-width: 280px; 
}

.footer__col-title { 
  font-size: var(--text-xs); 
  font-weight: 600; 
  margin-bottom: var(--space-5); 
  color: var(--cinema-text); 
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
}

.footer__links { 
  list-style: none; 
  display: flex; 
  flex-direction: column; 
  gap: var(--space-3); 
}

.footer__links a { 
  font-size: var(--text-sm); 
  color: var(--cinema-text-muted); 
  text-decoration: none; 
  transition: color var(--dur-fast); 
}

.footer__links a:hover { color: var(--cinema-accent); }

.footer__social { display: flex; gap: var(--space-3); margin-top: var(--space-5); }
.footer__social--spaced { margin-top: var(--space-5); }

.footer__social a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-md);
  color: var(--cinema-text-muted);
  font-size: 14px;
  transition: all var(--dur-fast) var(--ease-out-expo);
  text-decoration: none;
}

.footer__social a:hover { 
  background: var(--cinema-accent); 
  color: var(--cinema-bg); 
  border-color: var(--cinema-accent); 
  box-shadow: 0 4px 16px var(--cinema-accent-glow);
}

.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: var(--space-8);
  border-top: 1px solid var(--cinema-border);
  font-size: var(--text-sm);
  color: var(--cinema-text-dim);
}

.footer__copyright a { color: var(--cinema-text-muted); text-decoration: none; transition: color var(--dur-fast); }
.footer__copyright a:hover { color: var(--cinema-accent); }
.footer__brand-link { color: var(--cinema-accent); font-weight: 500; }
.footer__back-link { 
  color: var(--cinema-text-muted); 
  text-decoration: none; 
  transition: color var(--dur-fast); 
}
.footer__back-link:hover { color: var(--cinema-accent); }


/* ── 18. READING PROGRESS BAR ── */
#reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cinema-accent), var(--cinema-gold));
  z-index: var(--z-toast);
  width: 0%;
  transition: width 100ms linear;
}


/* ── 19. BACK TO TOP ── */
.back-top {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  width: 44px; height: 44px;
  background: var(--cinema-bg-card);
  color: var(--cinema-text-sec);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--dur-norm) var(--ease-out-expo);
  z-index: var(--z-sticky);
}

.back-top.visible { 
  opacity: 1; 
  transform: translateY(0); 
}

.back-top:hover { 
  background: var(--cinema-accent); 
  color: var(--cinema-bg); 
  border-color: var(--cinema-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}


/* ── 20. WEATHER WIDGET ── */
.weather-widget {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 5px 12px;
  background: var(--cinema-bg-card);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  color: var(--cinema-text-sec);
  transition: all var(--dur-fast);
}

.weather-widget__icon { font-size: 16px; }
.weather-widget__text { font-weight: 500; }
.weather-widget__temp { font-weight: 600; color: var(--cinema-text); }


/* ── 21. ANIMATIONS ── */

/* Fade-up entrance */
@keyframes fadeUpCinema {
  from { 
    opacity: 0; 
    transform: translateY(24px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.fade-up { 
  opacity: 0; 
  animation: fadeUpCinema 0.7s var(--ease-out-expo) both;
  will-change: opacity, transform;
}

.fade-up-1 { animation-delay: 0.1s; }
.fade-up-2 { animation-delay: 0.2s; }
.fade-up-3 { animation-delay: 0.3s; }
.fade-up-4 { animation-delay: 0.4s; }
.fade-up-5 { animation-delay: 0.5s; }

/* Revealed state (for IntersectionObserver) */
.revealed {
  animation: fadeUpCinema 0.7s var(--ease-out-expo) both !important;
  opacity: 1 !important;
}


/* ── 22. RESPONSIVE DESIGN ── */

/* Tablet landscape and below */
@media (max-width: 1024px) {
  .footer__inner      { grid-template-columns: 1fr 1fr; }
  .stats-row         { grid-template-columns: repeat(2, 1fr); }
  .post-featured     { grid-template-columns: 1fr; }
  .post-featured__cover { min-height: 220px; }
  .article-layout     { grid-template-columns: 1fr; }
  .toc                { display: none; }
  .skill-cards-grid   { grid-template-columns: 1fr; }
  .hero__orb--1       { width: 400px; height: 400px; }
  .hero__orb--2       { width: 300px; height: 300px; }
  
  /* Blog layout */
  .blog-layout        { grid-template-columns: 1fr; }
  .sidebar            { position: static; }
}

/* Tablet portrait and below */
@media (max-width: 768px) {
  :root { --nav-height: 64px; }
  
  .container          { padding-inline: var(--space-5); }
  .container--narrow  { padding-inline: var(--space-5); }
  
  .nav__links         { display: none; }
  .nav__hamburger     { display: flex; }
  
  .hero               { min-height: 80vh; padding-top: calc(var(--nav-height) + var(--space-10)); }
  .hero__glass        { padding: var(--space-8); border-radius: var(--radius-xl); }
  
  .profile-card       { flex-direction: column; text-align: center; padding: var(--space-8); }
  .profile-links      { justify-content: center; }
  
  .footer__inner      { grid-template-columns: 1fr; gap: var(--space-8); }
  
  .post-layout        { grid-template-columns: 1fr; padding-inline: var(--space-5); }
  .related-grid       { grid-template-columns: 1fr; }
  
  .contact-grid       { grid-template-columns: 1fr; }
  
  .resume-card        { flex-direction: column; text-align: center; }
  
  .about-hero         { padding-block: var(--space-16) var(--space-8); }
  .about-hero__avatar { width: 86px; height: 86px; font-size: 38px; }
  .about-hero__name   { font-size: var(--text-4xl); }
  
  .timeline-new__edu-inner { flex-direction: column; text-align: center; }
  .timeline-new__header-top { flex-direction: column; align-items: flex-start; }
  
  /* Education roadmap mobile */
  .edu-roadmap        { padding-left: var(--space-6); }
  .edu-course__card   { flex-direction: column; }
  .edu-course__badge  {
    width: 100%;
    flex-direction: row;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    writing-mode: horizontal-tb;
    gap: var(--space-2);
  }
  .edu-course__body   { padding: var(--space-5) var(--space-6); }
  .edu-course__status {
    writing-mode: horizontal-tb;
    padding: var(--space-3) var(--space-6);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border-left: none;
    border-top: 1px solid var(--cinema-border);
  }
  
  .skill-timeline-grid { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 480px) {
  .container      { padding-inline: var(--space-4); }
  .section         { padding-block: var(--space-14); }
  .hero            { padding-top: calc(var(--nav-height) + var(--space-8)); padding-bottom: var(--space-12); }
  .stats-row       { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
  .stat-item       { padding: var(--space-5); }
  
  .hero__actions   { flex-direction: column; width: 100%; }
  .hero__actions .btn { width: 100%; }
  
  .post-featured__body { padding: var(--space-6); }
  
  .card-grid        { grid-template-columns: 1fr; }
  
  .section-title    { font-size: var(--text-2xl); }
  
  .article__title   { font-size: var(--text-3xl); }
  .page-hero__title { font-size: var(--text-3xl); }
}


/* ── 23. PRINT & REDUCED MOTION ── */
@media print {
  .nav, .back-top, #reading-progress, .nav-mobile, .weather-widget,
  .hero__scroll-hint, .share-bar { display: none !important; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .hero__orb { animation: none !important; }
  .hero__orb--1, .hero__orb--2 { transform: none !important; }
  .about-hero__avatar { animation: none !important; }
  .scroll-dot { animation: none !important; }
}
/* Profile Section 优化样式 */
.profile-section {
  padding-top: calc(var(--nav-height) + var(--space-8));
  padding-bottom: var(--space-8);
}

.profile-card {
  display: flex;
  gap: var(--space-8);
  align-items: flex-start;
  flex-wrap: wrap;
  background: var(--cinema-bg-elevated);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-8);
  border: 1px solid var(--cinema-border);
  transition: all var(--dur-norm);
}

.profile-avatar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--cinema-accent) 0%, var(--cinema-gold) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.avatar-emoji {
  font-size: 48px;
}

.profile-status {
  font-size: 0.95rem;
  color: var(--cinema-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #2ecc71;
  border-radius: 50%;
  display: inline-block;
}

.profile-info {
  flex: 1;
}

.profile-info__header {
  margin-bottom: var(--space-4);
}

.profile-info__name {
  font-size: 2rem;
  font-weight: 600;
  font-family: var(--font-display);
  margin-bottom: var(--space-2);
}

.name-accent {
  color: var(--cinema-accent);
  font-weight: 500;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0;
}

.badge-primary, .badge-secondary, .badge-accent {
  padding: 0.2rem 0.7rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-primary {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}
.badge-secondary {
  background: rgba(139, 92, 246, 0.15);
  color: #a855f7;
}
.badge-accent {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

[data-theme="light"] .badge-primary { background: #e0e7ff; color: #1e40af; }
[data-theme="light"] .badge-secondary { background: #ede9fe; color: #6d28d9; }
[data-theme="light"] .badge-accent { background: #fef3c7; color: #b45309; }

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-5) 0;
}

.tech-tag {
  background: var(--cinema-bg-hover);
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-family: var(--font-body);
  border: 1px solid var(--cinema-border);
  transition: all 0.2s;
}
.tech-tag:hover {
  border-color: var(--cinema-accent);
  color: var(--cinema-accent);
}

.profile-stats {
  display: flex;
  gap: var(--space-6);
  margin: var(--space-5) 0;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--cinema-border);
  border-bottom: 1px solid var(--cinema-border);
}

.profile-stat {
  text-align: center;
}
.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--cinema-accent);
}
.stat-label {
  font-size: 0.7rem;
  color: var(--cinema-text-muted);
}

.profile-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

/* ── Profile-internal compact contact chips ──
   Integrates contact info inside the profile card so a separate
   contact page section is no longer needed. */
.profile-contacts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  margin: var(--space-5) 0 var(--space-3);
  padding-top: var(--space-5);
  border-top: 1px solid var(--cinema-border);
}

.profile-contact {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--cinema-bg-hover);
  border: 1px solid var(--cinema-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all var(--dur-norm) var(--ease-out-expo);
  min-width: 0;
}

.profile-contact:hover {
  border-color: var(--cinema-border-hover);
  background: var(--cinema-bg-card);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.profile-contact__icon {
  font-size: 1.05rem;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cinema-accent-subtle);
  border: 1px solid var(--cinema-border-accent);
  border-radius: var(--radius-sm);
}

.profile-contact__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.profile-contact__label {
  font-size: 0.6rem;
  color: var(--cinema-text-dim);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  font-weight: 600;
}

.profile-contact__value {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--cinema-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* Responsive: stack to single column on narrow screens */
@media (max-width: 640px) {
  .profile-contacts {
    grid-template-columns: 1fr;
  }
}

/* Light theme tweaks */
[data-theme="light"] .profile-contact {
  background: rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .profile-contact:hover {
  background: rgba(0, 0, 0, 0.04);
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--cinema-border);
  color: var(--cinema-text);
}
.btn--outline:hover {
  border-color: var(--cinema-accent);
  background: var(--cinema-accent-subtle);
}

.btn--sm {
  padding: 0.4rem 1.2rem;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .profile-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-4);
  }
  .profile-stats {
    justify-content: center;
  }
  .profile-actions {
    justify-content: center;
  }
  .tech-stack {
    justify-content: center;
  }
}

/* ── 22. INTRO / TERMINAL BOOT SEQUENCE (Pure CSS — Zero Dependencies) ── */

/*
 * ════════════════════════════════════════════════════════════
 *  Terminal Boot Sequence — 100% CSS @keyframes
 *  Total duration: ~2.2s  |  GPU-composited (transform + opacity)
 *
 *  Timeline:
 *    0ms    Terminal window fades in + slides up
 *    0.15s  Line 0 — command appears (green)
 *    0.35s  Line 1 — [OK] Initializing...
 *    0.60s  Line 2 — [OK] Loading profile...
 *    0.85s  Line 3 — [OK] Connecting IoT...
 *    1.10s  Line 4 — [OK] Mounting AI...
 *    1.35s  Line 5 — [OK] Rendering...
 *    1.60s  Line 6 — prompt + blinking cursor
 *    2.00s  Terminal begins fade-out
 *    2.50s  Overlay removed, page elements start entrance
 * ════════════════════════════════════════════════════════════
 */


/* ─── Design tokens (local to this component) ─── */

:root {
  --term-bg:            #0d1117;
  --term-bg-backdrop:   #0a0a0f;
  --term-bar-bg:        #161b22;
  --term-border:        rgba(255, 255, 255, 0.08);
  --term-border-bar:    rgba(255, 255, 255, 0.06);
  --term-text:          rgba(200, 210, 220, 0.8);
  --term-text-command:  rgba(0, 212, 170, 0.9);
  --term-text-ok:       #28c840;
  --term-dot-r:         #ff5f57;
  --term-dot-y:         #febc2e;
  --term-dot-g:         #28c840;
  --term-glow:          rgba(0, 212, 170, 0.06);
  --term-scanline:      rgba(0, 212, 170, 0.015);

  /* Timing constants */
  --term-line-step:     0.25s;   /* Interval between lines */
  --term-line-dur:      0.2s;    /* Duration of each line fade-in */
  --term-window-in-dur: 0.4s;
  --term-window-out-dur: 0.5s;
  --term-fade-dur:      0.5s;
  --term-cursor-blink:  0.8s;
}


/* ─── Keyframes ─── */

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

@keyframes termWindowOut {
  0%   { opacity: 1; transform: scale(1); }
  30%  { opacity: 1; transform: scale(1.005); }
  100% { opacity: 0; transform: scale(0.98); }
}

@keyframes termScanline {
  0%   { background-position: 0 0; }
  100% { background-position: 0 4px; }
}

@keyframes termLineIn {
  0%   { opacity: 0; transform: translateX(-8px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes termCursorBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* Page element entrance keyframes (reused from Section 21) */
@keyframes slideDownIn {
  0%   { opacity: 0; transform: translateY(-25px); }
  100% { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.85); }
  65%  { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes orbFloatLeft {
  0%   { opacity: 0; transform: translate(-50px, -30px); }
  100% { opacity: 0.35; transform: translate(0, 0); }
}

@keyframes orbFloatRight {
  0%   { opacity: 0; transform: translate(50px, 30px); }
  100% { opacity: 0.35; transform: translate(0, 0); }
}


/* ─── Overlay — terminal backdrop ─── */

.intro-terminal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--term-bg-backdrop);
  /* Rendering isolation — prevents layout recalculation of page content */
  contain: layout style paint;
  /* Fade-out controlled by JS adding .intro-terminal--leaving */
  transition: opacity var(--term-fade-dur) ease-in-out;
}

.intro-terminal--leaving {
  opacity: 0;
  pointer-events: none;
}


/* ─── Terminal window chrome ─── */

.intro-terminal__window {
  position: relative; /* Positioned context for ::before / ::after */
  width: min(560px, 90vw);
  background: var(--term-bg);
  border: 1px solid var(--term-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 80px var(--term-glow);
  will-change: transform, opacity;
  animation: termWindowIn var(--term-window-in-dur) cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

.intro-terminal--leaving .intro-terminal__window {
  animation: termWindowOut var(--term-window-out-dur) ease-in forwards;
}

/* CRT scanline overlay — pauses when leaving to save GPU */
.intro-terminal__window::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    var(--term-scanline) 2px,
    var(--term-scanline) 4px
  );
  animation: termScanline 0.15s linear infinite;
  pointer-events: none;
  z-index: 2;
}

.intro-terminal--leaving .intro-terminal__window::before {
  animation-play-state: paused;
}

/* Subtle screen glow */
.intro-terminal__window::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(0, 212, 170, 0.04), transparent 70%);
  pointer-events: none;
  z-index: 1;
}


/* ─── Title bar ─── */

.intro-terminal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--term-bar-bg);
  border-bottom: 1px solid var(--term-border-bar);
  position: relative;
  z-index: 3;
}

.intro-terminal__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.intro-terminal__dot--r { background: var(--term-dot-r); }
.intro-terminal__dot--y { background: var(--term-dot-y); }
.intro-terminal__dot--g { background: var(--term-dot-g); }

.intro-terminal__title {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.02em;
  margin-right: 52px; /* Optical balance for 3 dots */
}


/* ─── Terminal body ─── */

.intro-terminal__body {
  padding: 16px 20px 20px;
  font-family: var(--font-mono);
  font-size: clamp(11px, 2.2vw, 13px);
  line-height: 1.7;
  position: relative;
  z-index: 3;
  min-height: 200px;
}


/* ─── Terminal lines — staggered appearance ─── */
/* Only the window container has will-change; individual lines inherit the compositing layer */

.intro-terminal__line {
  opacity: 0;
  color: var(--term-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Line 0: shell command (accent color) */
.intro-terminal__line--0 {
  color: var(--term-text-command);
  animation: termLineIn var(--term-line-dur) ease-out 0.15s both;
}

/* Lines 1-5: boot output — staggered by --term-line-step */
.intro-terminal__line--1 { animation: termLineIn var(--term-line-dur) ease-out 0.35s both; }
.intro-terminal__line--2 { animation: termLineIn var(--term-line-dur) ease-out 0.60s both; }
.intro-terminal__line--3 { animation: termLineIn var(--term-line-dur) ease-out 0.85s both; }
.intro-terminal__line--4 { animation: termLineIn var(--term-line-dur) ease-out 1.10s both; }
.intro-terminal__line--5 { animation: termLineIn var(--term-line-dur) ease-out 1.35s both; }

/* Line 6: prompt + cursor (shorter duration, faster feel) */
.intro-terminal__line--6 { animation: termLineIn 0.15s ease-out 1.60s both; }

/* [OK] badge — green highlight */
.intro-terminal__ok {
  color: var(--term-text-ok);
  font-weight: 600;
}

/* Blinking block cursor — step-end for crisp on/off */
.intro-terminal__cursor {
  color: var(--term-text-command);
  animation: termCursorBlink var(--term-cursor-blink) step-end 1.65s infinite;
}


/* ─── Page elements — entrance after overlay removal ─── */
/* Triggered via JS adding .intro-done to <body> */

body:not(.intro-done) #mainNav,
body:not(.intro-done) #heroTitle,
body:not(.intro-done) #heroSubtitle,
body:not(.intro-done) #heroActions {
  opacity: 0;
}

body.intro-done #mainNav {
  animation: slideDownIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

body.intro-done #heroTitle {
  animation: slideUpIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

body.intro-done #heroSubtitle {
  animation: fadeUpIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

body.intro-done #heroActions {
  animation: popIn 0.5s cubic-bezier(0.22, 1.2, 0.36, 1) 0.4s both;
}

body.intro-done .hero__orb--1 {
  animation: orbFloatLeft 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both !important;
}

body.intro-done .hero__orb--2 {
  animation: orbFloatRight 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both !important;
}


/* ─── Accessibility: skip animation for reduced-motion ─── */

@media (prefers-reduced-motion: reduce) {
  .intro-terminal,
  .intro-terminal__window,
  .intro-terminal__line,
  .intro-terminal__cursor,
  .intro-terminal__window::before {
    animation: none !important;
    transition: none !important;
  }
  .intro-terminal { display: none !important; }
  #mainNav, #heroTitle, #heroSubtitle, #heroActions {
    opacity: 1 !important;
    animation: none !important;
  }
  .hero__orb--1, .hero__orb--2 {
    opacity: 0.35 !important;
    animation: none !important;
    transform: none !important;
  }
}