/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #111;
  --fg: #eee;
  --muted: #aaa;
  --dim: #888;
  --faint: #666;
  --border: #222;
  --border-mid: #333;
  --border-bright: #444;
  --card-bg: #1a1a1a;
  --card-bg-hover: #333;
  --input-bg: #1a1a1a;
  --footer-fg: #555;
  --overlay-bg: rgba(0,0,0,0.65);
  --hero-gradient-start: rgba(0,0,0,0.2);
  --hero-gradient-end: rgba(0,0,0,0.5);
}

[data-theme="light"] {
  --bg: #f5f5f5;
  --fg: #111;
  --muted: #555;
  --dim: #777;
  --faint: #999;
  --border: #ddd;
  --border-mid: #ccc;
  --border-bright: #bbb;
  --card-bg: #fff;
  --card-bg-hover: #f0f0f0;
  --input-bg: #fff;
  --footer-fg: #999;
  --overlay-bg: rgba(255,255,255,0.75);
  --hero-gradient-start: rgba(255,255,255,0.1);
  --hero-gradient-end: rgba(255,255,255,0.4);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  overflow-x: hidden;
}

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

a:hover {
  opacity: 0.8;
}

img {
  max-width: 100%;
  display: block;
}

/* Layout */
#canvasWrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: #111;
  border-right: 1px solid #222;
  padding: 45px 30px;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.main-nav ul {
  list-style: none;
}

.main-nav li {
  margin-bottom: 6px;
}

.main-nav li:has(a[href="#about"]) {
  margin-top: 14px;
}

.main-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #aaa;
  display: block;
  padding: 4px 0;
}

.main-nav a:hover,
.main-nav a.active {
  color: #eee;
  opacity: 1;
}

.social-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
  margin-bottom: 10px;
}

.social-links a {
  color: #888;
  transition: color 0.2s ease;
  line-height: 1;
  display: flex;
  align-items: center;
}

.social-links a:hover {
  color: #eee;
}

.social-icon {
  width: 22px;
  height: 22px;
  display: block;
  opacity: 0.55;
  transition: opacity 0.2s ease;
  align-self: center;
}

.social-links a:hover .social-icon {
  opacity: 1;
}

/* Main Content */
#main {
  margin-left: 240px;
  width: calc(100% - 240px);
  min-height: 100vh;
  padding: 45px;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  align-items: start;
}

.gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  cursor: pointer;
  background: #1a1a1a;
  border-radius: 4px;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
  opacity: 0.85;
}

.gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: #eee;
  font-size: 0.8rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gallery-item:hover figcaption {
  opacity: 1;
}

.gallery-item-media {
  position: relative;
  display: block;
}

.gallery-item-wake {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 10;
  color: #c4a882;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
  animation: wakePulse 2.5s ease-in-out infinite;
}

@keyframes wakePulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.96);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

#lightbox.active {
  display: flex;
}

.lightbox-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #eee;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 2;
  pointer-events: none;
}

.lightbox-img {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-img.loaded {
  opacity: 1;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 30px;
  font-size: 2rem;
  color: #eee;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: #eee;
  cursor: pointer;
  background: none;
  border: none;
  padding: 20px;
  opacity: 0.5;
  transition: opacity 0.2s;
  line-height: 1;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-prev {
  left: 10px;
}

.lightbox-next {
  right: 10px;
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: #888;
  letter-spacing: 0.1em;
}

.lightbox-caption {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: #bbb;
  text-align: center;
  max-width: 80vw;
}

.footer-links {
  display: none;
}

.illustration-group {
  margin-bottom: 60px;
}

.illustration-group h2 {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.8);
}

/* Footer */
.site-footer {
  position: fixed;
  bottom: 24px;
  left: 30px;
  right: 30px;
  font-size: 0.65rem;
  color: #555;
  letter-spacing: 0.05em;
  z-index: 101;
  pointer-events: none;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
}

.site-footer > * {
  pointer-events: auto;
}

/* Mobile */
#mobileNav {
  display: none;
}

.mobile-toggle {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 200;
  background: #111;
  border: 1px solid #333;
  color: #eee;
  padding: 8px 14px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
}

.sidebar-overlay.active {
  display: block;
}

.logo-link {
  display: flex;
  margin-top: auto;
  margin-bottom: 100px;
  align-self: center;
  opacity: 0.9;
  text-decoration: none;
}

@media (max-width: 800px) {
  #sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    width: 260px;
  }

  #sidebar.open {
    transform: translateX(0);
  }

  .mobile-toggle {
    display: block;
  }

  #main {
    margin-left: 0;
    width: 100%;
    padding: 70px 20px 40px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
  }

  .site-footer {
    position: static;
    padding: 20px;
    justify-content: center;
    gap: 20px;
  }

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

/* About & Contact Sections */
#about,
#contact {
  display: none;
}

.hidden {
  display: none !important;
}

#about:not(.hidden),
#contact:not(.hidden) {
  display: block;
}

.about-container {
  display: flex;
  gap: 45px;
  max-width: 1100px;
}

.about-photo {
  flex: 0 0 280px;
}

.about-photo img {
  width: 100%;
  display: block;
  border-radius: 2px;
}

.about-content {
  flex: 1;
}

.about-content h1 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #eee;
  margin-bottom: 24px;
}

.about-content h2 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.06em;
  /* text-transform: uppercase removed */
  color: #ccc;
  margin-top: 28px;
  margin-bottom: 12px;
}

.about-content h3 {
  font-size: 0.8rem;
  font-weight: 500;
  color: #bbb;
  margin-top: 16px;
  margin-bottom: 6px;
  line-height: 1.5;
}

.about-content p,
.about-content li {
  font-size: 15px;
  color: #999;
  line-height: 1.7;
}

.about-intro {
  font-size: 15px !important;
  color: #bbb !important;
  margin-bottom: 8px;
}

.about-divider {
  border: none;
  border-top: 1px solid #333;
  margin: 24px 0;
}

.about-tools {
  font-size: 15px !important;
  color: #888 !important;
  margin-top: 12px;
}

.about-tools strong {
  color: #aaa;
  font-weight: 500;
}

.experience-list p {
  font-size: 15px;
  color: #bbb;
  margin-bottom: 6px;
}

.about-contact p {
  font-size: 15px;
  color: #bbb;
  margin-bottom: 6px;
}

.cv-link {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 16px;
  background: #222;
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #eee;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cv-link:hover {
  background: #333;
  border-color: #666;
  opacity: 1;
}

.about-closing {
  margin-top: 16px;
  color: #bbb !important;
}

.about-content ul {
  list-style: disc;
  padding-left: 18px;
}

.about-content ul li {
  margin-bottom: 3px;
}

.courses {
  list-style: none !important;
  padding-left: 0 !important;
}

.courses li {
  margin-bottom: 5px;
}

.course-year {
  color: #777;
  font-size: 0.8rem;
}

.job-date {
  color: #777;
  font-size: 0.75rem;
  font-weight: 400;
}

.about-content a {
  color: #aaa;
  text-decoration: underline;
  text-decoration-color: #444;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.about-content a:hover {
  color: #eee;
  text-decoration-color: #666;
  opacity: 1;
}

.about-section p {
  margin-bottom: 6px;
}

.portfolio-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.portfolio-buttons a {
  display: inline-block;
  padding: 10px 20px;
  background: #eee;
  color: #111;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.portfolio-buttons a:hover {
  background: #ccc;
  color: #000;
  opacity: 1;
}

/* Contact Form */
.contact-container {
  max-width: 700px;
}

.contact-container h1 {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  /* text-transform: uppercase removed */
  color: #eee;
  margin-bottom: 32px;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form .form-row {
  display: flex;
  gap: 16px;
}

.contact-form .form-row .form-group {
  flex: 1;
}

.contact-form label {
  display: block;
  font-size: 0.9rem;
  color: #ccc;
  margin-bottom: 6px;
}

.contact-form .required {
  color: #777;
  font-size: 0.75rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  background: #1a1a1a;
  border: 1px solid #333;
  color: #eee;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #666;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  display: block;
  margin: 32px auto 0;
  padding: 16px 48px;
  background: transparent;
  color: #eee;
  border: 2px solid #eee;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.submit-btn:hover {
  background: #eee;
  color: #111;
}

@media (max-width: 800px) {
  .contact-form .form-row {
    flex-direction: column;
    gap: 0;
  }
}

.thanks-container {
  max-width: 600px;
  padding-top: 40px;
}

.thanks-container h1 {
  font-size: 1.6rem;
  font-weight: 400;
  color: #eee;
  margin-bottom: 16px;
}

.thanks-container p {
  font-size: 0.95rem;
  color: #999;
  margin-bottom: 32px;
  line-height: 1.7;
}

.back-link {
  font-size: 0.85rem;
  color: #aaa;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: #eee;
}

/* Hero section — fullscreen landing */
.hero {
  position: relative;
  width: calc(100% + 90px);
  margin-left: -45px;
  margin-top: -45px;
  margin-bottom: 64px;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: opacity 0.1s linear;
  will-change: opacity, transform;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.5) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 60px 45px 80px;
  z-index: 2;
}

.hero-overlay h1 {
  font-size: 2.4rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  /* text-transform: uppercase removed */
  color: #eee;
  margin-bottom: 8px;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.hero-subtitle {
  font-size: 1rem;
  color: #bbb;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.hero-cta {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 36px;
  background: transparent;
  color: #eee;
  border: 2px solid #eee;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.hero-cta:hover {
  background: #eee;
  color: #111;
  opacity: 1;
}

.hero-reviews {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.hero-reviews-gauges {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.hero .hero-reviews-gauges img {
  position: relative;
  width: 96px;
  height: 96px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.hero-reviews-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-reviews-count {
  font-size: 0.95rem;
  font-weight: 700;
}

.hero-reviews-count-link {
  color: inherit;
  text-decoration: none;
}

.hero-reviews-on a {
  color: inherit;
  text-decoration: none;
}

.hero-reviews-stars {
  display: flex;
  gap: 3px;
}

.hero-reviews-stars svg {
  width: 14px;
  height: 14px;
  fill: #ffc107;
}

#scrollTop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  width: 44px;
  height: 44px;
  background: #222;
  border: 1px solid #444;
  color: #eee;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, background 0.2s;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#scrollTop.visible {
  opacity: 1;
  visibility: visible;
}

#scrollTop:hover {
  background: #333;
}

/* Commissions status */
.commissions-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.75rem;
  color: #888;
  letter-spacing: 0.04em;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  display: inline-block;
}

/* Sticky contact */
.sticky-contact {
  position: fixed;
  bottom: 24px;
  right: 80px;
  z-index: 500;
  display: flex;
  gap: 10px;
}

.sticky-contact a {
  width: 44px;
  height: 44px;
  background: #222;
  border: 1px solid #444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #eee;
  transition: background 0.2s ease;
}

.sticky-contact a:hover {
  background: #333;
}

/* Pricing */
.pricing-list p {
  font-size: 15px;
  color: #bbb;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  max-width: 320px;
}

.pricing-from {
  color: #eee;
  font-weight: 500;
}

/* Project CTA */
.project-cta {
  text-align: center;
  padding: 48px 20px;
  margin-top: 24px;
  border-top: 1px solid #222;
}

.project-cta p {
  font-size: 1rem;
  color: #aaa;
  margin-bottom: 20px;
}

/* About gallery */
.about-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.about-gallery-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.about-gallery-grid img:hover {
  transform: scale(1.02);
  opacity: 0.85;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 2s infinite;
  cursor: pointer;
}

.hero-scroll-hint svg {
  width: 28px;
  height: 28px;
  stroke: rgba(255,255,255,0.7);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

/* Filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 48px;
}

.filter-btn {
  padding: 8px 18px;
  background: transparent;
  border: 1px solid #444;
  color: #aaa;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border-radius: 4px;
}

.filter-btn:hover,
.filter-btn.active {
  background: #eee;
  color: #111;
  border-color: #eee;
}

/* Section transitions */
@keyframes sectionFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#main > section:not(.hidden) {
  animation: sectionFadeIn 0.3s ease;
}

/* Projects sections */
.category-page {
  margin-bottom: 64px;
}

.category-page h1 {
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #eee;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #222;
}

.category-page .category-desc {
  color: #aaa;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 720px;
}

.projects-section {
  margin-bottom: 64px;
}

.projects-section h2 {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  /* text-transform: uppercase removed */
  color: #aaa;
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid #222;
}

.section-cta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* Project card */
.project-card {
  display: block;
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  opacity: 1;
}

.project-card-preview {
  position: relative;
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #222;
  overflow: hidden;
}

.project-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.65);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  pointer-events: none;
}

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

.overlay-title {
  font-size: 1rem;
  color: #eee;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
}

.overlay-count {
  font-size: 0.8rem;
  color: #aaa;
  margin-top: 6px;
}

.project-card-main {
  flex: 1;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 4px;
  min-width: 0;
  overflow: hidden;
}

.project-card-thumbs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 72px;
  flex-shrink: 0;
}

.project-card-thumbs img {
  flex: 1;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  min-height: 0;
  filter: grayscale(100%) contrast(0.5) brightness(0.45);
  opacity: 0.6;
}

.project-card-info {
  padding: 16px 18px;
}

.project-card-info h3 {
  font-size: 0.95rem;
  font-weight: 500;
  color: #eee;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.project-card-info span {
  font-size: 0.75rem;
  color: #666;
}

/* Project hero */
.project-hero {
  width: 100%;
  margin-bottom: 40px;
  border-radius: 6px;
  overflow: hidden;
}

.project-hero img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* Project pages */
.project-header {
  position: relative;
  margin-bottom: 32px;
  max-width: 900px;
}

.project-header .back-link {
  display: inline-block;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 16px;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.project-header .back-link:hover {
  color: #eee;
}

.project-header h1 {
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #eee;
  margin-bottom: 8px;
}

.project-meta {
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.project-desc {
  font-size: 0.9rem;
  color: #aaa;
  line-height: 1.7;
  max-width: 700px;
}

/* Behance ribbon link */
.behance-ribbon {
  position: absolute;
  top: 0;
  right: 20px;
  width: 32px;
  height: 42px;
  background: linear-gradient(180deg, #c9a96e, #a88b52);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 10;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.behance-ribbon:hover {
  transform: translateY(2px);
  filter: brightness(1.1);
}

.behance-ribbon::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 0;
  border-left: 16px solid #a88b52;
  border-right: 16px solid #a88b52;
  border-bottom: 8px solid transparent;
}

.behance-ribbon-lines {
  position: relative;
  display: block;
  width: 2px;
  height: 10px;
  background: rgba(255,255,255,0.85);
  border-radius: 1px;
}

.behance-ribbon-lines::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 0;
  width: 2px;
  height: 10px;
  background: rgba(255,255,255,0.85);
  border-radius: 1px;
}

.behance-ribbon-label {
  position: relative;
  z-index: 1;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

/* Behance Tools ribbon (Photoshop etc.) */
.behance-ribbon-tools {
  position: absolute;
  top: 0;
  right: 58px;
  width: 32px;
  height: 42px;
  background: linear-gradient(180deg, #001e36, #00152a);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 10;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.behance-ribbon-tools:hover {
  transform: translateY(2px);
  filter: brightness(1.15);
}

.behance-ribbon-tools::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 0;
  border-left: 16px solid #00152a;
  border-right: 16px solid #00152a;
  border-bottom: 8px solid transparent;
}

.behance-ribbon-tools span {
  position: relative;
  z-index: 1;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0;
  line-height: 1;
}

/* Multiple ribbons group */
.behance-ribbons {
  position: absolute;
  top: 0;
  right: 20px;
  display: flex;
  gap: 6px;
  z-index: 10;
}

.behance-ribbons .behance-ribbon,
.behance-ribbons .behance-ribbon-tools {
  position: relative;
  top: auto;
  right: auto;
}

.main-nav li {
  white-space: nowrap;
}

.lang-switch {
  font-size: 0.75rem;
  color: #666;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch a {
  display: flex;
  align-items: center;
  opacity: 0.5;
  transition: opacity 0.2s ease;
  text-decoration: none;
}

.lang-switch a.active,
.lang-switch a:hover {
  opacity: 1;
}

.lang-switch svg {
  display: block;
}

@media (max-width: 800px) {
  .about-container {
    flex-direction: column;
    gap: 28px;
  }

  .about-photo {
    flex: 0 0 auto;
    max-width: 280px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card-thumbs {
    width: 60px;
  }

  .hero {
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-top: -70px;
    margin-bottom: 48px;
  }

  .hero img {
    max-height: none;
  }

  .hero-overlay {
    padding: 40px 20px 80px;
  }

  .hero-overlay h1 {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 0.85rem;
  }

  .project-hero img {
    max-height: 280px;
  }

  .about-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sticky-contact {
    right: 20px;
    bottom: 80px;
  }
}


/* Theme toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 500;
  width: 40px;
  height: 40px;
  background: var(--card-bg);
  border: 1px solid var(--border-bright);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.theme-toggle:hover {
  background: var(--card-bg-hover);
}

[data-theme="light"] body {
  filter: invert(1) hue-rotate(180deg);
}

[data-theme="light"] img,
[data-theme="light"] svg,
[data-theme="light"] .hero img,
[data-theme="light"] .project-hero img,
[data-theme="light"] .project-card-main,
[data-theme="light"] .project-card-thumbs img,
[data-theme="light"] .gallery-item img,
[data-theme="light"] .about-gallery-grid img,
[data-theme="light"] .error-random img {
  filter: invert(1) hue-rotate(180deg);
}

[data-theme="light"] .sidebar-photo {
  filter: none !important;
}

/* Extra breakpoints */
@media (max-width: 1024px) {
  #main {
    padding: 35px;
  }

  .hero {
    width: calc(100% + 70px);
    margin-left: -35px;
    margin-top: -35px;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
  }

  .book-illustrations-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .filter-bar {
    gap: 8px;
  }
}

@media (max-width: 320px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .book-illustrations-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-overlay h1 {
    font-size: 1.3rem;
  }

  .hero-cta {
    padding: 10px 24px;
    font-size: 0.75rem;
  }
}


/* First-visit fullscreen hero effect */
body.first-visit #sidebar {
  transform: translateX(-100%);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

body.first-visit #main {
  margin-left: 0;
  width: 100%;
  transition: margin-left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

body.first-visit .hero {
  width: calc(100% + 90px);
  margin-left: -45px;
}

body.first-visit.revealed #sidebar {
  transform: translateX(0);
}

body.first-visit.revealed #main {
  margin-left: 240px;
  width: calc(100% - 240px);
}

/* Disable first-visit effect on mobile */
@media (max-width: 768px) {
  body.first-visit #sidebar,
  body.first-visit.revealed #sidebar {
    transform: none;
  }
  body.first-visit #main,
  body.first-visit.revealed #main {
    margin-left: 0;
    width: 100%;
  }
}


/* ========================================
   Reviews Bar (homepage widget)
   ======================================== */

.reviews-bar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 20px 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin: 0 -45px;
  width: calc(100% + 90px);
}

.reviews-bar-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.reviews-bar-count-link {
  color: inherit;
  text-decoration: none;
}

.reviews-bar-count-link:hover {
  opacity: 0.8;
}

.reviews-bar-count {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.reviews-bar-on {
  font-size: 0.9rem;
  color: var(--muted);
}

.reviews-bar-on a {
  color: var(--accent);
  text-decoration: none;
}

.reviews-bar-on a:hover {
  text-decoration: underline;
}

.reviews-bar-stars {
  display: flex;
  gap: 4px;
}

.reviews-bar-stars svg {
  width: 20px;
  height: 20px;
  fill: #ffc107;
}

.reviews-bar-categories-link {
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.reviews-bar-categories-link:hover {
  opacity: 0.9;
}

.reviews-bar-categories {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.reviews-bar-category {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.reviews-bar-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.reviews-gauge {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.reviews-gauge-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}



.reedsy-logo {
  display: inline-block;
  vertical-align: middle;
  width: 80px;
  height: 24px;
}

@media (max-width: 768px) {
  .reviews-bar {
    padding: 16px 24px;
    margin: 0 -24px;
    width: calc(100% + 48px);
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .reviews-bar-categories-link {
    width: 100%;
  }

  .reviews-bar-categories {
    justify-content: flex-start;
    gap: 20px;
    width: 100%;
  }
}

/* ========================================
   Reviews Page
   ======================================== */

.reviews-page {
  padding: 0 0 60px;
}

.reviews-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.reviews-subtitle {
  color: var(--muted);
  margin-bottom: 40px;
  font-size: 0.95rem;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.review-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  transition: border-color 0.2s ease;
}

.review-card:hover {
  border-color: var(--border-bright);
}

.review-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.review-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border);
}

.review-avatar-default {
  background: linear-gradient(135deg, #ffc107, #ff9800) !important;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
}

.review-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.review-card-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.review-card-date {
  font-size: 0.75rem;
  color: var(--faint);
}

.review-card-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 14px;
}

.review-card-stars svg {
  width: 14px;
  height: 14px;
  fill: #ffc107;
}

.review-card-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--fg);
}

.review-card-text p {
  margin: 0;
}

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

/* Art Page Styles */
.art-page {}

.art-hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 24px;
  background: var(--card-bg);
  gap: 16px;
  position: relative;
}

.art-hero img {
  max-width: 50%;
  max-height: 40vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.art-hero img:hover {
  transform: scale(1.02);
}

.art-nav-prev,
.art-nav-next {
  font-size: 3rem;
  color: var(--fg);
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.2s;
  line-height: 1;
  padding: 0 8px;
  user-select: none;
  flex-shrink: 0;
}

.art-nav-prev:hover,
.art-nav-next:hover {
  opacity: 1;
}

.art-header {
  padding: 32px 24px 16px;
  max-width: 900px;
  margin: 0 auto;
}

.art-header h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.art-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.art-review {
  max-width: 900px;
  margin: 24px auto;
  padding: 28px 32px;
  background: var(--card-bg);
  border-radius: 8px;
  border-left: 3px solid var(--border-bright);
}

.art-review blockquote {
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
  color: var(--fg);
}

.art-review cite {
  display: block;
  margin-top: 16px;
  font-style: normal;
  color: var(--muted);
  font-size: 0.9rem;
}

.art-review cite strong {
  color: var(--fg);
  font-weight: 600;
}

.wip-section {
  max-width: 900px;
  margin: 32px auto;
  padding: 0 24px;
}

.wip-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wip-slider {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-bright) var(--card-bg);
}

.wip-slider::-webkit-scrollbar {
  height: 6px;
}

.wip-slider::-webkit-scrollbar-track {
  background: var(--card-bg);
  border-radius: 3px;
}

.wip-slider::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border-radius: 3px;
}

.wip-slide {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 320px;
}

.wip-slide img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.wip-slide .wip-label {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 768px) {
  .art-hero {
    padding: 16px;
    gap: 8px;
  }
  .art-hero img {
    max-width: 60%;
    max-height: 30vh;
  }
  .art-nav-prev,
  .art-nav-next {
    font-size: 2rem;
    padding: 0 4px;
  }
  .art-header {
    padding: 20px 16px 12px;
  }
  .art-header h1 {
    font-size: 1.5rem;
  }
  .art-review {
    margin: 16px;
    padding: 20px;
  }
  .wip-slide {
    width: 260px;
  }
}

/* Case study page styles */
.case-content {
  max-width: 900px;
}

.case-content h1 {
  margin-bottom: 16px;
}

.case-image {
  margin: 24px 0;
}

.case-image img {
  width: 100%;
  display: block;
  border-radius: 2px;
}

.case-image figcaption {
  font-size: 0.8rem;
  color: #888;
  margin-top: 8px;
  font-style: italic;
  line-height: 1.5;
}


/* Book covers gallery */
.book-cover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  align-items: start;
}

.book-illustrations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.grid-section-heading {
  grid-column: 1 / -1;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.85);
}

.book-cover-item {
  display: block;
  background: var(--card-bg, #1a1a1a);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-cover-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.book-cover-item img {
  width: 100%;
  height: auto;
  display: block;
}

.book-cover-caption {
  padding: 12px;
  text-align: center;
}

.book-cover-caption strong,
.book-cover-caption h2,
.book-cover-caption h3 {
  display: block;
  color: var(--text-color, #eee);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 2px;
}

.book-cover-caption span {
  display: block;
  color: var(--muted, #888);
  font-size: 0.75rem;
}

.portfolio-cta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 20px 0 8px;
}

/* Sidebar nav label */
.main-nav .nav-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted, #888);
  margin-top: 12px;
  margin-bottom: 4px;
  padding-left: 4px;
}

.main-nav li:first-child .nav-label {
  margin-top: 0;
}


/* Visual Stories genre tabs */
.genre-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.genre-tab {
  background: var(--card-bg);
  border: 1px solid var(--border-mid);
  color: var(--fg);
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.genre-tab:hover {
  background: var(--card-bg-hover);
}

.genre-tab.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.genre-panel {
  display: none;
}

.genre-panel.active {
  display: block;
}


/* CTA button */
.cta-button {
  display: inline-block;
  padding: 10px 20px;
  background: #e8b86d;
  color: #000 !important;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none !important;
  text-align: center;
  transition: background 0.2s ease, transform 0.1s ease;
}

.cta-button:hover {
  background: #f0c67d;
  transform: translateY(-1px);
  text-decoration: none !important;
}

.sidebar-header .cta-button {
  margin-top: 16px;
  width: 100%;
}

/* Trust bar */
.trust-bar {
  text-align: center;
  padding: 32px 20px;
  border-bottom: 1px solid var(--border-mid, #333);
}

.trust-bar-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
  margin-bottom: 16px;
}

.trust-bar-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 32px;
}

.trust-bar-logos img {
  height: 40px;
  width: auto;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: opacity 0.2s ease;
}

.trust-bar-logos a:hover img {
  opacity: 1;
}

/* Mobile sticky CTA */
.mobile-cta {
  display: none;
}

@media (max-width: 800px) {
  .trust-bar-logos {
    gap: 20px;
  }

  .trust-bar-logos img {
    height: 32px;
  }

  .mobile-cta {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    justify-content: center;
    padding: 12px 16px;
    background: rgba(26, 26, 26, 0.95);
    border-top: 1px solid var(--border-mid, #333);
    z-index: 1000;
  }

  .mobile-cta .cta-button {
    width: 100%;
    max-width: 400px;
  }

  .sticky-contact {
    bottom: 72px;
    right: 20px;
  }

  #scrollTop {
    bottom: 130px;
  }
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--dim, #888);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--muted, #aaa);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--fg, #eee);
}

.breadcrumb-sep {
  color: var(--faint, #666);
  font-size: 0.7rem;
}

.breadcrumb-current {
  color: var(--fg, #eee);
}

/* Service cards */
.service-card {
  background: var(--card-bg, #1a1a1a);
  border: 1px solid var(--border-mid, #333);
  border-radius: 6px;
  padding: 28px;
  margin-bottom: 20px;
  transition: border-color 0.2s ease;
}
.service-card:hover {
  border-color: var(--border-bright, #444);
}
.service-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}
.service-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted, #aaa);
}
.service-card p:last-child {
  margin-top: 14px;
  font-size: 15px;
  color: var(--fg, #eee);
}
.service-card a {
  color: #e8b86d;
}
.service-card a:hover {
  opacity: 0.8;
}

/* Process steps */
.process-step {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  align-items: flex-start;
}
.process-number {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: #e8b86d;
  color: #1a1a1a;
  font-size: 20px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.process-step h3 {
  font-size: 16px;
  margin-bottom: 6px;
}
.process-step p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted, #aaa);
}

/* Pricing table */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}
.pricing-table th {
  text-align: left;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim, #888);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-mid, #333);
}
.pricing-table td {
  padding: 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--border, #222);
  color: var(--muted, #aaa);
}
.pricing-table td:first-child {
  color: var(--fg, #eee);
}
.pricing-table tr:last-child td {
  border-bottom: none;
}
.pricing-note {
  font-size: 13px;
  color: var(--dim, #888);
  margin-top: 4px;
}
.pricing-note a {
  color: #e8b86d;
}

/* FAQ items (on services page) */
.faq-item {
  margin-bottom: 20px;
}
.faq-item h3 {
  font-size: 16px;
  margin-bottom: 6px;
  cursor: pointer;
}
.faq-item p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted, #aaa);
}
.related-works {
  margin: 48px 0;
}
.related-works h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--fg, #eee);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.related-item {
  display: block;
  text-decoration: none;
  border-radius: 6px;
  overflow: hidden;
  background: var(--card-bg, #1a1a1a);
  transition: transform .2s;
}
.related-item:hover {
  transform: scale(1.03);
}
.related-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.related-name {
  display: block;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted, #aaa);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
