:root{
  /* Light, approachable base */
  --bg0:#f7fafc;
  --bg1:#eef2ff;
  --card:#ffffff;
  --card2:#ffffff;
  --border: rgba(15, 23, 42, .12);
  --text: rgba(15, 23, 42, .92);
  --muted: rgba(51, 65, 85, .82);

  /* Transit accents inspired by the uploaded sites (kept vivid, used sparingly) */
  --muni-red:#E31937;
  --muni-orange:#F05A28;
  --muni-blue:#0075BF;
  --muni-purple:#8B5BA8;
  --ac-green:#00843D;
  --ac-blue:#0066A1;

  --radius: 22px;
  --shadow: 0 14px 44px rgba(2, 6, 23, .10);
  --shadow2: 0 22px 70px rgba(2, 6, 23, .14);

  --max: 1120px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 20% 12%, rgba(139, 91, 168, .12), transparent 55%),
    radial-gradient(900px 600px at 86% 18%, rgba(0, 117, 191, .10), transparent 56%),
    radial-gradient(900px 600px at 60% 96%, rgba(0, 132, 61, .10), transparent 58%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x:hidden;
}

/* Subtle “route grid” texture (hand-made, not noisy) */
body:before{
  content:"";
  position:fixed;
  inset:-2px;
  pointer-events:none;
  background:
    radial-gradient(circle at 1px 1px, rgba(15, 23, 42, .07) 1px, transparent 1.2px) 0 0/22px 22px,
    repeating-linear-gradient(90deg, transparent 0 110px, rgba(15,23,42,.035) 110px 111px),
    repeating-linear-gradient(0deg, transparent 0 110px, rgba(15,23,42,.03) 110px 111px);
  mask-image: radial-gradient(900px 600px at 50% 18%, rgba(0,0,0,.75), transparent 70%);
  opacity:.45;
}

a{color:inherit}
.container{max-width:var(--max); margin:0 auto; padding: 0 20px}

.skip{
  position:absolute; left:-999px; top:10px;
  background:#fff; color:#000; padding:10px 12px; border-radius:12px;
  border:1px solid var(--border);
}
.skip:focus{left:12px; z-index:50}

.topbar{
  position:sticky; top:0; z-index:40;
  backdrop-filter: blur(10px);
  background: rgba(247, 250, 252, .78);
  border-bottom: 1px solid rgba(15,23,42,.10);
}
.topbar-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 0;
}
.brand{
  display:flex; align-items:center; gap:12px;
  text-decoration:none;
}
.logo{
  width:44px; height:44px; border-radius:16px;
  background:
    radial-gradient(16px 16px at 30% 30%, rgba(255,255,255,.85), transparent 60%),
    linear-gradient(135deg, rgba(227,25,55,.92), rgba(240,90,40,.88), rgba(0,117,191,.88));
  box-shadow: 0 10px 26px rgba(2,6,23,.10);
  position:relative;
  overflow:hidden;
}
.logo:after{
  content:"";
  position:absolute; inset:-40% -20%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  opacity:.55;
}
.brand h1{
  margin:0;
  font-size: 16px;
  letter-spacing: .2px;
}
.brand span{
  display:block;
  margin-top:2px;
  font-size: 12.5px;
  color: var(--muted);
}

.nav{
  display:flex; align-items:center; gap:10px;
}
.nav a{
  text-decoration:none;
  font-weight:600;
  font-size: 13px;
  color: rgba(15,23,42,.82);
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.nav a:hover{
  background: rgba(255,255,255,.75);
  border-color: rgba(15,23,42,.10);
  transform: translateY(-1px);
}
.nav a[aria-current="page"]{
  background: rgba(0,117,191,.10);
  border-color: rgba(0,117,191,.18);
}

.cta{
  display:inline-flex; align-items:center; gap:10px;
  text-decoration:none;
  font-weight:700;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 10px 30px rgba(2,6,23,.08);
}
.cta .dot{
  width:10px; height:10px; border-radius:999px;
  background: linear-gradient(135deg, var(--muni-red), var(--muni-orange));
  box-shadow: 0 0 0 6px rgba(227,25,55,.10);
}

.hero{
  padding: 44px 0 18px;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 18px;
  align-items:stretch;
}
.hero-card{
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position:relative;
  overflow:hidden;
}
.hero-card:before{
  content:"";
  position:absolute; inset:-60px -40px auto auto;
  width:220px; height:220px; border-radius:999px;
  background: radial-gradient(circle at 30% 30%, rgba(0,117,191,.18), transparent 60%);
  filter: blur(1px);
}
.hero-main{
  padding: 26px 26px 22px;
}
.kicker{
  display:flex; align-items:center; gap:10px;
  font-weight:700;
  color: rgba(15,23,42,.78);
  font-size: 13px;
  letter-spacing: .2px;
}
.kicker .chip{
  width:12px; height:12px; border-radius: 6px;
  background: linear-gradient(135deg, var(--ac-green), var(--muni-blue));
}
.hero h2{
  margin: 12px 0 10px;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.06;
  letter-spacing: -0.6px;
}
.hero p{
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 62ch;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin: 14px 0 14px;
}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  text-decoration:none;
  font-weight:700;
  font-size: 13px;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 26px rgba(2,6,23,.08);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover{transform: translateY(-1px); box-shadow: 0 14px 34px rgba(2,6,23,.10)}
.btn.primary{
  border-color: rgba(0,117,191,.20);
  background: linear-gradient(135deg, rgba(0,117,191,.18), rgba(139,91,168,.12));
}

.pills{
  display:flex; flex-wrap:wrap; gap:10px;
  margin-top: 6px;
}
.pill{
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(15,23,42,.10);
  color: rgba(15,23,42,.84);
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 12.5px;
}
.pill strong{font-weight:800}

.hero-media{
  display:flex;
  flex-direction:column;
}
.media-top{
  height: 168px;
  background:
    radial-gradient(120px 100px at 15% 35%, rgba(227,25,55,.18), transparent 60%),
    radial-gradient(140px 120px at 78% 20%, rgba(0,117,191,.18), transparent 60%),
    linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.76));
  border-bottom: 1px solid rgba(15,23,42,.10);
  position:relative;
}
.media-top:after{
  /* a simple “route ribbon” */
  content:"";
  position:absolute; left:-20px; top:56px;
  width: 120%;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(227,25,55,.65), rgba(240,90,40,.55), rgba(0,117,191,.55), rgba(0,132,61,.55));
  filter: blur(.2px);
  transform: rotate(-6deg);
  opacity:.85;
}
.media-bottom{
  padding: 16px 16px 18px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.stat{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px 12px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.92);
}
.label{
  font-size: 12px;
  color: var(--muted);
  margin-bottom:3px;
}
.value{
  font-weight:800;
  letter-spacing:-.2px;
}
.badge{
  display:inline-flex; align-items:center; gap:8px;
  font-weight:800;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(15,23,42,.04);
  color: rgba(15,23,42,.86);
}
.swatch{
  width:10px; height:10px;
  border-radius:999px;
}

.section{
  padding: 18px 0 46px;
}
.section h3{
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.2px;
}
.section p{
  margin:0 0 14px;
  color: var(--muted);
}

.cards{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.card{
  background: rgba(255,255,255,.90);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
  position:relative;
}
.card a{
  display:block;
  padding: 16px 16px 14px;
  text-decoration:none;
  height:100%;
}
.card:before{
  content:"";
  position:absolute;
  inset: 0;
  background:
    radial-gradient(220px 120px at 10% 0%, rgba(0,117,191,.10), transparent 60%),
    radial-gradient(220px 140px at 100% 0%, rgba(227,25,55,.09), transparent 62%);
  opacity:.85;
  pointer-events:none;
}
.card-top{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
  margin-bottom: 10px;
  position:relative;
  z-index:1;
}
.arrow{
  width:36px; height:36px;
  border-radius: 14px;
  background: rgba(15,23,42,.86);
  display:grid; place-items:center;
  box-shadow: 0 10px 18px rgba(2,6,23,.10);
}
.card h4{
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: -0.3px;
  position:relative;
  z-index:1;
}
.card p{
  margin: 0 0 12px;
  line-height: 1.6;
  font-size: 13.5px;
  color: rgba(51,65,85,.90);
  position:relative;
  z-index:1;
}
.meta{
  display:flex; justify-content:space-between; gap:10px;
  font-size: 12px;
  color: rgba(51,65,85,.85);
  border-top: 1px dashed rgba(15,23,42,.14);
  padding-top: 10px;
  position:relative;
  z-index:1;
}

.footer{
  padding: 22px 0 34px;
  border-top: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.60);
}
.footer-inner{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.footer small{
  color: rgba(51,65,85,.80);
}
.footer a{
  color: rgba(0,102,161,.95);
  text-decoration:none;
  font-weight:700;
}
.footer a:hover{text-decoration:underline}

/* Responsive */
@media (max-width: 980px){
  .hero-grid{grid-template-columns: 1fr; }
  .cards{grid-template-columns: 1fr; }
  .nav{display:none}
  .cta{display:none}
  .topbar-inner{gap:10px}
}
@media (max-width: 520px){
  .hero{padding-top: 34px}
  .hero-main{padding: 22px 18px 18px}
  .logo{width:42px; height:42px}
}

/* --- v3 visual refresh: real SF + Oakland transit photography + more color --- */

.logo-img{width:144px;height:auto;}

/* Give the topbar a touch more personality */
.topbar{
  background: rgba(248, 250, 252, .74);
  border-bottom: 1px solid rgba(15,23,42,.10);
}
.topbar:after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:-1px;
  height: 2px;
  background: linear-gradient(90deg,
    rgba(227,25,55,.85),
    rgba(240,90,40,.75),
    rgba(0,117,191,.75),
    rgba(0,132,61,.75)
  );
  opacity:.55;
}

/* Big cinematic background: SF on the left, Oakland on the right */
.hero{
  position:relative;
  padding: 56px 0 22px;
}
.hero:before,
.hero:after{
  content:"";
  position:absolute;
  top:-32px;
  height: 520px;
  width: 58vw;
  min-width: 520px;
  border-radius: 40px;
  filter: saturate(1.08) contrast(1.02);
  opacity: .22;
  z-index:0;
}
.hero:before{
  left: max(-10vw, -220px);
  background:
    linear-gradient(180deg, rgba(248,250,252,.92), rgba(248,250,252,.32)),
    url('./sf_tram.jpg');
  background-size: cover;
  background-position: 45% 40%;
  box-shadow: 0 50px 140px rgba(2,6,23,.18);
  transform: rotate(-2deg);
  animation: driftA 24s ease-in-out infinite alternate;
}
.hero:after{
  right: max(-10vw, -220px);
  background:
    linear-gradient(180deg, rgba(248,250,252,.92), rgba(248,250,252,.34)),
    url('./oak_train.jpg');
  background-size: cover;
  background-position: 55% 35%;
  box-shadow: 0 50px 140px rgba(2,6,23,.18);
  transform: rotate(2deg);
  animation: driftB 26s ease-in-out infinite alternate;
}

@keyframes driftA{
  from{ transform: translateY(0) rotate(-2deg); background-position: 45% 40%; }
  to{ transform: translateY(10px) rotate(-1deg); background-position: 48% 45%; }
}
@keyframes driftB{
  from{ transform: translateY(0) rotate(2deg); background-position: 55% 35%; }
  to{ transform: translateY(12px) rotate(1deg); background-position: 52% 42%; }
}

.hero-grid{ position:relative; z-index:1; }

/* Make hero cards feel less templated */
.hero-card{
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(15,23,42,.10);
}
.hero-card:after{
  content:"";
  position:absolute;
  inset:auto -20px -26px -20px;
  height: 60px;
  background:
    radial-gradient(40px 20px at 12% 40%, rgba(227,25,55,.18), transparent 70%),
    radial-gradient(42px 22px at 40% 45%, rgba(240,90,40,.16), transparent 70%),
    radial-gradient(46px 22px at 68% 50%, rgba(0,117,191,.14), transparent 70%),
    radial-gradient(46px 22px at 88% 45%, rgba(0,132,61,.14), transparent 70%);
  opacity:.9;
  pointer-events:none;
}

/* Swap the right-side hero header to real SF streetcar photo */
.media-top{
  background:
    linear-gradient(180deg, rgba(248,250,252,.86), rgba(248,250,252,.22)),
    url('./sf_tram.jpg');
  background-size: cover;
  background-position: 52% 42%;
}
.media-top:before{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(340px 160px at 50% 0%, rgba(255,255,255,.65), transparent 70%);
  pointer-events:none;
}

/* Project cards: color bars + tiny “route diagram” detail */
.card{
  background: rgba(255,255,255,.86);
}
.card:before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(227,25,55,.14), transparent 32%),
    linear-gradient(180deg, rgba(0,117,191,.10), transparent 55%);
  opacity:.85;
  pointer-events:none;
}
.card:after{
  content:"";
  position:absolute;
  right: 18px;
  bottom: 18px;
  width: 120px;
  height: 54px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 14px 18px, rgba(0,117,191,.28) 2px, transparent 3px) 0 0/18px 18px,
    radial-gradient(circle at 14px 18px, rgba(0,132,61,.22) 2px, transparent 3px) 9px 9px/18px 18px,
    linear-gradient(135deg, rgba(255,255,255,.72), rgba(255,255,255,.44));
  border: 1px solid rgba(15,23,42,.10);
  opacity:.9;
  pointer-events:none;
}

/* Mobile tuning: keep the photo backgrounds but tame scale */
@media (max-width: 980px){
  .hero:before,
  .hero:after{
    height: 440px;
    width: 90vw;
    min-width: 0;
    opacity:.18;
  }
  .hero:before{ left:-22vw; }
  .hero:after{ right:-22vw; }
}

/* Stronger header typography */
.topbar h1{
  font-weight:900;
  font-size:2rem;
  letter-spacing:-0.02em;
}
.hero h2{
  font-size:3rem;
  font-weight:900;
  line-height:1.05;
  background:linear-gradient(90deg,var(--muni-red),var(--muni-orange),var(--muni-blue));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

/* Punchier hero visuals */
.hero{
  background:
    radial-gradient(circle at 20% 20%, rgba(227,25,55,.15), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(0,117,191,.18), transparent 45%),
    linear-gradient(135deg,#ffffff,#f1f5f9);
}
.hero-card{
  box-shadow:0 20px 60px rgba(0,0,0,.12);
}


/* MANIFESTO HEADLINE */
.manifesto{
  font-size:clamp(3rem,8vw,7rem);
  font-weight:900;
  letter-spacing:-0.04em;
  text-transform:uppercase;
  line-height:.95;
  margin:2rem 0 3rem;
  background:linear-gradient(90deg,#e31937,#f7941d,#0075bf,#00a651);
  background-size:300% 300%;
  -webkit-background-clip:text;
  color:transparent;
  animation:gradientShift 12s ease infinite;
}

/* PROJECT COVERS */
.project-cover{
  position:relative;
  overflow:hidden;
  border-radius:24px;
  min-height:340px;
  display:flex;
  align-items:flex-end;
  padding:2rem;
  color:#fff;
  background-size:cover;
  background-position:center;
  transition:all .5s cubic-bezier(.2,.8,.2,1);
}

.project-cover::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(to top,rgba(0,0,0,.7),rgba(0,0,0,.15));
}

.project-cover > *{
  position:relative;
  z-index:2;
}

.project-cover:hover{
  transform:translateY(-10px) scale(1.02);
  box-shadow:0 40px 90px rgba(0,0,0,.35);
}

/* EDITORIAL SPACING */
main{
  max-width:1400px;
  margin:auto;
  padding:0 2rem;
}

section{
  margin-bottom:7rem;
}

/* SCROLL MOTION */
.scroll-motion section{
  opacity:0;
  transform:translateY(40px);
  transition:all .9s ease;
}

.scroll-motion section.visible{
  opacity:1;
  transform:none;
}

/* KEYFRAMES */
@keyframes gradientShift{
  0%{background-position:0% 50%}
  50%{background-position:100% 50%}
  100%{background-position:0% 50%}
}


/* COVER BACKGROUNDS */
.project-cover:nth-child(1){
  background-image:url("https://images.unsplash.com/photo-1501594907352-04cda38ebc29?auto=format&fit=crop&w=1400&q=80");
}

.project-cover:nth-child(2){
  background-image:url("https://images.unsplash.com/photo-1542223616-740d5c05b1c1?auto=format&fit=crop&w=1400&q=80");
}

.project-cover:nth-child(3){
  background-image:url("https://images.unsplash.com/photo-1603386329225-868f9b1ee6c9?auto=format&fit=crop&w=1400&q=80");
}


/* Refined, less aggressive typography */
.manifesto{
  font-size:clamp(2.5rem,6vw,5rem);
  font-weight:800;
  letter-spacing:-0.025em;
}

.hero h2{
  font-size:2.4rem;
  font-weight:800;
}

.topbar h1{
  font-weight:800;
}


/* Performance & smooth scrolling */
*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

.project-cover{
  will-change:transform;
  backface-visibility:hidden;
}

.hero,
.project-cover{
  contain:layout paint style;
}


/* ================================
   ALT PALETTE: Bay Fog / Sunset
   Toggle by adding .alt-theme to body
   ================================ */

body.alt-theme{
  --muni-red:#d97706;
  --muni-orange:#fb923c;
  --muni-blue:#0ea5a4;
  --muni-green:#22c55e;
  background:#f8fafc;
}

body.alt-theme .hero{
  background:
    radial-gradient(circle at 30% 20%, rgba(251,146,60,.18), transparent 45%),
    radial-gradient(circle at 70% 40%, rgba(14,165,164,.18), transparent 50%),
    linear-gradient(135deg,#ffffff,#f1f5f9);
}

body.alt-theme .manifesto{
  background:linear-gradient(90deg,#d97706,#fb923c,#0ea5a4,#22c55e);
  -webkit-background-clip:text;
  color:transparent;
}


/* Softer covers */
.project-cover::before{
  background:linear-gradient(to top,rgba(0,0,0,.55),rgba(0,0,0,.12));
}

.project-cover{
  box-shadow:0 18px 45px rgba(0,0,0,.22);
}


/* Header visuals */
.header-accent{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:6px;
  background:linear-gradient(90deg,#e31937,#f7941d,#0075bf,#00a651);
}

.header-badge{
  position:absolute;
  top:12px;
  right:24px;
  background:rgba(255,255,255,.9);
  padding:.4rem .8rem;
  border-radius:999px;
  font-size:.75rem;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  box-shadow:0 4px 12px rgba(0,0,0,.15);
}


/* New SF Transit Hero Background */
.hero{
  background:
    linear-gradient(rgba(0,0,0,.35),rgba(0,0,0,.35)),
    url("https://images.unsplash.com/photo-1501594907352-04cda38ebc29?auto=format&fit=crop&w=1800&q=80")
    center/cover no-repeat;
}
