/* ============================================================
   Bastion Hunt | site styles
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Outfit:wght@500;600;700;800&display=swap");

:root {
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --ink: #0c1222;
  --ink-soft: #3d4a63;
  --muted: #64748b;
  --line: rgba(12, 18, 34, 0.08);
  --surface: #ffffff;
  --surface-2: #f4f7fc;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --sports: #ea580c;
  --gaming: #7c3aed;
  --school: #059669;
  --tech: #0891b2;

  --hero-bg: linear-gradient(135deg, #0f172a 0%, #1e1b4b 42%, #312e81 100%);
  --glow-sports: rgba(234, 88, 12, 0.35);
  --glow-gaming: rgba(124, 58, 237, 0.35);
  --glow-school: rgba(5, 150, 105, 0.3);
  --glow-tech: rgba(8, 145, 178, 0.35);

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 12px 40px rgba(15, 23, 42, 0.1);
  --max-width: 720px;
  --max-wide: 1040px;
  --header-h: 4rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8edf7;
    --ink-soft: #a8b4cc;
    --muted: #8b9ab5;
    --line: rgba(232, 237, 247, 0.1);
    --surface: #121826;
    --surface-2: #1a2235;
    --accent: #818cf8;
    --accent-hover: #a5b4fc;
    --hero-bg: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e1b4b 100%);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

nav {
  max-width: var(--max-wide);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  border: 2px solid color-mix(in srgb, var(--line) 80%, transparent);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover {
  color: var(--accent);
  border-bottom-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---- Main ---- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

main.wide {
  max-width: var(--max-wide);
}

/* ---- Home hero ---- */
.hero {
  margin: -2.5rem -1.5rem 2.5rem;
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem clamp(3rem, 8vw, 5rem);
  background: var(--hero-bg);
  color: #f1f5f9;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

@media (min-width: 900px) {
  .hero {
    margin: -2.5rem calc(50% - 50vw + 1.5rem) 2.5rem;
    width: calc(100vw - 3rem);
    max-width: min(var(--max-wide), calc(100vw - 3rem));
    margin-left: auto;
    margin-right: auto;
    border-radius: var(--radius-lg);
  }
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, var(--glow-sports), transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 10%, var(--glow-gaming), transparent 50%),
    radial-gradient(ellipse 50% 40% at 70% 90%, var(--glow-tech), transparent 45%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: var(--max-wide);
  margin: 0 auto;
}

.about-portrait {
  margin: 1.5rem 0 2rem;
  max-width: 20rem;
  padding: 0;
}

.about-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.about-gallery {
  display: grid;
  gap: 1.5rem;
  margin: 1.75rem 0 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .about-gallery {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.about-gallery figure {
  margin: 0;
}

.about-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.about-gallery figcaption {
  margin-top: 0.65rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--muted);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(241, 245, 249, 0.85);
  margin-bottom: 1rem;
}

.hero-badge span {
  opacity: 0.9;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 3.35rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
  text-wrap: balance;
}

.hero .lede {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.55;
  color: rgba(241, 245, 249, 0.88);
  max-width: 36rem;
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: #fff;
  color: #312e81;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ---- Interest cards ---- */
.interests {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2.5rem 0 0;
  list-style: none;
  padding: 0;
}

.interests > li {
  margin: 0;
  display: flex;
  min-height: 0;
}

.interest-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 11.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.25rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: var(--ink);
}

@media (min-width: 900px) {
  .interests {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

a.interest-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  color: var(--ink);
}

.interest-card .emoji {
  font-size: 1.75rem;
  line-height: 1;
  display: block;
  margin-bottom: 0.65rem;
}

a.interest-card h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

a.interest-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.5;
  flex: 1 1 auto;
}

.interest-card.sports { border-top: 3px solid var(--sports); }
.interest-card.gaming { border-top: 3px solid var(--gaming); }
.interest-card.school { border-top: 3px solid var(--school); }
.interest-card.tech { border-top: 3px solid var(--tech); }

.section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 2.75rem 0 0.75rem;
}

/* ---- Typography (inner pages) ---- */
h1.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 2.25rem 0 0.65rem;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.5rem 0 0.4rem;
}

p { margin: 1rem 0; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0 0 1.75rem;
  line-height: 1.55;
}

.legal main h2 {
  font-size: 1.2rem;
  margin-top: 2rem;
}

.legal main h2:first-of-type {
  margin-top: 1.5rem;
}

.legal .lede {
  font-size: 1.05rem;
}

ul, ol { padding-left: 1.35rem; }
li { margin: 0.35rem 0; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  background: color-mix(in srgb, var(--surface) 70%, var(--ink));
  padding: 0.12em 0.45em;
  border-radius: 6px;
  border: 1px solid var(--line);
}

pre {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

/* ---- School page & project cards ---- */
main.school-page {
  max-width: var(--max-wide);
}

.school-hero {
  margin: -2.5rem -1.5rem 2rem;
  padding: clamp(1.75rem, 4vw, 2.5rem) 1.5rem clamp(2rem, 4vw, 2.75rem);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 75% 90% at 100% 0%, var(--glow-school), transparent 52%),
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--school) 14%, var(--surface)) 0%,
      var(--surface-2) 42%,
      var(--surface) 100%
    );
}

@media (prefers-color-scheme: dark) {
  .school-hero {
    background:
      radial-gradient(ellipse 75% 90% at 100% 0%, var(--glow-school), transparent 50%),
      linear-gradient(
        165deg,
        color-mix(in srgb, var(--school) 22%, var(--surface)) 0%,
        var(--surface) 100%
      );
  }
}

.school-hero .page-title {
  margin-bottom: 0.35rem;
}

.school-hero .lede {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
  max-width: 40rem;
}

.school-hero-schools {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 40rem;
}

.school-hero-schools li {
  margin: 0.3rem 0;
}

.school-hero-schools li::marker {
  color: var(--school);
}

.school-hero-voice {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 40rem;
}

.school-page .section-label {
  margin-top: 0.25rem;
}

.school-projects {
  list-style: none;
  padding: 0;
  margin: 0 0 2.75rem;
  display: grid;
  gap: 1rem;
}

.school-projects > li {
  margin: 0;
}

.project-card {
  display: flex;
  align-items: stretch;
  gap: 1rem 1.15rem;
  padding: 1.35rem 1.35rem 1.35rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  border-top: 4px solid var(--school);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 5.5rem;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: color-mix(in srgb, var(--school) 35%, var(--line));
}

.project-card:focus-visible {
  outline: 2px solid var(--school);
  outline-offset: 3px;
}

.project-card-emoji {
  font-size: 2.125rem;
  line-height: 1;
  flex-shrink: 0;
  align-self: flex-start;
  padding-top: 0.15rem;
}

.project-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.project-card-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0 0 0.2rem;
  color: var(--ink);
}

.project-card-date {
  margin: 0 0 0.45rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--school);
  letter-spacing: 0.02em;
}

.project-card:hover .project-card-title {
  color: var(--accent);
}

.project-back {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.project-back a {
  text-decoration: none;
  color: var(--muted);
}

.project-back a:hover {
  color: var(--accent);
}

.project-inline-meta {
  margin: -0.25rem 0 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

.project-card-desc {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.55;
}

.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.project-pill {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--school) 16%, transparent);
  color: color-mix(in srgb, var(--school) 85%, var(--ink));
  border: 1px solid color-mix(in srgb, var(--school) 28%, transparent);
}

@media (prefers-color-scheme: dark) {
  .project-pill {
    color: color-mix(in srgb, #6ee7b7 92%, var(--ink));
    background: color-mix(in srgb, var(--school) 22%, transparent);
    border-color: color-mix(in srgb, var(--school) 40%, transparent);
  }
}

.project-card-arrow {
  flex-shrink: 0;
  align-self: center;
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--school);
  line-height: 1;
  opacity: 0.85;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.project-card:hover .project-card-arrow {
  transform: translateX(4px);
  opacity: 1;
}

.school-bottom-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  font-size: 0.9375rem;
  font-weight: 600;
  padding-top: 0.25rem;
}

.school-bottom-nav a {
  color: var(--muted);
  text-decoration: none;
}

.school-bottom-nav a:hover {
  color: var(--accent);
}

.school-bottom-nav-sep {
  color: var(--muted);
  opacity: 0.55;
  user-select: none;
}

.project-meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* ---- Topic pages: photos & awards ---- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1rem 0 2rem;
  padding: 0;
  list-style: none;
}

.photo-grid figure {
  margin: 0;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

/* Mixed orientations (portrait + landscape) without heavy cropping */
.photo-grid.photo-grid--natural img {
  aspect-ratio: auto;
  object-fit: unset;
  height: auto;
}

.photo-grid figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
}

.coming-soon {
  margin: 1rem 0 2rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 2px dashed color-mix(in srgb, var(--line) 80%, var(--muted));
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}

.coming-soon-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.coming-soon-text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.5;
}

.coming-soon + .photo-grid {
  margin-top: 0.25rem;
}

.awards-section {
  margin: 1rem 0 2rem;
}

.award-cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.award-cards li {
  margin: 0;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-left: 4px solid var(--sports);
  box-shadow: var(--shadow);
}

.award-cards strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.award-cards span {
  font-size: 0.9375rem;
  color: var(--muted);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}

.game-card {
  margin: 0;
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 3px solid var(--gaming);
}

.game-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.game-ranks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: center;
  margin: 0.35rem 0 1rem;
}

.rank-entry {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.rank-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.rank-icon--png {
  object-fit: contain;
  padding: 2px;
  background: color-mix(in srgb, var(--surface-2) 90%, var(--ink));
}

.rank-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.game-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.55;
}

.tech-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
  display: grid;
  gap: 0.75rem;
}

.tech-list li {
  margin: 0;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--tech);
}

.tech-list strong {
  font-family: var(--font-display);
  display: block;
  margin-bottom: 0.35rem;
}

.creator-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 2rem;
}

.creator-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.creator-links a:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

/* ---- Footer ---- */
.site-footer {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2rem;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer-nav a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--accent);
}
