/* Amethyst Theme - Paris Olympics Inspired */
:root {
  /* Paris Olympics 2024 inspired palette */
  --brand: #623c94; /* Paris Olympics purple */
  --brand-strong: #8b5cf6; /* Vibrant purple */
  --brand-light: #a78bfa; /* Light purple */
  --accent-gold: #f59e0b; /* Gold accent */
  --accent-pink: #ec4899; /* Pink accent */
  
  /* Backgrounds and surfaces */
  --bg: #faf9fb;
  --bg-secondary: #f3f1f7;
  --bg-elevated: rgba(255, 255, 255, 0.92);
  --bg-overlay: rgba(255, 255, 255, 0.85);
  
  /* Text hierarchy */
  --text: #1a1523;
  --text-secondary: #4a4458;
  --muted: #6b6478;
  --text-light: #9690a4;
  
  /* Borders and UI elements */
  --border: rgba(98, 60, 148, 0.12);
  --border-light: rgba(98, 60, 148, 0.06);
  --border-strong: rgba(98, 60, 148, 0.24);
  
  /* Code blocks */
  --code-bg: rgba(98, 60, 148, 0.04);
  --code-border: rgba(98, 60, 148, 0.08);
  
  /* Shadows and effects */
  --shadow-sm: 0 2px 8px rgba(98, 60, 148, 0.08);
  --shadow: 0 8px 24px rgba(98, 60, 148, 0.12);
  --shadow-lg: 0 16px 48px rgba(98, 60, 148, 0.16);
  --shadow-xl: 0 24px 64px rgba(98, 60, 148, 0.2);
  
  /* Glass morphism */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(98, 60, 148, 0.15);
  --glass-blur: 20px;
  
  /* Animations */
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Layout */
  --footer-h: 80px;
  --header-h: 72px;
  --border-radius: 16px;
  --border-radius-sm: 12px;
  --border-radius-lg: 24px;
}

[data-theme="dark"] {
  /* Premium dark mode */
  --brand: #8b5cf6;
  --brand-strong: #a78bfa;
  --brand-light: #c4b5fd;
  --accent-gold: #fbbf24;
  --accent-pink: #f472b6;
  
  --bg: #0a0712;
  --bg-secondary: #110e1b;
  --bg-elevated: rgba(17, 14, 27, 0.92);
  --bg-overlay: rgba(24, 20, 36, 0.85);
  
  --text: #f7f5ff;
  --text-secondary: #e0dced;
  --muted: #a29bb3;
  --text-light: #7e7691;
  
  --border: rgba(139, 92, 246, 0.2);
  --border-light: rgba(139, 92, 246, 0.1);
  --border-strong: rgba(139, 92, 246, 0.3);
  
  --code-bg: rgba(139, 92, 246, 0.08);
  --code-border: rgba(139, 92, 246, 0.15);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.8);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.9);
  
  --glass-bg: rgba(17, 14, 27, 0.72);
  --glass-border: rgba(139, 92, 246, 0.25);
}

* { box-sizing: border-box; }

/* Premium typography setup */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Spectral:wght@400;500;600;700&display=swap');

html { 
  height: 100%;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  height: 100%;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: 'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

/* Premium gradient background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 1600px 800px at 20% -40%, rgba(98, 60, 148, 0.15), transparent),
    radial-gradient(ellipse 1400px 700px at 80% -30%, rgba(139, 92, 246, 0.12), transparent),
    radial-gradient(ellipse 1200px 600px at 10% 120%, rgba(236, 72, 153, 0.08), transparent),
    radial-gradient(ellipse 1000px 500px at 90% 110%, rgba(245, 158, 11, 0.06), transparent);
  pointer-events: none;
  z-index: -1;
}

[data-theme="dark"] body::before {
  background: 
    radial-gradient(ellipse 1600px 800px at 20% -40%, rgba(139, 92, 246, 0.12), transparent),
    radial-gradient(ellipse 1400px 700px at 80% -30%, rgba(167, 139, 250, 0.08), transparent),
    radial-gradient(ellipse 1200px 600px at 10% 120%, rgba(244, 114, 182, 0.06), transparent),
    radial-gradient(ellipse 1000px 500px at 90% 110%, rgba(251, 191, 36, 0.04), transparent);
}

/* Links color tuning */
.post-content a, .page-content a { color: var(--brand-strong); }
.post-content a:hover, .page-content a:hover { text-decoration: underline; }
[data-theme="dark"] .post-content a,
[data-theme="dark"] .page-content a { color: #c7b6ff; }
[data-theme="dark"] .post-content a:hover,
[data-theme="dark"] .page-content a:hover { color: #d9cfff; }

.container {
  width: 100%;
  max-width: min(1200px, 80vw);
  padding: 0 20px;
  margin: 0 auto;
}

/* Header - Premium glass morphism */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--transition-base);
  height: var(--header-h);
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(98, 60, 148, 0.02) 0%, 
    rgba(139, 92, 246, 0.02) 100%);
  pointer-events: none;
}

.header-inner { 
  display: flex; 
  align-items: center; 
  height: 100%;
  padding: 0 20px;
  position: relative;
}

.brand { 
  display: inline-flex; 
  align-items: center; 
  gap: 14px; 
  text-decoration: none; 
  color: var(--text); 
  font-weight: 600; 
  font-size: 18px;
  transition: all var(--transition-fast);
  position: relative;
}

.brand:hover {
  transform: translateX(2px);
}

/* Premium icon styling */
.brand-icon { 
  width: 28px; 
  height: 28px; 
  border-radius: 10px; 
  object-fit: cover; 
  box-shadow: 0 4px 12px rgba(98, 60, 148, 0.2);
  transition: all var(--transition-base);
}

.brand:hover .brand-icon {
  transform: rotate(-5deg) scale(1.05);
  box-shadow: 0 6px 16px rgba(98, 60, 148, 0.3);
}

.brand-text { 
  letter-spacing: -0.02em;
  font-weight: 700;
}

/* Navigation */
.nav { 
  margin-left: auto; 
  display: none; 
  gap: 8px; 
  align-items: center; 
  justify-content: flex-end; 
}

.nav-link { 
  color: var(--text-secondary); 
  text-decoration: none; 
  font-weight: 500; 
  padding: 10px 16px; 
  border-radius: var(--border-radius-sm); 
  font-size: 15px;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.nav-link:hover { 
  color: var(--text);
  transform: translateY(-1px);
}

.nav-link:hover::before {
  opacity: 0.08;
}

.nav-link.active { 
  color: var(--brand);
  background: rgba(98, 60, 148, 0.08);
  font-weight: 600;
}

/* Theme toggle button */
.color-toggle { 
  margin-left: 16px; 
  width: 42px; 
  height: 42px; 
  border-radius: 14px; 
  border: 1px solid var(--glass-border); 
  background: var(--glass-bg); 
  display: inline-grid; 
  place-items: center; 
  cursor: pointer; 
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.color-toggle:hover { 
  transform: scale(1.05);
  box-shadow: var(--shadow);
  border-color: var(--brand);
}

.color-toggle:active {
  transform: scale(0.95);
}

.color-toggle svg { 
  fill: var(--text); 
  stroke: var(--text); 
  stroke-width: 0;
  transition: all var(--transition-fast);
}

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

@media (min-width: 800px) { .nav { display: flex; } }

/* Mobile custom nav dropdown (only <800px) */
.nav-dd { margin-left: auto; margin-right: 8px; display: inline-flex; align-items: center; position: relative; }
.nav-dd-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 0; background: transparent; border: 0; color: var(--text); font-weight: 500; font-size: 16px; cursor: pointer; }
.nav-dd-caret { transition: transform .15s ease; }
.nav-dd.open .nav-dd-caret { transform: rotate(180deg); }
.nav-dd-menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 1001; min-width: 160px; border-radius: 10px; border: 1px solid var(--glass-border); background: var(--bg-elevated); backdrop-filter: blur(14px) saturate(160%); box-shadow: var(--shadow); display: none; overflow: hidden; }
.nav-dd.open .nav-dd-menu { display: block; }
.nav-dd-item { display: block; padding: 10px 12px; color: var(--text); text-decoration: none; font-size: 16px; }
.nav-dd-item:hover { background: color-mix(in srgb, var(--brand) 10%, var(--bg)); }
.nav-dd-item.active { font-weight: 700; }
@media (min-width: 800px) { .nav-dd { display: none; } }

/* Mobile: title text hidden, keep only icon */
@media (max-width: 799px) { .brand-text { display: none !important; } }

/* Hero - Premium design */
.hero {
  position: relative;
  padding: 100px 0 60px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 1000px 600px at 20% -20%, rgba(98, 60, 148, 0.12), transparent),
    radial-gradient(ellipse 800px 500px at 80% -10%, rgba(236, 72, 153, 0.08), transparent),
    linear-gradient(180deg, transparent 0%, var(--bg) 100%);
  pointer-events: none;
}

/* Animated gradient orbs */
.hero::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-gold), transparent 70%);
  opacity: 0.05;
  top: -300px;
  right: -300px;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-50px, 50px) scale(1.1); }
  66% { transform: translate(50px, -30px) scale(0.9); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title { 
  font-family: 'Spectral', ui-serif, Georgia, serif; 
  font-size: clamp(42px, 7vw, 72px); 
  line-height: 1.1; 
  margin: 0; 
  letter-spacing: -0.03em;
  font-weight: 700;
  /* Boost contrast between the two hues on homepage */
  background: linear-gradient(135deg, #121016 0%, var(--brand-strong) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle { 
  margin: 20px 0 0; 
  font-size: clamp(18px, 2.5vw, 22px); 
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.6;
}

[data-theme="dark"] .hero-title {
  /* In dark mode, go brighter and punchier for separation */
  background: linear-gradient(135deg, #ffffff 0%, color-mix(in srgb, var(--brand-strong) 90%, #000) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Grid */
.grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Keep max 3 columns on wide screens to avoid cramped cards */
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Post Card - Premium glass design */
.post-card { 
  position: relative; 
  overflow: hidden; 
  border: 1px solid var(--glass-border); 
  border-radius: var(--border-radius-lg); 
  background: var(--glass-bg); 
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  box-shadow: var(--shadow); 
  transition: all var(--transition-base);
  transform-style: preserve-3d;
  will-change: transform;
}

.post-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(98, 60, 148, 0.02) 0%, 
    rgba(236, 72, 153, 0.02) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.post-card:hover { 
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: var(--brand);
}

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

.post-card-link { 
  display: grid; 
  grid-template-rows: 200px auto; 
  color: inherit; 
  text-decoration: none;
  height: 100%;
}

.post-card-link.no-media { 
  display: block; 
  grid-template-rows: none;
}

/* Media section with gradient overlay */
.post-card-media { 
  position: relative; 
  background: var(--bg-secondary);
  overflow: hidden;
}

.post-card-media::before { 
  content: ""; 
  position: absolute; 
  inset: 0; 
  background-image: var(--cover); 
  background-size: cover; 
  background-position: center; 
  filter: saturate(1.1) contrast(1.05);
  transition: all var(--transition-base);
}

.post-card:hover .post-card-media::before {
  transform: scale(1.05);
  filter: saturate(1.2) contrast(1.1);
}

.post-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
}

.post-card-fallback { 
  position: absolute; 
  inset: 0; 
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  opacity: 0.1;
}

/* Content section */
.post-card-content { 
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-card-title { 
  margin: 0; 
  font-size: 21px; 
  line-height: 1.3; 
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--text);
  display: -webkit-box; 
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical; 
  overflow: hidden;
  transition: color var(--transition-fast);
}

.post-card:hover .post-card-title {
  color: var(--brand);
}

.post-card-meta { 
  color: var(--text-light); 
  font-size: 14px; 
  display: flex; 
  align-items: center; 
  gap: 10px;
  font-weight: 500;
}

.post-card-meta .dot { 
  width: 4px;
  height: 4px;
  background: var(--text-light);
  border-radius: 50%;
  opacity: 0.5;
}

.post-card-excerpt { 
  color: var(--text-secondary); 
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  display: -webkit-box; 
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical; 
  overflow: hidden;
}

/* Pin badge - Premium style */
.pin-badge { 
  position: absolute; 
  top: 16px; 
  left: 16px; 
  z-index: 10; 
  display: inline-grid; 
  place-items: center; 
  width: 32px; 
  height: 32px; 
  border-radius: 999px; 
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff; 
  box-shadow: 0 4px 16px rgba(98, 60, 148, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
  font-size: 16px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 16px rgba(98, 60, 148, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 6px 20px rgba(98, 60, 148, 0.5); }
}

[data-theme="dark"] .pin-badge { 
  background: linear-gradient(135deg, var(--brand-strong), var(--accent-gold));
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.5);
}

/* Post */
.post-header { padding-top: 40px; padding-bottom: 10px; }
.post-title { font-family: Spectral, ui-serif, Georgia, serif; font-size: clamp(30px, 5vw, 44px); margin: 0 0 4px; letter-spacing: -0.02em; }
.post-meta { color: var(--muted); }
.post-meta a { color: inherit; text-decoration: none; }
.post-meta a:hover { text-decoration: underline; }
.post-cover img { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
.post-content { max-width: 760px; }
.post-content img { max-width: 100%; height: auto; border-radius: 12px; }
.post-content h2, .post-content h3, .post-content h4 { font-family: Spectral, ui-serif, Georgia, serif; letter-spacing: -0.01em; }
.post-content h2 { margin-top: 2.2em; margin-bottom: 0.4em; font-size: 1.8em; }
.post-content h3 { margin-top: 1.8em; margin-bottom: 0.4em; font-size: 1.4em; }
.post-content p { margin: 1em 0; }
.post-content blockquote { margin: 1.2em 0; padding: 14px 18px; background: color-mix(in srgb, var(--brand) 8%, var(--bg)); border-left: 4px solid var(--brand-strong); border-radius: 10px; color: var(--text); }
.post-content code { background: var(--code-bg); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: .95em; }
.post-content pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; overflow: auto; box-shadow: var(--shadow); }
.post-tags { margin: 28px auto 6px; max-width: 760px; }
.post-tags .tag { display: inline-block; margin-right: 8px; margin-bottom: 8px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--glass-border); background: color-mix(in srgb, var(--brand) 6%, transparent); color: var(--text); text-decoration: none; }
.post-tags .tag:hover { border-color: color-mix(in srgb, var(--brand-strong) 40%, var(--border)); color: var(--text); }
.post-pager { margin: 36px auto 60px; display: flex; justify-content: space-between; gap: 16px; max-width: 760px; }
.post-pager a, .post-pager span { flex: 1; text-decoration: none; color: var(--text); border: 1px solid var(--glass-border); background: var(--glass-bg); backdrop-filter: blur(12px) saturate(160%); padding: 14px 16px; border-radius: 12px; box-shadow: var(--shadow); }
.post-pager a:hover { background: color-mix(in srgb, var(--brand) 10%, var(--bg-elevated)); }
.post-pager .disabled { color: var(--muted); }

/* Archive */
.archive-title { font-family: Spectral, ui-serif, Georgia, serif; margin: 40px 0 6px; font-size: 34px; }
.archive-year { margin: 24px 0 8px; font-size: 22px; color: var(--muted); }
.archive-item { display: flex; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.archive-item .archive-date { color: var(--muted); min-width: 120px; }
.archive-item .archive-link { color: var(--text); text-decoration: none; }
.archive-item .archive-link:hover { text-decoration: underline; }

/* Footer - Premium glass design */
.site-footer { 
  position: fixed; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  height: var(--footer-h); 
  border-top: 1px solid var(--glass-border); 
  background: var(--glass-bg); 
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  z-index: 800;
}

.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, 
    rgba(98, 60, 148, 0.03) 0%, 
    transparent 100%);
  pointer-events: none;
}

.footer-inner { 
  height: 100%; 
  padding: 0; 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 24px;
  position: relative;
}

.social { 
  display: flex; 
  gap: 12px; 
  align-items: center; 
}

.social-link { 
  display: inline-grid; 
  place-items: center; 
  width: 42px; 
  height: 42px; 
  border-radius: 12px; 
  border: 1px solid var(--glass-border); 
  color: var(--text); 
  background: var(--glass-bg); 
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.social-link:hover { 
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow);
  border-color: var(--brand);
}

.social-link:hover::before {
  opacity: 0.1;
}

.social-link svg { 
  fill: var(--text); 
  stroke: none;
  width: 20px;
  height: 20px;
  transition: all var(--transition-fast);
  position: relative;
  z-index: 1;
}

.social-link:hover svg {
  fill: var(--brand);
}

.copyright { 
  color: var(--text-light); 
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Code Blocks: toolbar, language label, copy button */
.post-content figure.highlight,
.page-content figure.highlight {
  position: relative;
  margin: 1.1em 0;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--code-bg);
  box-shadow: var(--shadow);
}
.post-content figure.highlight .code-toolbar,
.page-content figure.highlight .code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--glass-border);
  background: color-mix(in srgb, var(--brand) 4%, var(--bg));
}
.post-content figure.highlight .code-lang,
.page-content figure.highlight .code-lang {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.post-content figure.highlight .code-copy,
.page-content figure.highlight .code-copy {
  font-size: 12px;
  color: var(--text);
  background: color-mix(in srgb, var(--brand) 10%, var(--bg));
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
}
.post-content figure.highlight .code-copy:hover,
.page-content figure.highlight .code-copy:hover {
  background: color-mix(in srgb, var(--brand) 18%, var(--bg));
}
.post-content figure.highlight table,
.page-content figure.highlight table { width: 100%; border-collapse: collapse; }
.post-content figure.highlight td.gutter,
.page-content figure.highlight td.gutter { width: 1%; user-select: none; opacity: .6; border-right: 1px solid var(--glass-border); }
.post-content figure.highlight td.code,
.page-content figure.highlight td.code { width: 99%; }
.post-content figure.highlight pre,
.page-content figure.highlight pre { background: transparent; border: 0; border-radius: 0; box-shadow: none; margin: 0; padding: 12px 14px; }

/* Categories Drawer */
.cat-drawer {
  position: fixed;
  top: 64px; /* header height */
  left: 0;
  bottom: 0;
  width: 240px;
  background: var(--glass-bg);
  border-right: 1px solid var(--glass-border);
  backdrop-filter: blur(14px) saturate(160%);
  transform: translateX(-100%);
  transition: transform .25s ease;
  z-index: 900;
}
.cat-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 8px; border-bottom: 1px solid var(--glass-border); color: var(--muted); font-weight: 600; }
.cat-drawer-head .cat-title { padding-left: 4px; }
.cat-drawer-toggle { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--glass-border); background: color-mix(in srgb, var(--brand) 10%, var(--bg)); color: var(--text); border-radius: 8px; cursor: pointer; }
.filter-mode { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--glass-border); border-radius: 8px; padding: 2px; background: color-mix(in srgb, var(--brand) 6%, var(--bg)); }
.filter-mode .mode-btn { border: 0; background: transparent; color: var(--text); padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 12px; }
.filter-mode .mode-btn.active { background: color-mix(in srgb, var(--brand) 16%, var(--bg)); }
.cat-drawer-body { padding: 8px 6px; overflow: auto; height: calc(100% - 44px); }
.sel-list { list-style: none; margin: 0; padding: 0; }
.sel-list li { margin: 4px 0; }
.sel-list a { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--text); border: 1px solid transparent; }
.sel-list a:hover { background: color-mix(in srgb, var(--brand) 10%, var(--bg)); border-color: var(--glass-border); }
.sel-list .count { color: var(--muted); font-size: 12px; }
.sel-list .empty { color: var(--muted); padding: 6px 10px; }
.sel-list a.checked::before { content: '✓'; position: absolute; left: 6px; font-weight: 700; color: var(--brand-strong); }
.sel-list a.checked { padding-left: 22px; }
.tag-head { margin: 10px 6px 4px; font-size: 12px; color: var(--muted); }
.tag-list { margin-top: 4px; }

html.cat-open .cat-drawer { transform: translateX(0); }
/* Overlay drawer; do not shift main content */
/* (Intentional: keep content position stable when drawer opens) */

.cat-drawer-handle {
  position: fixed;
  left: 0; top: 74px; /* flush to edge */
  z-index: 901;
  width: 24px; height: 40px; /* match right handle */
  border-top-right-radius: 10px; border-bottom-right-radius: 10px;
  border: 1px solid var(--glass-border); border-left: 0;
  background: var(--glass-bg);
  color: var(--text);
  cursor: pointer;
  display: inline-grid; place-items: center;
}
html.cat-open .cat-drawer-handle { display: none; }

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

/* Filter mode contrast improvements */
.filter-mode { background: color-mix(in srgb, var(--brand) 6%, var(--bg)); }
.filter-mode .mode-btn { color: var(--text); border: 1px solid transparent; }
.filter-mode .mode-btn.active { background: color-mix(in srgb, var(--brand) 40%, var(--bg)); color: #fff; border-color: color-mix(in srgb, var(--brand) 50%, var(--bg)); }
[data-theme="dark"] .filter-mode { background: #101010; border-color: #2a2a2a; }
[data-theme="dark"] .filter-mode .mode-btn { color: #dcdcdc; }
[data-theme="dark"] .filter-mode .mode-btn.active { background: #5b3fd1; color: #fff; border-color: #7a67ff; }

/* Right Drawer (mirror) */
.info-drawer {
  position: fixed;
  top: 64px;
  right: 0;
  bottom: 0;
  width: 480px;
  background: var(--glass-bg);
  border-left: 1px solid var(--glass-border);
  backdrop-filter: blur(14px) saturate(160%);
  transform: translateX(100%);
  transition: transform .25s ease;
  z-index: 900;
}
html.info-open .info-drawer { transform: translateX(0); }

.info-drawer-handle {
  position: fixed;
  right: 0; top: 74px;
  z-index: 901;
  width: 24px; height: 40px;
  border-top-left-radius: 10px; border-bottom-left-radius: 10px;
  border: 1px solid var(--glass-border); border-right: 0;
  background: var(--glass-bg);
  color: var(--text);
  cursor: pointer;
  display: inline-grid; place-items: center;
}
html.info-open .info-drawer-handle { display: none; }

/* Right drawer close button: black bg, white icon */
.info-drawer-toggle {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text);
  cursor: pointer;
}
.info-drawer-toggle svg { stroke: currentColor; fill: none; }

/* Right drawer chat layout */
.info-drawer .cat-drawer-body {
  padding: 8px; /* override earlier */
  display: flex;
  flex-direction: column;
  height: calc(100% - 44px); /* subtract header (approx) */
  overflow: hidden; /* keep scroll within chat area */
}
.info-drawer .sidebar-section {
  display: flex;
  flex-direction: column;
  min-height: 0; /* enable child flex scroll */
  height: 100%;
}
.info-drawer .sidebar-title { margin-bottom: 8px; }
#site_chat {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto; /* scroll comments inside */
}

/* Disabled social links placeholder */
.social-link.disabled { opacity: .5; pointer-events: none; }

/* About card in sidebar */
.about-card { padding: 14px; border: 1px solid var(--glass-border); background: var(--glass-bg); border-radius: 12px; backdrop-filter: blur(12px) saturate(160%); text-align: center; }
.about-card .about-avatar { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; box-shadow: var(--shadow); }
.about-card .about-name { margin-top: 8px; font-weight: 700; }
.about-card .about-desc { margin-top: 6px; font-size: 13px; color: var(--muted); }
.about-card .about-social { margin-top: 10px; display: flex; justify-content: center; gap: 8px; }

/* Announcement box in sidebar */
.ann-box {
  margin-top: 8px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px) saturate(160%);
  /* Expand to fit content (no scrollbar) */
  max-height: none;
  overflow: visible;
  padding: 8px 10px;
}
.ann-box .updates-list { margin: 0; padding: 0; list-style: none; }
/* Stack date and title vertically with spacing */
.ann-box .updates-list .update-item { display: block; padding: 8px 0; border-bottom: 1px dashed var(--glass-border); }
.ann-box .updates-list .update-item:last-child { border-bottom: none; }
.ann-box .update-date { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; min-width: 0; }
.ann-box .update-content { display: block; margin-top: 4px; line-height: 1.4; }

/* Sidebar tag chips selected */
.chip.checked { background: color-mix(in srgb, var(--brand) 18%, var(--bg)); border-color: var(--glass-border); }
[data-theme="dark"] .chip.checked { background: #2a2a2a; border-color: #3a3a3a; }

/* Simple post list (no cover) */
.post-list { list-style: none; padding: 0; margin: 8px 0 24px; }
.post-list .post-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-bottom: 1px dashed var(--border); }
.post-list .post-link { color: var(--text); text-decoration: none; }
.post-list .post-link:hover { text-decoration: underline; }
.post-list .post-date { color: var(--muted); font-size: 13px; }

/* Personal sites block */
.sites { margin: 24px 0 8px; }
.sites-title { margin: 0 0 8px; font-size: 18px; color: var(--muted); }
.sites-links { display: flex; gap: 10px; flex-wrap: wrap; }
.site-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--glass-border); background: var(--glass-bg); color: var(--text); text-decoration: none; }
.site-link:hover { background: color-mix(in srgb, var(--brand) 10%, var(--bg)); }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 30px 0; }
.page-link { text-decoration: none; color: var(--text); border: 1px solid var(--glass-border); padding: 8px 12px; border-radius: 10px; background: var(--glass-bg); backdrop-filter: blur(10px) saturate(160%); box-shadow: var(--shadow); }
.page-link.disabled { color: var(--muted); opacity: .6; pointer-events: none; }
.page-number { color: var(--muted); }

/* Page */
.page-title { font-family: Spectral, ui-serif, Georgia, serif; font-size: clamp(28px, 4vw, 40px); margin: 28px 0 8px; }
.page-content { max-width: 760px; }

/* Utilities */
.site-main { min-height: 60vh; padding-bottom: var(--footer-h); }

/* Content + Sidebar - Premium layout */
.content-wrap { 
  display: grid; 
  grid-template-columns: 1fr; 
  gap: 32px; 
  align-items: start; 
  margin-top: 40px; 
}

@media (min-width: 980px) { 
  .content-wrap { grid-template-columns: 280px 1fr; } 
}

.no-sidebar .content-wrap { grid-template-columns: 1fr !important; }
.no-sidebar .content { width: 100%; }

.sidebar { display: none; }
@media (min-width: 980px) { .sidebar { display: block; } }

.sidebar-inner { 
  position: sticky; 
  top: calc(var(--header-h) + 24px);
  padding: 24px; 
  border-radius: var(--border-radius-lg); 
  border: 1px solid var(--glass-border); 
  background: var(--glass-bg); 
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
}

.sidebar-inner:hover {
  box-shadow: var(--shadow-xl);
  border-color: rgba(98, 60, 148, 0.2);
}

.sidebar-title { 
  font-weight: 700; 
  color: var(--text); 
  margin-bottom: 16px;
  font-size: 16px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: linear-gradient(to bottom, var(--brand), var(--brand-strong));
  border-radius: 2px;
}

.sidebar-section { 
  margin-bottom: 24px; 
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-empty { 
  color: var(--text-light); 
  font-size: 14px;
  padding: 16px;
  text-align: center;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-sm);
}

/* Chip tags */
.chip-list { 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
}

.chip { 
  display: inline-flex; 
  align-items: center; 
  gap: 8px; 
  padding: 8px 14px; 
  border-radius: 999px; 
  border: 1px solid var(--glass-border); 
  background: var(--glass-bg);
  color: var(--text); 
  text-decoration: none; 
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.chip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.chip:hover { 
  transform: scale(1.05);
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.chip:hover::before {
  opacity: 0.1;
}

.chip .chip-count { 
  color: var(--text-light); 
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 999px;
}

.chip.active { 
  background: var(--brand);
  color: white;
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(98, 60, 148, 0.3);
}

.chip.active .chip-count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* 404 */
.hero-404 { padding: 96px 0 24px; }
.card-404 { padding: 26px; border-radius: 16px; border: 1px solid var(--glass-border); background: var(--glass-bg); backdrop-filter: blur(14px) saturate(160%); box-shadow: var(--shadow); }
.card-404 .actions { display: flex; gap: 12px; margin-top: 12px; }
.btn { display: inline-block; padding: 8px 14px; border-radius: 10px; text-decoration: none; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 80%, #000), var(--brand-strong)); box-shadow: 0 8px 18px rgba(91, 63, 209, 0.25); }
.btn:hover { filter: brightness(1.05); }
.btn.alt { background: transparent; color: var(--text); border: 1px solid var(--glass-border); }
.upd-toggle { display: inline-flex; gap: 8px; margin: 8px 0 14px; border: 1px solid var(--glass-border); padding: 4px; border-radius: 10px; background: var(--glass-bg); }
.upd-btn { border: 0; background: transparent; color: var(--text); padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.upd-btn.active { background: color-mix(in srgb, var(--brand) 22%, var(--bg)); color: #fff; }
[data-theme="dark"] .upd-toggle { background: #121212; border-color: #2a2a2a; }
[data-theme="dark"] .upd-btn { color: #ddd; }
[data-theme="dark"] .upd-btn.active { background: #5b3fd1; color: #fff; }
.section-line { border: 0; border-top: 1px solid var(--glass-border); margin: 18px 0; }
.category-divider { border: 0; border-top: 1px dashed var(--border); margin: 18px 0; }
.section-subtitle { margin: 10px 0 8px; font-size: 15px; font-weight: 700; color: var(--muted); letter-spacing: .2px; }

/* Updates list horizontal style */
.updates-list { list-style: none; padding: 0; margin: 8px 0 24px; }
.updates-list .update-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-bottom: 1px dashed var(--border); }
.updates-list .update-date { color: var(--muted); font-size: 13px; min-width: 110px; }
.updates-list .update-site { color: var(--muted); font-weight: 600; }
.updates-list .update-content { flex: 1; color: var(--text); }

/* Mobile-only utility */
.mobile-only { display: block; }
@media (min-width: 980px) { .mobile-only { display: none !important; } }

/* Mobile: make right drawer full width */
@media (max-width: 979px) {
  /* Leave a small left gap so the left drawer handle remains usable */
  .info-drawer { width: calc(100vw - 32px); }
  /* Hide About section on mobile explicitly */
  .about-card { display: none !important; }
}

/* Premium theme transitions */
html.theme-transitioning * {
  transition: background-color 0.3s ease, 
              color 0.3s ease, 
              border-color 0.3s ease, 
              box-shadow 0.3s ease !important;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

/* Selection colors */
::selection {
  background: rgba(98, 60, 148, 0.2);
  color: var(--text);
}

[data-theme="dark"] ::selection {
  background: rgba(139, 92, 246, 0.3);
  color: var(--text);
}

/* Premium loading animation */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.loading-skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--glass-bg) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* Enhanced scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: var(--brand);
  border-radius: 6px;
  border: 3px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-strong);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--brand) var(--bg-secondary);
}

/* Premium hover effects for images */
.post-content img,
.page-content img {
  transition: all var(--transition-base);
  cursor: zoom-in;
}

.post-content img:hover,
.page-content img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
}

/* Gradient text animation for headings */
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-title {
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
}

/* Premium list styles */
.post-content ul,
.page-content ul {
  list-style: none;
  padding-left: 0;
}

.post-content ul li,
.page-content ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
}

.post-content ul li::before,
.page-content ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: bold;
}

/* Enhanced blockquotes */
.post-content blockquote,
.page-content blockquote {
  position: relative;
  font-style: italic;
  overflow: hidden;
}

.post-content blockquote::before,
.page-content blockquote::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: -10px;
  font-size: 80px;
  color: var(--brand);
  opacity: 0.1;
  font-family: 'Spectral', serif;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .hero {
    padding: 60px 0 40px;
  }
  
  .hero-title {
    font-size: clamp(32px, 8vw, 48px);
  }
  
  .post-card {
    border-radius: var(--border-radius);
  }
  
  .grid {
    gap: 20px;
  }
}

/* ============================
   About Page Styles
   ============================ */

.about-page-container {
  min-height: 100vh;
  background: var(--bg);
}

.about-content-wrapper {
  width: 100%;
  overflow-x: hidden;
}

/* Hero Section */
.about-hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  overflow: hidden;
}

.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: float-up 20s infinite linear;
}

@keyframes float-up {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  padding: 40px;
}

.profile-image-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 30px;
}

.profile-image {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.profile-placeholder {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.profile-placeholder i {
  font-size: 60px;
  color: rgba(255, 255, 255, 0.8);
}

.profile-ring {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  animation: pulse-ring 3s infinite ease-out;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 30px;
  opacity: 0.9;
}

.hero-meta {
  display: flex;
  gap: 30px;
  justify-content: center;
  font-size: 1.1rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.8;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  animation: bounce 2s infinite;
}

.hero-scroll-indicator i {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.6);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* About Sections */
.about-sections {
  padding: 80px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.about-section {
  margin-bottom: 100px;
}

.section-content {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 60px;
  box-shadow: var(--shadow-lg);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.title-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

/* Bio Section */
.bio-content {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* Skills Section */
.skills-grid {
  display: grid;
  gap: 40px;
}

.skill-category {
  background: rgba(255, 255, 255, 0.5);
  padding: 30px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-light);
}

.category-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 20px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-tag {
  position: relative;
  padding: 10px 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 25px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-base);
  overflow: hidden;
}

.skill-tag:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--brand);
  color: var(--brand);
}

.skill-tag i {
  font-size: 18px;
}

.skill-level {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-strong) 100%);
  width: 0;
  transition: width 1s ease-out;
}

/* Experience Timeline */
.timeline {
  position: relative;
  padding: 40px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: var(--border);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 0 40px;
  margin-bottom: 60px;
}

.timeline-item.left {
  left: 0;
  text-align: right;
}

.timeline-item.right {
  left: 50%;
  text-align: left;
}

.timeline-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--brand);
  border: 4px solid white;
  border-radius: 50%;
  top: 20px;
  z-index: 1;
  box-shadow: var(--shadow);
}

.timeline-item.left .timeline-marker {
  right: -10px;
}

.timeline-item.right .timeline-marker {
  left: -10px;
}

.timeline-content {
  background: white;
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline-item.left .timeline-header {
  flex-direction: row-reverse;
}

.timeline-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--brand);
  margin: 0;
}

.timeline-date {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.timeline-company {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
  font-weight: 500;
}

.timeline-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.project-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: all var(--transition-base);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.project-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 30px;
}

.project-name {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 15px;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tech-tag {
  padding: 6px 12px;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.project-links {
  display: flex;
  gap: 15px;
}

.project-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: all var(--transition-base);
}

.project-link:hover {
  background: var(--brand-strong);
  transform: scale(1.1);
}

/* Education Section */
.education-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.education-card {
  background: white;
  padding: 40px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
  text-align: center;
  transition: all var(--transition-base);
}

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

.edu-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 36px;
}

.edu-degree {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 10px;
}

.edu-institution {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.edu-date {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 15px;
}

.edu-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Achievements Section */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
}

.achievement-card {
  background: white;
  padding: 30px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
  text-align: center;
  transition: all var(--transition-base);
}

.achievement-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}

.achievement-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #f59e0b 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
}

.achievement-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.achievement-issuer {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.achievement-date {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Interests Section */
.interests-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.interest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 25px;
  background: white;
  border: 2px solid var(--border-light);
  border-radius: 30px;
  transition: all var(--transition-base);
  cursor: default;
}

.interest-item:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.interest-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.interest-name {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
}

/* Contact Section */
.contact-section {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  margin: 100px -60px -80px;
  padding: 80px 60px;
}

.contact-section .section-content {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-section .section-title {
  color: white;
}

.contact-section .title-icon {
  background: rgba(255, 255, 255, 0.2);
}

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

.contact-message {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.social-link {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 24px;
  text-decoration: none;
  transition: all var(--transition-base);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Tooltip */
.tooltip {
  position: fixed;
  background: var(--text);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

/* Additional Content Section */
.additional-content {
  margin-top: 80px;
}

.markdown-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.markdown-content h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--brand);
  margin: 40px 0 20px;
}

.markdown-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin: 30px 0 15px;
}

.markdown-content p {
  margin-bottom: 20px;
}

.markdown-content a {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-base);
}

.markdown-content a:hover {
  border-bottom-color: var(--brand);
}

/* Responsive Design for About Page */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .section-content {
    padding: 40px;
  }
  
  .timeline::before {
    left: 30px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 80px;
    padding-right: 0;
    text-align: left !important;
  }
  
  .timeline-item.right {
    left: 0;
  }
  
  .timeline-marker {
    left: 20px !important;
    right: auto !important;
  }
  
  .timeline-header {
    flex-direction: row !important;
  }
}

@media (max-width: 768px) {
  .about-hero {
    height: auto;
    min-height: 100vh;
    padding: 80px 20px;
  }
  
  .profile-image,
  .profile-placeholder {
    width: 150px;
    height: 150px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-meta {
    flex-direction: column;
    gap: 10px;
  }
  
  .about-sections {
    padding: 40px 20px;
  }
  
  .section-content {
    padding: 30px 20px;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .education-cards {
    grid-template-columns: 1fr;
  }
  
  .contact-section {
    margin: 60px -20px -40px;
    padding: 60px 20px;
  }
  
  .social-links {
    flex-wrap: wrap;
  }
}

/* Dark mode styles for About page */
[data-theme="dark"] .about-hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
}

[data-theme="dark"] .section-content {
  background: var(--glass-bg);
  border-color: var(--glass-border);
}

[data-theme="dark"] .bio-content,
[data-theme="dark"] .timeline-description,
[data-theme="dark"] .project-description,
[data-theme="dark"] .edu-description,
[data-theme="dark"] .markdown-content {
  color: var(--text-secondary);
}

[data-theme="dark"] .skill-category,
[data-theme="dark"] .timeline-content,
[data-theme="dark"] .project-card,
[data-theme="dark"] .education-card,
[data-theme="dark"] .achievement-card,
[data-theme="dark"] .interest-item {
  background: var(--bg-elevated);
  border-color: var(--border);
}

[data-theme="dark"] .skill-tag {
  background: var(--bg-secondary);
  border-color: var(--border);
}

[data-theme="dark"] .skill-tag:hover {
  background: var(--bg-elevated);
  border-color: var(--brand);
}

[data-theme="dark"] .tech-tag {
  background: var(--code-bg);
  border-color: var(--code-border);
}

[data-theme="dark"] .contact-section .section-content {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .social-link {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .social-link:hover {
  background: rgba(255, 255, 255, 0.1);
}
