﻿:root {
  /* Modern Premium Palette */
  --color-bg-deep: #050507;
  /* Darker, richer black */
  --color-bg-glass: rgba(255, 255, 255, 0.03);
  --color-border-glass: rgba(255, 255, 255, 0.08);

  --color-primary: #FFE135;
  /* Banana Yellow */
  --color-secondary: #00F0FF;
  /* Electric Cyan */
  --color-accent: #7000FF;
  /* Deep Violet for depth */

  --color-text-main: #FFFFFF;
  --color-text-muted: #94A3B8;

  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Refined Glows - Softer, more diffused */
  --glow-primary: 0 0 20px rgba(255, 225, 53, 0.15);
  --glow-secondary: 0 0 20px rgba(0, 240, 255, 0.15);

  --transition-speed: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-bg-deep);
  color: var(--color-text-main);
  font-family: var(--font-main);
  line-height: 1.7;
  overflow-x: hidden;
  /* Subtle mesh gradient background */
  background-image:
    radial-gradient(circle at 15% 50%, rgba(112, 0, 255, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(0, 240, 255, 0.08), transparent 25%);
  background-attachment: fixed;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-speed);
}

ul {
  list-style: none;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-gradient-primary {
  background: linear-gradient(135deg, #FFF, var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-secondary {
  background: linear-gradient(135deg, #FFF, var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glow-text-banana {
  color: var(--color-primary);
  text-shadow: 0 0 25px rgba(255, 225, 53, 0.3);
}

.glow-text-cyan {
  color: var(--color-secondary);
  text-shadow: 0 0 25px rgba(0, 240, 255, 0.3);
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 32px;
  border-radius: 50px;
  /* Modern Pill Shape */
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed);
  font-family: var(--font-main);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.btn-banana {
  background: rgba(255, 225, 53, 0.1);
  border: 1px solid rgba(255, 225, 53, 0.05);
  /* Softer Border */
  color: var(--color-primary);
}

.btn-banana:hover {
  background: var(--color-primary);
  color: #000;
  box-shadow: 0 0 30px rgba(255, 225, 53, 0.4);
  transform: translateY(-2px);
}

.btn-cyan {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.5);
  color: var(--color-secondary);
}

.btn-cyan:hover {
  background: var(--color-secondary);
  color: #000;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
  transform: translateY(-2px);
}

/* Header - Floating Island Style */
header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  border: 1px solid var(--color-border-glass);
  border-radius: 16px;
  padding: 12px 0;
  transition: all 0.3s ease;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.8;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
  color: var(--color-primary);
}


/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding-top: 160px;
  /* Increased from 80px for more separation */
}

.hero h1 {
  font-size: 3.5rem;
  /* Balanced size */
  margin-bottom: 1.5rem;
  line-height: 1.1;
  letter-spacing: -2px;
  font-weight: 800;
}

.hero p.subtitle {
  font-size: 1.4rem;
  color: var(--color-text-muted);
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* Section Styling */
section {
  padding: 100px 0;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 60px;
  padding-left: 0;
  border-left: none;
  text-align: center;
  letter-spacing: -1px;
}

/* Premium Card Styling */
.card {
  background: linear-gradient(180deg, var(--color-bg-glass) 0%, rgba(255, 255, 255, 0.01) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border-glass);
  padding: 40px;
  border-radius: 24px;
  transition: all var(--transition-speed);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.06), transparent 40%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  z-index: 0;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.card>* {
  position: relative;
  /* Ensure content stays above the hover effect */
  z-index: 1;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  /* Slightly wider cards */
  gap: 30px;
}

/* Profile Image Styling */
.profile-img-container {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

.profile-img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 225, 53, 0.1);
  /* Subtle halo */
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  transition: all var(--transition-speed);
}

.profile-img:hover {
  transform: scale(1.02);
  border-color: var(--color-primary);
  box-shadow: 0 0 60px rgba(255, 225, 53, 0.2);
}

.hero-profile-img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  margin-bottom: 30px;
  transition: transform var(--transition-speed);
}

.hero-profile-img:hover {
  transform: scale(1.05) rotate(2deg);
  border-color: var(--color-secondary);
}

/* Animations - Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Custom Reticle Cursor */
body {
  cursor: none;
  /* Hide default cursor */
}

a,
button,
.btn,
.card {
  cursor: none;
  /* Ensure it stays hidden on interactive elements */
}

.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary);
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-secondary);
  transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Cursor Hover State */
body.hovering .cursor-outline {
  width: 60px;
  height: 60px;
  background-color: rgba(0, 240, 255, 0.1);
  border-color: var(--color-primary);
}

/* Typewriter Cursor */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background-color: var(--color-primary);
  margin-left: 5px;
  animation: blink 1s infinite;
  vertical-align: middle;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}


/* Stats Bar - Premium */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 30px 50px;
  background: rgba(255, 255, 255, 0.03);
  /* Glass container */
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border-glass);
  border-radius: 20px;
  margin-top: 60px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  margin: 60px auto 0 auto;
  max-width: 1000px;
}

.stat-item {
  text-align: center;
  padding: 20px 30px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  min-width: 160px;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-5px);
}

.stat-icon {
  font-size: 2rem;
  margin-bottom: 15px;
  color: var(--color-text-muted);
  transition: all 0.3s ease;
}

.stat-item:hover .stat-icon {
  color: var(--color-primary);
  transform: scale(1.2);
  text-shadow: 0 0 15px rgba(255, 225, 53, 0.5);
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 5px;
  display: block;

  /* Gradient Text */
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

@media (max-width: 768px) {

  .cursor-dot,
  .cursor-outline {
    display: none;
    /* Restore default cursor on mobile */
  }

  body,
  a,
  button,
  .btn {
    cursor: auto;
  }
}

/* Language Switcher */
.lang-switch {
  display: flex;
  gap: 10px;
  margin-left: 20px;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--color-text-muted);
  color: var(--color-text-muted);
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s;
  font-family: var(--font-mono);
}

.lang-btn:hover {
  color: var(--color-neon-banana);
  border-color: var(--color-neon-banana);
}

.lang-btn.active {
  background: var(--color-neon-banana);
  color: #000;
  border-color: var(--color-neon-banana);
  box-shadow: var(--glow-banana);
}

/* ----------------------------------------------------
   Publication Timeline Visualization (CSS Only)
   ---------------------------------------------------- */
.pub-timeline-container {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 350px;
  padding: 40px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.005) 100%);
  border-radius: 20px;
  border: 1px solid var(--color-border-glass);
  position: relative;
  margin-bottom: 50px;
}

.pub-year-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  width: 60px;
  position: relative;
  cursor: default;
}

.pub-bars {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 100%;
  width: 100%;
  justify-content: center;
  padding-bottom: 10px;
}

.pub-bar {
  width: 18px;
  border-radius: 4px;
  position: relative;
  transition: height 1s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0.8;
  height: 0;
  /* Hardware acceleration */
  transform: translateZ(0);
}

/* Data Tooltips on Hover */
.pub-bar::before {
  content: attr(data-count);
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  border: 1px solid var(--color-border-glass);
}

.pub-bar:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.pub-bar:hover {
  opacity: 1;
  filter: brightness(1.3);
  box-shadow: 0 0 15px currentColor;
  z-index: 10;
}

.pub-bar.article {
  background: linear-gradient(to top, rgba(57, 255, 20, 0.2), #39ff14);
  color: #39ff14;
  /* For shadow/glow inheritance */
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
}

.pub-bar.conf {
  background: linear-gradient(to top, rgba(0, 240, 255, 0.2), #00F0FF);
  color: #00F0FF;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.year-label {
  margin-top: 15px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-text-muted);
  font-size: 1rem;
  position: relative;
  transition: color 0.3s;
}

.pub-year-group:hover .year-label {
  color: var(--color-text-main);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Legend Styling */
.pub-legend {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: -20px;
  /* Pull up closer to chart */
  margin-bottom: 40px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-family: var(--font-main);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.article {
  background-color: #39ff14;
  box-shadow: 0 0 10px #39ff14;
}

.legend-dot.conf {
  background-color: #00F0FF;
  box-shadow: 0 0 10px #00F0FF;
}



/* ----------------------------------------------------
   Clean Stem Horizontal Timeline (Simple Connection)
   ---------------------------------------------------- */
.life-timeline-horizontal {
  position: relative;
  max-width: 1100px;
  margin: 120px auto;
  padding: 60px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* The Central Line */
.life-timeline-horizontal::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 20px;
  right: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-50%);
  z-index: 0;
}

/* Glowing Core Line (Subtle) */
.life-timeline-horizontal::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      var(--color-primary) 20%,
      var(--color-secondary) 80%,
      transparent 100%);
  transform: translateY(-50%);
  opacity: 0.4;
  z-index: 0;
}

.timeline-item-h {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  z-index: 1;
  min-width: 0;
}

/* The Node (Dot) on Line */
.timeline-dot-h {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: var(--color-bg-deep);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  z-index: 2;
  transition: all 0.4s ease;
  box-shadow: 0 0 0 4px var(--color-bg-deep);
  /* Separation */
}

/* Active State for Node */
.timeline-item-h:hover .timeline-dot-h {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 4px var(--color-bg-deep), 0 0 15px var(--color-primary);
  transform: translate(-50%, -50%) scale(1.2);
}

.timeline-item-h:nth-child(even):hover .timeline-dot-h {
  box-shadow: 0 0 0 4px var(--color-bg-deep), 0 0 15px var(--color-secondary);
}


/* Glass Card Container */
.timeline-content-h {
  position: absolute;
  width: 240px;
  padding: 20px 24px;
  background: rgba(20, 20, 25, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  text-align: center;
  transition: all 0.4s ease;
  opacity: 1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 5;
}

/* Hover Effect for Card */
.timeline-item-h:hover .timeline-content-h {
  transform: translateY(-5px);
  background: rgba(30, 30, 35, 0.85);
  border-color: var(--color-primary);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.timeline-item-h:nth-child(even):hover .timeline-content-h {
  border-color: var(--color-secondary);
}

/* Positioning */
.timeline-item-h:nth-child(odd) .timeline-content-h {
  bottom: 60px;
  /* Fixed distance */
}

.timeline-item-h:nth-child(even) .timeline-content-h {
  top: 60px;
}

/* ----------------------------------------------------
   The Simple Connection (Stick/Stem)
   ---------------------------------------------------- */
.timeline-item-h::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.15);
  /* Subtle grey line */
  transform: translateX(-50%);
  z-index: 1;
  transition: all 0.4s ease;
}

/* Top Connection */
.timeline-item-h:nth-child(odd)::after {
  bottom: 50%;
  height: 60px;
  /* Connects dot to card bottom */
}

/* Bottom Connection */
.timeline-item-h:nth-child(even)::after {
  top: 50%;
  height: 60px;
}

/* Hover State for Connection */
.timeline-item-h:hover::after {
  background: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary);
  width: 2px;
}

.timeline-item-h:nth-child(even):hover::after {
  background: var(--color-secondary);
  box-shadow: 0 0 10px var(--color-secondary);
}

/* Remove fancy extra dots */
.timeline-content-h::after,
.timeline-content-h::before {
  display: none;
}


/* Typography */
.timeline-year {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.timeline-item-h:nth-child(even) .timeline-year {
  color: var(--color-secondary);
}

.timeline-title {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 8px;
  font-weight: 600;
}

.timeline-text {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .life-timeline-horizontal {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 40px;
    margin: 60px auto;
    height: auto;
  }

  .life-timeline-horizontal::before,
  .life-timeline-horizontal::after {
    width: 2px;
    height: 100%;
    left: 40px;
    top: 0;
    transform: none;
    background: rgba(255, 255, 255, 0.15);
  }

  .timeline-item-h {
    width: 100%;
    margin-bottom: 50px;
    justify-content: flex-start;
    flex-direction: row;
    align-items: flex-start;
  }

  .timeline-dot-h {
    left: 40px;
    top: 25px;
    /* Align with top of card loosely */
    transform: translate(-50%, 0);
  }

  /* Reset Card positions */
  .timeline-item-h:nth-child(odd) .timeline-content-h,
  .timeline-item-h:nth-child(even) .timeline-content-h {
    position: relative;
    bottom: auto;
    top: auto;
    left: auto;
    margin-left: 70px;
    /* Space from dot */
    width: calc(100% - 90px);
    text-align: left;
    transform: none;
  }

  /* Remove vertical connections for mobile */
  .timeline-item-h::after {
    display: none;
  }

  .timeline-item-h:hover .timeline-content-h {
    transform: translateX(5px);
  }
}

/* ----------------------------------------------------
   Modern Blog Header & Card Styles
   ---------------------------------------------------- */
.blog-header {
  text-align: center;
  position: relative;
  padding-bottom: 80px;
}

.blog-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 2px;
  box-shadow: 0 0 20px var(--color-primary);
}

.blog-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 40px;
}

.blog-card-modern {
  background: rgba(20, 20, 25, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  backdrop-filter: blur(10px);
}

.blog-card-modern:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.blog-thumb-wrapper {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.blog-thumb-modern {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.blog-card-modern:hover .blog-thumb-modern {
  transform: scale(1.1);
}

.blog-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 40%, rgba(5, 5, 7, 0.9) 100%);
  opacity: 0.6;
  transition: opacity 0.4s;
}

.blog-card-modern:hover .blog-overlay {
  opacity: 0.8;
}

.blog-category-tag {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-secondary);
  border: 1px solid rgba(0, 240, 255, 0.3);
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-content-modern {
  padding: 25px;
  position: relative;
}

.blog-date-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.blog-title-modern {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #fff, #ccc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: color 0.3s;
}

.blog-card-modern:hover .blog-title-modern {
  background: linear-gradient(90deg, var(--color-primary), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-summary-modern {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 20px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--color-primary);
  font-weight: 600;
  transition: gap 0.3s;
}

.blog-card-modern:hover .blog-read-more {
  gap: 12px;
  line-clamp: 3;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--color-primary);
  font-weight: 600;
  transition: gap 0.3s;
}

.blog-card-modern:hover .blog-read-more {
  gap: 12px;
  text-shadow: 0 0 10px rgba(255, 225, 53, 0.4);
}


/* Publications Summary Stats */
.pub-stats-summary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin-top: 20px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-mini .count {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 800;
}

.stat-mini .label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-divider {
  height: 40px;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}

/* ----------------------------------------------------
   Responsive Design & Mobile Optimization
   ---------------------------------------------------- */

.nav-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-primary);
  transition: transform 0.3s;
  z-index: 1001;
}

.nav-toggle:hover {
  transform: scale(1.1);
}

img {
  max-width: 100%;
  height: auto;
}

/* Tablets and below (Handles both Header and Timeline) */
@media (max-width: 992px) {

  /* Header & Navigation Mobile */
  nav {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
  }

  .logo {
    order: 1;
    font-size: 1rem;
    flex: 1 1 auto;
    white-space: nowrap !important;
  }

  .nav-toggle {
    display: block;
    order: 2;
  }

  .lang-switch {
    order: 3;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
    gap: 5px;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    padding: 30px;
    gap: 20px;
    border: 1px solid var(--color-border-glass);
    border-radius: 20px;
    display: none !important;
    /* Force hide unless active */
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  .nav-links.active {
    display: flex !important;
    animation: slideDown 0.4s ease forwards;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .section-title {
    font-size: 2.22rem;
    margin-bottom: 40px;
    margin-top: 20px;
    text-align: left !important;
  }

  /* Hero adjustments */
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p.subtitle {
    font-size: 1.1rem;
    padding: 0 20px;
  }

  .hero-profile-img {
    width: 180px;
    height: 180px;
  }

  /* Grids */
  .grid-3,
  .blog-grid-modern {
    grid-template-columns: 1fr;
  }

  /* Horizontal Timeline Mobile Conversion */
  .life-timeline-horizontal {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 40px;
    margin: 60px auto;
    height: auto;
  }

  .life-timeline-horizontal::before,
  .life-timeline-horizontal::after {
    width: 2px;
    height: 100%;
    left: 40px;
    top: 0;
    transform: none;
    background: rgba(255, 255, 255, 0.15);
  }

  .timeline-item-h {
    width: 100%;
    margin-bottom: 50px;
    justify-content: flex-start;
    flex-direction: row;
    align-items: flex-start;
  }

  .timeline-dot-h {
    left: 40px;
    top: 25px;
    transform: translate(-50%, 0);
  }

  .timeline-item-h:nth-child(odd) .timeline-content-h,
  .timeline-item-h:nth-child(even) .timeline-content-h {
    position: relative;
    bottom: auto;
    top: auto;
    left: auto;
    margin-left: 70px;
    width: calc(100% - 90px);
    text-align: left;
    transform: none;
  }

  .timeline-item-h::after {
    display: none;
  }

  .timeline-item-h:hover .timeline-content-h {
    transform: translateX(5px);
  }
}

/* Small tablets / Large phones (600px) */
@media (max-width: 600px) {
  header {
    width: 95%;
    top: 10px;
  }

  .logo {
    font-size: 0.95rem;
  }

  /* CV Page Responsive */
  .cv-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 15px !important;
  }

  .cv-entry-title {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 5px !important;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-profile-img {
    width: 140px;
    height: 140px;
  }

  /* Publication Chart */
  .pub-timeline-container {
    height: 300px;
    padding: 10px;
    overflow-x: auto;
  }

  .pub-stats-summary {
    flex-direction: column;
    gap: 15px;
  }

  .stat-divider {
    display: none;
  }
}

/* Very small phones (480px) */
@media (max-width: 480px) {
  .logo {
    font-size: 0.85rem;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .lang-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
  }
}

.no-scroll {
  overflow: hidden;
}