/* ================================================================
   DevShare — Modern Design System v3
   Full-width, responsive, dark/light mode, professional dev aesthetic
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  /* Brand */
  --brand-1: #6366f1;
  --brand-2: #8b5cf6;
  --brand-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
  --brand-glow: rgba(99, 102, 241, 0.25);

  /* Surface (Light) */
  --bg:         #f8f9fb;
  --bg-2:       #f1f3f7;
  --surface:    #ffffff;
  --surface-2:  #f8f9fb;
  --surface-3:  #eef0f5;

  /* Text (Light) */
  --text-1: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --text-4: #cbd5e1;

  /* Border */
  --border:   rgba(15, 23, 42, 0.08);
  --border-2: rgba(15, 23, 42, 0.04);

  /* Semantic */
  --green:  #10b981;
  --red:    #ef4444;
  --yellow: #f59e0b;
  --blue:   #3b82f6;
  --orange: #f97316;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-brand: 0 4px 20px rgba(99,102,241,0.35);

  /* Radii */
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-xl:   20px;
  --r-2xl:  28px;
  --r-full: 9999px;

  /* Layout */
  --nav-h:     64px;
  --sidebar-w: 260px;
  --content-w: 1280px;
  --card-w:    320px;

  /* Motion */
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast:  150ms;
  --dur-base:  200ms;
  --dur-slow:  350ms;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs:   0.72rem;
  --text-sm:   0.82rem;
  --text-base: 0.92rem;
  --text-md:   1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
}

/* Dark mode */
[data-theme="dark"] {
  --bg:         #0a0a0f;
  --bg-2:       #0f0f1a;
  --surface:    #13131f;
  --surface-2:  #1a1a2e;
  --surface-3:  #1f1f35;

  --text-1: #f1f5f9;
  --text-2: #94a3b8;
  --text-3: #475569;
  --text-4: #1e293b;

  --border:   rgba(241, 245, 249, 0.07);
  --border-2: rgba(241, 245, 249, 0.03);

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.35);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--text-base);
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--dur-slow) var(--ease), color var(--dur-slow) var(--ease);
}
a { color: var(--brand-1); text-decoration: none; transition: color var(--dur-fast); }
a:hover { color: var(--brand-2); }
img { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, textarea, select { font-family: var(--font); color: inherit; }
ul, ol { list-style: none; }

/* ── Layout Containers ───────────────────────────────────── */
.page-wrap { padding-top: var(--nav-h); min-height: 100vh; }
.container {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 24px;
}
.container-sm { max-width: 680px; margin: 0 auto; padding: 0 24px; }
.container-md { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ── NAVBAR ──────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 900;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  border-bottom: 1px solid var(--border);
  transition: background var(--dur-slow), box-shadow var(--dur-slow);
}
[data-theme="dark"] .navbar {
  background: rgba(10,10,15,0.85);
}
.navbar.scrolled { box-shadow: var(--shadow-sm); }

.nav-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--text-1);
  letter-spacing: -0.02em;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-brand-icon {
  width: 34px; height: 34px;
  border-radius: var(--r-md);
  background: var(--brand-gradient);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-brand);
}
.nav-brand-icon svg { width: 18px; height: 18px; color: #fff; }
.nav-brand span { background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-search-wrap {
  flex: 1;
  max-width: 440px;
  position: relative;
}
.nav-search-wrap svg {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  width: 16px; height: 16px;
  pointer-events: none;
}
.nav-search-input {
  width: 100%;
  padding: 9px 16px 9px 38px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  color: var(--text-1);
  outline: none;
  transition: border-color var(--dur-base), box-shadow var(--dur-base), background var(--dur-base);
}
.nav-search-input:focus {
  border-color: var(--brand-1);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.nav-search-input::placeholder { color: var(--text-3); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-link {
  padding: 7px 14px;
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--dur-fast), background var(--dur-fast);
  text-decoration: none;
}
.nav-link:hover { color: var(--text-1); background: var(--surface-3); }
.nav-link.active { color: var(--brand-1); background: rgba(99,102,241,0.08); }

/* Nav icon button */
.nav-icon-btn {
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  background: transparent;
  border: 1.5px solid var(--border);
  transition: all var(--dur-fast);
  cursor: pointer;
  position: relative;
  text-decoration: none;
}
.nav-icon-btn:hover { color: var(--text-1); background: var(--surface-3); border-color: var(--border); }
.nav-icon-btn svg { width: 18px; height: 18px; }
.nav-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  background: var(--red);
  color: #fff;
  font-size: 0.6rem; font-weight: 700;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg);
}

/* Avatar dropdown */
.nav-avatar-wrap { position: relative; }
.nav-avatar-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  background: none; padding: 0;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.nav-avatar-btn:hover { border-color: var(--brand-1); box-shadow: 0 0 0 3px var(--brand-glow); }
.nav-avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px); right: 0;
  min-width: 210px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-8px) scale(0.97);
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease), visibility var(--dur-base);
  z-index: 100;
}
.nav-dropdown.open { opacity: 1; visibility: visible; pointer-events: all; transform: none; }
.nav-dropdown-header {
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.nav-dropdown-header strong { display: block; font-size: var(--text-sm); color: var(--text-1); font-weight: 600; }
.nav-dropdown-header span { font-size: var(--text-xs); color: var(--text-3); }
.nav-dropdown a, .nav-dropdown button {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: var(--text-sm); font-weight: 500;
  color: var(--text-2); text-decoration: none;
  transition: background var(--dur-fast), color var(--dur-fast);
  background: none; cursor: pointer; font-family: var(--font);
  border: none;
}
.nav-dropdown a:hover, .nav-dropdown button:hover { background: var(--surface-2); color: var(--text-1); }
.nav-dropdown a svg, .nav-dropdown button svg { width: 15px; height: 15px; flex-shrink: 0; }
.nav-dropdown .danger { color: var(--red) !important; }
.nav-dropdown .danger:hover { background: rgba(239,68,68,0.08) !important; }
.nav-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 5px 0; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column; gap: 4.5px;
  background: none; border: none;
  padding: 6px; cursor: pointer;
}
.nav-hamburger span { display: block; width: 20px; height: 1.5px; background: var(--text-2); border-radius: 2px; transition: all 0.3s; }

/* Theme toggle */
.theme-btn {
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all var(--dur-fast);
}
.theme-btn:hover { color: var(--brand-1); border-color: rgba(99,102,241,0.3); }
.theme-btn svg { width: 17px; height: 17px; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: none; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 20px;
  border-radius: var(--r-md);
  font-size: var(--text-sm); font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer; transition: all var(--dur-base) var(--ease);
  text-decoration: none; white-space: nowrap; line-height: 1;
  font-family: var(--font);
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }
.btn-sm { padding: 6px 14px; font-size: var(--text-xs); border-radius: var(--r-sm); }
.btn-lg { padding: 12px 28px; font-size: var(--text-md); border-radius: var(--r-lg); }
.btn-xl { padding: 14px 36px; font-size: var(--text-lg); border-radius: var(--r-lg); }

.btn-primary {
  background: var(--brand-gradient); color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(99,102,241,0.45); color: #fff; }
.btn-primary:active { transform: none; }

.btn-outline {
  background: transparent; color: var(--text-2);
  border-color: var(--border);
}
.btn-outline:hover { color: var(--text-1); border-color: var(--brand-1); background: rgba(99,102,241,0.06); }

.btn-ghost {
  background: transparent; color: var(--text-2); border-color: transparent;
}
.btn-ghost:hover { background: var(--surface-3); color: var(--text-1); }

.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { filter: brightness(1.1); color: #fff; }
.btn-success { background: var(--green); color: #fff; border-color: var(--green); }
.btn-success:hover { filter: brightness(1.1); color: #fff; }
.btn-icon { padding: 9px; border-radius: var(--r-md); }

/* ── FORMS ────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.form-label .req { color: var(--red); margin-left: 2px; }
.form-hint { font-size: var(--text-xs); color: var(--text-3); margin-top: 5px; }

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--text-base);
  color: var(--text-1);
  outline: none;
  transition: border-color var(--dur-base), box-shadow var(--dur-base);
  line-height: 1.5;
}
.form-control:focus { border-color: var(--brand-1); box-shadow: 0 0 0 3px var(--brand-glow); }
.form-control::placeholder { color: var(--text-3); }
.form-control:disabled { opacity: 0.6; cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 110px; }
select.form-control {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 36px;
}

/* ── CARDS ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow var(--dur-base), border-color var(--dur-base), transform var(--dur-base);
}
.card:hover { box-shadow: var(--shadow-md); border-color: rgba(99,102,241,0.2); }
.card-body { padding: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }

/* ── PROJECT CARDS ────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base), border-color var(--dur-base);
  text-decoration: none; color: inherit;
  position: relative;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99,102,241,0.25);
}

.project-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface-3);
  position: relative;
}
.project-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.project-card:hover .project-card-thumb img { transform: scale(1.04); }
.project-card-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
}

.project-featured-badge {
  position: absolute; top: 12px; left: 12px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff; font-size: 0.65rem; font-weight: 700;
  padding: 3px 9px; border-radius: var(--r-full);
  text-transform: uppercase; letter-spacing: 0.08em;
  box-shadow: 0 2px 8px rgba(245,158,11,0.4);
}
.project-status-badge {
  position: absolute; top: 12px; right: 12px;
  font-size: 0.65rem; font-weight: 700;
  padding: 3px 9px; border-radius: var(--r-full);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.project-status-pending  { background: rgba(245,158,11,0.9); color: #fff; }
.project-status-rejected { background: rgba(239,68,68,0.9);  color: #fff; }

.project-card-body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; gap: 8px; }

.project-cat-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--text-xs); font-weight: 600;
  color: var(--brand-1);
  background: rgba(99,102,241,0.1);
  padding: 3px 10px; border-radius: var(--r-full);
  text-decoration: none; align-self: flex-start;
  transition: background var(--dur-fast);
}
.project-cat-tag:hover { background: rgba(99,102,241,0.18); color: var(--brand-1); }

.project-title {
  font-size: var(--text-md); font-weight: 700; color: var(--text-1);
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-decoration: none;
}
.project-title:hover { color: var(--brand-1); }

.project-desc {
  font-size: var(--text-sm); color: var(--text-2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.project-tag {
  font-size: var(--text-xs); color: var(--text-3);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 2px 8px; border-radius: var(--r-full);
  transition: color var(--dur-fast), border-color var(--dur-fast);
  text-decoration: none;
}
.project-tag:hover { color: var(--brand-1); border-color: rgba(99,102,241,0.3); }

.project-card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-2);
}
.project-author {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.project-author img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--border); }
.project-author span { font-size: var(--text-xs); font-weight: 500; color: var(--text-2); transition: color var(--dur-fast); }
.project-author:hover span { color: var(--brand-1); }
.project-stats { display: flex; align-items: center; gap: 10px; }
.project-stat { display: flex; align-items: center; gap: 3px; font-size: var(--text-xs); color: var(--text-3); }
.project-stat svg { width: 13px; height: 13px; }

/* ── SECTION HEADERS ──────────────────────────────────────── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.section-title { font-size: var(--text-xl); font-weight: 800; color: var(--text-1); letter-spacing: -0.02em; }
.section-title-sm { font-size: var(--text-lg); font-weight: 700; color: var(--text-1); letter-spacing: -0.01em; }
.section-link { font-size: var(--text-sm); font-weight: 600; color: var(--brand-1); display: inline-flex; align-items: center; gap: 4px; }
.section-link:hover { color: var(--brand-2); }

/* ── FILTER CHIPS ─────────────────────────────────────────── */
.filter-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 16px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.filter-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: var(--text-xs); font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer; transition: all var(--dur-fast);
  text-decoration: none; white-space: nowrap;
}
.filter-chip:hover { border-color: var(--brand-1); color: var(--brand-1); background: rgba(99,102,241,0.06); }
.filter-chip.active { background: var(--brand-1); color: #fff; border-color: var(--brand-1); box-shadow: 0 2px 8px rgba(99,102,241,0.3); }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  padding: calc(var(--nav-h) + 72px) 0 80px;
  position: relative; overflow: hidden; text-align: center;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99,102,241,0.12) 0%, transparent 70%);
}
[data-theme="dark"] .hero-bg {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99,102,241,0.2) 0%, transparent 70%);
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 30%, transparent 80%);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.25);
  color: var(--brand-1);
  font-size: var(--text-xs); font-weight: 700;
  padding: 5px 14px; border-radius: var(--r-full);
  margin-bottom: 22px; letter-spacing: 0.04em; text-transform: uppercase;
  animation: fadeUp 0.6s var(--ease) both;
}
.hero-h1 {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  font-weight: 900; line-height: 1.1; letter-spacing: -0.03em;
  color: var(--text-1); margin-bottom: 20px;
  animation: fadeUp 0.6s 0.08s var(--ease) both;
}
.hero-h1 .gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem); color: var(--text-2); max-width: 580px;
  margin: 0 auto 36px; line-height: 1.7;
  animation: fadeUp 0.6s 0.16s var(--ease) both;
}
.hero-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  animation: fadeUp 0.6s 0.24s var(--ease) both;
}
.hero-stats {
  display: flex; gap: 40px; justify-content: center; flex-wrap: wrap;
  margin-top: 52px; padding-top: 40px;
  border-top: 1px solid var(--border);
  animation: fadeUp 0.6s 0.32s var(--ease) both;
}
.hero-stat strong { display: block; font-size: var(--text-2xl); font-weight: 800; color: var(--text-1); letter-spacing: -0.02em; }
.hero-stat span { font-size: var(--text-sm); color: var(--text-3); }

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

/* ── PROFILE ──────────────────────────────────────────────── */
.profile-hero {
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border-bottom: 1px solid var(--border);
  padding: calc(var(--nav-h) + 32px) 0 0;
}
.profile-hero-inner { display: flex; gap: 28px; align-items: flex-end; padding-bottom: 28px; }
.profile-avatar-wrap {
  position: relative; flex-shrink: 0;
}
.profile-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  border: 4px solid var(--surface); box-shadow: var(--shadow-md);
  object-fit: cover;
}
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: var(--text-2xl); font-weight: 800; color: var(--text-1); letter-spacing: -0.02em; }
.profile-username { font-size: var(--text-sm); color: var(--text-3); font-family: var(--font-mono); margin-top: 2px; }
.profile-bio { font-size: var(--text-sm); color: var(--text-2); margin-top: 8px; max-width: 500px; line-height: 1.6; }
.profile-meta { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 12px; }
.profile-meta a, .profile-meta span { font-size: var(--text-xs); color: var(--text-3); display: flex; align-items: center; gap: 5px; text-decoration: none; }
.profile-meta a:hover { color: var(--brand-1); }
.profile-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.profile-stat { display: flex; flex-direction: column; }
.profile-stat strong { font-size: var(--text-xl); font-weight: 800; color: var(--text-1); line-height: 1; }
.profile-stat span { font-size: var(--text-xs); color: var(--text-3); margin-top: 2px; }

/* Profile tabs */
.profile-tabs { display: flex; border-bottom: 1px solid var(--border); margin-top: 24px; }
.profile-tab {
  padding: 12px 20px; font-size: var(--text-sm); font-weight: 600;
  color: var(--text-3); text-decoration: none; border-bottom: 2px solid transparent;
  transition: color var(--dur-fast), border-color var(--dur-fast); margin-bottom: -1px;
}
.profile-tab:hover { color: var(--text-2); }
.profile-tab.active { color: var(--brand-1); border-bottom-color: var(--brand-1); }

/* ── PROJECT DETAIL ───────────────────────────────────────── */
.project-detail-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.project-detail-main { min-width: 0; }
.project-detail-sidebar { position: sticky; top: calc(var(--nav-h) + 20px); }

.project-hero-img {
  width: 100%; border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid var(--border); margin-bottom: 28px;
  aspect-ratio: 16/9; background: var(--surface-2);
}
.project-hero-img img { width: 100%; height: 100%; object-fit: cover; }

.project-detail-title { font-size: var(--text-3xl); font-weight: 800; color: var(--text-1); letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 14px; }
.project-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 20px; }
.project-author-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.project-author-link img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.project-author-name { font-weight: 600; font-size: var(--text-sm); color: var(--text-1); }
.project-author-handle { font-size: var(--text-xs); color: var(--text-3); font-family: var(--font-mono); }
.project-detail-stat { display: flex; align-items: center; gap: 4px; font-size: var(--text-xs); color: var(--text-3); }
.project-detail-stat svg { width: 13px; height: 13px; }

.project-action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }

/* Like / Bookmark buttons */
.like-btn, .bookmark-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--r-md);
  font-size: var(--text-sm); font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text-2);
  cursor: pointer; transition: all var(--dur-base); font-family: var(--font);
}
.like-btn:hover   { border-color: var(--red);   color: var(--red);   background: rgba(239,68,68,0.06); }
.like-btn.liked   { border-color: var(--red);   color: var(--red);   background: rgba(239,68,68,0.08); }
.like-btn.liked svg { fill: var(--red); }
.bookmark-btn:hover     { border-color: var(--yellow); color: var(--yellow); background: rgba(245,158,11,0.06); }
.bookmark-btn.bookmarked { border-color: var(--yellow); color: var(--yellow); background: rgba(245,158,11,0.08); }
.bookmark-btn.bookmarked svg { fill: var(--yellow); }

/* Code block */
.code-wrap {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r-lg); overflow: hidden; margin-bottom: 28px;
}
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.code-lang { font-family: var(--font-mono); font-size: var(--text-xs); color: #7c85ff; background: rgba(124,133,255,0.12); padding: 2px 10px; border-radius: var(--r-full); }
.code-copy { font-size: var(--text-xs); color: #8b949e; background: none; border: 1px solid rgba(255,255,255,0.1); border-radius: var(--r-sm); padding: 3px 10px; cursor: pointer; font-family: var(--font); transition: all var(--dur-fast); }
.code-copy:hover { color: #c9d1d9; border-color: rgba(255,255,255,0.2); }
.code-copy.copied { color: #3fb950; border-color: rgba(63,185,80,0.3); }
.code-wrap pre { margin: 0; max-height: 480px; overflow: auto; }
.code-wrap pre::-webkit-scrollbar { width: 6px; height: 6px; }
.code-wrap pre::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.code-wrap code { padding: 20px !important; font-family: var(--font-mono) !important; font-size: 0.83rem !important; line-height: 1.75 !important; }

/* Info section */
.info-block { margin-bottom: 28px; }
.info-block-title { font-size: var(--text-md); font-weight: 700; color: var(--text-1); margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.info-block-content { font-size: var(--text-sm); color: var(--text-2); line-height: 1.8; white-space: pre-wrap; word-break: break-word; }

/* Screenshots gallery */
.screenshots-gallery { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.screenshots-gallery::-webkit-scrollbar { height: 4px; }
.screenshots-gallery::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.screenshot-thumb {
  width: 180px; height: 120px; flex-shrink: 0;
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--border); cursor: zoom-in;
  transition: transform var(--dur-base), box-shadow var(--dur-base);
}
.screenshot-thumb:hover { transform: scale(1.03); box-shadow: var(--shadow-md); }
.screenshot-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Sidebar card */
.sidebar-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; margin-bottom: 18px; }
.sidebar-card-body { padding: 18px; }

/* Developer info in sidebar */
.dev-card { display: flex; align-items: center; gap: 12px; }
.dev-card img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex-shrink: 0; }
.dev-name { font-weight: 700; color: var(--text-1); font-size: var(--text-sm); }
.dev-handle { font-size: var(--text-xs); color: var(--text-3); font-family: var(--font-mono); }

/* ── COMMENTS ─────────────────────────────────────────────── */
.comments-section { margin-top: 36px; border-top: 1px solid var(--border); padding-top: 28px; }
.comments-title { font-size: var(--text-lg); font-weight: 700; color: var(--text-1); margin-bottom: 20px; }

.comment-form { display: flex; gap: 12px; margin-bottom: 28px; }
.comment-form img { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; object-fit: cover; border: 2px solid var(--border); }
.comment-form-inner { flex: 1; }
.comment-textarea {
  width: 100%; padding: 10px 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  font-size: var(--text-sm); color: var(--text-1);
  resize: none; min-height: 72px; max-height: 160px;
  outline: none; font-family: var(--font); line-height: 1.6;
  transition: border-color var(--dur-base), box-shadow var(--dur-base);
}
.comment-textarea:focus { border-color: var(--brand-1); box-shadow: 0 0 0 3px var(--brand-glow); background: var(--surface); }
.comment-textarea::placeholder { color: var(--text-3); }
.comment-form-actions { display: flex; justify-content: flex-end; margin-top: 8px; }

.comment-item {
  display: flex; gap: 12px; padding: 16px 0;
  border-bottom: 1px solid var(--border-2);
  animation: fadeUp 0.25s var(--ease) both;
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; object-fit: cover; border: 1.5px solid var(--border); }
.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.comment-author { font-weight: 600; font-size: var(--text-sm); color: var(--text-1); text-decoration: none; }
.comment-author:hover { color: var(--brand-1); }
.comment-time { font-size: var(--text-xs); color: var(--text-3); }
.comment-text { font-size: var(--text-sm); color: var(--text-2); line-height: 1.6; word-break: break-word; }
.comment-delete {
  margin-left: auto; background: none; border: none;
  color: var(--text-3); cursor: pointer; padding: 3px;
  border-radius: var(--r-sm); display: flex; align-items: center;
  transition: color var(--dur-fast), background var(--dur-fast);
}
.comment-delete:hover { color: var(--red); background: rgba(239,68,68,0.08); }
.comment-delete svg { width: 14px; height: 14px; }

/* ── AUTH ─────────────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative; overflow: hidden;
  background: var(--bg);
}
.auth-bg {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 60% at 30% 40%, rgba(99,102,241,0.1), transparent 60%),
              radial-gradient(ellipse 60% 50% at 70% 60%, rgba(139,92,246,0.08), transparent 60%);
}
.auth-card {
  width: 100%; max-width: 460px; position: relative; z-index: 1;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-2xl); padding: 40px;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.4s var(--ease) both;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo a { display: inline-flex; align-items: center; gap: 9px; font-size: var(--text-xl); font-weight: 800; color: var(--text-1); text-decoration: none; letter-spacing: -0.02em; }
.auth-title { font-size: var(--text-2xl); font-weight: 800; color: var(--text-1); margin-bottom: 6px; letter-spacing: -0.02em; }
.auth-sub { font-size: var(--text-sm); color: var(--text-3); margin-bottom: 28px; }
.auth-footer { text-align: center; margin-top: 22px; font-size: var(--text-sm); color: var(--text-3); }
.auth-footer a { color: var(--brand-1); font-weight: 600; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-4); font-size: var(--text-xs); }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.demo-credentials { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px 14px; font-size: var(--text-xs); color: var(--text-3); margin-bottom: 16px; }
.demo-credentials code { color: var(--brand-1); font-family: var(--font-mono); }

/* ── UPLOAD FORM ──────────────────────────────────────────── */
.upload-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.upload-sidebar { position: sticky; top: calc(var(--nav-h) + 20px); }

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--r-xl);
  padding: 32px;
  text-align: center; cursor: pointer;
  transition: border-color var(--dur-base), background var(--dur-base);
  background: var(--surface-2);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--brand-1); background: rgba(99,102,241,0.04);
}
.drop-zone-icon { font-size: 2.5rem; margin-bottom: 10px; }
.drop-zone p { font-size: var(--text-sm); color: var(--text-2); }
.drop-zone span { color: var(--brand-1); font-weight: 600; }

.screenshot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-top: 10px; }
.screenshot-preview-item { position: relative; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 1; border: 1px solid var(--border); }
.screenshot-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.screenshot-remove { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; background: rgba(0,0,0,0.6); color: #fff; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 10px; }

.code-editor-wrap { border: 1.5px solid var(--border); border-radius: var(--r-lg); overflow: hidden; transition: border-color var(--dur-base); }
.code-editor-wrap:focus-within { border-color: var(--brand-1); }
.code-editor-header { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.code-lang-select { border: none; background: transparent; font-size: var(--text-xs); color: var(--text-2); outline: none; cursor: pointer; font-family: var(--font); }
.code-editor-area { width: 100%; min-height: 200px; padding: 14px; font-family: var(--font-mono); font-size: 0.82rem; border: none; outline: none; resize: vertical; background: var(--surface); color: var(--text-1); line-height: 1.7; tab-size: 2; }

/* ── FOLLOW BUTTON ────────────────────────────────────────── */
.follow-btn {
  padding: 8px 20px; border-radius: var(--r-md);
  font-size: var(--text-sm); font-weight: 600;
  border: 1.5px solid var(--brand-1);
  background: transparent; color: var(--brand-1);
  cursor: pointer; transition: all var(--dur-base); font-family: var(--font);
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.follow-btn:hover, .follow-btn.following {
  background: var(--brand-1); color: #fff;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.follow-btn.following {
  background: var(--surface-2); border-color: var(--border); color: var(--text-2);
  box-shadow: none;
}
.follow-btn.following:hover { background: rgba(239,68,68,0.08); border-color: var(--red); color: var(--red); }

/* ── BADGES & STATUS ──────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--text-xs); font-weight: 700;
  padding: 3px 9px; border-radius: var(--r-full);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-brand   { background: rgba(99,102,241,0.12); color: var(--brand-1); }
.badge-success { background: rgba(16,185,129,0.12); color: var(--green); }
.badge-danger  { background: rgba(239,68,68,0.12);  color: var(--red); }
.badge-warning { background: rgba(245,158,11,0.12); color: var(--yellow); }
.badge-info    { background: rgba(59,130,246,0.12); color: var(--blue); }
.badge-muted   { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); }

/* ── ALERTS ───────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--r-lg);
  font-size: var(--text-sm);
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 18px;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: rgba(16,185,129,0.1);  color: var(--green); border: 1px solid rgba(16,185,129,0.2); }
.alert-error   { background: rgba(239,68,68,0.1);   color: var(--red);   border: 1px solid rgba(239,68,68,0.2); }
.alert-warning { background: rgba(245,158,11,0.1);  color: var(--yellow);border: 1px solid rgba(245,158,11,0.2); }
.alert-info    { background: rgba(59,130,246,0.1);  color: var(--blue);  border: 1px solid rgba(59,130,246,0.2); }

/* ── PAGINATION ───────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 40px; flex-wrap: wrap; }
.page-btn {
  min-width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 10px; border-radius: var(--r-md);
  font-size: var(--text-sm); font-weight: 500;
  color: var(--text-2); background: var(--surface);
  border: 1.5px solid var(--border); text-decoration: none;
  transition: all var(--dur-fast);
}
.page-btn:hover { color: var(--brand-1); border-color: rgba(99,102,241,0.35); background: rgba(99,102,241,0.06); }
.page-btn.active { background: var(--brand-gradient); color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(99,102,241,0.35); }

/* ── TOASTS ───────────────────────────────────────────────── */
.toast-stack {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column-reverse; gap: 8px; z-index: 9999;
}
.toast {
  min-width: 280px; max-width: 380px;
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm); color: var(--text-1);
  animation: toastSlide 0.3s var(--ease-spring) both;
}
.toast-icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.toast.success .toast-icon { color: var(--green); }
.toast.error   .toast-icon { color: var(--red); }
.toast.warning .toast-icon { color: var(--yellow); }
.toast.info    .toast-icon { color: var(--brand-1); }
@keyframes toastSlide { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:none; } }

/* ── MODAL ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 5000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; visibility: hidden;
  transition: opacity var(--dur-base), visibility var(--dur-base);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-2xl); padding: 28px;
  max-width: 500px; width: 100%; box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(8px);
  transition: transform var(--dur-base) var(--ease-spring);
}
.modal-overlay.open .modal { transform: none; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-title { font-size: var(--text-lg); font-weight: 700; color: var(--text-1); }
.modal-close { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-3); cursor: pointer; transition: background var(--dur-fast), color var(--dur-fast); border: none; background: none; font-size: 18px; }
.modal-close:hover { background: var(--surface-3); color: var(--text-1); }

/* ── LIGHTBOX ─────────────────────────────────────────────── */
.lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.92); z-index: 9000;
  align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 95vw; max-height: 95vh; border-radius: var(--r-lg); object-fit: contain; box-shadow: 0 0 60px rgba(0,0,0,0.8); }

/* ── EMPTY STATE ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 64px 24px; }
.empty-icon { font-size: 3.5rem; margin-bottom: 14px; opacity: 0.7; }
.empty-state h3 { font-size: var(--text-xl); font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.empty-state p { font-size: var(--text-sm); color: var(--text-3); max-width: 380px; margin: 0 auto 20px; line-height: 1.6; }

/* ── FAB ──────────────────────────────────────────────────── */
.fab {
  position: fixed; bottom: 28px; right: 28px;
  width: 56px; height: 56px;
  background: var(--brand-gradient); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-brand);
  cursor: pointer; z-index: 200;
  transition: transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base);
  border: none; text-decoration: none;
}
.fab:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(99,102,241,0.5); }
.fab svg { width: 24px; height: 24px; }

/* ── DRAWER (mobile) ──────────────────────────────────────── */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  z-index: 800; opacity: 0; visibility: hidden;
  transition: opacity var(--dur-base), visibility var(--dur-base);
}
.drawer-overlay.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; left: 0;
  width: min(82vw, 320px); height: 100%;
  background: var(--surface); z-index: 801;
  transform: translateX(-100%);
  transition: transform 0.3s var(--ease);
  overflow-y: auto; display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  padding: 20px; border-bottom: 1px solid var(--border);
  background: var(--brand-gradient); color: #fff;
}
.drawer-head-avatar { width: 56px; height: 56px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.5); overflow: hidden; margin-bottom: 10px; }
.drawer-head-avatar img { width: 100%; height: 100%; object-fit: cover; }
.drawer-head-name { font-size: var(--text-md); font-weight: 700; }
.drawer-head-email { font-size: var(--text-xs); opacity: 0.8; margin-top: 2px; }
.drawer-nav { padding: 10px; flex: 1; }
.drawer-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: var(--r-md);
  font-size: var(--text-sm); font-weight: 500;
  color: var(--text-2); text-decoration: none;
  transition: background var(--dur-fast), color var(--dur-fast);
  cursor: pointer; border: none; background: none; width: 100%; text-align: left;
}
.drawer-item:hover { background: var(--surface-2); color: var(--text-1); }
.drawer-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.drawer-item.danger { color: var(--red) !important; }
.drawer-item.danger:hover { background: rgba(239,68,68,0.08) !important; }
.drawer-sep { height: 1px; background: var(--border); margin: 8px 12px; }

/* ── SPINNER ──────────────────────────────────────────────── */
.spinner { width: 20px; height: 20px; border: 2.5px solid var(--border); border-top-color: var(--brand-1); border-radius: 50%; animation: spin 0.65s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 80px; }
.footer-inner { max-width: var(--content-w); margin: 0 auto; padding: 48px 24px 28px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand-name { font-size: var(--text-lg); font-weight: 800; color: var(--text-1); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; letter-spacing: -0.02em; }
.footer-brand-desc { font-size: var(--text-sm); color: var(--text-3); line-height: 1.6; max-width: 280px; }
.footer-col-title { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 14px; }
.footer-link { display: block; font-size: var(--text-sm); color: var(--text-2); margin-bottom: 9px; transition: color var(--dur-fast); text-decoration: none; }
.footer-link:hover { color: var(--brand-1); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 22px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-copy { font-size: var(--text-xs); color: var(--text-3); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .project-detail-wrap  { grid-template-columns: 1fr; }
  .project-detail-sidebar { position: static; }
  .upload-wrap { grid-template-columns: 1fr; }
  .upload-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .container-sm, .container-md { padding: 0 16px; }
  .nav-search-wrap { display: none; }
  .nav-link { display: none; }
  .nav-hamburger { display: flex; }
  .projects-grid { grid-template-columns: 1fr; gap: 14px; }
  .hero { padding: calc(var(--nav-h) + 40px) 0 48px; }
  .hero-stats { gap: 24px; margin-top: 36px; padding-top: 28px; }
  .profile-hero-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .profile-avatar { width: 80px; height: 80px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .fab { bottom: 20px; right: 16px; }
  .auth-card { padding: 28px 20px; }
  .toast-stack { bottom: 16px; right: 16px; left: 16px; }
  .toast { min-width: unset; width: 100%; }
}

@media (max-width: 480px) {
  .projects-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .project-action-row { flex-direction: column; }
}
