/* =========================================================
   CODE FOR TUCSON – Revamped stylesheet
   Design: editorial / civic-tech / clean utility
   Fonts: Syne (display) + Source Serif 4 (body)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,400&display=swap');

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:      #0e1117;
  --sand:     #f5f0e8;
  --terracotta: #c85c35;
  --sage:     #4a7c59;
  --sky:      #2b6cb0;
  --muted:    #6b7280;
  --border:   #d1c9b8;
  --white:    #ffffff;
  --nav-h:    64px;
  --max-w:    1140px;
  --radius:   6px;
  --transition: 0.22s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
}

a { color: var(--sky); text-decoration: none; }
a:hover { color: var(--terracotta); text-decoration: underline; }

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

ul { list-style: none; }

/* ── Layout ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navigation ─────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--ink);
  border-bottom: 3px solid var(--terracotta);
  display: flex;
  align-items: center;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
}

.nav-brand img { height: 36px; width: auto; }

.nav-brand-text {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: rgba(255,255,255,0.82);
  font-family: 'Syne', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  text-decoration: none;
}

/* dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a::after { content: ' ▾'; font-size: 10px; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--ink);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  min-width: 180px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  border-radius: 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.dropdown-menu a:last-child { border-bottom: none; }

.nav-social {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-social a {
  color: rgba(255,255,255,0.65);
  font-size: 18px;
  padding: 6px 8px;
  text-decoration: none;
  transition: color var(--transition);
}
.nav-social a:hover { color: var(--terracotta); }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  padding: 6px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  margin-top: var(--nav-h);
  background: var(--ink);
  background-image: url('../images/hero_bg_op.jpg');
  background-size: cover;
  background-position: center 30%;
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(14,17,23,0.75) 0%, rgba(200,92,53,0.35) 100%);
}

.hero-inner {
  position: relative;
  text-align: center;
  padding: 60px 24px;
}

.hero-logo {
  height: 90px;
  width: auto;
  margin: 0 auto 20px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.hero-inner h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.hero-inner p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  margin: 0 auto;
}

/* ── Page hero (subpages) ──────────────────────────────── */
.page-hero {
  margin-top: var(--nav-h);
  background: var(--sand);
  border-bottom: 3px solid var(--border);
  padding: 48px 24px 40px;
}

.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
}

.breadcrumb {
  font-family: 'Syne', sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--terracotta); }

/* ── Main content ───────────────────────────────────────── */
main { padding: 56px 0 80px; }

/* ── Home — intro ───────────────────────────────────────── */
.home-intro {
  padding: 64px 0 0;
}

.home-intro h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.home-intro .lead {
  font-size: 1.15rem;
  max-width: 680px;
  color: #2d3748;
}

/* ── CTA Cards ─────────────────────────────────────────── */
.cta-cards {
  padding: 48px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.cta-card {
  background: var(--sand);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px 28px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.cta-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.cta-card img {
  height: 54px;
  width: auto;
  margin-bottom: 16px;
}

.cta-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.cta-card p {
  font-size: 0.94rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.cta-card a.btn {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--terracotta);
  text-decoration: none;
}
.cta-card a.btn:hover { text-decoration: underline; }

/* ── Section stripe ─────────────────────────────────────── */
.section-stripe {
  background: var(--ink);
  color: var(--white);
  padding: 20px 0;
  margin: 48px 0 40px;
}

.section-stripe h2 {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
}

.section-stripe .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.section-stripe a {
  color: var(--terracotta);
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Project cards (home featured + projects list) ─────── */
.project-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}

.project-card:last-child { border-bottom: none; }

.project-card img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.project-card h3 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.project-meta {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 10px;
}

.project-card p { font-size: 0.95rem; }

.project-card .github-link {
  display: inline-block;
  margin-top: 12px;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--white);
  background: var(--ink);
  padding: 8px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--transition);
}
.project-card .github-link:hover { background: var(--terracotta); text-decoration: none; }

/* ── About page ─────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 56px;
}

.embed-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.embed-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.leadership-section h2 { margin-bottom: 16px; }

.leadership-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 32px;
}

.leadership-item {
  padding: 16px;
  background: var(--sand);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.leadership-item strong {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--terracotta);
  margin-bottom: 4px;
}

/* ── Code of Conduct ────────────────────────────────────── */
.conduct-content h2 {
  font-size: 1.4rem;
  margin: 36px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--terracotta);
  display: inline-block;
}

.conduct-content h3 {
  font-size: 1.1rem;
  margin: 24px 0 8px;
  color: var(--sage);
}

.conduct-content ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 1em;
}

.conduct-content ul li { margin-bottom: 6px; }

.conduct-note {
  background: var(--sand);
  border-left: 4px solid var(--terracotta);
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 32px;
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 40px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}

.footer-logo img {
  height: 44px;
  width: auto;
  margin-bottom: 16px;
  opacity: 0.8;
}

.site-footer p {
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.site-footer a { color: rgba(255,255,255,0.65); }
.site-footer a:hover { color: var(--terracotta); text-decoration: none; }

.footer-col h4 {
  color: var(--white);
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.footer-col ul li i { margin-right: 6px; opacity: 0.7; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 48px;
  padding-top: 24px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .cta-cards { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .leadership-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid .footer-logo { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .cta-cards { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: 1fr; }
  .project-card img { max-height: 200px; width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .nav-links, .nav-social { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--ink);
    padding: 16px;
    gap: 2px;
    border-bottom: 3px solid var(--terracotta);
  }
  .nav-links.open a { width: 100%; padding: 10px 16px; }
  .nav-links.open .dropdown-menu { display: block; position: static; border: none; box-shadow: none; padding-left: 16px; margin-top: 4px; }
}
