/* Base design tokens */
:root {
  --bg: #f0e68c;           /* khaki base */
  --bg-2: #0b1e3a;          /* royal blue depth */
  --text: #0b1020;
  --muted: #5b634a;
  --accent: #4169e1;         /* royal blue */
  --accent-2: #88a9ff;
  --glass: rgba(255,255,255,.15);
  --shadow: 0 8px 28px rgba(0,0,0,.28);
  --radius: 12px;
  --radius-sm: 8px;
}

/* Layout primitives */
html, body { height: 100%; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(192,170,90,.25), rgba(11,30,58,.25) 60%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px),
    linear-gradient(#f0e68c, #e9dd9b);
  background-blend-mode: overlay, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  -ms-overflow-style: -ms-autohiding-scrollbar;
  text-rendering: optimizeLegibility;
}

/* Glass panels (fallback + backdrop-filter) */
.glass {
  background: rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0.75rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass {
    background: rgba(15,23,42,.65);
    border-color: rgba(255,255,255,.45);
  }
}

/* Containers & grid utilities */
.container {
  width: 100%;
  max-width: clamp(680px, 90vw, 1100px);
  padding-inline: 1rem;
  margin-inline: auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
}
.tag {
  display:inline-block;
  padding: .25rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #2a4bd2);
  border: 1px solid rgba(255,255,255,.4);
}

/* Typography & base elements */
html :where(h1, h2, h3, h4, h5, h6) { color: var(--text); margin: .5rem 0 0.25rem; }
h1 { font-size: clamp(1.4rem, 2.5vw + 1rem, 2.6rem); line-height: 1.15; }
h2 { font-size: clamp(1.25rem, 2vw + .75rem, 2rem); }
h3 { font-size: clamp(1.05rem, 1.5vw + .7rem, 1.4rem); }
p { margin: .4rem 0 1rem; color: #1b2a1e; }
blockquote {
  margin: .5rem 0 1rem;
  padding: .5rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(65,105,225,.10);
  border-radius: 6px;
}
ul, ol { padding-left: 1.25rem; margin: .25rem 0 0.75rem; }

/* Links & buttons (accessible color & focus) */
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }

.btn, .cta { display: inline-block; padding: .62rem .92rem; border-radius: 8px;
  border: 1px solid rgba(65,105,225,.6); background: var(--accent);
  color: #fff; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .2s ease, box-shadow .2s;
}
.btn:hover, .cta:hover { background: #2b60e6; transform: translateY(-1px); box-shadow: 0 6px 12px rgba(65,105,225,.4); }
.btn:active, .cta:active { transform: translateY(0); }
.btn.outline {
  background: transparent; color: var(--accent);
  border: 1px solid rgba(65,105,225,.6);
}
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Image framing */
.image-frame { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.3); box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Page sections
   - header, main, article, aside, footer targeted per requirement
*/
header {
  padding: 1rem 0;
}
header h1 { margin: 0; font-weight: 700; color: var(--text); }
header .meta { font-size: .9rem; color: var(--muted); margin: .25rem 0 0.25rem; }

/* Header wrapper with glass feel for prominent band */
header {
  padding-block: 1rem;
}
header .glass-wrap { padding: .5rem 0; }

nav { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .25rem 0; }
nav a { padding: .4rem .6rem; border-radius: 6px; border: 1px solid rgba(65,105,225,.4);
  background: rgba(65,105,225,.14); color: #fff; text-decoration: none;
}
nav a:hover, nav a:focus-visible { text-decoration: underline; background: rgba(65,105,225,.25); }

/* Main content area */
main { padding: 1rem 0; }
article { max-width: clamp(640px, 90vw, 900px); margin: 0 auto; padding: 1rem; }

/* Featured image container inside article */
.featured-image { margin: 0 0 1rem; }
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* Responsive helpers (mobile-first defaults) */
@media (max-width: 640px) {
  header { padding-inline: .5rem; }
  nav { gap: .25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .cta { transition: none; }
  * { animation: none !important; transition: none !important; }
}

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .glass { background: #fff; border: 1px solid #000; box-shadow: none; }
}
