/* ========== Base / Reset ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
:root{
  --bg: #f8fafc;         /* page background */
  --text: #0f172a;       /* primary text */
  --muted: #475569;      /* secondary text */
  --brand: #0a66c2;      /* accent color */
  --header-bg: #0f172a;  /* header background */
  --header-fg: #ffffff;  /* header text */
  --border: #e5e7eb;     /* light border */
}

@media (prefers-color-scheme: dark){
  :root{
    --bg: #0b1220;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --brand: #60a5fa;
    --header-bg: #0b1220;
    --header-fg: #e5e7eb;
    --border: #1f2937;
  }
}

body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Constrain content width without changing your HTML */
body > h2,
body > p,
.centered,
header {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1rem;
}

/* ========== Header / Menu ========== */
header{
  position: sticky;       /* stays at top on scroll; remove if you don’t want sticky */
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  color: var(--header-fg);
  border-bottom: 1px solid var(--border);
  padding-block: .75rem;  /* vertical padding */
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  border-radius: 0 0 14px 14px; /* subtle rounded bottom */
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

header h1{
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: .2px;
  font-weight: 700;
}

/* Horizontal nav */
header nav{
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

header nav a{
  color: var(--header-fg);
  text-decoration: none;
  padding: .5rem .75rem;
  border-radius: 10px;
  transition: background .15s ease, transform .1s ease, color .15s ease;
  outline-offset: 3px;
}

header nav a:hover,
header nav a:focus{
  background: rgba(255,255,255,.12);
}

header nav a:active{
  transform: translateY(1px);
}

/* Optional: highlight current page if you add aria-current="page" */
header nav a[aria-current="page"]{
  background: rgba(255,255,255,.18);
  font-weight: 600;
}

/* ========== Headings / Text ========== */
h2{
  margin: 1.5rem auto .5rem;
  font-size: clamp(1.4rem, 2.4vw + 1rem, 2rem);
  line-height: 1.2;
}

p{
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ========== Hero / Centered Block ========== */
.centered{
  margin-block: 1.25rem 2rem;
  display: grid;
  place-items: center;
  gap: 1rem;
  text-align: center;
}

/* Your image: scaled, rounded, shadowed */
.centered img{
  width: clamp(240px, 70vw, 800px);
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  border: 1px solid var(--border);
}

/* The YouTube link looks like a button */
.centered a[href*="youtube.com"]{
  display: inline-block;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  padding: .7rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .2px;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
  box-shadow: 0 8px 20px rgba(10,102,194,.25);
  outline-offset: 3px;
}
.centered a[href*="youtube.com"]:hover{ transform: translateY(-1px); }
.centered a[href*="youtube.com"]:active{ transform: translateY(0); opacity: .9; }

/* ========== Utilities / Small Screens ========== */
@media (max-width: 700px){
  header{
    flex-wrap: wrap;
    gap: .5rem 1rem;
  }
  header h1{ width: 100%; }
  header nav{ width: 100%; justify-content: flex-start; }
}

/* nicer focus rings for keyboard users */
a:focus-visible{
  outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent);
  border-radius: 10px;
}
