:root {
  --bg1: #000000;
  --bg2: #000000;
  --glass: rgb(255 255 255);
  --border: rgba(255, 255, 255, 0.20);
  --text: #000000;
  --muted: #09090b;
  --primary: #000000;
  --primary-2: #000000;
  --accent: #000000;
  --accent-2: #000000;
  --accent-3: #000000;
  --danger: #ff6b6b;
  --ring: rgb(28 78 194);
  --container-width: 1040px;
  --container-gutter: 24px;
  --section-gap: 24px;
  --header-brand-size: 20px;
  --header-nav-size: 18px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, var(--bg1), var(--bg2));
}

.bg {
  position: fixed; inset: 0; pointer-events: none;
  background: url('/public/noise.png');
  opacity: .04;
}

/* Aurora layer + subtle grid via pseudo-elements */
.bg::before,
.bg::after {
  content: "";
  position: absolute; inset: -20%;
}

.bg::before {
  background:
    radial-gradient(50% 40% at 20% 25%, rgb(from var(--primary) r g b / .24), transparent 60%),
    radial-gradient(40% 35% at 80% 20%, rgb(from var(--primary-2) r g b / .18), transparent 60%),
    radial-gradient(45% 40% at 60% 70%, rgb(from var(--accent-2) r g b / .14), transparent 60%);
  filter: blur(36px) saturate(115%);
  animation: auroraShift 28s ease-in-out infinite alternate;
  opacity: .34;
}

.bg::after {
  inset: 0;
  background-image:
    linear-gradient(rgb(from var(--primary) r g b / 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgb(from var(--primary) r g b / 0.02) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  mask-image: radial-gradient(70% 60% at 50% 40%, black 30%, transparent 100%);
  mix-blend-mode: overlay;
  opacity: .5;
}

@keyframes auroraShift {
  0%   { transform: translate3d(0, 0, 0) rotate(0.001deg); }
  50%  { transform: translate3d(-4%, 2%, 0) scale(1.05); }
  100% { transform: translate3d(6%, -3%, 0) scale(1.08); }
}

.container { max-width: var(--container-width); margin: 0 auto; padding: var(--container-gutter); }
.row { display: flex; align-items: center; justify-content: space-between; }
.gap { gap: 12px; }

.small {
  font-size: 14px;
  color: #ffffff;
}

.mb { margin-bottom: 16px; }
.pad { padding: 28px; }
.center { text-align: center; }

.site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); width: calc(100% - (var(--container-gutter) * 2)); max-width: calc(var(--container-width) - (var(--container-gutter) * 2)); margin-left: auto; margin-right: auto; margin-top: var(--section-gap); }
.site-header { position: sticky; }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(122,162,255,.4), transparent); opacity: .6; }
.site-header .container { padding: 12px 16px; }
.site-header .nav { gap: 10px; }
.menu-toggle { display: none; appearance: none; background: transparent; border: none; padding: 8px; border-radius: 8px; cursor: pointer; color: var(--text); }
.menu-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.menu-toggle .menu-icon { display: block; width: 24px; height: 24px; object-fit: contain; filter: brightness(0) saturate(100%); opacity: 0.9; transition: opacity .15s ease; }
.menu-toggle:hover .menu-icon { opacity: 1; }
.site-footer { margin-top: 48px; opacity: .8; }

.brand { font-weight: 700; letter-spacing: 0.3px; color: var(--text); text-decoration: none; }
.nav { display: flex; align-items: center; gap: 12px; }
.nav-link { color: var(--text); opacity: .85; text-decoration: none; }
.nav-link:hover { opacity: 1; }

/* Larger header typography */
.site-header .brand { font-size: var(--header-brand-size); }
.site-header .nav-link,
.site-header .btn { font-size: var(--header-nav-size); }

.link {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

.link:hover { text-decoration-color: var(--accent-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); }

.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(12px) saturate(140%);
}

.hero { margin-top: 32px; padding: 48px; text-align: center; }
.hero .title { font-size: 44px; margin: 0 0 8px; line-height: 1.1; }
.hero .subtitle { color: var(--muted); margin: 0 0 20px; }
.hero .hero-content { max-width: 720px; margin: 0 auto; }

/* Futuristic gradient headings */
h1, h2, .hero .title, .card h3 {
  font-family: "Space Grotesk", Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(90deg, var(--primary), var(--accent-2) 50%, var(--primary-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

code, code * { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }

.grid {
  display: grid; gap: 16px; margin-top: var(--section-gap);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card { padding: 20px; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }

/* .card:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 16px 50px rgba(0,0,0,.35); border-color: rgba(255,255,255,0.28); } */

.btn { display: inline-block; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: all .2s ease; background: rgba(255,255,255,.04); position: relative; }

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .08);
  color: black;
}

.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }

.btn-primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  color: #ffffff;
  border: none;
  box-shadow: 0 8px 24px rgb(144 144 144 / 50%), 0 0 0 1px rgba(255, 255, 255, .1) inset;
}

.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 28px rgb(144 144 144 / 50%), 0 0 0 1px rgba(255, 255, 255, .14) inset;
}

.btn-danger { background: linear-gradient(180deg, var(--danger), #ff8c8c); color: #2b0f0f; border: none; }

.muted { color: var(--muted); }
code { background: rgba(255,255,255,.08); padding: 2px 6px; border-radius: 6px; }

.file-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.file-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: rgba(255,255,255,.05); transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.file-item:hover { border-color: rgba(122,162,255,.45); background: rgba(122,162,255,.06); transform: translateY(-1px); }
.file-meta { display: flex; align-items: center; gap: 12px; }
.file-icon { width: 28px; height: 28px; opacity: .9; }
.file-name { font-weight: 600; }
.file-sub { font-size: 13px; color: var(--muted); }

@media (max-width: 640px) {
  .hero { padding: 28px; }
  .hero .title { font-size: 32px; }
}

/* Collapse nav into a hamburger on tablets and smaller */
@media (max-width: 1024px) {
  .site-header .row { flex-wrap: wrap; }
  .site-header .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-header .nav { display: none; }
}

/* Floating mobile dropdown menu */
.mobile-nav {
  position: fixed;
  right: 16px;
  top: 64px; /* JS positions this precisely */
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  z-index: 1000;
  width: max-content;
  min-width: 180px;
}
.mobile-nav.open { display: flex; }
.mobile-nav .nav-link { display: block; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--text); }
.mobile-nav .nav-link:hover { background: rgba(255,255,255,.08); }

@media (min-width: 1025px) {
  .mobile-nav { display: none !important; }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .bg::before { animation: none; }
  .card, .btn, .file-item { transition: none; }
}

/* Link list with favicons on home card */
.link-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.link-list li { display: flex; align-items: center; gap: 8px; }
.link-icon { width: 18px; height: 18px; border-radius: 4px; }
.link-list a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
