:root {
  /* Copper + lilac themed tokens (dark, high contrast) */
  --bg: #0a0a0f;
  --bg-2: #1a0a07;
  --text: #e9e0ff;
  --muted: #c8b8d8;
  --accent: #b66a2f;
  --accent-2: #c59cff;
  --glass: rgba(255, 255, 255, 0.12);
  --glass-fallback: rgba(255, 255, 255, 0.20);
  --border: rgba(255, 255, 255, 0.34);
  --shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  --radius: 14px;
  --radius-sm: 12px;
  --focus: 3px solid #fff;
  --focus-offset: 2px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  line-height: 1.5;
  background:
    linear-gradient(135deg, rgba(182, 102, 47, 0.25) 0%, rgba(185, 99, 255, 0.25) 60%, rgba(0,0,0,0) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.03) 0 1px, transparent 1px 2px),
    #040407;
  background-blend-mode: overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
}

header, nav, main, article, aside, footer {
  display: block;
}

header {
  padding: 1.75rem 1rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

header h1 {
  font-size: clamp(1.6rem, 2.6vw + 1rem, 2.8rem);
  line-height: 1.15;
  margin: 0.25rem 0 0.75rem;
  letter-spacing: .2px;
  text-wrap: pretty;
}

nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

nav a {
  color: var(--text);
  text-decoration: none;
  padding: .4rem .8rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.18);
  transition: transform .2s ease;
}
nav a:hover { transform: translateY(-1px); text-decoration: underline; }
nav a:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); }

main { padding: 1rem; display: flex; justify-content: center; align-items: flex-start; }

.article { width: 100%; }

.image-frame {
  width: min(100%, 720px);
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
  background: #111;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.image-frame:hover img { transform: scale(1.03); }

/* Glass panels (with fallback) */
.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 0.75rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass {
    background: var(--glass-fallback);
  }
}

/* Content structure helpers */
.container { width: 100%; max-width: clamp(320px, 90vw, 1100px); margin-inline: auto; padding: 0 1rem; }

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

.card {
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 12px;
  padding: 1rem;
  transition: transform .2s ease, background .2s ease;
}
.card:hover { transform: translateY(-2px); background: rgba(0,0,0,.26); }

.tag {
  display: inline-block;
  padding: .25em .5em;
  border-radius: 999px;
  font-size: .75rem;
  color: #0c0800;
  background: rgba(198, 156, 255, .7);
  border: 1px solid rgba(255,255,255,.4);
  margin-right: .25em;
}

/* Link and button styles to fit theme */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-family: inherit;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; outline: none; }

.btn {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.28);
  background: linear-gradient(135deg, rgba(182,102,47,.95), rgba(166,96,30,.95));
  color: #fff;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); background: linear-gradient(135deg, rgba(182,102,47,.98), rgba(166,96,30,.98)); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.cta {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 9px;
  border: 1px solid rgba(196,161,255,.65);
  background: rgba(196,161,255,.15);
  color: var(--text);
}
.cta:hover { background: rgba(196,161,255,.25); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media print {
  body { color: #000; background: #fff; }
  header, nav, main, article, aside, footer { display: block; }
  a { text-decoration: underline; }
}
  
/* Accessibility helpers for focus rings on interactive elements */ 
:focus-visible { outline: 3px solid #fff; outline-offset: 2px; border-radius: 4px; }

/* Layout refinements for smaller viewports */
@media (max-width: 700px) {
  header { padding: 1.25rem 0.5rem; }
  .image-frame { border-radius: 12px; }
}
