/* ============================================
   QUANTITATIVE RESEARCHER THEME - TECH STYLE
   ============================================ */

/* Color Variables - Tech Blue Theme */
:root {
  --primary-color: #00d4ff;
  --secondary-color: #0066cc;
  --accent-color: #00ffaa;
  --dark-bg: #0a0e27;
  --darker-bg: #060819;
  --card-bg: rgba(20, 25, 45, 0.8);
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --border-glow: rgba(0, 212, 255, 0.3);
  --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.15);
}

/* Global Body Styling */
body {
  background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
  color: var(--text-primary);
  position: relative;
  overflow-x: hidden;
}

/* Animated Background Gradient */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 50%, rgba(0, 102, 204, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(0, 255, 170, 0.05) 0%, transparent 50%);
  z-index: -1;
  animation: gradientShift 20s ease infinite;
}

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

/* Main Content Area */
.page__content,
.archive,
.sidebar {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  box-shadow: var(--shadow-glow);
  padding: 2rem;
  margin-bottom: 2rem;
}

/* Headings Style */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary-color);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  display: block;
  width: fit-content;
}

h2 {
  font-size: 2rem;
  position: relative;
  padding-left: 1rem;
}

h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 80%;
  background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
  box-shadow: 0 0 10px var(--primary-color);
}

/* Links Style */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

a:hover {
  color: var(--accent-color);
  text-shadow: 0 0 8px rgba(0, 255, 170, 0.5);
}

/* Author Profile Sidebar */
.sidebar {
  background: var(--card-bg) !important;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  box-shadow: var(--shadow-glow);
  padding: 2rem;
  margin-bottom: 2rem;
}

.sidebar .author__avatar {
  border: 3px solid var(--primary-color);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
  border-radius: 50%;
  overflow: hidden;
  transition: all 0.3s ease;
  display: block;
  position: relative;
  width: 100%;
  max-width: 180px;
  margin: 0 auto;
}

.sidebar .author__avatar::before {
  content: '';
  display: block;
  padding-top: 100%; /* 1:1 Aspect Ratio */
}

.sidebar .author__avatar img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 50%;
  border: none !important;
  margin: 0;
  padding: 0;
}

.sidebar .author__avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
}

.author__name {
  color: var(--primary-color) !important;
  font-size: 1.5rem !important;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.author__bio {
  color: var(--text-secondary) !important;
  font-style: italic;
}

/* Author URLs and Social Icons */
.author__urls-wrapper {
  background: transparent !important;
}

.author__urls {
  background: transparent !important;
  color: var(--text-primary) !important;
}

.author__urls li {
  color: var(--text-primary) !important;
}

.author__urls li a {
  color: var(--text-primary) !important;
}

.author__urls li a:hover {
  color: var(--primary-color) !important;
}

.author__urls .social-icons a {
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.author__urls .social-icons a:hover {
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* Follow Button */
.btn--inverse {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)) !important;
  color: white !important;
  border: none !important;
  padding: 10px 20px;
  border-radius: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
  font-weight: 600;
}

.btn--inverse:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
  color: white !important;
}

/* Location and other info icons */
.author__urls .fa,
.author__urls .fas,
.author__urls .fab,
.author__urls i {
  color: var(--primary-color) !important;
}

/* Navigation Bar */
.masthead {
  background: var(--card-bg) !important;
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--border-glow);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.masthead__inner-wrap {
  background: transparent !important;
}

.site-title,
.site-title a {
  color: var(--primary-color) !important;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.greedy-nav {
  background: transparent !important;
}

.greedy-nav a {
  color: var(--text-primary) !important;
  transition: all 0.3s ease;
  font-weight: 500;
}

.greedy-nav a:hover,
.greedy-nav .visible-links a:hover {
  color: var(--primary-color) !important;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.visible-links li {
  background: transparent !important;
}

.visible-links a {
  color: var(--text-primary) !important;
}

.visible-links a:hover {
  color: var(--primary-color) !important;
}

/* Mobile menu button */
.greedy-nav__toggle {
  color: var(--text-primary) !important;
  background: transparent !important;
  border: 1px solid var(--primary-color);
}

.greedy-nav__toggle:hover {
  color: var(--primary-color) !important;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Hidden links dropdown */
.hidden-links {
  background: var(--card-bg) !important;
  border: 1px solid var(--border-glow) !important;
  box-shadow: var(--shadow-glow);
}

.hidden-links a {
  color: var(--text-primary) !important;
}

.hidden-links a:hover {
  background: rgba(0, 102, 204, 0.1) !important;
  color: var(--primary-color) !important;
}

/* Awards Section Styling */
.awards-container {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  max-width: 800px;
  margin: 20px auto;
  padding-left: 20px;
}

.award-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  padding: 12px 15px;
  background: rgba(0, 102, 204, 0.05);
  border-left: 3px solid var(--primary-color);
  border-radius: 6px;
  position: relative;
  list-style-type: none;
  transition: all 0.3s ease;
}

.award-item:hover {
  background: rgba(0, 102, 204, 0.1);
  transform: translateX(5px);
  box-shadow: -5px 0 15px rgba(0, 212, 255, 0.2);
}

.award-item::before {
  content: "▶";
  position: absolute;
  left: -8px;
  color: var(--primary-color);
  font-size: 0.8rem;
}

.award-name {
  flex: 1;
  color: var(--text-primary);
  font-weight: 500;
}

.award-year {
  color: var(--accent-color);
  white-space: nowrap;
  margin-left: 20px;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

/* Education Section Cards */
.education-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.education-item {
  background: rgba(0, 102, 204, 0.08);
  border: 1px solid var(--border-glow);
  border-radius: 10px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.education-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
  box-shadow: 0 0 10px var(--primary-color);
}

.education-item:hover {
  background: rgba(0, 102, 204, 0.12);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

.education-item h3 {
  color: var(--primary-color);
  font-size: 1.3rem;
  margin: 0 0 10px 0;
  padding-left: 10px;
}

.education-item p {
  color: var(--text-primary);
  margin: 8px 0;
  padding-left: 10px;
  font-size: 0.95rem;
}

.education-item p:first-of-type {
  color: var(--accent-color);
  font-weight: 600;
}

.education-item p:last-of-type:not(:first-of-type) {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.9rem;
}

/* Publications Section */
.page__content a[href*="doi"],
.page__content a[href*="library.seg.org"],
.page__content a[href*="manu39.magtech.com.cn"],
.page__content a[href*="en.dzkx.org"] {
  display: inline-block !important;
  padding: 8px 16px;
  margin: 8px 0;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid var(--primary-color);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.page__content p > a[href*="doi"],
.page__content p > a[href*="library.seg.org"],
.page__content p > a[href*="manu39.magtech.com.cn"],
.page__content p > a[href*="en.dzkx.org"] {
  display: inline-block !important;
  padding: 8px 16px;
  margin: 8px 0;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid var(--primary-color);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.page__content a[href*="doi"]:hover,
.page__content a[href*="library.seg.org"]:hover,
.page__content a[href*="manu39.magtech.com.cn"]:hover,
.page__content a[href*="en.dzkx.org"]:hover {
  background: rgba(0, 212, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

/* Education & Course Section Cards */
.page__content ul {
  list-style: none;
  padding-left: 0;
}

.page__content ul li {
  padding: 10px 15px;
  margin: 8px 0;
  background: rgba(0, 102, 204, 0.05);
  border-left: 3px solid var(--secondary-color);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.page__content ul li:hover {
  background: rgba(0, 102, 204, 0.1);
  transform: translateX(5px);
}

/* Code Blocks */
code {
  background: rgba(0, 212, 255, 0.1);
  color: var(--accent-color);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  border: 1px solid var(--border-glow);
}

/* Buttons */
.btn,
.page__footer-follow .social-icons a {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn:hover,
.page__footer-follow .social-icons a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
}

/* Scroll to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px rgba(0, 212, 255, 0.6);
}

/* Fade In Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page__content > * {
  animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .award-item {
    flex-direction: column;
  }

  .award-year {
    margin-left: 0;
    margin-top: 5px;
  }
}

/* ============================================
   BLOG POSTS STYLING
   ============================================ */

/* Archive subtitle (Year headings) */
.archive__subtitle {
  color: var(--primary-color) !important;
  font-size: 2rem !important;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
  margin-top: 3rem !important;
  margin-bottom: 1.5rem !important;
  padding-left: 1rem;
  position: relative;
  border: none !important;
}

.archive__subtitle::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 80%;
  background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
  box-shadow: 0 0 10px var(--primary-color);
}

/* Blog post cards */
.archive__item {
  background: rgba(0, 102, 204, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.archive__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
  box-shadow: 0 0 8px var(--primary-color);
}

.archive__item:hover {
  background: rgba(0, 102, 204, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.25);
  border-color: var(--primary-color);
}

/* Answer card styling */
.archive__item--answer {
  background: rgba(0, 255, 170, 0.05);
  border: 1px solid rgba(0, 255, 170, 0.3);
  margin-top: 0;
  margin-bottom: 2rem;
}

.archive__item--answer::before {
  background: linear-gradient(180deg, var(--accent-color), var(--primary-color));
  box-shadow: 0 0 8px var(--accent-color);
}

.archive__item--answer:hover {
  background: rgba(0, 255, 170, 0.08);
  border-color: var(--accent-color);
}

.answer-title {
  color: var(--accent-color) !important;
  font-size: 1.2rem !important;
  margin: 0 0 1rem 0 !important;
  text-shadow: 0 0 8px rgba(0, 255, 170, 0.3);
  font-weight: 600;
}

.answer-content {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.6;
}

.answer-content p {
  margin: 0;
  color: var(--text-primary);
}

/* Blog post title */
.archive__item-title {
  color: var(--primary-color) !important;
  font-size: 1.4rem !important;
  margin-bottom: 0.8rem !important;
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.2);
}

.archive__item-title a {
  color: var(--primary-color) !important;
}

.archive__item-title a:hover {
  color: var(--accent-color) !important;
  text-shadow: 0 0 10px rgba(0, 255, 170, 0.4);
}

/* Post metadata (date, read time) */
.page__meta,
.page__date {
  color: var(--text-secondary) !important;
  font-size: 0.85rem;
  margin: 0.5rem 0;
}

.page__meta i,
.page__date i {
  color: var(--primary-color) !important;
  margin-right: 5px;
}

/* Post excerpt */
.archive__item-excerpt {
  color: var(--text-primary) !important;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: 1rem;
}

/* Problem status badges */
.problem-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 10px;
  vertical-align: middle;
}

.badge-open {
  background: linear-gradient(135deg, #ff6b6b, #ff8e53);
  color: white;
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.4);
  animation: pulse-open 2s ease-in-out infinite;
}

.badge-solved {
  background: linear-gradient(135deg, #00ffaa, #00d4ff);
  color: #0a0e27;
  box-shadow: 0 0 10px rgba(0, 255, 170, 0.4);
}

@keyframes pulse-open {
  0%, 100% {
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.4);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
  }
}

/* Difficulty badges */
.difficulty-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 10px;
  vertical-align: middle;
}

.difficulty-easy {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: white;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
}

.difficulty-medium {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.difficulty-hard {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

/* Tags display */
.archive__item .tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.archive__item .tag {
  background: rgba(0, 212, 255, 0.1);
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  border: 1px solid rgba(0, 212, 255, 0.3);
  transition: all 0.3s ease;
}

.archive__item .tag:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* ============================================
   ANSWER SECTION - BLOG DETAIL PAGE
   ============================================ */

/* Answer Section Container */
.answer-section {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* Toggle Button */
.answer-toggle-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
  margin-bottom: 1rem;
}

.answer-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
}

.answer-toggle-btn:active {
  transform: translateY(0);
}

.toggle-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.answer-toggle-btn.expanded .toggle-icon {
  transform: rotate(180deg);
}

/* Answer Container */
.answer-container {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out, opacity 0.3s ease;
  opacity: 0;
}

.answer-container.show {
  max-height: 500px;
  opacity: 1;
}

/* Answer Card */
.answer-card {
  background: rgba(0, 255, 170, 0.05);
  border: 1px solid rgba(0, 255, 170, 0.3);
  border-radius: 10px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  animation: slideDown 0.5s ease-out;
}

.answer-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-color), var(--primary-color));
  box-shadow: 0 0 8px var(--accent-color);
}

/* Answer Title */
.answer-card .answer-title {
  color: var(--accent-color) !important;
  font-size: 1.5rem !important;
  margin: 0 0 1rem 0 !important;
  text-shadow: 0 0 10px rgba(0, 255, 170, 0.3);
  font-weight: 700;
  padding-left: 10px;
}

/* Answer Content */
.answer-card .answer-content {
  color: var(--text-primary);
  font-size: 1.1rem;
  line-height: 1.8;
  padding-left: 10px;
}

.answer-card .answer-content p {
  margin: 0;
  color: var(--text-primary);
  font-weight: 500;
}

/* Slide Down Animation */
@keyframes slideDown {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .answer-toggle-btn {
    width: 100%;
    justify-content: center;
  }
  
  .answer-card {
    padding: 1rem;
  }
  
  .answer-card .answer-title {
    font-size: 1.3rem !important;
  }
}
