/* 321fly theme — IFR Low Enroute (dark-mode chart aesthetic) + Aviation-forward UI
   Path: site_src/sites/321fly/assets/css/site.css

   Intent:
   - Distinct from burnclouds: no scanlines/neon cyberdeck. This is “night IFR chart”.
   - Aviation-forward UI: index + post pages feel like mini plates / chart panels.
   - Consistent motifs: grid, VOR rings, airway lines, legend chips, fix diamonds.
*/

:root{
  --bg:#070a10;         /* night chart paper */
  --bg2:#0a0f1a;
  --panel:#0b1220;      /* chart panel */
  --panel2:#0d1628;
  --ink:#e7eef7;        /* primary text */
  --muted:#a7b3c2;      /* secondary text */
  --line:rgba(190,210,235,0.18);

  /* Chart inks (muted) */
  --cyan:#86d7ff;       /* airway/info cyan */
  --magenta:#ff7ad9;    /* fixes/IFR magenta hint */
  --amber:#f7c66a;      /* warning/notes */
  --green:#67e8a1;      /* status OK */

  --shadow: 0 18px 48px rgba(0,0,0,0.55);
  --radius: 16px;

  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

html,body{
  margin:0; padding:0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}

/* Dark IFR chart texture: grid + faint rings + airway strokes */
body{
  background:
    /* gentle vignette */
    radial-gradient(circle at 50% 15%, rgba(134,215,255,0.10), transparent 55%),
    radial-gradient(circle at 75% 65%, rgba(255,122,217,0.07), transparent 55%),
    radial-gradient(circle at 25% 70%, rgba(247,198,106,0.06), transparent 55%),

    /* VOR-ish rings (subtle) */
    radial-gradient(circle at 18% 34%, transparent 0 78px, rgba(190,210,235,0.08) 78px 79px, transparent 79px 120px, rgba(190,210,235,0.06) 120px 121px, transparent 121px 170px),
    radial-gradient(circle at 78% 38%, transparent 0 90px, rgba(190,210,235,0.07) 90px 91px, transparent 91px 140px, rgba(190,210,235,0.05) 140px 141px, transparent 141px 195px),

    /* chart grid */
    linear-gradient(0deg, rgba(190,210,235,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(190,210,235,0.05) 1px, transparent 1px),

    /* base */
    linear-gradient(180deg, var(--bg), var(--bg2) 60%, #070a10);
  background-size: auto, auto, auto, auto, auto, 64px 64px, 64px 64px, auto;
  background-position: 0 0;
}

/* Links: chart cyan */
a{
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(134,215,255,0.22);
}
a:hover{
  border-bottom-color: rgba(134,215,255,0.70);
}

/* Layout */
.wrap{
  max-width: 1020px;
  margin: 0 auto;
  padding: 22px 18px;
  position: relative;
}

.muted{ color: var(--muted); }

/* Header: “chart strip” */
.site-header{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(7,10,16,0.78);
  border-bottom: 1px solid rgba(134,215,255,0.14);
}
.site-header .wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
}
.brand{
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 1.05rem;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(134,215,255,0.18);
  background: linear-gradient(180deg, rgba(13,22,40,0.78), rgba(11,18,32,0.55));
}
.brand:hover{ border-color: rgba(134,215,255,0.38); }

.nav a{
  margin-left: 14px;
  color: rgba(231,238,247,0.92);
  border-bottom: none;
  font-weight: 650;
  opacity: 0.92;
}
.nav a:hover{ opacity: 1; }

/* Footer */
.site-footer{
  border-top: 1px solid rgba(134,215,255,0.12);
  margin-top: 46px;
  background: rgba(7,10,16,0.65);
}

/* =========================================================
   Aviation-forward “chart band” behind content (ALL pages)
   ========================================================= */
.wrap::before{
  content:"";
  position:absolute;
  left: -12px;
  right: -12px;
  top: -12px;
  height: 210px;
  pointer-events:none;
  border-radius: 18px;

  background:
    /* airway lines */
    linear-gradient(90deg,
      transparent 0%,
      rgba(134,215,255,0.18) 18%,
      transparent 34%,
      rgba(255,122,217,0.14) 52%,
      transparent 70%,
      rgba(247,198,106,0.12) 86%,
      transparent 100%),
    /* latitude/longitude ticks */
    repeating-linear-gradient(
      90deg,
      rgba(190,210,235,0.06) 0px,
      rgba(190,210,235,0.06) 1px,
      transparent 1px,
      transparent 54px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(190,210,235,0.05) 0px,
      rgba(190,210,235,0.05) 1px,
      transparent 1px,
      transparent 54px
    );

  opacity: 0.70;
}

/* =========================================================
   Panels (index cards + post body) — unified look
   ========================================================= */
.post,
.post-list-item{
  border: 1px solid rgba(190,210,235,0.18);
  border-radius: var(--radius);
  background: rgba(11,18,32,0.82);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

/* Plate-style corner ticks */
.post::after,
.post-list-item::after{
  content:"";
  position:absolute;
  inset: 10px;
  border: 1px dashed rgba(190,210,235,0.14);
  border-radius: calc(var(--radius) - 8px);
  pointer-events:none;
}

/* Airway stroke accent */
.post::before,
.post-list-item::before{
  content:"";
  position:absolute;
  left:-20%;
  top: 14px;
  width: 140%;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(134,215,255,0.55), rgba(255,122,217,0.22), transparent);
  opacity: 0.65;
}

/* =========================================================
   Index cards (blog/index.html)
   ========================================================= */
.post-list{
  list-style:none;
  padding:0;
  margin: 18px 0;
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
  position: relative;
}

/* Force rings to be visible behind the card grid too */
.post-list::before{
  content:"";
  position:absolute;
  inset: -8px;
  pointer-events:none;
  border-radius: 18px;
  background:
    radial-gradient(circle at 28% 20%, transparent 0 68px, rgba(190,210,235,0.10) 68px 69px, transparent 69px 112px),
    radial-gradient(circle at 70% 35%, transparent 0 84px, rgba(190,210,235,0.09) 84px 85px, transparent 85px 135px);
  opacity: 0.40;
}
.post-list > *{ position: relative; }

@media (min-width: 900px){
  .post-list{ grid-template-columns: 1fr 1fr; }
}

.post-list-item{
  padding: 16px 16px 14px;
}

.post-list-item > a{
  font-weight: 850;
  font-size: 1.18rem;
  border-bottom: none;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.post-list-item > a:hover{ color:#fff; }

.meta{
  margin-top: 6px;
  font-size: 0.94rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.summary{ color: var(--muted); }

/* =========================================================
   Tags — “chart legend pills”
   ========================================================= */
.tags{
  margin-top: 10px;
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
}
.tag{
  display:inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(134,215,255,0.22);
  background: rgba(134,215,255,0.08);
  color: rgba(231,238,247,0.90);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  border-bottom: none;
}
.tag:hover{
  border-color: rgba(134,215,255,0.30);
  background: rgba(134,215,255,0.10);
}

/* =========================================================
   Post page (blog/<slug>/index.html)
   ========================================================= */
.post{
  padding: 26px 22px;
}

.post header h1{
  margin: 0 0 10px;
  font-size: 2.0rem;
  letter-spacing: -0.02em;
}
.post header .meta{ margin-top: 8px; }

/* Content */
.post .content{
  font-size: 1.03rem;
  line-height: 1.72;
}

/* Chart section headers */
.post .content h2{
  margin-top: 1.35em;
  font-size: 1.35rem;
  border-bottom: none;
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.post .content h2::after{
  content:"";
  display:block;
  height: 2px;
  width: 180px;
  margin-top: 10px;
  background: linear-gradient(90deg,
    rgba(134,215,255,0.70),
    rgba(255,122,217,0.25),
    transparent);
  opacity: 0.85;
}

.post .content h3{
  margin-top: 1.1em;
  font-size: 1.15rem;
  color: rgba(134,215,255,0.92);
}

/* Fix-diamond bullets for unordered lists */
.post .content ul{
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}
.post .content ul li{
  position: relative;
  padding-left: 1.35em;
  margin: 0.55em 0;
}
.post .content ul li::before{
  content:"◆";
  position:absolute;
  left: 0;
  top: 0.1em;
  color: rgba(255,122,217,0.80);
  font-size: 0.95em;
}

/* Ordered steps feel like legs/checklists */
.post .content ol{
  padding-left: 1.2em;
}
.post .content ol li{
  margin: 0.65em 0;
}

/* Chart notes / callouts */
.post .content blockquote{
  margin: 16px 0;
  padding: 12px 14px;
  border-left: 4px solid rgba(134,215,255,0.65);
  background: linear-gradient(180deg, rgba(134,215,255,0.08), rgba(7,10,16,0.30));
  border-radius: 12px;
}

/* Code blocks = flight planning / logs */
.post .content pre{
  overflow:auto;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(134,215,255,0.22);
  background:
    radial-gradient(circle at 12% 20%, rgba(134,215,255,0.10), transparent 45%),
    rgba(7,10,16,0.70);
}
.post .content code{
  font-family: var(--mono);
  font-size: 0.95em;
}

/* Inline code */
.post .content :not(pre) > code{
  padding: 0.12em 0.35em;
  border-radius: 8px;
  background: rgba(255,122,217,0.08);
  border: 1px solid rgba(255,122,217,0.14);
}

/* Tables read like nav logs */
.post .content table{
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background: rgba(7,10,16,0.45);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(190,210,235,0.16);
}
.post .content th, .post .content td{
  border: 1px solid rgba(190,210,235,0.14);
  padding: 10px 10px;
}
.post .content th{
  text-align:left;
  background: rgba(134,215,255,0.10);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

/* Images */
.post .content img{
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(190,210,235,0.14);
  background: rgba(0,0,0,0.18);
}

/* Optional runway divider utility */
.hr-runway{
  border: 0;
  height: 10px;
  margin: 24px 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(231,238,247,0.55) 0 18px,
      transparent 18px 32px
    );
  border-radius: 999px;
  opacity: 0.55;
}

/* Print */
@media print{
  body{ background:#fff; color:#000; }
  .site-header, .site-footer, .nav{ display:none !important; }
  a{ color:#000; border-bottom:none; text-decoration:underline; }
  .post, .post-list-item{ box-shadow:none; background:#fff; border:1px solid #ddd; }
}
