@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Alegreya+Sans+SC:wght@400;500&display=swap");
@import 'css/literary_style.css';
@import 'css/new_design.css';


:root {
  --color-primary: #007bff;
  --color-secondary: #333333;
  --color-background: #fbfbfb;
  --color-highlight: #f5f5f5;
  --color-border: #c5c5c5;
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Alegreya Sans SC', sans-serif;
  
  /* Typography Scale - based on 1rem = 16px */
  --text-xs: 0.75rem;      /* 12px - badges, tags */
  --text-sm: 0.875rem;     /* 14px - meta, captions */
  --text-base: 1rem;       /* 16px - body */
  --text-lg: 1.125rem;     /* 18px - lead text */
  --text-xl: 1.25rem;      /* 20px - section titles */
  --text-2xl: 1.5rem;      /* 24px - h3 */
  --text-3xl: 1.75rem;     /* 28px - h2, page titles */
  --text-4xl: 2rem;        /* 32px - h1 hero */
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  
  /* Spacing System - 8px base unit */
  --spacing-unit: 8px;
  --space-xs: 4px;     /* 0.5 unit */
  --space-sm: 8px;     /* 1 unit */
  --space-md: 16px;    /* 2 units */
  --space-lg: 24px;    /* 3 units */
  --space-xl: 32px;    /* 4 units */
  --space-2xl: 48px;   /* 6 units */
  --space-3xl: 64px;   /* 8 units */
  
  /* Layout widths */
  --container-max: 1000px;
  --content-max: 680px;    /* For readable text content */
  --narrow-max: 480px;     /* For subtitles, narrow content */
  
  /* Consistent gaps */
  --gap-sm: 12px;
  --gap-md: 20px;
  --gap-lg: 32px;
  
  /* Section spacing */
  --section-gap: 40px;
  --section-padding: 48px;
  
  /* Border styles */
  --border-light: 1px solid #f3f4f6;
  --border-medium: 1px solid #e2e8f0;
  
  /* Digest group colors */
  --col-arxiv: #e0f2fe;        /* light sky */
  --col-uxblogs: #ffe4e6;      /* light rose */
  --col-github: #e9d5ff;       /* light purple */
  --col-mediumtags: #dcfce7;   /* light green */
}

/* Global Styles */
img {
  max-width: 100%;
  height: auto;
}

body {
  font-family: var(--font-body);
  color: var(--color-secondary);
  background-color: var(--color-background);
  line-height: 1.6;
  margin: 0;
}

/* utility to replace inline clear:both usage */
.clear-both {
    clear: both;
}

/* RSS feed icon styling */
.rss-icon-link {
    text-decoration: none;
    margin-left: 10px;
}

.rss-icon-svg {
    vertical-align: middle;
}

/* Feed intro and filter styling */
.feed-intro {
    margin: 0 0 0.25em 0;
    font-size: 1em;
}

.feed-filters {
    margin-top: 12px;
}

/* =============================================
   SKELETON LOADING SYSTEM
   ============================================= */

/* Base skeleton styles */
.skeleton {
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

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

/* Skeleton line - for text placeholders */
.skeleton-line {
    height: 1em;
    margin-bottom: 0.5em;
    border-radius: 4px;
}

.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.long { width: 90%; }
.skeleton-line.full { width: 100%; }

/* Skeleton avatar - circular placeholder */
.skeleton-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.skeleton-avatar.large {
    width: 200px;
    height: 200px;
}

/* Skeleton card - for article/publication cards */
.skeleton-card {
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #fff;
}

.skeleton-card .skeleton-title {
    height: 1.2em;
    width: 85%;
    margin-bottom: 12px;
}

.skeleton-card .skeleton-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.skeleton-card .skeleton-meta-item {
    height: 0.9em;
    width: 60px;
}

.skeleton-card .skeleton-description {
    height: 0.9em;
    margin-bottom: 6px;
}

/* Skeleton grid for multiple cards */
.skeleton-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Skeleton nav - for header navigation */
.skeleton-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 24px;
    height: var(--header-height, 70px);
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--color-border);
    box-sizing: border-box;
}

.skeleton-nav-logo {
    width: 120px;
    height: 24px;
}

.skeleton-nav-item {
    width: 60px;
    height: 16px;
}

/* Skeleton image placeholder */
.skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: 8px;
}

.skeleton-image.thumb {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
}

/* Skeleton blog list item */
.skeleton-blog-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

.skeleton-blog-item .skeleton-content {
    flex: 1;
}

/* Skeleton pub card - for publications */
.skeleton-pub-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 16px;
}

/* Skeleton footer */
.skeleton-footer {
    padding: 24px 0;
    text-align: center;
}

/* Hide skeleton when content loads */
.skeleton-container.loaded {
    display: none;
}

/* Loading indicator - kept for fallback */
#loading-indicator {
    margin: 20px 0;
    padding: 16px;
    color: #666;
    font-style: italic;
    text-align: center;
    font-size: 1rem;
    display: none; /* Hidden by default, skeleton takes over */
}

#loading-indicator::after {
    content: '...';
    display: inline-block;
    width: 1.5em;
    text-align: left;
    animation: loading-dots 1.2s steps(4, end) infinite;
}

@keyframes loading-dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}


/* CV label styling */
.cv-label {
    color: gray;
}

.container {
  max-width: var(--container-max);
  padding: 0 var(--space-lg);
  margin: 0 auto;
  background-color: #FFFFFF;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  min-height: calc(100vh - var(--header-height)); /* Ensure it stretches to footer */
  display: flex;
  flex-direction: column;
}

.center-content {
    flex: 1; /* Push footer down if content is short */
}

/* Typography - Global Headings */
h1, h2, h3, h4 {
  font-family: var(--font-body);
  margin-top: calc(var(--spacing-unit) * 3);
  margin-bottom: calc(var(--spacing-unit) * 2);
}

h1 {
  font-size: var(--text-4xl);
  font-weight: var(--font-normal);
}

h2 {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
}

h3 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
}

h4 {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

/* Links Status */

.link-status {
  margin-left: 5px;
  font-size: 0.8em;
}

.status-ok {
  color: #28a745;
}

.status-error {
  color: #dc3545;
}

.status-loading {
  color: #ffc107;
}

/* Export CV Button */

.export-cv {
  text-align: center;
  margin: 20px 0;
}

.export-cv .btn {
  padding: 10px 20px;
  background-color: #5d9adc;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.export-cv .btn:hover {
  background-color: #4a7fb3;
}

/* Profile Section */
.profile-section {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
}

.profile-image {
  text-align: center;
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 50%;
  width: 200px;
  height: 200px;
  margin: auto;
}

.profile-picture {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin: auto;
  display: block;
  border: 1px solid #000;
  transition: opacity 0.3s;
}

.profile-picture[loading="lazy"] {
  opacity: 0;
}

.profile-picture.loaded,
.profile-picture:not([loading="lazy"]) {
  opacity: 1;
}

/* Modern profile section layout */
.profile-section {
  display: flex;
  gap: 20px;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.profile-card-image {
  text-align: center;
}

.profile-card-title {
  text-align: center;
  margin: 0;
  padding: 0;
}

.profile-card-title p {
  color: gray;
  margin: 0;
}

.profile-social-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
}

.profile-social-links > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  background: white;
  border: 1px solid #eaeaea;
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

.profile-social-links > a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-social-links img {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
  margin: auto;
}

/* Hide any injected elements from browser extensions */
.profile-social-links .link-status,
.profile-social-links span:not([class^="profile"]) {
  display: none !important;
}

.profile-degrees {
  flex: 1;
  min-width: 260px;
}

.profile-degrees p {
  margin: 0;
  line-height: 1.6;
}

/* Content links styling (paragraphs, profile degrees, etc.) */
p a,
.profile-degrees a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease, border-bottom 0.2s ease;
  border-bottom: 1px solid transparent;
}

p a:hover,
.profile-degrees a:hover {
  color: #0056b3;
  border-bottom: 1px solid #0056b3;
}

.job-title {
  color: gray;
  margin-top: 10px;
}

.profile-info {
  flex: 1;
  min-width: 260px;
}

/* .social-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
} */

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
}

/* Table Styles */
/* .custom-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.custom-table th, .custom-table td {
  padding: calc(var(--spacing-unit) * 1.5);
  border: 1px solid var(--color-border);
}

.custom-table th {
  background-color: var(--color-highlight);
  font-weight: bold;
}

.custom-table tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.02);
} */

/* Publication Styles */
.publication-title {
  display: flex;
  align-items: center;
}

.link-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-left: 5px;
}

.publication-venue {
  display: block;
  margin-top: 5px;
  font-style: italic;
  color: grey;
  font-size: 0.8em;
}

/* Footer Styles */
footer {
  text-align: center;
  padding: calc(var(--spacing-unit) * 2) 0;
  background-color: var(--color-highlight);
  border-top: 1px solid var(--color-border);
  margin-top: calc(var(--spacing-unit) * 3);
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* Footer */
footer p {
  margin: 0;
  font-size: 0.75em;
}

.counter-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.counter-text {
  font-size: 0.75em;
  margin-right: 2px;
}

.counter h4 {
  margin: 0;
  margin-right: calc(var(--spacing-unit) * 1.5);
  font-size: 1em;
  font-weight: 500;
}

#footer-counter {
  display: none;
}

#visitor-count {
  font-size: 0.75em;
  font-weight: 500;
}


/* Card Styles */
.cv-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.cv-card {
  display: grid;
  grid-template-areas:
    "logo title"
    "content content";
  grid-template-columns: 70px 1fr;
  gap: 4px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 12px;
  transition: transform 0.2s;
}

.cv-card-logo {
  grid-area: logo;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cv-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cv-card-header {
  grid-area: title;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4px 0;
}

.cv-card-header h3 {
  margin: 0;
  font-size: 1rem;
  color: #333;
  line-height: 1.2;
}

.cv-card-header p {
  margin: 4px 0 0 0;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.2;
}

.cv-card-content {
  grid-area: content;
  border-top: 1px solid #eee;
  padding-top: 4px;
  margin-top: 4px;
}

.cv-card-content p {
  margin: 6px 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #444;
}

.cv-card-content span {
  color: #666;
  font-weight: 500;
}

.cv-card a {
  text-decoration: none;
  color: #2563eb;
  font-weight: 500;
}

.cv-card a:hover {
  text-decoration: underline;
}

.cv-card:hover {
  transform: scale(1.01);
}

.alpha-saturate { /* Para as flags de idioma */
  opacity: 0.7;        /* Ajusta transparência */
  filter: saturate(0.6); /* Ajusta saturação */
}

/* Blog Post Styles */
.blog-post {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--section-gap);
  /* border-bottom: 1px solid #eee; */
  padding-bottom: var(--space-lg);
}

/* Align direct children of center-content in blog posts */
.center-content > h1,
.center-content > .subtitle,
.center-content > hr {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.blog-post h3 {
  margin-bottom: 10px;
}

.blog-post .date {
  font-style: italic;
  color: #888;
  margin-bottom: 10px;
}

/* Media Queries */
@media (max-width: 600px) {
  .container {
    padding: 0 var(--spacing-unit);
  }

  h1 { font-size: 2em; }
  h2 { font-size: 1.75em; }
  h3 { font-size: 1.3em; }
  h4 { font-size: 1.1em; }
  p { font-size: 0.8em; }
  table { font-size: 0.5em; }

  .custom-table td:nth-child(5),
  .custom-table th:nth-child(5) {
    display: none;
  }
  .card {
    grid-template-areas:
        "logo title"
        "content content";
    grid-template-columns: 60px 1fr;
  }

  .card-logo {
      width: 60px;
      height: 60px;
  }

  header ul {
    flex-wrap: wrap;
  }

  header li {
    margin: calc(var(--spacing-unit) / 2) var(--spacing-unit);
  }

  header a {
    font-size: 12px;
  }

  .tags {
    display: none;
  }

  .icons-container {
    flex-direction: column;
  }

  .icons-container img {
    margin-right: 0;
    margin-bottom: 0px;
  }

  .counter {
    flex-direction: column;
  }

  .counter h4 {
    margin-right: 0;
    margin-bottom: 10px;
  }
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* Publication Cards */
.publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.25rem;
  padding: 0;
}

.publication-card {
  display: flex;
  background: white;
  border: 1px solid #eaeaea;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 180px;
}

.publication-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-image {
  width: 100px; 
  min-width: 100px;
  height: 180px; 
  overflow: hidden;
  border-right: 1px solid #eaeaea;
  background-color: #f8f9fa; 
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.card-content {
  flex: 1;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Optional hover effect */
.card-image img:hover {
  transform: scale(1.05);
}

.publication-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: #1a202c;
  margin: 0 0 0.3rem 0 !important;
  margin-top: -0.4rem !important;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-clamp: 2;
  line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


.authors {
  font-size: 0.75rem;
  color: #4a5568;
  margin: 0 0 0.3rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.venue {
  font-size: 0.75rem;
  color: #718096;
  font-style: italic;
  margin: 0 0 0.3rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tag {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1;
}

.tag a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.tag a:hover {
  color: #0056b3;
}

.tag-type {
  background-color: #ebf5ff;
  color: #1e3a8a;
}

.tag-year {
  background-color: #f3f4f6;
  color: #1f2937;
}

.links {
  display: flex;
  gap: 0.375rem;
  align-items: center;
}

/* Boxed link styling for publication cards - matches profile social links */
.publication-card .links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 0.4rem;
  background: white;
  border: 1px solid #d1d5db;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  flex-shrink: 0;
  opacity: 0.85;
}

.publication-card .links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 1;
  border-color: #9ca3af;
}

.publication-card .links a img,
.link-icon {
  width: 16px;
  height: 16px;
  display: block;
  margin: 0;
  flex-shrink: 0;
}

.link-icon:hover {
  opacity: 1;
}

#footer {
  margin-top: auto;
}

/* Blog Card */
.blog-entries {
  margin-bottom: 40px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  margin: 24px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  background-color: #fff;
  overflow: hidden;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.blog-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid #eaeaea;
  margin: 0;
}

.blog-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.5em;
  color: #1a202c;
  font-weight: 600;
  line-height: 1.3;
}

.blog-card p {
  margin: 0 0 20px 0;
  color: #4a5568;
  line-height: 1.6;
  font-size: 1em;
}

.read-article-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95em;
  margin-top: auto;
  align-self: flex-start;
  transition: color 0.2s;
}

.read-article-link:hover {
  color: #0056b3;
}

.read-article-link .arrow {
  transition: transform 0.2s;
  font-size: 1.1em;
}

.read-article-link:hover .arrow {
  transform: translateX(4px);
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* Header Styles */
header {
  background-color: var(--color-highlight);
  border-bottom: 1px solid var(--color-border);
  padding: var(--spacing-unit) 0;
  margin-bottom: calc(var(--spacing-unit) * 2);
  position: relative;
}

header nav {
    display: flex;
    justify-content: center;
    align-items: center;
}

header nav ul {
  display: flex;
  justify-content: center;
  list-style-type: none;
  padding: 0;
  margin: 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-secondary);
    position: relative;
    transition: background-color 0.3s;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--color-secondary);
    transition: transform 0.3s, top 0.3s;
    left: 0;
}

.hamburger-icon::before { top: -8px; }
.hamburger-icon::after { top: 8px; }

/* Active state for hamburger (X shape) */
.mobile-menu-toggle.active .hamburger-icon {
    background-color: transparent;
}

.mobile-menu-toggle.active .hamburger-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-toggle.active .hamburger-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Add to survey.css */
.header-image {
  width: 100%;
  height: 200px;
  margin: 20px 0 30px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--gray-light);
}

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

header nav li {
  margin: 0 calc(var(--spacing-unit) * 1.5);
}

header nav a {
  color: var(--color-secondary);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, border-bottom 0.2s ease;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

header nav a:hover {
  color: var(--color-primary);
}

header nav a.active {
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
}

/* Code Block Styles */
.code-block-wrapper {
  position: relative;
  margin: 10px 0;
  background: #282c34;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(148, 148, 148, 0.99);
}

.code-block {
  padding: 12px;
  margin: 0;
  overflow-x: auto;
  color: #d4d4d4;
  font-size: 0.85rem;
  line-height: 1.4;
}

.code-block code {
  color: inherit;
}

.copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  background: #4a4a4a;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.copy-button:hover {
  opacity: 1;
}

/* Arxiv RSS styles */


.feed-intro {
    margin: 1.5rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: justify;
}

.articles-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.article-item {
  background: white;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.2s ease;
}

.arxiv-feed-container {
  margin: 20px 0;
}

.articles-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* @media (min-width: 900px) {
  .articles-list {
    grid-template-columns: 1fr 1fr;
  }
} */

.article-item {
  background: white;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.article-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-header {
  margin-bottom: 0.5rem;
}

.article-header a {
  color: #1a202c;
  font-weight: 500;
  font-size: 1.1rem;
  text-decoration: none;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
  color: #666;
  font-size: 0.9rem;
}

.article-meta .source {
  color: #007acc;
  font-weight: 500;
}

.description {
  color: #444;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0.5rem 0;
  text-align: justify;
}

.keywords {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
  font-style: italic;
}
.keywords .source-tag {
  background: #eef2ff;
  color: #1e3a8a;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-style: normal;
}

.comments {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #eaeaea;
}

.doi a {
  color: #007acc;
  text-decoration: none;
}

.doi a:hover {
  text-decoration: underline;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* RESPONSIVE DESIGN - Mobile First Approach */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

/* Tablet and below (768px) */
@media (max-width: 768px) {
  /* Container adjustments */
  .container {
    max-width: 100%;
    padding: 0 1rem;
    border-left: none;
    border-right: none;
  }

  /* Typography scaling */
  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  /* Publications grid */
  .publications-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .article-meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
  }
  
  .article-header a { 
    font-size: 1rem;
    line-height: 1.4;
  }
  
  .description { 
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  .keywords { 
    font-size: 0.85rem;
  }
  
  .publication-card {
    height: auto;
    min-height: 140px;
    padding: 1rem;
  }
  
  .card-image {
    width: 80px;
    min-width: 80px;
    height: 144px;
  }

  /* Profile section */
  .profile-section {
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
  }

  .profile-info,
  .profile-degrees {
    text-align: center;
  }

  .profile-picture {
    width: 150px;
    height: 150px;
    margin-bottom: 1rem;
  }

  /* Blog cards */
  .blog-card {
    padding: 1rem;
  }

  .blog-card img {
    height: 180px;
  }

  /* Feed filters */
  .feed-filters {
    padding: 1rem;
  }

  .filter-row {
    flex-direction: column;
    gap: 1rem;
  }

  /* Feature cards */
  .feature-card {
    min-width: 100%;
    flex: 1 1 100%;
  }

  /* Navigation adjustments */
  header nav {
      justify-content: flex-start;
      padding-left: 1rem;
  }

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

  header nav ul {
      display: none;
      flex-direction: column;
      flex-wrap: nowrap;
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
      background-color: var(--color-highlight);
      border-bottom: 1px solid var(--color-border);
      padding: 10px 0;
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
      z-index: 1000;
  }

  header nav ul.active {
      display: flex;
  }

  header nav li {
      margin: 10px 0;
      width: 100%;
      text-align: center;
  }

  nav ul {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  nav li {
    font-size: 0.9rem;
  }

  /* Share menu adjustments */
  .article-meta { 
    gap: 0.5rem; 
  }
  
  .share-menu { 
    min-width: 150px; 
    right: 0; 
  }
}

/* Mobile landscape and small tablets (600px) */
@media (max-width: 600px) {
  .container {
    padding: 0 0.75rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  /* Blog entries grid */
  .blog-entries {
    grid-template-columns: 1fr;
  }

  /* Buttons */
  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  /* Tables */
  table {
    font-size: 0.85rem;
  }

  th, td {
    padding: 0.5rem;
  }
}

/* Mobile portrait (480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }

  h1 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  h3 {
    font-size: 1rem;
  }

  /* Profile picture smaller on very small screens */
  .profile-picture {
    width: 120px;
    height: 120px;
  }

  /* Publication cards even more compact */
  .publication-card {
    padding: 0.75rem;
  }

  .card-image {
    width: 60px;
    min-width: 60px;
    height: 108px;
  }

  /* Feed items more compact */
  .feed-item {
    padding: 0.6rem 0.8rem;
  }

  .feed-title {
    font-size: 0.85rem;
  }

  .feed-meta-right {
    font-size: 0.75rem;
  }

  .feed-description {
    font-size: 0.8rem;
  }

  .articles-list {
    gap: 0.8rem;
  }

  /* Navigation */
  nav li {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
  }

  /* Buttons */
  .btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* Very small devices (360px) */
@media (max-width: 360px) {
  .container {
    padding: 0 0.5rem;
  }

  h1 {
    font-size: 1.2rem;
  }

  h2 {
    font-size: 1rem;
  }

  /* Even more compact cards */
  .publication-card {
    padding: 0.5rem;
  }

  .card-image {
    width: 50px;
    min-width: 50px;
    height: 90px;
  }

  .article-header a {
    font-size: 0.9rem;
  }

  .description {
    font-size: 0.85rem;
  }

  /* Profile */
  .profile-picture {
    width: 100px;
    height: 100px;
  }

  /* Blog cards */
  .blog-card img {
    height: 150px;
  }

  /* Feed items */
  .feed-title {
    font-size: 0.8rem;
  }

  .feed-meta-right {
    font-size: 0.7rem;
  }
}

/* Feature Section Styles */
.feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5em;
    margin: 1.5em 0;
}
.feature-card {
    flex: 1 1 260px;
    background: #f5f7fa;
    border-left: 4px solid #007bff;
    border-radius: 6px;
    padding: 1em 1.2em;
    margin-bottom: 1em;
    min-width: 220px;
}
.feature-card h4 {
    margin-top: 0;
    margin-bottom: 0.5em;
    color: #1976d2;
    font-size: 1.08em;
}
.pipeline-diagram {
    display: flex;
    justify-content: center;
    margin: 2em 0 1em 0;
}
.pipeline-caption {
    text-align: center;
    color: #666;
    font-size: 0.98em;
    margin-top: 0.5em;
    margin-bottom: 1.5em;
}

/* Feed Card Footer Tag Styles */
.feed-footer .category-tag {
    background-color: #ebf5ff;
    color: #1e3a8a;
    font-size: 0.75rem;
}

.feed-footer .source-tag {
    background-color: #f3f4f6;
    color: #1f2937;
    font-size: 0.75rem;
}

.feed-filters {
    margin: 1em 0;
    padding: 1em 1.5em 2.2em 1.5em;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    position: relative;
    min-height: 90px;
}
.filter-row {
    display: flex;
    gap: 2em;
    justify-content: flex-start;
    align-items: flex-end;
    width: 100%;
}
.filter-col {
    flex: 1 1 0;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
}
.filter-col label.filter-title {
    font-weight: bold;
    margin-bottom: 0.2em;
    color: #495057;
    margin-right: 0;
}
.filter-options-vert {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
}
.filter-options-vert label {
    font-weight: 400;
    margin-bottom: 0;
    margin-right: 0.5em;
    white-space: nowrap;
}
.filter-checkbox {
    margin-right: 0.4em;
    vertical-align: middle;
}
.sort-row {
    display: flex;
    align-items: center;
    gap: 0.5em;
}
#last-update-indicator {
    display: none;
}
.refresh-btn {
    padding: 4px 12px;
    background: #f5f5f5;
    border: 1px solid #c5c5c5;
    border-radius: 4px;
    color: #007bff;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.refresh-btn:hover {
    background: #e9ecef;
    color: #0056b3;
}

/* Source filter buttons */
.source-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.source-filter-btn {
  padding: 4px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: #f7f7f7;
  color: #333;
  cursor: pointer;
  font-size: 0.8rem;
}
.source-filter-btn .count { color: #777; margin-left: 4px; }
.source-filter-btn.active { 
    background: #eef2ff; 
    color: #1e3a8a; 
    border-color: #6366f1; 
    border-width: 2px;
    font-weight: 500;
}

/* Group color accents for both group and source buttons */
.group-arxiv { background: var(--col-arxiv); border-color: #bae6fd; }
.group-uxblogs { background: var(--col-uxblogs); border-color: #fecdd3; }
.group-github { background: var(--col-github); border-color: #d8b4fe; }
.group-mediumtags { background: var(--col-mediumtags); border-color: #bbf7d0; }

/* When active, keep a slightly stronger tone with thick border */
.source-filter-btn.active.group-arxiv { background: #bae6fd; color: #0c4a6e; border-color: #0284c7; border-width: 2px; }
.source-filter-btn.active.group-uxblogs { background: #fecdd3; color: #881337; border-color: #e11d48; border-width: 2px; }
.source-filter-btn.active.group-github { background: #d8b4fe; color: #581c87; border-color: #9333ea; border-width: 2px; }
.source-filter-btn.active.group-mediumtags { background: #bbf7d0; color: #14532d; border-color: #16a34a; border-width: 2px; }

/* Article tags styling */
.article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px 0; }
.article-tag { 
    background: #f0f9ff; 
    color: #0369a1; 
    padding: 2px 8px; 
    border-radius: 4px; 
    font-size: 0.7rem; 
    border: 1px solid #bae6fd;
}

/* Novelty badges */
.novelty { display: inline-block; margin-left: 6px; padding: 2px 6px; border-radius: 6px; font-size: 0.7rem; vertical-align: middle; }
.novelty-new { background: #d1fae5; color: #065f46; }
.novelty-hot { background: #fee2e2; color: #991b1b; }
.novelty-week { background: #fef3c7; color: #92400e; }

/* Share button */
.share-btn {
  margin-left: auto;
  padding: 2px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: #f7f7f7;
  color: #333;
  cursor: pointer;
  font-size: 0.75rem;
}
.share-btn:hover { background: #eef2ff; color: #1e3a8a; border-color: #c7d2fe; }

/* Copy link button */
.copy-link-btn {
  border: 1px solid #e0e0e0;
  background: #f7f7f7;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  cursor: pointer;
  margin-left: 4px;
  transition: background 0.15s, border-color 0.15s;
}
.copy-link-btn:hover { background: #eef2ff; color: #1e3a8a; border-color: #c7d2fe; }

/* Estilos de curator_v2.html */

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}
.error {
    color: #dc3545;
    text-align: center;
    padding: 20px;
    background: #f8d7da;
    border-radius: 5px;
    margin: 20px 0;
}
select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

/* Updated Feed Card Styles for more compact layout */
.feed-item {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    margin: 0.5em 0; /* Menos espaço entre cards */
    padding: 0.8em 1em 0.5em 1em; /* Menos padding vertical */
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}

.feed-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.em;
    margin: 0.1em 0 0.1em 0; /* Menos espaço acima/abaixo do título */
}

.feed-title {
    margin: 0;
    flex: 1;
    font-size: 1.02rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-width: 0;
}

.feed-meta-right {
    display: flex;
    align-items: flex-start;
    gap: 0.6em;
    font-size: 0.9em;
    color: #666;
    white-space: nowrap;
    margin-top: 0.05em;
}

.feed-header {
    margin-bottom: 0.1em;
}

.feed-description {
    color: #444;
    font-size: 0.95em;
    line-height: 1.6;
    margin: 0.5em 0;
}

.feed-footer {
    margin-top: auto;
    padding-top: 0.8em;
    border-top: 1px solid #eee;
    font-size: 0.9em;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.7em;
    flex-wrap: wrap;
}

/* Source and category tags styled like publication tags */
.source-tag,
.category-tag {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #fff;
    text-transform: uppercase;
}

/* Article relevance styled like publication badges */
.article-relevance {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #ebf5ff;
    color: #1e3a8a;
}

/* Updated Filter Box Styles */
.feed-filters {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 1.5em;  /* Increased padding */
    margin: 1em 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.filter-row {
    display: flex;
    justify-content: space-between;
    gap: 2em;
    align-items: flex-start; /* Alinha colunas no topo */
}

.filter-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8em;  /* Consistent spacing */
}

.filter-options-vert {
    display: flex;
    flex-direction: column;
    gap: 0.6em;  /* Consistent spacing between checkboxes */
}

.sort-row {
    display: flex;
    align-items: center;
    gap: 0.8em;  /* Match other gaps */
}

/* Summarize Button Styles */
.summarize-btn {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.8em;
    margin-left: auto; /* Push to right if flex */
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.summarize-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(167, 119, 227, 0.3);
}
.summarize-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}
.summary-box {
    background: #f8f9fa;
    border-left: 3px solid #a777e3;
    padding: 12px;
    margin-top: 12px;
    border-radius: 0 4px 4px 0;
    font-size: 0.95em;
    line-height: 1.5;
    color: #2c3e50;
    animation: fadeIn 0.3s ease;
}
.summary-title {
    font-weight: 600;
    color: #a777e3;
    margin-bottom: 4px;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Load More Button */
.load-more-container {
    text-align: center;
    padding: var(--space-lg) 0;
}
.load-more-btn {
    background: var(--neutral-lightest);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    transition: all 0.2s ease;
}
.load-more-btn:hover {
    background: var(--neutral-lighter);
    border-color: var(--text-muted);
}

/* ===================== */
/* Hero Section (Index)  */
/* ===================== */
.hero-section {
    padding: var(--section-padding) 0 var(--space-xl) 0;
    margin-bottom: 0;
}

.hero-card {
    display: flex;
    align-items: stretch;  /* Ambos ocupam mesma altura */
    gap: var(--gap-lg);
    padding: var(--space-xl);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: var(--border-medium);
    border-radius: 16px;
}

.hero-avatar {
    aspect-ratio: 1 / 1;  /* Quadrada */
    height: auto;
    width: auto;
    min-width: 120px;
    max-width: 180px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    filter: saturate(0.85) brightness(1.02);
    transition: filter 0.3s ease;
}

.hero-avatar:hover {
    filter: saturate(1) brightness(1);
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;  /* Start from top */
}

.hero-content h1 {
    font-size: var(--text-3xl);
    font-weight: var(--font-medium);
    margin: 0 0 4px 0;
    color: #1f2937;
    font-family: var(--font-heading);
}

.hero-role {
    font-size: var(--text-base);
    color: #4b5563;
    margin: 0;
}

.hero-company {
    color: #6b7280;
    font-weight: var(--font-normal);
}

.hero-company-link {
    color: #6b7280;
    font-weight: var(--font-normal);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
}

.hero-company-link:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.hero-location {
    font-size: var(--text-sm);
    color: #9ca3af;
    margin: 2px 0 12px 0;
}

.hero-bio {
    font-size: var(--text-base);
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 var(--space-md) 0;
    max-width: var(--content-max);
}

.hero-links {
    display: flex;
    gap: 0;
}

.hero-links .hero-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 10px;
    background: white;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    box-sizing: border-box;
    margin-right: 14px;
}

.hero-links .hero-link:last-child {
    margin-right: 0;
}

.hero-links .hero-link:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.hero-links .hero-link img {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px;
    max-height: 18px;
    opacity: 0.65;
    display: block;
    flex-shrink: 0;
}

.hero-links .hero-link:hover img {
    opacity: 1;
}

@media (max-width: 600px) {
    .hero-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px;
    }
    
    .hero-avatar {
        width: 120px;
        height: 120px;
        min-width: 120px;
        max-width: 120px;
        aspect-ratio: 1 / 1;
    }
    
    .hero-bio {
        text-align: center;
    }
    
    .hero-links {
        justify-content: center;
    }
}

/* Skills Section - Compact bar */
.skills-section {
    padding: var(--space-lg) 0;
    margin: 0 0 var(--space-xl) 0;
    border-bottom: var(--border-light);
}

.skills-section h2 {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    font-weight: var(--font-medium);
    margin-bottom: 20px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-lg);
}

.skill-category h3 {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: #1f2937;
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.skill-category p {
    font-size: var(--text-sm);
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ===================== */
/* Clean Index Sections  */
/* ===================== */

/* Intro Section - legacy, keeping for compatibility */
.intro-section {
    margin: 32px 0 40px 0;
}

.intro-text {
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    color: #1f2937;
    line-height: 1.5;
    margin-bottom: 16px;
}

.intro-subtitle {
    font-size: var(--text-base);
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 16px;
}

.intro-past {
    font-size: var(--text-sm);
    color: #6b7280;
    line-height: 1.6;
}

.intro-past a {
    color: #6b7280;
    text-decoration: none;
    border-bottom: 1px solid #d1d5db;
    transition: all 0.2s;
}

.intro-past a:hover {
    color: #1f2937;
    border-bottom-color: #1f2937;
}

/* Writing Section */
.writing-section {
    margin: 0 0 var(--space-xl) 0;
}

.writing-section h2 {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    font-weight: var(--font-medium);
    margin-bottom: var(--space-md);
}

.writing-list {
    display: flex;
    flex-direction: column;
}

.writing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: var(--border-light);
    text-decoration: none;
    transition: all 0.2s;
}

.writing-item:first-child {
    border-top: var(--border-light);
}

.writing-item:hover {
    padding-left: 8px;
}

.writing-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.writing-title {
    color: #1f2937;
    font-weight: var(--font-medium);
}

.writing-excerpt {
    font-size: var(--text-sm);
    color: #9ca3af;
}

.writing-item:hover .writing-title {
    color: var(--color-primary);
}

.writing-arrow {
    color: #d1d5db;
    transition: all 0.2s;
}

.writing-item:hover .writing-arrow {
    color: var(--color-primary);
    transform: translateX(4px);
}

.see-more {
    display: inline-block;
    margin-top: 16px;
    font-size: var(--text-sm);
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.see-more:hover {
    color: var(--color-primary);
}

/* Publications Section - Clean List Style */
.publications-section {
    margin: 0 0 var(--section-gap) 0;
}

.publications-section h2 {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    font-weight: var(--font-medium);
    margin-bottom: var(--space-md);
}

.research-list {
    display: flex;
    flex-direction: column;
}

.research-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 0;
    border-bottom: var(--border-light);
    text-decoration: none;
    transition: all 0.2s;
}

.research-item:first-child {
    border-top: var(--border-light);
}

.research-item:hover {
    padding-left: 8px;
}

.research-title {
    color: #1f2937;
    font-weight: var(--font-medium);
    font-size: var(--text-base);
    line-height: 1.4;
}

.research-item:hover .research-title {
    color: var(--color-primary);
}

.research-venue {
    font-size: var(--text-sm);
    color: #9ca3af;
}

.section-intro {
    font-size: var(--text-sm);
    color: #6b7280;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

/* Publications Section */
.publications-section {
    margin: 32px 0 48px 0;
}

.publications-section h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    font-weight: 500;
    margin-bottom: 16px;
}

/* ===================== */
/* Publications Intro    */
/* ===================== */
.publications-intro {
    color: #6b7280;
    margin-bottom: 16px;
}

.publications-intro a {
    color: var(--color-primary);
}

/* Year Heading for Publications Page */
.year-heading {
    margin-top: 32px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
    color: #374151;
}

/* Citations Tag */
.tag-citations {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: 500;
}

/* Legacy styles - keeping for backward compatibility */
.current-work {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 16px 24px;
    margin: 16px 0 24px 0;
    border: 1px solid #e2e8f0;
}

.current-work ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.current-work li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

.current-work li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 600;
}

.current-work li strong {
    color: #1e293b;
}

.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.recent-post-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.recent-post-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
    transform: translateX(4px);
}

.recent-post-card a {
    display: block;
    padding: 16px 20px;
    text-decoration: none;
    color: inherit;
}

.recent-post-card .post-title {
    display: block;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.recent-post-card .post-desc {
    display: block;
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.4;
}

.see-all-link {
    margin-top: 8px;
}

.see-all-link a {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}

.see-all-link a:hover {
    text-decoration: underline;
}

/* ===================== */
/* CV Page - Clean Style */
/* ===================== */

.cv-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--section-padding) 0 var(--space-lg) 0;
    gap: var(--space-lg);
}

.cv-hero-header h1 {
    font-size: var(--text-3xl);
    font-weight: var(--font-medium);
    color: #1f2937;
    margin: 0 0 var(--space-sm) 0;
    font-family: var(--font-heading);
}

.cv-hero-subtitle {
    font-size: var(--text-base);
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
    max-width: var(--narrow-max);
}

.cv-hero-decoration {
    flex-shrink: 0;
    opacity: 0.6;
}

@media (max-width: 600px) {
    .cv-hero {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cv-hero-decoration {
        display: none;
    }
}

.cv-section {
    margin-bottom: var(--section-gap);
}

.cv-section h2 {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    font-weight: var(--font-medium);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: var(--border-light);
}

/* Timeline Style */
.cv-timeline {
    display: flex;
    flex-direction: column;
}

.cv-timeline-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: var(--border-light);
}

.cv-timeline-item:first-child {
    padding-top: 0;
}

.cv-timeline-item:last-child {
    border-bottom: none;
}

.cv-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
    background: #f8fafc;
    padding: 8px;
    border: 1px solid #e2e8f0;
    opacity: 0.5;
    filter: grayscale(0.3);
    transition: all 0.3s ease;
}

.cv-timeline-item:hover .cv-logo {
    opacity: 1;
    filter: grayscale(0);
}

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

.cv-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
}

.cv-timeline-title h3 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: #1f2937;
    margin: 0 0 2px 0;
}

.cv-company {
    font-size: var(--text-sm);
    color: #6b7280;
}

.cv-period {
    font-size: var(--text-sm);
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}

.cv-description {
    font-size: var(--text-sm);
    color: #4b5563;
    line-height: 1.5;
    margin: 0 0 8px 0;
}

.cv-description a {
    color: #4b5563;
    text-decoration: none;
    border-bottom: 1px solid #d1d5db;
    transition: all 0.2s;
}

.cv-description a:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.cv-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cv-tags span {
    font-size: var(--text-xs);
    color: #6b7280;
    background: #f3f4f6;
    padding: 3px 10px;
    border-radius: 12px;
}

/* Collapsed items - less prominent */
.cv-timeline-collapsed .cv-timeline-title h3 {
    font-weight: var(--font-medium);
    font-size: var(--text-base);
}

.cv-timeline-collapsed .cv-description {
    font-size: var(--text-sm);
    color: #6b7280;
}

/* List Style (for certifications) */
.cv-list {
    display: flex;
    flex-direction: column;
}

.cv-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--gap-sm) 0;
    border-bottom: var(--border-light);
}

.cv-list-item:first-child {
    border-top: var(--border-light);
}

.cv-list-title {
    font-size: var(--text-sm);
    color: #1f2937;
    font-weight: var(--font-medium);
}

.cv-list-meta {
    font-size: var(--text-sm);
    color: #9ca3af;
    white-space: nowrap;
}

/* Languages */
.cv-languages {
    display: flex;
    gap: var(--gap-lg);
}

.cv-language {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cv-language-name {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: #1f2937;
}

.cv-language-level {
    font-size: 0.8rem;
    color: #9ca3af;
}

@media (max-width: 600px) {
    .cv-timeline-header {
        flex-direction: column;
        gap: 4px;
    }
    
    .cv-period {
        order: -1;
    }
    
    .cv-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .cv-languages {
        flex-direction: column;
        gap: 16px;
    }
}

/* ===================== */
/* Page Hero - Shared    */
/* ===================== */

.page-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--section-padding) 0 var(--space-lg) 0;
    gap: var(--space-lg);
}

.page-hero-header h1,
.page-hero-content h1 {
    font-size: var(--text-3xl);
    font-weight: var(--font-medium);
    color: #1f2937;
    margin: 0 0 var(--space-sm) 0;
    font-family: var(--font-heading);
}

.page-hero-subtitle {
    font-size: var(--text-base);
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
    max-width: var(--content-max);
}

.page-hero-subtitle code {
    font-size: var(--text-sm);
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    color: #4b5563;
}

.rss-subscribe {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #6b7280;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
}

.rss-subscribe:hover {
    background: #f1f5f9;
    color: #4b5563;
    border-color: #cbd5e1;
}

.rss-subscribe svg {
    opacity: 0.7;
}

/* ===================== */
/* Blog - Featured Card  */
/* ===================== */

.blog-featured {
    margin-bottom: var(--section-gap);
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
}

.featured-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.featured-image {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s;
}

.featured-image img[loading="lazy"] {
    opacity: 0;
}

.featured-image img.loaded,
.featured-image img:not([loading="lazy"]) {
    opacity: 1;
}

.featured-card:hover .featured-image img {
    transform: scale(1.03);
}

.featured-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #1f2937;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 5px 10px;
    border-radius: 6px;
}

.featured-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Push link to bottom for consistent layout */
}

.featured-content h2 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: #1f2937;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.featured-content p {
    font-size: var(--text-base);
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.featured-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-primary);
  transition: color 0.2s;
}

.featured-card:hover .featured-link {
    color: #0056b3;
}

.featured-link .arrow { font-size: 1.05em; transition: transform 0.2s; }
.featured-card:hover .featured-link .arrow { transform: translateX(4px); }

/* ===================== */
/* Blog - List Style     */
/* ===================== */

.blog-section {
    margin-bottom: var(--section-gap);
}

.blog-section h2 {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    font-weight: var(--font-medium);
    margin-bottom: var(--space-md);
}

.blog-list {
    display: flex;
    flex-direction: column;
}

.blog-list-item {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    padding: var(--space-md) 0;
    border-bottom: var(--border-light);
    text-decoration: none;
    transition: all 0.2s;
}

.blog-list-item:first-child {
    border-top: var(--border-light);
}

.blog-list-item:hover {
    padding-left: 8px;
}

.blog-list-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.blog-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s, opacity 0.3s;
}

.blog-list-thumb img[loading="lazy"] {
    opacity: 0;
}

.blog-list-thumb img.loaded,
.blog-list-thumb img:not([loading="lazy"]) {
    opacity: 1;
}

.blog-list-item:hover .blog-list-thumb img {
    transform: scale(1.05);
}

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

.blog-list-content h3 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: #1f2937;
    margin: 0 0 4px 0;
    transition: color 0.2s;
}

.blog-list-item:hover .blog-list-content h3 {
    color: var(--color-primary);
}

.blog-list-content p {
    font-size: var(--text-sm);
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-list-arrow {
    color: #d1d5db;
    font-size: var(--text-lg);
    transition: all 0.2s;
    flex-shrink: 0;
}

.blog-list-item:hover .blog-list-arrow {
    color: var(--color-primary);
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .page-hero {
        flex-direction: column;
        gap: 16px;
    }
    
    .featured-card {
        grid-template-columns: 1fr;
    }
    
    .featured-image {
        height: 200px;
    }
    
    .featured-content {
        padding: 24px;
    }
    
    .blog-list-thumb {
        width: 60px;
        height: 60px;
    }
}

/* ===================== */
/* Publications Page     */
/* ===================== */

.profile-link-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #4b5563;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
}

.profile-link-btn:hover {
    background: #f1f5f9;
    color: #1f2937;
    border-color: #cbd5e1;
}

.profile-link-btn img {
    opacity: 0.7;
}

/* Stats Bar */
.pub-stats {
    display: flex;
    gap: var(--section-gap);
    padding: var(--space-lg) 0;
    margin-bottom: var(--space-xl);
    border-bottom: var(--border-light);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-number {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: #1f2937;
}

.stat-label {
    font-size: var(--text-sm);
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Publications Section */
.pub-section {
    margin-bottom: var(--section-gap);
}

.pub-section h2 {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    font-weight: var(--font-medium);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: var(--border-light);
}

.pub-list {
    display: flex;
    flex-direction: column;
}

.pub-item {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    padding: var(--space-md) 0;
    border-bottom: var(--border-light);
    text-decoration: none;
    transition: all 0.2s;
}

.pub-item:first-child {
    border-top: var(--border-light);
}

.pub-item:hover {
    padding-left: 8px;
}

.pub-thumb {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.pub-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s, opacity 0.3s;
}

.pub-thumb img[loading="lazy"] {
    opacity: 0;
}

.pub-thumb img.loaded,
.pub-thumb img:not([loading="lazy"]) {
    opacity: 1;
}

.pub-item:hover .pub-thumb img {
    transform: scale(1.05);
}

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

.pub-type {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-bottom: 4px;
    display: block;
}

.pub-content h3 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: #1f2937;
    margin: 0 0 6px 0;
    line-height: 1.4;
    transition: color 0.2s;
}

.pub-item:hover .pub-content h3 {
    color: var(--color-primary);
}

.pub-authors {
    font-size: var(--text-sm);
    color: #6b7280;
    margin: 0 0 2px 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pub-venue {
    font-size: var(--text-sm);
    color: #9ca3af;
    margin: 0;
}

.pub-arrow {
    color: #d1d5db;
    font-size: var(--text-lg);
    transition: all 0.2s;
    flex-shrink: 0;
}

.pub-item:hover .pub-arrow {
    color: var(--color-primary);
    transform: translateX(4px);
}

/* Award highlight */
.pub-item-award {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    border-radius: 8px;
    border: none !important;
}

.pub-item-award + .pub-item {
    border-top: none;
}

.award-badge {
    color: #d97706;
    font-weight: 600;
}

@media (max-width: 600px) {
    .pub-stats {
        gap: 24px;
        flex-wrap: wrap;
    }
    
    .pub-thumb {
        width: 60px;
        height: 60px;
    }
    
    .pub-content h3 {
        font-size: var(--text-sm);
    }
}