/* Clean Modern Minimalist Style - Light and Dark Theme Support */

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #6c757d;
  --text-muted: #868e96;
  --accent-primary: #2563eb;
  --accent-secondary: #1d4ed8;
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --border-color: #e5e7eb;
  --border-hover: #cbd5e1;
  --container-max: 1400px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

.theme-dark {
  --bg-primary: #0a0f14;
  --bg-secondary: #111926;
  --bg-card: #162130;
  --text-primary: #e0e9f5;
  --text-secondary: #9aa6b5;
  --text-muted: #7a8696;
  --accent-primary: #ff8c00;
  --accent-secondary: #e67000;
  --accent-gradient: linear-gradient(135deg, #ff8c00 0%, #e67000 100%);
  --border-color: rgba(255, 140, 0, 0.15);
  --border-hover: rgba(255, 140, 0, 0.3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

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

strong {
  color: var(--text-primary);
  font-weight: 600;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.theme-toggle:hover {
  background: var(--bg-secondary);
  color: var(--accent-primary);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--transition-normal);
}

.site-header {
  background: rgba(255, 255, 255, 0.9);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background-color var(--transition-normal);
}

.theme-dark .site-header {
  background: rgba(10, 15, 20, 0.9);
}

.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.site-logo:hover {
  opacity: 0.8;
}

.logo-img {
  height: 30px;
  width: auto;
  display: block;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.menu-toggle {
  display: none;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-primary);
}

.hero-section {
  background: var(--bg-primary);
  padding: 5rem 2rem 3.5rem;
  text-align: center;
}

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

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-weight: 400;
  line-height: 1.6;
}

.hero-button {
  display: inline-block;
  background: var(--accent-gradient);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.hero-button:hover {
  background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
  text-decoration: none;
}

.home-layout,
.content-wrapper {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 3.5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
}

.main-column {
  min-width: 0;
}

.welcome-card,
.sidebar-section,
.post-article,
.portfolio-article {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.welcome-card {
  padding: 2.5rem;
}

.welcome-card h2 {
  color: var(--text-primary);
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.welcome-card h3 {
  color: var(--accent-primary);
  font-size: 1.125rem;
  margin: 2rem 0 1rem;
  font-weight: 600;
}

.open-source-list {
  margin-top: 1.5rem;
}

.os-item {
  margin-bottom: 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border-color);
}

.os-item:last-child {
  border-left: none;
}

.os-item strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.25rem;
}

.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-section {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-title {
  color: var(--accent-primary);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
}

.latest-posts {
  margin-bottom: 1rem;
}

.sidebar-post-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-post-item:last-child {
  border-bottom: none;
}

.sidebar-post-item .post-title {
  font-size: 0.875rem;
}

.sidebar-post-item .post-title:hover {
  color: var(--accent-primary);
}

.sidebar-post-item .post-date {
  color: var(--text-muted);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.view-all-posts {
  display: inline-block;
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.875rem;
  margin-top: 1rem;
}

.view-all-posts:hover {
  color: var(--accent-secondary);
}

.categories-list {
  list-style: none;
}

.categories-list li {
  margin-bottom: 0.5rem;
}

.categories-list a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.categories-list a:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.content-wrapper.full-width {
  display: block;
}

.content-wrapper.full-width .main-column {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.content-wrapper.gallery-full-width {
  display: block;
  padding: 3.5rem 2rem;
}

.content-wrapper.gallery-full-width .main-column {
  max-width: 100%;
  margin: 0;
  padding: 0;
  grid-column: 1 / -1;
}

.content-wrapper.gallery-full-width .sidebar {
  display: none;
}

.content-wrapper.gallery-full-width .gallery-grid {
  max-width: none;
  width: 100%;
  padding-left: 2rem;
  padding-right: 2rem;
}

.main-column h1 {
  color: var(--text-primary);
  font-size: 2.25rem;
  margin-bottom: 2rem;
  font-weight: 700;
}

.post-list {
  list-style: none;
}

.post-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

.post-item h2 {
  margin-bottom: 0.5rem;
}

.post-item h2 a {
  color: var(--text-primary);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.4;
}

.post-item h2 a:hover {
  color: var(--accent-primary);
}

.post-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.post-excerpt {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.post-item a {
  color: var(--accent-primary);
  font-weight: 600;
}

.post-article {
  padding: 2.5rem;
}

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

.post-title {
  color: var(--text-primary);
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.post-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.post-meta time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-meta svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

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

.post-content h2,
.post-content h3,
.post-content h4 {
  color: var(--text-primary);
  margin: 2.5rem 0 1.25rem;
  font-weight: 700;
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
  margin: 1.25rem 0;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.625rem;
}

.post-content code {
  background: var(--bg-secondary);
  color: var(--accent-primary);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-family: 'SFMono-Medium', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.9em;
}

.post-content pre {
  background: var(--bg-secondary);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--border-color);
}

.post-content pre code {
  background: none;
  color: var(--text-primary);
  padding: 0;
}

.post-content blockquote {
  border-left: 3px solid var(--accent-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--bg-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.post-content img,
.post-featured-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  display: block;
}

/* Image helper classes for kramdown inline styles */
/* These classes are applied by Hugo/kramdown to the img tag directly */
.post-content img.img-full,
.post-content figure.img-full img {
  max-width: 100% !important;
  width: 100% !important;
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}

.post-content img.img-center,
.post-content figure.img-center img {
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
}

.post-content img.img-shadow,
.post-content figure.img-shadow img {
  box-shadow: var(--shadow-lg) !important;
}

/* Combined classes for full-width centered images with shadow */
.post-content img.img-full.img-center,
.post-content figure.img-full.img-center img {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.post-content img.img-full.img-shadow,
.post-content figure.img-full.img-shadow img,
.post-content img.img-center.img-shadow,
.post-content figure.img-center.img-shadow img,
.post-content img.img-full.img-center.img-shadow,
.post-content figure.img-full.img-center.img-shadow img {
  box-shadow: var(--shadow-lg) !important;
}

/* Figcaption styling for image captions */
.post-content figure figcaption,
.post-content figcaption {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-align: right !important;
  color: var(--text-muted) !important;
  margin-top: 0.5rem !important;
  padding-right: 1rem !important;
  line-height: 1.4 !important;
}

/* Ensure images with these classes display properly */
.post-content img.img-full,
.post-content img.img-center,
.post-content img.img-shadow,
.post-content img.img-full.img-center,
.post-content img.img-full.img-shadow,
.post-content img.img-center.img-shadow,
.post-content img.img-full.img-center.img-shadow,
.post-content figure.img-full img,
.post-content figure.img-center img,
.post-content figure.img-shadow img,
.post-content figure.img-full.img-center img,
.post-content figure.img-full.img-shadow img,
.post-content figure.img-center.img-shadow img,
.post-content figure.img-full.img-center.img-shadow img {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
}

.post-tags {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.tag-link {
  display: inline-block;
  background: var(--bg-secondary);
  color: var(--accent-primary);
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.875rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.tag-link:hover {
  background: var(--accent-primary);
  color: white;
  text-decoration: none;
}

.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.site-footer p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.875rem;
}

.site-footer a {
  color: var(--accent-primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.filter-btn {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
  color: var(--accent-primary);
}

.filter-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.filter-btn.active:hover {
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), opacity 0.3s ease;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 4/3;
  display: flex;
  flex-direction: column;
}

.gallery-item.hidden {
  display: none;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-primary);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-normal);
  flex-shrink: 0;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%);
  color: white;
  padding: 1.25rem 1rem 0.75rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  font-size: 0.875rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  cursor: zoom-in;
}

.modal-content.zoomed {
  max-width: 100%;
  max-height: 100%;
  cursor: grab;
}

.modal-content.zoomed:active {
  cursor: grabbing;
}

.modal-caption {
  color: var(--text-primary);
  margin-top: 1rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  text-align: center;
  max-width: 90%;
  min-width: 300px;
}

.modal-caption .title {
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.modal-caption .description {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.modal-caption .meta {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.modal-close,
.modal-nav,
.modal-download {
  position: absolute;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.75rem;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  z-index: 10001;
}

.modal-close:hover,
.modal-nav:hover,
.modal-download:hover {
  color: var(--accent-primary);
  background-color: rgba(255, 255, 255, 0.2);
}

.modal-close {
  top: 20px;
  right: 20px;
}

.modal-prev {
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  z-index: 10002;
}

.modal-next {
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 10002;
}

.modal-nav svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-download {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-primary);
  padding: 0.75rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
}

.modal-download svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 9998;
}

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

.back-to-top:hover {
  transform: translateY(-4px);
  background: var(--accent-secondary);
  box-shadow: var(--shadow-xl);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  z-index: 10000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0.5rem;
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.site-main {
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-card,
.post-item,
.gallery-item,
.sidebar-section {
  animation: fadeInUp 0.6s ease-out backwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-card { animation-delay: 0.1s; }
.sidebar-section { animation-delay: 0.2s; }
.sidebar-post-item { animation-delay: 0.3s; }
.post-item { animation-delay: 0.1s; }
.post-item:nth-child(2) { animation-delay: 0.2s; }
.post-item:nth-child(3) { animation-delay: 0.3s; }
.post-item:nth-child(4) { animation-delay: 0.4s; }
.post-item:nth-child(5) { animation-delay: 0.5s; }

.underline-hover {
  position: relative;
  color: var(--accent-primary);
  text-decoration: none;
}

.underline-hover:hover {
  color: var(--accent-secondary);
}

.underline-hover::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width var(--transition-normal);
}

.underline-hover:hover::after {
  width: 100%;
}

.share-buttons {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.share-buttons h3 {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.share-buttons .share-buttons-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.share-buttons .share-buttons-list li {
  flex: 0 0 auto;
}

.share-buttons .share-buttons-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  border: 1px solid var(--border-color);
}

.share-buttons .share-buttons-list a svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.share-buttons .share-buttons-list a:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.share-buttons .share-buttons-list a.facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
  color: white;
}

.share-buttons .share-buttons-list a.twitter:hover {
  background: #1da1f2;
  border-color: #1da1f2;
  color: white;
}

.share-buttons .share-buttons-list a.linkedin:hover {
  background: #0077b5;
  border-color: #0077b5;
  color: white;
}

.share-buttons .share-buttons-list a.reddit:hover {
  background: #ff4500;
  border-color: #ff4500;
  color: white;
}

.share-buttons .share-buttons-list a.email:hover {
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
  color: white;
}

.footer-social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  list-style: none;
  padding: 0;
}

.footer-social-links li {
  flex: 0 0 auto;
}

.footer-social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 50%;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: 1px solid var(--border-color);
}

.footer-social-links a svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-social-links a:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.footer-social-links a.github:hover,
.footer-social-links a.twitter:hover,
.footer-social-links a.linkedin:hover,
.footer-social-links a.facebook:hover {
  color: white;
}

.footer-social-links a.github:hover { background: #24292e; border-color: #24292e; }
.footer-social-links a.twitter:hover { background: #1da1f2; border-color: #1da1f2; }
.footer-social-links a.linkedin:hover { background: #0077b5; border-color: #0077b5; }
.footer-social-links a.facebook:hover { background: #1877f2; border-color: #1877f2; }
.footer-social-links a.email:hover { background: var(--accent-secondary); border-color: var(--accent-secondary); }
.footer-social-links a.reddit:hover { background: #ff4500; border-color: #ff4500; }

.footer-copyright {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.main-column.full-width {
  grid-column: 1 / -1;
}

.full-width .portfolio-article,
.full-width .post-article {
  max-width: 100%;
  padding: 3rem 2rem;
}

.portfolio-item {
  animation: fadeInUp 0.6s ease-out backwards;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-primary);
}

.portfolio-image {
  position: relative;
  overflow: hidden;
  height: 220px;
  background: var(--bg-secondary);
}

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

.portfolio-card:hover .portfolio-image img {
  transform: scale(1.1);
}

.portfolio-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.portfolio-title {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.portfolio-title a {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.portfolio-title a:hover {
  color: var(--accent-primary);
}

.portfolio-description {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.view-btn {
  display: inline-block;
  background: var(--accent-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.view-btn:hover {
  background: var(--accent-secondary);
  transform: translateY(-2px);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: 1;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: white;
  color: var(--text-primary);
  border-radius: 50%;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.portfolio-view-btn:hover {
  transform: scale(1.1);
  background: var(--accent-primary);
  color: white;
}

.portfolio-article {
  padding: 2.5rem;
}

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

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

.portfolio-featured-image {
  margin: 1.5rem 0;
}

.portfolio-featured-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
  margin: 0 auto;
}

.portfolio-content h2,
.portfolio-content h3,
.portfolio-content h4 {
  color: var(--text-primary);
  margin: 2.5rem 0 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.portfolio-content p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.portfolio-content ul,
.portfolio-content ol {
  margin: 1.25rem 0;
  padding-left: 1.5rem;
}

.portfolio-content li {
  margin-bottom: 0.625rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.portfolio-content code {
  background: var(--bg-secondary);
  color: var(--accent-primary);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-family: 'SFMono-Medium', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.9em;
}

.portfolio-content pre {
  background: var(--bg-secondary);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--border-color);
}

.portfolio-content pre code {
  background: none;
  color: var(--text-primary);
  padding: 0;
}

.portfolio-skills {
  margin: 2.5rem 0;
}

.portfolio-skills h2 {
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  font-size: 1.375rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.portfolio-tags {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.portfolio-tags h2 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

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

.skill-tag {
  display: inline-block;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  font-size: 0.75rem;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-color);
}

.skill-tag:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.filter-btn {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
  color: var(--accent-primary);
}

.filter-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.filter-btn.active:hover {
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

.category-projects {
  margin-top: 2rem;
}

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

.category-project-count {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 992px) {
  .home-layout,
  .content-wrapper,
  .content-wrapper.full-width {
    grid-template-columns: 1fr;
    padding: 3.5rem 1.5rem;
  }
  
  .sidebar {
    position: static;
    order: -1;
    margin-bottom: 2rem;
  }
  
  .hero-title {
    font-size: 2.25rem;
  }
  
  .content-wrapper.gallery-full-width .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .gallery-grid,
  .content-wrapper.gallery-full-width .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .sidebar {
    display: none !important;
  }
  
  .header-container {
    padding: 0 1.5rem;
  }
  
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    transition: transform var(--transition-fast);
  }
  
  .hamburger,
  .hamburger::before,
  .hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-secondary);
    transition: all var(--transition-normal);
    position: relative;
  }
  
  .hamburger::before,
  .hamburger::after {
    content: '';
    position: absolute;
  }
  
  .hamburger::before {
    top: -7px;
  }
  
  .hamburger::after {
    bottom: -7px;
  }
  
  .menu-toggle.active .hamburger {
    background-color: transparent;
  }
  
  .menu-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
  }
  
  .menu-toggle.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition: all var(--transition-normal) ease-in-out;
  }
  
  .nav-menu.nav-active {
    max-height: 400px;
    visibility: visible;
    opacity: 1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  .nav-item {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .nav-link {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: background-color var(--transition-fast), color var(--transition-fast);
    border-radius: var(--radius-sm);
  }
  
  .nav-link:hover,
  .nav-link.active {
    background: var(--bg-secondary);
    color: var(--accent-primary);
  }
  
  .theme-toggle {
    padding: 0.4rem;
  }
  
  .theme-toggle svg {
    width: 20px;
    height: 20px;
  }
  
  .hero-section {
    padding: 4rem 1.5rem 3rem;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .logo-img {
    height: 24px;
  }
  
  .home-layout,
  .content-wrapper {
    padding: 2rem 1.5rem;
  }
  
  .welcome-card,
  .post-article,
  .sidebar-section {
    padding: 1.5rem;
  }
  
  .post-title {
    font-size: 1.25rem;
  }
  
  body.menu-open {
    overflow: hidden;
  }
  
  .modal-close,
  .modal-nav,
  .modal-download {
    width: 50px;
    height: 50px;
  }
  
  .modal-nav svg {
    width: 28px;
    height: 28px;
  }
  
  .modal-prev {
    left: 10px;
  }
  
  .modal-next {
    right: 10px;
  }
  
  .modal-download {
    left: 10px;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  
  .portfolio-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-btn {
    justify-content: center;
  }
  
  .portfolio-title {
    font-size: 1.75rem;
  }
  
  .portfolio-back,
  .portfolio-nav {
    text-align: center;
  }
  
  .nav-prev,
  .nav-next {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  .nav-next {
    flex-direction: column-reverse;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.5rem;
  }
  
  .hero-subtitle {
    font-size: 0.9375rem;
  }
  
  .hero-button {
    width: 100%;
    max-width: 250px;
  }
  
  .logo-img {
    height: 20px;
  }
  
  .modal-close,
  .modal-nav,
  .modal-download {
    width: 45px;
    height: 45px;
  }
  
  .modal-nav svg {
    width: 24px;
    height: 24px;
  }
  
  .modal-prev {
    left: 5px;
  }
  
  .modal-next {
    right: 5px;
  }
  
  .modal-download {
    left: 5px;
  }
  
  .content-wrapper.gallery-full-width .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .share-buttons .share-buttons-list a {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
  
  .footer-social-links {
    gap: 1rem;
  }
  
  .footer-social-links a {
    width: 36px;
    height: 36px;
  }
  
  .portfolio-article {
    padding: 1.5rem;
  }
  
  .portfolio-title {
    font-size: 1.5rem;
  }
  
  .portfolio-subtitle {
    font-size: 1rem;
  }
  
  .portfolio-gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-image-item img {
    height: 200px;
  }
  
  .details-grid {
    grid-template-columns: 1fr;
  }
}