/* ============================================================
   TOKENS — paleta gris mate, elegante, sin saturación
   ============================================================ */
:root {
  --bg:           #0a0a0b;
  --bg-1:         #101012;
  --bg-2:         #151517;
  --bg-3:         #1c1c1f;
  --line:         #232326;
  --line-2:       #2c2c30;
  --fg:           #f4f4f5;
  --fg-1:         #d4d4d6;
  --fg-2:         #a1a1a4;
  --fg-3:         #6b6b6e;
  --fg-4:         #46464a;
  --accent:       #f4f4f5;

  --glass-bg:     rgba(20, 20, 22, 0.55);
  --glass-bg-2:   rgba(30, 30, 33, 0.65);
  --glass-line:   rgba(255, 255, 255, 0.08);
  --glass-line-2: rgba(255, 255, 255, 0.14);

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow:    0 12px 40px -12px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.3);
  --shadow-lg: 0 32px 80px -24px rgba(0,0,0,.7), 0 8px 20px rgba(0,0,0,.4);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-display: 'Inter', sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   RESET
   ============================================================ */
html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }
input, textarea, select { font: inherit; color: inherit; }

/* Hide scrollbars globally for a cleaner look */
::-webkit-scrollbar { display: none; }
* { -ms-overflow-style: none; scrollbar-width: none; }

/* subtle film grain on body for matte feeling */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(255,255,255,.03), transparent 70%),
    radial-gradient(900px 500px at -10% 110%, rgba(255,255,255,.025), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-top: 96px;       /* nav clearance */
  padding-bottom: 160px;   /* footer clearance */
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================================
   FULL-SCREEN HOME SECTIONS
   ============================================================ */
.home { position: relative; z-index: 1; }
.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: 120px 0 80px;
  position: relative;
}
.screen--hero { padding-top: 140px; }
.screen__inner {
  width: 100%;
}
.screen__head {
  margin-bottom: 56px;
}
.screen__head--center {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 56px;
  padding: 0 32px;
}
.screen__head--center .section__title {
  text-wrap: balance;
  text-align: center;
}
.screen__head--center .section__label {
  margin-bottom: 14px;
  text-align: center;
}

/* full bleed carousel container */
.stack-bleed {
  width: 100%;
  padding: 0 0;
  /* reserve height so the section doesn't jump when tags load */
  min-height: clamp(520px, 70vh, 760px);
}

/* fallback placeholder while tags.json loads — matches .carousel size */
.carousel-fullbleed {
  width: 100%;
  height: clamp(520px, 70vh, 760px);
  background:
    radial-gradient(1400px 400px at 50% 50%, rgba(255,255,255,.05), transparent 70%),
    var(--bg-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* PAGE FADE-IN — kept for first-load entrance */
.screen {
  opacity: 0;
  transform: translateY(20px);
  animation: screenIn .7s var(--ease) forwards;
}
@keyframes screenIn {
  to { opacity: 1; transform: translateY(0); }
}
.screen:nth-child(1) { animation-delay: .05s; }
.screen:nth-child(2) { animation-delay: .15s; }
.screen:nth-child(3) { animation-delay: .25s; }

/* SPA page transition — only content fades, nav + footer stay
   NOTE: no default transform here — it would break position:fixed
   children (e.g. the project modal).                            */
.page-content {
  opacity: 1;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.page-content.is-leaving {
  opacity: 0;
  transform: translateY(-6px);
}

/* ============================================================
   NAV (glass, floating, sticky)
   ============================================================ */
.nav {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.08) inset,
    0 -1px 0 rgba(255,255,255,.03) inset,
    0 0 0 1px rgba(0,0,0,.4),
    0 20px 40px -12px rgba(0,0,0,.5);
  transition: top .3s var(--ease), padding .3s var(--ease);
  overflow: hidden;
  isolation: isolate;
}
.nav.is-condensed { top: 32px; }

.nav__brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  border-radius: 999px;
}
.nav__brand-logo {
  height: 52px;
  width: auto;
  flex: 0 0 auto;
  object-fit: contain;
}

.nav__links {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px 0 0;
}
.nav__link {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-2);
  border-radius: 999px;
  transition: color .25s var(--ease);
}
.nav__link:hover { color: var(--fg); }
.nav__link.is-active { color: var(--fg); }

/* sliding liquid-glass pill behind the active link */
.nav__pill {
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(255,255,255,0.18) 0%,
      rgba(255,255,255,0.08) 50%,
      rgba(255,255,255,0.04) 100%);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    inset 0 0 0 1px rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(255,255,255,0.06),
    0 2px 8px rgba(0,0,0,0.18);
  opacity: 0;
  transform: translate3d(0, 0, 0);
  transition:
    transform .4s cubic-bezier(0.34, 1.4, 0.64, 1),
    width     .4s cubic-bezier(0.34, 1.4, 0.64, 1),
    height    .4s cubic-bezier(0.34, 1.4, 0.64, 1),
    opacity   .25s ease;
  will-change: transform, width, height, opacity;
  overflow: hidden;
}
.nav__pill::before {
  content: '';
  position: absolute;
  left: 8%; right: 8%;
  top: 1px;
  height: 40%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  filter: blur(.5px);
}
.nav__pill.is-visible { opacity: 1; }

/* liquid water droplet that follows cursor */
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--bg);
  background: var(--fg);
  border-radius: 999px;
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.nav__cta:hover { background: #fff; transform: translateY(-1px); }

/* ============================================================
   FOOTER (shared, fixed-feel but in flow)
   ============================================================ */
.footer {
  position: relative;
  z-index: 1;
  margin-top: 120px;
  padding: 64px 32px 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.015));
}
.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer__brand-logo {
  height: 96px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: 12px;
}
.footer__name {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.footer__tagline {
  color: var(--fg-2);
  font-size: 14px;
  max-width: 32ch;
  margin: 0;
}
.footer__col h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  margin: 0 0 16px;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li { margin-bottom: 10px; }
.footer__col a {
  color: var(--fg-1);
  font-size: 14px;
  transition: color .15s var(--ease);
}
.footer__col a:hover { color: var(--fg); }
.footer__bottom {
  max-width: 1200px;
  margin: 56px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--fg-3);
  font-family: var(--font-mono);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 0;
  text-align: left;
  max-width: 980px;
  margin: 0 auto;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--fg-2);
  font-family: var(--font-mono);
  margin-bottom: 28px;
}
.hero__eyebrow::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: #88e788;
  box-shadow: 0 0 0 3px rgba(136,231,136,.15);
}
.hero__title {
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 600;
  margin: 0 0 24px;
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  color: var(--fg-3);
}
.hero__lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-1);
  max-width: 60ch;
  margin: 0 0 36px;
  text-wrap: pretty;
}
.hero__actions {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
  border: 1px solid transparent;
}
.btn--primary { background: var(--fg); color: var(--bg); }
.btn--primary:hover { background: #fff; transform: translateY(-1px); }
.btn--ghost   { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--bg-2); border-color: var(--fg-3); }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section { padding: 80px 0; position: relative; }
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}
.section__label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-3);
  margin: 0 0 12px;
}
.section__title {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
.section__hint {
  color: var(--fg-2);
  font-size: 14px;
  max-width: 36ch;
  margin: 0;
  text-align: right;
}

/* ============================================================
   TAG CAROUSEL — full bleed
   ============================================================ */
.carousel {
  position: relative;
  width: 100%;
  height: clamp(520px, 70vh, 760px);
  min-height: clamp(520px, 70vh, 760px); /* prevent flex shrink */
  background:
    radial-gradient(1400px 400px at 50% 50%, rgba(255,255,255,.05), transparent 70%),
    var(--bg-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  /* force GPU layer — prevents background paint glitch during screen fade-in */
  backface-visibility: hidden;
  will-change: contents;
}
.carousel::before, .carousel::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 180px;
  z-index: 3; pointer-events: none;
}
.carousel::before { left: 0;  background: linear-gradient(90deg, var(--bg), transparent); }
.carousel::after  { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.carousel__track {
  position: absolute; inset: 0;
}
.tag-pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--glass-bg-2);
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  will-change: transform;
}
.tag-pill__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--fg-2);
}
.tag-pill__kind {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================
   AUTHOR CARDS (3D hover)
   ============================================================ */
.authors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  perspective: 1400px;
}
.author-card {
  position: relative;
  display: block;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
  transform-style: preserve-3d;
  will-change: transform;
  overflow: hidden;
  cursor: pointer;
}
.author-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(400px 200px at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.06), transparent 60%);
  opacity: 0; transition: opacity .3s var(--ease);
  pointer-events: none;
}
.author-card:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow-lg);
}
.author-card:hover::before { opacity: 1; }

.author-card__inner {
  position: relative;
  transform-style: preserve-3d;
}
.author-card__row {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
  transform: translateZ(20px);
}
.author-card__avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  flex: 0 0 auto;
  object-fit: cover;
}
.author-card__name {
  font-size: 17px; font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 2px;
}
.author-card__user {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
  margin: 0;
}
.author-card__bio {
  font-size: 14px;
  color: var(--fg-1);
  line-height: 1.55;
  margin: 0 0 28px;
  text-wrap: pretty;
  transform: translateZ(15px);
  min-height: 3.1em;
}
.author-card__socials {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  transform: translateZ(18px);
}
.author-card__social-icon {
  color: var(--fg-3);
  transition: color .2s var(--ease), transform .2s var(--ease);
}
.author-card__social-icon:hover {
  color: var(--fg);
  transform: translateY(-2px);
}
.author-card__avatar-link {
  display: block;
  transition: transform .2s var(--ease);
}
.author-card__avatar-link:hover {
  transform: scale(1.05);
}
.author-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--fg-2);
  font-family: var(--font-mono);
  transform: translateZ(20px);
  transition: color .2s var(--ease), gap .2s var(--ease);
}
.author-card:hover .author-card__cta {
  color: var(--fg);
  gap: 10px;
}
.author-card__shine {
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,.04) 50%, transparent 60%);
  opacity: 0; transition: opacity .3s var(--ease);
  pointer-events: none;
}
.author-card:hover .author-card__shine { opacity: 1; }

/* ============================================================
   REPO PAGE — search + filters
   ============================================================ */
.search-wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.search-input,
.select-input {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.search-input:focus-within,
.select-input:focus-within { border-color: var(--fg-3); background: var(--bg-3); }
.search-input input,
.select-input select {
  flex: 1; background: none; border: 0; outline: 0;
  font-size: 14px; color: var(--fg);
}
.search-input input::placeholder { color: var(--fg-3); }
.search-icon { color: var(--fg-3); flex: 0 0 auto; }

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}
.filter-group {
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filter-group__head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  margin-bottom: 12px;
}
.filter-group__count {
  font-size: 11px;
  color: var(--fg-2);
}
.chip-list {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--fg-1);
  cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.chip:hover { background: #26262a; border-color: var(--fg-4); }
.chip.is-on {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.chip--small { font-size: 11px; padding: 4px 9px; }

/* result list */
.results-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--fg-3);
  margin-bottom: 16px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.project-grid.is-fading {
  opacity: 0;
  transform: translateY(6px);
}

/* staggered card entrance */
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.project-card {
  animation: cardIn .4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
  text-align: left;
  width: 100%;
}
.project-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent 20%, rgba(255,255,255,0.03) 40%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 60%, transparent 80%);
  background-size: 250% 250%;
  background-position: 100% 100%;
  opacity: 0;
  transition: opacity 0.3s var(--ease), background-position 0.6s ease;
  pointer-events: none;
  z-index: 5;
}
.project-card:hover {
  border-color: var(--line-2);
  background: var(--bg-3);
  transform: translateY(-4px);
}
.project-card:hover::before {
  opacity: 1;
  background-position: 0% 0%;
}
.project-card__cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 12px, transparent 12px 24px),
    var(--bg-3);
  border: 1px solid var(--line-2);
  position: relative;
  overflow: hidden;
  display: grid; place-items: center;
}
.project-card__cover-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-3);
  text-align: center;
  padding: 0 12px;
  line-height: 1.5;
}
.project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 12px;
}
.project-card__live-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  color: var(--fg-3);
  transition: all .2s var(--ease);
}
.project-card__live-link:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
  transform: scale(1.1);
}
.project-card__body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.project-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.project-card__title {
  font-size: 17px; font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.project-card__cat {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
}
.project-card__authors {
  display: flex; align-items: center; gap: -6px;
}
.project-card__authors .av {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid var(--bg-2);
  margin-left: -6px;
  object-fit: cover;
}
.project-card__authors .av:first-child { margin-left: 0; }
.project-card:hover .av { border-color: var(--bg-3); }
.project-card__tags {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-top: 4px;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: grid; place-items: center;
  padding: 32px;
  animation: fade .25s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
.modal {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  animation: rise .35s var(--ease);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(24px) scale(.98); }
}
.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--fg-2);
  z-index: 2;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.modal__close:hover { background: var(--bg-3); color: var(--fg); }

.modal__cover {
  height: 220px;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 12px, transparent 12px 24px),
    var(--bg-2);
  border-bottom: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.modal__body { padding: 32px 36px 36px; }
.modal__cat {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-3);
  margin-bottom: 8px;
}
.modal__title {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
}
.modal__links {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.modal__desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-1);
  margin: 0 0 28px;
  text-wrap: pretty;
}
.modal__section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.modal__section h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  margin: 0 0 12px;
  font-weight: 500;
}
.modal__authors {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.modal-author-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.modal-author-btn:hover { background: var(--bg-3); border-color: var(--fg-4); }
.modal-author-btn img {
  width: 24px; height: 24px; border-radius: 50%;
  object-fit: cover;
}
.modal-author-btn span { font-size: 13px; }

/* ============================================================
   AUTHOR PAGE
   ============================================================ */
/* author hero entrance */
@keyframes authorHeroIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes authorAvatarIn {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes authorBlockIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.author-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  padding: 40px 0 60px;
  align-items: center;
  animation: authorHeroIn .6s var(--ease) both;
}
.author-hero__avatar {
  width: 220px; height: 220px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  object-fit: cover;
  box-shadow: var(--shadow);
  animation: authorAvatarIn .7s var(--ease) .1s both;
}
.author-hero__name {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 14px;
}
.author-hero__user {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--fg-3);
  margin: 0 0 20px;
}
.author-hero__bio {
  font-size: 17px;
  color: var(--fg-1);
  margin: 0;
  max-width: 50ch;
  text-wrap: pretty;
}

.author-block {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  animation: authorBlockIn .5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 120ms + 200ms);
}
.author-block__label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-3);
  margin: 0 0 16px;
}

.socials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.social-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: background .15s var(--ease), border-color .15s var(--ease);
  animation: authorBlockIn .4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms + 400ms);
}
.social-row:hover { background: var(--bg-3); border-color: var(--fg-4); }
.social-row__icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--fg-1);
  flex: 0 0 auto;
}
.social-row__type {
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  margin: 0 0 2px;
}
.social-row__label {
  font-size: 14px;
  color: var(--fg);
  margin: 0;
}

.description-block {
  padding: 28px 32px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg-1);
  text-wrap: pretty;
}

/* switch */
.switch {
  display: inline-flex;
  padding: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.switch button {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-2);
  border-radius: 999px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.switch button.is-on {
  color: var(--bg);
  background: var(--fg);
}

.cred-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}
.cred-card {
  padding: 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), background .2s var(--ease);
  animation: authorBlockIn .4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 80ms + 300ms);
}
.cred-card:hover { border-color: var(--line-2); background: var(--bg-3); }
.cred-card__img {
  height: 110px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 8px, transparent 8px 16px),
    var(--bg-3);
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}
.cred-card__name {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}
.cred-card__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  margin: 0;
}

/* ============================================================
   EMPTY / LOADING
   ============================================================ */
.empty {
  padding: 80px 32px;
  text-align: center;
  color: var(--fg-3);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
}

/* ============================================================
   DROPDOWN (CUSTOM)
   ============================================================ */
.dropdown {
  position: relative;
  z-index: 10;
}
.dropdown.is-open {
  z-index: 20;
}
.dropdown__trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), background .2s var(--ease);
  text-align: left;
  height: 100%;
}
.dropdown__trigger:hover,
.dropdown.is-open .dropdown__trigger {
  border-color: var(--fg-3); background: var(--bg-3);
}
.dropdown__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.dropdown__value {
  flex: 1;
  font-size: 14px;
  color: var(--fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: right;
}
.dropdown__caret {
  color: var(--fg-3);
  display: flex; align-items: center;
  transition: transform .2s var(--ease);
}
.dropdown.is-open .dropdown__caret {
  transform: rotate(180deg);
}

.dropdown__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  min-width: 240px;
  background: var(--glass-bg-2);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: 360px;
  z-index: 100;
  animation: dropIn .2s var(--ease);
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown__search {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--glass-line);
  background: rgba(0,0,0,0.2);
}
.dropdown__search .search-icon { color: var(--fg-3); }
.dropdown__search input {
  flex: 1; background: none; border: 0; outline: 0;
  font-size: 13px; color: var(--fg);
}
.dropdown__search input::placeholder { color: var(--fg-3); }

.dropdown__list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.dropdown__list::-webkit-scrollbar { width: 6px; }
.dropdown__list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
.dropdown__list::-webkit-scrollbar-track { background: transparent; }

.dropdown__empty {
  padding: 20px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--fg-3);
}
.dropdown__option {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-align: left;
  transition: background .15s var(--ease);
  cursor: pointer;
}
.dropdown__option:hover,
.dropdown__option:focus {
  background: rgba(255,255,255,0.06);
  outline: none;
}
.dropdown__option.is-selected {
  background: rgba(255,255,255,0.04);
}
.dropdown__option-name {
  font-size: 14px; color: var(--fg);
  flex: 1;
}
.dropdown__option-sub {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--fg-3);
  margin: 0 12px;
}
.dropdown__option-mark {
  color: var(--fg);
  display: flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  flex: 0 0 auto;
}
.dropdown__option-mark.is-multi {
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: rgba(0,0,0,0.2);
  transition: all .15s var(--ease);
}
.dropdown__option.is-selected .dropdown__option-mark.is-multi {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}
.dropdown__option.is-selected .dropdown__option-mark:not(.is-multi) {
  color: #88e788;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 880px) {
  .authors-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .filter-row   { grid-template-columns: 1fr; }
  .search-wrap  { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .author-hero { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .author-hero__avatar { width: 160px; height: 160px; margin: 0 auto; }
  .socials { grid-template-columns: 1fr; }
  .cred-grid { grid-template-columns: 1fr; }
  .nav__links { display: none; }
}

/* ============================================================
   FLASHLIGHT GLOW BACKGROUND
   ============================================================ */
.flashlight-glow {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    250px circle at var(--x, 50%) var(--y, 50%),
    rgba(255, 255, 255, 0.05) 0%,
    transparent 100%
  );
  mix-blend-mode: screen;
  will-change: background;
}
