/* Clean Professional Design - Inspired by Hugo Winston Theme */

:root {
  color-scheme: light;
  --primary-color: #2c3e50;
  --secondary-color: #34495e;
  --accent-color: #7b16ff;
  --text-primary: #1a1a1a;
  --text-secondary: #7f8c8d;
  --text-light: #bdc3c7;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-accent: #ecf0f1;
  --border-color: #dee2e6;
  --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #ecf0f1;
    --secondary-color: #bdc3c7;
    --accent-color: #9b59b6;
    --text-primary: #ecf0f1;
    --text-secondary: #95a5a6;
    --text-light: #7f8c8d;
    --bg-primary: #2c3e50;
    --bg-secondary: #34495e;
    --bg-accent: #3c4f66;
    --border-color: #4a5f7a;
    --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-heavy: 0 10px 25px rgba(0, 0, 0, 0.4);
  }
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 70px; /* Compensate for fixed header */
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 100px; /* Increased for mobile header */
  }
}

@media (max-width: 930px) {
  html {
    scroll-padding-top: 130px; /* Increased for small mobile header */
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Header */
.site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background: var(--bg-primary) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000 !important;
  transition: all 0.3s ease;
  width: 100% !important;
  box-sizing: border-box !important;
}


.nav-inner {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.brand:hover {
  color: var(--accent-color);
  text-decoration: none;
}

nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  text-decoration: none;
}

nav a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Main Content */
main {
  margin-top: 80px !important;
  min-height: calc(100vh - 80px);
  padding-top: 0 !important;
  position: relative;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Hero Section */
.hero {
  background: var(--bg-primary);
  padding: 4rem 2rem;
  text-align: center;
  /* border-bottom: 1px solid var(--border-color); */
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-weight: 400;
}

.hero-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-color);
}

.author-info h3 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.author-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Sections */
.section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border-color);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--text-primary);
}

.section-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Article Grid */
.articles-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

#articles-container {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

/* Ensure articles section is always visible */
#articoli {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

.article-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  border-color: var(--accent-color);
}

.article-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-accent);
}

.article-content {
  padding: 1.5rem;
}

.article-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.4;
}

.article-title a {
  color: inherit;
  text-decoration: none;
}

.article-title a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.article-excerpt {
  color: var(--text-secondary);
  /* font-size: 0.95rem; */
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 1rem;

}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.article-source {
  background: var(--bg-accent);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

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

.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

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

.project-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.project-title a {
  color: inherit;
  text-decoration: none;
}

.project-title a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

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

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

.tag {
  background: rgba(var(--accent-color-rgb, 123, 22, 255), 0.1);
  color: var(--accent-color);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

/* .tag:hover {
  background: rgba(var(--accent-color-rgb, 123, 22, 255), 0.2);
  transform: translateY(-1px);
} */

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}

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

.about-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border: 4px solid var(--border-color);
}

.social-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1rem;
  justify-items: center;
  margin-top: 1.5rem;
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
}

.social-link {
  display: inline-block;
  /* padding: 0.75rem;
  background: var(--bg-accent); */
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: transparent !important;
  color: var(--accent-color) !important;
  text-decoration: none;
  transform: translateY(-2px);
}

.about-text {
  font-size: 1.1rem;
  line-height: 1.8;
}

.about-text a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed var(--text-secondary);
  transition: all 0.3s ease;
}

.about-text a:hover {
  text-decoration: none;
  border-bottom: 1px solid var(--accent-color);
}

/* Timeline */
.timeline {
  max-width: 600px;
  margin: 0 auto;
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

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

.timeline-date {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--accent-color);
  width: 100px;
}

.timeline-content h4 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.timeline-content p {
  color: var(--text-secondary);
  margin: 0;
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 2rem 2rem;
  margin-top: 4rem;
  text-align: center;
  color: var(--text-secondary);
}

/* Article Styles */
.article-single {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.article-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.article-meta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.back-link {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}

.back-link:hover {
  text-decoration: underline;
}

.article-date {
  color: var(--text-secondary);
}

.article-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 700;
}

.article-single .article-excerpt {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-style: italic;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.article-featured-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.article-body {
  line-height: 1.8;
  color: var(--text-primary);
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.article-body h1 {
  font-size: 2.2rem;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
}

.article-body h2 {
  font-size: 1.8rem;
  color: var(--accent-color);
}

.article-body h3 {
  font-size: 1.4rem;
}

.article-body p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body blockquote {
  border-left: 4px solid var(--accent-color);
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  font-style: italic;
  border-radius: 0 8px 8px 0;
}

.article-body blockquote p {
  margin-bottom: 0;
}

.article-body code {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
  border: 1px solid #333;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.article-body pre {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  overflow-x: auto;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  border-left: 4px solid var(--accent-color);
}

.article-body pre code {
  background: none;
  padding: 0;
  color: #d4d4d4;
  font-size: 0.9rem;
  line-height: 1.6;
  border: none;
  box-shadow: none;
}

.article-body pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary, #ff6ec7));
  border-radius: 8px 8px 0 0;
}

.article-body strong {
  font-weight: 700;
  color: var(--text-primary);
}

.article-body em {
  font-style: italic;
  color: var(--accent-color);
}

.article-body a {
  color: var(--accent-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.article-body a:hover {
  border-bottom-color: var(--accent-color);
}

.article-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.article-author {
  font-weight: 500;
  color: var(--text-secondary);
}

.article-navigation .btn {
  background: var(--accent-color);
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.3s ease;
}

.article-navigation .btn:hover {
  background: var(--accent-secondary, #4da6d9);
}

/* Article List Styles */
.articles-list {
  max-width: 900px;
  margin: 0 auto;
}

.year-group {
  margin-bottom: 3rem;
}

.year-title {
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  font-weight: 700;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
}

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

.article-list-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.article-list-title {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.article-list-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.article-list-title a:hover {
  color: var(--accent-color);
}

.article-list-excerpt {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.article-list-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.article-list-date {
  color: var(--text-secondary);
  font-weight: 500;
}

.article-list-tags {
  display: flex;
  gap: 0.5rem;
}

.tag-small {
  background: rgba(var(--accent-color-rgb, 123, 22, 255), 0.1);
  color: var(--accent-color);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

/* Article grid styles */
.article-title {
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
  .site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: var(--bg-primary) !important;
    z-index: 1000 !important;
  }
  
  .nav-inner {
    padding: 0.875rem 1rem !important;
  }
  
  nav {
    gap: 0.75rem !important;
  }
  
  nav a {
    font-size: 0.8rem !important;
    padding: 0.3rem 0.4rem !important;
  }
  
  main {
    margin-top: 90px !important;
  }
  
  
  .hero {
    padding: 2.5rem 1rem;
  }
  
  .hero-title {
    font-size: clamp(2rem, 7vw, 2.8rem);
  }
  
  .section {
    padding: 2.5rem 1rem;
  }
  
  .article-single {
    padding: 1rem;
  }
  
  .article-title {
    font-size: 1.8rem;
  }
  
  .article-body h1 {
    font-size: 1.6rem;
  }
  
  .article-body h2 {
    font-size: 1.4rem;
  }
  
  .article-body {
    font-size: 1.1rem;
  }
  
  .article-footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .article-list-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .timeline-item {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .timeline-date {
    width: auto;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .article-card {
    margin-bottom: 1rem;
  }
}

@media (max-width: 930px) {
  .site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: var(--bg-primary) !important;
    z-index: 1000 !important;
  }
  
  .nav-inner {
    flex-direction: column !important;
    gap: 0.5rem !important;
    padding: 0.75rem 1rem !important;
  }
  
  nav {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    margin: 0 !important;
  }
  
  nav a {
    font-size: 0.75rem !important;
    padding: 0.3rem 0.5rem !important;
    margin: 0 !important;
    display: inline-block !important;
  }
  
  main {
    margin-top: 120px !important;
    padding-top: 0 !important;
  }
  
  
  .hero {
    padding: 1.5rem 1rem !important;
    margin-top: 0 !important;
  }
  
  .hero-title {
    font-size: clamp(1.6rem, 7vw, 2.2rem) !important;
    line-height: 1.1 !important;
    margin-bottom: 1rem !important;
  }
  
  .hero-subtitle {
    font-size: clamp(0.9rem, 3vw, 1.1rem) !important;
  }
  
  .hero-author {
    margin-top: 1.5rem;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .author-info h3 {
    font-size: 0.9rem;
  }
  
  .author-info p {
    font-size: 0.8rem;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
  }
  
  .article-content {
    padding: 1.25rem;
  }
  
  .article-title {
    font-size: 1.1rem !important;
    line-height: 1.3;
  }
  
  .article-excerpt {
    font-size: 0.95rem !important;
    line-height: 1.5;
  }
  
  .section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: 1.5rem;
  }
  
  .section-intro {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mb-3 {
  margin-bottom: 3rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

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


/* Images Feed Section - Twitter-like styling */
.images-feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.image-card {
  position: relative;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: var(--shadow-light);
}

.image-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
  border-color: var(--accent-color);
}

.feed-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
  background: var(--bg-accent);
}

.image-card:hover .feed-image {
  transform: scale(1.02);
}

.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 1.5rem 1rem 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.image-card:hover .image-overlay {
  transform: translateY(0);
}

.image-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: white;
}

.image-description {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

.image-date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.images-more {
  text-align: center;
  margin-top: 2rem;
}

.images-more .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.images-more .btn:hover {
  background: var(--accent-color);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
}

/* Responsive images feed */
@media (max-width: 768px) {
  .images-feed {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  .image-overlay {
    position: static;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: none;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
  }
  
  .image-title {
    color: var(--text-primary);
  }
  
  .image-description {
    color: var(--text-secondary);
  }
  
  .image-date {
    color: var(--text-light);
  }
}

/* Homepage Images Feed - Twitter-like styling (matching creativity page) */
.homepage-images-feed {
  max-width: 600px;
  margin: 0 auto 3rem;
}

.homepage-feed-post {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-light);
}

.homepage-feed-post:hover {
  box-shadow: var(--shadow-medium);
  border-color: var(--accent-color);
}

.homepage-feed-post .post-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.homepage-feed-post .post-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.homepage-feed-post .author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  background: var(--bg-accent);
}

.homepage-feed-post .author-info {
  display: flex;
  flex-direction: column;
}

.homepage-feed-post .author-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.homepage-feed-post .post-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.homepage-feed-post .post-content {
  margin-bottom: 1rem;
}

.homepage-feed-post .post-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.homepage-feed-post .post-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.homepage-feed-post .post-image-container {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.homepage-feed-post .post-image-container:hover {
  transform: scale(1.02);
}

.homepage-feed-post .post-image {
  width: 100%;
  height: auto;
  max-height: 350px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  /* background: var(--bg-accent); */
}

.homepage-feed-post .expand-btn {
  background: var(--bg-accent);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  /* padding: 0.3rem 0.6rem; */
  border-radius: 16px;
  margin-left: 0.5rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  vertical-align: middle;
}

.homepage-feed-post .expand-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: translateY(-1px);
}

.homepage-feed-post .expand-btn svg {
  transition: transform 0.3s ease;
}

/* Media container for homepage feed */
.homepage-feed-post .post-media-container {
  border-radius: 12px;
  overflow: hidden;
  /* border: 1px solid var(--border-color); */
  cursor: pointer;
  transition: transform 0.3s ease;
  margin-top: 1rem;
}

.homepage-feed-post .post-media-container:hover {
  transform: scale(1.02);
}

.homepage-feed-post .post-media-container .post-image {
  width: 100%;
  height: auto;
  max-height: 350px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  /* background: var(--bg-accent); */
}

.homepage-feed-post .post-media-container .post-video {
  width: 100%;
  height: auto;
  max-height: 350px;
  display: block;
  cursor: default;
  border-radius: 8px;
}

.homepage-feed-post .post-media-container .post-video:hover {
  transform: none;
}

.homepage-feed-post .post-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.homepage-feed-post .action-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.homepage-feed-post .action-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.homepage-feed-post .post-description-container {
  margin-bottom: 1rem;
}

.homepage-feed-post .expand-btn {
  background: var(--bg-accent);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  border-radius: 16px;
  margin-left: 0.5rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  vertical-align: middle;
}

.homepage-feed-post .expand-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: translateY(-1px);
}

.homepage-feed-post .expand-btn svg {
  transition: transform 0.3s ease;
}

/* Responsive for homepage feed */
@media (max-width: 768px) {
  .homepage-images-feed {
    max-width: 100%;
    padding: 0 1rem;
  }
  
  .homepage-feed-post {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
  }
  
  .homepage-feed-post .post-media-container .post-image,
  .homepage-feed-post .post-image {
    max-height: 250px;
  }
}
/* Articles pagination */
.articles-info {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  opacity: 0.8;
}

.articles-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.pagination-numbers {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.pagination-btn,
.pagination-num {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  background: var(--bg-accent);
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  text-decoration: none;
  user-select: none;
}

.pagination-btn:hover,
.pagination-num:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: translateY(-1px);
}

.pagination-num.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  font-weight: 600;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Loading state for articles */
#articles-container {
  transition: opacity 0.3s ease;
}

/* Responsive pagination */
@media (max-width: 768px) {
  .articles-pagination {
    gap: 0.5rem;
  }
  
  .pagination-btn,
  .pagination-num {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .pagination-numbers {
    gap: 0.3rem;
  }
}

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

/* Button focus management - prevent ugly blue outlines */
button:focus:not(:focus-visible) {
  outline: none;
}

.expand-btn:focus:not(:focus-visible) {
  outline: none;
}