:root {
  --bp-xs: 375px;
  --bp-sm: 576px;
  --bp-md: 768px;
  --bp-lg: 992px;
  --bp-xl: 1200px;
  --bp-xxl: 1440px;

  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  --ff: 'Inter', 'Noto Sans SC', 'PingFang SC', system-ui, sans-serif;
  --ff-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --ff-display: 'Inter', system-ui, sans-serif;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.25rem;
  --fs-lg: 1.563rem;
  --fs-xl: 1.953rem;
  --fs-2xl: 2.441rem;
  --fs-3xl: 3.052rem;
  --fs-4xl: 3.815rem;
  --fs-5xl: 4.768rem;

  --lh-tight: 1.2;
  --lh-snug: 1.375;
  --lh-normal: 1.6;
  --lh-relaxed: 1.75;
  --lh-loose: 2;

  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  --r-xs: 0.25rem;
  --r-sm: 0.5rem;
  --r-md: 0.75rem;
  --r-lg: 1rem;
  --r-xl: 1.5rem;
  --r-2xl: 2rem;
  --r-3xl: 3rem;
  --r-full: 9999px;

  --t-fast: 150ms;
  --t-base: 300ms;
  --t-slow: 500ms;
  --ease-fluid: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-slow: cubic-bezier(0.4, 0, 0.2, 1);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-subtle: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.15);
  --shadow-halo: 0 0 40px rgba(155, 132, 255, 0.12);
  --shadow-glow: 0 0 20px rgba(155, 132, 255, 0.3);

  --container: 100%;
  --container-sm: 540px;
  --container-md: 720px;
  --container-lg: 960px;
  --container-xl: 1140px;
  --container-xxl: 1320px;

  --header-h: 70px;
  --header-h-md: 76px;
  --header-h-lg: 80px;
  --sidebar-w: 280px;
  --sidebar-w-lg: 320px;
}

:root,
[data-theme="light"] {
  --c-primary-100: #FDF3EE;
  --c-primary-200: #FCE6DC;
  --c-primary-300: #F0C4B8;
  --c-primary-400: #E8927C;
  --c-primary-500: #D07058;
  --c-primary-600: #B05840;
  --c-primary-700: #904028;
  --c-primary-800: #702C18;
  --c-primary-900: #501C0C;

  --c-secondary-100: #FFF5F0;
  --c-secondary-200: #FCE8DC;
  --c-secondary-300: #F5CCB8;
  --c-secondary-400: #F0A888;
  --c-secondary-500: #E88860;
  --c-secondary-600: #D06840;
  --c-secondary-700: #B05028;
  --c-secondary-800: #903818;
  --c-secondary-900: #70280C;

  --c-accent-100: #FFF8F0;
  --c-accent-200: #FFEED5;
  --c-accent-300: #F5D4A0;
  --c-accent-400: #E8B870;
  --c-accent-500: #D4A050;
  --c-accent-600: #B88838;
  --c-accent-700: #987028;
  --c-accent-800: #785820;
  --c-accent-900: #584018;

  --c-gold-100: #FFFAF0;
  --c-gold-200: #FFF0D5;
  --c-gold-300: #F5D8A8;
  --c-gold-400: #E8C080;
  --c-gold-500: #D4A860;
  --c-gold-600: #B89048;
  --c-gold-700: #987838;
  --c-gold-800: #785828;
  --c-gold-900: #584018;

  --c-error-500: #D06060;
  --c-info-500: #6090C0;

  --c-bg-main: #FDF8F5;
  --c-bg-alt: #F8F0EC;
  --c-bg-subtle: #F0E8E2;
  --c-surface-main: #FFFCFA;
  --c-surface-alt: #FAF5F0;
  --c-surface-glass: rgba(255, 252, 250, 0.72);

  --c-text-main: #2E2825;
  --c-text-muted: #5E524C;
  --c-text-subtle: #7E6E66;
  --c-text-disabled: #9E8E86;

  --c-border-main: #E8DED6;
  --c-border-light: #F0E8E0;
  --c-border-strong: var(--c-primary-300);

  --shadow-subtle: 0 1px 3px rgba(208, 112, 88, 0.06);
  --shadow-medium: 0 4px 14px rgba(208, 112, 88, 0.08);
  --shadow-lg: 0 10px 30px rgba(208, 112, 88, 0.1);
  --shadow-halo: 0 0 40px rgba(240, 196, 184, 0.12);
  --shadow-glow: 0 0 20px rgba(240, 196, 184, 0.18);
  --shadow-xs: 0 1px 2px rgba(208, 112, 88, 0.04);

  --grad-primary: linear-gradient(135deg, #E8927C 0%, #F0A888 50%, #E8B870 100%);
  --grad-soft: linear-gradient(135deg, rgba(232, 146, 124, 0.1) 0%, rgba(240, 168, 136, 0.06) 100%);
  --grad-surface: linear-gradient(180deg, rgba(255, 252, 250, 0.88) 0%, rgba(253, 248, 245, 0.95) 100%);

  --c-overlay: rgba(253, 248, 245, 0.6);
  --c-hover: rgba(208, 112, 88, 0.06);
  --c-active: rgba(208, 112, 88, 0.12);
  --c-selection: rgba(232, 146, 124, 0.3);
  --c-focus: var(--c-primary-500);

  --c-code-bg: rgba(255, 250, 247, 0.95);
  --c-code-text: #2D2420;
  --c-code-comment: #7A6E66;
  --c-code-keyword: #D06840;
  --c-code-string: #6B8E6B;
  --c-code-type: #5A8E9E;
  --c-code-number: #C08040;
  --c-code-function: #D07058;
  --c-code-inline-bg: rgba(232, 146, 124, 0.12);

  --shadow-card: 0 4px 14px rgba(208, 112, 88, 0.08);
  --shadow-card-hover: 0 8px 34px rgba(208, 112, 88, 0.12);
  --shadow-card-glow: 0 0 60px rgba(240, 196, 184, 0.08);

  --c-dreamy-1: rgba(240, 196, 184, 0.15);
  --c-dreamy-2: rgba(245, 204, 184, 0.12);
  --c-dreamy-3: rgba(245, 212, 160, 0.08);

  --c-btn-ripple: rgba(255, 255, 255, 0.25);
  --c-shine: rgba(245, 204, 184, 0.1);
  --c-glow-primary: rgba(232, 146, 124, 0.35);

  --color-bg-main: var(--c-bg-main);
  --color-bg-alt: var(--c-bg-alt);
  --color-bg-subtle: var(--c-bg-subtle);
  --color-surface-main: var(--c-surface-main);
  --color-surface-alt: var(--c-surface-alt);
  --color-surface-glass: var(--c-surface-glass);

  --color-text-primary: var(--c-text-main);
  --color-text-secondary: var(--c-text-muted);
  --color-text-subtle: var(--c-text-subtle);
  --color-text-disabled: var(--c-text-disabled);

  --color-accent: var(--c-primary-500);
  --color-accent-low: var(--c-primary-100);
  --color-accent-medium: var(--c-primary-400);
  --color-accent-high: var(--c-primary-600);

  --color-border-main: var(--c-border-main);
  --color-border-light: var(--c-border-light);
  --color-border-strong: var(--c-border-strong);

  --color-shadow-subtle: var(--shadow-subtle);
  --color-shadow-medium: var(--shadow-medium);
  --color-shadow-lg: var(--shadow-lg);

  --color-grad-primary: var(--grad-primary);
  --color-grad-soft: var(--grad-soft);
  --color-grad-surface: var(--grad-surface);
  --color-accent-muted: var(--c-primary-300);
  --color-accent-soft: var(--c-primary-100);
  --color-accent-strong: var(--c-primary-600);
}

[data-theme="dark"] {
  --c-primary-100: #1C1210;
  --c-primary-200: #2E1A14;
  --c-primary-300: #583830;
  --c-primary-400: #E8927C;
  --c-primary-500: #F0A890;
  --c-primary-600: #F5B8A0;
  --c-primary-700: #F5C8B8;
  --c-primary-800: #FCE6DC;
  --c-primary-900: #FDF3EE;

  --c-secondary-100: #1A100C;
  --c-secondary-200: #2E1C14;
  --c-secondary-300: #583828;
  --c-secondary-400: #F0A888;
  --c-secondary-500: #F5B898;
  --c-secondary-600: #F5C8A8;
  --c-secondary-700: #F5D4B8;
  --c-secondary-800: #FCE8DC;
  --c-secondary-900: #FFF5F0;

  --c-accent-100: #1A1410;
  --c-accent-200: #2E2218;
  --c-accent-300: #584030;
  --c-accent-400: #D4A050;
  --c-accent-500: #E8B870;
  --c-accent-600: #F0CC90;
  --c-accent-700: #F5D8A8;
  --c-accent-800: #FFEED5;
  --c-accent-900: #FFF8F0;

  --c-gold-100: #1A1410;
  --c-gold-200: #2E2018;
  --c-gold-300: #483828;
  --c-gold-400: #D4A860;
  --c-gold-500: #E8C080;
  --c-gold-600: #F0D098;
  --c-gold-700: #F5D8A8;
  --c-gold-800: #FFF0D5;
  --c-gold-900: #FFFAF0;

  --c-error-500: #D07070;
  --c-info-500: #7090B8;

  --c-bg-main: #0E0A08;
  --c-bg-alt: #161210;
  --c-bg-subtle: #1E1816;
  --c-surface-main: #1A1412;
  --c-surface-alt: #221C18;
  --c-surface-glass: rgba(26, 20, 18, 0.72);

  --c-text-main: #EDE0D8;
  --c-text-muted: #B8A89E;
  --c-text-subtle: #8A7A6E;
  --c-text-disabled: #5E4E42;

  --c-border-main: #302822;
  --c-border-light: #261E1A;
  --c-border-strong: var(--c-primary-500);

  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-medium: 0 4px 14px rgba(88, 48, 40, 0.22);
  --shadow-lg: 0 10px 30px rgba(88, 48, 40, 0.32);
  --shadow-halo: 0 0 40px rgba(232, 146, 124, 0.15);
  --shadow-glow: 0 0 20px rgba(232, 184, 112, 0.2);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.15);

  --grad-primary: linear-gradient(135deg, #F0A890 0%, #F5B898 50%, #E8B870 100%);
  --grad-soft: linear-gradient(135deg, rgba(240, 168, 136, 0.12) 0%, rgba(245, 184, 152, 0.08) 100%);
  --grad-surface: linear-gradient(180deg, rgba(26, 20, 18, 0.88) 0%, rgba(14, 10, 8, 0.95) 100%);

  --c-overlay: rgba(14, 10, 8, 0.65);
  --c-hover: rgba(240, 168, 136, 0.12);
  --c-active: rgba(240, 168, 136, 0.2);
  --c-selection: rgba(240, 168, 136, 0.35);
  --c-focus: var(--c-primary-600);

  --c-code-bg: rgba(16, 12, 10, 0.7);
  --c-code-text: #EDE0D8;
  --c-code-comment: #7A6E62;
  --c-code-keyword: #F0A888;
  --c-code-string: #8CB080;
  --c-code-type: #70A8B8;
  --c-code-number: #E8B870;
  --c-code-function: #F0A890;
  --c-code-inline-bg: rgba(240, 168, 136, 0.15);

  --shadow-card: 0 4px 16px rgba(88, 48, 40, 0.18);
  --shadow-card-hover: 0 8px 40px rgba(88, 48, 40, 0.22);
  --shadow-card-glow: 0 0 80px rgba(232, 146, 124, 0.12);

  --c-dreamy-1: rgba(240, 168, 136, 0.15);
  --c-dreamy-2: rgba(245, 184, 152, 0.1);
  --c-dreamy-3: rgba(232, 184, 112, 0.06);

  --c-btn-ripple: rgba(255, 255, 255, 0.06);
  --c-shine: rgba(232, 184, 112, 0.1);
  --c-glow-primary: rgba(240, 168, 136, 0.35);

  --c-star-1: rgba(237, 224, 216, 0.7);
  --c-star-2: rgba(237, 224, 216, 0.5);
  --c-star-3: rgba(232, 184, 112, 0.8);
  --c-star-4: rgba(240, 168, 136, 0.7);
  --c-star-5: rgba(240, 238, 235, 0.9);

  --color-bg-main: var(--c-bg-main);
  --color-bg-alt: var(--c-bg-alt);
  --color-bg-subtle: var(--c-bg-subtle);
  --color-surface-main: var(--c-surface-main);
  --color-surface-alt: var(--c-surface-alt);
  --color-surface-glass: var(--c-surface-glass);
  --color-text-primary: var(--c-text-main);
  --color-text-secondary: var(--c-text-muted);
  --color-text-subtle: var(--c-text-subtle);
  --color-text-disabled: var(--c-text-disabled);
  --color-accent: var(--c-primary-500);
  --color-accent-low: var(--c-primary-100);
  --color-accent-medium: var(--c-primary-400);
  --color-accent-high: var(--c-primary-600);
  --color-border-main: var(--c-border-main);
  --color-border-light: var(--c-border-light);
  --color-border-strong: var(--c-border-strong);
  --color-shadow-subtle: var(--shadow-subtle);
  --color-shadow-medium: var(--shadow-medium);
  --color-shadow-lg: var(--shadow-lg);
  --color-grad-primary: var(--grad-primary);
  --color-grad-soft: var(--grad-soft);
  --color-grad-surface: var(--grad-surface);
  --color-accent-muted: var(--c-primary-300);
  --color-accent-soft: var(--c-primary-100);
  --color-accent-strong: var(--c-primary-600);
}
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--fs-base);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--ff);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-main);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease-fluid);
}

a:hover {
  color: var(--color-accent-strong);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  transition: filter var(--t-base) var(--ease-fluid), opacity var(--t-base) var(--ease-fluid),
              transform var(--t-slow) var(--ease-slow);
}

ul, ol { list-style: none; }

button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: var(--fs-base);
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-3xl); font-weight: var(--fw-bold); }
h2 { font-size: var(--fs-2xl); font-weight: var(--fw-bold); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }
h6 { font-size: var(--fs-base); }

p { margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }

::selection { background: var(--c-selection); }

::-webkit-scrollbar { width: 6px; height: 6px; }

::-webkit-scrollbar-track {
  background: var(--c-border-light);
  border-radius: var(--r-full);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--c-primary-300), var(--c-secondary-300));
  border-radius: var(--r-full);
  border: 1px solid var(--c-border-light);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--c-primary-400), var(--c-secondary-400));
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--c-primary-300) var(--c-border-light);
}

:focus-visible {
  outline: 2px solid var(--c-primary-400);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  padding: var(--sp-2) var(--sp-4);
  background: var(--grad-primary);
  color: white;
  border-radius: var(--r-sm);
  z-index: 10000;
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  transition: top var(--t-fast) var(--ease-slow);
}

.skip-link:focus { top: var(--sp-4); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-ellipsis-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-ellipsis-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gradient-text {
  background: var(--color-grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-center { text-align: center; }

.section-title-icon {
  margin-right: var(--sp-2);
  color: var(--c-primary-400);
}

.typed-text {
  display: inline-block;
  min-height: 1.5em;
}

.markdown-content {
  line-height: var(--lh-loose);
}

@media (min-width: 768px) {
  html { font-size: 16px; }
  h1 { font-size: var(--fs-4xl); }
  h2 { font-size: var(--fs-3xl); }
  h3 { font-size: var(--fs-2xl); }
}

@media (min-width: 992px) {
  h1 { font-size: var(--fs-5xl); }
}
.chroma { color: var(--c-code-text); }
.chroma .c, .chroma .c1, .chroma .ch, .chroma .cm, .chroma .cs, .chroma .cp, .chroma .cpf { color: var(--c-code-comment); font-style: italic; }
.chroma .k, .chroma .kc, .chroma .kd, .chroma .kn, .chroma .kp, .chroma .kr, .chroma .kt { color: var(--c-code-keyword); }
.chroma .s, .chroma .s1, .chroma .s2, .chroma .sa, .chroma .sb, .chroma .sc, .chroma .dl, .chroma .sd, .chroma .sh, .chroma .si, .chroma .sx, .chroma .sr, .chroma .ss, .chroma .ld { color: var(--c-code-string); }
.chroma .m, .chroma .mb, .chroma .mf, .chroma .mh, .chroma .mi, .chroma .il, .chroma .mo { color: var(--c-code-number); }
.chroma .o, .chroma .ow { color: var(--c-code-keyword); }
.chroma .nf, .chroma .fm { color: var(--c-code-function); }
.chroma .na, .chroma .nc, .chroma .no, .chroma .nd, .chroma .ne, .chroma .nx { color: var(--c-code-function); }
.chroma .nt { color: var(--c-code-keyword); }
.chroma .l { color: var(--c-code-number); }
.chroma .se { color: var(--c-code-number); }
.chroma .err { color: var(--c-error-500); }
.chroma .gd { color: var(--c-error-500); }
.chroma .gi { color: var(--c-accent-500); }
.chroma .gs { font-weight: bold; }
.chroma .ge { font-style: italic; }
.chroma .gu { color: var(--c-code-comment); }
.chroma .line { display: flex; }
.chroma .ln { user-select: none; margin-right: 0.5em; padding: 0 0.5em 0 0; color: var(--c-code-comment); opacity: 0.5; }
.chroma .hl { background: var(--c-primary-100); }
.chroma .lnt { user-select: none; margin-right: 0.5em; padding: 0 0.5em 0 0; color: var(--c-code-comment); opacity: 0.5; }
.chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
.chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: 100%; }
.chroma .lnlinks { outline: none; text-decoration: none; color: inherit; }
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding-left: var(--sp-5);
  padding-right: var(--sp-5);
}

.content-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-wrapper main { flex: 1; }

.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.bg-image-layer { z-index: -4; }

.bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.bg-overlay-layer {
  z-index: -3;
  background: var(--c-overlay);
}

/* Glassmorphism shared */
.card, .post-card, .post-item,
.sidebar-card, .aside-card, .side-box,
.about-card, .skill-item, .link-card,
.fancy-quote, .toc-card, .mobile-menu,
.scroll-btn, .page-link,
.btn-secondary, .btn-outline,
.post-category, .tag-cloud-item .tag-count-badge,
.site-header, .site-footer {
  background: var(--c-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.card .card, .card .side-box,
.card .sidebar-card,
.aside-card .side-box {
  background: var(--c-surface-alt);
}

/* Header */
.site-header {
  background: var(--color-surface-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 var(--color-border-main), var(--color-shadow-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  transition: background var(--t-base) var(--ease-fluid),
              box-shadow var(--t-base) var(--ease-fluid);
}

.site-header.scrolled {
  background: var(--c-surface-main);
  box-shadow: var(--shadow-medium);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--sp-4);
  gap: var(--sp-3);
}

.site-brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-shrink: 0;
}

.site-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--c-text-main);
  text-decoration: none;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  transition: color var(--t-fast) var(--ease-fluid);
}

.site-title:hover { color: var(--c-primary-400); }

.site-subtitle {
  font-size: var(--fs-xs);
  color: var(--c-text-subtle);
  font-weight: var(--fw-normal);
  display: none;
}

.main-nav { display: none; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  color: var(--c-text-muted);
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  border-radius: var(--r-full);
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease-fluid), background-color var(--t-fast) var(--ease-fluid);
}

.nav-link:hover,
.nav-link.active {
  color: var(--c-primary-500);
  background: var(--c-primary-100);
}

.nav-link i {
  font-size: 0.85em;
  opacity: 0.8;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.theme-toggle,
.search-toggle,
.mobile-menu-toggle {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  background: var(--c-primary-100);
  color: var(--c-primary-300);
  font-size: var(--fs-base);
  transition: all var(--t-fast) var(--ease-fluid);
}

.theme-toggle:hover,
.search-toggle:hover,
.mobile-menu-toggle:hover {
  background: var(--grad-primary);
  color: white;
  transform: scale(1.08);
  box-shadow: var(--shadow-subtle);
}

.mobile-menu-toggle { display: flex; }

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--c-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-fluid);
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: min(280px, 82vw);
  height: 100%;
  z-index: 1000;
  transition: right var(--t-base) var(--ease-slow);
  padding: var(--sp-6);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-radius: var(--r-2xl) 0 0 var(--r-2xl);
}

.mobile-menu.active { right: 0; }

.mobile-menu-close {
  align-self: flex-end;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-primary-100);
  color: var(--c-text-main);
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-4);
  border-radius: var(--r-full);
  transition: background-color var(--t-fast) var(--ease-fluid), color var(--t-fast) var(--ease-fluid);
}

.mobile-menu-close:hover {
  background: var(--c-primary-200);
  color: white;
}

.mobile-menu ul { flex: 1; }

.mobile-menu .nav-link {
  display: flex;
  padding: var(--sp-4) 0;
  font-size: var(--fs-base);
  min-height: 52px;
  border-bottom: 1px solid var(--c-border-light);
  border-radius: 0;
}

.mobile-menu .nav-link:hover {
  background: transparent;
  padding-left: var(--sp-2);
}

.mobile-menu-footer {
  margin-top: auto;
  padding-top: var(--sp-6);
  border-top: 1px solid var(--c-border-main);
}

/* Footer */
.site-footer {
  background: var(--color-surface-main);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--color-text-primary);
  padding: var(--sp-16) 0 var(--sp-8);
  border-top: none;
  box-shadow: var(--color-shadow-subtle);
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-primary);
  opacity: 0.6;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  position: relative;
  z-index: 1;
}

.footer-section {
  position: relative;
}

.footer-section h2,
.footer-section h3 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-5);
  display: inline-block;
  position: relative;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--c-text-main);
}

.footer-section h2::after,
.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 32px;
  height: 2.5px;
  background: var(--grad-primary);
  border-radius: var(--r-full);
  opacity: 0.8;
}

.footer-section p {
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  color: var(--c-text-muted);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer-links a {
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  transition: all var(--t-fast) var(--ease-fluid);
  padding: var(--sp-1) 0;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.footer-links a i {
  font-size: 0.8em;
  opacity: 0.6;
  transition: opacity var(--t-fast);
}

.footer-links a:hover {
  color: var(--c-primary-500);
  transform: translateX(6px);
}

.footer-links a:hover i {
  opacity: 1;
}

.social-links {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  background: var(--c-primary-100);
  color: var(--c-primary-400);
  font-size: var(--fs-base);
  transition: all var(--t-fast) var(--ease-fluid);
  position: relative;
}

.social-link:hover {
  background: var(--grad-primary);
  color: white;
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-glow);
}

.copyright {
  text-align: center;
  margin-top: var(--sp-10);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--c-border-main);
  position: relative;
  z-index: 1;
}

.copyright-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sp-4) var(--sp-6);
  margin-bottom: var(--sp-5);
}

.copyright-links a {
  color: var(--c-primary-500);
  font-size: var(--fs-xs);
  transition: all var(--t-fast) var(--ease-fluid);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-sm);
  text-decoration: none;
}

.copyright-links a i {
  font-size: 0.9em;
}

.copyright-links a:hover {
  color: var(--c-primary-700);
  background: var(--c-hover);
  transform: translateY(-1px);
}

.footer-link {
  color: var(--c-text-muted);
  transition: all var(--t-fast) var(--ease-fluid);
}

.footer-link:hover {
  color: var(--c-primary-400);
  transform: translateX(2px);
}

.footer-note {
  margin-top: var(--sp-5);
  font-style: italic;
  color: var(--c-text-subtle);
  font-size: var(--fs-sm);
  position: relative;
  padding-left: var(--sp-3);
  border-left: 2px solid var(--c-primary-300);
}

.theme-github-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-1);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.tech-tag {
  padding: var(--sp-1) var(--sp-3);
  background: var(--c-primary-100);
  color: var(--c-primary-500);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  transition: all var(--t-fast) var(--ease-fluid);
  border: 1px solid transparent;
}

.tech-tag:hover {
  background: var(--grad-primary);
  color: white;
  border-color: transparent;
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.contact-info i {
  color: var(--c-primary-400);
  width: 16px;
  text-align: center;
  font-size: 0.9em;
}

#footer-copyright {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  margin: var(--sp-3) 0 var(--sp-1);
  font-weight: var(--fw-medium);
}

#footer-copyright a {
  color: var(--c-primary-500);
  text-decoration: none;
}

#footer-copyright a:hover {
  color: var(--c-primary-700);
  text-decoration: underline;
}

.site-uptime {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--c-text-subtle);
  margin: 0 0 var(--sp-1);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.site-uptime i {
  color: var(--c-primary-400);
  font-size: 0.9em;
}

.powered-by {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--c-text-disabled);
  line-height: 1.5;
}

.powered-by a {
  color: var(--c-primary-500);
  text-decoration: none;
  transition: color var(--t-fast);
}

.powered-by a:hover { color: var(--c-primary-700); }

/* Layout responsive */
@media (min-width: 768px) {
  :root { --header-h: var(--header-h-md); }

  .container {
    padding-left: var(--sp-8);
    padding-right: var(--sp-8);
  }

  .site-subtitle { display: block; }
  .main-nav { display: block; }
  .mobile-menu-toggle { display: none; }
  .mobile-menu,
  .mobile-menu-overlay { display: none !important; }

  .header-content { gap: var(--sp-6); }

  .nav-link {
    padding: var(--sp-2) var(--sp-5);
    font-size: var(--fs-sm);
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-10);
  }
}

@media (min-width: 992px) {
  :root { --header-h: var(--header-h-lg); }

  .container {
    padding-left: var(--sp-10);
    padding-right: var(--sp-10);
  }

  .header-content { gap: var(--sp-8); }
  .nav-link { font-size: var(--fs-base); }

  .footer-content {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-8);
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: var(--container-xl);
    padding-left: var(--sp-12);
    padding-right: var(--sp-12);
  }
}

@media (min-width: 1440px) {
  .container { max-width: var(--container-xxl); }
}
/* Scroll buttons */
.scroll-buttons {
  position: fixed;
  right: var(--sp-5);
  bottom: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--t-base) var(--ease-fluid);
  pointer-events: none;
}

.scroll-buttons.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-border-main);
  border-radius: var(--r-full);
  color: var(--c-text-muted);
  font-size: var(--fs-base);
  box-shadow: var(--shadow-medium);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-fluid);
}

.scroll-btn:hover {
  background: var(--grad-primary);
  border-color: transparent;
  color: white;
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.scroll-btn:active { transform: scale(0.95); }

/* Card */
.card {
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  box-shadow: var(--color-shadow-medium);
  border: 1px solid var(--color-border-main);
  position: relative;
  overflow: hidden;
  transition: transform var(--t-base) var(--ease-fluid),
              box-shadow var(--t-base) var(--ease-fluid),
              background-color var(--t-base) var(--ease-fluid);
  will-change: transform;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-grad-primary);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-fluid);
  z-index: 10;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--color-shadow-lg);
}

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

/* Sidebar card */
.sidebar-card {
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  box-shadow: var(--color-shadow-medium);
  border: 1px solid var(--color-border-main);
  position: relative;
  overflow: hidden;
  transition: transform var(--t-base) var(--ease-fluid),
              box-shadow var(--t-base) var(--ease-fluid),
              background-color var(--t-base) var(--ease-fluid);
  will-change: transform;
}

.sidebar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-grad-primary);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-fluid);
  z-index: 10;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.sidebar-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--color-shadow-lg);
}

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

.sidebar-widget {
  margin-bottom: var(--sp-5);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  border: 1px solid var(--color-border-main);
  transition: transform var(--t-base) var(--ease-fluid),
              border-color var(--t-base) var(--ease-fluid),
              background-color var(--t-base) var(--ease-fluid);
  background: var(--color-bg-subtle);
}

.sidebar-widget:hover {
  border-color: var(--c-primary-300);
  box-shadow: 0 0 10px rgba(120, 100, 160, 0.15);
}

/* Button system */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-full);
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  line-height: 1;
  text-decoration: none;
  min-height: 40px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: none;
  transition: transform var(--t-fast) var(--ease-fluid),
              background-color var(--t-fast) var(--ease-fluid),
              color var(--t-fast) var(--ease-fluid),
              box-shadow var(--t-fast) var(--ease-fluid);
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  background: var(--c-btn-ripple);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.4s var(--ease-fluid);
  will-change: transform;
}

.btn:active::before {
  transform: translate(-50%, -50%) scale(1);
}

.btn-primary {
  background: var(--color-grad-primary);
  color: white;
  box-shadow: var(--color-shadow-medium);
}

.btn-primary:hover {
  color: white;
  transform: translateY(-4px);
  box-shadow: var(--color-shadow-lg);
}

.btn-secondary {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border: 1.5px solid var(--color-accent-soft);
}

.btn-secondary:hover {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

.btn-outline {
  background: transparent;
  color: var(--color-text-primary);
  border: 1.5px solid var(--color-border-main);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}

.btn-ghost:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.btn-sm {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-xs);
  min-height: 32px;
}

.btn-lg {
  padding: var(--sp-4) var(--sp-8);
  font-size: var(--fs-base);
  min-height: 48px;
}

/* Code blocks */
.highlight {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: 1.5rem 0;
  border: 1px solid var(--c-border-main);
  background: var(--c-code-bg);
}

.highlight pre {
  margin: 0 !important;
  padding: 1.25rem !important;
  overflow-x: auto;
  font-family: var(--ff-mono) !important;
  font-size: 0.875rem !important;
  line-height: 1.65 !important;
  tab-size: 4;
  border-radius: 0 !important;
}

.highlight code { font-size: inherit; }

.article-text code:not([class]) {
  padding: 2px 8px;
  border-radius: var(--r-sm);
  font-family: var(--ff-mono);
  font-size: 0.9em;
}

[data-theme="light"] .article-text code:not([class]) { background: var(--c-primary-100); color: var(--c-primary-700); }
[data-theme="dark"] .article-text code:not([class]) { background: var(--c-code-inline-bg); color: var(--c-primary-700); }

.highlight::before {
  content: attr(data-lang) attr(data-code-lang);
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.35rem 0.75rem;
  font-size: 0.6875rem;
  font-family: var(--ff);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 0 var(--r-lg) 0 var(--r-md);
  z-index: 2;
  pointer-events: none;
  background: var(--c-primary-100);
  color: var(--c-primary-500);
}

[data-theme="dark"] .highlight::before { background: var(--c-code-inline-bg); color: var(--c-primary-700); }

.code-copy-btn {
  position: absolute;
  bottom: var(--sp-1);
  right: var(--sp-1);
  padding: 0.3rem 0.6rem;
  font-size: 0.6875rem;
  font-family: var(--ff);
  font-weight: var(--fw-medium);
  border-radius: var(--r-sm);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease-fluid), background var(--t-fast);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  border: none;
  background: var(--c-primary-100);
  color: var(--c-primary-500);
}

.highlight:hover .code-copy-btn { opacity: 1; }

[data-theme="dark"] .code-copy-btn { background: var(--c-code-inline-bg); color: var(--c-primary-700); border: 1px solid rgba(167, 139, 250, 0.25); }

.code-copy-btn:hover { background: var(--c-primary-400); color: var(--c-surface-main); }

.code-copy-btn.copied {
  background: var(--c-accent-600) !important;
  color: var(--c-surface-main) !important;
  border-color: transparent !important;
}
/* Floating decorations */
.floating-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.float-shape {
  position: absolute;
  border-radius: var(--r-full);
  opacity: 0.12;
  animation: floatAround 30s ease-in-out infinite;
}

.float-shape-1 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--c-primary-300) 0%, transparent 70%);
  top: 5%;
  left: -8%;
  animation-delay: 0s;
  animation-duration: 40s;
}

.float-shape-2 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--c-secondary-300) 0%, transparent 70%);
  top: 55%;
  right: -5%;
  animation-delay: -5s;
  animation-duration: 35s;
}

.float-shape-3 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, var(--c-accent-200) 0%, transparent 70%);
  bottom: 15%;
  left: 8%;
  animation-delay: -12s;
  animation-duration: 38s;
}

.float-shape-4 {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--c-gold-200) 0%, transparent 70%);
  top: 25%;
  right: 12%;
  animation-delay: -18s;
  animation-duration: 30s;
}

.float-shape-5 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--c-primary-100) 0%, transparent 70%);
  bottom: 8%;
  right: 3%;
  animation-delay: -10s;
  animation-duration: 36s;
}

@keyframes floatAround {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(40px, -50px) scale(1.08); }
  50% { transform: translate(-30px, 40px) scale(0.92); }
  75% { transform: translate(50px, 25px) scale(1.04); }
}

/* Hero */
.hero {
  padding: var(--sp-16) 0 var(--sp-8);
  text-align: left;
  position: relative;
  overflow: hidden;
  background: transparent !important;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::before, .hero::after { display: none; }

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-10);
  max-width: 1100px;
  width: 100%;
  padding: 0 var(--sp-6);
}

.hero-left { width: 100%; }

.hero-content {
  max-width: 680px;
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-right {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--grad-soft);
  border: 1px solid var(--c-border-main);
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  color: var(--c-primary-400);
  margin-bottom: var(--sp-8);
  backdrop-filter: blur(10px);
}

.hero-badge i { animation: sparkle 2s ease-in-out infinite; }

@keyframes sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.15); }
}

.hero-title {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-extrabold);
  margin-bottom: var(--sp-6);
  color: var(--c-text-main);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  text-align: center;
}

.hero-greeting {
  display: block;
  font-size: var(--fs-lg);
  color: var(--c-text-muted);
  font-weight: var(--fw-normal);
  margin-bottom: var(--sp-3);
}

.hero-name {
  display: block;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--fs-lg);
  color: var(--c-text-muted);
  margin-bottom: var(--sp-5);
  font-weight: var(--fw-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}

.hero-subtitle i {
  color: var(--c-primary-400);
  opacity: 0.8;
}

.hero-description {
  font-size: var(--fs-base);
  color: var(--c-text-muted);
  margin-bottom: var(--sp-10);
  line-height: var(--lh-relaxed);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: var(--sp-4);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll-hint {
  margin-top: var(--sp-10);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  color: var(--c-text-main);
  font-size: var(--fs-sm);
  animation: bounceDown 2.5s ease-in-out infinite;
}

.scroll-mouse {
  width: 26px;
  height: 42px;
  border: 2px solid var(--c-border-main);
  border-radius: 13px;
  position: relative;
}

.scroll-wheel {
  width: 4px;
  height: 10px;
  background: var(--c-primary-400);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
  0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.3; transform: translateX(-50%) translateY(12px); }
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* Quote */
.quote-section { padding: 0; }

.fancy-quote {
  text-align: center;
  position: relative;
  padding: var(--sp-10) var(--sp-8);
  background: var(--grad-soft);
  border-radius: var(--r-3xl);
  border: 1px solid var(--c-border-main);
  backdrop-filter: blur(15px);
  max-width: 100%;
  margin: 0;
}

.quote-icon {
  font-size: var(--fs-3xl);
  color: var(--c-primary-300);
  opacity: 0.5;
  margin-bottom: var(--sp-5);
}

.quote-text {
  font-size: var(--fs-xl);
  color: var(--c-text-main);
  line-height: var(--lh-relaxed);
  font-style: italic;
  margin-bottom: var(--sp-5);
}

.quote-author {
  font-size: var(--fs-base);
  color: var(--c-primary-400);
  font-weight: var(--fw-semibold);
}

/* Section header */
.section-icon {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-primary);
  border-radius: var(--r-xl);
  color: white;
  font-size: var(--fs-2xl);
  margin-bottom: var(--sp-5);
  box-shadow: var(--shadow-medium);
}

.section-title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  color: var(--c-text-main);
  margin-bottom: var(--sp-3);
}

.section-subtitle {
  font-size: var(--fs-md);
  color: var(--c-text-muted);
}

/* Posts grid section */
.posts-section { padding: var(--sp-16) 0; }

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-10);
}

.post-card {
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--c-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--c-border-main);
  transition: transform var(--t-base) var(--ease-slow), box-shadow var(--t-base) var(--ease-slow);
  will-change: transform;
  box-shadow: var(--shadow-subtle);
}

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-primary-300);
}

.post-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--grad-soft);
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease-slow);
}

.post-card:hover .post-image img { transform: scale(1.06); }

.post-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(transparent, rgba(0,0,0,0.08));
  pointer-events: none;
}

.post-category {
  position: absolute;
  top: var(--sp-4);
  left: var(--sp-4);
  background: var(--grad-primary);
  color: white;
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

.post-content { padding: var(--sp-6); }

.post-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-3);
  line-height: var(--lh-snug);
}

.post-title a {
  color: var(--c-text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-title a:hover { color: var(--c-primary-400); }

.post-meta {
  display: flex;
  gap: var(--sp-5);
  font-size: var(--fs-sm);
  color: var(--c-text-subtle);
  margin-bottom: var(--sp-4);
}

.post-meta i { margin-right: var(--sp-1); }

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.post-tag {
  font-size: 0.8125rem;
  color: var(--c-primary-500);
  background: var(--c-primary-100);
  padding: 0.2rem 0.625rem;
  border-radius: var(--r-full);
  transition: all var(--t-fast);
  text-decoration: none;
}

.post-tag:hover {
  background: var(--grad-primary);
  color: white;
}

.post-tag-more {
  font-size: var(--fs-sm);
  color: var(--c-text-subtle);
}

.post-excerpt {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--c-primary-500);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  transition: all var(--t-fast);
  text-decoration: none;
  margin-top: auto;
}

.read-more:hover {
  gap: 0.75rem;
  color: var(--c-primary-600);
}

.read-more i { transition: transform var(--t-fast); font-size: 0.875em; }

.read-more:hover i { transform: translateX(4px); }

/* About section on home */
.about-section { padding: var(--sp-16) 0; }

.about-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-10);
  align-items: center;
  text-align: center;
  padding: var(--sp-10) var(--sp-8);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--c-border-main);
}

.about-card .about-content { flex: 1; width: 100%; }

.about-description {
  color: var(--c-text-muted);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-8);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  margin-top: var(--sp-8);
}

.about-stats .stat-item {
  text-align: center;
  padding: var(--sp-6) var(--sp-4);
  background: var(--grad-soft);
  border-radius: var(--r-xl);
  border: 1px solid var(--c-border-main);
  transition: all var(--t-base);
}

.about-stats .stat-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.about-stats .stat-icon {
  font-size: var(--fs-base);
  margin-bottom: var(--sp-4);
}

.about-stats .stat-number {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: var(--sp-2);
}

.about-stats .stat-label {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  font-weight: var(--fw-medium);
}

.about-cta { margin-top: var(--sp-8); }

.about-image-wrapper {
  position: relative;
  flex-shrink: 0;
}

.about-image { text-align: center; }

.about-image img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: var(--r-full);
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--c-surface-main);
}

.about-image-decoration {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 10px;
  left: 10px;
  border: 2px solid var(--c-primary-300);
  border-radius: var(--r-full);
  z-index: -1;
  opacity: 0.5;
}

/* Skills section on home */
.skills-section { padding: var(--sp-16) 0; }

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}

.skill-item {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  padding: var(--sp-6);
  border-radius: var(--r-xl);
  border: 1px solid var(--c-border-main);
  transition: all var(--t-base) var(--ease-slow);
  box-shadow: var(--shadow-card);
}

.skill-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.skill-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-soft);
  border-radius: var(--r-lg);
  font-size: var(--fs-2xl);
  color: var(--c-primary-400);
  flex-shrink: 0;
}

.skill-info { flex: 1; min-width: 0; }

.skill-name {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
}

.skill-percent {
  color: var(--c-primary-400);
  font-weight: var(--fw-semibold);
}

.skill-bar {
  height: 8px;
  background: var(--c-border-light);
  border-radius: var(--r-full);
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--grad-primary);
  border-radius: var(--r-full);
  width: 0;
  transition: width 1s var(--ease-slow);
}
.posts-layout {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

.posts-main { width: 100%; }

.posts-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.post-item {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--c-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--c-border-main);
  transition: all var(--t-base) var(--ease-slow);
  box-shadow: var(--shadow-subtle);
}

.post-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-primary-300);
}

.post-item-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
  background: var(--grad-soft);
  flex-shrink: 0;
}

.post-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-slow);
}

.post-item:hover .post-item-image img { transform: scale(1.05); }

.post-item-content {
  padding: 1.75rem 1.75rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.post-item .post-title {
  font-size: 1.375rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  font-weight: var(--fw-bold);
}

.post-item .post-title a {
  color: var(--c-text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--t-fast);
}

.post-item .post-title a:hover { color: var(--c-primary-500); }

.post-item .post-meta {
  font-size: var(--fs-sm);
  color: var(--c-text-subtle);
  margin-bottom: 1rem;
  display: flex;
  gap: 1.25rem;
}

.post-tags-container { margin-bottom: 0.875rem; }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 1rem;
  border: 1px solid var(--c-border-main);
  border-radius: var(--r-full);
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  transition: all var(--t-fast);
  text-decoration: none;
}

.page-link:hover {
  background: var(--c-primary-100);
  border-color: var(--c-primary-300);
  color: var(--c-primary-500);
}

.page-link.current {
  background: var(--grad-primary);
  border-color: transparent;
  color: white;
}

.page-numbers {
  display: flex;
  gap: 0.375rem;
}

/* Sidebar */
.posts-sidebar {
  display: none;
  width: var(--sidebar-w);
}

.sidebar-card {
  border-radius: var(--r-xl);
  padding: 1.5rem;
  border: 1px solid var(--c-border-main);
  background: var(--c-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-subtle);
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  margin-bottom: 1.25rem;
  color: var(--c-text-main);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-title i { color: var(--c-primary-400); font-size: 0.875em; }

.recent-posts-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.recent-post-item {
  border-bottom: 1px solid var(--c-border-light);
}

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

.recent-post-link {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-3);
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  transition: color var(--t-fast);
  padding: 0.625rem 0;
  text-decoration: none;
}

.recent-post-link:hover { color: var(--c-primary-500); }

.recent-post-title {
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-post-date {
  color: var(--c-text-disabled);
  font-size: var(--fs-xs);
  flex-shrink: 0;
}

/* Tag cloud (sidebar) */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* Tag cloud page (tags/*) */
.term-cloud-section {
  margin: var(--sp-8) 0;
}

.cloud-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
}

.cloud-tag {
  padding: var(--sp-1) var(--sp-3);
  background: var(--c-primary-100);
  color: var(--c-primary-600);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  transition: all var(--t-fast);
}

.cloud-tag:hover {
  background: var(--grad-primary);
  color: white;
}

.tag-count {
  font-size: 0.85em;
  opacity: 0.7;
}

/* Calendar */
.calendar-card { text-align: center; }

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-4);
  font-weight: var(--fw-semibold);
}

.calendar-month {
  font-size: var(--fs-lg);
  color: var(--c-text-main);
}

.calendar-year {
  font-size: var(--fs-sm);
  color: var(--c-text-subtle);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--sp-1);
  margin-bottom: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--c-text-subtle);
  font-weight: var(--fw-medium);
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--sp-1);
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  border-radius: var(--r-sm);
  color: var(--c-text-muted);
  transition: all var(--t-fast);
}

.calendar-day:hover:not(.empty) {
  background: var(--c-primary-100);
  color: var(--c-primary-400);
}

.calendar-day.today {
  background: var(--grad-primary);
  color: white;
  font-weight: var(--fw-semibold);
}

.calendar-day.empty { visibility: hidden; }

.calendar-date {
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--c-border-main);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}
/* Section common */
.section-content {
  padding: var(--sp-12) 0 var(--sp-16);
  min-height: calc(100vh - var(--header-h) - 200px);
}

.section-header {
  text-align: center;
  margin-bottom: var(--sp-12);
  padding: var(--sp-10) 0 var(--sp-6);
}

.section-description {
  max-width: 700px;
  margin: var(--sp-5) auto 0;
  color: var(--c-text-muted);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
}

/* Tag pages - term posts grid (4x4) */
.term-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  max-width: 1400px;
  margin: 0 auto;
}

.tag-header-meta { margin-top: var(--sp-5); }

.no-terms-message {
  text-align: center;
  padding: var(--sp-12) var(--sp-6);
  color: var(--c-text-muted);
  background: var(--c-surface-glass);
  backdrop-filter: blur(16px);
  border-radius: var(--r-xl);
  border: 1px solid var(--c-border-main);
}

/* Tags grid page */
.tags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--sp-3);
}

.tags-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-xl);
  border: 1px solid var(--c-border-main);
  border-left: 3px solid var(--c-primary-300);
  background: var(--c-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-decoration: none;
  transition: all var(--t-base);
}

.tags-card:hover {
  border-color: var(--c-primary-300);
  border-left-color: var(--c-primary-500);
  box-shadow: var(--shadow-medium);
  transform: translateY(-3px);
}

.tags-card-name {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--c-text-main);
}

.tags-card-count {
  font-size: var(--fs-xs);
  color: var(--c-text-subtle);
}

.tag-article-count {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--c-primary-100);
  color: var(--c-primary-500);
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

/* About page */
.page-header {
  text-align: center;
  padding: var(--sp-10) 0 var(--sp-6);
}

.page-title {
  font-size: var(--fs-3xl);
  margin-bottom: var(--sp-3);
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: var(--fw-bold);
}

.page-description {
  color: var(--c-text-muted);
  font-size: var(--fs-base);
  max-width: 600px;
  margin: 0 auto;
  line-height: var(--lh-relaxed);
}

.about-intro { margin: var(--sp-6) 0; }

.intro-card {
  padding: var(--sp-6);
  background: var(--color-surface-main);
  border-radius: var(--r-2xl);
  box-shadow: var(--color-shadow-subtle);
  border: 1px solid var(--color-border-main);
}

.intro-content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  margin-bottom: var(--sp-6);
  align-items: center;
  text-align: center;
}

.intro-text { width: 100%; }

.intro-text h2 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--sp-2);
  color: var(--c-text-main);
}

.intro-subtitle {
  color: var(--c-text-muted);
  font-size: var(--fs-base);
  margin-bottom: var(--sp-6);
  font-weight: var(--fw-medium);
}

.intro-quote {
  background: var(--c-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 3px solid var(--c-primary-400);
  padding: var(--sp-5);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  position: relative;
  text-align: left;
}

.intro-quote > i:first-child {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  color: var(--c-primary-400);
  opacity: 0.3;
  font-size: var(--fs-md);
}

.intro-quote > i:last-child {
  position: absolute;
  bottom: var(--sp-3);
  right: var(--sp-3);
  color: var(--c-primary-400);
  opacity: 0.3;
  font-size: var(--fs-md);
}

.intro-quote p {
  color: var(--c-text-main);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  font-style: italic;
  margin: 0;
  padding: 0 var(--sp-6);
}

.intro-image {
  flex-shrink: 0;
  position: relative;
}

.intro-image img {
  width: 150px;
  height: 150px;
  border-radius: var(--r-full);
  object-fit: cover;
  border: 4px solid var(--c-surface-main);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.image-decoration {
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  background: var(--grad-primary);
  border-radius: var(--r-full);
  opacity: 0.15;
  animation: pulse 3s ease-in-out infinite;
}

.intro-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--c-border-main);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: var(--color-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--r-lg);
}

.stat-icon {
  width: 44px;
  height: 44px;
  background: var(--grad-primary);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--fs-base);
  flex-shrink: 0;
}

.stat-content { flex: 1; }

.stat-number {
  font-size: var(--fs-xl);
  font-weight: var(--fw-extrabold);
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  color: var(--c-text-muted);
  font-size: var(--fs-xs);
  margin-top: 2px;
}

.about-philosophy { margin: var(--sp-10) 0; }

.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

.philosophy-item {
  text-align: center;
  padding: var(--sp-6);
  background: var(--c-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-subtle);
  border: 1px solid var(--c-border-main);
  transition: all var(--t-base) var(--ease-slow);
}

.philosophy-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.philosophy-icon {
  width: 56px;
  height: 56px;
  background: var(--grad-primary);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-4);
  color: white;
  font-size: var(--fs-xl);
}

.philosophy-item h3 {
  font-size: var(--fs-md);
  margin-bottom: var(--sp-2);
}

.philosophy-item p {
  color: var(--c-text-muted);
  line-height: var(--lh-relaxed);
  font-size: var(--fs-sm);
  margin: 0;
}

.about-content { margin: var(--sp-10) 0; }

/* Markdown */
.enhanced-markdown {
  font-size: var(--fs-base);
  line-height: var(--lh-loose);
}

.enhanced-markdown h2 {
  font-size: var(--fs-xl);
  margin: var(--sp-8) 0 var(--sp-4);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--color-border-main);
  color: var(--color-text-primary);
}

.enhanced-markdown h3 {
  font-size: var(--fs-md);
  margin: var(--sp-6) 0 var(--sp-3);
  color: var(--color-text-primary);
}

.enhanced-markdown p {
  margin: var(--sp-4) 0;
  color: var(--color-text-primary);
}

.enhanced-markdown strong {
  color: var(--color-accent);
  font-weight: var(--fw-semibold);
}

.enhanced-markdown ul,
.enhanced-markdown ol {
  margin: var(--sp-4) 0;
  padding-left: var(--sp-6);
}

.enhanced-markdown li {
  margin: var(--sp-2) 0;
  color: var(--c-text-main);
}

.enhanced-markdown blockquote {
  border-left: 3px solid var(--c-primary-400);
  padding: var(--sp-4);
  margin: var(--sp-4) 0;
  background: var(--grad-soft);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  font-style: italic;
  color: var(--c-text-muted);
}

.enhanced-markdown code {
  background: var(--c-primary-100);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  font-family: var(--ff-mono);
  font-size: 0.9em;
  color: var(--c-primary-500);
}

.enhanced-markdown pre {
  background: var(--c-surface-main);
  border: 1px solid var(--c-border-main);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  overflow-x: auto;
  margin: var(--sp-4) 0;
}

.enhanced-markdown pre code {
  background: none;
  padding: 0;
  color: var(--c-text-main);
}

.enhanced-markdown table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-4) 0;
  font-size: var(--fs-sm);
}

.enhanced-markdown th {
  background: var(--grad-soft);
  padding: var(--sp-3);
  text-align: left;
  font-weight: var(--fw-semibold);
  border-bottom: 2px solid var(--c-border-main);
}

.enhanced-markdown td {
  padding: var(--sp-3);
  border-bottom: 1px solid var(--c-border-light);
}

.enhanced-markdown a {
  color: var(--c-primary-500);
}

.about-contact { margin: var(--sp-10) 0 var(--sp-16); }

.contact-card {
  padding: var(--sp-6);
  text-align: center;
}

.contact-card .section-title { margin-bottom: var(--sp-2); }
.contact-card .section-subtitle { margin-bottom: var(--sp-6); }

.contact-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

@media (max-width: 575px) {
  .contact-methods { grid-template-columns: 1fr; }
}

.contact-method {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--c-surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--r-lg);
  text-decoration: none;
  transition: all var(--t-fast) var(--ease-slow);
  border: 1px solid var(--c-border-main);
}

.contact-method:hover {
  border-color: var(--c-primary-300);
  transform: translateY(-2px);
}

.method-icon {
  width: 48px;
  height: 48px;
  background: var(--grad-primary);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--fs-md);
  flex-shrink: 0;
}

.method-info {
  flex: 1;
  text-align: left;
}

.method-info h3 {
  font-size: var(--fs-base);
  margin-bottom: 2px;
  color: var(--c-text-main);
}

.method-info p {
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  margin: 0;
  word-break: break-all;
}

.contact-note {
  padding-top: var(--sp-6);
  border-top: 1px solid var(--c-border-main);
}

.contact-note p {
  color: var(--c-text-muted);
  font-size: var(--fs-base);
  font-style: italic;
  margin: 0;
}

/* Links */
.friends-links { margin: var(--sp-10) 0; }
.links-container { margin-top: var(--sp-6); }

.links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}

.link-card {
  padding: var(--sp-5);
  border-radius: var(--r-xl);
  border: 1px solid var(--color-border-main);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  transition: transform var(--t-base) var(--ease-slow),
              box-shadow var(--t-base) var(--ease-slow),
              background-color var(--t-base) var(--ease-slow);
  box-shadow: var(--color-shadow-subtle);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.link-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-primary-300);
}

.link-avatar {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: var(--r-full);
  overflow: hidden;
  border: 2px solid var(--c-border-main);
  transition: border-color var(--t-base);
}

.link-card:hover .link-avatar { border-color: var(--c-primary-400); }

.link-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-base) var(--ease-slow);
}

.link-card:hover .link-avatar img { transform: scale(1.1); }

.link-info { flex: 1; min-width: 0; }

.link-name {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-2);
  color: var(--c-text-main);
}

.link-desc {
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
}

.link-category {
  font-size: var(--fs-xs);
  color: var(--c-text-subtle);
  background: var(--c-primary-100);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-sm);
}

.link-url {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  color: var(--c-primary-400);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  transition: all var(--t-fast) var(--ease-slow);
}

.link-url:hover {
  color: var(--c-primary-500);
  gap: var(--sp-2);
}

.link-url i {
  font-size: 0.85em;
  transition: transform var(--t-fast) var(--ease-slow);
}

.link-url:hover i { transform: translateX(2px); }

.apply-links { margin: var(--sp-12) 0; }

.apply-card {
  padding: var(--sp-8) var(--sp-6);
  position: relative;
  overflow: hidden;
}

.apply-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad-primary);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.apply-card .section-title { margin-bottom: var(--sp-6); }

.apply-content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.apply-info h3 {
  font-size: var(--fs-base);
  margin-bottom: var(--sp-4);
  font-weight: var(--fw-semibold);
  color: var(--c-text-main);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.apply-info h3::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 16px;
  background: var(--grad-primary);
  border-radius: var(--r-full);
}

.apply-conditions {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-6);
}

.apply-conditions li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-bg-subtle);
  border-radius: var(--r-md);
  border: 1px solid var(--c-border-light);
}

.apply-conditions li:last-child { margin-bottom: 0; }

.apply-conditions i {
  color: var(--c-primary-400);
  margin-top: 3px;
  flex-shrink: 0;
}

.site-info {
  background: var(--c-surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  border: 1px solid var(--c-border-main);
}

.site-info .info-item {
  display: flex;
  margin-bottom: var(--sp-2);
  font-size: var(--fs-sm);
}

.site-info .info-item:last-child { margin-bottom: 0; }

.site-info .info-label {
  font-weight: var(--fw-semibold);
  min-width: 56px;
  color: var(--c-text-main);
}

.site-info .info-value { color: var(--c-text-muted); }

.apply-contact h3 {
  font-size: var(--fs-base);
  margin-bottom: var(--sp-3);
  font-weight: var(--fw-semibold);
  color: var(--c-text-main);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.apply-contact h3::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 16px;
  background: var(--grad-primary);
  border-radius: var(--r-full);
}

.apply-contact p {
  color: var(--c-text-muted);
  margin-bottom: var(--sp-5);
  line-height: var(--lh-relaxed);
  font-size: var(--fs-sm);
}

.apply-contact-methods {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--grad-primary);
  color: white;
  border-radius: var(--r-lg);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: all var(--t-fast) var(--ease-slow);
  box-shadow: var(--shadow-subtle);
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  color: white;
}

/* Skills page */
.skills-overview .section-title,
.detailed-skills .section-title,
.skill-development .section-title {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  position: relative;
  padding-bottom: var(--sp-3);
}

.skills-overview .section-title::after,
.detailed-skills .section-title::after,
.skill-development .section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--grad-primary);
  border-radius: var(--r-full);
  box-shadow: 0 2px 8px rgba(167, 139, 250, 0.25);
}

.skills-summary { margin: var(--sp-6) 0; }

.skills-categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  margin-top: var(--sp-6);
}

.category-item {
  text-align: center;
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  background: var(--c-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--c-border-main);
  transition: all var(--t-base) var(--ease-slow);
}

.category-item:hover {
  transform: translateY(-4px);
  background: var(--c-surface-main);
  box-shadow: var(--shadow-lg);
}

.category-icon {
  width: 56px;
  height: 56px;
  background: var(--grad-primary);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-4);
  color: white;
  font-size: var(--fs-xl);
  box-shadow: var(--shadow-subtle);
}

.category-item h3 {
  margin-bottom: var(--sp-2);
  color: var(--c-text-main);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-md);
}

.category-item p {
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-4);
  line-height: var(--lh-relaxed);
}

.category-progress {
  height: 5px;
  background: var(--c-primary-100);
  border-radius: var(--r-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--grad-primary);
  border-radius: var(--r-full);
  transition: width 1.2s var(--ease-slow);
}

.skills-detailed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  margin: var(--sp-8) 0;
}

.skill-detail-item {
  padding: var(--sp-6);
  transition: all var(--t-base) var(--ease-slow);
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-3);
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.skill-name {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--c-text-main);
}

.skill-level {
  background: var(--grad-primary);
  color: white;
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--r-full);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-xs);
}

.skill-description {
  color: var(--c-text-muted);
  margin: var(--sp-3) 0;
  line-height: var(--lh-relaxed);
  font-size: var(--fs-sm);
}

.skill-projects {
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--c-border-main);
}

.skill-projects h4 {
  margin-bottom: var(--sp-3);
  color: var(--c-text-main);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
}

.skill-projects ul {
  list-style: none;
  padding-left: 0;
}

.skill-projects li {
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-6);
  color: var(--c-text-muted);
  position: relative;
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
}

.skill-projects li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--c-primary-400);
  font-weight: var(--fw-bold);
}

.development-timeline {
  padding: var(--sp-8);
  margin: var(--sp-8) 0;
}

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

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--grad-primary);
  border-radius: var(--r-full);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--sp-8);
  padding-left: var(--sp-6);
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-date {
  position: absolute;
  left: -28px;
  top: 0;
  background: var(--grad-primary);
  color: white;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  z-index: 1;
  box-shadow: var(--shadow-subtle);
  white-space: nowrap;
}

.timeline-content {
  background: var(--c-bg-subtle);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border-main);
}

.timeline-content h3 {
  margin-bottom: var(--sp-2);
  color: var(--c-text-main);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
}

.timeline-content p {
  color: var(--c-text-muted);
  line-height: var(--lh-relaxed);
  font-size: var(--fs-sm);
  margin: 0;
}

.content-card {
  padding: var(--sp-8);
  margin: var(--sp-8) 0;
}

/* Article detail */
.article-page { padding-bottom: var(--sp-8); }

.article-header {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  background: var(--c-bg-subtle);
  border-radius: var(--r-2xl);
  overflow: hidden;
  margin-bottom: var(--sp-6);
  margin-top: var(--sp-6);
}

.article-cover { position: absolute; inset: 0; }

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-cover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65%;
  background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.7) 40%, transparent 100%);
}

[data-theme="dark"] .article-cover::after {
  background: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.7) 40%, transparent 100%);
}

.article-info {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: var(--sp-8) var(--sp-8) var(--sp-6);
  color: var(--c-text-main);
}

.article-cat {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--c-primary-400);
  color: #fff;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  margin-bottom: var(--sp-4);
}

.article-h1 {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-4);
  line-height: 1.25;
  max-width: 800px;
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-4);
  color: var(--c-text-muted);
}

.article-meta-row i { margin-right: var(--sp-1); }

.article-desc {
  margin: var(--sp-6) 0;
  padding: var(--sp-5) var(--sp-6);
  background: var(--c-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--r-xl);
  border: 1px solid var(--c-border-main);
  font-size: var(--fs-base);
  color: var(--c-text-muted);
  line-height: var(--lh-relaxed);
}

.article-desc p { margin: 0; }

.article-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.article-tag-list a {
  padding: 0.15rem 0.6rem;
  background: var(--c-primary-100);
  color: var(--c-primary-500);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  transition: all var(--t-fast);
  text-decoration: none;
}

.article-tag-list a:hover {
  background: var(--grad-primary);
  color: #fff;
}

.article-header:not(:has(.article-cover)) {
  background: var(--grad-soft);
  padding-bottom: var(--sp-4);
}

.article-body-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  padding: var(--sp-8) 0;
}

.article-left { flex: 1; min-width: 0; }

.article-text {
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  border: 1px solid var(--c-border-main);
  line-height: 1.85;
  font-size: 1.0625rem;
  color: var(--c-text-main);
  background: var(--c-surface-main);
}

.article-text h2 {
  font-size: 1.625rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--c-border-light);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
}

.article-text h3 {
  font-size: 1.375rem;
  margin: 2rem 0 0.75rem;
  font-weight: var(--fw-semibold);
}

.article-text h4 {
  font-size: 1.125rem;
  margin: 1.5rem 0 0.5rem;
  font-weight: var(--fw-semibold);
}

.article-text p { margin-bottom: 1.25rem; }

.article-text ul,
.article-text ol {
  margin-bottom: 1.25rem;
  padding-left: 1.75rem;
}

.article-text ul { list-style: disc; }
.article-text ol { list-style: decimal; }
.article-text li { margin-bottom: 0.5rem; line-height: 1.85; }

.article-text blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--c-primary-100);
  border-left: 4px solid var(--c-primary-400);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  font-style: italic;
  color: var(--c-text-muted);
  font-size: 0.975rem;
}

.article-text a {
  color: var(--c-primary-500);
  transition: color var(--t-fast);
}

.article-text a:hover { color: var(--c-primary-600); }

.article-text img {
  max-width: 100%;
  border-radius: var(--r-lg);
  margin: 1.5rem auto;
  display: block;
}

.article-text table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.article-text th,
.article-text td {
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--c-border-main);
  text-align: left;
}

.article-text th {
  background: var(--c-primary-100);
  font-weight: var(--fw-semibold);
}

.article-text code {
  font-family: var(--ff-mono);
  font-size: 0.875em;
  padding: 0.125rem 0.375rem;
  border-radius: var(--r-sm);
  background: var(--c-primary-100);
  color: var(--c-primary-600);
}

.article-text pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.article-right {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  width: 260px;
}

.side-box {
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  border: 1px solid var(--c-border-main);
  background: var(--c-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.side-box-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--c-text-main);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  letter-spacing: 0.02em;
}

.side-box-title i {
  color: var(--c-primary-400);
  font-size: var(--fs-xs);
}

.side-toc {
  max-height: 320px;
  overflow-y: auto;
}

.side-toc nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-toc nav a {
  display: block;
  padding: 0.3rem 0.5rem;
  color: var(--c-text-muted);
  font-size: var(--fs-xs);
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
  line-height: 1.5;
}

.side-toc nav a:hover,
.side-toc nav .active {
  color: var(--c-primary-500);
  background: var(--c-primary-100);
}

.side-toc nav ul ul { padding-left: var(--sp-3); }

.side-info p {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--c-text-subtle);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--c-border-light);
}

.side-info p:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.side-info span:last-child {
  color: var(--c-text-main);
  font-weight: var(--fw-medium);
}

.side-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
}

.side-tags a {
  padding: 0.2rem 0.6rem;
  background: var(--c-primary-100);
  color: var(--c-primary-500);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  transition: all var(--t-fast);
}

.side-tags a:hover {
  background: var(--grad-primary);
  color: #fff;
}

.article-footer {
  padding: var(--sp-8) 0;
}

/* Post footer nav */
.post-footer-nav {
  margin-top: var(--sp-10);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--c-border-main);
}

.post-footer-flex {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.nav-card {
  flex: 1;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-xl);
  border: 1px solid var(--c-border-main);
  background: var(--c-surface-glass);
  backdrop-filter: blur(16px);
  text-decoration: none;
  transition: all var(--t-base);
}

.nav-card:hover {
  border-color: var(--c-primary-300);
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.nav-prev { order: 1; }
.nav-rel { order: 2; }
.nav-next { order: 3; }

.nav-card-label {
  font-size: var(--fs-xs);
  color: var(--c-text-subtle);
  white-space: nowrap;
}

.nav-card-title {
  font-size: var(--fs-sm);
  color: var(--c-text-main);
  font-weight: var(--fw-medium);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.nav-prev { text-align: left; }
.nav-next { text-align: right; }

.nav-rel {
  align-items: center;
  flex-direction: row;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
}

.nav-rel-img {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--grad-soft);
}

.nav-rel-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-rel .nav-card-title {
  -webkit-line-clamp: 1;
}

/* Tools page */
.tools-section { margin: var(--sp-8) 0; }

.tools-category { margin-bottom: var(--sp-12); }

.category-header {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--c-border-main);
}

.category-header .category-icon {
  width: 56px;
  height: 56px;
  background: var(--grad-primary);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--fs-xl);
  flex-shrink: 0;
}

.category-info { flex: 1; }

.category-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--c-text-main);
  margin-bottom: var(--sp-1);
}

.category-description {
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  margin: 0;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-5);
}

.tool-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--c-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--c-border-main);
  border-radius: var(--r-lg);
  text-decoration: none;
  transition: all var(--t-base) var(--ease-slow);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-fluid);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-primary-300);
}

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

.tool-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-primary-100);
  border-radius: var(--r-md);
  flex-shrink: 0;
  overflow: hidden;
}

.tool-icon i {
  font-size: var(--fs-xl);
  color: var(--c-primary-500);
}

.tool-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.tool-content { flex: 1; min-width: 0; }

.tool-name {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--c-text-main);
  margin-bottom: var(--sp-1);
}

.tool-description {
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-arrow {
  color: var(--c-text-subtle);
  font-size: var(--fs-sm);
  opacity: 0;
  transform: translateX(-4px);
  transition: all var(--t-fast) var(--ease-fluid);
}

.tool-card:hover .tool-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--c-primary-400);
}

@media (max-width: 576px) {
  .category-header {
    flex-direction: column;
    text-align: center;
  }

  .tools-grid { grid-template-columns: 1fr; }

  .tool-card {
    flex-direction: column;
    text-align: center;
  }

  .tool-arrow { display: none; }
}
.card-anime-decoration {
  position: relative;
  overflow: hidden;
}

.card-anime-decoration::before {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(45deg,
    transparent 42%,
    rgba(250, 224, 236, 0.06) 46%,
    rgba(250, 224, 236, 0.12) 50%,
    rgba(250, 224, 236, 0.06) 54%,
    transparent 58%
  );
  animation: cardShine 8s ease-in-out infinite;
  pointer-events: none;
  will-change: transform;
}

@keyframes cardShine {
  0% { transform: translateX(-50%) translateY(-50%) rotate(45deg); }
  50% { transform: translateX(20%) translateY(20%) rotate(45deg); }
  100% { transform: translateX(-50%) translateY(-50%) rotate(45deg); }
}

.title-anime {
  position: relative;
  display: inline-block;
}

.title-anime::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--grad-primary);
  border-radius: var(--r-full);
  opacity: 0.7;
}

.divider-anime {
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--c-primary-300) 20%,
    var(--c-secondary-300) 50%,
    var(--c-accent-200) 80%,
    transparent 100%);
  border: none;
  margin: var(--sp-10) 0;
  position: relative;
  opacity: 0.8;
}

.divider-anime::before {
  content: '\2740';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--c-bg-main);
  padding: 0 var(--sp-5);
  color: var(--c-primary-400);
  font-size: var(--fs-md);
  line-height: 1;
}

.floating-element {
  position: absolute;
  width: 48px;
  height: 48px;
  background: var(--c-primary-400);
  border-radius: var(--r-full);
  opacity: 0.04;
  filter: blur(16px);
  animation: floatAround 40s linear infinite;
  pointer-events: none;
  will-change: transform;
  transform: translateZ(0);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--grad-primary);
  z-index: 1001;
  transform-origin: left;
  transform: scaleX(0);
  will-change: transform;
  box-shadow: 0 0 12px rgba(232, 160, 191, 0.35);
}

/* Keyframes */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes scaleInCenter {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

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

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Animation utilities */
.animate-fade-in {
  animation: fadeIn var(--t-base) var(--ease-slow) forwards;
  will-change: opacity;
}

.animate-fade-in-up {
  animation: fadeInUp var(--t-base) var(--ease-slow) forwards;
  will-change: opacity, transform;
}

.animate-fade-in-down {
  animation: fadeInDown var(--t-base) var(--ease-slow) forwards;
  will-change: opacity, transform;
}

.animate-scale-in {
  animation: scaleIn var(--t-base) var(--ease-slow) forwards;
  will-change: opacity, transform;
}

.animate-bounce {
  animation: bounce 2s var(--ease-fluid) infinite;
  will-change: transform;
}

.animate-float {
  animation: float 3s var(--ease-fluid) infinite;
  will-change: transform;
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .sakura, .star, .light-particle, .floating-element, #effects-canvas {
    animation: none;
    display: none;
  }
}

/* Click star effect */
.click-star {
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  animation: clickStarPop 0.6s ease-out forwards;
}

.click-star i {
  color: #FFD700;
  font-size: 20px;
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.8));
}

@keyframes clickStarPop {
  0% { opacity: 1; transform: scale(0.5) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
  100% { opacity: 0; transform: scale(0.8) rotate(360deg) translateY(-30px); }
}

/* Effects canvas */
#effects-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* Image lightbox */
.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: transparent;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base) var(--ease-fluid), visibility var(--t-base);
}

.img-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.img-lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--r-lg);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform var(--t-base) var(--ease-spring);
  cursor: default;
}

.img-lightbox.active img { transform: scale(1); }

.img-lightbox-close {
  position: absolute;
  top: var(--sp-6);
  right: var(--sp-6);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-radius: var(--r-full);
  font-size: var(--fs-lg);
  cursor: pointer;
  border: none;
  transition: all var(--t-fast) var(--ease-fluid);
}

.img-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}
.search-component { width: 100%; }

.search-form {
  margin-bottom: var(--sp-6);
  position: relative;
}

.search-input-group {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.search-input {
  flex: 1;
  padding: var(--sp-3) var(--sp-6);
  border: 2px solid var(--c-border-main);
  border-radius: var(--r-lg) 0 0 var(--r-lg);
  font-size: 1rem;
  background: var(--c-surface-main);
  color: var(--c-text-main);
  transition: border-color var(--t-base) var(--ease-fluid);
}

.search-input:focus {
  outline: none;
  border-color: var(--c-primary-400);
}

.search-input::placeholder { color: var(--c-text-muted); }

.search-button {
  padding: var(--sp-3) var(--sp-5);
  background: var(--grad-primary);
  color: white;
  border: none;
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  cursor: pointer;
  transition: transform var(--t-base) var(--ease-fluid), box-shadow var(--t-base) var(--ease-fluid);
}

.search-button:hover,
.search-button:focus {
  transform: scale(1.02);
  box-shadow: var(--shadow-glow);
}

.search-results {
  background: var(--c-bg-subtle);
  border: 1px solid var(--c-border-main);
  border-radius: var(--r-lg);
  max-height: 50vh;
  overflow-y: auto;
  margin-top: var(--sp-3);
  display: none;
}

.search-results:not(:empty) { display: block; }

.search-results-header {
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--c-border-main);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  background: var(--c-bg-subtle);
}

.search-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.search-result-item {
  border-bottom: 1px solid var(--c-border-light);
}

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

.search-result-link {
  display: block;
  padding: var(--sp-4) var(--sp-5);
  text-decoration: none;
  color: inherit;
  transition: background-color var(--t-fast) var(--ease-fluid);
}

.search-result-link:hover,
.search-result-link:focus {
  background-color: var(--c-primary-100);
}

.search-result-title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-base);
  color: var(--c-primary-500);
  font-weight: var(--fw-semibold);
}

.search-result-excerpt {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-meta {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--c-text-subtle);
}

.search-result-date { flex-shrink: 0; }

.search-result-tags {
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 50%;
}

.search-highlight {
  background-color: var(--c-primary-200);
  color: var(--c-primary-700);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: var(--fw-medium);
}

.search-no-results,
.search-error,
.search-disabled {
  padding: var(--sp-8);
  text-align: center;
  color: var(--c-text-muted);
  background: var(--c-bg-subtle);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border-light);
  margin-top: var(--sp-4);
}

.search-error {
  background: var(--c-accent-100);
  border-color: var(--c-accent-300);
  color: var(--c-text-main);
}

.search-error i {
  color: var(--c-accent-500);
  margin-right: var(--sp-2);
}

.search-error-hint {
  font-size: var(--fs-sm);
  margin-top: var(--sp-2);
  opacity: 0.8;
}

/* Search modal */
.search-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-fluid);
}

.search-modal-overlay.active {
  display: block;
  opacity: 1;
}

.search-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  background: var(--c-surface-main);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  transition: all var(--t-base) var(--ease-fluid);
}

.search-modal.active {
  display: flex;
  flex-direction: column;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.search-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--c-border-main);
  flex-shrink: 0;
}

.search-modal-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--c-text-main);
  margin: 0;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.search-modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-primary-100);
  color: var(--c-text-muted);
  border: none;
  border-radius: var(--r-full);
  cursor: pointer;
  font-size: var(--fs-base);
  transition: all var(--t-fast) var(--ease-fluid);
}

.search-modal-close:hover {
  background: var(--grad-primary);
  color: white;
}

.search-modal-body {
  flex: 1;
  padding: var(--sp-5) var(--sp-6);
  overflow-y: auto;
}

@media (max-width: 576px) {
  .search-input-group { flex-direction: column; }

  .search-input {
    border-radius: var(--r-lg);
    margin-bottom: var(--sp-2);
  }

  .search-button {
    border-radius: var(--r-lg);
    padding: var(--sp-3);
  }

  .search-modal {
    width: 95%;
    max-height: 85vh;
  }

  .search-modal-header,
  .search-modal-body { padding: var(--sp-4); }
}
/* ===== Light mode overrides ===== */
[data-theme="light"] .card,
[data-theme="light"] .post-card,
[data-theme="light"] .sidebar-card,
[data-theme="light"] .skill-item {
  border: 1px solid var(--c-border-main);
  box-shadow: var(--shadow-subtle);
}

[data-theme="light"] .card:hover,
[data-theme="light"] .post-card:hover,
[data-theme="light"] .sidebar-card:hover {
  border-color: var(--c-primary-300);
  box-shadow: var(--shadow-medium);
}

[data-theme="light"] .skill-bar { background: var(--c-primary-100); }
[data-theme="light"] .skill-progress { background: var(--grad-primary); }
[data-theme="light"] .btn-primary { background: var(--grad-primary); }

[data-theme="light"] .btn-primary:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

[data-theme="light"] .btn-outline { border: 2px solid var(--c-primary-400); }

[data-theme="light"] .btn-outline:hover {
  background: var(--grad-primary);
  border-color: transparent;
  color: var(--c-surface-main);
}

[data-theme="light"] .post-tag,
[data-theme="light"] .article-tag,
[data-theme="light"] .cloud-tag {
  background: var(--c-primary-100);
  border: 1px solid var(--c-primary-200);
}

[data-theme="light"] .post-tag:hover,
[data-theme="light"] .article-tag:hover,
[data-theme="light"] .cloud-tag:hover {
  background: var(--grad-primary);
  border-color: transparent;
  color: var(--c-surface-main);
}

[data-theme="light"] .site-header {
  background: var(--c-surface-glass);
  border-bottom: 1px solid var(--c-border-main);
}

[data-theme="light"] .site-header.scrolled {
  background: var(--c-surface-main);
  box-shadow: var(--shadow-medium);
}

[data-theme="light"] .nav-link { color: var(--c-text-muted); }

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
  color: var(--c-primary-500) !important;
  background: var(--c-hover);
}

[data-theme="light"] .site-footer {
  background: var(--c-surface-main);
  border-top: 1px solid var(--c-border-main);
}

[data-theme="light"] .social-link { background: var(--c-primary-100); }

[data-theme="light"] .social-link:hover {
  background: var(--grad-primary);
  transform: translateY(-2px);
}

[data-theme="light"] .section-title::after { background: var(--grad-primary); }

[data-theme="light"] .page-link {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border-main);
}

[data-theme="light"] .page-link:hover { background: var(--c-primary-100); }

[data-theme="light"] .page-link.current {
  background: var(--grad-primary);
  color: var(--c-surface-main);
}

[data-theme="light"] .scroll-btn {
  background: var(--c-surface-main);
  border: 1px solid var(--c-border-main);
}

[data-theme="light"] .scroll-btn:hover { background: var(--grad-primary); }

[data-theme="light"] .link-card {
  background: var(--c-surface-main);
  border: 1px solid var(--c-border-main);
}

[data-theme="light"] .link-card:hover {
  border-color: var(--c-primary-400);
  box-shadow: var(--shadow-lg);
}

[data-theme="light"] .link-avatar { border: 3px solid var(--c-primary-200); }
[data-theme="light"] .intro-card { background: var(--c-surface-main); }

[data-theme="light"] .intro-quote {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(232, 146, 124, 0.15);
  border-left: 3px solid var(--c-primary-400);
}

[data-theme="light"] .stat-item {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(232, 146, 124, 0.15);
}

[data-theme="light"] .stat-number {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .philosophy-item {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-primary-200);
}

[data-theme="light"] .philosophy-item:hover { box-shadow: var(--shadow-medium); }

[data-theme="light"] .category-item {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-primary-200);
}

[data-theme="light"] .timeline-content {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-primary-100);
}

[data-theme="light"] .contact-method {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-primary-200);
}

[data-theme="light"] .site-info {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-primary-200);
}

[data-theme="light"] .click-star i { color: var(--c-gold-500); }
[data-theme="light"] ::selection { background: var(--c-selection); }

/* ===== Dark mode overrides ===== */
[data-theme="dark"] .card,
[data-theme="dark"] .post-card,
[data-theme="dark"] .sidebar-card,
[data-theme="dark"] .skill-item {
  border: 1px solid var(--c-border-main);
  box-shadow: var(--shadow-subtle);
}

[data-theme="dark"] .card:hover,
[data-theme="dark"] .post-card:hover,
[data-theme="dark"] .sidebar-card:hover {
  border-color: var(--c-primary-500);
  box-shadow: var(--shadow-medium);
}

[data-theme="dark"] .skill-bar { background: var(--c-primary-200); }
[data-theme="dark"] .skill-progress { background: var(--grad-primary); }
[data-theme="dark"] .btn-primary { background: var(--grad-primary); }

[data-theme="dark"] .btn-primary:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

[data-theme="dark"] .btn-outline { border: 2px solid var(--c-primary-500); }

[data-theme="dark"] .btn-outline:hover {
  background: var(--grad-primary);
  border-color: transparent;
  color: var(--c-surface-main);
}

[data-theme="dark"] .post-tag,
[data-theme="dark"] .article-tag,
[data-theme="dark"] .cloud-tag {
  background: var(--c-primary-200);
  border: 1px solid var(--c-primary-300);
}

[data-theme="dark"] .post-tag:hover,
[data-theme="dark"] .article-tag:hover,
[data-theme="dark"] .cloud-tag:hover {
  background: var(--grad-primary);
  border-color: transparent;
  color: var(--c-surface-main);
}

[data-theme="dark"] .site-header {
  background: var(--c-surface-glass);
  border-bottom: 1px solid var(--c-border-main);
}

[data-theme="dark"] .site-header.scrolled {
  background: var(--c-surface-main);
  box-shadow: var(--shadow-medium);
}

[data-theme="dark"] .nav-link { color: var(--c-text-muted); }

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
  color: var(--c-primary-500) !important;
  background: var(--c-hover);
}

[data-theme="dark"] .site-footer {
  background: var(--c-surface-main);
  border-top: 1px solid var(--c-border-main);
}

[data-theme="dark"] .social-link { background: var(--c-primary-200); }

[data-theme="dark"] .social-link:hover {
  background: var(--grad-primary);
  transform: translateY(-2px);
}

[data-theme="dark"] .section-title::after { background: var(--grad-primary); }

[data-theme="dark"] .page-link {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border-main);
}

[data-theme="dark"] .page-link:hover { background: var(--c-primary-200); }

[data-theme="dark"] .page-link.current {
  background: var(--grad-primary);
  color: var(--c-surface-main);
}

[data-theme="dark"] .scroll-btn {
  background: var(--c-surface-main);
  border: 1px solid var(--c-border-main);
}

[data-theme="dark"] .scroll-btn:hover { background: var(--grad-primary); }

[data-theme="dark"] .link-card {
  background: var(--c-surface-main);
  border: 1px solid var(--c-border-main);
}

[data-theme="dark"] .link-card:hover {
  border-color: var(--c-primary-500);
  box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .link-avatar { border: 3px solid var(--c-primary-300); }
[data-theme="dark"] .intro-card { background: var(--c-surface-main); }

[data-theme="dark"] .intro-quote {
  background: var(--c-surface-alt);
  border-left: 3px solid var(--c-primary-500);
}

[data-theme="dark"] .stat-item {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-primary-300);
}

[data-theme="dark"] .stat-number {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .philosophy-item {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-primary-300);
}

[data-theme="dark"] .philosophy-item:hover { box-shadow: var(--shadow-medium); }

[data-theme="dark"] .category-item {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-primary-300);
}

[data-theme="dark"] .timeline-content {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-primary-200);
}

[data-theme="dark"] .contact-method {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-primary-300);
}

[data-theme="dark"] .site-info {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-primary-300);
}

[data-theme="dark"] .click-star i { color: var(--c-gold-500); }
[data-theme="dark"] ::selection { background: var(--c-selection); }

/* ===== Decorative particle styles (dark only) ===== */
[data-theme="dark"] .star {
  background: radial-gradient(circle, var(--c-text-main) 0%, var(--c-gold-500) 50%, transparent 100%);
  box-shadow: 0 0 8px var(--c-gold-400);
}

[data-theme="dark"] .light-particle {
  background: radial-gradient(circle, var(--c-secondary-200) 0%, var(--c-primary-300) 50%, var(--c-accent-200) 80%, transparent 100%);
}

[data-theme="dark"] .firefly {
  background: radial-gradient(circle, var(--c-accent-400) 0%, var(--c-accent-300) 50%, transparent 100%);
  box-shadow: 0 0 20px var(--c-accent-300);
}

/* ===== Dreamy background effects ===== */
[data-theme="light"] body::before,
[data-theme="dark"] body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
}

[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse at 20% 20%, var(--c-dreamy-1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, var(--c-dreamy-2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, var(--c-dreamy-3) 0%, transparent 60%);
  animation: dreamyPulse 15s ease-in-out infinite alternate;
}

@keyframes dreamyPulse {
  0% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.03); }
  100% { opacity: 0.5; transform: scale(1); }
}

[data-theme="dark"] body::before {
  background:
    radial-gradient(ellipse at 15% 15%, var(--c-dreamy-1) 0%, transparent 40%),
    radial-gradient(ellipse at 85% 85%, var(--c-dreamy-2) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, var(--c-dreamy-3) 0%, transparent 50%);
  animation: nebulaPulse 20s ease-in-out infinite alternate;
}

@keyframes nebulaPulse {
  0% { opacity: 0.4; filter: hue-rotate(0deg); }
  50% { opacity: 0.6; filter: hue-rotate(5deg); }
  100% { opacity: 0.4; filter: hue-rotate(0deg); }
}

/* ===== Card visual enhancement ===== */
[data-theme="light"] .card,
[data-theme="light"] .post-card,
[data-theme="light"] .sidebar-card {
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(232, 146, 124, 0.08);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

[data-theme="light"] .card:hover,
[data-theme="light"] .post-card:hover,
[data-theme="light"] .sidebar-card:hover {
  box-shadow: var(--shadow-card-hover), 0 0 0 1px rgba(232, 146, 124, 0.15), var(--shadow-card-glow);
}

[data-theme="dark"] .card,
[data-theme="dark"] .post-card,
[data-theme="dark"] .sidebar-card {
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(240, 168, 136, 0.12), inset 0 1px 0 rgba(237, 224, 216, 0.03);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

[data-theme="dark"] .card:hover,
[data-theme="dark"] .post-card:hover,
[data-theme="dark"] .sidebar-card:hover {
  box-shadow: var(--shadow-card-hover), 0 0 0 1px rgba(240, 168, 136, 0.2), var(--shadow-card-glow), inset 0 1px 0 rgba(237, 224, 216, 0.05);
}

/* ===== Hero effects ===== */
[data-theme="light"] .hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(232, 146, 124, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 70%, rgba(245, 204, 184, 0.05) 0%, transparent 50%);
  animation: softGlow 10s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes softGlow {
  0% { opacity: 0.3; }
  100% { opacity: 0.6; }
}

[data-theme="dark"] .hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(1px 1px at 10% 20%, var(--c-star-1) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 60%, var(--c-star-2) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 10%, var(--c-star-1) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 40%, var(--c-star-2) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 80%, var(--c-star-1) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 15% 75%, var(--c-star-3) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 85% 25%, var(--c-star-4) 0%, transparent 100%),
    radial-gradient(2px 2px at 45% 45%, var(--c-star-5) 0%, transparent 100%);
  animation: starTwinkle 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

/* ===== Nebula decorations (dark) ===== */
[data-theme="dark"] .floating-decorations::before,
[data-theme="dark"] .floating-decorations::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: nebulaFloat 25s ease-in-out infinite;
}

[data-theme="dark"] .floating-decorations::before {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--c-dreamy-1) 0%, transparent 70%);
  top: -10%; left: -10%;
  animation-delay: 0s;
}

[data-theme="dark"] .floating-decorations::after {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--c-dreamy-2) 0%, transparent 70%);
  bottom: -10%; right: -10%;
  animation-delay: -12s;
}

@keyframes nebulaFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.4; }
  33% { transform: translate(30px, -20px) rotate(5deg); opacity: 0.6; }
  66% { transform: translate(-20px, 30px) rotate(-5deg); opacity: 0.5; }
}

/* ===== Gradient text ===== */
[data-theme="light"] .hero-name {
  background: linear-gradient(135deg, #E8927C, #F0A888, #E8B870, #E8927C);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 8s ease infinite;
}

[data-theme="dark"] .hero-name {
  background: linear-gradient(135deg, #F0A890, #F5B898, #E8B870, #F0A890);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 8s ease infinite;
}

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

/* ===== Button shine effect (dark) ===== */
[data-theme="dark"] .btn-primary {
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.06) 50%, transparent 70%);
  animation: btnShine 4s ease-in-out infinite;
}

@keyframes btnShine {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

/* ===== Tag shine effect (dark) ===== */
[data-theme="dark"] .post-tag,
[data-theme="dark"] .cloud-tag {
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .post-tag::before,
[data-theme="dark"] .cloud-tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

[data-theme="dark"] .post-tag:hover::before,
[data-theme="dark"] .cloud-tag:hover::before { left: 100%; }
/* ===== Term tags grid responsive (4 columns max) ===== */
@media (min-width: 576px) {
  .term-posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .term-posts-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 992px) {
  .term-posts-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== About page responsive ===== */
@media (min-width: 576px) {
  .philosophy-grid { grid-template-columns: repeat(2, 1fr); }
  .intro-stats { grid-template-columns: repeat(4, 1fr); }
  .contact-methods { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .page-title { font-size: var(--fs-4xl); }
  .intro-card { padding: var(--sp-8); }

  .intro-content {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }

  .intro-text { flex: 1; }
  .intro-image { order: 2; }

  .intro-image img {
    width: 180px;
    height: 180px;
  }

  .intro-quote { max-width: 500px; }

  .content-card, .contact-card { padding: var(--sp-8); }

  .links-grid { grid-template-columns: repeat(2, 1fr); }

  .apply-card { padding: var(--sp-10) var(--sp-8); }

  .apply-content {
    flex-direction: row;
    gap: var(--sp-8);
  }

  .apply-info { flex: 3; }
  .apply-contact { flex: 2; }
  .apply-contact-methods { flex-direction: column; }

  .skills-categories { grid-template-columns: repeat(2, 1fr); }
  .skills-detailed-grid { grid-template-columns: repeat(2, 1fr); }

  .timeline {
    padding-left: 0;
    max-width: 700px;
    margin: var(--sp-10) auto 0;
  }

  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .timeline-item {
    width: 50%;
    padding-left: 0;
    margin-bottom: var(--sp-8);
  }

  .timeline-item:nth-child(odd) {
    padding-right: var(--sp-8);
    text-align: right;
  }

  .timeline-item:nth-child(even) {
    margin-left: 50%;
    padding-left: var(--sp-8);
  }

  .timeline-date {
    position: static;
    display: inline-block;
    margin-bottom: var(--sp-3);
  }

  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }

  .hero { min-height: 100vh; }

  .hero-inner {
    flex-direction: row;
    align-items: center;
    gap: var(--sp-12);
  }

  .hero-left {
    flex: 1;
    text-align: left;
  }

  .hero-content {
    max-width: none;
    text-align: left;
  }

  .hero-right {
    flex: 0 0 360px;
    max-width: 360px;
    margin: 0;
  }

  .hero-title {
    font-size: var(--fs-5xl);
    text-align: left;
  }

  .hero-description { text-align: left; }
  .hero-actions { justify-content: flex-start; }

  .about-card {
    flex-direction: row;
    text-align: left;
    padding: var(--sp-12);
  }

  .about-content { order: 1; }
  .about-image-wrapper { order: 2; }
  .about-description {
    margin-left: 0;
    margin-right: 0;
  }

  .about-cta { text-align: left; }

  .article-header { min-height: 350px; }
  .article-h1 { font-size: var(--fs-3xl); }

  .article-body-wrap { flex-direction: row; }

  .article-right {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-h) + var(--sp-4));
    align-self: flex-start;
    max-height: calc(100vh - var(--header-h) - var(--sp-8));
    overflow-y: auto;
  }

  .article-text { padding: var(--sp-8); }

  .posts-layout {
    flex-direction: row;
    gap: var(--sp-8);
  }

  .posts-main { flex: 1; min-width: 0; }

  .posts-sidebar {
    display: block;
    width: var(--sidebar-w);
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-h) + var(--sp-4));
    align-self: flex-start;
  }

  .post-item { flex-direction: row; }

  .post-item-image {
    width: 280px;
    height: auto;
    min-height: 200px;
  }

  .post-item-content { padding: 2rem 2rem 2.25rem; }

  .post-item.reverse { flex-direction: row-reverse; }
}

@media (min-width: 992px) {
  .intro-image img {
    width: 200px;
    height: 200px;
  }

  .philosophy-grid { grid-template-columns: repeat(4, 1fr); }
  .philosophy-item { padding: var(--sp-8); }

  .links-grid { grid-template-columns: repeat(3, 1fr); }

  .skills-categories { grid-template-columns: repeat(4, 1fr); }
  .skills-detailed-grid { grid-template-columns: repeat(3, 1fr); }

  .posts-grid { grid-template-columns: repeat(3, 1fr); }
  .skills-grid { grid-template-columns: repeat(3, 1fr); }

  .hero-title { font-size: 64px; }
  .hero-description { font-size: var(--fs-lg); }
  .quote-text { font-size: var(--fs-2xl); }
}

@media (max-width: 767px) {
  .timeline::before { left: 11px; }
  .timeline-item { padding-left: var(--sp-8); }
  .timeline-date {
    position: absolute;
    left: -4px;
  }
}

@media (max-width: 480px) {
  .link-card { text-align: left; }
  .link-meta { justify-content: flex-start; }
}
