:root {
  --bg: #0f1117;
  --bg-elev: #181b24;
  --bg-card: #1e2230;
  --border: #2a2f3e;
  --text: #e6e8ee;
  --muted: #99a0b2;
  --accent: #ff4d4d;
  --dsa: #4f9dff;
  --system-design: #34d399;
  --behavioral: #f59e0b;
  --misc: #a78bfa;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.wrap { width: min(1180px, 92vw); margin: 0 auto; }

/* Header */
.site-header {
  background: radial-gradient(1200px 400px at 50% -120px, #2a1a2e 0%, var(--bg-elev) 60%);
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--border);
}
.brand { margin: 0; font-size: 2rem; letter-spacing: -0.5px; }
.tagline { margin: 6px 0 22px; color: var(--muted); }
.search-box input {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.15);
}
.header-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.donate-btn {
  display: inline-block;
  border: 2px solid #ffffff;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 14px 23px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(255, 77, 77, 0.35);
  transition: filter .15s, transform .05s, box-shadow .15s;
}
.donate-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 10px 22px rgba(255, 77, 77, 0.45);
}
.donate-btn:active {
  transform: translateY(1px);
}
.donate-icon {
  color: #ffffff;
  margin-right: 7px;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
}
.donate-btn--header {
  font-size: 1.35rem;
  padding: 16px 29px;
}
.donate-btn--floating {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  background: linear-gradient(135deg, #ff4d4d, #d92f6f);
  border-color: #ffd6d6;
  font-size: 1.18rem;
  padding: 17px 31px;
}

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 0 6px;
}
.tab {
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: .95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, border-color .15s, transform .05s;
}
.tab:hover { border-color: #3a4154; }
.tab:active { transform: translateY(1px); }
.tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab .count {
  font-size: .78rem;
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 8px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}
.tab.is-active .count { background: rgba(0, 0, 0, 0.25); }

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  padding: 8px 0 4px;
}
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-right: 2px;
}
.chip {
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .82rem;
  transition: background .15s, border-color .15s;
}
.chip:hover { border-color: #3a4154; }
.chip.is-active { background: #2d3344; border-color: #4b557a; }
.chip.diff-easy.is-active { background: #14532d; border-color: #1f7a45; }
.chip.diff-medium.is-active { background: #6b4e15; border-color: #a06f1d; }
.chip.diff-hard.is-active { background: #5f1d1d; border-color: #8a2b2b; }

/* Card pills (companies, topics, difficulty) */
.pills { display: flex; flex-wrap: wrap; gap: 5px; }
.pill {
  font-size: .68rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}
.pill.company { color: #cbd2e6; border-color: #39415a; }
.pill.topic { color: var(--dsa); border-color: #2c4a6b; }
.thumb .pill {
  position: absolute;
  top: 8px;
  left: 8px;
  font-weight: 700;
  color: #0b0d12;
  border: none;
}
.pill.diff-easy { background: #34d399; }
.pill.diff-medium { background: #f59e0b; }
.pill.diff-hard { background: #f87171; }

/* Status / grid */
.status { color: var(--muted); margin: 18px 0 6px; font-size: .9rem; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding: 10px 0 50px;
}
.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: #3a4154;
  box-shadow: var(--shadow);
}
.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #11131b;
  overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  color: #fff;
  opacity: 0;
  background: rgba(0, 0, 0, 0.35);
  transition: opacity .15s;
}
.card:hover .play { opacity: 1; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title {
  font-size: .98rem;
  font-weight: 600;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.badge {
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  color: #0b0d12;
}
.badge.dsa { background: var(--dsa); }
.badge.system-design { background: var(--system-design); }
.badge.behavioral { background: var(--behavioral); }
.badge.misc { background: var(--misc); }
.date { font-size: .76rem; color: var(--muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  color: var(--muted);
  font-size: .85rem;
}
.site-footer a { color: var(--dsa); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
}

/* LinkedIn + About header links */
.linkedin-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: #fff;
  background: #0a66c2;
  border: 1px solid #0a66c2;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  transition: filter .15s, transform .05s;
}
.linkedin-btn span[aria-hidden] {
  font-weight: 800;
  font-style: italic;
  background: #fff;
  color: #0a66c2;
  border-radius: 4px;
  padding: 0 4px;
  line-height: 1.25;
}
.linkedin-btn:hover { filter: brightness(1.08); }
.linkedin-btn:active { transform: translateY(1px); }
.about-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  transition: border-color .15s;
}
.about-link:hover { border-color: #3a4154; }

/* Top nav (About page) */
.top-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 20px;
}
.top-nav-brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.top-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.top-nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.top-nav-links a:hover { color: var(--text); }
.top-nav-links a.is-current { color: var(--accent); }
.top-nav-links a.linkedin-btn { color: #fff; }

/* About page */
.about-hero-title { margin: 6px 0 4px; }
.about-main { padding: 32px 0 70px; }
.about-intro {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
}
.about-photo {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--accent);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.about-intro-text { flex: 1; min-width: 260px; }
.about-intro-text h2 { margin-top: 0; }
.about-intro-text p { color: var(--text); }

.about-quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 36px 0;
}
.quote {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 1.02rem;
  font-style: italic;
  color: var(--text);
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin: 22px 0;
}
.about-card h2 { margin-top: 0; }
.about-card p { color: var(--text); margin-bottom: 0; }

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.support-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.support-tile:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.support-tile-icon {
  font-size: 1.3rem;
  color: var(--accent);
}
.support-tile-title { font-weight: 700; color: var(--text); }
.support-tile-sub { font-size: .82rem; color: var(--muted); }

.about-back { margin-top: 30px; }
.about-back a { color: var(--dsa); text-decoration: none; }
.about-back a:hover { text-decoration: underline; }

@media (max-width: 520px) {
  .brand { font-size: 1.6rem; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-title { font-size: .85rem; }
  .donate-btn--floating {
    right: 12px;
    bottom: 12px;
  }
  .about-intro { flex-direction: column; text-align: center; }
  .about-photo { width: 160px; height: 160px; }
}
