/* ---------- Design tokens (Royal Dark Blue theme) ---------- */
:root {
  --bg: #f3f4f8;
  --bg-soft: #e4e7f5;
  --card-bg: #ffffff;

  --primary: #1b3c92;        /* royal blue */
  --primary-dark: #0a1a44;   /* deep navy */
  --primary-soft: #d7e0ff;   /* soft blue tint */

  --text-main: #1f2533;
  --text-muted: #6f7a8a;
  --border: #d7deea;

  --shadow-soft: 0 10px 28px rgba(11, 20, 46, 0.14);
}

/* ---------- Global reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

/* Utility container */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header & Navigation ---------- */

header {
  position: relative;
  background: linear-gradient(135deg, #0a1a44, #1b3c92);
  color: #ffffff;
  padding: 26px 0 34px;
  box-shadow: 0 18px 40px rgba(7, 12, 32, 0.65);
  overflow: hidden;
  z-index: 0;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

/* soft blurred shapes behind the hero */
header::before,
header::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(26px);
  opacity: 0.85;
  pointer-events: none;
  z-index: -1;
  transform: translateY(var(--hero-parallax, 0px));
  transition: transform 0.06s linear;
}

header::before {
  width: 420px;
  height: 420px;
  top: -140px;
  right: -120px;
  background: radial-gradient(circle at center,
    rgba(129, 140, 248, 0.9),
    rgba(15, 23, 42, 0.1)
  );
}

header::after {
  width: 360px;
  height: 360px;
  bottom: -160px;
  left: -80px;
  background: radial-gradient(circle at center,
    rgba(56, 189, 248, 0.7),
    rgba(15, 23, 42, 0.05)
  );
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap; /* allow wrapping on narrower widths */
}

/* ---------- Brand / Logo ---------- */

.brand {
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 14px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  text-decoration: none;
}

.brand::before {
  content: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffffff, #c7d5ff);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
}

.brand:hover {
  opacity: 0.85;
}

/* ---------- Navigation ---------- */

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

nav a {
  color: #dde5ff;
  text-decoration: none;
  font-size: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    transform 0.12s ease,
    box-shadow 0.18s ease;
}

nav a:hover,
nav a:focus {
  background-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

nav a.active {
  background-color: #ffffff;
  color: var(--primary-dark);
}

/* ---------- Toronto time & weather ---------- */

.toronto-meta {
  margin-left: auto;
  font-size: 12px;
  color: #dde5ff;
  opacity: 0.9;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.toronto-label {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 11px;
  opacity: 0.8;
}

.toronto-separator {
  opacity: 0.7;
}

.toronto-weather-temp {
  font-weight: 500;
}

.toronto-weather-icon img {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  border-radius: 999px;
}

body.dark-mode .toronto-meta {
  color: #e2e8f0;
}

/* ---------- Hero (index main header area) ---------- */

.hero {
  padding: 56px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr);
  gap: 32px;
  align-items: center;
}

.hero-main-text {
  max-width: 640px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 40px;
  letter-spacing: -0.02em;
}

.hero h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 500;
  color: #c7d5ff;
}

.hero p {
  margin: 0 0 18px;
  color: #e3e8ff;
  max-width: 650px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(9, 16, 40, 0.5);
  border: 1px solid rgba(191, 210, 255, 0.85);
  color: #e3e8ff;
}

/* optional glass treatment if used */
.hero-glass {
  border-radius: 24px;
  padding: 24px 22px;
  background: radial-gradient(circle at top left,
      rgba(248, 250, 252, 0.12),
      rgba(15, 23, 42, 0.65)
    );
  border: 1px solid rgba(148, 163, 184, 0.65);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Profile area in hero */
.hero-profile-wrapper {
  max-width: 260px;
  margin: 0 auto 16px;
  padding: 16px 16px 20px;
  border-radius: 24px;
  background: radial-gradient(circle at top,
    rgba(255, 255, 255, 0.22),
    rgba(15, 23, 42, 0.4)
  );
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.hero-profile-img {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  display: block;
}

/* Hero profile card on the right */
.hero-card {
  max-width: 340px;
  margin-left: auto;
  background: rgba(5, 10, 30, 0.9);
  border-radius: 24px;
  padding: 20px 20px 22px;
  border: 1px solid rgba(148, 163, 184, 0.75);
  box-shadow: 0 20px 45px rgba(4, 7, 20, 0.82);
  animation: hero-float 10s ease-in-out infinite;
}

.hero-card-body {
  margin-top: 8px;
}

.hero-card-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #e3e8ff;
}

.hero-card-line {
  margin: 0 0 4px;
  font-size: 13px;
  color: #dde5ff;
}

/* ---------- Section captions (label above cards) ---------- */

.section-caption {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin: 0 0 10px 2px;
}

/* ---------- Scroll Reveal Animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.45s ease-out,
    transform 0.45s ease-out;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-delay="1"] { transition-delay: 0.05s; }
.reveal[data-delay="2"] { transition-delay: 0.1s; }
.reveal[data-delay="3"] { transition-delay: 0.15s; }

@keyframes hero-float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .hero-card {
    animation: none;
  }

  .reveal {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

/* ---------- Main content & cards ---------- */

main {
  padding: 40px 0 52px;
}

section {
  margin-bottom: 40px;
}

/* Alternating rhythm via card-bg variable */
section:nth-of-type(even) {
  --card-bg: #f8f9ff;
}
section:nth-of-type(odd) {
  --card-bg: #ffffff;
}

.card {
  border-radius: 24px;
  padding: 26px 24px 26px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(9, 12, 38, 0.16);
  position: relative;
  overflow: hidden;
  background-color: var(--card-bg);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top left,
    rgba(27, 60, 146, 0.05),
    transparent 60%
  );
  pointer-events: none;
}

.card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(9, 12, 38, 0.18);
  border-color: rgba(27, 60, 146, 0.32);
  background-color: #ffffff;
}

.card h2 {
  margin-top: 0;
  margin-bottom: 6px;
  font-size: 20px;
}

.card-subtitle {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 20px;
}

.item {
  margin-bottom: 12px;
}

.item-title {
  font-weight: 600;
  font-size: 14px;
}

.item-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.card ul {
  padding-left: 18px;
}

/* Pills / skill chips */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.pill {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid rgba(27, 60, 146, 0.4);
  white-space: nowrap;
  transition:
    background-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.12s ease;
}

.pill:hover {
  background-color: #ffffff;
  color: var(--primary-dark);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

/* Contact row */
.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
}

.contact-row a {
  color: var(--primary-dark);
  text-decoration: none;
}

.contact-row a:hover {
  text-decoration: underline;
}

/* ---------- Sports / Travel / Blogs helpers ---------- */

.sports-list,
.travel-list,
.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.sports-list .card,
.travel-list .card,
.blog-list .card {
  padding-top: 16px;
}

/* soft hero gradients for secondary pages */
.sports-hero,
.travel-hero,
.blogs-hero {
  background: radial-gradient(circle at top left,
              rgba(27, 60, 146, 0.08),
              #ffffff);
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.gallery-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(9, 12, 38, 0.18);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.24);
}

.gallery-item img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.caption {
  padding: 6px 10px 10px;
  color: var(--text-muted);
  font-size: 12px;
}

/* Back link under sports / travel / blogs */
.back-link {
  margin-top: 24px;
  font-size: 13px;
}

.back-link a {
  color: var(--primary-dark);
  text-decoration: none;
}

.back-link a:hover {
  text-decoration: underline;
}

/* ---------- Back to top & theme toggle buttons ---------- */

.back-to-top-btn {
  position: fixed;
  right: 16px;
  bottom: 18px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.94);
  color: #e5e7ff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.back-to-top-btn.show {
  display: flex;
}

.back-to-top-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.75);
}

/* theme toggle button (for dark/light mode) */
.theme-toggle-btn {
  position: fixed;
  right: 16px;
  bottom: 70px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(248, 250, 252, 0.9);
  color: #0f172a;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.45);
  z-index: 50;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease;
}

.theme-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.65);
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 16px 16px 20px;
  font-size: 12px;
  color: var(--text-muted);
  background-color: #f7f8fc;
}

/* ---------- Dark mode (refined) ---------- */

body.dark-mode {
  /* Core tokens for dark theme */
  --bg: #050815;
  --card-bg: #020617;
  --text-main: #e5e7ff;
  --text-muted: #94a3b8;
  --border: #1e293b;

  background-color: var(--bg);
  color: var(--text-main);
}

/* Header & nav in dark mode */
body.dark-mode header {
  background: radial-gradient(circle at top left, #020617, #050816);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.75);
}

body.dark-mode header::before {
  background: radial-gradient(circle at center,
    rgba(129, 140, 248, 0.9),
    rgba(15, 23, 42, 0.4)
  );
}

body.dark-mode header::after {
  background: radial-gradient(circle at center,
    rgba(56, 189, 248, 0.7),
    rgba(15, 23, 42, 0.4)
  );
}

body.dark-mode nav a {
  color: #e2e8f0;
}

body.dark-mode nav a:hover,
body.dark-mode nav a:focus {
  background-color: rgba(148, 163, 184, 0.18);
  color: #f9fafb;
}

/* All sections use the dark card background */
body.dark-mode section {
  --card-bg: #020617;
}

/* Cards in dark mode */
body.dark-mode .card {
  border-color: #1e293b;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

/* Card hover – subtle lift, still dark */
body.dark-mode .card:hover {
  background-color: #0d1228 !important;
  border-color: #475569;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  transform: translateY(-1px);
}

/* Text / metadata */
body.dark-mode .card-subtitle,
body.dark-mode .item-meta,
body.dark-mode .caption,
body.dark-mode .section-caption {
  color: #94a3b8;
}

/* Tags in hero */
body.dark-mode .tag {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.7);
  color: #e5e7ff;
}

/* Pills / chips */
body.dark-mode .pill {
  background: rgba(15, 23, 42, 0.92);
  color: #e5e7ff;
  border-color: #4b5563;
}

body.dark-mode .pill:hover {
  background-color: #020617;
  color: #e5e7ff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.7);
}

/* Hero elements */
body.dark-mode .hero-profile-wrapper {
  background: radial-gradient(circle at top,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 1)
  );
  border-color: rgba(148, 163, 184, 0.6);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
}

body.dark-mode .hero-card {
  background: radial-gradient(circle at top left,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 1)
  );
  border-color: #1e293b;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.9);
}

/* Secondary page hero gradients */
body.dark-mode .sports-hero,
body.dark-mode .travel-hero,
body.dark-mode .blogs-hero {
  background: radial-gradient(circle at top left,
              rgba(59, 130, 246, 0.16),
              #020617);
}

/* Links in contact / back-links */
body.dark-mode .contact-row a,
body.dark-mode .back-link a {
  color: #c7d2fe;
}

body.dark-mode .contact-row a:hover,
body.dark-mode .back-link a:hover {
  color: #e0e7ff;
}

/* Gallery cards */
body.dark-mode .gallery-item {
  background: #020617;
  border-color: #1f2933;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
}

/* Back to top & theme toggle buttons */
body.dark-mode .back-to-top-btn {
  background: rgba(15, 23, 42, 1);
  color: #f9fafb;
}

body.dark-mode .back-to-top-btn:hover {
  background: rgba(15, 23, 42, 1);
}

body.dark-mode .theme-toggle-btn {
  background: rgba(15, 23, 42, 0.96);
  color: #e5e7ff;
  border-color: #1e293b;
}

/* Footer */
body.dark-mode footer {
  background-color: #020617;
  border-top-color: #1e293b;
  color: #64748b;
}

/* ---------- Mobile tweaks (UPDATED) ---------- */


@media (max-width: 720px) {

  /* Keep brand + weather on the SAME row */
  .top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .brand {
    order: 0;
  }

  .toronto-meta { 
    order: 1;
    margin-left: auto;
    font-size: 11px;
    gap: 4px;
    white-space: nowrap;
  }

  .toronto-label {
    display: none;
  }

  /* Put navigation on its own row below */
  nav {
    order: 2;
    flex-basis: 100%;
    margin-top: 10px;
    justify-content: flex-start;
  }

  /* Existing layout rules (unchanged) */
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .hero-card {
    margin: 0 auto;
  }

  main {
    padding-top: 28px;
  }

  .two-col {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-top: 40px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-profile-wrapper {
    margin-top: 20px;
  }
}
