/* Shared styles for Luckhut site */
:root {
  --bg: #fdfaf5;
  --bg-card: #ffffff;
  --pink-soft: #ffebee;
  --text-main: #4b5563;
  --text-light: #6b7280;
  --primary: #e57373;
  --primary-dark: #d32f2f;
}
[data-bs-theme="dark"] {
  --bg: #1a1a1a;
  --bg-card: #2d2d2d;
  --pink-soft: #3a2a2a;
  --text-main: #e0e0e0;
  --text-light: #b0b0b0;
  --primary: #ff8a80;
  --primary-dark: #ff5252;
}
body { font-family: system-ui, "Noto Sans SC", sans-serif; background: var(--bg); color: var(--text-main); transition: all 0.3s; }
.navbar { background: var(--bg-card); box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
.card { background: var(--bg-card); border: none; box-shadow: 0 4px 12px rgba(0,0,0,0.06); transition: transform 0.2s; }
.card:hover { transform: translateY(-4px); }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.dark-mode-toggle { cursor: pointer; font-size: 1.4rem; }
.main-content-wrapper {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
}
@media (max-width: 992px) {
  .main-content-wrapper {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
}
footer { background: var(--bg-card); color: var(--text-light); padding: 2.5rem 0; margin-top: 4rem; }

/* Ensure images in image bind sections have consistent aspect-ratio and crop to fit */
/* Grid layout for two-column image binds (林云 / 李琳祎) with 1:1 squares */
.imagebind-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 768px) {
  .imagebind-section { grid-template-columns: 1fr; }
}
.imagebind-section .grid-item {
  width: 100%;
}
/* Support for the new 2x2 blocks inside imagebind-section */
.imagebind-section .portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.imagebind-section .portfolio-grid .portfolio-item {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 6px;
  background: #f0f0f0;
}
.imagebind-section .portfolio-grid .portfolio-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imagebind-section .ratio { /* fallback for legacy ratio usage */ width: 100%; aspect-ratio: 1/1; overflow:hidden; }
.imagebind-section .ratio img { width: 100%; height: 100%; object-fit: cover; }

/* 2x2 grid layout for exact square items (new plan) */
.imagebind-section-two-by-two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 768px) {
  .imagebind-section-two-by-two { grid-template-columns: 1fr; }
}
.imagebind-section-two-by-two .grid-item {
  width: 100%;
}
.imagebind-section-two-by-two .grid-item .ratio {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #f0f0f0;
  border-radius: 6px;
  display: block;
}
.imagebind-section-two-by-two .grid-item .ratio img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
