/* =============================================
   INW — India Nature Watch
   Design system & page styles
   ============================================= */

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

:root {
  /* ── New design tokens (warm earthy palette, Inter Tight) ── */
  --bg:      #f7f5f0;   /* page background — warm off-white */
  --bg-alt:  #e9e5db;   /* slightly darker bg / chrome */
  --card:    #ffffff;   /* card surface */
  --ink:     #2b3a2a;   /* primary text — deep forest */
  --ink-2:   #5a6b55;   /* secondary text */
  --sage:    #7a8559;   /* primary accent — sage green */
  --sage-dark: #5d6644; /* darker sage for hover */
  --ochre:   #c7b98a;   /* secondary accent */
  --line:    #e4dfd2;   /* hairline borders */
  --line-2:  #ebe6d8;   /* very light fill */
  --muted:   #9a9582;   /* meta / tertiary text */

  /* ── Legacy variable names — remapped to the new palette so existing rules keep working ── */
  --blue-950: #1d2a1c;
  --blue-900: var(--ink);          /* deep forest */
  --blue-800: #364737;
  --blue-700: var(--ink-2);
  --blue-600: #6b7a4f;
  --blue-500: var(--sage);         /* primary action */
  --blue-400: #95a276;
  --blue-300: #b8c19c;
  --blue-100: #e8ecdc;
  --blue-50:  #f0f2e6;

  --white:    var(--card);
  --gray-50:  var(--bg);           /* subtle bg */
  --gray-100: var(--line-2);
  --gray-200: var(--line);
  --gray-300: var(--ochre);
  --gray-500: var(--muted);
  --gray-700: var(--ink-2);
  --gray-900: var(--ink);

  --text:       var(--ink);
  --text-muted: var(--ink-2);

  --font-body:    'Inter Tight', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-display: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 4px rgba(0,20,40,.07);
  --shadow-md: 0 4px 16px rgba(0,20,40,.12);
  --shadow-lg: 0 8px 32px rgba(0,20,40,.18);

  --transition: 200ms ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a  { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section      { padding: 72px 0; }
.bg-subtle    { background: var(--gray-50); }

/* --- Buttons --- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue-500);
  color: var(--white);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  border: none; cursor: pointer;
  transition: background var(--transition);
}
.btn-primary:hover { background: var(--blue-700); }

.btn-ghost {
  display: inline-flex; align-items: center;
  background: transparent;
  color: var(--text);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  border: 1.5px solid var(--gray-200);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.btn-ghost:hover { border-color: var(--blue-500); color: var(--blue-500); }

/* =============================================
   HEADER / NAV
   ============================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,245,240,0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex; align-items: center; gap: 32px;
  height: 108px;
}

.logo {
  display: flex; align-items: center;
  white-space: nowrap;
}
.logo img { height: 95px; width: auto; display: block; }
/* Legacy text-mark fallback (unused once HTML is updated) */
.logo-icon { display: none; }
.logo-text { display: none; }

.main-nav {
  display: flex; gap: 4px;
  flex: 1;
}
.main-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.main-nav a:hover, .main-nav a.active {
  color: var(--blue-700);
  background: var(--blue-50);
}

.nav-search {
  display: flex;
  align-items: center;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex: 1;
  max-width: 320px;
}
.nav-search input {
  flex: 1;
  padding: 7px 12px;
  font-size: 13px;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
}
.nav-search button {
  background: none;
  border: none;
  padding: 6px 10px;
  font-size: 18px;
  color: var(--gray-500);
  cursor: pointer;
  line-height: 1;
}
.nav-search:focus-within {
  border-color: var(--blue-500);
  background: var(--white);
}

.nav-actions { display: flex; gap: 8px; margin-left: auto; }

.hamburger {
  display: none;
  background: none; border: none;
  font-size: 22px; cursor: pointer;
  color: var(--text); margin-left: auto;
}

/* =============================================
   HERO
   ============================================= */
.hero-wrap {
  max-width: 1280px;
  margin: 32px auto;
  padding: 0 24px;
}

.hero {
  position: relative;
  height: min(560px, 60vw);
  min-height: 340px;
  overflow: hidden;
  display: flex; align-items: center;
  border-radius: 16px;
}

.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.04);
  transition: transform 10s ease;
}
.hero:hover .hero-bg { transform: scale(1); }

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(105deg,
    rgba(6,15,30,0.88) 0%,
    rgba(13,27,46,0.55) 55%,
    transparent 100%);
  border-radius: 16px;
}

.hero-content {
  position: relative;
  color: var(--white);
  max-width: 580px;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-content p {
  font-size: clamp(14px, 2vw, 17px);
  opacity: 0.85;
  margin-bottom: 28px;
  max-width: 460px;
}

.hero-search {
  display: flex;
  max-width: 500px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-search input {
  flex: 1;
  padding: 14px 18px;
  font-size: 14px;
  border: none; outline: none;
  color: var(--text);
}
.hero-search .btn-primary {
  border-radius: 0;
  padding: 14px 24px;
  font-size: 14px;
}

/* =============================================
   CATEGORY TILES
   ============================================= */
.section-header {
  display: flex; align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(0.7rem, 1.5vw, 1rem);
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 32px;
}
.section-header .section-title { margin-bottom: 0; }

.view-all {
  font-size: 14px; font-weight: 500;
  color: var(--blue-500);
  transition: color var(--transition);
}
.view-all:hover { color: var(--blue-700); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.cat-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--gray-100);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.cat-card img {
  position: absolute; inset: 0;
  transition: transform 400ms ease;
}
.cat-card:hover img { transform: scale(1.06); }

.cat-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 36px 14px 14px;
  background: linear-gradient(transparent, rgba(6,15,30,0.78));
  color: var(--white);
  display: flex; flex-direction: column; gap: 2px;
}
.cat-name  { font-size: 15px; font-weight: 600; }
.cat-count { font-size: 12px; opacity: 0.75; }

/* =============================================
   IMAGE GRID
   ============================================= */
.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* 4-column variant used on the homepage recent grid */
.image-grid-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.image-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: transform var(--transition), box-shadow var(--transition);
}
.image-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.image-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--gray-100);
}
/* Tighter meta text inside the 4-col grid */
.image-grid-4 .image-meta { padding: 8px 10px; }
.image-grid-4 .img-title  { font-size: 13px; }
.image-grid-4 .img-author { font-size: 11px; }
.image-thumb img { transition: transform 400ms ease; }
.image-card:hover .image-thumb img { transform: scale(1.05); }

.image-meta {
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.img-title {
  font-size: 14px; font-weight: 500;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.img-author { font-size: 12px; color: var(--text-muted); }

/* =============================================
   TOP 10 COMMUNITY HIGHLIGHTS
   ============================================= */
.top10-section {
  background: var(--white);
  border-top: 1px solid var(--gray-100);
}
.top10-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 768px) {
  .top10-grid { grid-template-columns: 1fr; }
}
.top10-col {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.top10-col-head {
  background: var(--blue-800);
  color: var(--white);
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.top10-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
.top10-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 20px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
  transition: background var(--transition);
}
.top10-list li:last-child { border-bottom: none; }
.top10-list li:hover { background: var(--gray-100); }
.top10-rank {
  width: 20px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-300);
  text-align: right;
}
.top10-rank.gold   { color: #d4a017; }
.top10-rank.silver { color: #9aa3af; }
.top10-rank.bronze { color: #b07a4e; }
.top10-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--blue-600);
  font-weight: 400;
  text-decoration: none;
}
.top10-label:hover { text-decoration: underline; color: var(--blue-500); }
.top10-count {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.skeleton-col {
  height: 380px;
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200%;
  animation: shimmer 1.4s infinite;
}

/* =============================================
   STATS STRIP
   ============================================= */
.stats-strip {
  background: var(--blue-900);
  color: var(--white);
  padding: 52px 0;
}
.stats-strip .container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 32px;
}
.stat {
  text-align: center;
  display: flex; flex-direction: column; gap: 4px;
}
.stat strong {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  color: var(--blue-300);
}
.stat span {
  font-size: 12px; opacity: 0.65;
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--blue-950);
  color: rgba(255,255,255,0.6);
  padding: 52px 0 32px;
}
.site-footer .container {
  display: flex; flex-direction: column; gap: 24px;
}
.footer-brand .logo-text {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 600;
  color: var(--white);
  display: block; margin-bottom: 8px;
}
.footer-brand p { font-size: 13px; max-width: 360px; }

.footer-links {
  display: flex; gap: 24px; flex-wrap: wrap;
}
.footer-links a {
  font-size: 13px;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--white); }

.copyright { font-size: 12px; opacity: 0.4; border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; }

/* =============================================
   GALLERY PAGE
   ============================================= */
.gallery-hero {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 100%);
  color: var(--white);
  padding: 52px 0 36px;
}
.gallery-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 8px;
}
.gallery-hero p { opacity: 0.65; font-size: 14px; }

/* Shorter hero variant on gallery page */
.gallery-page-hero {
  height: 260px !important;
  min-height: 200px !important;
}
.gallery-page-hero .hero-content h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
}

.gallery-toolbar {
  display: flex; gap: 12px; align-items: center;
  padding: 20px 0;
  flex-wrap: wrap;
}

.filter-chips {
  display: flex; gap: 8px; flex-wrap: wrap; flex: 1;
}

.chip {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--gray-200);
  color: var(--text-muted);
  cursor: pointer; background: var(--white);
  transition: all var(--transition);
}
.chip:hover, .chip.active {
  background: var(--blue-500);
  color: var(--white);
  border-color: var(--blue-500);
}

.sort-select {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  font-size: 13px; color: var(--text);
  background: var(--white); cursor: pointer;
  outline: none;
}
.sort-select:focus { border-color: var(--blue-500); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding-bottom: 72px;
}

/* =============================================
   IMAGE DETAIL PAGE
   ============================================= */
.image-detail {
  padding: 32px 0 72px;
}

.image-viewer {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg);
  margin-bottom: 12px;
}
.image-viewer img {
  width: 100%; height: auto;
  object-fit: contain;
  max-height: 80vh;
}

.image-nav {
  display: flex; justify-content: space-between;
  margin-bottom: 14px;
}

.image-caption {
  margin: 24px 0 28px;
}
.image-caption h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.012em;
}
.image-caption .sci-name {
  font-style: italic;
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 4px;
}
.image-caption p {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 780px;
}

.image-meta-box {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 40px;
}

.meta-avatar {
  display: block;
  width: 140px;
  height: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--line-2);
  text-decoration: none;
  flex-shrink: 0;
}
.meta-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.meta-avatar .avatar-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 600;
}

.meta-fields { display: flex; flex-direction: column; gap: 0; }
.meta-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.4;
}
.meta-row-label {
  flex-shrink: 0;
  width: 80px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.meta-row-value { flex: 1; min-width: 0; color: var(--ink); }
.meta-row-value.link { color: var(--sage); text-decoration: none; font-weight: 500; }
.meta-row-value.link:hover { text-decoration: underline; }

.exif-strip {
  display: flex; flex-wrap: wrap; gap: 6px 10px;
  padding: 10px 0 4px;
  border-top: 1px solid var(--gray-200);
  margin-top: 4px;
}
.exif-item { display: flex; flex-direction: column; min-width: 56px; }
.exif-label { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.exif-value { font-size: 13px; color: var(--ink); font-weight: 500; white-space: nowrap; }

.meta-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 8px;
}
.meta-actions .like-btn { margin-bottom: 0; padding: 5px 14px; font-size: 12px; }
.meta-actions .btn-ghost,
.meta-actions button { padding: 5px 12px; font-size: 12px; }

@media (max-width: 600px) {
  .image-meta-box { grid-template-columns: 1fr; }
  .meta-avatar { width: 100px; height: 100px; }
}

.image-title-block { margin-bottom: 20px; }
.image-title-block h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 4px;
  color: var(--blue-900);
}
.image-title-block .sci-name {
  font-style: italic; color: var(--text-muted); font-size: 14px;
}

.meta-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 13px;
}
.meta-table th {
  text-align: left; padding: 7px 0;
  color: var(--text-muted); font-weight: 500;
  width: 110px; vertical-align: top;
  border-bottom: 1px solid var(--gray-100);
}
.meta-table td {
  padding: 7px 0; color: var(--text);
  border-bottom: 1px solid var(--gray-100);
}

.tag-list {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 12px; font-weight: 500;
  border: 1px solid var(--blue-100);
  cursor: pointer;
  transition: background var(--transition);
}
.tag:hover { background: var(--blue-100); }

.photographer-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  background: var(--gray-50);
  margin-bottom: 20px;
}
.photographer-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 600; flex-shrink: 0;
}
.photographer-info .name { font-weight: 600; font-size: 14px; }
.photographer-info .sub  { font-size: 12px; color: var(--text-muted); }

.like-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  font-size: 13px; font-weight: 500;
  cursor: pointer; color: var(--text-muted);
  transition: all var(--transition);
  margin-bottom: 20px;
}
.like-btn:hover { border-color: #e54d4d; color: #e54d4d; }
.like-btn.liked { background: #fff0f0; border-color: #e54d4d; color: #e54d4d; }

.comments-section h3 {
  font-size: 15px; font-weight: 600; margin-bottom: 12px;
  color: var(--blue-900);
}
.comment-login {
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  border: 1px dashed var(--gray-200);
  font-size: 13px; color: var(--text-muted);
  text-align: center;
}
.comment-login a { color: var(--blue-500); font-weight: 500; }

.comment-item {
  display: flex;
  gap: 12px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
}
.comment-avatar-wrap { flex-shrink: 0; }
.comment-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  overflow: hidden;
}
.comment-avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.comment-body { flex: 1; min-width: 0; }
.comment-header {
  display: flex; gap: 8px; align-items: baseline;
  margin-bottom: 6px; flex-wrap: wrap;
}
.comment-author {
  font-size: 13px; font-weight: 700;
  color: var(--blue-600);
  text-decoration: none;
}
.comment-author:hover { text-decoration: underline; }
.comment-date   { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.comment-text   { font-size: 13px; color: var(--text-muted); line-height: 1.65; }

.comment-edit-btn {
  background: none; border: none; cursor: pointer;
  font-size: 11px; font-weight: 500;
  color: var(--gray-300);
  padding: 0 2px;
  margin-left: 4px;
  transition: color var(--transition);
}
.comment-edit-btn:hover { color: var(--blue-500); }

.comment-replies {
  margin-left: 36px;
  margin-top: -4px;
  margin-bottom: 10px;
  border-left: 2px solid var(--gray-100);
  padding-left: 14px;
}
.comment-reply { background: var(--white); }
.comment-reply .comment-avatar { width: 32px; height: 32px; font-size: 12px; }

/* =============================================
   HOME FEED (2-column layout)
   ============================================= */
.home-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  padding: 48px 0 72px;
  align-items: start;
}

.feed-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.feed-item {
  display: block;
  padding: 9px 14px;
  background: var(--white);
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--gray-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  transition: background var(--transition);
}
.feed-item:last-child { border-bottom: none; }
.feed-item:hover { background: var(--gray-50); }

.feed-title { font-weight: 500; color: var(--text); }
.feed-by { color: var(--text-muted); font-weight: 300; }

.home-sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 0; }

.sidebar-card {
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.sidebar-head {
  background: var(--blue-800);
  color: var(--white);
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sidebar-head a {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,.65);
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
}
.sidebar-head a:hover { color: #fff; }

.forum-item {
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-100);
  background: var(--white);
  transition: background var(--transition);
}
.forum-item:last-child { border-bottom: none; }
.forum-item:hover { background: var(--gray-50); }

.forum-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--blue-700);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.forum-item-title:hover { text-decoration: underline; }
.forum-item-meta { font-size: 11px; color: var(--text-muted); }

@media (max-width: 900px) {
  .home-main { grid-template-columns: 1fr; }
  .home-sidebar { position: static; }
}

/* =============================================
   ABOUT PAGE
   ============================================= */
.about-hero {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 100%);
  color: var(--white);
  padding: 80px 0 64px;
  text-align: center;
}
.about-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 16px;
}
.about-hero p {
  font-size: 17px; opacity: 0.75;
  max-width: 520px; margin: 0 auto;
}

.about-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 24px;
}
.about-body h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--blue-900);
  margin: 40px 0 12px;
}
.about-body p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.founders-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.founder-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  background: var(--gray-50);
}
.founder-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--blue-700);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600; flex-shrink: 0;
}
.founder-name { font-weight: 600; font-size: 14px; }

/* =============================================
   UPLOAD PAGE
   ============================================= */
.upload-page { max-width: 680px; margin: 0 auto; padding: 48px 24px; }
.upload-page h1 {
  font-family: var(--font-display);
  font-size: 2rem; color: var(--blue-900);
  margin-bottom: 32px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  font-size: 14px; color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition);
  font-family: var(--font-body);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--blue-500); }
.form-group textarea { resize: vertical; min-height: 80px; }

.upload-dropzone {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-md);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--gray-50);
  margin-bottom: 20px;
}
.upload-dropzone:hover { border-color: var(--blue-500); background: var(--blue-50); }
.upload-dropzone p { font-size: 14px; color: var(--text-muted); margin-top: 8px; }
.upload-dropzone .hint { font-size: 12px; margin-top: 4px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .image-grid     { grid-template-columns: repeat(2, 1fr); }
  .image-grid-4   { grid-template-columns: repeat(3, 1fr); }
  .image-meta-box { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .main-nav, .nav-actions { display: none; }
  .hamburger { display: block; margin-left: 8px; }

  .site-header .container { gap: 12px; padding: 0 16px; }
  .logo-text { display: none; }

  /* Mobile: collapse search to icon only; expands to overlay the header */
  .site-header .container { position: relative; }

  .nav-search {
    background: transparent;
    border: none;
    flex: 0 0 auto;
    max-width: none;
    margin-left: auto;
  }
  .nav-search input { display: none; }
  .nav-search button { font-size: 22px; padding: 6px 8px; color: var(--text); }

  .nav-search.expanded {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    z-index: 10;
  }
  .nav-search.expanded input { display: block; flex: 1; }
  .nav-search.expanded button { font-size: 18px; color: var(--gray-500); padding: 6px 10px; }

  .cat-grid     { grid-template-columns: repeat(2, 1fr); }
  .image-grid   { grid-template-columns: repeat(2, 1fr); }
  .image-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .section      { padding: 48px 0; }
}

@media (max-width: 480px) {
  .image-grid   { grid-template-columns: 1fr; }
  .image-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: 1fr; }
  .stats-strip .container { flex-direction: column; align-items: center; }
  .founders-grid { grid-template-columns: 1fr; }
}
