/* =============================================================
   UConn Formula SAE - modern site stylesheet
   Palette: UConn National Flag Blue (navy) + white + husky blue accent
   ============================================================= */

:root {
  --navy:        #000e2f;   /* UConn National Flag Blue */
  --navy-2:      #07173d;
  --navy-3:      #0e2350;
  --navy-line:   #1c2f5c;
  --ink:         #0a1530;
  --heading:     #000e2f;   /* heading text on light surfaces (= navy in light mode) */
  --bg:          #ffffff;   /* page background */
  --accent:      #3b82f6;   /* bright husky blue */
  --accent-2:    #6aa6ff;
  --accent-dk:   #1f5fe0;
  --ev:          #2dd4bf;   /* teal - electric */
  --ic:          #f97316;   /* orange - combustion */
  --paper:       #ffffff;
  --paper-2:     #f4f6fb;
  --paper-3:     #e9edf6;
  --muted:       #5b6478;
  --muted-light: #aeb8cf;
  --white:       #ffffff;
  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 10px 30px -12px rgba(0, 14, 47, .25);
  --shadow-lg:   0 30px 60px -20px rgba(0, 14, 47, .45);
  --maxw:        1280px;
  --nav-h:       70px;
  --topbar-h:    40px;
  --header-h:    calc(var(--nav-h) + var(--topbar-h));
  --ease:        cubic-bezier(.22, 1, .36, 1);
  --ff-head: "Archivo", "Segoe UI", system-ui, sans-serif;
  --ff-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body {
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  transition: background .35s ease, color .35s ease;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--ff-head); line-height: 1.05; letter-spacing: -.02em; font-weight: 800; }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--tight { padding: clamp(48px, 6vw, 80px) 0; }
.section--navy { background: var(--navy); color: #dbe3f5; }
.section--paper2 { background: var(--paper-2); }
.center { text-align: center; }

.eyebrow {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-dk);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.section--navy .eyebrow { color: var(--accent-2); }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; display: inline-block; }
.eyebrow.center-line { justify-content: center; }

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  color: var(--heading);
  margin-bottom: 18px;
}
.section--navy .section-title { color: #fff; }
.section-lead {
  font-size: 1.075rem;
  color: var(--muted);
  max-width: 620px;
}
.section--navy .section-lead { color: var(--muted-light); }
.center .section-lead, .section-lead.center { margin-left: auto; margin-right: auto; }

/* ---------- buttons ---------- */
.btn {
  --b: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .01em;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 12px 26px -10px rgba(59, 130, 246, .7); }
.btn-primary:hover { background: var(--accent-dk); transform: translateY(-3px); box-shadow: 0 18px 34px -10px rgba(59, 130, 246, .85); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; transform: translateY(-3px); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-3); transform: translateY(-3px); }
.btn-outline { background: transparent; color: var(--heading); border-color: var(--paper-3); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-dk); transform: translateY(-3px); }
.btn-sm { padding: 10px 20px; font-size: .85rem; }

/* =============================================================
   HEADER  (fixed wrapper:  top utility bar  +  main nav)
   ============================================================= */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; }

/* ---- top utility bar: tagline + socials (always one click away) ---- */
.topbar {
  height: var(--topbar-h);
  background: rgba(0, 9, 30, .96);
  border-bottom: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  display: flex; align-items: center;
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar__tag { font-family: var(--ff-head); font-weight: 600; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #8fa3c8; display: flex; align-items: center; gap: 8px; }
.topbar__tag .flag { color: var(--accent-2); font-size: .9rem; }
.topbar__right { display: flex; align-items: center; gap: 4px; }
.topbar__right .tb-link { font-family: var(--ff-head); font-weight: 700; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #b9c6e2; padding: 5px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.topbar__right .tb-link:hover { color: #fff; background: rgba(255,255,255,.1); }
.topbar__social { display: flex; align-items: center; gap: 2px; margin-left: 6px; }
.topbar__social a { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: #c3d0ec; transition: color .2s, background .2s, transform .2s; }
.topbar__social a:hover { color: #fff; background: rgba(255,255,255,.12); transform: translateY(-1px); }
.topbar__social svg { width: 16px; height: 16px; }
[data-theme="dark"] .topbar__social a:hover { color: var(--accent-2); }

/* ---- main nav ---- */
.nav {
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(0, 14, 47, .72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: background .3s, box-shadow .3s, border-color .3s;
}
.site-header.scrolled .nav, .nav.scrolled {
  background: rgba(0, 14, 47, .96);
  box-shadow: 0 8px 30px -12px rgba(0,0,0,.6);
}
.nav .container { display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand img { height: 30px; width: auto; }
.brand .brand-text { font-family: var(--ff-head); font-weight: 800; color: #fff; font-size: .82rem; letter-spacing: .14em; line-height: 1.1; text-transform: uppercase; }
.brand .brand-text span { display: block; color: var(--accent-2); font-size: .68rem; letter-spacing: .26em; font-weight: 700; }

.nav-links { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.nav-links a {
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: .92rem;
  color: #c8d3ec;
  padding: 9px 14px;
  border-radius: 999px;
  position: relative;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; background: var(--accent-2); border-radius: 2px;
}
.nav-cta { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: none; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 6px; padding: 10px;
}
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* theme toggle */
.theme-toggle {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); color: #fff;
  transition: background .2s, transform .2s, border-color .2s;
}
.theme-toggle:hover { background: rgba(255,255,255,.2); transform: translateY(-2px); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle { background: rgba(238,105,33,.16); border-color: rgba(246,151,90,.5); color: var(--accent-2); }

/* =============================================================
   HERO
   ============================================================= */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  color: #fff; padding-top: var(--header-h); overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(110deg, rgba(0,14,47,.96) 0%, rgba(0,14,47,.82) 38%, rgba(0,14,47,.45) 70%, rgba(0,14,47,.65) 100%),
    radial-gradient(1200px 600px at 80% 10%, rgba(59,130,246,.25), transparent 60%);
}
.hero__grid {
  position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 30% 50%, #000 0%, transparent 75%);
  mask-image: radial-gradient(circle at 30% 50%, #000 0%, transparent 75%);
}
.hero .container { position: relative; z-index: 1; }
.hero__inner { max-width: 760px; }
.hero__tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-head); font-weight: 700; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  color: #cfe0ff; background: rgba(59,130,246,.16); border: 1px solid rgba(106,166,255,.4);
  padding: 8px 16px; border-radius: 999px; margin-bottom: 26px;
}
.hero__tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 4px rgba(106,166,255,.25); }
.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  line-height: .98; margin-bottom: 22px; text-transform: uppercase; font-weight: 900;
}
.hero h1 .grad {
  background: linear-gradient(100deg, #6aa6ff, #ffffff 60%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: #c8d3ec; max-width: 560px; margin-bottom: 34px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 1;
  color: #9fb2d8; font-size: .72rem; letter-spacing: .25em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--ff-head);
}
.hero__scroll .mouse { width: 22px; height: 36px; border: 2px solid rgba(159,178,216,.6); border-radius: 12px; position: relative; }
.hero__scroll .mouse::after { content:""; position:absolute; top:6px; left:50%; transform:translateX(-50%); width:3px; height:7px; background:#9fb2d8; border-radius:2px; animation: wheel 1.6s infinite; }
@keyframes wheel { 0%{opacity:0; transform:translate(-50%,0)} 30%{opacity:1} 100%{opacity:0; transform:translate(-50%,12px)} }

/* page hero (subpages) */
.pagehero {
  position: relative; padding: calc(var(--header-h) + 64px) 0 64px; color: #fff; overflow: hidden;
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-3) 100%);
}
.pagehero::before {
  content:""; position:absolute; inset:0; opacity:.4;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(circle at 70% 0%, #000, transparent 70%);
  mask-image: radial-gradient(circle at 70% 0%, #000, transparent 70%);
}
.pagehero::after {
  content:""; position:absolute; top:-40%; right:-10%; width:600px; height:600px; border-radius:50%;
  background: radial-gradient(circle, rgba(59,130,246,.35), transparent 60%); filter: blur(20px);
}
.pagehero .container { position: relative; z-index: 1; }
.pagehero h1 { font-size: clamp(2.4rem, 6vw, 4rem); text-transform: uppercase; font-weight: 900; margin-bottom: 14px; }
.pagehero p { color: #c8d3ec; max-width: 600px; font-size: 1.1rem; }
.crumbs { font-family: var(--ff-head); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 18px; }
.crumbs a:hover { color: #fff; }
.crumbs span { color: #6e80a8; margin: 0 8px; }

/* =============================================================
   STAT STRIP
   ============================================================= */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--navy-line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.stats--onnavy { box-shadow: none; border: 1px solid var(--navy-line); }
.stat { background: var(--navy-2); padding: 34px 24px; text-align: center; }
.stat__num { font-family: var(--ff-head); font-weight: 900; font-size: clamp(2.2rem, 4vw, 3.2rem); color: #fff; line-height: 1; }
.stat__num .unit { color: var(--accent-2); }
.stat__label { margin-top: 10px; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-light); font-family: var(--ff-head); font-weight: 600; }

/* =============================================================
   GENERIC GRID + CARDS
   ============================================================= */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split--rev .split__media { order: 2; }

.media-frame { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.media-frame:hover img { transform: scale(1.05); }
.media-frame--tall img { aspect-ratio: 4/5; }
.media-frame .badge {
  position: absolute; left: 16px; bottom: 16px; background: rgba(0,14,47,.78); backdrop-filter: blur(6px);
  color: #fff; font-family: var(--ff-head); font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18);
}

.card {
  background: var(--paper); border: 1px solid var(--paper-3); border-radius: var(--radius);
  padding: 30px; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  height: 100%;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(140deg, var(--accent), var(--accent-dk)); color: #fff;
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.25rem; color: var(--heading); margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .96rem; }

/* feature list */
.featlist { display: grid; gap: 14px; }
.featlist li { display: flex; gap: 14px; align-items: flex-start; }
.featlist .tick { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: rgba(59,130,246,.12); color: var(--accent-dk); display: grid; place-items: center; margin-top: 2px; }
.featlist .tick svg { width: 15px; height: 15px; }
.featlist h4 { font-family: var(--ff-body); font-weight: 700; font-size: 1rem; color: var(--heading); }
.featlist p { color: var(--muted); font-size: .92rem; }
.section--navy .featlist h4 { color: #fff; }
.section--navy .featlist p { color: var(--muted-light); }
.section--navy .featlist .tick { background: rgba(106,166,255,.16); color: var(--accent-2); }

/* =============================================================
   SUBSYSTEMS
   ============================================================= */
.subsys { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.subsys__item {
  background: var(--paper); border: 1px solid var(--paper-3); border-radius: var(--radius-sm);
  padding: 20px; display: flex; align-items: center; gap: 14px;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.subsys__item:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.subsys__item .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.subsys__item span { font-family: var(--ff-head); font-weight: 600; font-size: .95rem; color: var(--heading); }
.subsys__item small { display:block; color: var(--muted); font-family: var(--ff-body); font-weight: 400; font-size: .78rem; letter-spacing: 0; text-transform: none; }

/* =============================================================
   CARS
   ============================================================= */
.carcard {
  border-radius: var(--radius); overflow: hidden; background: var(--navy-2); color: #fff;
  border: 1px solid var(--navy-line); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; height: 100%;
}
.carcard__head { padding: 28px 28px 0; }
.carcard__pill {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--ff-head); font-weight: 700;
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px;
}
.carcard--ev .carcard__pill { background: rgba(45,212,191,.16); color: var(--ev); border: 1px solid rgba(45,212,191,.4); }
.carcard--ic .carcard__pill { background: rgba(249,115,22,.16); color: var(--ic); border: 1px solid rgba(249,115,22,.4); }
.carcard__pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.carcard h3 { font-size: 2rem; margin: 16px 0 4px; font-weight: 900; }
.carcard__sub { color: var(--muted-light); font-size: .95rem; }
.carcard__media { margin: 22px 0 0; aspect-ratio: 16/9; overflow: hidden; background: var(--navy-3); }
.carcard__media img { width: 100%; height: 100%; object-fit: cover; }
.carcard__specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--navy-line); }
.spec { background: var(--navy-2); padding: 20px 22px; }
.spec__k { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-light); font-family: var(--ff-head); font-weight: 600; }
.spec__v { font-family: var(--ff-head); font-weight: 800; font-size: 1.4rem; color: #fff; margin-top: 4px; }
.carcard--ev .spec__v .hl { color: var(--ev); }
.carcard--ic .spec__v .hl { color: var(--ic); }
.carcard__features { padding: 22px 28px 30px; }
.carcard__features h4 { font-family: var(--ff-head); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-light); margin-bottom: 14px; }
.chiplist { display: flex; flex-wrap: wrap; gap: 8px; }
.chiplist span { font-size: .82rem; padding: 7px 13px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--navy-line); color: #d4ddf2; }

/* =============================================================
   TEAM
   ============================================================= */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.person {
  background: var(--paper); border: 1px solid var(--paper-3); border-radius: var(--radius); overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.person:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.person__photo { aspect-ratio: 1/1; overflow: hidden; background: var(--paper-3); position: relative; }
.person__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.person:hover .person__photo img { transform: scale(1.06); }
.person__role-tag { position: absolute; top: 12px; left: 12px; font-family: var(--ff-head); font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: rgba(0,14,47,.8); color: #fff; padding: 5px 10px; border-radius: 999px; }
.person__role-tag.ev { background: rgba(45,212,191,.92); color: #042f2a; }
.person__role-tag.ic { background: rgba(249,115,22,.92); color: #3d1a00; }
.person__body { padding: 18px 18px 20px; }
.person__name { font-family: var(--ff-head); font-weight: 800; font-size: 1.1rem; color: var(--heading); }
.person__role { color: var(--accent-dk); font-weight: 600; font-size: .85rem; margin-top: 2px; font-family: var(--ff-head); letter-spacing: .02em; }
.person__links { display: flex; gap: 8px; margin-top: 14px; }
.person__links a {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--paper-2); color: var(--heading); border: 1px solid var(--paper-3);
  transition: background .2s, color .2s, transform .2s;
}
.person__links a:hover { background: var(--accent); color: #fff; transform: translateY(-2px); border-color: transparent; }
.person__links svg { width: 17px; height: 17px; }

.team-subhead { display: flex; align-items: baseline; gap: 14px; margin: 8px 0 26px; flex-wrap: wrap; }
.team-subhead h2 { font-size: 1.6rem; color: var(--heading); text-transform: uppercase; }
.team-subhead .count { font-family: var(--ff-head); font-weight: 700; color: var(--muted); font-size: .9rem; background: var(--paper-2); padding: 4px 12px; border-radius: 999px; border: 1px solid var(--paper-3); }

/* =============================================================
   SPONSORS
   ============================================================= */
.tier { margin-bottom: 48px; }
.tier__head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.tier__badge { font-family: var(--ff-head); font-weight: 800; font-size: 1.1rem; letter-spacing: .04em; text-transform: uppercase; padding: 8px 20px; border-radius: 999px; color: #fff; }
.tier__line { flex: 1; height: 1px; background: var(--paper-3); }
.tier__count { color: var(--muted); font-size: .85rem; font-family: var(--ff-head); font-weight: 600; }
.t-platinum { background: linear-gradient(135deg, #6b7a99, #aab7d1); }
.t-gold     { background: linear-gradient(135deg, #b8860b, #f0c54a); }
.t-silver   { background: linear-gradient(135deg, #7d8896, #c0c9d6); }
.t-bronze   { background: linear-gradient(135deg, #8a5a2b, #c98a4b); }

.sponsor-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.sponsor-grid.big { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
/* Sponsor tiles are always light so logos (usually dark) stay readable in both themes */
.sponsor {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: #ffffff; border: 1px solid #e4e9f3; border-radius: var(--radius-sm);
  padding: 22px 18px; min-height: 84px; font-family: var(--ff-head); font-weight: 700; color: #12233f;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s, color .2s; font-size: .98rem;
}
.sponsor:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent); color: var(--accent-dk); }
.sponsor.big { min-height: 110px; font-size: 1.1rem; }
/* logo / name swap: logo shows if its file loads, otherwise the name text shows */
.sponsor__logo { display: none; max-height: 48px; max-width: 84%; width: auto; object-fit: contain; }
.sponsor.big .sponsor__logo { max-height: 62px; }
.sponsor.has-logo .sponsor__logo { display: block; }
.sponsor.has-logo .sponsor__name { display: none; }
a.sponsor::after { content: "↗"; font-size: .8em; margin-left: 7px; opacity: .35; transition: opacity .2s; }
a.sponsor:hover::after { opacity: .9; }

/* =============================================================
   GALLERY
   ============================================================= */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 200px; gap: 16px; }
.gallery__item { position: relative; overflow: hidden; border-radius: var(--radius); cursor: pointer; background: var(--paper-3); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery__item:hover img { transform: scale(1.08); }
.gallery__item::after { content:""; position:absolute; inset:0; background: linear-gradient(to top, rgba(0,14,47,.7), transparent 50%); opacity:0; transition: opacity .3s; }
.gallery__item:hover::after { opacity: 1; }
.gallery__cap { position: absolute; left: 18px; bottom: 16px; z-index: 2; color: #fff; font-family: var(--ff-head); font-weight: 700; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
.gallery__item:hover .gallery__cap { opacity: 1; transform: translateY(0); }
.g-wide { grid-column: span 8; }
.g-tall { grid-column: span 4; grid-row: span 2; }
.g-std  { grid-column: span 4; }
.g-half { grid-column: span 6; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,8,24,.92); display: none; align-items: center; justify-content: center; padding: 30px; backdrop-filter: blur(6px); }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 12px; box-shadow: var(--shadow-lg); }
.lightbox__close { position: absolute; top: 22px; right: 26px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-size: 1.4rem; cursor: pointer; transition: background .2s; }
.lightbox__close:hover { background: rgba(255,255,255,.2); }
.lightbox__cap { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: #cdd8ef; font-family: var(--ff-head); letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; }

/* =============================================================
   CTA BANNER
   ============================================================= */
.cta-banner { position: relative; overflow: hidden; border-radius: var(--radius); padding: clamp(40px, 6vw, 72px); color: #fff; }
.cta-banner__bg { position: absolute; inset: 0; z-index: -2; }
.cta-banner__bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-banner__bg::after { content:""; position:absolute; inset:0; background: linear-gradient(115deg, rgba(0,14,47,.95), rgba(14,35,80,.78)); }
.cta-banner h2 { font-size: clamp(1.8rem, 4vw, 3rem); text-transform: uppercase; margin-bottom: 14px; max-width: 16ch; }
.cta-banner p { color: #c8d3ec; max-width: 540px; margin-bottom: 28px; font-size: 1.05rem; }
.cta-banner__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* =============================================================
   CONTACT
   ============================================================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.info-card { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border: 1px solid var(--paper-3); border-radius: var(--radius); background: var(--paper); margin-bottom: 16px; transition: border-color .25s, box-shadow .25s, transform .25s; }
.info-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-3px); }
.info-card__icon { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px; background: rgba(59,130,246,.1); color: var(--accent-dk); display: grid; place-items: center; }
.info-card__icon svg { width: 22px; height: 22px; }
.info-card h4 { font-family: var(--ff-head); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.info-card a, .info-card p { color: var(--heading); font-weight: 600; font-size: 1.02rem; word-break: break-word; }
.info-card a:hover { color: var(--accent-dk); }
.info-card small { display:block; color: var(--muted); font-weight: 400; font-size: .85rem; margin-top: 2px; }

.form { background: var(--paper); border: 1px solid var(--paper-3); border-radius: var(--radius); padding: clamp(24px, 4vw, 38px); box-shadow: var(--shadow); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--ff-head); font-weight: 600; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--heading); margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; font-family: var(--ff-body); font-size: 1rem; color: var(--ink);
  padding: 13px 15px; border: 1.5px solid var(--paper-3); border-radius: var(--radius-sm); background: var(--paper-2);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(59,130,246,.12); }
.field textarea { resize: vertical; min-height: 130px; }

/* map embed */
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--paper-3); box-shadow: var(--shadow); margin-top: 8px; }
.map-wrap iframe { width: 100%; height: 280px; border: 0; display: block; }

/* =============================================================
   FOOTER
   ============================================================= */
.footer { background: var(--navy); color: #aebbd6; padding: 64px 0 28px; position: relative; }
.footer::before { content:""; position:absolute; top:0; left:0; right:0; height:3px; background: linear-gradient(90deg, var(--accent), var(--ev) 50%, var(--ic)); }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 40px; border-bottom: 1px solid var(--navy-line); }
.footer__brand img { height: 36px; margin-bottom: 18px; }
.footer__brand p { color: #8da0c4; max-width: 280px; font-size: .92rem; }
.footer__social { display: flex; gap: 10px; margin-top: 20px; }
.footer__social a { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--navy-2); border: 1px solid var(--navy-line); color: #cdd8ef; transition: background .2s, transform .2s, color .2s; }
.footer__social a:hover { background: var(--accent); color: #fff; transform: translateY(-3px); border-color: transparent; }
.footer__social svg { width: 18px; height: 18px; }
.footer__col h5 { font-family: var(--ff-head); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.footer__col a { display: block; color: #9bacce; font-size: .92rem; padding: 6px 0; transition: color .2s, padding .2s; }
.footer__col a:hover { color: #fff; padding-left: 5px; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; flex-wrap: wrap; font-size: .82rem; color: #6e80a8; }
.footer__bottom a:hover { color: #fff; }

/* =============================================================
   REVEAL ANIMATIONS
   ============================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .hero__scroll .mouse::after { animation: none; }
  .bar__fill { animation: none; }
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
/* collapse the full nav to a hamburger before it gets cramped */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu { display: block; }
}
@media (max-width: 700px) {
  .topbar__tag { display: none; }
  .topbar .container { justify-content: flex-end; }
  .topbar__right .tb-link { display: none; }
}
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .gallery { grid-auto-rows: 170px; }
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--rev .split__media { order: 0; }
  .grid-2, .grid-3, .grid-4, .contact-grid, .stats { grid-template-columns: 1fr 1fr; }
  .carcard__head, .carcard__features { padding-left: 22px; padding-right: 22px; }
  .gallery { grid-template-columns: repeat(6, 1fr); }
  .g-wide, .g-tall, .g-std, .g-half { grid-column: span 6; grid-row: span 1; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3, .form__row { grid-template-columns: 1fr; }
  .hero__actions .btn, .cta-banner__actions .btn { width: 100%; justify-content: center; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .section { padding: 56px 0; }
}

/* mobile menu panel */
.mobile-menu {
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 99; display: none;
  background: rgba(0,14,47,.98); backdrop-filter: blur(16px); border-bottom: 1px solid var(--navy-line);
  padding: 18px 24px 26px; transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: transform .3s var(--ease), opacity .3s;
}
.mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-menu a { display: block; color: #cdd8ef; font-family: var(--ff-head); font-weight: 600; font-size: 1.05rem; padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.06); }
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu a.active { color: var(--accent-2); }
.mobile-menu .btn { width: 100%; justify-content: center; margin-top: 16px; }

/* =============================================================
   DARK MODE  -  UConn Navy base + College of Engineering Orange
   Activated by  <html data-theme="dark">  (toggled in the nav).
   ============================================================= */
[data-theme="dark"] {
  --bg:          #000e2f;   /* page - UConn National Flag Blue */
  --paper:       #0a2240;   /* cards / surfaces - UConn navy */
  --paper-2:     #081a3a;   /* alternating sections, inputs */
  --paper-3:     #1c3160;   /* borders + photo backdrops */
  --ink:         #c9d6ee;   /* body text */
  --heading:     #f4f8ff;   /* headings */
  --muted:       #93a4c6;
  --muted-light: #b3c0db;
  --navy:        #0a2240;   /* dark surfaces: footer, navy sections, page heroes */
  --navy-2:      #0d264c;
  --navy-3:      #123166;
  --navy-line:   #213a70;
  --accent:      #ee6921;   /* College of Engineering Orange */
  --accent-2:    #f6975a;
  --accent-dk:   #f5832f;
  --shadow:      0 10px 30px -12px rgba(0,0,0,.55);
  --shadow-lg:   0 30px 60px -20px rgba(0,0,0,.72);
}
/* buttons */
[data-theme="dark"] .btn-primary { box-shadow: 0 12px 26px -10px rgba(238,105,33,.6); }
[data-theme="dark"] .btn-primary:hover { box-shadow: 0 18px 34px -10px rgba(238,105,33,.85); }
[data-theme="dark"] .btn-dark { background: transparent; color: var(--heading); border-color: var(--accent); }
[data-theme="dark"] .btn-dark:hover { background: var(--accent); color: #1a0c00; }
/* accent-tinted chips/icons */
[data-theme="dark"] .featlist .tick { background: rgba(238,105,33,.15); color: var(--accent-2); }
[data-theme="dark"] .info-card__icon { background: rgba(238,105,33,.14); color: var(--accent-2); }
[data-theme="dark"] .section--navy .featlist .tick { background: rgba(238,105,33,.18); color: var(--accent-2); }
/* form: keep inputs dark on focus (light mode turns them white) */
[data-theme="dark"] .field input:focus,
[data-theme="dark"] .field textarea:focus { background: #0a1f3e; box-shadow: 0 0 0 4px rgba(238,105,33,.18); }
/* hero + page-hero glow recoloured orange */
[data-theme="dark"] .hero__bg::after {
  background:
    linear-gradient(110deg, rgba(0,7,22,.96) 0%, rgba(0,9,28,.82) 38%, rgba(0,9,28,.5) 70%, rgba(0,9,28,.66) 100%),
    radial-gradient(1200px 600px at 80% 10%, rgba(238,105,33,.22), transparent 60%);
}
[data-theme="dark"] .pagehero::after { background: radial-gradient(circle, rgba(238,105,33,.34), transparent 60%); }
[data-theme="dark"] .hero h1 .grad {
  background: linear-gradient(100deg, #f6975a, #ffffff 62%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="dark"] .hero__tag { color: #ffd9c2; background: rgba(238,105,33,.16); border-color: rgba(246,151,90,.45); }
[data-theme="dark"] .hero__tag .dot { background: var(--accent-2); box-shadow: 0 0 0 4px rgba(246,151,90,.25); }
[data-theme="dark"] .cta-banner__bg::after { background: linear-gradient(115deg, rgba(0,8,26,.95), rgba(12,28,64,.8)); }

/* =============================================================
   ACHIEVEMENTS · CHARTS · RESULTS · CONNECT  (added components)
   ============================================================= */

/* achievement tiles (light sections) */
.achv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.achv { background: var(--paper); border: 1px solid var(--paper-3); border-radius: var(--radius); padding: 28px 22px; text-align: center; box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.achv:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.achv__num { font-family: var(--ff-head); font-weight: 900; font-size: clamp(2.1rem, 4vw, 2.9rem); color: var(--accent-dk); line-height: 1; }
.achv__num .u { color: var(--muted); font-size: .55em; }
.achv__label { margin-top: 10px; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-family: var(--ff-head); font-weight: 600; }

/* horizontal bar chart */
.barchart { display: grid; gap: 14px; }
.bar { display: grid; grid-template-columns: 190px 1fr 58px; align-items: center; gap: 16px; }
.bar__name { font-family: var(--ff-head); font-weight: 600; font-size: .9rem; color: var(--heading); text-align: right; }
.bar.is-top .bar__name { font-weight: 800; }
.bar__track { background: var(--paper-2); border: 1px solid var(--paper-3); border-radius: 999px; height: 28px; overflow: hidden; }
.bar__fill { height: 100%; width: var(--w); border-radius: 999px; background: linear-gradient(90deg, #9aa9c8, #7888a8); animation: barGrow 1s var(--ease) both; }
.bar.is-top .bar__fill { background: linear-gradient(90deg, var(--accent), var(--accent-dk)); }
@keyframes barGrow { from { width: 0; } to { width: var(--w); } }
.bar__val { font-family: var(--ff-head); font-weight: 800; font-size: .92rem; color: var(--heading); }
.bar.is-top .bar__val { color: var(--accent-dk); }
.chart-note { color: var(--muted); font-size: .82rem; margin-top: 18px; }

/* percentile gauge */
.gauge { width: 168px; height: 168px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--paper-3) 0); }
.gauge__inner { width: 128px; height: 128px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; text-align: center; }
.gauge__num { font-family: var(--ff-head); font-weight: 900; font-size: 1.9rem; color: var(--heading); }
.gauge__label { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 2px; max-width: 90px; }

/* results breakdown cards */
.result-card { background: var(--paper); border: 1px solid var(--paper-3); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); height: 100%; }
.result-card__head { display: flex; align-items: center; gap: 18px; padding: 24px 26px; background: linear-gradient(120deg, var(--navy-3), var(--navy-2)); color: #fff; }
.result-card--ic .result-card__head { border-top: 4px solid var(--ic); }
.result-card--ev .result-card__head { border-top: 4px solid var(--ev); }
.result-card__place { font-family: var(--ff-head); font-weight: 900; font-size: 2.8rem; line-height: .9; }
.result-card__place small { display: block; font-size: .8rem; color: var(--muted-light); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }
.result-card__h { font-family: var(--ff-head); font-weight: 800; font-size: 1.3rem; }
.result-card__sub { color: var(--muted-light); font-size: .9rem; margin-top: 2px; }
.result-card__total { margin-left: auto; text-align: right; }
.result-card__total b { font-family: var(--ff-head); font-size: 1.6rem; display: block; }
.result-card__total span { font-size: .72rem; color: var(--muted-light); text-transform: uppercase; letter-spacing: .08em; }
.result-card__body { padding: 8px 26px 24px; }
.eventrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--paper-3); }
.eventrow:last-child { border-bottom: none; }
.eventrow__label { flex: 1; font-weight: 600; color: var(--heading); font-size: .95rem; }
.eventrow__val { font-family: var(--ff-head); font-weight: 800; color: var(--muted); font-size: .9rem; }
.medal { display: inline-grid; place-items: center; min-width: 50px; height: 28px; padding: 0 10px; border-radius: 7px; font-family: var(--ff-head); font-weight: 800; font-size: .76rem; color: #fff; letter-spacing: .02em; }
.medal.gold { background: linear-gradient(135deg, #b8860b, #f0c54a); color: #3a2a00; }
.medal.acc  { background: var(--accent); color: #fff; }
.medal.gray { background: #7d8896; }

/* connect band - big clickable social buttons */
.connect { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.connect a { display: inline-flex; align-items: center; gap: 10px; font-family: var(--ff-head); font-weight: 700; font-size: .95rem; padding: 13px 22px; border-radius: 999px; border: 2px solid var(--paper-3); color: var(--heading); transition: transform .25s var(--ease), border-color .25s, color .25s, background .25s; }
.connect a:hover { border-color: var(--accent); color: var(--accent-dk); transform: translateY(-3px); }
.connect a svg { width: 20px; height: 20px; }
.section--navy .connect a { color: #fff; border-color: rgba(255,255,255,.28); }
.section--navy .connect a:hover { border-color: var(--accent-2); color: var(--accent-2); background: rgba(255,255,255,.05); }

/* image accents */
.photo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.photo-row .media-frame img { aspect-ratio: 4/3; }
.ribbon-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.ribbon-strip img { width: 100%; height: 220px; object-fit: cover; }

/* highlight chip list (e.g. "only top-5 in both") */
.flag-callout { display: flex; gap: 16px; align-items: flex-start; background: var(--paper); border: 1px solid var(--paper-3); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow); }
.flag-callout .ic { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(140deg, var(--accent), var(--accent-dk)); color: #fff; display: grid; place-items: center; }
.flag-callout h4 { font-family: var(--ff-head); color: var(--heading); font-size: 1.05rem; margin-bottom: 4px; }
.flag-callout p { color: var(--muted); font-size: .95rem; }

@media (max-width: 860px) {
  .achv-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-row { grid-template-columns: 1fr 1fr; }
  .ribbon-strip { grid-template-columns: 1fr 1fr; }
  .bar { grid-template-columns: 120px 1fr 50px; gap: 10px; }
  .bar__name { font-size: .8rem; }
}
@media (max-width: 560px) {
  .achv-grid { grid-template-columns: 1fr 1fr; }
  .bar { grid-template-columns: 92px 1fr 44px; }
  .result-card__head { flex-wrap: wrap; gap: 12px; }
  .result-card__total { margin-left: 0; }
}

/* bar chart placed on a navy section - keep labels/values legible */
.section--navy .bar__name, .section--navy .bar__val { color: #fff; }
.section--navy .bar.is-top .bar__val { color: var(--accent-2); }
.section--navy .bar__track { background: rgba(255,255,255,.08); border-color: var(--navy-line); }
.section--navy .chart-note { color: var(--muted-light); }
