

:root {
	--spot-x: 100px;
	--inner-pad: 20px;
	--maxw: 1000px;

	/* rock-solid card sizing */
	--cardw: 300px;   /* adjust: 280 / 300 / 320 etc */
	--gap: 20px;

  --card-scale: 1;
}

body {
	margin: 0;
	background: #f8f8f8;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	line-height: 1.35;
	color: #111;
}

.top-bar-inner {
  height: 100%;                   /* important – grows/shrinks with parent */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
  max-width: 1000px;
  margin: 0 auto;
}

.site-title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  transition: font-size 180ms ease, opacity 180ms ease;
}

.top-bar {
  --container-w: min(var(--maxw), calc(100vw - (2 * var(--inner-pad))));
  --container-left: calc(50% - (var(--container-w) / 2));
  --spot-page-x: calc(var(--container-left) + var(--inner-pad) + var(--spot-x));

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;                      /* normal height */
  z-index: 1000;

  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: radial-gradient(240px 62px at var(--spot-page-x) 50%, rgba(255,255,255,0.26), rgba(255,255,255,0.00) 58%),
              radial-gradient(420px 110px at var(--spot-page-x) 50%, rgba(255,255,255,0.07), rgba(255,255,255,0.00) 75%),
              #141a22;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);

  transition: height 160ms ease;     /* ← smooth height change */
}

.page-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 90px 20px 20px;           /* ← bigger than tallest bar + shadow */
  box-sizing: border-box;
  transition: padding-top 180ms ease;
}

.index-grid{
	display: grid;
	gap: var(--gap);
	justify-content: center; /* centers the grid when fixed widths don't fill row */
	grid-template-columns: repeat(3, var(--cardw)); /* desktop: 3 */
}

.index-cell{
	padding: 0;
	border: none;
	background: transparent;
}

.case-card{
	background: #fff;
	border-radius: 18px;
	overflow: hidden;
	border: 1px solid rgba(0,0,0,0.08);
	box-shadow: 0 6px 18px rgba(0,0,0,0.10);
	transition: transform 120ms ease, box-shadow 120ms ease;
	height: 100%;
	display: flex;
	flex-direction: column;

  transform: scale(var(--card-scale));
  transform-origin: top center;
}

.case-card:hover{
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(0,0,0,0.14);
}

.case-card a{
	color: inherit;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.case-card-media{
	height: 170px;
	background: #e9e9e9;
}

.case-card-media img{
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.case-card-image-fallback{
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 14px;
	background:
		radial-gradient(280px 130px at 30% 40%, rgba(255,255,255,0.75), rgba(255,255,255,0) 55%),
		linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.case-card-image-fallback .tag{
	display: inline-block;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(255,255,255,0.75);
	border: 1px solid rgba(0,0,0,0.08);
	font-weight: 850;
	font-size: 11px;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: #0f172a;
}

.case-card-image-fallback .title{
	margin-top: 8px;
	font-size: 16px;
	font-weight: 900;
	color: #0f172a;
}

.case-card-image-fallback .sub{
	margin-top: 4px;
	font-size: 11px;
	color: #475569;
}

.case-card-body{
	padding: 16px 18px 14px;
	text-align: center;
	flex: 1;
}

.case-card-title{
	font-size: 22px;
	line-height: 1.15;
	font-weight: 800;
	margin: 4px 0 10px;
	min-height: calc(1.15em * 3);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.case-card-sub{
	font-size: 14px;
	line-height: 1.35;
	margin: 6px 0;

	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.case-card-sub b{
	font-weight: 800;
}

.muted{
	color: rgba(0,0,0,0.7);
}

.case-deadline {
	font-weight: 700;
}

.case-payout{
	font-weight: 700;
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	overflow-wrap: anywhere;
}

.case-card-cta{
	background: #334155;
	color: #fff;
	text-align: center;
	padding: 16px 14px;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.4px;
	line-height: 1.2;
}

.case-card:hover .case-card-cta{
	background: #1e293b;
}

@media (max-width: 980px){
	.index-grid{
		grid-template-columns: repeat(2, var(--cardw));
	}
}

@media (max-width: 660px){
  .index-grid{
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .index-cell{
    display: flex;
    justify-content: center;
  }

  .case-card{
	width: min(88vw, 380px);
  }

  .page-wrap{
    padding: 90px 14px 20px;
  }

  .case-card-sub{ font-size: 18px; }

  .case-card-body{
    padding: 14px 16px 12px;
  }

  .case-card-cta{
    padding: 14px 12px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .case-card:hover{
    transform: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.10);
  }

  .case-card:hover .case-card-cta{
    background: #334155;
  }
}

@media (orientation: landscape) and (max-height: 450px) {

  .top-bar {
    position: static;
    height: 70px;
  }

  .page-wrap {
    padding-top: 20px;
  }

  .index-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .case-card {
    transform: none;
  }

  .case-card-title {
    font-size: 14px;
    line-height: 1.15;
    min-height: calc(1.15em * 3);
  }

  .case-card-media {
    height: 85px;
  }

  .case-card-image-fallback {
    padding: 8px;
  }

  .case-card-image-fallback .tag {
    padding: 3px 7px;
    font-size: 9px;
  }

  .case-card-image-fallback .title {
    margin-top: 4px;
    font-size: 12px;
  }

  .case-card-image-fallback .sub {
    display: none;
  }

  .case-label {
    display: none;
  }

  .case-meta,
  .case-meta * {
    font-weight: 400;
  }
}

/* NAV LINKS (desktop) */
.nav-links {
  display: flex;
  gap: 22px;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  opacity: 0.9;
}

.nav-links a:hover {
  opacity: 1;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.nav-links a:focus-visible {
  opacity: 1;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* HAMBURGER */
.hamburger {
  display: none;
  font-size: 26px;
  color: #fff;
  cursor: pointer;

  width: 44px;
  height: 44px;
  margin-right: -15px;

  align-items: center;
  justify-content: center;
  line-height: 1;
  user-select: none;
}

/* MOBILE MENU */
.mobile-menu {
  display: none;
  background: #141a22;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.mobile-menu a {
  display: block;
  padding: 14px 20px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* RESPONSIVE SWITCH */
@media (max-width: 700px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

.mobile-menu {
  position: absolute;
  top: 70px;  /* no gap */
  width: 100%;
  left: 0;

  background: #141a22;
  border-top: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

.last-updated {
  font-size: 0.85rem;
  color: rgba(0,0,0,0.7);
  text-align: center;
  padding: 22px 0 0;
}

.last-updated span {
  font-weight: 600;
  color: #111;
}

