@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/fraunces-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/fraunces-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/fonts/jetbrainsmono-variable.woff2') format('woff2');
}
/* klein.ruhr — main.css */


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

:root {
  --bg:           #0d1f1a;
  --surface:      #122820;
  --surface2:     #1a3529;
  --cream:        #f0ece4;
  --cream-dim:    rgba(240, 236, 228, 0.6);
  --cream-muted:  rgba(240, 236, 228, 0.35);
  --teal:         #2dd4bf;
  --teal-dim:     rgba(45, 212, 191, 0.12);
  --teal-glow:    rgba(45, 212, 191, 0.25);
  --amber:        #f59e0b;
  --amber-dim:    rgba(245, 158, 11, 0.12);
  --border:       rgba(240, 236, 228, 0.08);
  --border-hover: rgba(45, 212, 191, 0.3);
  --shadow:       0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-teal:  0 4px 32px rgba(45, 212, 191, 0.15);
  --r:            16px;

  /* Saison-Akzent (wird per JS überschrieben) */
  --season-blob1: var(--teal);
  --season-blob2: #1a6b4a;
  --season-blob3: var(--amber);
}

/* ─── Base ───────────────────────────────────────── */

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background 0.6s ease;
}

/* ─── Blobs ──────────────────────────────────────── */

.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
  transition: background 0.8s ease;
}
.blob-1 { width: 500px; height: 500px; background: var(--season-blob1); top: -120px; right: -100px; }
.blob-2 { width: 400px; height: 400px; background: var(--season-blob2); bottom: -80px; left: -80px; }
.blob-3 { width: 280px; height: 280px; background: var(--season-blob3); bottom: 200px; right: 80px; opacity: 0.1; }

/* ─── Layout ─────────────────────────────────────── */

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ─── Navigation ─────────────────────────────────── */

nav {
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--teal);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.8; }

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--teal-glow); }
  50%       { box-shadow: 0 0 0 6px transparent; }
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--cream-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--cream); }

/* ─── Season Badge ───────────────────────────────── */

.season-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--teal-dim);
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 100px;
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--teal);
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  margin-top: 0.75rem;
}
.season-badge.visible {
  opacity: 1;
  transform: translateY(0);
}
.season-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}

/* ─── Blog Hero ──────────────────────────────────── */

.blog-hero {
  padding: 3rem 0 2rem;
}
.blog-hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-bottom: 0.5rem;
}
.blog-hero h1 em {
  color: var(--teal);
  font-style: italic;
}
.blog-hero p {
  color: var(--cream-dim);
  font-size: 1rem;
}

/* ─── Tag Chips / Filter ─────────────────────────── */

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--cream-dim);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.filter-chip:hover,
.filter-chip.active {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-dim);
}

/* ─── Tag Pills ──────────────────────────────────── */

.tag {
  background: var(--teal-dim);
  border: 1px solid rgba(45, 212, 191, 0.2);
  color: var(--teal);
  font-size: 0.68rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
}
.tag.amber {
  background: var(--amber-dim);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--amber);
}

/* ─── Post Cards ─────────────────────────────────── */

.posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 3rem;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}
.post-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--teal-dim), transparent);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.post-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-teal);
}
.post-card:hover::before { opacity: 1; }
.post-card:hover .post-arrow {
  transform: translateX(4px);
  color: var(--teal);
}

.post-card.featured {
  background: var(--surface2);
  border-color: rgba(45, 212, 191, 0.2);
}
.featured-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--amber);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.post-inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.post-content { flex: 1; }

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.post-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--cream-muted);
}

.post-card h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.25;
  margin-bottom: 0.4rem;
}
.post-card.featured h2 { font-size: 1.6rem; }

.post-card p {
  font-size: 0.88rem;
  color: var(--cream-dim);
  line-height: 1.6;
}
.post-arrow {
  font-size: 1.2rem;
  color: var(--cream-muted);
  transition: all 0.2s;
  flex-shrink: 0;
  margin-top: 4px;
}

/* ─── Section Divider ────────────────────────────── */

.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0;
  color: var(--cream-muted);
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── Article ────────────────────────────────────── */

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

.back-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--cream-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1.5rem;
  transition: color 0.15s;
}
.back-link:hover { color: var(--teal); }

.article-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.article-meta time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--cream-muted);
}

.article-header h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--cream-dim);
  line-height: 1.7;
  font-style: italic;
  border-left: 3px solid var(--teal);
  padding-left: 1rem;
}

/* ─── Article Body ───────────────────────────────── */

.article-body {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--cream-dim);
}
.article-body h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--cream);
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}
.article-body h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--cream);
  margin: 2rem 0 0.75rem;
}
.article-body p { margin-bottom: 1.25rem; }

.article-body a {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: rgba(45, 212, 191, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.article-body a:hover { text-decoration-color: var(--teal); }

.article-body img {
  width: 100%;
  border-radius: var(--r);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin: 1.5rem 0;
  display: block;
}

.article-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--teal);
}

.article-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}
.article-body pre code {
  background: none;
  padding: 0;
  color: var(--cream-dim);
  font-size: 0.9rem;
}

.article-body blockquote {
  border-left: 3px solid var(--teal);
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  background: var(--teal-dim);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--cream-dim);
}

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

.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.article-body th {
  background: var(--surface2);
  color: var(--cream);
  font-weight: 500;
  text-align: left;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border-hover);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}
.article-body td {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  color: var(--cream-dim);
}
.article-body tr:last-child td { border-bottom: none; }

/* ─── Article Footer ─────────────────────────────── */

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

.author-card {
  display: flex;
  align-items: center;
  gap: 12px;
}
.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  object-fit: cover;
}
.author-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cream);
}
.author-handle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--cream-muted);
}

/* ─── Footer ─────────────────────────────────────── */

footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.foot-copy {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--cream-muted);
}
.foot-links {
  display: flex;
  gap: 1rem;
}
.foot-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--cream-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.foot-links a:hover { color: var(--teal); }

/* ─── Linkpage (index.html) ──────────────────────── */

.linkpage {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1rem 4rem;
}
.linkpage-inner {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}
.profile {
  text-align: center;
  margin-bottom: 2rem;
}
.avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 1.25rem;
}
.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  object-fit: cover;
  display: block;
  box-shadow: 0 0 0 4px var(--teal-dim), var(--shadow);
}
.status-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--teal);
  border: 2px solid var(--bg);
  animation: pulse 2.5s ease-in-out infinite;
}
.profile h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  color: var(--cream);
}
.profile .tagline {
  font-size: 0.8rem;
  color: var(--cream-muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
}

.link-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 2rem;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-decoration: none;
  color: var(--cream);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}
.link-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--teal);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.2s ease;
  border-radius: 0 2px 2px 0;
}
.link-card:hover {
  background: var(--surface2);
  border-color: var(--border-hover);
  transform: translateX(3px);
  box-shadow: var(--shadow-teal);
}
.link-card:hover::before { transform: scaleY(1); }
.link-card:hover .link-arrow {
  color: var(--teal);
  transform: translateX(3px);
}

.link-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--teal-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(45, 212, 191, 0.15);
}
.link-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(0.85);
}

.link-label { flex: 1; }
.link-arrow {
  color: var(--cream-muted);
  font-size: 14px;
  transition: color 0.15s, transform 0.15s;
}

.linkpage-footer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--cream-muted);
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  justify-content: center;
  gap: 16px;
}
.linkpage-footer a {
  color: var(--cream-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.linkpage-footer a:hover { color: var(--teal); }

/* ─── Responsive ─────────────────────────────────── */

@media (max-width: 600px) {
  .nav-links { gap: 1rem; }
  .post-card { padding: 1.1rem; }
  .article-header h1 { font-size: 1.8rem; }
  .article-body h2 { font-size: 1.3rem; }
  .article-footer { flex-direction: column; align-items: flex-start; }
}

/* ─── Reduced Motion ─────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ─── Nav Icons ──────────────────────────────────── */

.nav-icons {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--cream-muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.nav-icon:hover {
  color: var(--teal);
  background: var(--teal-dim);
}
.nav-icon svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ─── About Page ─────────────────────────────────── */

.contact-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--teal);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 100px;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}
.contact-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}
.contact-btn--secondary {
  background: var(--surface2);
  color: var(--cream);
  border: 1px solid var(--border-hover);
}
.contact-btn--secondary:hover {
  background: var(--surface);
}

/* ─── Nav Overrides ──────────────────────────────── */
nav { border-bottom: none; }

.nav-icons {
  border-left: none;
  margin-left: 4px;
  padding-left: 4px;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

/* ─── Nav Alignment Fix ──────────────────────────── */
.nav-links {
  align-items: center;
}
.nav-icons {
  align-items: center;
}

/* ─── Blog Subtitle ──────────────────────────────── */
.blog-subtitle {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-style: italic;
  color: var(--teal);
  margin-top: 0.25rem;
  margin-bottom: 0;
}
.blog-hero h1 {
  margin-bottom: 0.2rem;
}

/* ─── Layout Fix ─────────────────────────────────── */
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.blog-hero {
  padding: 2.5rem 0 1.5rem;
}

/* ─── Page Layout Fixes ──────────────────────────── */
.pages .article-header,
.page .article-header {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ─── Contact Button Fix ─────────────────────────── */
.contact-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* ─── Footer Spacing ─────────────────────────────── */
footer {
  margin-top: 2rem;
  padding: 1rem 0;
}

/* ─── Author Card als Link ───────────────────────── */
a.author-card {
  text-decoration: none;
  transition: opacity 0.15s;
}
a.author-card:hover {
  opacity: 0.8;
}

/* ─── UTM Ref via JS ─────────────────────────────── */

/* ─── Article Navigation ─────────────────────────── */
.article-nav {
  display: flex;
  gap: 16px;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.article-nav-item {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.article-nav-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-teal);
}
.article-nav-item a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.article-nav-next a {
  align-items: flex-end;
  text-align: right;
}
.article-nav-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--teal);
  letter-spacing: 0.05em;
}
.article-nav-title {
  font-family: 'Fraunces', serif;
  font-size: 0.95rem;
  color: var(--cream);
  line-height: 1.3;
}

@media (max-width: 600px) {
  .article-nav { flex-direction: column; }
  .article-nav-next a { align-items: flex-start; text-align: left; }
}

/* ─── Image Gallery ──────────────────────────────── */
.gallery {
  display: grid;
  gap: 12px;
  margin: 1.5rem 0;
}
.gallery-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-4 { grid-template-columns: repeat(2, 1fr); }
.gallery-8 { grid-template-columns: repeat(4, 1fr); }

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--surface);
  aspect-ratio: 1;
}
.gallery-item a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  border: none;
  box-shadow: none;
  margin: 0;
  display: block;
  transition: transform 0.3s ease;
}
.gallery-item:hover img {
  transform: scale(1.04);
}
.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: var(--cream);
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gallery-item:hover .gallery-caption {
  opacity: 1;
}

@media (max-width: 600px) {
  .gallery-8 { grid-template-columns: repeat(2, 1fr); }
  .gallery-3 { grid-template-columns: repeat(2, 1fr); }
}
